@vin.samdy.dev/passappui 1.0.0

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 (83) hide show
  1. package/dist/components/footer/Footer.d.ts +7 -0
  2. package/dist/components/footer/Footer.d.ts.map +1 -0
  3. package/dist/components/footer/Footer.js +6 -0
  4. package/dist/components/footer/Footer.js.map +1 -0
  5. package/dist/components/footer/Footer.stories.d.ts +8 -0
  6. package/dist/components/footer/Footer.stories.d.ts.map +1 -0
  7. package/dist/components/footer/Footer.stories.js +16 -0
  8. package/dist/components/footer/Footer.stories.js.map +1 -0
  9. package/dist/components/footer/index.d.ts +2 -0
  10. package/dist/components/footer/index.d.ts.map +1 -0
  11. package/dist/components/footer/index.js +2 -0
  12. package/dist/components/footer/index.js.map +1 -0
  13. package/dist/components/header/Header.d.ts +6 -0
  14. package/dist/components/header/Header.d.ts.map +1 -0
  15. package/dist/components/header/Header.js +7 -0
  16. package/dist/components/header/Header.js.map +1 -0
  17. package/dist/components/header/Header.stories.d.ts +8 -0
  18. package/dist/components/header/Header.stories.d.ts.map +1 -0
  19. package/dist/components/header/Header.stories.js +15 -0
  20. package/dist/components/header/Header.stories.js.map +1 -0
  21. package/dist/components/header/index.d.ts +2 -0
  22. package/dist/components/header/index.d.ts.map +1 -0
  23. package/dist/components/header/index.js +2 -0
  24. package/dist/components/header/index.js.map +1 -0
  25. package/dist/components/index.d.ts +4 -0
  26. package/dist/components/index.d.ts.map +1 -0
  27. package/dist/components/index.js +4 -0
  28. package/dist/components/index.js.map +1 -0
  29. package/dist/components/sidebar/Sidebar.d.ts +2 -0
  30. package/dist/components/sidebar/Sidebar.d.ts.map +1 -0
  31. package/dist/components/sidebar/Sidebar.js +6 -0
  32. package/dist/components/sidebar/Sidebar.js.map +1 -0
  33. package/dist/components/sidebar/Sidebar.stories.d.ts +7 -0
  34. package/dist/components/sidebar/Sidebar.stories.d.ts.map +1 -0
  35. package/dist/components/sidebar/Sidebar.stories.js +11 -0
  36. package/dist/components/sidebar/Sidebar.stories.js.map +1 -0
  37. package/dist/components/sidebar/index.d.ts +2 -0
  38. package/dist/components/sidebar/index.d.ts.map +1 -0
  39. package/dist/components/sidebar/index.js +2 -0
  40. package/dist/components/sidebar/index.js.map +1 -0
  41. package/dist/hooks/index.d.ts +2 -0
  42. package/dist/hooks/index.d.ts.map +1 -0
  43. package/dist/hooks/index.js +2 -0
  44. package/dist/hooks/index.js.map +1 -0
  45. package/dist/hooks/useLocalStorage.d.ts +2 -0
  46. package/dist/hooks/useLocalStorage.d.ts.map +1 -0
  47. package/dist/hooks/useLocalStorage.js +34 -0
  48. package/dist/hooks/useLocalStorage.js.map +1 -0
  49. package/dist/index.d.ts +4 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +4 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/layouts/Dashboard.d.ts +7 -0
  54. package/dist/layouts/Dashboard.d.ts.map +1 -0
  55. package/dist/layouts/Dashboard.js +7 -0
  56. package/dist/layouts/Dashboard.js.map +1 -0
  57. package/dist/layouts/Dashboard.stories.d.ts +7 -0
  58. package/dist/layouts/Dashboard.stories.d.ts.map +1 -0
  59. package/dist/layouts/Dashboard.stories.js +15 -0
  60. package/dist/layouts/Dashboard.stories.js.map +1 -0
  61. package/dist/layouts/index.d.ts +2 -0
  62. package/dist/layouts/index.d.ts.map +1 -0
  63. package/dist/layouts/index.js +2 -0
  64. package/dist/layouts/index.js.map +1 -0
  65. package/package.json +51 -0
  66. package/readme.md +37 -0
  67. package/src/components/footer/Footer.stories.tsx +21 -0
  68. package/src/components/footer/Footer.tsx +19 -0
  69. package/src/components/footer/index.ts +1 -0
  70. package/src/components/header/Header.stories.tsx +20 -0
  71. package/src/components/header/Header.tsx +24 -0
  72. package/src/components/header/index.ts +1 -0
  73. package/src/components/index.ts +3 -0
  74. package/src/components/sidebar/Sidebar.stories.tsx +18 -0
  75. package/src/components/sidebar/Sidebar.tsx +14 -0
  76. package/src/components/sidebar/index.ts +1 -0
  77. package/src/hooks/index.ts +1 -0
  78. package/src/hooks/useLocalStorage.ts +36 -0
  79. package/src/index.ts +3 -0
  80. package/src/layouts/Dashboard.stories.tsx +23 -0
  81. package/src/layouts/Dashboard.tsx +21 -0
  82. package/src/layouts/index.ts +1 -0
  83. package/src/styles/global.css +10 -0
@@ -0,0 +1,7 @@
1
+ interface FooterProps {
2
+ companyName?: string;
3
+ year?: number;
4
+ }
5
+ export declare function Footer({ companyName, year, }: FooterProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=Footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/footer/Footer.tsx"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EACnB,WAAqB,EACrB,IAA+B,GAClC,EAAE,WAAW,2CAQb"}
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
+ export function Footer({ companyName = "MyApp", year = new Date().getFullYear(), }) {
4
+ return (_jsx("footer", { className: "bg-slate-100 py-6 px-4 text-center text-sm text-slate-600", children: _jsxs("p", { children: ["\u00A9 ", year, " ", companyName, ". All rights reserved."] }) }));
5
+ }
6
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../src/components/footer/Footer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAOb,MAAM,UAAU,MAAM,CAAC,EACnB,WAAW,GAAG,OAAO,EACrB,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,GACrB;IACV,OAAO,CACH,iBAAQ,SAAS,EAAC,2DAA2D,YACzE,mCACY,IAAI,OAAG,WAAW,8BAC1B,GACC,CACZ,CAAC;AACN,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Footer } from './Footer';
3
+ declare const meta: Meta<typeof Footer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Footer>;
6
+ export declare const Default: Story;
7
+ export declare const CustomCompany: Story;
8
+ //# sourceMappingURL=Footer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.stories.d.ts","sourceRoot":"","sources":["../../../src/components/footer/Footer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAK7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Footer } from './Footer';
2
+ const meta = {
3
+ component: Footer,
4
+ parameters: {
5
+ layout: 'fullscreen',
6
+ },
7
+ };
8
+ export default meta;
9
+ export const Default = {};
10
+ export const CustomCompany = {
11
+ args: {
12
+ companyName: 'PassApp Tech',
13
+ year: 2026,
14
+ },
15
+ };
16
+ //# sourceMappingURL=Footer.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.stories.js","sourceRoot":"","sources":["../../../src/components/footer/Footer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAwB;IAChC,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,IAAI;KACX;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Footer';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/footer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Footer';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/footer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface HeaderProps {
2
+ appName?: string;
3
+ }
4
+ export declare function Header({ appName }: HeaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/header/Header.tsx"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,MAAM,CAAC,EAAE,OAAiB,EAAE,EAAE,WAAW,2CAexD"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Link from 'next/link';
4
+ export function Header({ appName = 'MyApp' }) {
5
+ return (_jsx("header", { className: "bg-slate-900 text-white py-4 px-6", children: _jsxs("nav", { className: "flex items-center justify-between max-w-7xl mx-auto", children: [_jsx(Link, { href: "/", className: "text-xl font-bold", children: appName }), _jsxs("ul", { className: "flex gap-6", children: [_jsx("li", { children: _jsx(Link, { href: "/", className: "hover:text-slate-300", children: "Home" }) }), _jsx("li", { children: _jsx(Link, { href: "/about", className: "hover:text-slate-300", children: "About" }) }), _jsx("li", { children: _jsx(Link, { href: "/contact", className: "hover:text-slate-300", children: "Contact" }) })] })] }) }));
6
+ }
7
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/header/Header.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,WAAW,CAAA;AAM5B,MAAM,UAAU,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,EAAe;IACvD,OAAO,CACL,iBAAQ,SAAS,EAAC,mCAAmC,YACnD,eAAK,SAAS,EAAC,qDAAqD,aAClE,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,mBAAmB,YACzC,OAAO,GACH,EACP,cAAI,SAAS,EAAC,YAAY,aACxB,uBAAI,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,sBAAsB,qBAAY,GAAK,EACpE,uBAAI,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,sBAAsB,sBAAa,GAAK,EAC1E,uBAAI,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,EAAC,SAAS,EAAC,sBAAsB,wBAAe,GAAK,IAC3E,IACD,GACC,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Header } from './Header';
3
+ declare const meta: Meta<typeof Header>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Header>;
6
+ export declare const Default: Story;
7
+ export declare const CustomAppName: Story;
8
+ //# sourceMappingURL=Header.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.stories.d.ts","sourceRoot":"","sources":["../../../src/components/header/Header.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAK7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Header } from './Header';
2
+ const meta = {
3
+ component: Header,
4
+ parameters: {
5
+ layout: 'fullscreen',
6
+ },
7
+ };
8
+ export default meta;
9
+ export const Default = {};
10
+ export const CustomAppName = {
11
+ args: {
12
+ appName: 'PassApp',
13
+ },
14
+ };
15
+ //# sourceMappingURL=Header.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.stories.js","sourceRoot":"","sources":["../../../src/components/header/Header.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAwB;IAChC,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;KACnB;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Header';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/header/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Header';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/header/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './footer';
2
+ export * from './header';
3
+ export * from './sidebar';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './footer';
2
+ export * from './header';
3
+ export * from './sidebar';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/Sidebar.tsx"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,4CAWtB"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from 'next/link';
3
+ export function Sidebar() {
4
+ return (_jsx("div", { className: 'w-[200px] h-screen bg-gray-100', children: _jsx("nav", { className: 'p-4', children: _jsxs("ul", { children: [_jsx("li", { className: 'mb-2 p-4', children: _jsx(Link, { href: "/", className: 'text-gray-700 hover:text-gray-900', children: "Home" }) }), _jsx("li", { className: 'mb-2 p-4', children: _jsx(Link, { href: "/dashboard", className: 'text-gray-700 hover:text-gray-900', children: "Dashboard" }) })] }) }) }));
5
+ }
6
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../src/components/sidebar/Sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,UAAU,OAAO;IACrB,OAAO,CACL,cAAK,SAAS,EAAC,gCAAgC,YAC7C,cAAK,SAAS,EAAC,KAAK,YAClB,yBACE,aAAI,SAAS,EAAC,UAAU,YAAC,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,mCAAmC,qBAAY,GAAK,EACtG,aAAI,SAAS,EAAC,UAAU,YAAC,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,EAAC,SAAS,EAAC,mCAAmC,0BAAiB,GAAK,IACjH,GACD,GACF,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Sidebar } from './Sidebar';
3
+ declare const meta: Meta<typeof Sidebar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Sidebar>;
6
+ export declare const Default: Story;
7
+ //# sourceMappingURL=Sidebar.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/Sidebar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAS9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Sidebar } from './Sidebar';
3
+ const meta = {
4
+ component: Sidebar,
5
+ decorators: [
6
+ (Story) => (_jsx("div", { style: { height: '100vh' }, children: _jsx(Story, {}) })),
7
+ ],
8
+ };
9
+ export default meta;
10
+ export const Default = {};
11
+ //# sourceMappingURL=Sidebar.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.stories.js","sourceRoot":"","sources":["../../../src/components/sidebar/Sidebar.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,IAAI,GAAyB;IACjC,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Sidebar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Sidebar';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/sidebar/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './useLocalStorage';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './useLocalStorage';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function useLocalStorage<T>(key: string, initialValue: T): readonly [T, (val: T | ((prev: T) => T)) => void, boolean];
2
+ //# sourceMappingURL=useLocalStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../src/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,sBAkBhC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,oBAalD"}
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ import { useEffect, useState } from 'react';
3
+ export function useLocalStorage(key, initialValue) {
4
+ const [value, setValue] = useState(initialValue);
5
+ const [isLoaded, setIsLoaded] = useState(false);
6
+ useEffect(() => {
7
+ if (typeof window === 'undefined')
8
+ return;
9
+ try {
10
+ const stored = localStorage.getItem(key);
11
+ if (stored) {
12
+ setValue(JSON.parse(stored));
13
+ }
14
+ }
15
+ catch (error) {
16
+ console.error(`Error reading localStorage:`, error);
17
+ }
18
+ setIsLoaded(true);
19
+ }, [key]);
20
+ const setStoredValue = (val) => {
21
+ try {
22
+ const valueToStore = val instanceof Function ? val(value) : val;
23
+ setValue(valueToStore);
24
+ if (typeof window !== 'undefined') {
25
+ localStorage.setItem(key, JSON.stringify(valueToStore));
26
+ }
27
+ }
28
+ catch (error) {
29
+ console.error(`Error setting localStorage:`, error);
30
+ }
31
+ };
32
+ return [value, setStoredValue, isLoaded];
33
+ }
34
+ //# sourceMappingURL=useLocalStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocalStorage.js","sourceRoot":"","sources":["../../src/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,UAAU,eAAe,CAAI,GAAW,EAAE,YAAe;IAC7D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAI,YAAY,CAAC,CAAA;IACnD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE/C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAM;QAEzC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YACxC,IAAI,MAAM,EAAE,CAAC;gBACX,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;YAC9B,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAA;QACrD,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,MAAM,cAAc,GAAG,CAAC,GAAyB,EAAE,EAAE;QACnD,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;YAC/D,QAAQ,CAAC,YAAY,CAAC,CAAA;YACtB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;gBAClC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;YACzD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAA;QACrD,CAAC;IACH,CAAC,CAAA;IAED,OAAO,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAU,CAAA;AACnD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './layouts';
3
+ export * from './hooks';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './layouts';
3
+ export * from './hooks';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface LayoutProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare function DashboardLayout({ children }: LayoutProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=Dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["../../src/layouts/Dashboard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,UAAU,WAAW;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAWxD"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Footer, Header, Sidebar } from '../components';
4
+ export function DashboardLayout({ children }) {
5
+ return (_jsxs("div", { className: "flex flex-row h-full w-full", children: [_jsx(Sidebar, {}), _jsxs("div", { className: "flex flex-col w-full h-full", children: [_jsx(Header, {}), _jsx("main", { className: "w-full", children: children }), _jsx(Footer, {})] })] }));
6
+ }
7
+ //# sourceMappingURL=Dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../../src/layouts/Dashboard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAMvD,MAAM,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAe;IACvD,OAAO,CACL,eAAK,SAAS,EAAC,6BAA6B,aAC1C,KAAC,OAAO,KAAG,EACX,eAAK,SAAS,EAAC,6BAA6B,aAC1C,KAAC,MAAM,KAAG,EACV,eAAM,SAAS,EAAC,QAAQ,YAAE,QAAQ,GAAQ,EAC1C,KAAC,MAAM,KAAG,IACN,IACF,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { DashboardLayout } from './Dashboard';
3
+ declare const meta: Meta<typeof DashboardLayout>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DashboardLayout>;
6
+ export declare const Default: Story;
7
+ //# sourceMappingURL=Dashboard.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dashboard.stories.d.ts","sourceRoot":"","sources":["../../src/layouts/Dashboard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAKtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DashboardLayout } from './Dashboard';
3
+ const meta = {
4
+ component: DashboardLayout,
5
+ parameters: {
6
+ layout: 'fullscreen',
7
+ },
8
+ };
9
+ export default meta;
10
+ export const Default = {
11
+ args: {
12
+ children: (_jsxs("div", { className: "p-6", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Dashboard Content" }), _jsx("p", { className: "mt-2 text-slate-600", children: "This is the main content area." })] })),
13
+ },
14
+ };
15
+ //# sourceMappingURL=Dashboard.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dashboard.stories.js","sourceRoot":"","sources":["../../src/layouts/Dashboard.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,IAAI,GAAiC;IACzC,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,CACR,eAAK,SAAS,EAAC,KAAK,aAClB,aAAI,SAAS,EAAC,oBAAoB,kCAAuB,EACzD,YAAG,SAAS,EAAC,qBAAqB,+CAAmC,IACjE,CACP;KACF;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Dashboard';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Dashboard';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@vin.samdy.dev/passappui",
3
+ "version": "1.0.0",
4
+ "description": "Shared UI components library",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "src"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "require": "./dist/index.js",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "./styles": "./dist/styles/global.css",
21
+ "./hooks": "./dist/hooks/index.js"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "dev": "tsc --watch",
26
+ "clean": "rm -rf dist",
27
+ "type-check": "tsc --noEmit",
28
+ "prepare": "npm run build",
29
+ "storybook": "storybook dev -p 6006",
30
+ "build-storybook": "storybook build"
31
+ },
32
+ "dependencies": {
33
+ "next": "^16.1.6"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "^18.0.0 || ^19.0.0",
37
+ "react-dom": "^18.0.0 || ^19.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@storybook/addon-themes": "^10.2.9",
41
+ "@storybook/nextjs-vite": "^10.2.9",
42
+ "@tailwindcss/vite": "^4.1.18",
43
+ "@types/react": "^19.0.0",
44
+ "@types/react-dom": "^19.0.0",
45
+ "storybook": "^10.2.9",
46
+ "typescript": "^5.3.0"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ }
51
+ }
package/readme.md ADDED
@@ -0,0 +1,37 @@
1
+ # @passapptech/ui
2
+
3
+ Shared UI components library for multi-zone Next.js applications.
4
+
5
+ ## Installation
6
+
7
+ ### Public NPM
8
+ ```bash
9
+ npm install @passapptech/ui
10
+ ```
11
+
12
+ ### GitHub Packages
13
+ ```bash
14
+ npm install @passapptech/ui --registry=https://npm.pkg.github.com
15
+ ```
16
+
17
+ ## Usage
18
+ ```tsx
19
+ import { Layout, Header, Footer } from '@passapptech/ui'
20
+ import '@passapptech/ui/styles'
21
+
22
+ export default function RootLayout({ children }) {
23
+ return (
24
+ <html>
25
+ <body>
26
+ <Layout>{children}</Layout>
27
+ </body>
28
+ </html>
29
+ )
30
+ }
31
+ ```
32
+
33
+ ## Publishing
34
+ ```bash
35
+ npm run build
36
+ npm publish
37
+ ```
@@ -0,0 +1,21 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Footer } from './Footer';
3
+
4
+ const meta: Meta<typeof Footer> = {
5
+ component: Footer,
6
+ parameters: {
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Footer>;
13
+
14
+ export const Default: Story = {};
15
+
16
+ export const CustomCompany: Story = {
17
+ args: {
18
+ companyName: 'PassApp Tech',
19
+ year: 2026,
20
+ },
21
+ };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+
3
+ interface FooterProps {
4
+ companyName?: string;
5
+ year?: number;
6
+ }
7
+
8
+ export function Footer({
9
+ companyName = "MyApp",
10
+ year = new Date().getFullYear(),
11
+ }: FooterProps) {
12
+ return (
13
+ <footer className="bg-slate-100 py-6 px-4 text-center text-sm text-slate-600">
14
+ <p>
15
+ &copy; {year} {companyName}. All rights reserved.
16
+ </p>
17
+ </footer>
18
+ );
19
+ }
@@ -0,0 +1 @@
1
+ export * from './Footer';
@@ -0,0 +1,20 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Header } from './Header';
3
+
4
+ const meta: Meta<typeof Header> = {
5
+ component: Header,
6
+ parameters: {
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof Header>;
13
+
14
+ export const Default: Story = {};
15
+
16
+ export const CustomAppName: Story = {
17
+ args: {
18
+ appName: 'PassApp',
19
+ },
20
+ };
@@ -0,0 +1,24 @@
1
+ 'use client'
2
+
3
+ import Link from 'next/link'
4
+
5
+ interface HeaderProps {
6
+ appName?: string
7
+ }
8
+
9
+ export function Header({ appName = 'MyApp' }: HeaderProps) {
10
+ return (
11
+ <header className="bg-slate-900 text-white py-4 px-6">
12
+ <nav className="flex items-center justify-between max-w-7xl mx-auto">
13
+ <Link href="/" className="text-xl font-bold">
14
+ {appName}
15
+ </Link>
16
+ <ul className="flex gap-6">
17
+ <li><Link href="/" className="hover:text-slate-300">Home</Link></li>
18
+ <li><Link href="/about" className="hover:text-slate-300">About</Link></li>
19
+ <li><Link href="/contact" className="hover:text-slate-300">Contact</Link></li>
20
+ </ul>
21
+ </nav>
22
+ </header>
23
+ )
24
+ }
@@ -0,0 +1 @@
1
+ export * from './Header';
@@ -0,0 +1,3 @@
1
+ export * from './footer';
2
+ export * from './header';
3
+ export * from './sidebar';
@@ -0,0 +1,18 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Sidebar } from './Sidebar';
3
+
4
+ const meta: Meta<typeof Sidebar> = {
5
+ component: Sidebar,
6
+ decorators: [
7
+ (Story) => (
8
+ <div style={{ height: '100vh' }}>
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof Sidebar>;
17
+
18
+ export const Default: Story = {};
@@ -0,0 +1,14 @@
1
+ import Link from 'next/link'
2
+
3
+ export function Sidebar() {
4
+ return (
5
+ <div className='w-[200px] h-screen bg-gray-100'>
6
+ <nav className='p-4'>
7
+ <ul>
8
+ <li className='mb-2 p-4'><Link href="/" className='text-gray-700 hover:text-gray-900'>Home</Link></li>
9
+ <li className='mb-2 p-4'><Link href="/dashboard" className='text-gray-700 hover:text-gray-900'>Dashboard</Link></li>
10
+ </ul>
11
+ </nav>
12
+ </div>
13
+ )
14
+ }
@@ -0,0 +1 @@
1
+ export * from './Sidebar';
@@ -0,0 +1 @@
1
+ export * from './useLocalStorage';
@@ -0,0 +1,36 @@
1
+ 'use client'
2
+
3
+ import { useEffect, useState } from 'react'
4
+
5
+ export function useLocalStorage<T>(key: string, initialValue: T) {
6
+ const [value, setValue] = useState<T>(initialValue)
7
+ const [isLoaded, setIsLoaded] = useState(false)
8
+
9
+ useEffect(() => {
10
+ if (typeof window === 'undefined') return
11
+
12
+ try {
13
+ const stored = localStorage.getItem(key)
14
+ if (stored) {
15
+ setValue(JSON.parse(stored))
16
+ }
17
+ } catch (error) {
18
+ console.error(`Error reading localStorage:`, error)
19
+ }
20
+ setIsLoaded(true)
21
+ }, [key])
22
+
23
+ const setStoredValue = (val: T | ((prev: T) => T)) => {
24
+ try {
25
+ const valueToStore = val instanceof Function ? val(value) : val
26
+ setValue(valueToStore)
27
+ if (typeof window !== 'undefined') {
28
+ localStorage.setItem(key, JSON.stringify(valueToStore))
29
+ }
30
+ } catch (error) {
31
+ console.error(`Error setting localStorage:`, error)
32
+ }
33
+ }
34
+
35
+ return [value, setStoredValue, isLoaded] as const
36
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './layouts';
3
+ export * from './hooks';
@@ -0,0 +1,23 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { DashboardLayout } from './Dashboard';
3
+
4
+ const meta: Meta<typeof DashboardLayout> = {
5
+ component: DashboardLayout,
6
+ parameters: {
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof DashboardLayout>;
13
+
14
+ export const Default: Story = {
15
+ args: {
16
+ children: (
17
+ <div className="p-6">
18
+ <h1 className="text-2xl font-bold">Dashboard Content</h1>
19
+ <p className="mt-2 text-slate-600">This is the main content area.</p>
20
+ </div>
21
+ ),
22
+ },
23
+ };
@@ -0,0 +1,21 @@
1
+ 'use client'
2
+
3
+ import React from 'react'
4
+ import { Footer, Header, Sidebar } from '../components'
5
+
6
+ interface LayoutProps {
7
+ children: React.ReactNode
8
+ }
9
+
10
+ export function DashboardLayout({ children }: LayoutProps) {
11
+ return (
12
+ <div className="flex flex-row h-full w-full">
13
+ <Sidebar />
14
+ <div className="flex flex-col w-full h-full">
15
+ <Header />
16
+ <main className="w-full">{children}</main>
17
+ <Footer />
18
+ </div>
19
+ </div>
20
+ )
21
+ }
@@ -0,0 +1 @@
1
+ export * from './Dashboard';
@@ -0,0 +1,10 @@
1
+ /* Custom variables */
2
+ :root {
3
+ --color-primary: #1e293b;
4
+ --color-secondary: #64748b;
5
+ }
6
+
7
+ .dark {
8
+ --color-primary: #0f172a;
9
+ --color-secondary: #1e293b;
10
+ }