@flamingo-stack/openframe-frontend-core 0.0.220 → 0.0.221
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-RBTT2TIG.cjs → chunk-4PBV66HQ.cjs} +7 -7
- package/dist/{chunk-RBTT2TIG.cjs.map → chunk-4PBV66HQ.cjs.map} +1 -1
- package/dist/{chunk-SEAFHHDR.cjs → chunk-73YDB6AT.cjs} +9 -9
- package/dist/{chunk-SEAFHHDR.cjs.map → chunk-73YDB6AT.cjs.map} +1 -1
- package/dist/{chunk-TYR7DCGH.cjs → chunk-7TQNW2AM.cjs} +24 -24
- package/dist/{chunk-TYR7DCGH.cjs.map → chunk-7TQNW2AM.cjs.map} +1 -1
- package/dist/{chunk-3S5LHIG6.js → chunk-CPIX5AAR.js} +2 -2
- package/dist/{chunk-6XYG4J4R.js → chunk-E2AWBQEU.js} +2 -2
- package/dist/{chunk-CH5KIJJT.js → chunk-FOOQFRJR.js} +2 -2
- package/dist/{chunk-OPTUEWOT.js → chunk-IS4IZC7N.js} +6 -14
- package/dist/chunk-IS4IZC7N.js.map +1 -0
- package/dist/{chunk-B4RBJQBJ.cjs → chunk-JMGSJHFP.cjs} +10 -10
- package/dist/{chunk-B4RBJQBJ.cjs.map → chunk-JMGSJHFP.cjs.map} +1 -1
- package/dist/{chunk-HIGI5ZPK.js → chunk-SRCEVQYA.js} +2 -2
- package/dist/{chunk-ICJRYD3E.cjs → chunk-ZAGQXSAP.cjs} +6 -14
- package/dist/chunk-ZAGQXSAP.cjs.map +1 -0
- package/dist/components/chat/guide-welcome.d.ts +4 -2
- package/dist/components/chat/guide-welcome.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/index.cjs +77 -77
- package/dist/components/index.js +4 -4
- package/dist/components/layout/page-heading.d.ts +7 -6
- package/dist/components/layout/page-heading.d.ts.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 +25 -25
- package/dist/components/onboarding-guides/index.js +3 -3
- package/dist/components/tickets/index.cjs +64 -64
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/embeddable-chat.tsx +5 -3
- package/src/components/chat/guide-welcome.tsx +5 -13
- package/src/components/layout/page-heading.tsx +13 -7
- package/src/stories/GuideWelcome.stories.tsx +22 -0
- package/dist/chunk-ICJRYD3E.cjs.map +0 -1
- package/dist/chunk-OPTUEWOT.js.map +0 -1
- /package/dist/{chunk-3S5LHIG6.js.map → chunk-CPIX5AAR.js.map} +0 -0
- /package/dist/{chunk-6XYG4J4R.js.map → chunk-E2AWBQEU.js.map} +0 -0
- /package/dist/{chunk-CH5KIJJT.js.map → chunk-FOOQFRJR.js.map} +0 -0
- /package/dist/{chunk-HIGI5ZPK.js.map → chunk-SRCEVQYA.js.map} +0 -0
|
@@ -2,14 +2,15 @@ import type { ReactNode } from 'react'
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* THE page-title style — the ODS `text-h1` token (`--font-size-h1-title` =
|
|
5
|
-
* 40 / 48 / 56px, Azeret Mono semibold)
|
|
6
|
-
* Mirrors the global `h1 { @apply text-h1 }` base, so
|
|
7
|
-
* the SAME size across the lib and every consuming app.
|
|
5
|
+
* 40 / 48 / 56px, Azeret Mono semibold), which already owns the responsive
|
|
6
|
+
* letter-spacing (-0.02em). Mirrors the global `h1 { @apply text-h1 }` base, so
|
|
7
|
+
* every page heading is the SAME size across the lib and every consuming app.
|
|
8
8
|
*
|
|
9
|
-
* Single source of truth — do NOT hardcode a px size
|
|
10
|
-
* `<PageHeading>` (or, for the rare non-h1 caller, apply
|
|
9
|
+
* Single source of truth — do NOT hardcode a px size or re-assert the token's
|
|
10
|
+
* tracking; render `<PageHeading>` (or, for the rare non-h1 caller, apply
|
|
11
|
+
* `PAGE_HEADING_CLASS`).
|
|
11
12
|
*/
|
|
12
|
-
export const PAGE_HEADING_CLASS = 'text-h1 text-ods-text-primary
|
|
13
|
+
export const PAGE_HEADING_CLASS = 'text-h1 text-ods-text-primary'
|
|
13
14
|
|
|
14
15
|
const DESCRIPTION_CLASS =
|
|
15
16
|
"mt-6 max-w-[640px] font-['DM_Sans'] text-[16px] md:text-[18px] leading-[24px] md:leading-[28px] text-ods-text-secondary"
|
|
@@ -45,10 +46,15 @@ export function PageHeading({
|
|
|
45
46
|
}: PageHeadingProps) {
|
|
46
47
|
const headingClass = className ? `${PAGE_HEADING_CLASS} ${className}` : PAGE_HEADING_CLASS
|
|
47
48
|
const descClass = descriptionClassName ? `${DESCRIPTION_CLASS} ${descriptionClassName}` : DESCRIPTION_CLASS
|
|
49
|
+
// `description` is a ReactNode, so `description={cond && '...'}` can pass a
|
|
50
|
+
// boolean `false` — exclude it (and empty string) so we never render an empty
|
|
51
|
+
// <p> that adds phantom vertical gap beneath the heading.
|
|
52
|
+
const hasDescription =
|
|
53
|
+
description != null && description !== '' && typeof description !== 'boolean'
|
|
48
54
|
return (
|
|
49
55
|
<>
|
|
50
56
|
<Tag className={headingClass}>{children}</Tag>
|
|
51
|
-
{
|
|
57
|
+
{hasDescription && <p className={descClass}>{description}</p>}
|
|
52
58
|
</>
|
|
53
59
|
)
|
|
54
60
|
}
|
|
@@ -14,6 +14,18 @@ const ACTIONS = [
|
|
|
14
14
|
{ id: 'find', label: 'Find', onClick: () => console.log('find') },
|
|
15
15
|
]
|
|
16
16
|
|
|
17
|
+
// Quick actions are caller-provided (GuideWelcome ships no defaults); these
|
|
18
|
+
// demonstrate the inline chips + the "⋯" overflow menu.
|
|
19
|
+
const SAMPLE_QUICK_ACTIONS = [
|
|
20
|
+
{ id: 'how-to-start', label: 'How to start' },
|
|
21
|
+
{ id: 'connect-device', label: 'Connect device' },
|
|
22
|
+
{ id: 'find-device', label: 'Find device' },
|
|
23
|
+
{ id: 'remote-connection', label: 'Remote connection' },
|
|
24
|
+
{ id: 'run-scripts', label: 'Run scripts' },
|
|
25
|
+
{ id: 'device-software', label: 'Device software' },
|
|
26
|
+
{ id: 'bulk-update', label: 'Bulk update' },
|
|
27
|
+
]
|
|
28
|
+
|
|
17
29
|
const SAMPLE_LIST = (
|
|
18
30
|
<div className="shrink-0 overflow-hidden rounded-md border border-ods-border">
|
|
19
31
|
<MingoOnboardingCard
|
|
@@ -79,6 +91,7 @@ type Story = StoryObj<typeof GuideWelcome>
|
|
|
79
91
|
/** Full guide-mode empty state with the slash-command list and quick actions. */
|
|
80
92
|
export const Default: Story = {
|
|
81
93
|
args: {
|
|
94
|
+
quickActions: SAMPLE_QUICK_ACTIONS,
|
|
82
95
|
onQuickAction: (a) => console.log('quick action', a.id),
|
|
83
96
|
children: SAMPLE_LIST,
|
|
84
97
|
},
|
|
@@ -87,15 +100,24 @@ export const Default: Story = {
|
|
|
87
100
|
/** No slash commands available yet — greeting + quick actions only. */
|
|
88
101
|
export const NoCommands: Story = {
|
|
89
102
|
args: {
|
|
103
|
+
quickActions: SAMPLE_QUICK_ACTIONS,
|
|
90
104
|
onQuickAction: (a) => console.log('quick action', a.id),
|
|
91
105
|
},
|
|
92
106
|
}
|
|
93
107
|
|
|
108
|
+
/** No quick actions supplied (the default) — the chip row is omitted entirely. */
|
|
109
|
+
export const NoQuickActions: Story = {
|
|
110
|
+
args: {
|
|
111
|
+
children: SAMPLE_LIST,
|
|
112
|
+
},
|
|
113
|
+
}
|
|
114
|
+
|
|
94
115
|
/** Custom greeting copy. */
|
|
95
116
|
export const CustomCopy: Story = {
|
|
96
117
|
args: {
|
|
97
118
|
title: 'Ask the Guide',
|
|
98
119
|
subtitle: 'A temporary session for exploring docs and tickets.',
|
|
120
|
+
quickActions: SAMPLE_QUICK_ACTIONS,
|
|
99
121
|
onQuickAction: (a) => console.log('quick action', a.id),
|
|
100
122
|
children: SAMPLE_LIST,
|
|
101
123
|
},
|