@revikornmann/muka-ui 0.9.2 → 0.11.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/dist/cjs/components/BottomBar/BottomBar.css +24 -2
- package/dist/cjs/components/BottomBar/BottomBar.js +1 -0
- package/dist/cjs/components/BottomBar/BottomBar.js.map +1 -1
- package/dist/cjs/components/ChatComposer/ChatComposer.css +52 -61
- package/dist/cjs/components/ChatComposer/ChatComposer.js +29 -6
- package/dist/cjs/components/ChatComposer/ChatComposer.js.map +1 -1
- package/dist/cjs/components/ChatComposer/index.js +6 -1
- package/dist/cjs/components/ChatComposer/index.js.map +1 -1
- package/dist/esm/components/BottomBar/BottomBar.css +24 -2
- package/dist/esm/components/BottomBar/BottomBar.js +1 -0
- package/dist/esm/components/BottomBar/BottomBar.js.map +1 -1
- package/dist/esm/components/ChatComposer/ChatComposer.css +52 -61
- package/dist/esm/components/ChatComposer/ChatComposer.js +29 -6
- package/dist/esm/components/ChatComposer/ChatComposer.js.map +1 -1
- package/dist/esm/components/ChatComposer/index.js +1 -0
- package/dist/esm/components/ChatComposer/index.js.map +1 -1
- package/dist/styles/components/BottomBar.css +24 -2
- package/dist/styles/components/ChatComposer.css +52 -61
- package/dist/styles/index.css +2771 -2757
- package/dist/styles/muka-dark.css +2771 -2757
- package/dist/styles/muka-light.css +2771 -2757
- package/dist/styles/tokens-bouwplan-dark.css +3 -2
- package/dist/styles/tokens-bouwplan-light.css +3 -2
- package/dist/styles/tokens-fscl-dark.css +3 -2
- package/dist/styles/tokens-fscl-light.css +3 -2
- package/dist/styles/tokens-grip-dark.css +3 -2
- package/dist/styles/tokens-grip-light.css +3 -2
- package/dist/styles/tokens-muka-dark.css +3 -2
- package/dist/styles/tokens-muka-light.css +3 -2
- package/dist/styles/tokens-wireframe-dark.css +3 -2
- package/dist/styles/tokens-wireframe-light.css +3 -2
- package/dist/styles/wireframe-dark.css +2771 -2757
- package/dist/styles/wireframe-light.css +2771 -2757
- package/dist/types/components/BottomBar/BottomBar.d.ts +3 -2
- package/dist/types/components/BottomBar/BottomBar.d.ts.map +1 -1
- package/dist/types/components/ChatComposer/ChatComposer.d.ts +50 -18
- package/dist/types/components/ChatComposer/ChatComposer.d.ts.map +1 -1
- package/dist/types/components/ChatComposer/index.d.ts +1 -0
- package/dist/types/components/ChatComposer/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/tokens/t4-components/bottombar.json +11 -5
|
@@ -62,6 +62,30 @@
|
|
|
62
62
|
flex-direction: row;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/* ─── Chat variant (houses a ChatComposer) ───────────── */
|
|
66
|
+
|
|
67
|
+
.muka-bottombar--chat .muka-bottombar__content {
|
|
68
|
+
flex-direction: row;
|
|
69
|
+
max-width: var(--bottombar-chat-max-width);
|
|
70
|
+
width: 100%;
|
|
71
|
+
margin: 0 auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Docked chat pads its content; the floating card supplies its own padding. */
|
|
75
|
+
.muka-bottombar--chat:not(.muka-bottombar--floating) .muka-bottombar__content {
|
|
76
|
+
padding: var(--bottombar-chat-padding);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Floating chat card widens to the chat cap (overrides the md default below). */
|
|
80
|
+
.muka-bottombar--chat.muka-bottombar--floating .muka-bottombar__content {
|
|
81
|
+
max-width: var(--bottombar-chat-max-width);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Let the composer fill the wider bar instead of its standalone 768px cap. */
|
|
85
|
+
.muka-bottombar--chat .muka-chat-composer {
|
|
86
|
+
max-width: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
65
89
|
/* ─── Tab item ────────────────────────────────────────── */
|
|
66
90
|
|
|
67
91
|
.muka-bottombar__tab {
|
|
@@ -118,8 +142,6 @@
|
|
|
118
142
|
var(--bottombar-floating-backdrop-start),
|
|
119
143
|
var(--bottombar-floating-backdrop-end)
|
|
120
144
|
);
|
|
121
|
-
backdrop-filter: blur(var(--bottombar-floating-backdrop-blur));
|
|
122
|
-
-webkit-backdrop-filter: blur(var(--bottombar-floating-backdrop-blur));
|
|
123
145
|
padding: var(--bottombar-floating-padding-top) var(--bottombar-floating-margin-x) var(--bottombar-floating-margin-bottom);
|
|
124
146
|
|
|
125
147
|
/* The transparent frosted margin around the pill overlays scrolling content;
|
|
@@ -23,6 +23,7 @@ exports.BottomBarTab = BottomBarTab;
|
|
|
23
23
|
* **Variants:**
|
|
24
24
|
* - `actions`: Renders children as a row of action buttons.
|
|
25
25
|
* - `navigation`: Renders BottomBarTab children as a tab bar.
|
|
26
|
+
* - `chat`: Houses a ChatComposer, capped at `container.max-width.lg` and centered.
|
|
26
27
|
*
|
|
27
28
|
* **Floating:** When `floating={true}`, the bar becomes a floating card
|
|
28
29
|
* with rounded corners, padding, and shadow — used in "top level" views.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomBar.js","sourceRoot":"","sources":["../../../../components/BottomBar/BottomBar.tsx"],"names":[],"mappings":";;;;AACA,2BAAyB;AAqBzB;;GAEG;AACI,MAAM,YAAY,GAAgC,CAAC,EACxD,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,GACR,EAAE,EAAE;IACH,MAAM,UAAU,GAAG;QACjB,qBAAqB;QACrB,MAAM,IAAI,6BAA6B;KACxC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,oCACE,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,KAAK,mBACK,MAAM,gBACT,KAAK,EACjB,IAAI,EAAC,QAAQ,aAEb,iCAAM,SAAS,EAAC,0BAA0B,YACvC,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,GACpC,EACP,iCAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,IACnD,CACV,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,YAAY,gBA2BvB;AAsCF
|
|
1
|
+
{"version":3,"file":"BottomBar.js","sourceRoot":"","sources":["../../../../components/BottomBar/BottomBar.tsx"],"names":[],"mappings":";;;;AACA,2BAAyB;AAqBzB;;GAEG;AACI,MAAM,YAAY,GAAgC,CAAC,EACxD,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,GACR,EAAE,EAAE;IACH,MAAM,UAAU,GAAG;QACjB,qBAAqB;QACrB,MAAM,IAAI,6BAA6B;KACxC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,oCACE,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,KAAK,mBACK,MAAM,gBACT,KAAK,EACjB,IAAI,EAAC,QAAQ,aAEb,iCAAM,SAAS,EAAC,0BAA0B,YACvC,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,GACpC,EACP,iCAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,IACnD,CACV,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,YAAY,gBA2BvB;AAsCF;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,SAAS,GAA6B,CAAC,EAClD,OAAO,EACP,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,IAAI,EACf,SAAS,EACT,eAAe,GAAG,KAAK,EACvB,QAAQ,EACR,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG;QACvB,gBAAgB;QAChB,mBAAmB,OAAO,EAAE;QAC5B,IAAI,IAAI,mBAAmB,IAAI,EAAE;QACjC,QAAQ,IAAI,0BAA0B;QACtC,SAAS,IAAI,OAAO,KAAK,YAAY,IAAI,2BAA2B,SAAS,EAAE;QAC/E,eAAe,IAAI,8BAA8B;QACjD,SAAS;KACV,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,MAAM,aAAa,GAAG,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvE,OAAO,CACL,oCAAQ,SAAS,EAAE,gBAAgB,aAChC,CAAC,QAAQ,IAAI,QAAQ,IAAI,CACxB,gCAAK,SAAS,EAAC,yBAAyB,EAAC,IAAI,EAAC,WAAW,GAAG,CAC7D,EACD,gCAAK,SAAS,EAAC,yBAAyB,EAAC,IAAI,EAAE,aAAa,YACzD,QAAQ,GACL,IACC,CACV,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,SAAS,aAgCpB;AAEF,kBAAe,iBAAS,CAAC"}
|
|
@@ -3,15 +3,9 @@
|
|
|
3
3
|
.muka-chat-composer {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
gap: var(--spacing-
|
|
6
|
+
gap: var(--spacing-3);
|
|
7
7
|
width: 100%;
|
|
8
8
|
max-width: 768px;
|
|
9
|
-
padding: var(--spacing-3);
|
|
10
|
-
background-color: var(--color-surface-level3);
|
|
11
|
-
border-radius: var(--radius-xl);
|
|
12
|
-
box-shadow:
|
|
13
|
-
0 0 0.5px var(--color-black-alpha-5, rgba(0, 0, 0, 0.09)),
|
|
14
|
-
0 8px 8px var(--color-black-alpha-5, rgba(0, 0, 0, 0.09));
|
|
15
9
|
}
|
|
16
10
|
|
|
17
11
|
.muka-chat-composer--disabled {
|
|
@@ -19,28 +13,33 @@
|
|
|
19
13
|
pointer-events: none;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
/* ───
|
|
16
|
+
/* ─── Input row ────────────────────────────────────────── */
|
|
23
17
|
|
|
24
|
-
.muka-chat-
|
|
18
|
+
.muka-chat-composer__row {
|
|
25
19
|
display: flex;
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
width: 100%;
|
|
21
|
+
align-items: flex-end;
|
|
22
|
+
gap: var(--spacing-3);
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
/* ───
|
|
25
|
+
/* ─── Text field ───────────────────────────────────────── */
|
|
31
26
|
|
|
32
|
-
.muka-chat-
|
|
27
|
+
.muka-chat-composer__field {
|
|
33
28
|
display: flex;
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: var(--spacing-1);
|
|
34
|
+
min-height: var(--input-field-height-lg, 48px);
|
|
35
|
+
padding: 0 var(--spacing-2);
|
|
36
36
|
border: var(--border-width-regular) solid var(--input-field-color-default-border);
|
|
37
37
|
border-radius: var(--input-field-radius-lg);
|
|
38
38
|
background-color: var(--input-field-color-default-background);
|
|
39
|
-
padding: var(--spacing-2);
|
|
40
39
|
transition: border-color 0.12s ease;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
.muka-chat-
|
|
42
|
+
.muka-chat-composer__field:focus-within {
|
|
44
43
|
border-color: var(--input-field-color-focus-border, var(--color-action-default));
|
|
45
44
|
}
|
|
46
45
|
|
|
@@ -48,16 +47,17 @@
|
|
|
48
47
|
flex: 1 1 auto;
|
|
49
48
|
min-width: 0;
|
|
50
49
|
width: 100%;
|
|
50
|
+
box-sizing: border-box;
|
|
51
51
|
resize: none;
|
|
52
52
|
border: none;
|
|
53
53
|
background: transparent;
|
|
54
54
|
outline: none;
|
|
55
|
-
padding: var(--spacing-1)
|
|
55
|
+
padding: 0 var(--spacing-1);
|
|
56
56
|
color: var(--color-text-default-default);
|
|
57
|
-
font-family: var(--text-body-
|
|
58
|
-
font-weight: var(--text-body-
|
|
59
|
-
font-size: var(--text-body-
|
|
60
|
-
line-height: var(--text-body-
|
|
57
|
+
font-family: var(--text-body-base-regular-fontFamily);
|
|
58
|
+
font-weight: var(--text-body-base-regular-fontWeight);
|
|
59
|
+
font-size: var(--text-body-base-regular-fontSize);
|
|
60
|
+
line-height: var(--text-body-base-regular-lineHeight);
|
|
61
61
|
appearance: none;
|
|
62
62
|
-webkit-appearance: none;
|
|
63
63
|
}
|
|
@@ -66,57 +66,48 @@
|
|
|
66
66
|
color: var(--color-text-subtle-default);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/*
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: space-between;
|
|
75
|
-
gap: var(--spacing-2);
|
|
69
|
+
/* Keep the in-field emoji button flush to the bottom-right as the field grows */
|
|
70
|
+
.muka-chat-composer__emoji {
|
|
71
|
+
flex-shrink: 0;
|
|
76
72
|
}
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
gap: var(--spacing-1);
|
|
82
|
-
}
|
|
74
|
+
/* ─── Recording bar ────────────────────────────────────── */
|
|
83
75
|
|
|
84
|
-
.muka-chat-
|
|
76
|
+
.muka-chat-composer__recording {
|
|
85
77
|
display: flex;
|
|
78
|
+
flex: 1 1 auto;
|
|
79
|
+
min-width: 0;
|
|
80
|
+
box-sizing: border-box;
|
|
86
81
|
align-items: center;
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
min-height: var(--input-field-height-lg, 48px);
|
|
83
|
+
padding: var(--card-padding-sm);
|
|
84
|
+
border: var(--border-width-regular) solid var(--card-color-default-border);
|
|
85
|
+
border-radius: var(--radius-lg);
|
|
86
|
+
background-color: var(--card-color-default-background);
|
|
89
87
|
}
|
|
90
88
|
|
|
91
|
-
/* ───
|
|
89
|
+
/* ─── Staged attachments strip ─────────────────────────── */
|
|
92
90
|
|
|
93
|
-
.muka-chat-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
justify-content: center;
|
|
97
|
-
width: var(--size-3xl, 40px);
|
|
98
|
-
height: var(--size-3xl, 40px);
|
|
99
|
-
border: none;
|
|
100
|
-
border-radius: var(--radius-lg);
|
|
101
|
-
background-color: var(--button-color-primary-background-default);
|
|
102
|
-
color: var(--button-color-primary-foreground-default);
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
flex-shrink: 0;
|
|
105
|
-
-webkit-tap-highlight-color: transparent;
|
|
106
|
-
transition: background-color 0.12s ease;
|
|
91
|
+
.muka-chat-composer__attachments-strip {
|
|
92
|
+
position: relative;
|
|
93
|
+
width: 100%;
|
|
107
94
|
}
|
|
108
95
|
|
|
109
|
-
.muka-chat-
|
|
110
|
-
|
|
96
|
+
.muka-chat-composer__attachments {
|
|
97
|
+
display: flex;
|
|
98
|
+
gap: var(--spacing-3);
|
|
99
|
+
overflow-x: auto;
|
|
100
|
+
scroll-behavior: smooth;
|
|
101
|
+
scrollbar-width: none;
|
|
111
102
|
}
|
|
112
103
|
|
|
113
|
-
.muka-chat-
|
|
114
|
-
|
|
115
|
-
color: var(--color-text-subtle-default);
|
|
116
|
-
cursor: not-allowed;
|
|
104
|
+
.muka-chat-composer__attachments::-webkit-scrollbar {
|
|
105
|
+
display: none;
|
|
117
106
|
}
|
|
118
107
|
|
|
119
|
-
.muka-chat-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
.muka-chat-composer__overflow {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 50%;
|
|
111
|
+
right: var(--spacing-2);
|
|
112
|
+
transform: translateY(-50%);
|
|
122
113
|
}
|
|
@@ -4,27 +4,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.ChatComposer = void 0;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
+
const Button_1 = require("../Button");
|
|
7
8
|
const Icon_1 = require("../Icon");
|
|
8
9
|
const Spinner_1 = require("../Spinner");
|
|
9
10
|
require("./ChatComposer.css");
|
|
10
11
|
/**
|
|
11
12
|
* ChatComposer — input affordance for chat conversations.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
14
|
+
* A horizontal row of `[leading button] · [input field] · [trailing button]`.
|
|
15
|
+
* The trailing button toggles between a mic (empty field) and a send button
|
|
16
|
+
* (text entered). Supports a voice-recording layout and a staged-attachments
|
|
17
|
+
* strip. Submits on Enter (Shift+Enter for a newline). Designed to live in a
|
|
18
|
+
* `BottomBar`.
|
|
15
19
|
*/
|
|
16
|
-
exports.ChatComposer = (0, react_1.forwardRef)(({ value, onChange, onSubmit, placeholder = 'Reply...',
|
|
20
|
+
exports.ChatComposer = (0, react_1.forwardRef)(({ value, onChange, onSubmit, placeholder = 'Reply...', onLeadingClick, leadingIcon = 'add', leadingLabel = 'Add attachment', onEmoji, showEmoji = true, emojiLabel = 'Add emoji', onRecordStart, micLabel = 'Record voice message', sendLabel = 'Send message', recording = false, recordingSlot, onRecordPause, onRecordDiscard, pauseLabel = 'Pause recording', discardLabel = 'Discard recording', attachments, attachmentsOverflowLabel = 'Show more attachments', loading = false, disabled = false, maxLines = 10, autoFocus = false, className = '', }, forwardedRef) => {
|
|
17
21
|
const textareaRef = (0, react_1.useRef)(null);
|
|
22
|
+
const attachmentsRef = (0, react_1.useRef)(null);
|
|
18
23
|
(0, react_1.useImperativeHandle)(forwardedRef, () => textareaRef.current);
|
|
24
|
+
// Auto-grow the textarea up to `maxLines`, then scroll.
|
|
19
25
|
(0, react_1.useEffect)(() => {
|
|
20
26
|
const el = textareaRef.current;
|
|
21
27
|
if (!el)
|
|
22
28
|
return;
|
|
23
29
|
el.style.height = 'auto';
|
|
30
|
+
const lineHeight = parseFloat(getComputedStyle(el).lineHeight) || 20;
|
|
31
|
+
const maxHeight = lineHeight * maxLines;
|
|
24
32
|
const next = Math.min(el.scrollHeight, maxHeight);
|
|
25
33
|
el.style.height = `${next}px`;
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
el.style.overflowY = el.scrollHeight > maxHeight ? 'auto' : 'hidden';
|
|
35
|
+
}, [value, maxLines, recording]);
|
|
36
|
+
const canSubmit = recording
|
|
37
|
+
? !disabled && !loading
|
|
38
|
+
: !disabled && !loading && value.trim().length > 0;
|
|
28
39
|
const handleSubmit = () => {
|
|
29
40
|
if (!canSubmit)
|
|
30
41
|
return;
|
|
@@ -36,8 +47,18 @@ exports.ChatComposer = (0, react_1.forwardRef)(({ value, onChange, onSubmit, pla
|
|
|
36
47
|
handleSubmit();
|
|
37
48
|
}
|
|
38
49
|
};
|
|
50
|
+
const scrollAttachments = () => {
|
|
51
|
+
const el = attachmentsRef.current;
|
|
52
|
+
if (!el)
|
|
53
|
+
return;
|
|
54
|
+
el.scrollBy({ left: el.clientWidth * 0.8, behavior: 'smooth' });
|
|
55
|
+
};
|
|
56
|
+
// Trailing button is a mic only when the field is empty, not recording, and
|
|
57
|
+
// a record handler is supplied; otherwise it is the send button.
|
|
58
|
+
const showMic = !recording && onRecordStart && value.trim().length === 0;
|
|
39
59
|
const classes = [
|
|
40
60
|
'muka-chat-composer',
|
|
61
|
+
recording && 'muka-chat-composer--recording',
|
|
41
62
|
disabled && 'muka-chat-composer--disabled',
|
|
42
63
|
className,
|
|
43
64
|
]
|
|
@@ -46,7 +67,9 @@ exports.ChatComposer = (0, react_1.forwardRef)(({ value, onChange, onSubmit, pla
|
|
|
46
67
|
return ((0, jsx_runtime_1.jsxs)("form", { className: classes, onSubmit: (e) => {
|
|
47
68
|
e.preventDefault();
|
|
48
69
|
handleSubmit();
|
|
49
|
-
}, children: [attachments && ((0, jsx_runtime_1.
|
|
70
|
+
}, children: [attachments && ((0, jsx_runtime_1.jsxs)("div", { className: "muka-chat-composer__attachments-strip", children: [(0, jsx_runtime_1.jsx)("div", { className: "muka-chat-composer__attachments", ref: attachmentsRef, children: attachments }), (0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", className: "muka-chat-composer__overflow", variant: "secondary", size: "sm", iconOnly: true, "aria-label": attachmentsOverflowLabel, onClick: scrollAttachments, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "arrow-right-s", size: "xs" }) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "muka-chat-composer__row", children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", variant: "secondary", size: "lg", iconOnly: true, disabled: disabled, "aria-label": recording ? discardLabel : leadingLabel, onClick: recording ? onRecordDiscard : onLeadingClick, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: recording ? 'delete-bin' : leadingIcon, size: "md" }) }), recording ? ((0, jsx_runtime_1.jsx)("div", { className: "muka-chat-composer__recording", children: recordingSlot })) : ((0, jsx_runtime_1.jsxs)("div", { className: "muka-chat-composer__field", children: [(0, jsx_runtime_1.jsx)("textarea", { ref: textareaRef, className: "muka-chat-composer__input", value: value, onChange: (e) => onChange(e.target.value), onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled,
|
|
71
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
72
|
+
autoFocus: autoFocus, rows: 1, "aria-label": placeholder }), showEmoji && ((0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", className: "muka-chat-composer__emoji", variant: "ghost", size: "md", iconOnly: true, disabled: disabled, "aria-label": emojiLabel, onClick: onEmoji, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "emotion-happy", size: "sm" }) }))] })), recording && ((0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", variant: "secondary", size: "lg", iconOnly: true, disabled: disabled, "aria-label": pauseLabel, onClick: onRecordPause, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "pause-circle", size: "md" }) })), showMic ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", variant: "secondary", size: "lg", iconOnly: true, disabled: disabled, "aria-label": micLabel, onClick: onRecordStart, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "mic", size: "md" }) })) : ((0, jsx_runtime_1.jsx)(Button_1.Button, { type: "submit", variant: "primary", size: "lg", iconOnly: true, disabled: !canSubmit, "aria-label": sendLabel, children: loading ? ((0, jsx_runtime_1.jsx)(Spinner_1.Spinner, { size: "sm", variant: "inverse" })) : ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "send-plane2", size: "md" })) }))] })] }));
|
|
50
73
|
});
|
|
51
74
|
exports.ChatComposer.displayName = 'ChatComposer';
|
|
52
75
|
exports.default = exports.ChatComposer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.js","sourceRoot":"","sources":["../../../../components/ChatComposer/ChatComposer.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,iCAKe;AACf,
|
|
1
|
+
{"version":3,"file":"ChatComposer.js","sourceRoot":"","sources":["../../../../components/ChatComposer/ChatComposer.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,iCAKe;AACf,sCAAmC;AACnC,kCAA8C;AAC9C,wCAAqC;AACrC,8BAA4B;AA+F5B;;;;;;;;GAQG;AACU,QAAA,YAAY,GAAG,IAAA,kBAAU,EACpC,CACE,EACE,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,GAAG,UAAU,EACxB,cAAc,EACd,WAAW,GAAG,KAAK,EACnB,YAAY,GAAG,gBAAgB,EAC/B,OAAO,EACP,SAAS,GAAG,IAAI,EAChB,UAAU,GAAG,WAAW,EACxB,aAAa,EACb,QAAQ,GAAG,sBAAsB,EACjC,SAAS,GAAG,cAAc,EAC1B,SAAS,GAAG,KAAK,EACjB,aAAa,EACb,aAAa,EACb,eAAe,EACf,UAAU,GAAG,iBAAiB,EAC9B,YAAY,GAAG,mBAAmB,EAClC,WAAW,EACX,wBAAwB,GAAG,uBAAuB,EAClD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,EAAE,EACb,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,EAAE,GACf,EACD,YAAY,EACZ,EAAE;IACF,MAAM,WAAW,GAAG,IAAA,cAAM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AAC,IAAI,GAAG,GAChC,CACV,IACG,CACP,EAEA,SAAS,IAAI,CACZ,uBAAC,eAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,IAAI,EACT,QAAQ,QACR,QAAQ,EAAE,QAAQ,gBACN,UAAU,EACtB,OAAO,EAAE,aAAa,YAEtB,uBAAC,WAAI,IAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,IAAI,GAAG,GAC/B,CACV,EAEA,OAAO,CAAC,CAAC,CAAC,CACT,uBAAC,eAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,IAAI,EACT,QAAQ,QACR,QAAQ,EAAE,QAAQ,gBACN,QAAQ,EACpB,OAAO,EAAE,aAAa,YAEtB,uBAAC,WAAI,IAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,GAAG,GACtB,CACV,CAAC,CAAC,CAAC,CACF,uBAAC,eAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,QAAQ,QACR,QAAQ,EAAE,CAAC,SAAS,gBACR,SAAS,YAEpB,OAAO,CAAC,CAAC,CAAC,CACT,uBAAC,iBAAO,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,GAAG,CACxC,CAAC,CAAC,CAAC,CACF,uBAAC,WAAI,IAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,IAAI,GAAG,CACtC,GACM,CACV,IACG,IACD,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,kBAAe,oBAAY,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatComposer = void 0;
|
|
6
|
+
exports.default = exports.ChatComposer = void 0;
|
|
4
7
|
var ChatComposer_1 = require("./ChatComposer");
|
|
5
8
|
Object.defineProperty(exports, "ChatComposer", { enumerable: true, get: function () { return ChatComposer_1.ChatComposer; } });
|
|
9
|
+
var ChatComposer_2 = require("./ChatComposer");
|
|
10
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ChatComposer_2).default; } });
|
|
6
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/ChatComposer/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/ChatComposer/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAsE;AAA7D,4GAAA,YAAY,OAAA;AACrB,+CAAyC;AAAhC,wHAAA,OAAO,OAAA"}
|
|
@@ -62,6 +62,30 @@
|
|
|
62
62
|
flex-direction: row;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/* ─── Chat variant (houses a ChatComposer) ───────────── */
|
|
66
|
+
|
|
67
|
+
.muka-bottombar--chat .muka-bottombar__content {
|
|
68
|
+
flex-direction: row;
|
|
69
|
+
max-width: var(--bottombar-chat-max-width);
|
|
70
|
+
width: 100%;
|
|
71
|
+
margin: 0 auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Docked chat pads its content; the floating card supplies its own padding. */
|
|
75
|
+
.muka-bottombar--chat:not(.muka-bottombar--floating) .muka-bottombar__content {
|
|
76
|
+
padding: var(--bottombar-chat-padding);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Floating chat card widens to the chat cap (overrides the md default below). */
|
|
80
|
+
.muka-bottombar--chat.muka-bottombar--floating .muka-bottombar__content {
|
|
81
|
+
max-width: var(--bottombar-chat-max-width);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Let the composer fill the wider bar instead of its standalone 768px cap. */
|
|
85
|
+
.muka-bottombar--chat .muka-chat-composer {
|
|
86
|
+
max-width: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
65
89
|
/* ─── Tab item ────────────────────────────────────────── */
|
|
66
90
|
|
|
67
91
|
.muka-bottombar__tab {
|
|
@@ -118,8 +142,6 @@
|
|
|
118
142
|
var(--bottombar-floating-backdrop-start),
|
|
119
143
|
var(--bottombar-floating-backdrop-end)
|
|
120
144
|
);
|
|
121
|
-
backdrop-filter: blur(var(--bottombar-floating-backdrop-blur));
|
|
122
|
-
-webkit-backdrop-filter: blur(var(--bottombar-floating-backdrop-blur));
|
|
123
145
|
padding: var(--bottombar-floating-padding-top) var(--bottombar-floating-margin-x) var(--bottombar-floating-margin-bottom);
|
|
124
146
|
|
|
125
147
|
/* The transparent frosted margin around the pill overlays scrolling content;
|
|
@@ -19,6 +19,7 @@ export const BottomBarTab = ({ icon, activeIcon, label, active = false, onClick,
|
|
|
19
19
|
* **Variants:**
|
|
20
20
|
* - `actions`: Renders children as a row of action buttons.
|
|
21
21
|
* - `navigation`: Renders BottomBarTab children as a tab bar.
|
|
22
|
+
* - `chat`: Houses a ChatComposer, capped at `container.max-width.lg` and centered.
|
|
22
23
|
*
|
|
23
24
|
* **Floating:** When `floating={true}`, the bar becomes a floating card
|
|
24
25
|
* with rounded corners, padding, and shadow — used in "top level" views.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomBar.js","sourceRoot":"","sources":["../../../../components/BottomBar/BottomBar.tsx"],"names":[],"mappings":";AACA,OAAO,iBAAiB,CAAC;AAqBzB;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,GACR,EAAE,EAAE;IACH,MAAM,UAAU,GAAG;QACjB,qBAAqB;QACrB,MAAM,IAAI,6BAA6B;KACxC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,kBACE,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,KAAK,mBACK,MAAM,gBACT,KAAK,EACjB,IAAI,EAAC,QAAQ,aAEb,eAAM,SAAS,EAAC,0BAA0B,YACvC,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,GACpC,EACP,eAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,IACnD,CACV,CAAC;AACJ,CAAC,CAAC;AAsCF
|
|
1
|
+
{"version":3,"file":"BottomBar.js","sourceRoot":"","sources":["../../../../components/BottomBar/BottomBar.tsx"],"names":[],"mappings":";AACA,OAAO,iBAAiB,CAAC;AAqBzB;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,GACR,EAAE,EAAE;IACH,MAAM,UAAU,GAAG;QACjB,qBAAqB;QACrB,MAAM,IAAI,6BAA6B;KACxC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,kBACE,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,KAAK,mBACK,MAAM,gBACT,KAAK,EACjB,IAAI,EAAC,QAAQ,aAEb,eAAM,SAAS,EAAC,0BAA0B,YACvC,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,GACpC,EACP,eAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,IACnD,CACV,CAAC;AACJ,CAAC,CAAC;AAsCF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,OAAO,EACP,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,IAAI,EACf,SAAS,EACT,eAAe,GAAG,KAAK,EACvB,QAAQ,EACR,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG;QACvB,gBAAgB;QAChB,mBAAmB,OAAO,EAAE;QAC5B,IAAI,IAAI,mBAAmB,IAAI,EAAE;QACjC,QAAQ,IAAI,0BAA0B;QACtC,SAAS,IAAI,OAAO,KAAK,YAAY,IAAI,2BAA2B,SAAS,EAAE;QAC/E,eAAe,IAAI,8BAA8B;QACjD,SAAS;KACV,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,MAAM,aAAa,GAAG,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvE,OAAO,CACL,kBAAQ,SAAS,EAAE,gBAAgB,aAChC,CAAC,QAAQ,IAAI,QAAQ,IAAI,CACxB,cAAK,SAAS,EAAC,yBAAyB,EAAC,IAAI,EAAC,WAAW,GAAG,CAC7D,EACD,cAAK,SAAS,EAAC,yBAAyB,EAAC,IAAI,EAAE,aAAa,YACzD,QAAQ,GACL,IACC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -3,15 +3,9 @@
|
|
|
3
3
|
.muka-chat-composer {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
gap: var(--spacing-
|
|
6
|
+
gap: var(--spacing-3);
|
|
7
7
|
width: 100%;
|
|
8
8
|
max-width: 768px;
|
|
9
|
-
padding: var(--spacing-3);
|
|
10
|
-
background-color: var(--color-surface-level3);
|
|
11
|
-
border-radius: var(--radius-xl);
|
|
12
|
-
box-shadow:
|
|
13
|
-
0 0 0.5px var(--color-black-alpha-5, rgba(0, 0, 0, 0.09)),
|
|
14
|
-
0 8px 8px var(--color-black-alpha-5, rgba(0, 0, 0, 0.09));
|
|
15
9
|
}
|
|
16
10
|
|
|
17
11
|
.muka-chat-composer--disabled {
|
|
@@ -19,28 +13,33 @@
|
|
|
19
13
|
pointer-events: none;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
/* ───
|
|
16
|
+
/* ─── Input row ────────────────────────────────────────── */
|
|
23
17
|
|
|
24
|
-
.muka-chat-
|
|
18
|
+
.muka-chat-composer__row {
|
|
25
19
|
display: flex;
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
width: 100%;
|
|
21
|
+
align-items: flex-end;
|
|
22
|
+
gap: var(--spacing-3);
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
/* ───
|
|
25
|
+
/* ─── Text field ───────────────────────────────────────── */
|
|
31
26
|
|
|
32
|
-
.muka-chat-
|
|
27
|
+
.muka-chat-composer__field {
|
|
33
28
|
display: flex;
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: var(--spacing-1);
|
|
34
|
+
min-height: var(--input-field-height-lg, 48px);
|
|
35
|
+
padding: 0 var(--spacing-2);
|
|
36
36
|
border: var(--border-width-regular) solid var(--input-field-color-default-border);
|
|
37
37
|
border-radius: var(--input-field-radius-lg);
|
|
38
38
|
background-color: var(--input-field-color-default-background);
|
|
39
|
-
padding: var(--spacing-2);
|
|
40
39
|
transition: border-color 0.12s ease;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
.muka-chat-
|
|
42
|
+
.muka-chat-composer__field:focus-within {
|
|
44
43
|
border-color: var(--input-field-color-focus-border, var(--color-action-default));
|
|
45
44
|
}
|
|
46
45
|
|
|
@@ -48,16 +47,17 @@
|
|
|
48
47
|
flex: 1 1 auto;
|
|
49
48
|
min-width: 0;
|
|
50
49
|
width: 100%;
|
|
50
|
+
box-sizing: border-box;
|
|
51
51
|
resize: none;
|
|
52
52
|
border: none;
|
|
53
53
|
background: transparent;
|
|
54
54
|
outline: none;
|
|
55
|
-
padding: var(--spacing-1)
|
|
55
|
+
padding: 0 var(--spacing-1);
|
|
56
56
|
color: var(--color-text-default-default);
|
|
57
|
-
font-family: var(--text-body-
|
|
58
|
-
font-weight: var(--text-body-
|
|
59
|
-
font-size: var(--text-body-
|
|
60
|
-
line-height: var(--text-body-
|
|
57
|
+
font-family: var(--text-body-base-regular-fontFamily);
|
|
58
|
+
font-weight: var(--text-body-base-regular-fontWeight);
|
|
59
|
+
font-size: var(--text-body-base-regular-fontSize);
|
|
60
|
+
line-height: var(--text-body-base-regular-lineHeight);
|
|
61
61
|
appearance: none;
|
|
62
62
|
-webkit-appearance: none;
|
|
63
63
|
}
|
|
@@ -66,57 +66,48 @@
|
|
|
66
66
|
color: var(--color-text-subtle-default);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/*
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: space-between;
|
|
75
|
-
gap: var(--spacing-2);
|
|
69
|
+
/* Keep the in-field emoji button flush to the bottom-right as the field grows */
|
|
70
|
+
.muka-chat-composer__emoji {
|
|
71
|
+
flex-shrink: 0;
|
|
76
72
|
}
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
gap: var(--spacing-1);
|
|
82
|
-
}
|
|
74
|
+
/* ─── Recording bar ────────────────────────────────────── */
|
|
83
75
|
|
|
84
|
-
.muka-chat-
|
|
76
|
+
.muka-chat-composer__recording {
|
|
85
77
|
display: flex;
|
|
78
|
+
flex: 1 1 auto;
|
|
79
|
+
min-width: 0;
|
|
80
|
+
box-sizing: border-box;
|
|
86
81
|
align-items: center;
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
min-height: var(--input-field-height-lg, 48px);
|
|
83
|
+
padding: var(--card-padding-sm);
|
|
84
|
+
border: var(--border-width-regular) solid var(--card-color-default-border);
|
|
85
|
+
border-radius: var(--radius-lg);
|
|
86
|
+
background-color: var(--card-color-default-background);
|
|
89
87
|
}
|
|
90
88
|
|
|
91
|
-
/* ───
|
|
89
|
+
/* ─── Staged attachments strip ─────────────────────────── */
|
|
92
90
|
|
|
93
|
-
.muka-chat-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
justify-content: center;
|
|
97
|
-
width: var(--size-3xl, 40px);
|
|
98
|
-
height: var(--size-3xl, 40px);
|
|
99
|
-
border: none;
|
|
100
|
-
border-radius: var(--radius-lg);
|
|
101
|
-
background-color: var(--button-color-primary-background-default);
|
|
102
|
-
color: var(--button-color-primary-foreground-default);
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
flex-shrink: 0;
|
|
105
|
-
-webkit-tap-highlight-color: transparent;
|
|
106
|
-
transition: background-color 0.12s ease;
|
|
91
|
+
.muka-chat-composer__attachments-strip {
|
|
92
|
+
position: relative;
|
|
93
|
+
width: 100%;
|
|
107
94
|
}
|
|
108
95
|
|
|
109
|
-
.muka-chat-
|
|
110
|
-
|
|
96
|
+
.muka-chat-composer__attachments {
|
|
97
|
+
display: flex;
|
|
98
|
+
gap: var(--spacing-3);
|
|
99
|
+
overflow-x: auto;
|
|
100
|
+
scroll-behavior: smooth;
|
|
101
|
+
scrollbar-width: none;
|
|
111
102
|
}
|
|
112
103
|
|
|
113
|
-
.muka-chat-
|
|
114
|
-
|
|
115
|
-
color: var(--color-text-subtle-default);
|
|
116
|
-
cursor: not-allowed;
|
|
104
|
+
.muka-chat-composer__attachments::-webkit-scrollbar {
|
|
105
|
+
display: none;
|
|
117
106
|
}
|
|
118
107
|
|
|
119
|
-
.muka-chat-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
.muka-chat-composer__overflow {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 50%;
|
|
111
|
+
right: var(--spacing-2);
|
|
112
|
+
transform: translateY(-50%);
|
|
122
113
|
}
|