blixify-ui-web-mcp 0.1.19 → 0.1.21

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 (47) hide show
  1. package/lib/components/action/iconButton/iconButton.stories.tsx +11 -2
  2. package/lib/components/auth/signUp/signUp.stories.tsx +39 -1
  3. package/lib/components/chart/statsCard/README.md +24 -0
  4. package/lib/components/chart/statsCard/statsCard.stories.tsx +68 -0
  5. package/lib/components/chat/chatBase/chatBase.stories.tsx +1 -1
  6. package/lib/components/data/dataGraph/dataGraph.stories.tsx +5 -5
  7. package/lib/components/data/dataTemplate/README.md +204 -85
  8. package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +307 -295
  9. package/lib/components/data/dataTemplate/drive.stories.tsx +197 -0
  10. package/lib/components/data/dataWrapper/README.md +109 -22
  11. package/lib/components/data/dataWrapper/dataWrapper.bareHooks.stories.tsx +951 -0
  12. package/lib/components/data/dataWrapper/dataWrapper.edit.stories.tsx +356 -5
  13. package/lib/components/data/dataWrapper/dataWrapper.view.stories.tsx +79 -5
  14. package/lib/components/display/calendar/calendar.stories.tsx +1 -1
  15. package/lib/components/display/detailList/README.md +11 -10
  16. package/lib/components/display/detailList/detailList.stories.tsx +16 -3
  17. package/lib/components/display/feeds/README.md +3 -3
  18. package/lib/components/display/feeds/feeds.stories.tsx +3 -3
  19. package/lib/components/display/filePreview/filePreview.stories.tsx +111 -0
  20. package/lib/components/display/modal/README.md +3 -0
  21. package/lib/components/display/modal/modal.stories.tsx +50 -1
  22. package/lib/components/display/newCalendar/README.md +0 -6
  23. package/lib/components/display/newCalendar/newCalendar.stories.tsx +1 -1
  24. package/lib/components/display/newFeeds/README.md +1 -5
  25. package/lib/components/display/newFeeds/newFeeds.stories.tsx +3 -3
  26. package/lib/components/display/newKanban/README.md +0 -7
  27. package/lib/components/display/newList/README.md +1 -4
  28. package/lib/components/display/newTable/README.md +29 -9
  29. package/lib/components/display/newTable/newTable.stories.tsx +120 -9
  30. package/lib/components/display/tag/README.md +1 -1
  31. package/lib/components/display/tag/tag.stories.tsx +7 -0
  32. package/lib/components/input/markdown/markdown.stories.tsx +3 -1
  33. package/lib/components/input/uploadInput/uploadInput.stories.tsx +41 -0
  34. package/lib/components/navigation/leftNav/leftNav.stories.tsx +175 -0
  35. package/lib/components/navigation/tabs/tabs.stories.tsx +23 -0
  36. package/lib/components/template/calendarView/calendarView.stories.tsx +4 -4
  37. package/lib/components/template/chatDashboard/chatDashboard.stories.tsx +2 -2
  38. package/lib/mcp/tools/getBackendComponent.d.ts.map +1 -1
  39. package/lib/mcp/tools/getBackendComponent.js +7 -3
  40. package/lib/mcp/tools/getBackendComponent.js.map +1 -1
  41. package/lib/mcp/tools/suggestTemplate.js +3 -3
  42. package/lib/mcp/tools/suggestTemplate.js.map +1 -1
  43. package/package.json +1 -1
  44. package/lib/components/data/dataTemplate/dataModule.stories.tsx +0 -191
  45. package/lib/components/data/dataWrapper/dataWrapper.consumer.stories.tsx +0 -2125
  46. package/lib/components/data/dataWrapper/dataWrapper.utils.stories.tsx +0 -576
  47. package/lib/components/data/flexFilter/flexFilter.stories.tsx +0 -171
@@ -5,7 +5,6 @@ import { IconButton as IconButtonImpl } from ".";
5
5
  const meta = { title: "Action/Icon Button" };
6
6
  export default meta;
7
7
 
8
-
9
8
  export const IconButton = () => {
10
9
  return (
11
10
  <IconButtonImpl
@@ -13,4 +12,14 @@ export const IconButton = () => {
13
12
  onClick={() => {}}
14
13
  />
15
14
  );
16
- }
15
+ };
16
+
17
+ export const SquareIconButton = () => {
18
+ return (
19
+ <IconButtonImpl
20
+ icon={<Bars3Icon className="h-5 w-5" />}
21
+ className="h-10 w-10"
22
+ onClick={() => {}}
23
+ />
24
+ );
25
+ };
@@ -36,6 +36,7 @@ export const SignUp = () => {
36
36
  const [signUpType, setSignUpType] =
37
37
  useState<typeof AvailableProvider | "">("");
38
38
  const [stepIndex, setStepIndex] = useState(0);
39
+ const [phone, setPhone] = useState("");
39
40
 
40
41
  const handleChangeProvider = (provider: typeof AvailableProvider | "") => {
41
42
  setSignUpType(provider);
@@ -75,10 +76,11 @@ export const SignUp = () => {
75
76
  <TextInput
76
77
  ref={input2}
77
78
  id="phoneNumber"
78
- value=""
79
+ value={phone}
79
80
  type="mobile"
80
81
  label="Mobile"
81
82
  placeholder="+60123456789"
83
+ onChange={(e) => setPhone(e.target.value)}
82
84
  />,
83
85
  <Select
84
86
  value="M"
@@ -120,6 +122,21 @@ export const SignUp = () => {
120
122
  ],
121
123
  };
122
124
 
125
+ // INFO: with the country picker on, the code comes from the selector, so the
126
+ // number field only asks for the local part; the other sections keep the full
127
+ // +60 format a plain mobile field expects
128
+ const pickerFormList = {
129
+ ...formList,
130
+ steps: formList.steps.map((eachStep) => ({
131
+ ...eachStep,
132
+ components: eachStep.components.map((eachComponent) =>
133
+ eachComponent.props?.id === "phoneNumber"
134
+ ? React.cloneElement(eachComponent, { placeholder: "123456789" })
135
+ : eachComponent
136
+ ),
137
+ })),
138
+ };
139
+
123
140
  return (
124
141
  <div className="font-sans max-w-4xl p-6">
125
142
  <StorySection
@@ -150,6 +167,27 @@ export const SignUp = () => {
150
167
  </div>
151
168
  </StorySection>
152
169
 
170
+ <StorySection
171
+ title="Phone Country Picker"
172
+ description="Enable mobilePicker and mobileCountryEditable on SignUpTemplate to apply an editable country selector to mobile TextInput fields."
173
+ >
174
+ <div className="w-full bg-white rounded-lg shadow-sm border border-gray-100 overflow-hidden">
175
+ <SignUpTemplate
176
+ type="phone"
177
+ stepIndex={0}
178
+ leftComponents={leftComponents}
179
+ leftClassName="bg-gray-50"
180
+ handleUpdateStepIndex={setStepIndex}
181
+ onChangeProvider={handleChangeProvider}
182
+ provider={["phone"]}
183
+ defaultProvider="phone"
184
+ formList={pickerFormList}
185
+ mobilePicker={true}
186
+ mobileCountryEditable={true}
187
+ />
188
+ </div>
189
+ </StorySection>
190
+
153
191
  <StorySection
154
192
  title="Colored Left Panel"
155
193
  description={
@@ -43,6 +43,12 @@ With date range picker:
43
43
  />
44
44
  ```
45
45
 
46
+ Compact (mobile KPI grid):
47
+
48
+ ```jsx
49
+ <StatsCard stats={stats} size="compact" gridSize={3} />
50
+ ```
51
+
46
52
  Dark mode:
47
53
 
48
54
  ```jsx
@@ -66,6 +72,7 @@ Dark mode:
66
72
  | ------------------ | --------------------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
67
73
  | `gridSize` | `1 \| 2 \| 3` | — | Max columns in the grid. `1` = 1-col, `2` = 2-col, `3` = 2-col md / 3-col lg. When omitted, defaults to 2-col md / 4-col lg |
68
74
  | `minGridSize` | `2` | — | Forces a 2-column minimum on small screens. Only `2` is supported |
75
+ | `size` | `"default" \| "compact"` | `"default"` | `compact` renders a stat-first card — small muted label, stat as the hero, icon and action tucked right. Starts 2-up on mobile and drops the `divide-*` rules, since each compact card carries its own border. Roughly halves the grid on mobile; see Choosing a size |
69
76
  | `icon` | `ReactElement` | — | Small icon rendered in the top-right corner of the card group |
70
77
  | `darkMode` | `boolean` | `false` | Switches cards to a dark theme |
71
78
  | `darkModeBg` | `string` | `"bg-gray-900"` | Tailwind classes for the dark mode card background |
@@ -86,6 +93,23 @@ Dark mode:
86
93
  | `actionIcon` | `ReactElement` | no | Icon rendered in the top-right of the individual card |
87
94
  | `onActionIconClick` | `() => void` | no | Click handler for `actionIcon` |
88
95
 
96
+ ##### Choosing a size
97
+
98
+ | | `default` | `compact` |
99
+ | --- | --- | --- |
100
+ | Padding | `p-5` | `p-3` |
101
+ | Label | `text-base`, primary text colour | `text-xs`, muted |
102
+ | Stat | `text-2xl` | `text-lg` |
103
+ | Mobile grid | 1-up (2-up with `minGridSize={2}`) | 2-up |
104
+ | Seams | `divide-y` / `md:divide-x` | per-card border |
105
+ | Icon | rendered inline at the caller's own size | pinned to `h-4 w-4`, chipped right |
106
+
107
+ `gridSize` still applies at `md` and above in both sizes, so a 4-up desktop dashboard collapses to a readable 2-up on mobile. An explicit `gridSize={1}` stays one column at every breakpoint.
108
+
109
+ The saving is in the grid, not the card. Measured at 390px with four stats, the grid drops from 495px to 247px — because compact is 2-up, not because the card shrank. At equal card width the compact card is only marginally shorter (118px vs 125px), and at mobile width it is slightly taller, since compact stacks label, stat, previous and badge vertically while default puts the stat and badge on one baseline row.
110
+
111
+ > Not to be confused with `bareCompactMode` — that is a `DataTemplate` `bareSettings` flag that switches `DetailList` to its compact row layout in the read view. Same word, unrelated component.
112
+
89
113
  ##### RangeInterface
90
114
 
91
115
  | Name | Type | Description |
@@ -97,6 +97,74 @@ export const StatsCard = () => {
97
97
 
98
98
  return (
99
99
  <>
100
+ <StorySection
101
+ title="size=&quot;compact&quot; — 2-Up KPI Grid"
102
+ description="Stat-first compact layout. Label small and muted, stat is the hero, icon and action tucked right. Starts 2-up on mobile instead of the default 1-up — which roughly halves the grid height there — and drops the divide rules since each card carries its own border."
103
+ >
104
+ <div className="w-full">
105
+ <StatsCardImpl stats={baseStats} size="compact" />
106
+ </div>
107
+ </StorySection>
108
+
109
+ <StorySection
110
+ title="size=&quot;compact&quot; — 4-Up Dashboard Glance"
111
+ description="Compact honours gridSize at md and above, so a 4-up desktop dashboard collapses to a readable 2-up on mobile. Resize the frame to see the grid step down."
112
+ >
113
+ <div className="w-full">
114
+ <StatsCardImpl
115
+ stats={[
116
+ ...baseStats,
117
+ {
118
+ name: "Active Users",
119
+ stats: "3,240",
120
+ previousStats: "3,100",
121
+ change: "4.5%",
122
+ changeType: "increase",
123
+ icon: <UserGroupIcon className="w-6 h-6 text-gray-600" />,
124
+ },
125
+ ]}
126
+ size="compact"
127
+ />
128
+ </div>
129
+ </StorySection>
130
+
131
+ <StorySection
132
+ title="size=&quot;compact&quot; — gridSize=1"
133
+ description="An explicit gridSize of 1 stays a single column at every breakpoint. Compact's 2-up mobile default used to override it, which put MORE columns on the narrow screen than the wide one — resize the frame and this should never split into two."
134
+ >
135
+ <div className="w-full">
136
+ <StatsCardImpl stats={baseStats} size="compact" gridSize={1} />
137
+ </div>
138
+ </StorySection>
139
+
140
+ <StorySection
141
+ title="size=&quot;compact&quot; — With DateRange Picker"
142
+ description="dateRangeVisible renders below the compact grid exactly as it does for the default size."
143
+ >
144
+ <div className="w-full">
145
+ <StatsCardImpl
146
+ stats={seriesData}
147
+ size="compact"
148
+ dateRangeVisible={true}
149
+ onChangeDate={handleSetData}
150
+ />
151
+ </div>
152
+ </StorySection>
153
+
154
+ <StorySection
155
+ title="size=&quot;compact&quot; — Dark Mode"
156
+ description="Compact cards swap to a gray-900 surface with a gray-700 border and a gray-800 icon chip."
157
+ dark
158
+ >
159
+ <div className="w-full">
160
+ <StatsCardImpl
161
+ stats={baseStats}
162
+ size="compact"
163
+ darkMode={true}
164
+ />
165
+ </div>
166
+ </StorySection>
167
+
100
168
  <StorySection
101
169
  title="Default (4-column grid)"
102
170
  description="When gridSize is omitted the component defaults to a 4-column grid on large screens. Each card shows a name, stat value, optional previous stat, and an optional change badge."
@@ -237,7 +237,7 @@ export const ChatBase = () => {
237
237
  sender: botUser,
238
238
  messageBody: {
239
239
  fileName:
240
- "https://firebasestorage.googleapis.com/v0/b/verdant-solar-dev.appspot.com/o/preCheckList%2F0184b7ee-8bb0-4a48-992c-ac8d37f8e833%2FPre-Checklist.pdf?alt=media&token=1de8eafb-27c4-4ff7-91a3-e640e4ef07cf",
240
+ "https://firebasestorage.googleapis.com/v0/b/demo-bucket.appspot.com/o/files%2FPre-Checklist.pdf?alt=media",
241
241
  token: "sample-document.pdf",
242
242
  type: "application/pdf",
243
243
  } as any,
@@ -26,7 +26,7 @@ export const DataGraph = () => {
26
26
  type: "card",
27
27
  title: "Total Products",
28
28
  description: "All products in catalogue",
29
- spaceId: "esh-products",
29
+ spaceId: "products",
30
30
  query: [],
31
31
  queryBaseType: "count",
32
32
  },
@@ -35,7 +35,7 @@ export const DataGraph = () => {
35
35
  type: "card",
36
36
  title: "Total Revenue",
37
37
  description: "Sum of all order prices",
38
- spaceId: "esh-products",
38
+ spaceId: "products",
39
39
  query: [],
40
40
  queryBaseType: "sum",
41
41
  queryAttributeId: ["price"],
@@ -60,7 +60,7 @@ export const DataGraph = () => {
60
60
  type: "card",
61
61
  title: "All Products",
62
62
  description: "Total product count",
63
- spaceId: "esh-products",
63
+ spaceId: "products",
64
64
  query: [],
65
65
  queryBaseType: "count",
66
66
  },
@@ -69,7 +69,7 @@ export const DataGraph = () => {
69
69
  type: "card",
70
70
  title: "Total Price",
71
71
  description: "Sum of all prices",
72
- spaceId: "esh-products",
72
+ spaceId: "products",
73
73
  query: [],
74
74
  queryBaseType: "sum",
75
75
  queryAttributeId: ["price"],
@@ -78,7 +78,7 @@ export const DataGraph = () => {
78
78
  gridSize: 2,
79
79
  type: "bar",
80
80
  title: "Price per Code",
81
- spaceId: "esh-products",
81
+ spaceId: "products",
82
82
  query: [
83
83
  { type: "=", queryId: "code", value: "P001" },
84
84
  { type: "=", queryId: "code", value: "N001" },