@flamingo-stack/openframe-frontend-core 0.0.685-snapshot.20260929165916 → 0.0.685
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/{chunk-4LBCUBVL.cjs → chunk-5LJZPJHX.cjs} +59 -59
- package/dist/{chunk-4LBCUBVL.cjs.map → chunk-5LJZPJHX.cjs.map} +1 -1
- package/dist/{chunk-2G2CB7ZZ.js → chunk-65KTXRBY.js} +6 -6
- package/dist/{chunk-ASBBGP36.js → chunk-7XF63THA.js} +6 -6
- package/dist/{chunk-SI77HF4U.cjs → chunk-A3CSQB4A.cjs} +805 -1247
- package/dist/chunk-A3CSQB4A.cjs.map +1 -0
- package/dist/{chunk-RBCMBRI7.cjs → chunk-B25CF3PO.cjs} +30 -30
- package/dist/{chunk-RBCMBRI7.cjs.map → chunk-B25CF3PO.cjs.map} +1 -1
- package/dist/{chunk-JBJZL5PI.js → chunk-B32YLOYQ.js} +4 -4
- package/dist/{chunk-UBXEETWQ.cjs → chunk-B5N3AHPG.cjs} +81 -81
- package/dist/{chunk-UBXEETWQ.cjs.map → chunk-B5N3AHPG.cjs.map} +1 -1
- package/dist/{chunk-QOH45QSE.js → chunk-BZ2XOEHW.js} +3 -3
- package/dist/{chunk-N3I53B5W.cjs → chunk-C3B36OYZ.cjs} +3 -3
- package/dist/{chunk-N3I53B5W.cjs.map → chunk-C3B36OYZ.cjs.map} +1 -1
- package/dist/{chunk-GETQTNRV.cjs → chunk-CMQXPD5C.cjs} +28 -28
- package/dist/{chunk-GETQTNRV.cjs.map → chunk-CMQXPD5C.cjs.map} +1 -1
- package/dist/{chunk-QNWQQ4RT.cjs → chunk-DQOQ3KTP.cjs} +73 -78
- package/dist/chunk-DQOQ3KTP.cjs.map +1 -0
- package/dist/{chunk-QTXDXHMD.cjs → chunk-DWXWEGGO.cjs} +22 -22
- package/dist/{chunk-QTXDXHMD.cjs.map → chunk-DWXWEGGO.cjs.map} +1 -1
- package/dist/{chunk-MZAZUSPQ.cjs → chunk-EFBMNVSH.cjs} +15 -15
- package/dist/{chunk-MZAZUSPQ.cjs.map → chunk-EFBMNVSH.cjs.map} +1 -1
- package/dist/{chunk-U6JC3RS2.js → chunk-GHLGXFNU.js} +3 -3
- package/dist/{chunk-IELOPDTA.js → chunk-GXV6UEVY.js} +3 -3
- package/dist/{chunk-3DO76UAB.cjs → chunk-HMXUOLZR.cjs} +20 -20
- package/dist/{chunk-3DO76UAB.cjs.map → chunk-HMXUOLZR.cjs.map} +1 -1
- package/dist/{chunk-2OD2PPNO.cjs → chunk-K2HZG4RM.cjs} +32 -32
- package/dist/{chunk-2OD2PPNO.cjs.map → chunk-K2HZG4RM.cjs.map} +1 -1
- package/dist/{chunk-IBUFFKAK.cjs → chunk-M4HYIXP6.cjs} +383 -399
- package/dist/chunk-M4HYIXP6.cjs.map +1 -0
- package/dist/{chunk-WFH52OVQ.js → chunk-N4Z6X5BV.js} +5 -5
- package/dist/{chunk-C5TFPMOM.js → chunk-O7LOZW4R.js} +5 -5
- package/dist/{chunk-ZS3YCJYY.cjs → chunk-P2ASEPA2.cjs} +6 -6
- package/dist/{chunk-ZS3YCJYY.cjs.map → chunk-P2ASEPA2.cjs.map} +1 -1
- package/dist/{chunk-PG65AE3I.js → chunk-PSQKD6ZN.js} +3 -3
- package/dist/{chunk-RKH7DEDF.cjs → chunk-QHLJSB2J.cjs} +12 -12
- package/dist/{chunk-RKH7DEDF.cjs.map → chunk-QHLJSB2J.cjs.map} +1 -1
- package/dist/{chunk-II5GVLTN.cjs → chunk-T4DUTP5C.cjs} +5 -5
- package/dist/{chunk-II5GVLTN.cjs.map → chunk-T4DUTP5C.cjs.map} +1 -1
- package/dist/{chunk-22RSJ57Z.js → chunk-T6KWNJDW.js} +465 -470
- package/dist/chunk-T6KWNJDW.js.map +1 -0
- package/dist/{chunk-AF4XOURN.cjs → chunk-TJI5V5BR.cjs} +7 -7
- package/dist/{chunk-AF4XOURN.cjs.map → chunk-TJI5V5BR.cjs.map} +1 -1
- package/dist/{chunk-HLEXYTOE.js → chunk-TUG7IT6H.js} +2 -2
- package/dist/{chunk-WJX3ZSOE.cjs → chunk-U3IXG7TR.cjs} +33 -33
- package/dist/{chunk-WJX3ZSOE.cjs.map → chunk-U3IXG7TR.cjs.map} +1 -1
- package/dist/{chunk-LCOMNQLX.js → chunk-UT333EOT.js} +4 -4
- package/dist/{chunk-MHTB67ZH.js → chunk-VDPCK437.js} +5 -21
- package/dist/{chunk-MHTB67ZH.js.map → chunk-VDPCK437.js.map} +1 -1
- package/dist/{chunk-NINO3PI7.js → chunk-WJK2EETW.js} +2 -2
- package/dist/{chunk-YPXXXX6R.js → chunk-XGX6JSEU.js} +1644 -2086
- package/dist/chunk-XGX6JSEU.js.map +1 -0
- package/dist/{chunk-3NIZ2VLQ.js → chunk-XW7MUIW4.js} +3 -3
- package/dist/{chunk-RSMAVO2Z.js → chunk-Y7ZYOQNB.js} +3 -3
- package/dist/{chunk-P4SBHO7U.cjs → chunk-YCTVLN47.cjs} +10 -10
- package/dist/{chunk-P4SBHO7U.cjs.map → chunk-YCTVLN47.cjs.map} +1 -1
- package/dist/{chunk-4RJQMOQW.js → chunk-ZF4Z36G4.js} +7 -7
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/ai-assistant-info.d.ts.map +1 -1
- package/dist/components/chat/approval-request-message.d.ts.map +1 -1
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/error-message-display.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +3 -21
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +0 -6
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +2 -20
- package/dist/components/chat/msp-organization-card.d.ts +1 -7
- package/dist/components/chat/msp-organization-card.d.ts.map +1 -1
- package/dist/components/chat/types/chat.types.d.ts +0 -13
- package/dist/components/chat/types/chat.types.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +1 -20
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +91 -91
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +55 -73
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +15 -33
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +41 -41
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/avatar-stack.d.ts +1 -5
- package/dist/components/ui/avatar-stack.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +4 -22
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +3 -21
- package/dist/components/ui/reopen-ticket-request-modal.d.ts +1 -4
- package/dist/components/ui/reopen-ticket-request-modal.d.ts.map +1 -1
- package/dist/components/ui/tab-navigation.d.ts +0 -7
- package/dist/components/ui/tab-navigation.d.ts.map +1 -1
- package/dist/index.cjs +9 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/ai-assistant-info.tsx +1 -7
- package/src/components/chat/approval-request-message.tsx +1 -6
- package/src/components/chat/chat-input.tsx +1 -26
- package/src/components/chat/chat-message-enhanced.tsx +142 -180
- package/src/components/chat/chat-message-list.tsx +164 -169
- package/src/components/chat/error-message-display.tsx +3 -21
- package/src/components/chat/index.ts +0 -6
- package/src/components/chat/msp-organization-card.tsx +0 -35
- package/src/components/chat/types/chat.types.ts +0 -15
- package/src/components/chat/types/component.types.ts +0 -20
- package/src/components/ui/__tests__/tab-navigation.test.tsx +2 -56
- package/src/components/ui/avatar-stack.tsx +5 -15
- package/src/components/ui/reopen-ticket-request-modal.tsx +2 -6
- package/src/components/ui/tab-navigation.tsx +0 -23
- package/src/styles/ods-colors.css +0 -10
- package/src/styles/ods-effects.css +0 -13
- package/dist/chunk-22RSJ57Z.js.map +0 -1
- package/dist/chunk-IBUFFKAK.cjs.map +0 -1
- package/dist/chunk-QNWQQ4RT.cjs.map +0 -1
- package/dist/chunk-SI77HF4U.cjs.map +0 -1
- package/dist/chunk-YPXXXX6R.js.map +0 -1
- package/dist/components/chat/chat-appearance-context.d.ts +0 -9
- package/dist/components/chat/chat-appearance-context.d.ts.map +0 -1
- package/dist/components/chat/chat-nav-sidebar.d.ts +0 -50
- package/dist/components/chat/chat-nav-sidebar.d.ts.map +0 -1
- package/dist/components/chat/chat-top-navigation.d.ts +0 -29
- package/dist/components/chat/chat-top-navigation.d.ts.map +0 -1
- package/dist/components/chat/onboarding-carousel.d.ts +0 -29
- package/dist/components/chat/onboarding-carousel.d.ts.map +0 -1
- package/dist/components/chat/system-event-message.d.ts +0 -14
- package/dist/components/chat/system-event-message.d.ts.map +0 -1
- package/src/components/chat/__tests__/chat-appearance.test.tsx +0 -79
- package/src/components/chat/__tests__/onboarding-carousel.test.tsx +0 -56
- package/src/components/chat/chat-appearance-context.tsx +0 -15
- package/src/components/chat/chat-nav-sidebar.tsx +0 -163
- package/src/components/chat/chat-top-navigation.tsx +0 -109
- package/src/components/chat/onboarding-carousel.tsx +0 -162
- package/src/components/chat/system-event-message.tsx +0 -54
- package/src/components/ui/__tests__/avatar-stack.test.tsx +0 -25
- package/src/stories/FaeLayoutV2.stories.tsx +0 -150
- package/src/stories/FaeOnboardingV2.stories.tsx +0 -68
- package/src/stories/FaeThreadV2.stories.tsx +0 -192
- package/src/stories/fae-brand-decorator.tsx +0 -28
- /package/dist/{chunk-2G2CB7ZZ.js.map → chunk-65KTXRBY.js.map} +0 -0
- /package/dist/{chunk-ASBBGP36.js.map → chunk-7XF63THA.js.map} +0 -0
- /package/dist/{chunk-JBJZL5PI.js.map → chunk-B32YLOYQ.js.map} +0 -0
- /package/dist/{chunk-QOH45QSE.js.map → chunk-BZ2XOEHW.js.map} +0 -0
- /package/dist/{chunk-U6JC3RS2.js.map → chunk-GHLGXFNU.js.map} +0 -0
- /package/dist/{chunk-IELOPDTA.js.map → chunk-GXV6UEVY.js.map} +0 -0
- /package/dist/{chunk-WFH52OVQ.js.map → chunk-N4Z6X5BV.js.map} +0 -0
- /package/dist/{chunk-C5TFPMOM.js.map → chunk-O7LOZW4R.js.map} +0 -0
- /package/dist/{chunk-PG65AE3I.js.map → chunk-PSQKD6ZN.js.map} +0 -0
- /package/dist/{chunk-HLEXYTOE.js.map → chunk-TUG7IT6H.js.map} +0 -0
- /package/dist/{chunk-LCOMNQLX.js.map → chunk-UT333EOT.js.map} +0 -0
- /package/dist/{chunk-NINO3PI7.js.map → chunk-WJK2EETW.js.map} +0 -0
- /package/dist/{chunk-3NIZ2VLQ.js.map → chunk-XW7MUIW4.js.map} +0 -0
- /package/dist/{chunk-RSMAVO2Z.js.map → chunk-Y7ZYOQNB.js.map} +0 -0
- /package/dist/{chunk-4RJQMOQW.js.map → chunk-ZF4Z36G4.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, fireEvent, screen } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, beforeAll, vi } from 'vitest';
|
|
3
|
-
import {
|
|
4
|
-
import { TabNavigation, type TabItem
|
|
3
|
+
import { mockReplace, setMockSearchParams } from '../../../../vitest.setup';
|
|
4
|
+
import { TabNavigation, type TabItem } from '../tab-navigation';
|
|
5
5
|
|
|
6
6
|
beforeAll(() => {
|
|
7
7
|
// jsdom ships no ResizeObserver; the tab strip observes itself on mount to
|
|
@@ -156,60 +156,6 @@ describe('TabNavigation with urlSync', () => {
|
|
|
156
156
|
expect(nav.active).toBe('general');
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
|
-
|
|
160
|
-
describe('with sync options', () => {
|
|
161
|
-
function renderWith(options: TabNavigationUrlSyncOptions) {
|
|
162
|
-
let seen = '__never-rendered__';
|
|
163
|
-
render(
|
|
164
|
-
<TabNavigation tabs={TABS} urlSync={options}>
|
|
165
|
-
{active => {
|
|
166
|
-
seen = active;
|
|
167
|
-
return null;
|
|
168
|
-
}}
|
|
169
|
-
</TabNavigation>,
|
|
170
|
-
);
|
|
171
|
-
return {
|
|
172
|
-
get active() {
|
|
173
|
-
return seen;
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
it('reads and writes the param it was given, leaving `tab` alone', () => {
|
|
179
|
-
setMockSearchParams(new URLSearchParams('tab=general&view=software'));
|
|
180
|
-
const nav = renderWith({ paramName: 'view' });
|
|
181
|
-
expect(nav.active).toBe('software');
|
|
182
|
-
|
|
183
|
-
fireEvent.click(screen.getByText('General'));
|
|
184
|
-
expect(mockReplace).toHaveBeenCalledWith('/?tab=general&view=general', { scroll: false });
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
it('pushes a history entry when `replaceState` is off', () => {
|
|
188
|
-
setMockSearchParams(new URLSearchParams('tab=general'));
|
|
189
|
-
renderWith({ replaceState: false });
|
|
190
|
-
fireEvent.click(screen.getByText('Software'));
|
|
191
|
-
|
|
192
|
-
expect(mockPush).toHaveBeenCalledWith('/?tab=software', { scroll: false });
|
|
193
|
-
expect(mockReplace).not.toHaveBeenCalled();
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
describe('a tab with a badge', () => {
|
|
198
|
-
it('draws the stamp after the label and names the tab with it', () => {
|
|
199
|
-
setMockSearchParams(new URLSearchParams('tab=general'));
|
|
200
|
-
render(
|
|
201
|
-
<TabNavigation tabs={[...TABS, { id: 'logs', label: 'Device Logs', badge: 'Beta' }]} urlSync>
|
|
202
|
-
{() => null}
|
|
203
|
-
</TabNavigation>,
|
|
204
|
-
);
|
|
205
|
-
|
|
206
|
-
const tab = screen.getByRole('button', { name: 'Device Logs (Beta)' });
|
|
207
|
-
expect(tab.textContent).toBe('Device LogsBeta');
|
|
208
|
-
// Tabs without a badge keep their label as the accessible name.
|
|
209
|
-
expect(screen.getByRole('button', { name: 'General' }).textContent).toBe('General');
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
|
|
213
159
|
describe('the underline', () => {
|
|
214
160
|
it('is sized in real pixels rather than a scaled 1px bar', () => {
|
|
215
161
|
// Regression guard. The underline used to be `w-px` stretched with
|
|
@@ -33,10 +33,6 @@ export interface AvatarStackProps {
|
|
|
33
33
|
* so the text beside every stack starts at the same x.
|
|
34
34
|
*/
|
|
35
35
|
slots?: number;
|
|
36
|
-
/** How many people the group has when `people` is only a sample of it (a
|
|
37
|
-
* server that returns the first few faces plus a count). The "+N" circle
|
|
38
|
-
* then counts everyone not shown. Defaults to `people.length`. */
|
|
39
|
-
total?: number;
|
|
40
36
|
/** Size bucket (also sizes the "+N" circle). `xs` (24px) is for
|
|
41
37
|
* dense card meta rows (chat compact cards, delivery rows). */
|
|
42
38
|
size?: AvatarStackSize;
|
|
@@ -67,28 +63,22 @@ export function AvatarStack({
|
|
|
67
63
|
people,
|
|
68
64
|
max = 3,
|
|
69
65
|
slots,
|
|
70
|
-
total,
|
|
71
66
|
size = 'md',
|
|
72
67
|
ringClassName = 'ring-ods-card',
|
|
73
68
|
label = 'Assignees',
|
|
74
69
|
className,
|
|
75
70
|
}: AvatarStackProps) {
|
|
76
71
|
if (people.length === 0) return null;
|
|
77
|
-
const
|
|
78
|
-
const faces = slots ? (groupSize > slots ? slots - 1 : slots) : max;
|
|
72
|
+
const faces = slots ? (people.length > slots ? slots - 1 : slots) : max;
|
|
79
73
|
const visible = people.slice(0, faces);
|
|
80
74
|
const overflow = people.slice(faces);
|
|
81
|
-
const overflowCount = groupSize - visible.length;
|
|
82
|
-
const names = people.map(p => p.name).join(', ');
|
|
83
|
-
// Names beyond the sample are unknown here; say how many there are instead.
|
|
84
|
-
const unnamed = groupSize - people.length;
|
|
85
75
|
const compact = size === 'xs';
|
|
86
76
|
return (
|
|
87
77
|
<div
|
|
88
78
|
className={cn('flex items-center', slots && 'shrink-0', className)}
|
|
89
79
|
style={slots ? { width: SIZE_PX[size] + (slots - 1) * (SIZE_PX[size] - OVERLAP_PX[size]) } : undefined}
|
|
90
80
|
role="group"
|
|
91
|
-
aria-label={`${label}: ${
|
|
81
|
+
aria-label={`${label}: ${people.map(p => p.name).join(', ')}`}
|
|
92
82
|
>
|
|
93
83
|
{visible.map((person, i) => (
|
|
94
84
|
<SquareAvatar
|
|
@@ -105,9 +95,9 @@ export function AvatarStack({
|
|
|
105
95
|
style={{ zIndex: visible.length - i }}
|
|
106
96
|
/>
|
|
107
97
|
))}
|
|
108
|
-
{
|
|
98
|
+
{overflow.length > 0 && (
|
|
109
99
|
<span
|
|
110
|
-
title={overflow.
|
|
100
|
+
title={overflow.map(p => p.name).join(', ')}
|
|
111
101
|
className={cn(
|
|
112
102
|
'relative z-0 flex shrink-0 items-center justify-center rounded-full bg-ods-bg text-ods-text-secondary ring-2',
|
|
113
103
|
ringClassName,
|
|
@@ -119,7 +109,7 @@ export function AvatarStack({
|
|
|
119
109
|
OVERFLOW_CIRCLE_SIZE[size],
|
|
120
110
|
)}
|
|
121
111
|
>
|
|
122
|
-
+{
|
|
112
|
+
+{overflow.length}
|
|
123
113
|
</span>
|
|
124
114
|
)}
|
|
125
115
|
</div>
|
|
@@ -28,9 +28,6 @@ export interface ReopenTicketRequestModalProps {
|
|
|
28
28
|
* omits `handoffToTechnician`.
|
|
29
29
|
*/
|
|
30
30
|
showHandoffOption?: boolean;
|
|
31
|
-
/** Opens with the handoff checkbox already ticked — the user reached the
|
|
32
|
-
* modal by asking for a technician, so that is the choice to confirm. */
|
|
33
|
-
defaultHandoff?: boolean;
|
|
34
31
|
/** Confirm in-flight: buttons lock and the modal refuses to close. */
|
|
35
32
|
isPending?: boolean;
|
|
36
33
|
onConfirm: (selection: ReopenTicketRequestSelection) => void;
|
|
@@ -48,12 +45,11 @@ export function ReopenTicketRequestModal({
|
|
|
48
45
|
isOpen,
|
|
49
46
|
onClose,
|
|
50
47
|
showHandoffOption = false,
|
|
51
|
-
defaultHandoff = false,
|
|
52
48
|
isPending = false,
|
|
53
49
|
onConfirm,
|
|
54
50
|
}: ReopenTicketRequestModalProps) {
|
|
55
51
|
const [reason, setReason] = useState('');
|
|
56
|
-
const [handoff, setHandoff] = useState(
|
|
52
|
+
const [handoff, setHandoff] = useState(false);
|
|
57
53
|
|
|
58
54
|
// Re-seed the inputs every time the modal opens. Adjusted while rendering,
|
|
59
55
|
// not from an effect: the modal does not unmount when it closes, so an effect
|
|
@@ -64,7 +60,7 @@ export function ReopenTicketRequestModal({
|
|
|
64
60
|
setWasOpen(isOpen);
|
|
65
61
|
if (isOpen) {
|
|
66
62
|
setReason('');
|
|
67
|
-
setHandoff(
|
|
63
|
+
setHandoff(false);
|
|
68
64
|
}
|
|
69
65
|
}
|
|
70
66
|
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
} from 'react';
|
|
15
15
|
import { useSearchParams, useRouter, usePathname } from '../../embed-shims/next-navigation';
|
|
16
16
|
import { cn } from '../../utils/cn';
|
|
17
|
-
import { Tag } from './tag';
|
|
18
17
|
|
|
19
18
|
export interface TabItem {
|
|
20
19
|
id: string;
|
|
@@ -44,13 +43,6 @@ export interface TabItem {
|
|
|
44
43
|
*/
|
|
45
44
|
component?: React.ComponentType<any>;
|
|
46
45
|
indicator?: 'success' | 'warning' | 'error';
|
|
47
|
-
/**
|
|
48
|
-
* A stamp drawn after the label, e.g. "Beta" on a tab that is shipped but
|
|
49
|
-
* still behind its flag. The same `warning` chip the navigation sidebar draws
|
|
50
|
-
* for `NavigationSidebarItem.badge`; the tab's accessible name becomes
|
|
51
|
-
* "Label (Badge)". Cased as read — the chip upper-cases it.
|
|
52
|
-
*/
|
|
53
|
-
badge?: string;
|
|
54
46
|
}
|
|
55
47
|
|
|
56
48
|
export interface TabNavigationUrlSyncOptions {
|
|
@@ -337,7 +329,6 @@ const TabBar = memo(function TabBarImpl({
|
|
|
337
329
|
ref={isActive ? activeTabRef : undefined}
|
|
338
330
|
type="button"
|
|
339
331
|
onClick={() => onTabChange(tab.id)}
|
|
340
|
-
aria-label={tab.badge ? `${tab.label} (${tab.badge})` : undefined}
|
|
341
332
|
className={cn(
|
|
342
333
|
'relative flex shrink-0 cursor-pointer items-center justify-center gap-[var(--spacing-system-xxs)] p-[var(--spacing-system-m)]',
|
|
343
334
|
// Named rather than `transition-all`: the only thing that moves
|
|
@@ -385,20 +376,6 @@ const TabBar = memo(function TabBarImpl({
|
|
|
385
376
|
>
|
|
386
377
|
{tab.label}
|
|
387
378
|
</span>
|
|
388
|
-
|
|
389
|
-
{tab.badge && (
|
|
390
|
-
// The chip is 32px against a 20/24px label line. The negative
|
|
391
|
-
// margin takes the difference back, so a stamped tab is exactly
|
|
392
|
-
// as tall as its neighbours at every breakpoint. No hover shade:
|
|
393
|
-
// the tab is the target, and the cursor passes through to it.
|
|
394
|
-
<Tag
|
|
395
|
-
as="span"
|
|
396
|
-
aria-hidden
|
|
397
|
-
label={tab.badge}
|
|
398
|
-
variant="warning"
|
|
399
|
-
className="pointer-events-none my-[calc((var(--font-line-space-h4-body)_-_2rem)/2)] ml-[var(--spacing-system-xxs)] shrink-0"
|
|
400
|
-
/>
|
|
401
|
-
)}
|
|
402
379
|
</button>
|
|
403
380
|
);
|
|
404
381
|
})}
|
|
@@ -407,16 +407,6 @@
|
|
|
407
407
|
--color-focus-ring: #00ff00;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
/* ===================================================================== */
|
|
411
|
-
/* BRAND-TINTED SURFACE — the page background takes 2% of the accent. */
|
|
412
|
-
/* Figma's fae-background (#1a1719) and mingo-background (#171b1a) are */
|
|
413
|
-
/* exactly 2% of their brand over the base background. Resolved on the */
|
|
414
|
-
/* element, so it follows the theme and a runtime (tenant) accent. */
|
|
415
|
-
/* ===================================================================== */
|
|
416
|
-
[data-surface='brand-tinted'] {
|
|
417
|
-
--color-bg: color-mix(in srgb, var(--color-accent-primary) 2%, var(--ods-system-greys-background));
|
|
418
|
-
}
|
|
419
|
-
|
|
420
410
|
/* ===================================================================== */
|
|
421
411
|
/* PLATFORM OVERRIDES — brand/accent ONLY. */
|
|
422
412
|
/* Reference `--ods-*` so they follow the active theme; never touch */
|
|
@@ -51,16 +51,3 @@
|
|
|
51
51
|
.ods-shadow-glyph {
|
|
52
52
|
filter: var(--ods-shadow-glyph);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
/* The brand glow in the bottom-right corner of a chat surface (Fae chat v2):
|
|
56
|
-
the accent at 4% fading out over the whole surface (radial fill centred on
|
|
57
|
-
the corner, radii 100% × 103% as in the design). Written
|
|
58
|
-
on the class, not as a :root variable, so the accent resolves on the element
|
|
59
|
-
and follows a platform or runtime (tenant) accent set below the root. */
|
|
60
|
-
.ods-glow-accent-corner {
|
|
61
|
-
background-image: radial-gradient(
|
|
62
|
-
100% 103% at 100% 100%,
|
|
63
|
-
color-mix(in srgb, var(--color-accent-primary) 4%, transparent) 0%,
|
|
64
|
-
color-mix(in srgb, var(--color-accent-primary) 0%, transparent) 100%
|
|
65
|
-
);
|
|
66
|
-
}
|