@flamingo-stack/openframe-frontend-core 0.0.324 → 0.0.325-snapshot.20260626121435
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-WRRZKIFU.js → chunk-2A7HDFWT.js} +2 -2
- package/dist/{chunk-NPM3PSRW.cjs → chunk-4ZP43F2Y.cjs} +25 -25
- package/dist/{chunk-NPM3PSRW.cjs.map → chunk-4ZP43F2Y.cjs.map} +1 -1
- package/dist/{chunk-PBHJEI4L.js → chunk-ANZ24A74.js} +2 -2
- package/dist/{chunk-QVWKPHD3.cjs → chunk-D3QAD5DH.cjs} +7 -7
- package/dist/{chunk-QVWKPHD3.cjs.map → chunk-D3QAD5DH.cjs.map} +1 -1
- package/dist/{chunk-SIQWYHZF.js → chunk-DRIEQWHS.js} +2 -2
- package/dist/{chunk-O4SGWVZK.js → chunk-ET6HI2SY.js} +4 -4
- package/dist/{chunk-F3DK3ETT.js → chunk-FXY2QIAY.js} +4490 -4285
- package/dist/chunk-FXY2QIAY.js.map +1 -0
- package/dist/{chunk-TQX5O6OU.js → chunk-HP3IBX4D.js} +4 -4
- package/dist/{chunk-POMQVPWA.cjs → chunk-HPZLBTDP.cjs} +5 -5
- package/dist/{chunk-POMQVPWA.cjs.map → chunk-HPZLBTDP.cjs.map} +1 -1
- package/dist/{chunk-X6NDSU3W.cjs → chunk-J3MYVBBB.cjs} +62 -62
- package/dist/{chunk-X6NDSU3W.cjs.map → chunk-J3MYVBBB.cjs.map} +1 -1
- package/dist/{chunk-ALXY56MH.cjs → chunk-JCRU2L2D.cjs} +1248 -1043
- package/dist/chunk-JCRU2L2D.cjs.map +1 -0
- package/dist/{chunk-FAJRYL3A.cjs → chunk-JNU6H67K.cjs} +15 -15
- package/dist/{chunk-FAJRYL3A.cjs.map → chunk-JNU6H67K.cjs.map} +1 -1
- package/dist/{chunk-PD2G6OXQ.js → chunk-JZY33ZRU.js} +2 -2
- package/dist/{chunk-RTPVAKRQ.js → chunk-LS5NC5OV.js} +2 -2
- package/dist/{chunk-M2ZHKEZG.js → chunk-NLDDOARF.js} +2 -2
- package/dist/{chunk-OZORBZ23.cjs → chunk-OCE5CI5P.cjs} +9 -9
- package/dist/{chunk-OZORBZ23.cjs.map → chunk-OCE5CI5P.cjs.map} +1 -1
- package/dist/{chunk-2YESJYW6.cjs → chunk-QTHOFU4Y.cjs} +31 -31
- package/dist/{chunk-2YESJYW6.cjs.map → chunk-QTHOFU4Y.cjs.map} +1 -1
- package/dist/{chunk-VD2JHSBW.cjs → chunk-R2K5STAT.cjs} +37 -37
- package/dist/{chunk-VD2JHSBW.cjs.map → chunk-R2K5STAT.cjs.map} +1 -1
- package/dist/{chunk-FM4KGO75.js → chunk-R2YOV7MW.js} +4 -4
- package/dist/{chunk-UNFD5VKD.cjs → chunk-W3E5SEIR.cjs} +56 -56
- package/dist/{chunk-UNFD5VKD.cjs.map → chunk-W3E5SEIR.cjs.map} +1 -1
- package/dist/{chunk-BXBRH4VK.js → chunk-WFDJDGO6.js} +2 -2
- package/dist/{chunk-G5NW2RHD.cjs → chunk-WV65IRWY.cjs} +26 -26
- package/dist/{chunk-G5NW2RHD.cjs.map → chunk-WV65IRWY.cjs.map} +1 -1
- package/dist/{chunk-3MVY3CT6.cjs → chunk-YRUKVWRV.cjs} +12 -12
- package/dist/{chunk-3MVY3CT6.cjs.map → chunk-YRUKVWRV.cjs.map} +1 -1
- package/dist/{chunk-7343ZUA2.js → chunk-ZYHAFLX7.js} +4 -4
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- 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/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/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +124 -120
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -9
- 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/date-picker.d.ts +47 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -1
- 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/components/ui/info-section.d.ts +63 -0
- package/dist/components/ui/info-section.d.ts.map +1 -0
- package/dist/components/ui/ticket-attachments-list.d.ts +2 -0
- package/dist/components/ui/ticket-attachments-list.d.ts.map +1 -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/ui/date-picker.tsx +214 -9
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/info-section.tsx +151 -0
- package/src/components/ui/ticket-attachments-list.tsx +14 -2
- package/src/stories/DatePicker.stories.tsx +141 -0
- package/src/stories/InfoSection.stories.tsx +110 -0
- package/dist/chunk-ALXY56MH.cjs.map +0 -1
- package/dist/chunk-F3DK3ETT.js.map +0 -1
- /package/dist/{chunk-WRRZKIFU.js.map → chunk-2A7HDFWT.js.map} +0 -0
- /package/dist/{chunk-PBHJEI4L.js.map → chunk-ANZ24A74.js.map} +0 -0
- /package/dist/{chunk-SIQWYHZF.js.map → chunk-DRIEQWHS.js.map} +0 -0
- /package/dist/{chunk-O4SGWVZK.js.map → chunk-ET6HI2SY.js.map} +0 -0
- /package/dist/{chunk-TQX5O6OU.js.map → chunk-HP3IBX4D.js.map} +0 -0
- /package/dist/{chunk-PD2G6OXQ.js.map → chunk-JZY33ZRU.js.map} +0 -0
- /package/dist/{chunk-RTPVAKRQ.js.map → chunk-LS5NC5OV.js.map} +0 -0
- /package/dist/{chunk-M2ZHKEZG.js.map → chunk-NLDDOARF.js.map} +0 -0
- /package/dist/{chunk-FM4KGO75.js.map → chunk-R2YOV7MW.js.map} +0 -0
- /package/dist/{chunk-BXBRH4VK.js.map → chunk-WFDJDGO6.js.map} +0 -0
- /package/dist/{chunk-7343ZUA2.js.map → chunk-ZYHAFLX7.js.map} +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Badge } from '../components/ui/badge';
|
|
4
|
+
import { InfoSection, type InfoSectionRow } from '../components/ui/info-section';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Tickets/InfoSection',
|
|
8
|
+
component: InfoSection,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'padded',
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component:
|
|
14
|
+
'A labelled info card: a vertical stack of `label —— value` rows. Each value is configurable — plain text (with an optional trailing image), an inline assignee picker (autocomplete with search), an inline status dropdown, or an arbitrary node.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
decorators: [
|
|
20
|
+
Story => (
|
|
21
|
+
<div style={{ width: '360px' }}>
|
|
22
|
+
<Story />
|
|
23
|
+
</div>
|
|
24
|
+
),
|
|
25
|
+
],
|
|
26
|
+
} satisfies Meta<typeof InfoSection>;
|
|
27
|
+
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
|
|
31
|
+
const assigneeOptions = [
|
|
32
|
+
{ value: 'u1', label: 'Roman Smith' },
|
|
33
|
+
{ value: 'u2', label: 'John Doe' },
|
|
34
|
+
{ value: 'u3', label: 'Marcus Chen' },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const statusOptions = [
|
|
38
|
+
{ id: 's1', name: 'AI Assistance', color: '#3a3a3a' },
|
|
39
|
+
{ id: 's2', name: 'Tech Required', color: '#f59e0b' },
|
|
40
|
+
{ id: 's3', name: 'Resolved', color: '#5ea62e' },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The "Ticket Details" card from the design: text, text-with-avatar, an inline
|
|
45
|
+
* assignee picker, and an inline status dropdown.
|
|
46
|
+
*/
|
|
47
|
+
export const TicketDetails: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
title: 'Ticket Details',
|
|
50
|
+
rows: [
|
|
51
|
+
{ id: 'customer', label: 'Customer', value: { text: 'Acme Corp', imageFallback: 'Acme Corp' } },
|
|
52
|
+
{ id: 'device', label: 'Device', value: { text: 'TB-156-SEA', onClick: () => alert('Navigate to device') } },
|
|
53
|
+
{
|
|
54
|
+
id: 'assigned',
|
|
55
|
+
label: 'Assigned',
|
|
56
|
+
value: { type: 'assignee', options: assigneeOptions, onAssign: id => alert(`Assign: ${id}`) },
|
|
57
|
+
},
|
|
58
|
+
{ id: 'created', label: 'Created', value: { text: '07/12/25, 10:03 AM' } },
|
|
59
|
+
{ id: 'created-by', label: 'Created by', value: { text: 'Fae', imageFallback: 'Fae' } },
|
|
60
|
+
{
|
|
61
|
+
id: 'status',
|
|
62
|
+
label: 'Status',
|
|
63
|
+
value: { type: 'status', status: 'AI_ASSISTANCE', options: statusOptions, onSelect: id => alert(`Status: ${id}`) },
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Live state: assigning a user and changing status update the rows in place.
|
|
71
|
+
*/
|
|
72
|
+
export const Interactive: Story = {
|
|
73
|
+
args: { title: 'Ticket Details', rows: [] },
|
|
74
|
+
render: function InteractiveStory() {
|
|
75
|
+
const [assignee, setAssignee] = useState<string | null>(null);
|
|
76
|
+
const [statusId, setStatusId] = useState('s1');
|
|
77
|
+
|
|
78
|
+
const current = assigneeOptions.find(o => o.value === assignee);
|
|
79
|
+
const status = statusOptions.find(o => o.id === statusId);
|
|
80
|
+
|
|
81
|
+
const rows: InfoSectionRow[] = [
|
|
82
|
+
{ id: 'customer', label: 'Customer', value: { text: 'Acme Corp', imageFallback: 'Acme Corp' } },
|
|
83
|
+
{
|
|
84
|
+
id: 'assigned',
|
|
85
|
+
label: 'Assigned',
|
|
86
|
+
value: {
|
|
87
|
+
type: 'assignee',
|
|
88
|
+
currentAssignee: current ? { id: current.value, name: current.label } : undefined,
|
|
89
|
+
options: assigneeOptions,
|
|
90
|
+
onAssign: setAssignee,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'status',
|
|
95
|
+
label: 'Status',
|
|
96
|
+
value: {
|
|
97
|
+
type: 'status',
|
|
98
|
+
status: 'AI_ASSISTANCE',
|
|
99
|
+
label: status?.name,
|
|
100
|
+
color: status?.color,
|
|
101
|
+
options: statusOptions,
|
|
102
|
+
onSelect: setStatusId,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{ id: 'priority', label: 'Priority', value: { type: 'custom', content: <Badge>High</Badge> } },
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
return <InfoSection title="Ticket Details" rows={rows} />;
|
|
109
|
+
},
|
|
110
|
+
};
|