@flamingo-stack/openframe-frontend-core 0.0.466 → 0.0.467-snapshot.20260723125044
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-5H3HACZZ.cjs → chunk-2WZAR2MB.cjs} +37 -37
- package/dist/{chunk-5H3HACZZ.cjs.map → chunk-2WZAR2MB.cjs.map} +1 -1
- package/dist/{chunk-FGL4ZNR7.cjs → chunk-3I34MUEG.cjs} +62 -62
- package/dist/{chunk-FGL4ZNR7.cjs.map → chunk-3I34MUEG.cjs.map} +1 -1
- package/dist/{chunk-VLLFRPNP.cjs → chunk-3PLQWO4H.cjs} +913 -742
- package/dist/chunk-3PLQWO4H.cjs.map +1 -0
- package/dist/{chunk-GRB7LPJV.js → chunk-3TU6QURP.js} +2 -2
- package/dist/{chunk-KX2TBXKN.js → chunk-AEM7ADDG.js} +2 -2
- package/dist/{chunk-RQZOCLTI.js → chunk-CLW2S55N.js} +4 -4
- package/dist/{chunk-YN77BNI7.cjs → chunk-ELIY4AO2.cjs} +26 -26
- package/dist/{chunk-YN77BNI7.cjs.map → chunk-ELIY4AO2.cjs.map} +1 -1
- package/dist/{chunk-FHLJQI4F.js → chunk-EZESVVIM.js} +4 -4
- package/dist/{chunk-7DULN25L.js → chunk-HTSWLPMU.js} +2 -2
- package/dist/{chunk-KLBBOLDK.cjs → chunk-HVLMAT4T.cjs} +5 -5
- package/dist/{chunk-KLBBOLDK.cjs.map → chunk-HVLMAT4T.cjs.map} +1 -1
- package/dist/{chunk-CC73CSLI.js → chunk-IUMPVRSH.js} +2 -2
- package/dist/{chunk-3WF7INYU.cjs → chunk-J6CE6HZS.cjs} +11 -11
- package/dist/{chunk-3WF7INYU.cjs.map → chunk-J6CE6HZS.cjs.map} +1 -1
- package/dist/{chunk-72HPXAMZ.js → chunk-JW3UNHGW.js} +2 -2
- package/dist/{chunk-BVNAYWLM.cjs → chunk-L3BWGFHT.cjs} +15 -15
- package/dist/{chunk-BVNAYWLM.cjs.map → chunk-L3BWGFHT.cjs.map} +1 -1
- package/dist/{chunk-NHNKMR22.cjs → chunk-MULVIGIN.cjs} +59 -59
- package/dist/{chunk-NHNKMR22.cjs.map → chunk-MULVIGIN.cjs.map} +1 -1
- package/dist/{chunk-OO7DO4DI.js → chunk-O2QOC5FA.js} +4 -4
- package/dist/{chunk-IZCOYFCN.js → chunk-P5SLNM3C.js} +5276 -5105
- package/dist/chunk-P5SLNM3C.js.map +1 -0
- package/dist/{chunk-WAO34PFO.js → chunk-QTGYQ2U7.js} +2 -2
- package/dist/{chunk-GHZMNDPN.js → chunk-QZJN5OHK.js} +4 -4
- package/dist/{chunk-HDP5VRPL.cjs → chunk-TISXEAGH.cjs} +7 -7
- package/dist/{chunk-HDP5VRPL.cjs.map → chunk-TISXEAGH.cjs.map} +1 -1
- package/dist/{chunk-2VCSDMPV.cjs → chunk-VHFH3BG6.cjs} +31 -31
- package/dist/{chunk-2VCSDMPV.cjs.map → chunk-VHFH3BG6.cjs.map} +1 -1
- package/dist/{chunk-MQQ7VIG6.cjs → chunk-VRJXY6TM.cjs} +26 -26
- package/dist/{chunk-MQQ7VIG6.cjs.map → chunk-VRJXY6TM.cjs.map} +1 -1
- package/dist/{chunk-XJH5ZT5Y.js → chunk-VYUEOKI6.js} +2 -2
- package/dist/{chunk-YHCLDRMU.cjs → chunk-X77X3RKH.cjs} +9 -9
- package/dist/{chunk-YHCLDRMU.cjs.map → chunk-X77X3RKH.cjs.map} +1 -1
- package/dist/components/announcement-bar.d.ts +1 -1
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/chat-composer.d.ts +8 -1
- package/dist/components/chat/chat-composer.d.ts.map +1 -1
- package/dist/components/chat/chat-context-memory-bar.d.ts +37 -0
- package/dist/components/chat/chat-context-memory-bar.d.ts.map +1 -0
- package/dist/components/chat/embeddable-chat.d.ts +14 -6
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +4 -2
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +3 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/form.d.ts +1 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +234 -206
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +119 -91
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/announcement-bar-view.d.ts +49 -0
- package/dist/components/ui/announcement-bar-view.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +6 -2
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +5 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +102 -110
- package/src/components/chat/chat-composer.tsx +32 -5
- package/src/components/chat/chat-context-memory-bar.tsx +159 -0
- package/src/components/chat/embeddable-chat.tsx +17 -15
- package/src/components/chat/index.ts +1 -0
- package/src/components/ui/announcement-bar-view.tsx +94 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/tab-selector.tsx +8 -8
- package/src/styles/ods-colors.css +16 -0
- package/dist/chunk-IZCOYFCN.js.map +0 -1
- package/dist/chunk-VLLFRPNP.cjs.map +0 -1
- /package/dist/{chunk-GRB7LPJV.js.map → chunk-3TU6QURP.js.map} +0 -0
- /package/dist/{chunk-KX2TBXKN.js.map → chunk-AEM7ADDG.js.map} +0 -0
- /package/dist/{chunk-RQZOCLTI.js.map → chunk-CLW2S55N.js.map} +0 -0
- /package/dist/{chunk-FHLJQI4F.js.map → chunk-EZESVVIM.js.map} +0 -0
- /package/dist/{chunk-7DULN25L.js.map → chunk-HTSWLPMU.js.map} +0 -0
- /package/dist/{chunk-CC73CSLI.js.map → chunk-IUMPVRSH.js.map} +0 -0
- /package/dist/{chunk-72HPXAMZ.js.map → chunk-JW3UNHGW.js.map} +0 -0
- /package/dist/{chunk-OO7DO4DI.js.map → chunk-O2QOC5FA.js.map} +0 -0
- /package/dist/{chunk-WAO34PFO.js.map → chunk-QTGYQ2U7.js.map} +0 -0
- /package/dist/{chunk-GHZMNDPN.js.map → chunk-QZJN5OHK.js.map} +0 -0
- /package/dist/{chunk-XJH5ZT5Y.js.map → chunk-VYUEOKI6.js.map} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
4
|
+
import { cn } from '../../utils/cn';
|
|
5
|
+
|
|
6
|
+
export interface AnnouncementBarViewProps {
|
|
7
|
+
/**
|
|
8
|
+
* Leading slot — typically an icon. Rendered before the title. Per the
|
|
9
|
+
* mockup icons are 16px below `md` and 24px from `md` up — size them with
|
|
10
|
+
* the responsive token: `size-[var(--icon-size-icon-size)]`.
|
|
11
|
+
*/
|
|
12
|
+
startAdornment?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Bar message. A plain string gets the mockup's text treatment (`text-h4`,
|
|
15
|
+
* single line from `md` up, wrapping below); pass a ReactElement to fully
|
|
16
|
+
* own the markup/typography (e.g. bold title + inline description).
|
|
17
|
+
*/
|
|
18
|
+
title?: string | ReactElement;
|
|
19
|
+
/**
|
|
20
|
+
* Primary CTA. From `md` up it sits at content width in one trailing
|
|
21
|
+
* container with `endAdornment`; below `md` it drops to its own
|
|
22
|
+
* full-width second row (Figma ODS 2862-8391). Omit it entirely to
|
|
23
|
+
* collapse that row — the bar height then follows the remaining content.
|
|
24
|
+
*/
|
|
25
|
+
actionBlock?: ReactElement;
|
|
26
|
+
/**
|
|
27
|
+
* Trailing slot (e.g. a dismiss button). Always keeps its content width:
|
|
28
|
+
* inline after the title below `md` (and on every breakpoint when there is
|
|
29
|
+
* no `actionBlock`), after the action from `md` up. NOTE: with an
|
|
30
|
+
* `actionBlock` present the element is mounted twice (one copy per
|
|
31
|
+
* breakpoint, the inactive one `display:none`) — keep it stateless.
|
|
32
|
+
*/
|
|
33
|
+
endAdornment?: ReactElement;
|
|
34
|
+
/** Surface styling (background, text color, theme scope) is the consumer's — pass it here. */
|
|
35
|
+
className?: string;
|
|
36
|
+
style?: CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Pure presentational announcement/notification bar (Figma 9364-40603 desktop,
|
|
41
|
+
* 9418-43969 tablet, ODS 2862-8391 mobile). No data fetching, storage, or
|
|
42
|
+
* navigation — consumers own state and pass content through slots.
|
|
43
|
+
*
|
|
44
|
+
* Layout: `md` (800px) and up is a single row — `startAdornment` + title
|
|
45
|
+
* (flex-1, truncating) + trailing container (`actionBlock` + `endAdornment`)
|
|
46
|
+
* at content width. Below `md`: `startAdornment` + wrapping title +
|
|
47
|
+
* `endAdornment` share the first row (top-aligned so a two-line title keeps
|
|
48
|
+
* the adornments on line one, each centered in a line-height box), and the
|
|
49
|
+
* action alone stretches across its own second row. No action → no second
|
|
50
|
+
* row; the bar height follows the content. Spacing/typography use responsive
|
|
51
|
+
* ODS tokens, so paddings and font sizes track the breakpoint automatically.
|
|
52
|
+
*/
|
|
53
|
+
export function AnnouncementBarView({
|
|
54
|
+
startAdornment,
|
|
55
|
+
title,
|
|
56
|
+
actionBlock,
|
|
57
|
+
endAdornment,
|
|
58
|
+
className,
|
|
59
|
+
style,
|
|
60
|
+
}: AnnouncementBarViewProps) {
|
|
61
|
+
// Below `md` adornments center inside a box matching the title's first
|
|
62
|
+
// text line (20px), so `items-start` keeps them on line one of a wrapped
|
|
63
|
+
// title without hugging the row's top edge. From `md` up the row is
|
|
64
|
+
// single-line and center-aligned, so the boxes dissolve (`h-auto`).
|
|
65
|
+
const adornmentBox = 'flex h-5 shrink-0 items-center md:h-auto';
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div
|
|
69
|
+
className={cn(
|
|
70
|
+
'flex w-full flex-col gap-[var(--spacing-system-s)] px-[var(--spacing-system-l)] py-[var(--spacing-system-sf)] md:flex-row md:items-center',
|
|
71
|
+
className,
|
|
72
|
+
)}
|
|
73
|
+
style={style}
|
|
74
|
+
>
|
|
75
|
+
<div className="flex min-w-0 flex-1 items-start gap-[var(--spacing-system-s)] md:items-center">
|
|
76
|
+
{startAdornment && <div className={adornmentBox}>{startAdornment}</div>}
|
|
77
|
+
{typeof title === 'string' ? (
|
|
78
|
+
<p className="min-w-0 flex-1 break-words text-h4 md:truncate">{title}</p>
|
|
79
|
+
) : (
|
|
80
|
+
title != null && <div className="min-w-0 flex-1">{title}</div>
|
|
81
|
+
)}
|
|
82
|
+
{/* Mobile home of the trailing adornment — and its only home when
|
|
83
|
+
there is no action row to share from `md` up. */}
|
|
84
|
+
{endAdornment && <div className={cn(adornmentBox, actionBlock && 'md:hidden')}>{endAdornment}</div>}
|
|
85
|
+
</div>
|
|
86
|
+
{actionBlock && (
|
|
87
|
+
<div className="flex w-full shrink-0 items-center gap-[var(--spacing-system-s)] md:w-auto">
|
|
88
|
+
<div className="flex min-w-0 flex-1 md:flex-none [&>*]:w-full md:[&>*]:w-auto">{actionBlock}</div>
|
|
89
|
+
{endAdornment && <div className="hidden shrink-0 md:flex">{endAdornment}</div>}
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -46,15 +46,15 @@ export function TabSelector({
|
|
|
46
46
|
}: TabSelectorProps) {
|
|
47
47
|
return (
|
|
48
48
|
<div
|
|
49
|
-
className={cn('flex flex-col gap-
|
|
49
|
+
className={cn('flex flex-col gap-[var(--spacing-system-xxs)]', disabled && 'opacity-50', className)}
|
|
50
50
|
aria-disabled={disabled || undefined}
|
|
51
51
|
>
|
|
52
52
|
{label && (
|
|
53
|
-
<p className="text-ods-text-primary text-
|
|
53
|
+
<p className="text-ods-text-primary text-h4">
|
|
54
54
|
{label}
|
|
55
55
|
</p>
|
|
56
56
|
)}
|
|
57
|
-
<div className="flex w-full bg-ods-bg border border-ods-border rounded-md p-
|
|
57
|
+
<div className="flex w-full bg-ods-bg border border-ods-border rounded-md p-[var(--spacing-system-xxs)] gap-[var(--spacing-system-xxs)] h-11 md:h-12">
|
|
58
58
|
{items.map((item) => {
|
|
59
59
|
const isActive = value === item.id
|
|
60
60
|
const isDisabled = disabled || item.disabled
|
|
@@ -67,10 +67,10 @@ export function TabSelector({
|
|
|
67
67
|
onClick={() => onValueChange(item.id)}
|
|
68
68
|
aria-label={!item.label ? item.ariaLabel : undefined}
|
|
69
69
|
className={cn(
|
|
70
|
-
// Bold on BOTH states — a medium↔bold
|
|
71
|
-
// and inactive tabs read as inconsistent
|
|
72
|
-
// label widths on every switch).
|
|
73
|
-
'flex flex-1 items-center justify-center gap-
|
|
70
|
+
// Bold on BOTH states (text-h3 = DM Sans bold) — a medium↔bold
|
|
71
|
+
// flip between the active and inactive tabs read as inconsistent
|
|
72
|
+
// weight (and nudged label widths on every switch).
|
|
73
|
+
'flex flex-1 items-center justify-center gap-[var(--spacing-system-xs)] rounded-xs p-[var(--spacing-system-xsf)] text-h4 transition-colors duration-200 whitespace-nowrap',
|
|
74
74
|
isDisabled
|
|
75
75
|
? isActive
|
|
76
76
|
? 'cursor-not-allowed bg-ods-bg-surface text-ods-text-secondary'
|
|
@@ -83,7 +83,7 @@ export function TabSelector({
|
|
|
83
83
|
)}
|
|
84
84
|
>
|
|
85
85
|
{item.icon && (
|
|
86
|
-
<span className="shrink-0 size-6 flex items-center justify-center">
|
|
86
|
+
<span className="shrink-0 size-4 md:size-6 flex items-center justify-center">
|
|
87
87
|
{item.icon}
|
|
88
88
|
</span>
|
|
89
89
|
)}
|
|
@@ -336,6 +336,22 @@
|
|
|
336
336
|
--ods-accent: var(--ods-open-yellow-base);
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
/* Tier-2 re-anchor for NESTED theme scopes. Tier-2 aliases declared at
|
|
340
|
+
* `:root` compute there (custom properties substitute var() where the
|
|
341
|
+
* property is declared), so descendants of a nested `.theme-light` /
|
|
342
|
+
* `.theme-dark` island inherit the ROOT-theme value — the island's Tier-1
|
|
343
|
+
* flips never reach them. Re-declaring an alias inside the scope classes
|
|
344
|
+
* recomputes it against the scoped Tier-1 primitives, letting components
|
|
345
|
+
* inside theme islands (e.g. AnnouncementBar) use semantic tokens instead
|
|
346
|
+
* of reaching for Tier-1 directly. Values are identical to the `:root`
|
|
347
|
+
* declarations above — keep them in sync. */
|
|
348
|
+
.theme-dark,
|
|
349
|
+
.theme-light {
|
|
350
|
+
--color-text-primary: var(--ods-system-greys-white);
|
|
351
|
+
--color-bg-hover: var(--ods-system-greys-black-hover);
|
|
352
|
+
--color-bg-active: var(--ods-system-greys-black-action);
|
|
353
|
+
}
|
|
354
|
+
|
|
339
355
|
/* Alpha-based semantic tokens that need a light-theme tweak (the only
|
|
340
356
|
* Tier-2 values not derived from a flipping primitive). */
|
|
341
357
|
:root[data-theme="light"],
|