@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.js
CHANGED
|
@@ -1068,20 +1068,21 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
1068
1068
|
return (jsxRuntime.jsx("div", { className: [styles$C.toggle, className].filter(Boolean).join(' '), role: "group", "aria-label": "Supplier type", children: OPTIONS.map((option) => (jsxRuntime.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'))) }));
|
|
1069
1069
|
};
|
|
1070
1070
|
|
|
1071
|
-
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"};
|
|
1071
|
+
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"};
|
|
1072
1072
|
|
|
1073
1073
|
const BackIcon = () => (jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), jsxRuntime.jsx("polyline", { points: "12 19 5 12 12 5" })] }));
|
|
1074
1074
|
/**
|
|
1075
1075
|
* TeamHeader - Header component for team management pages
|
|
1076
1076
|
*/
|
|
1077
1077
|
const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team Management', backHref, onBack, actions, className = '', }) => {
|
|
1078
|
+
const title = suppliedTitle ?? (teamCode && teamName
|
|
1079
|
+
? `${teamCode} - ${teamName}`
|
|
1080
|
+
: teamName || teamCode || '');
|
|
1078
1081
|
const headerClasses = [
|
|
1079
1082
|
styles$B.header,
|
|
1083
|
+
!title ? styles$B.empty : '',
|
|
1080
1084
|
className,
|
|
1081
1085
|
].filter(Boolean).join(' ');
|
|
1082
|
-
const title = suppliedTitle ?? (teamCode && teamName
|
|
1083
|
-
? `${teamCode} - ${teamName}`
|
|
1084
|
-
: teamName || teamCode || '');
|
|
1085
1086
|
const handleBack = () => {
|
|
1086
1087
|
if (onBack) {
|
|
1087
1088
|
onBack();
|
|
@@ -2336,30 +2337,23 @@ const NotFoundPage = ({ errorCode = '404', title = 'Page Not Found', message = '
|
|
|
2336
2337
|
};
|
|
2337
2338
|
NotFoundPage.displayName = 'NotFoundPage';
|
|
2338
2339
|
|
|
2339
|
-
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","
|
|
2340
|
+
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"};
|
|
2340
2341
|
|
|
2341
|
-
const RosterIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }), jsxRuntime.jsx("circle", { cx: "9", cy: "7", r: "4" }), jsxRuntime.jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }), jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })] }));
|
|
2342
|
-
const ContactsIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.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" }), jsxRuntime.jsx("polyline", { points: "22,6 12,13 2,6" })] }));
|
|
2343
|
-
const PreferencesIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "3" }), jsxRuntime.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" })] }));
|
|
2344
|
-
const ProgramsIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "4", rx: "1" }), jsxRuntime.jsx("rect", { x: "3", y: "10", width: "18", height: "4", rx: "1" }), jsxRuntime.jsx("rect", { x: "3", y: "16", width: "18", height: "4", rx: "1" })] }));
|
|
2345
2342
|
const DEFAULT_TABS = [
|
|
2346
|
-
{ id: '
|
|
2347
|
-
{ id: '
|
|
2348
|
-
{ id: '
|
|
2349
|
-
{ id: '
|
|
2343
|
+
{ id: 'profile', label: 'Profile' },
|
|
2344
|
+
{ id: 'roster', label: 'Roster' },
|
|
2345
|
+
{ id: 'equipment', label: 'Equipment' },
|
|
2346
|
+
{ id: 'user-access', label: 'User Access' },
|
|
2350
2347
|
];
|
|
2351
2348
|
/**
|
|
2352
2349
|
* TeamManagementPage - Layout for team management with tabbed navigation
|
|
2353
2350
|
*/
|
|
2354
|
-
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = '
|
|
2351
|
+
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = 'profile', onTabChange, children, sidebar, footer, className = '', }) => {
|
|
2355
2352
|
const pageClasses = [styles$3.page, className].filter(Boolean).join(' ');
|
|
2356
2353
|
if (variant === 'overview') {
|
|
2357
2354
|
return (jsxRuntime.jsxs("div", { className: [styles$3.overview, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx("header", { className: styles$3.overviewHeader, children: jsxRuntime.jsx("h1", { children: title }) }), jsxRuntime.jsxs("div", { className: styles$3.overviewGrid, children: [jsxRuntime.jsx("aside", { children: teamPanel }), jsxRuntime.jsxs("section", { className: styles$3.contactsColumn, children: [jsxRuntime.jsx("h2", { children: contactsTitle }), contactAlert, contacts] })] })] }));
|
|
2358
2355
|
}
|
|
2359
|
-
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [header
|
|
2360
|
-
styles$3.tabButton,
|
|
2361
|
-
activeTab === tab.id ? styles$3.active : '',
|
|
2362
|
-
].filter(Boolean).join(' '), onClick: () => onTabChange?.(tab.id), "aria-selected": activeTab === tab.id, children: [tab.icon && jsxRuntime.jsx("span", { className: styles$3.tabIcon, children: tab.icon }), jsxRuntime.jsx("span", { children: tab.label }), tab.badge !== undefined && tab.badge > 0 && (jsxRuntime.jsx("span", { className: styles$3.tabBadge, children: tab.badge }))] }, tab.id))) }), jsxRuntime.jsxs("div", { className: styles$3.body, children: [jsxRuntime.jsx("main", { className: styles$3.main, children: children }), sidebar && (jsxRuntime.jsx("aside", { className: styles$3.sidebar, children: sidebar }))] }), footer && jsxRuntime.jsx("div", { className: styles$3.footer, children: footer })] }));
|
|
2356
|
+
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [header, jsxRuntime.jsx(TeamSubMenu, { tabs: tabs, activeTab: activeTab, onTabChange: onTabChange }), sidebar ? jsxRuntime.jsxs("div", { className: styles$3.body, children: [jsxRuntime.jsx("main", { className: styles$3.main, children: children }), sidebar && (jsxRuntime.jsx("aside", { className: styles$3.sidebar, children: sidebar }))] }) : children, footer && jsxRuntime.jsx("div", { className: styles$3.footer, children: footer })] }));
|
|
2363
2357
|
};
|
|
2364
2358
|
TeamManagementPage.displayName = 'TeamManagementPage';
|
|
2365
2359
|
|