@shortstravelmgmt/component-lib 0.1.3 → 0.1.4
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/dist/index.d.ts +1 -5
- package/dist/index.esm.js +12 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -18
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2238,11 +2238,7 @@ declare const NotFoundPage: {
|
|
|
2238
2238
|
displayName: string;
|
|
2239
2239
|
};
|
|
2240
2240
|
|
|
2241
|
-
interface TeamManagementTab {
|
|
2242
|
-
/** Tab identifier */
|
|
2243
|
-
id: string;
|
|
2244
|
-
/** Tab label */
|
|
2245
|
-
label: string;
|
|
2241
|
+
interface TeamManagementTab extends TeamSubMenuTab {
|
|
2246
2242
|
/** Tab icon */
|
|
2247
2243
|
icon?: ReactNode;
|
|
2248
2244
|
/** Tab badge count */
|
package/dist/index.esm.js
CHANGED
|
@@ -1066,20 +1066,21 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
1066
1066
|
return (jsx("div", { className: [styles$C.toggle, className].filter(Boolean).join(' '), role: "group", "aria-label": "Supplier type", children: OPTIONS.map((option) => (jsx("button", { type: "button", disabled: disabled, "aria-pressed": activeValue === option.value, className: activeValue === option.value ? styles$C.active : '', onClick: () => handleSelect(option.value), children: option.label }, option.value || 'all'))) }));
|
|
1067
1067
|
};
|
|
1068
1068
|
|
|
1069
|
-
var styles$B = {"header":"TeamHeader-module_header__3Zx1c","left":"TeamHeader-module_left__yqug2","backButton":"TeamHeader-module_backButton__MqElX","titles":"TeamHeader-module_titles__m3Ne9","pretitle":"TeamHeader-module_pretitle__rZUD6","title":"TeamHeader-module_title__i3dmZ","actions":"TeamHeader-module_actions__ft1DN","subMenu":"TeamHeader-module_subMenu__oL-3Q","activeTab":"TeamHeader-module_activeTab__AUzdq"};
|
|
1069
|
+
var styles$B = {"header":"TeamHeader-module_header__3Zx1c","empty":"TeamHeader-module_empty__fKrFE","left":"TeamHeader-module_left__yqug2","backButton":"TeamHeader-module_backButton__MqElX","titles":"TeamHeader-module_titles__m3Ne9","pretitle":"TeamHeader-module_pretitle__rZUD6","title":"TeamHeader-module_title__i3dmZ","actions":"TeamHeader-module_actions__ft1DN","subMenu":"TeamHeader-module_subMenu__oL-3Q","activeTab":"TeamHeader-module_activeTab__AUzdq"};
|
|
1070
1070
|
|
|
1071
1071
|
const BackIcon = () => (jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), jsx("polyline", { points: "12 19 5 12 12 5" })] }));
|
|
1072
1072
|
/**
|
|
1073
1073
|
* TeamHeader - Header component for team management pages
|
|
1074
1074
|
*/
|
|
1075
1075
|
const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team Management', backHref, onBack, actions, className = '', }) => {
|
|
1076
|
+
const title = suppliedTitle ?? (teamCode && teamName
|
|
1077
|
+
? `${teamCode} - ${teamName}`
|
|
1078
|
+
: teamName || teamCode || '');
|
|
1076
1079
|
const headerClasses = [
|
|
1077
1080
|
styles$B.header,
|
|
1081
|
+
!title ? styles$B.empty : '',
|
|
1078
1082
|
className,
|
|
1079
1083
|
].filter(Boolean).join(' ');
|
|
1080
|
-
const title = suppliedTitle ?? (teamCode && teamName
|
|
1081
|
-
? `${teamCode} - ${teamName}`
|
|
1082
|
-
: teamName || teamCode || '');
|
|
1083
1084
|
const handleBack = () => {
|
|
1084
1085
|
if (onBack) {
|
|
1085
1086
|
onBack();
|
|
@@ -2334,30 +2335,23 @@ const NotFoundPage = ({ errorCode = '404', title = 'Page Not Found', message = '
|
|
|
2334
2335
|
};
|
|
2335
2336
|
NotFoundPage.displayName = 'NotFoundPage';
|
|
2336
2337
|
|
|
2337
|
-
var styles$3 = {"page":"TeamManagementPage-module_page__iRm2r","overview":"TeamManagementPage-module_overview__HDnLX","overviewHeader":"TeamManagementPage-module_overviewHeader__OYpB8","overviewGrid":"TeamManagementPage-module_overviewGrid__u8VZy","contactsColumn":"TeamManagementPage-module_contactsColumn__g-gm8","
|
|
2338
|
+
var styles$3 = {"page":"TeamManagementPage-module_page__iRm2r","overview":"TeamManagementPage-module_overview__HDnLX","overviewHeader":"TeamManagementPage-module_overviewHeader__OYpB8","overviewGrid":"TeamManagementPage-module_overviewGrid__u8VZy","contactsColumn":"TeamManagementPage-module_contactsColumn__g-gm8","body":"TeamManagementPage-module_body__10aka","main":"TeamManagementPage-module_main__-lFtT","sidebar":"TeamManagementPage-module_sidebar__u8syG","footer":"TeamManagementPage-module_footer__he9G0"};
|
|
2338
2339
|
|
|
2339
|
-
const RosterIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }), jsx("circle", { cx: "9", cy: "7", r: "4" }), jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }), jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })] }));
|
|
2340
|
-
const ContactsIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }), jsx("polyline", { points: "22,6 12,13 2,6" })] }));
|
|
2341
|
-
const PreferencesIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "12", cy: "12", r: "3" }), jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })] }));
|
|
2342
|
-
const ProgramsIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("rect", { x: "3", y: "4", width: "18", height: "4", rx: "1" }), jsx("rect", { x: "3", y: "10", width: "18", height: "4", rx: "1" }), jsx("rect", { x: "3", y: "16", width: "18", height: "4", rx: "1" })] }));
|
|
2343
2340
|
const DEFAULT_TABS = [
|
|
2344
|
-
{ id: '
|
|
2345
|
-
{ id: '
|
|
2346
|
-
{ id: '
|
|
2347
|
-
{ id: '
|
|
2341
|
+
{ id: 'profile', label: 'Profile' },
|
|
2342
|
+
{ id: 'roster', label: 'Roster' },
|
|
2343
|
+
{ id: 'equipment', label: 'Equipment' },
|
|
2344
|
+
{ id: 'user-access', label: 'User Access' },
|
|
2348
2345
|
];
|
|
2349
2346
|
/**
|
|
2350
2347
|
* TeamManagementPage - Layout for team management with tabbed navigation
|
|
2351
2348
|
*/
|
|
2352
|
-
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = '
|
|
2349
|
+
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = 'profile', onTabChange, children, sidebar, footer, className = '', }) => {
|
|
2353
2350
|
const pageClasses = [styles$3.page, className].filter(Boolean).join(' ');
|
|
2354
2351
|
if (variant === 'overview') {
|
|
2355
2352
|
return (jsxs("div", { className: [styles$3.overview, className].filter(Boolean).join(' '), children: [jsx("header", { className: styles$3.overviewHeader, children: jsx("h1", { children: title }) }), jsxs("div", { className: styles$3.overviewGrid, children: [jsx("aside", { children: teamPanel }), jsxs("section", { className: styles$3.contactsColumn, children: [jsx("h2", { children: contactsTitle }), contactAlert, contacts] })] })] }));
|
|
2356
2353
|
}
|
|
2357
|
-
return (jsxs("div", { className: pageClasses, children: [header
|
|
2358
|
-
styles$3.tabButton,
|
|
2359
|
-
activeTab === tab.id ? styles$3.active : '',
|
|
2360
|
-
].filter(Boolean).join(' '), onClick: () => onTabChange?.(tab.id), "aria-selected": activeTab === tab.id, children: [tab.icon && jsx("span", { className: styles$3.tabIcon, children: tab.icon }), jsx("span", { children: tab.label }), tab.badge !== undefined && tab.badge > 0 && (jsx("span", { className: styles$3.tabBadge, children: tab.badge }))] }, tab.id))) }), jsxs("div", { className: styles$3.body, children: [jsx("main", { className: styles$3.main, children: children }), sidebar && (jsx("aside", { className: styles$3.sidebar, children: sidebar }))] }), footer && jsx("div", { className: styles$3.footer, children: footer })] }));
|
|
2354
|
+
return (jsxs("div", { className: pageClasses, children: [header, jsx(TeamSubMenu, { tabs: tabs, activeTab: activeTab, onTabChange: onTabChange }), sidebar ? jsxs("div", { className: styles$3.body, children: [jsx("main", { className: styles$3.main, children: children }), sidebar && (jsx("aside", { className: styles$3.sidebar, children: sidebar }))] }) : children, footer && jsx("div", { className: styles$3.footer, children: footer })] }));
|
|
2361
2355
|
};
|
|
2362
2356
|
TeamManagementPage.displayName = 'TeamManagementPage';
|
|
2363
2357
|
|