@omnifyjp/shell 0.1.1
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/README.md +476 -0
- package/dist/chunk-6JYWZJEY.js +123 -0
- package/dist/chunk-6JYWZJEY.js.map +1 -0
- package/dist/chunk-ACCHC3AM.js +57 -0
- package/dist/chunk-ACCHC3AM.js.map +1 -0
- package/dist/chunk-EJEVW4RO.js +49 -0
- package/dist/chunk-EJEVW4RO.js.map +1 -0
- package/dist/chunk-OHORC3F5.js +72 -0
- package/dist/chunk-OHORC3F5.js.map +1 -0
- package/dist/chunk-OMIE3Z5N.js +661 -0
- package/dist/chunk-OMIE3Z5N.js.map +1 -0
- package/dist/chunk-OYE3TXTK.js +37 -0
- package/dist/chunk-OYE3TXTK.js.map +1 -0
- package/dist/chunk-Q3QWQG6P.js +91 -0
- package/dist/chunk-Q3QWQG6P.js.map +1 -0
- package/dist/chunk-QNCYBLHC.js +189 -0
- package/dist/chunk-QNCYBLHC.js.map +1 -0
- package/dist/chunk-SHHZRZMM.js +83 -0
- package/dist/chunk-SHHZRZMM.js.map +1 -0
- package/dist/chunk-WCRLQ5M5.js +235 -0
- package/dist/chunk-WCRLQ5M5.js.map +1 -0
- package/dist/chunk-YVUVYTVZ.js +224 -0
- package/dist/chunk-YVUVYTVZ.js.map +1 -0
- package/dist/components/AppShell.d.ts +27 -0
- package/dist/components/AppShell.js +11 -0
- package/dist/components/AppShell.js.map +1 -0
- package/dist/components/Header.d.ts +11 -0
- package/dist/components/Header.js +6 -0
- package/dist/components/Header.js.map +1 -0
- package/dist/components/OrganizationSelector.d.ts +8 -0
- package/dist/components/OrganizationSelector.js +4 -0
- package/dist/components/OrganizationSelector.js.map +1 -0
- package/dist/components/OrganizationSetupModal.d.ts +5 -0
- package/dist/components/OrganizationSetupModal.js +4 -0
- package/dist/components/OrganizationSetupModal.js.map +1 -0
- package/dist/components/PageContainer.d.ts +105 -0
- package/dist/components/PageContainer.js +3 -0
- package/dist/components/PageContainer.js.map +1 -0
- package/dist/components/ServiceMenu.d.ts +11 -0
- package/dist/components/ServiceMenu.js +3 -0
- package/dist/components/ServiceMenu.js.map +1 -0
- package/dist/components/Sidebar.d.ts +11 -0
- package/dist/components/Sidebar.js +5 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/contexts/OrganizationContext.d.ts +26 -0
- package/dist/contexts/OrganizationContext.js +3 -0
- package/dist/contexts/OrganizationContext.js.map +1 -0
- package/dist/contexts/ThemeContext.d.ts +14 -0
- package/dist/contexts/ThemeContext.js +3 -0
- package/dist/contexts/ThemeContext.js.map +1 -0
- package/dist/hooks/useDateFormat.d.ts +28 -0
- package/dist/hooks/useDateFormat.js +4 -0
- package/dist/hooks/useDateFormat.js.map +1 -0
- package/dist/i18n.d.ts +38 -0
- package/dist/i18n.js +3 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +89 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Header.js"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface OrganizationSelectorProps {
|
|
4
|
+
variant?: 'header' | 'sidebar';
|
|
5
|
+
}
|
|
6
|
+
declare function OrganizationSelector({ variant }: OrganizationSelectorProps): react_jsx_runtime.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { OrganizationSelector };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"OrganizationSelector.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"OrganizationSetupModal.js"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface PageContainerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Page title
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Subtitle or description below title
|
|
11
|
+
*/
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Extra content (buttons, actions) displayed on the right side of header
|
|
15
|
+
*/
|
|
16
|
+
extra?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Main page content
|
|
19
|
+
*/
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Footer content displayed at the bottom
|
|
23
|
+
*/
|
|
24
|
+
footer?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Sidebar content displayed on left or right
|
|
27
|
+
*/
|
|
28
|
+
sidebar?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Sidebar position
|
|
31
|
+
* @default 'right'
|
|
32
|
+
*/
|
|
33
|
+
sidebarPosition?: 'left' | 'right';
|
|
34
|
+
/**
|
|
35
|
+
* Sidebar width
|
|
36
|
+
* @default 'w-80'
|
|
37
|
+
*/
|
|
38
|
+
sidebarWidth?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Layout variant
|
|
41
|
+
* - 'standard': Default padded layout with header
|
|
42
|
+
* - 'full': Full width, no padding (for boards, gantt)
|
|
43
|
+
* - 'split': Layout with sidebar inside page
|
|
44
|
+
* @default 'standard'
|
|
45
|
+
*/
|
|
46
|
+
variant?: 'standard' | 'full' | 'split';
|
|
47
|
+
/**
|
|
48
|
+
* Custom container className
|
|
49
|
+
*/
|
|
50
|
+
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Custom content className
|
|
53
|
+
*/
|
|
54
|
+
contentClassName?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Show separator below header
|
|
57
|
+
* @default true for standard variant
|
|
58
|
+
*/
|
|
59
|
+
showHeaderSeparator?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* PageContainer - Flexible page layout component
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // Standard layout with title and actions
|
|
66
|
+
* <PageContainer
|
|
67
|
+
* title="Dashboard"
|
|
68
|
+
* subtitle="Overview of all projects"
|
|
69
|
+
* extra={<Button>Create</Button>}
|
|
70
|
+
* >
|
|
71
|
+
* <div>Content here</div>
|
|
72
|
+
* </PageContainer>
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Split layout with right sidebar
|
|
76
|
+
* <PageContainer
|
|
77
|
+
* title="Task Detail"
|
|
78
|
+
* variant="split"
|
|
79
|
+
* sidebar={<CommentSection />}
|
|
80
|
+
* sidebarPosition="right"
|
|
81
|
+
* >
|
|
82
|
+
* <div>Main content</div>
|
|
83
|
+
* </PageContainer>
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* // Full width layout (no padding)
|
|
87
|
+
* <PageContainer variant="full">
|
|
88
|
+
* <KanbanBoard />
|
|
89
|
+
* </PageContainer>
|
|
90
|
+
*/
|
|
91
|
+
declare function PageContainer({ title, subtitle, extra, children, footer, sidebar, sidebarPosition, sidebarWidth, variant, className, contentClassName, showHeaderSeparator, }: PageContainerProps): react_jsx_runtime.JSX.Element;
|
|
92
|
+
/**
|
|
93
|
+
* Convenience wrapper for standard layout
|
|
94
|
+
*/
|
|
95
|
+
declare function StandardPageContainer(props: Omit<PageContainerProps, 'variant'>): react_jsx_runtime.JSX.Element;
|
|
96
|
+
/**
|
|
97
|
+
* Convenience wrapper for split layout with sidebar
|
|
98
|
+
*/
|
|
99
|
+
declare function SplitPageContainer(props: Omit<PageContainerProps, 'variant'>): react_jsx_runtime.JSX.Element;
|
|
100
|
+
/**
|
|
101
|
+
* Convenience wrapper for full width layout
|
|
102
|
+
*/
|
|
103
|
+
declare function FullWidthPageContainer(props: Omit<PageContainerProps, 'variant' | 'title' | 'subtitle' | 'extra'>): react_jsx_runtime.JSX.Element;
|
|
104
|
+
|
|
105
|
+
export { FullWidthPageContainer, PageContainer, type PageContainerProps, SplitPageContainer, StandardPageContainer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"PageContainer.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ServiceCategory } from '../types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface ServiceMenuProps {
|
|
7
|
+
categories: ServiceCategory[];
|
|
8
|
+
}
|
|
9
|
+
declare function ServiceMenu({ categories }: ServiceMenuProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { ServiceMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ServiceMenu.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ShellConfig } from '../types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface SidebarProps {
|
|
7
|
+
config: ShellConfig;
|
|
8
|
+
}
|
|
9
|
+
declare function Sidebar({ config }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { Sidebar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Sidebar.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Organization, Branch } from '../types.js';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface OrganizationContextType {
|
|
7
|
+
organizations: Organization[];
|
|
8
|
+
branches: Branch[];
|
|
9
|
+
selectedOrganization: Organization | null;
|
|
10
|
+
selectedBranch: Branch | null;
|
|
11
|
+
setSelectedOrganization: (org: Organization | null) => void;
|
|
12
|
+
setSelectedBranch: (branch: Branch | null) => void;
|
|
13
|
+
getBranchesByOrg: (orgId: string) => Branch[];
|
|
14
|
+
isSetupComplete: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface OrganizationProviderProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
organizations?: Organization[];
|
|
19
|
+
branches?: Branch[];
|
|
20
|
+
onOrganizationChange?: (org: Organization) => void;
|
|
21
|
+
onBranchChange?: (branch: Branch) => void;
|
|
22
|
+
}
|
|
23
|
+
declare function OrganizationProvider({ children, organizations, branches, onOrganizationChange, onBranchChange, }: OrganizationProviderProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function useOrganization(): OrganizationContextType;
|
|
25
|
+
|
|
26
|
+
export { OrganizationProvider, useOrganization };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"OrganizationContext.js"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type Theme = 'light' | 'dark' | 'system';
|
|
5
|
+
interface ThemeContextType {
|
|
6
|
+
theme: Theme;
|
|
7
|
+
setTheme: (theme: Theme) => void;
|
|
8
|
+
}
|
|
9
|
+
declare function ThemeProvider({ children }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function useTheme(): ThemeContextType;
|
|
13
|
+
|
|
14
|
+
export { type Theme, ThemeProvider, useTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ThemeContext.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { SupportedLanguage } from '../i18n.js';
|
|
3
|
+
import 'i18next';
|
|
4
|
+
|
|
5
|
+
type SupportedTimezone = 'Asia/Ho_Chi_Minh' | 'Asia/Tokyo' | 'America/New_York' | 'America/Los_Angeles' | 'Europe/London' | 'UTC';
|
|
6
|
+
declare const timezoneLabels: Record<SupportedTimezone, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Hook that provides date formatting utilities.
|
|
9
|
+
* Reads the current language from i18next automatically.
|
|
10
|
+
*/
|
|
11
|
+
declare function useDateFormat(): {
|
|
12
|
+
language: SupportedLanguage;
|
|
13
|
+
timezone: SupportedTimezone;
|
|
14
|
+
setLanguage: (lang: SupportedLanguage) => void;
|
|
15
|
+
setTimezone: (tz: SupportedTimezone) => void;
|
|
16
|
+
formatDate: (date: Date | string) => string;
|
|
17
|
+
formatDateTime: (date: Date | string) => string;
|
|
18
|
+
formatRelativeTime: (date: Date | string) => string;
|
|
19
|
+
formatShortDate: (date: Date | string) => string;
|
|
20
|
+
formatMonthYear: (date: Date | string) => string;
|
|
21
|
+
formatDayOfWeek: (date: Date | string) => string;
|
|
22
|
+
formatDateLong: (date: Date | string) => string;
|
|
23
|
+
dateFnsLocale: Locale;
|
|
24
|
+
localeTag: string;
|
|
25
|
+
languageNames: Record<SupportedLanguage, string>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { type SupportedTimezone, timezoneLabels, useDateFormat };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"useDateFormat.js"}
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as i18next from 'i18next';
|
|
2
|
+
import i18next__default from 'i18next';
|
|
3
|
+
export { default, default as i18n } from 'i18next';
|
|
4
|
+
|
|
5
|
+
type SupportedLanguage = 'vi' | 'en' | 'ja';
|
|
6
|
+
declare const languageNames: Record<SupportedLanguage, string>;
|
|
7
|
+
interface InitOmnifyI18nOptions {
|
|
8
|
+
/** Add service-specific namespace translations */
|
|
9
|
+
namespaces?: Record<string, Record<string, Record<string, unknown>>>;
|
|
10
|
+
/** Override shell translation keys */
|
|
11
|
+
overrides?: Record<string, Record<string, string>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Initialize Omnify i18n for a service.
|
|
15
|
+
* Call this once in your service's entry point.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { initOmnifyI18n } from '@omnifyjp/shell';
|
|
20
|
+
* import pmVi from './locales/vi.json';
|
|
21
|
+
* import pmEn from './locales/en.json';
|
|
22
|
+
*
|
|
23
|
+
* initOmnifyI18n({
|
|
24
|
+
* namespaces: { pm: { vi: pmVi, en: pmEn } },
|
|
25
|
+
* overrides: {
|
|
26
|
+
* vi: { 'common.save': 'Lưu hồ sơ' },
|
|
27
|
+
* }
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare function initOmnifyI18n(options?: InitOmnifyI18nOptions): void;
|
|
32
|
+
/**
|
|
33
|
+
* Change the current language.
|
|
34
|
+
* Persists to localStorage and updates i18next.
|
|
35
|
+
*/
|
|
36
|
+
declare function changeLanguage(lang: SupportedLanguage): Promise<i18next.TFunction<"translation", undefined>>;
|
|
37
|
+
|
|
38
|
+
export { type InitOmnifyI18nOptions, type SupportedLanguage, changeLanguage, initOmnifyI18n, languageNames };
|
package/dist/i18n.js
ADDED
package/dist/i18n.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"i18n.js"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { AppShell } from './components/AppShell.js';
|
|
2
|
+
export { Sidebar } from './components/Sidebar.js';
|
|
3
|
+
export { Header } from './components/Header.js';
|
|
4
|
+
export { ServiceMenu } from './components/ServiceMenu.js';
|
|
5
|
+
export { OrganizationSelector } from './components/OrganizationSelector.js';
|
|
6
|
+
export { OrganizationSetupModal } from './components/OrganizationSetupModal.js';
|
|
7
|
+
export { FullWidthPageContainer, PageContainer, PageContainerProps, SplitPageContainer, StandardPageContainer } from './components/PageContainer.js';
|
|
8
|
+
export { Theme, ThemeProvider, useTheme } from './contexts/ThemeContext.js';
|
|
9
|
+
export { OrganizationProvider, useOrganization } from './contexts/OrganizationContext.js';
|
|
10
|
+
export { InitOmnifyI18nOptions, SupportedLanguage, changeLanguage, initOmnifyI18n, languageNames } from './i18n.js';
|
|
11
|
+
export { SupportedTimezone, timezoneLabels, useDateFormat } from './hooks/useDateFormat.js';
|
|
12
|
+
export { Branch, Organization, ServiceCategory, ServiceItem, ShellConfig, SidebarMenuItem } from './types.js';
|
|
13
|
+
export { default as i18n } from 'i18next';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
15
|
+
import 'react';
|
|
16
|
+
import 'date-fns';
|
|
17
|
+
import 'lucide-react';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { timezoneLabels, useDateFormat } from './chunk-6JYWZJEY.js';
|
|
2
|
+
export { AppShell } from './chunk-OYE3TXTK.js';
|
|
3
|
+
export { ThemeProvider, useTheme } from './chunk-EJEVW4RO.js';
|
|
4
|
+
export { changeLanguage, i18n, initOmnifyI18n, languageNames } from './chunk-OMIE3Z5N.js';
|
|
5
|
+
export { Sidebar } from './chunk-YVUVYTVZ.js';
|
|
6
|
+
export { Header } from './chunk-Q3QWQG6P.js';
|
|
7
|
+
export { ServiceMenu } from './chunk-ACCHC3AM.js';
|
|
8
|
+
export { OrganizationSelector } from './chunk-WCRLQ5M5.js';
|
|
9
|
+
export { OrganizationSetupModal } from './chunk-QNCYBLHC.js';
|
|
10
|
+
export { OrganizationProvider, useOrganization } from './chunk-SHHZRZMM.js';
|
|
11
|
+
export { FullWidthPageContainer, PageContainer, SplitPageContainer, StandardPageContainer } from './chunk-OHORC3F5.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
interface Organization {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
logo?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
shortName?: string;
|
|
11
|
+
}
|
|
12
|
+
interface Branch {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
organizationId: string;
|
|
16
|
+
location?: string;
|
|
17
|
+
}
|
|
18
|
+
interface SidebarMenuItem {
|
|
19
|
+
icon: LucideIcon;
|
|
20
|
+
label: string;
|
|
21
|
+
path?: string;
|
|
22
|
+
badge?: number;
|
|
23
|
+
children?: SidebarMenuItem[];
|
|
24
|
+
}
|
|
25
|
+
interface ServiceItem {
|
|
26
|
+
icon: LucideIcon;
|
|
27
|
+
label: string;
|
|
28
|
+
url: string;
|
|
29
|
+
color: string;
|
|
30
|
+
active?: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface ServiceCategory {
|
|
33
|
+
category: string;
|
|
34
|
+
items: ServiceItem[];
|
|
35
|
+
}
|
|
36
|
+
interface ShellConfig {
|
|
37
|
+
app: {
|
|
38
|
+
name: string;
|
|
39
|
+
key: string;
|
|
40
|
+
logo: {
|
|
41
|
+
icon: LucideIcon;
|
|
42
|
+
text: string;
|
|
43
|
+
color?: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
sidebar: {
|
|
47
|
+
menuItems: SidebarMenuItem[];
|
|
48
|
+
contextMenu?: {
|
|
49
|
+
paramName: string;
|
|
50
|
+
getItems: (paramValue: string) => SidebarMenuItem[];
|
|
51
|
+
getHeader?: (paramValue: string) => ReactNode;
|
|
52
|
+
getFooterItems?: () => SidebarMenuItem[];
|
|
53
|
+
};
|
|
54
|
+
recentItems?: {
|
|
55
|
+
title: string;
|
|
56
|
+
items: Array<{
|
|
57
|
+
label: string;
|
|
58
|
+
path: string;
|
|
59
|
+
badge?: string;
|
|
60
|
+
color?: string;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
footer?: ReactNode;
|
|
64
|
+
};
|
|
65
|
+
services?: ServiceCategory[];
|
|
66
|
+
header?: {
|
|
67
|
+
searchPlaceholder?: string;
|
|
68
|
+
actions?: ReactNode;
|
|
69
|
+
notifications?: {
|
|
70
|
+
count: number;
|
|
71
|
+
content: ReactNode;
|
|
72
|
+
};
|
|
73
|
+
user?: {
|
|
74
|
+
name: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
avatar?: string;
|
|
77
|
+
onLogout?: () => void;
|
|
78
|
+
};
|
|
79
|
+
showSearch?: boolean;
|
|
80
|
+
};
|
|
81
|
+
organization?: {
|
|
82
|
+
organizations: Organization[];
|
|
83
|
+
branches: Branch[];
|
|
84
|
+
onOrganizationChange?: (org: Organization) => void;
|
|
85
|
+
onBranchChange?: (branch: Branch) => void;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type { Branch, Organization, ServiceCategory, ServiceItem, ShellConfig, SidebarMenuItem };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@omnifyjp/shell",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./components/*": {
|
|
15
|
+
"types": "./dist/components/*.d.ts",
|
|
16
|
+
"import": "./dist/components/*.js"
|
|
17
|
+
},
|
|
18
|
+
"./contexts/*": {
|
|
19
|
+
"types": "./dist/contexts/*.d.ts",
|
|
20
|
+
"import": "./dist/contexts/*.js"
|
|
21
|
+
},
|
|
22
|
+
"./hooks/*": {
|
|
23
|
+
"types": "./dist/hooks/*.d.ts",
|
|
24
|
+
"import": "./dist/hooks/*.js"
|
|
25
|
+
},
|
|
26
|
+
"./i18n": {
|
|
27
|
+
"types": "./dist/i18n.d.ts",
|
|
28
|
+
"import": "./dist/i18n.js"
|
|
29
|
+
},
|
|
30
|
+
"./types": {
|
|
31
|
+
"types": "./dist/types.d.ts",
|
|
32
|
+
"import": "./dist/types.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsup",
|
|
40
|
+
"dev": "tsup --watch",
|
|
41
|
+
"lint": "eslint src/",
|
|
42
|
+
"type-check": "tsc --noEmit"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": ">=18",
|
|
46
|
+
"react-dom": ">=18",
|
|
47
|
+
"react-router": ">=7"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@omnifyjp/ui": "^0.1.1",
|
|
51
|
+
"i18next": "^24.0.0",
|
|
52
|
+
"react-i18next": "^15.0.0",
|
|
53
|
+
"date-fns": "3.6.0",
|
|
54
|
+
"lucide-react": "0.487.0",
|
|
55
|
+
"sonner": "2.0.3"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"tsup": "^8.0.0",
|
|
59
|
+
"typescript": "^5.9.3",
|
|
60
|
+
"@types/react": "^19.2.13",
|
|
61
|
+
"@types/react-dom": "^19.2.3"
|
|
62
|
+
}
|
|
63
|
+
}
|