blixify-ui-web-mcp 0.1.1 → 0.1.3

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 (28) hide show
  1. package/lib/components/chart/ganttChart/README.md +96 -110
  2. package/lib/components/chart/ganttChart/ganttChart.stories.tsx +132 -116
  3. package/lib/components/chart/heatmapChart/README.md +93 -82
  4. package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +118 -74
  5. package/lib/components/chat/chatAnchor/README.md +61 -79
  6. package/lib/components/chat/chatBase/README.md +166 -199
  7. package/lib/components/chat/chatBase/chatBase.stories.tsx +243 -265
  8. package/lib/components/chat/chatDashboard/README.md +87 -129
  9. package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +84 -107
  10. package/lib/components/data/dataGraph/README.md +135 -1
  11. package/lib/components/data/dataGraph/dataGraph.stories.tsx +86 -67
  12. package/lib/components/data/dataReference/README.md +141 -43
  13. package/lib/components/data/dataReference/dataReference.stories.tsx +107 -35
  14. package/lib/components/data/dataWrapper/README.md +2 -1
  15. package/lib/components/display/table/README.md +1 -1
  16. package/lib/components/navigation/bars/README.md +90 -17
  17. package/lib/components/navigation/bars/bars.stories.tsx +125 -51
  18. package/lib/components/navigation/breadcrumb/README.md +40 -20
  19. package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +30 -4
  20. package/lib/components/navigation/header/README.md +67 -108
  21. package/lib/components/navigation/header/header.stories.tsx +143 -39
  22. package/lib/components/navigation/leftNav/README.md +121 -66
  23. package/lib/components/navigation/leftNav/leftNav.stories.tsx +176 -83
  24. package/lib/components/navigation/tabs/tabs.stories.tsx +53 -29
  25. package/lib/mcp/server.d.ts +1 -0
  26. package/lib/mcp/server.js +1 -0
  27. package/lib/mcp/server.js.map +1 -1
  28. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
 
5
5
  <hr>
6
6
 
7
- Header for Application UI for Normal User
7
+ A responsive application header with a logo, navigation links, an optional user avatar dropdown, and mobile hamburger menu. Navigation items can have a Popover dropdown (`multiNav`) for grouped sub-links. Supports dark mode, transparent background, and an extra slot for custom elements.
8
8
 
9
9
  ##### Import
10
10
 
@@ -15,135 +15,94 @@ import { Header } from "blixify-ui-web/components/navigation/header";
15
15
  ##### Usage
16
16
 
17
17
  ```jsx
18
- const multiNavigation = [
19
- {
20
- name: "Section 1",
21
- href: "/dashboard/section1",
22
- description:
23
- "This is a dropdown section that allows you navigate to section 1",
24
- icon: PhoneIcon,
25
- },
26
- {
27
- name: "Section 2",
28
- href: "/dashboard/section2",
29
- description:
30
- "This is a dropdown section that allows you navigate to section 2",
31
- icon: ComputerDesktopIcon,
32
- },
33
- {
34
- name: "Section 3",
35
- href: "/dashboard/section3",
36
- description:
37
- "This is a dropdown section that allows you navigate to section 3",
38
- icon: BookOpenIcon,
39
- },
40
- {
41
- name: "Section 4",
42
- href: "/dashboard/section4",
43
- description:
44
- "This is a dropdown section that allows you navigate to section 4",
45
- icon: MapIcon,
46
- },
47
- ];
18
+ import { Disclosure, Menu, Popover, Transition } from "@headlessui/react";
19
+ import { PhoneIcon } from "@heroicons/react/20/solid";
48
20
 
49
21
  const navigation = [
50
22
  { name: "Dashboard", href: "/dashboard" },
51
23
  {
52
24
  name: "Activities",
53
- href: "/dashboard/logistic",
54
- multiNav: multiNavigation,
25
+ href: "/dashboard/activities",
26
+ multiNav: [
27
+ {
28
+ name: "Section 1",
29
+ href: "/dashboard/section1",
30
+ description: "Go to section 1",
31
+ icon: PhoneIcon,
32
+ },
33
+ ],
55
34
  },
56
- { name: "Records", href: "/dashboard/transaction" },
57
- { name: "Donees", href: "/dashboard/orgs" },
58
35
  { name: "FAQ", href: "https://google.com", openInNewTab: true },
59
36
  ];
60
37
 
61
- const [modal, setModal] = useState(false);
62
-
63
- const handleSwapAccount = () => {
64
- setModal(!modal);
65
- window.alert("Swap account clicked");
66
- };
67
-
68
38
  const userNavigation = [
69
39
  { name: "My Profile", href: "/dashboard/profile" },
70
40
  {
71
41
  name: "Swap Account",
72
- customAction: handleSwapAccount,
42
+ customAction: () => alert("swap"),
73
43
  notification: true,
74
44
  },
75
45
  { name: "Sign out", action: "logout", href: "#" },
76
46
  ];
77
47
 
78
- return (
79
- <div className="bg-gray-100">
80
- <Header
81
- defaultNav="/"
82
- page="Activities"
83
- transparent={true}
84
- logo={Logo}
85
- navigation={navigation}
86
- userNavigation={userNavigation}
87
- user={{
88
- name: "Louis Ong",
89
- email: "louis@blixify.co",
90
- image: Favicon,
91
- }}
92
- lib={{
93
- Disclosure,
94
- Menu,
95
- Transition,
96
- Popover,
97
- }}
98
- />
99
- </div>
100
- );
48
+ <Header
49
+ defaultNav="/"
50
+ page="Dashboard"
51
+ logo={Logo}
52
+ navigation={navigation}
53
+ userNavigation={userNavigation}
54
+ user={{ name: "Jane Doe", email: "jane@example.com", image: Avatar }}
55
+ lib={{ Disclosure, Menu, Transition, Popover }}
56
+ />;
101
57
  ```
102
58
 
103
59
  ##### Required props
104
60
 
105
- | Name | Type | Description |
106
- | ---------------- | ---------------- | --------------------------------------------- |
107
- | `defaultNav` | `string` | Default path once logo is selected |
108
- | `page` | `string` | Current selected path according to navigation |
109
- | `logo` | `string` | Logo |
110
- | `navigation` | `Navigation` | Class |
111
- | `userNavigation` | `UserNavigation` | Class |
112
- | `lib` | `class` | Class |
61
+ | Name | Type | Description |
62
+ | ------------ | ------------------------------------------- | ------------------------------------------------------------------------- |
63
+ | `defaultNav` | `string` | URL the logo links to |
64
+ | `page` | `string` | Name of the currently active navigation item — used to highlight the link |
65
+ | `logo` | `string` | Image src for the logo |
66
+ | `navigation` | `Navigation[]` | Ordered list of nav links — see Navigation below |
67
+ | `lib` | `{ Disclosure, Menu, Transition, Popover }` | Headless UI components passed in to avoid bundling conflicts |
113
68
 
114
69
  ##### Optional props
115
70
 
116
- | Name | Type | Default | Description |
117
- | ------------- | ------------------ | ---------------------------------------------- | ------------------------------------------------------- |
118
- | `user` | `class` | `null ` | |
119
- | `transparent` | `boolean` | `false` | Make background transparent |
120
- | `linkProps` | `Link Props Class` | Refer to Link Component for more documentation | |
121
- | `extra` | `React Element` | `null` | React Element placed on the left of userNavigation menu |
122
-
123
- ##### Navigation props
124
-
125
- | Name | Type | Description |
126
- | -------------- | ---------------------- | ---------------------------------------- |
127
- | `name` | `string` | Name of path |
128
- | `href` | `string` | Url |
129
- | `multiNav` | `Multi Nav List Class` | Optional for multiple navigation list |
130
- | `openInNewTab` | `boolean` | Optional. If true, opens link in new tab |
131
-
132
- ##### UserNavigation props
133
-
134
- | Name | Type | Description |
135
- | -------------- | ---------- | -------------- |
136
- | `name` | `string` | Name of path |
137
- | `href` | `string` | Url |
138
- | `notification` | `boolean` | True or false |
139
- | `action` | `function` | Trigger logout |
140
- | `customAction` | `function` | Optional |
141
-
142
- ##### Multi Navigation props
143
-
144
- | Name | Type | Description |
145
- | ------------- | --------------- | ------------ |
146
- | `name` | `string` | Name of path |
147
- | `href` | `string` | Url |
148
- | `icon` | `React Element` | |
149
- | `description` | `string` | |
71
+ | Name | Type | Default | Description |
72
+ | ---------------- | ---------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ |
73
+ | `userNavigation` | `UserNavigation[]` | — | Items shown in the user avatar dropdown — see UserNavigation below |
74
+ | `user` | `{ name: string; email: string; image: string }` | — | When provided, renders an avatar button that opens the user dropdown |
75
+ | `transparent` | `boolean` | `false` | Removes the background colour and shadow. Useful over hero images or coloured banners. |
76
+ | `darkMode` | `boolean` | `false` | Switches text and backgrounds to a dark theme |
77
+ | `extra` | `ReactElement` | — | Element rendered to the left of the user avatar. Use for search inputs, notification bells, etc. |
78
+ | `signOut` | `() => void` | — | Custom sign-out handler. Called when a `UserNavigation` item with `action: "logout"` is clicked. |
79
+ | `linkType` | `"react" \| "gatsby" \| "next" \| "external" \| "default"` | — | Router adapter for all link rendering |
80
+ | `custom` | `any` | — | Custom link component used when `linkType` is `"react"`, `"gatsby"`, or `"next"` |
81
+
82
+ ##### Navigation
83
+
84
+ | Name | Type | Description |
85
+ | -------------- | ------------------- | ------------------------------------------------------------------------------- |
86
+ | `name` | `string` | Display label and the value matched against `page` to highlight the active item |
87
+ | `href` | `string` | URL for the link |
88
+ | `multiNav` | `MultiNavigation[]` | Optional — when provided, renders a Popover dropdown instead of a direct link |
89
+ | `openInNewTab` | `boolean` | When `true`, opens the link in a new tab |
90
+
91
+ ##### MultiNavigation
92
+
93
+ | Name | Type | Description |
94
+ | ------------- | -------- | --------------------------------------------------- |
95
+ | `name` | `string` | Sub-item display label |
96
+ | `href` | `string` | URL for the sub-item link |
97
+ | `icon` | `any` | Heroicon or SVG component shown beside the sub-item |
98
+ | `description` | `string` | Short description shown below the sub-item name |
99
+
100
+ ##### UserNavigation
101
+
102
+ | Name | Type | Description |
103
+ | -------------- | ------------------ | ------------------------------------------------------------------------------------------- |
104
+ | `name` | `string` | Display label |
105
+ | `href` | `string` | URL — used when neither `action` nor `customAction` is set |
106
+ | `action` | `string` | Set to `"logout"` to trigger the `signOut` handler instead of navigating |
107
+ | `customAction` | `(e: any) => void` | Custom click handler. When set, renders the item as a `<span>` instead of a link. |
108
+ | `notification` | `boolean` | When `true`, shows an animated ping badge on the avatar button to indicate a pending action |
@@ -8,6 +8,7 @@ import {
8
8
  import { storiesOf } from "@storybook/react";
9
9
  import React, { useState } from "react";
10
10
  import { Header } from ".";
11
+ import { StorySection } from "../../storyUtils";
11
12
  import Favicon from "../../../assets/favicon.png";
12
13
  import Logo from "../../../assets/logo.png";
13
14
  import README from "./README.md";
@@ -20,33 +21,31 @@ stories.addParameters({
20
21
  },
21
22
  });
22
23
 
24
+ const lib = { Disclosure, Menu, Transition, Popover };
25
+
23
26
  const multiNavigation = [
24
27
  {
25
28
  name: "Section 1",
26
29
  href: "/dashboard/section1",
27
- description:
28
- "This is a dropdown section that allows you navigate to section 1",
30
+ description: "Navigate to section 1",
29
31
  icon: PhoneIcon,
30
32
  },
31
33
  {
32
34
  name: "Section 2",
33
35
  href: "/dashboard/section2",
34
- description:
35
- "This is a dropdown section that allows you navigate to section 2",
36
+ description: "Navigate to section 2",
36
37
  icon: ComputerDesktopIcon,
37
38
  },
38
39
  {
39
40
  name: "Section 3",
40
41
  href: "/dashboard/section3",
41
- description:
42
- "This is a dropdown section that allows you navigate to section 3",
42
+ description: "Navigate to section 3",
43
43
  icon: BookOpenIcon,
44
44
  },
45
45
  {
46
46
  name: "Section 4",
47
47
  href: "/dashboard/section4",
48
- description:
49
- "This is a dropdown section that allows you navigate to section 4",
48
+ description: "Navigate to section 4",
50
49
  icon: MapIcon,
51
50
  },
52
51
  ];
@@ -55,53 +54,158 @@ const navigation = [
55
54
  { name: "Dashboard", href: "/dashboard" },
56
55
  {
57
56
  name: "Activities",
58
- href: "/dashboard/logistic",
57
+ href: "/dashboard/activities",
59
58
  multiNav: multiNavigation,
60
59
  },
61
- { name: "Records", href: "/dashboard/transaction" },
62
- { name: "Donees", href: "/dashboard/orgs" },
60
+ { name: "Records", href: "/dashboard/records" },
63
61
  { name: "FAQ", href: "https://google.com", openInNewTab: true },
64
62
  ];
65
63
 
66
- stories.add("Header", () => {
67
- const [modal, setModal] = useState(false);
64
+ const user = {
65
+ name: "Louis Ong",
66
+ email: "louis@blixify.co",
67
+ image: Favicon,
68
+ };
68
69
 
69
- const handleSwapAccount = () => {
70
- setModal(!modal);
71
- window.alert("Swap account clicked");
72
- };
70
+ stories.add("Header", () => {
71
+ const [page] = useState("Dashboard");
73
72
 
74
73
  const userNavigation = [
75
74
  { name: "My Profile", href: "/dashboard/profile" },
76
75
  {
77
76
  name: "Swap Account",
78
- customAction: handleSwapAccount,
77
+ customAction: () => window.alert("Swap account clicked"),
79
78
  notification: true,
80
79
  },
81
80
  { name: "Sign out", action: "logout", href: "#" },
82
81
  ];
83
82
 
84
83
  return (
85
- <div className="bg-gray-100">
86
- <Header
87
- defaultNav="/"
88
- page="Activities"
89
- transparent={true}
90
- logo={Logo}
91
- navigation={navigation}
92
- userNavigation={userNavigation}
93
- user={{
94
- name: "Louis Ong",
95
- email: "louis@blixify.co",
96
- image: Favicon,
97
- }}
98
- lib={{
99
- Disclosure,
100
- Menu,
101
- Transition,
102
- Popover,
103
- }}
104
- />
105
- </div>
84
+ <>
85
+ <StorySection
86
+ title="Default"
87
+ description="Standard header with logo, nav links, and a user avatar dropdown. page highlights the active nav item. Resize the window to see the mobile hamburger menu."
88
+ >
89
+ <div className="w-full bg-gray-100">
90
+ <Header
91
+ defaultNav="/"
92
+ page={page}
93
+ logo={Logo}
94
+ navigation={navigation}
95
+ userNavigation={userNavigation}
96
+ user={user}
97
+ lib={lib}
98
+ />
99
+ </div>
100
+ </StorySection>
101
+
102
+ <StorySection
103
+ title="Transparent Background"
104
+ description="transparent=true removes the background and shadow. Useful when the header sits over a hero image or coloured banner."
105
+ >
106
+ <div className="w-full bg-primary-50 rounded-lg">
107
+ <Header
108
+ defaultNav="/"
109
+ page={page}
110
+ logo={Logo}
111
+ navigation={navigation}
112
+ userNavigation={userNavigation}
113
+ user={user}
114
+ transparent={true}
115
+ lib={lib}
116
+ />
117
+ </div>
118
+ </StorySection>
119
+
120
+ <StorySection
121
+ title="Dropdown Navigation (multiNav)"
122
+ description="Add multiNav to a Navigation item to render a Popover dropdown with icon, name, and description for each sub-item. Click 'Activities' to see it."
123
+ >
124
+ <div className="w-full bg-gray-100">
125
+ <Header
126
+ defaultNav="/"
127
+ page="Activities"
128
+ logo={Logo}
129
+ navigation={navigation}
130
+ userNavigation={userNavigation}
131
+ user={user}
132
+ lib={lib}
133
+ />
134
+ </div>
135
+ </StorySection>
136
+
137
+ <StorySection
138
+ title="Notification Badge"
139
+ description="Set notification=true on a UserNavigation item to show an animated ping badge on the avatar button, indicating a pending action."
140
+ >
141
+ <div className="w-full bg-gray-100">
142
+ <Header
143
+ defaultNav="/"
144
+ page={page}
145
+ logo={Logo}
146
+ navigation={navigation}
147
+ userNavigation={userNavigation}
148
+ user={user}
149
+ lib={lib}
150
+ />
151
+ </div>
152
+ </StorySection>
153
+
154
+ <StorySection
155
+ title="Extra Element"
156
+ description="extra renders a ReactElement to the left of the user avatar. Useful for search inputs, notification bells, or action buttons."
157
+ >
158
+ <div className="w-full bg-gray-100">
159
+ <Header
160
+ defaultNav="/"
161
+ page={page}
162
+ logo={Logo}
163
+ navigation={navigation}
164
+ userNavigation={userNavigation}
165
+ user={user}
166
+ extra={
167
+ <button className="mr-3 text-sm text-primary-600 font-medium border border-primary-300 rounded-md px-3 py-1">
168
+ Upgrade
169
+ </button>
170
+ }
171
+ lib={lib}
172
+ />
173
+ </div>
174
+ </StorySection>
175
+
176
+ <StorySection
177
+ title="No User (Public Header)"
178
+ description="Omit user and userNavigation to render a header without the avatar dropdown. Suitable for public-facing pages."
179
+ >
180
+ <div className="w-full bg-gray-100">
181
+ <Header
182
+ defaultNav="/"
183
+ page={page}
184
+ logo={Logo}
185
+ navigation={navigation}
186
+ lib={lib}
187
+ />
188
+ </div>
189
+ </StorySection>
190
+
191
+ <StorySection
192
+ title="Dark Mode"
193
+ description="darkMode=true switches text and backgrounds to a dark theme."
194
+ dark
195
+ >
196
+ <div className="w-full bg-gray-900 rounded-lg">
197
+ <Header
198
+ defaultNav="/"
199
+ page={page}
200
+ logo={Logo}
201
+ navigation={navigation}
202
+ userNavigation={userNavigation}
203
+ user={user}
204
+ darkMode={true}
205
+ lib={lib}
206
+ />
207
+ </div>
208
+ </StorySection>
209
+ </>
106
210
  );
107
211
  });