@flamingo-stack/openframe-frontend-core 0.0.268 → 0.0.269-snapshot.20260615163900

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.
Files changed (78) hide show
  1. package/dist/{chunk-GJVSLS2R.js → chunk-37OJ53QH.js} +2 -2
  2. package/dist/{chunk-YV55JZAD.cjs → chunk-3H5TSZMU.cjs} +25 -25
  3. package/dist/{chunk-YV55JZAD.cjs.map → chunk-3H5TSZMU.cjs.map} +1 -1
  4. package/dist/{chunk-XSK72QRR.js → chunk-EMRSIP4Q.js} +2 -2
  5. package/dist/{chunk-CI5XE4LB.cjs → chunk-JIJEVSCC.cjs} +30 -30
  6. package/dist/{chunk-CI5XE4LB.cjs.map → chunk-JIJEVSCC.cjs.map} +1 -1
  7. package/dist/{chunk-O6UA475M.cjs → chunk-N3OPJQYI.cjs} +1139 -924
  8. package/dist/chunk-N3OPJQYI.cjs.map +1 -0
  9. package/dist/{chunk-TPZI7NBN.cjs → chunk-NDSCF6LB.cjs} +11 -11
  10. package/dist/{chunk-TPZI7NBN.cjs.map → chunk-NDSCF6LB.cjs.map} +1 -1
  11. package/dist/{chunk-J6O57C7S.js → chunk-RM7ZT3UU.js} +3503 -3288
  12. package/dist/chunk-RM7ZT3UU.js.map +1 -0
  13. package/dist/{chunk-Z6MKG53Z.js → chunk-XOKXFW77.js} +2 -2
  14. package/dist/components/chat/approval-batch-message.d.ts +8 -0
  15. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  16. package/dist/components/chat/index.cjs +2 -2
  17. package/dist/components/chat/index.js +1 -1
  18. package/dist/components/chat/types/chat.types.d.ts +1 -0
  19. package/dist/components/chat/types/chat.types.d.ts.map +1 -1
  20. package/dist/components/contact/index.cjs +3 -3
  21. package/dist/components/contact/index.js +2 -2
  22. package/dist/components/features/index.cjs +6 -2
  23. package/dist/components/features/index.cjs.map +1 -1
  24. package/dist/components/features/index.js +5 -1
  25. package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
  26. package/dist/components/features/notifications/index.d.ts +1 -1
  27. package/dist/components/features/notifications/index.d.ts.map +1 -1
  28. package/dist/components/features/notifications/types.d.ts +9 -0
  29. package/dist/components/features/notifications/types.d.ts.map +1 -1
  30. package/dist/components/features/video-source-selector.d.ts +11 -1
  31. package/dist/components/features/video-source-selector.d.ts.map +1 -1
  32. package/dist/components/index.cjs +65 -47
  33. package/dist/components/index.cjs.map +1 -1
  34. package/dist/components/index.js +21 -3
  35. package/dist/components/index.js.map +1 -1
  36. package/dist/components/navigation/index.cjs +2 -2
  37. package/dist/components/navigation/index.js +1 -1
  38. package/dist/components/related-content/index.cjs +3 -3
  39. package/dist/components/related-content/index.js +2 -2
  40. package/dist/components/tickets/index.cjs +53 -53
  41. package/dist/components/tickets/index.js +3 -3
  42. package/dist/components/ui/index.cjs +16 -2
  43. package/dist/components/ui/index.cjs.map +1 -1
  44. package/dist/components/ui/index.d.ts +1 -0
  45. package/dist/components/ui/index.d.ts.map +1 -1
  46. package/dist/components/ui/index.js +15 -1
  47. package/dist/components/ui/no-data/index.d.ts +5 -0
  48. package/dist/components/ui/no-data/index.d.ts.map +1 -0
  49. package/dist/components/ui/no-data/no-data-actions.d.ts +34 -0
  50. package/dist/components/ui/no-data/no-data-actions.d.ts.map +1 -0
  51. package/dist/components/ui/no-data/no-data-message.d.ts +17 -0
  52. package/dist/components/ui/no-data/no-data-message.d.ts.map +1 -0
  53. package/dist/components/ui/no-data/no-data-styles.d.ts +8 -0
  54. package/dist/components/ui/no-data/no-data-styles.d.ts.map +1 -0
  55. package/dist/components/ui/no-data/no-data.d.ts +33 -0
  56. package/dist/components/ui/no-data/no-data.d.ts.map +1 -0
  57. package/dist/index.cjs +20 -2
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.js +19 -1
  60. package/package.json +1 -1
  61. package/src/components/chat/approval-batch-message.tsx +32 -19
  62. package/src/components/chat/types/chat.types.ts +1 -0
  63. package/src/components/features/notifications/approval-request-notification-tile.tsx +23 -26
  64. package/src/components/features/notifications/index.ts +2 -0
  65. package/src/components/features/notifications/types.ts +39 -0
  66. package/src/components/features/video-source-selector.tsx +83 -18
  67. package/src/components/ui/index.ts +1 -0
  68. package/src/components/ui/no-data/index.ts +4 -0
  69. package/src/components/ui/no-data/no-data-actions.tsx +102 -0
  70. package/src/components/ui/no-data/no-data-message.tsx +43 -0
  71. package/src/components/ui/no-data/no-data-styles.ts +36 -0
  72. package/src/components/ui/no-data/no-data.tsx +84 -0
  73. package/src/stories/EmptyState.stories.tsx +207 -0
  74. package/dist/chunk-J6O57C7S.js.map +0 -1
  75. package/dist/chunk-O6UA475M.cjs.map +0 -1
  76. /package/dist/{chunk-GJVSLS2R.js.map → chunk-37OJ53QH.js.map} +0 -0
  77. /package/dist/{chunk-XSK72QRR.js.map → chunk-EMRSIP4Q.js.map} +0 -0
  78. /package/dist/{chunk-Z6MKG53Z.js.map → chunk-XOKXFW77.js.map} +0 -0
@@ -0,0 +1,207 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Database, FileText, Inbox, Plus, Search, Settings, Sparkles, Upload, Zap } from 'lucide-react';
3
+ import React from 'react';
4
+ import { Button } from '../components/ui/button';
5
+ import { NoData, NoDataAction, NoDataActions, NoDataMessage } from '../components/ui/no-data';
6
+
7
+ const meta = {
8
+ title: 'UI/EmptyState',
9
+ component: NoData,
10
+ argTypes: {
11
+ icon: { control: false },
12
+ actions: { control: false },
13
+ button: { control: false },
14
+ buttonIcon: { control: false },
15
+ onButtonClick: { control: false },
16
+ buttonProps: { control: false },
17
+ title: { control: 'text' },
18
+ description: { control: 'text' },
19
+ buttonLabel: { control: 'text' },
20
+ },
21
+ } satisfies Meta<typeof NoData>;
22
+
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+
26
+ const noop = () => {};
27
+
28
+ const defaultActions = [
29
+ { icon: <Zap />, label: 'Feature Description', onClick: noop },
30
+ { icon: <Sparkles />, label: 'Feature Description', onClick: noop },
31
+ { icon: <Database />, label: 'Feature Description', onClick: noop },
32
+ ];
33
+
34
+ // === Full composition ===
35
+
36
+ export const Default: Story = {
37
+ args: {
38
+ icon: <Inbox />,
39
+ title: 'No data available',
40
+ description: 'Start by adding an item',
41
+ actions: defaultActions,
42
+ buttonLabel: 'Ask Mingo about Item',
43
+ buttonIcon: <Sparkles />,
44
+ onButtonClick: noop,
45
+ },
46
+ };
47
+
48
+ // === Reduced message ===
49
+
50
+ export const MessageTitleOnly: Story = {
51
+ args: {
52
+ icon: <Search />,
53
+ title: 'No results found',
54
+ },
55
+ };
56
+
57
+ // === Without one region ===
58
+
59
+ export const WithoutActions: Story = {
60
+ args: {
61
+ icon: <Inbox />,
62
+ title: 'No data available',
63
+ description: 'Start by adding an item',
64
+ buttonLabel: 'Add item',
65
+ buttonIcon: <Plus />,
66
+ onButtonClick: noop,
67
+ },
68
+ };
69
+
70
+ export const WithoutButton: Story = {
71
+ args: {
72
+ icon: <Inbox />,
73
+ title: 'No data available',
74
+ description: 'Start by adding an item',
75
+ actions: defaultActions,
76
+ },
77
+ };
78
+
79
+ // === Dynamic block count ===
80
+
81
+ export const TwoActions: Story = {
82
+ args: {
83
+ icon: <Database />,
84
+ title: 'No data available',
85
+ description: 'Start by adding an item',
86
+ actions: [
87
+ { icon: <Zap />, label: 'Feature Description', onClick: noop },
88
+ { icon: <Sparkles />, label: 'Feature Description', onClick: noop },
89
+ ],
90
+ buttonLabel: 'Ask Mingo about Item',
91
+ buttonIcon: <Sparkles />,
92
+ onButtonClick: noop,
93
+ },
94
+ };
95
+
96
+ export const FourActions: Story = {
97
+ args: {
98
+ icon: <Database />,
99
+ title: 'No data available',
100
+ description: 'Start by adding an item',
101
+ actions: [
102
+ { icon: <Zap />, label: 'Real-time sync', onClick: noop },
103
+ { icon: <Sparkles />, label: 'Smart suggestions', onClick: noop },
104
+ { icon: <Database />, label: 'Unlimited storage', onClick: noop },
105
+ { icon: <FileText />, label: 'Export anywhere', onClick: noop },
106
+ ],
107
+ buttonLabel: 'Ask Mingo about Item',
108
+ buttonIcon: <Sparkles />,
109
+ onButtonClick: noop,
110
+ },
111
+ };
112
+
113
+ // === Disabled blocks ===
114
+
115
+ export const DisabledActions: Story = {
116
+ args: {
117
+ icon: <Inbox />,
118
+ title: 'No data available',
119
+ description: 'Some actions are unavailable',
120
+ actions: [
121
+ { icon: <Zap />, label: 'Available', onClick: noop },
122
+ { icon: <Sparkles />, label: 'Disabled', onClick: noop, disabled: true },
123
+ { icon: <Database />, label: 'Disabled', onClick: noop, disabled: true },
124
+ ],
125
+ buttonLabel: 'Ask Mingo about Item',
126
+ buttonIcon: <Sparkles />,
127
+ onButtonClick: noop,
128
+ },
129
+ };
130
+
131
+ // === Footer button variations ===
132
+
133
+ export const ButtonAsLink: Story = {
134
+ args: {
135
+ icon: <Upload />,
136
+ title: 'No data available',
137
+ description: 'Import your first dataset',
138
+ buttonLabel: 'View docs',
139
+ buttonIcon: <FileText />,
140
+ buttonProps: { href: '/docs' },
141
+ },
142
+ };
143
+
144
+ export const CustomButton: Story = {
145
+ args: {
146
+ icon: <Settings />,
147
+ title: 'No data available',
148
+ description: 'Configure a source to get started',
149
+ // `button` is the escape hatch — pass any node.
150
+ button: (
151
+ <div className="flex gap-2">
152
+ <Button variant="outline" leftIcon={<Plus />}>Connect source</Button>
153
+ <Button variant="transparent" leftIcon={<FileText />}>View docs</Button>
154
+ </div>
155
+ ),
156
+ },
157
+ };
158
+
159
+ // === Standalone parts ===
160
+
161
+ export const StandaloneActions: Story = {
162
+ args: { title: '' },
163
+ render: () => (
164
+ <NoDataActions>
165
+ <NoDataAction icon={<Zap />} label="Clickable block" onClick={noop} />
166
+ <NoDataAction icon={<Sparkles />} label="Clickable block" onClick={noop} />
167
+ <NoDataAction icon={<Database />} label="Disabled block" onClick={noop} disabled />
168
+ </NoDataActions>
169
+ ),
170
+ };
171
+
172
+ export const StandaloneMessage: Story = {
173
+ args: { title: '' },
174
+ render: () => (
175
+ <NoDataMessage
176
+ icon={<Search />}
177
+ title="No results found"
178
+ description="Try adjusting your filters"
179
+ />
180
+ ),
181
+ };
182
+
183
+ // === Showcase ===
184
+
185
+ export const Showcase: Story = {
186
+ args: { title: '' },
187
+ render: () => (
188
+ <div className="flex flex-col items-stretch gap-12">
189
+ <NoData
190
+ icon={<Inbox />}
191
+ title="No data available"
192
+ description="Start by adding an item"
193
+ actions={defaultActions}
194
+ buttonLabel="Ask Mingo about Item"
195
+ buttonIcon={<Sparkles />}
196
+ onButtonClick={noop}
197
+ />
198
+ <NoData icon={<Search />} title="No results found" description="Try a different search" />
199
+ <NoData
200
+ icon={<Database />}
201
+ title="No data available"
202
+ description="Start by adding an item"
203
+ actions={defaultActions}
204
+ />
205
+ </div>
206
+ ),
207
+ };