@shortstravelmgmt/component-lib 0.1.0 → 0.1.2
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 +410 -168
- package/dist/index.esm.js +637 -393
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +653 -392
- 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
|
@@ -22,6 +22,7 @@ const ChevronUpIcon = createIcon(jsxRuntime.jsx("path", { d: "m18 15-6-6-6 6" })
|
|
|
22
22
|
const ChevronRightIcon$1 = createIcon(jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }), 'ChevronRightIcon');
|
|
23
23
|
const ChevronLeftIcon = createIcon(jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }), 'ChevronLeftIcon');
|
|
24
24
|
const ArrowUpRightIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M7 7h10v10" }), jsxRuntime.jsx("path", { d: "M7 17 17 7" })] }), 'ArrowUpRightIcon');
|
|
25
|
+
const ArrowDownLeftIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M17 7 7 17" }), jsxRuntime.jsx("path", { d: "M17 17H7V7" })] }), 'ArrowDownLeftIcon');
|
|
25
26
|
const EyeIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }), jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "3" })] }), 'EyeIcon');
|
|
26
27
|
const DownloadIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), jsxRuntime.jsx("polyline", { points: "7 10 12 15 17 10" }), jsxRuntime.jsx("line", { x1: "12", x2: "12", y1: "15", y2: "3" })] }), 'DownloadIcon');
|
|
27
28
|
const FilterIcon$1 = createIcon(jsxRuntime.jsx("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }), 'FilterIcon');
|
|
@@ -71,6 +72,7 @@ const Icons = {
|
|
|
71
72
|
ChevronRight: ChevronRightIcon$1,
|
|
72
73
|
ChevronLeft: ChevronLeftIcon,
|
|
73
74
|
ArrowUpRight: ArrowUpRightIcon,
|
|
75
|
+
ArrowDownLeft: ArrowDownLeftIcon,
|
|
74
76
|
Eye: EyeIcon,
|
|
75
77
|
Download: DownloadIcon,
|
|
76
78
|
Filter: FilterIcon$1,
|
|
@@ -107,7 +109,7 @@ const Icons = {
|
|
|
107
109
|
Trash: TrashIcon$2,
|
|
108
110
|
};
|
|
109
111
|
|
|
110
|
-
var styles
|
|
112
|
+
var styles$18 = {"alert":"Alert-module_alert__xxiES","content":"Alert-module_content__CVX32","icon":"Alert-module_icon__Xyh6J","body":"Alert-module_body__TTkmt","title":"Alert-module_title__7wNPO","message":"Alert-module_message__plreL","dismissButton":"Alert-module_dismissButton__MdRWh","primary":"Alert-module_primary__nME13","success":"Alert-module_success__GDt4S","warning":"Alert-module_warning__y4bLx","error":"Alert-module_error__nKMAG"};
|
|
111
113
|
|
|
112
114
|
const variantIcons = {
|
|
113
115
|
primary: LightbulbIcon,
|
|
@@ -117,10 +119,10 @@ const variantIcons = {
|
|
|
117
119
|
};
|
|
118
120
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
119
121
|
const IconComponent = variantIcons[variant];
|
|
120
|
-
return (jsxRuntime.jsx("div", { className: `${styles
|
|
122
|
+
return (jsxRuntime.jsx("div", { className: `${styles$18.alert} ${styles$18[variant]} ${className}`, role: "alert", children: jsxRuntime.jsxs("div", { className: styles$18.content, children: [jsxRuntime.jsx(IconComponent, { className: styles$18.icon, size: 20 }), jsxRuntime.jsxs("div", { className: styles$18.body, children: [title && jsxRuntime.jsx("h4", { className: styles$18.title, children: title }), jsxRuntime.jsx("div", { className: styles$18.message, children: children })] }), dismissible && onDismiss && (jsxRuntime.jsx("button", { type: "button", onClick: onDismiss, className: styles$18.dismissButton, "aria-label": "Dismiss alert", children: jsxRuntime.jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
121
123
|
};
|
|
122
124
|
|
|
123
|
-
var styles$
|
|
125
|
+
var styles$17 = {"avatar":"Avatar-module_avatar__AcTRg","xs":"Avatar-module_xs__4uGxI","sm":"Avatar-module_sm__NvzTi","md":"Avatar-module_md__PgY8p","lg":"Avatar-module_lg__lhkAZ","xl":"Avatar-module_xl__qTDTF","image":"Avatar-module_image__GX2c9","initials":"Avatar-module_initials__58FHH","group":"Avatar-module_group__XW0b1","overflow":"Avatar-module_overflow__ul4Cc"};
|
|
124
126
|
|
|
125
127
|
const getInitials = (name) => {
|
|
126
128
|
const parts = name.trim().split(/\s+/);
|
|
@@ -135,43 +137,43 @@ const getInitials = (name) => {
|
|
|
135
137
|
const Avatar = ({ src, alt, initials, name, size = 'md', className = '', ...props }) => {
|
|
136
138
|
const displayInitials = initials || (name ? getInitials(name) : '?');
|
|
137
139
|
const classNames = [
|
|
138
|
-
styles$
|
|
139
|
-
styles$
|
|
140
|
+
styles$17.avatar,
|
|
141
|
+
styles$17[size],
|
|
140
142
|
className,
|
|
141
143
|
]
|
|
142
144
|
.filter(Boolean)
|
|
143
145
|
.join(' ');
|
|
144
|
-
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: src ? (jsxRuntime.jsx("img", { src: src, alt: alt || name || 'Avatar', className: styles$
|
|
146
|
+
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: src ? (jsxRuntime.jsx("img", { src: src, alt: alt || name || 'Avatar', className: styles$17.image })) : (jsxRuntime.jsx("span", { className: styles$17.initials, children: displayInitials })) }));
|
|
145
147
|
};
|
|
146
148
|
Avatar.displayName = 'Avatar';
|
|
147
149
|
const AvatarGroup = ({ max = 4, className = '', children, ...props }) => {
|
|
148
150
|
const childArray = React.Children.toArray(children);
|
|
149
151
|
const visibleChildren = childArray.slice(0, max);
|
|
150
152
|
const remainingCount = childArray.length - max;
|
|
151
|
-
const classNames = [styles$
|
|
152
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsxRuntime.jsx("div", { className: `${styles$
|
|
153
|
+
const classNames = [styles$17.group, className].filter(Boolean).join(' ');
|
|
154
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsxRuntime.jsx("div", { className: `${styles$17.avatar} ${styles$17.md} ${styles$17.overflow}`, children: jsxRuntime.jsxs("span", { className: styles$17.initials, children: ["+", remainingCount] }) }))] }));
|
|
153
155
|
};
|
|
154
156
|
AvatarGroup.displayName = 'AvatarGroup';
|
|
155
157
|
|
|
156
|
-
var styles$
|
|
158
|
+
var styles$16 = {"badge":"Badge-module_badge__lvuUg","sm":"Badge-module_sm__OTBAp","md":"Badge-module_md__YG44i","dot":"Badge-module_dot__RgcVD","default":"Badge-module_default__1ga4w","success":"Badge-module_success__jEfI9","warning":"Badge-module_warning__978mf","error":"Badge-module_error__xZJlm","info":"Badge-module_info__Xk7MM"};
|
|
157
159
|
|
|
158
160
|
/**
|
|
159
161
|
* Badge component for status indicators, labels, and tags.
|
|
160
162
|
*/
|
|
161
163
|
const Badge = ({ variant = 'default', size = 'md', dot = false, className = '', children, ...props }) => {
|
|
162
164
|
const classNames = [
|
|
163
|
-
styles$
|
|
164
|
-
styles$
|
|
165
|
-
styles$
|
|
165
|
+
styles$16.badge,
|
|
166
|
+
styles$16[variant],
|
|
167
|
+
styles$16[size],
|
|
166
168
|
className,
|
|
167
169
|
]
|
|
168
170
|
.filter(Boolean)
|
|
169
171
|
.join(' ');
|
|
170
|
-
return (jsxRuntime.jsxs("span", { className: classNames, ...props, children: [dot && jsxRuntime.jsx("span", { className: styles$
|
|
172
|
+
return (jsxRuntime.jsxs("span", { className: classNames, ...props, children: [dot && jsxRuntime.jsx("span", { className: styles$16.dot }), children] }));
|
|
171
173
|
};
|
|
172
174
|
Badge.displayName = 'Badge';
|
|
173
175
|
|
|
174
|
-
var styles$
|
|
176
|
+
var styles$15 = {"button":"Button-module_button__xDdzH","sm":"Button-module_sm__fb2AF","md":"Button-module_md__XOa6t","lg":"Button-module_lg__UN9rL","square":"Button-module_square__-o34b","primary":"Button-module_primary__jWHqR","secondary":"Button-module_secondary__30FUq","outline":"Button-module_outline__v98mS","ghost":"Button-module_ghost__XUGB1","danger":"Button-module_danger__NUxPy","fullWidth":"Button-module_fullWidth__p2otK","loading":"Button-module_loading__TsL5I","spinner":"Button-module_spinner__6bZoj","spin":"Button-module_spin__ZPDMG","icon":"Button-module_icon__21hUM","content":"Button-module_content__iVRPQ"};
|
|
175
177
|
|
|
176
178
|
/**
|
|
177
179
|
* Primary button component for user interactions.
|
|
@@ -179,21 +181,21 @@ var styles$Y = {"button":"Button-module_button__xDdzH","sm":"Button-module_sm__f
|
|
|
179
181
|
*/
|
|
180
182
|
const Button = React.forwardRef(({ variant = 'primary', size = 'md', fullWidth = false, loading = false, leftIcon, rightIcon, square = false, className = '', disabled, children, ...props }, ref) => {
|
|
181
183
|
const classNames = [
|
|
182
|
-
styles$
|
|
183
|
-
styles$
|
|
184
|
-
styles$
|
|
185
|
-
fullWidth ? styles$
|
|
186
|
-
square ? styles$
|
|
187
|
-
loading ? styles$
|
|
184
|
+
styles$15.button,
|
|
185
|
+
styles$15[variant],
|
|
186
|
+
styles$15[size],
|
|
187
|
+
fullWidth ? styles$15.fullWidth : '',
|
|
188
|
+
square ? styles$15.square : '',
|
|
189
|
+
loading ? styles$15.loading : '',
|
|
188
190
|
className,
|
|
189
191
|
]
|
|
190
192
|
.filter(Boolean)
|
|
191
193
|
.join(' ');
|
|
192
|
-
return (jsxRuntime.jsxs("button", { ref: ref, className: classNames, disabled: disabled || loading, ...props, children: [loading && (jsxRuntime.jsx("span", { className: styles$
|
|
194
|
+
return (jsxRuntime.jsxs("button", { ref: ref, className: classNames, disabled: disabled || loading, ...props, children: [loading && (jsxRuntime.jsx("span", { className: styles$15.spinner, children: jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.25" }), jsxRuntime.jsx("path", { d: "M12 2a10 10 0 0 1 10 10", strokeLinecap: "round" })] }) })), !loading && leftIcon && jsxRuntime.jsx("span", { className: styles$15.icon, children: leftIcon }), children && jsxRuntime.jsx("span", { className: styles$15.content, children: children }), !loading && rightIcon && jsxRuntime.jsx("span", { className: styles$15.icon, children: rightIcon })] }));
|
|
193
195
|
});
|
|
194
196
|
Button.displayName = 'Button';
|
|
195
197
|
|
|
196
|
-
var styles$
|
|
198
|
+
var styles$14 = {"wrapper":"Checkbox-module_wrapper__tYM-f","label":"Checkbox-module_label__x7c9f","disabled":"Checkbox-module_disabled__YtL8b","checkboxWrapper":"Checkbox-module_checkboxWrapper__ez0mi","input":"Checkbox-module_input__xBHoX","checkbox":"Checkbox-module_checkbox__zGuTf","sm":"Checkbox-module_sm__naurE","md":"Checkbox-module_md__LlE6O","lg":"Checkbox-module_lg__dMWT-","hasError":"Checkbox-module_hasError__aCefd","labelText":"Checkbox-module_labelText__7arlw","helperText":"Checkbox-module_helperText__jR4oi","errorText":"Checkbox-module_errorText__u8puP"};
|
|
197
199
|
|
|
198
200
|
const CheckIcon$1 = () => (jsxRuntime.jsx("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M1 4L3.5 6.5L9 1", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
199
201
|
const IndeterminateIcon = () => (jsxRuntime.jsx("svg", { width: "10", height: "2", viewBox: "0 0 10 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M1 1H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
@@ -206,10 +208,10 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
206
208
|
const helperId = `${checkboxId}-helper`;
|
|
207
209
|
const errorId = `${checkboxId}-error`;
|
|
208
210
|
const wrapperClasses = [
|
|
209
|
-
styles$
|
|
210
|
-
styles$
|
|
211
|
-
disabled ? styles$
|
|
212
|
-
error ? styles$
|
|
211
|
+
styles$14.wrapper,
|
|
212
|
+
styles$14[size],
|
|
213
|
+
disabled ? styles$14.disabled : '',
|
|
214
|
+
error ? styles$14.hasError : '',
|
|
213
215
|
className,
|
|
214
216
|
].filter(Boolean).join(' ');
|
|
215
217
|
// Handle indeterminate state via ref
|
|
@@ -225,13 +227,13 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
225
227
|
ref.current = node;
|
|
226
228
|
}
|
|
227
229
|
};
|
|
228
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [jsxRuntime.jsxs("label", { className: styles$
|
|
230
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [jsxRuntime.jsxs("label", { className: styles$14.label, children: [jsxRuntime.jsxs("div", { className: styles$14.checkboxWrapper, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", id: checkboxId, className: styles$14.input, disabled: disabled, checked: checked, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
229
231
|
.filter(Boolean)
|
|
230
|
-
.join(' ') || undefined, ...props }), jsxRuntime.jsx("span", { className: styles$
|
|
232
|
+
.join(' ') || undefined, ...props }), jsxRuntime.jsx("span", { className: styles$14.checkbox, children: indeterminate ? jsxRuntime.jsx(IndeterminateIcon, {}) : jsxRuntime.jsx(CheckIcon$1, {}) })] }), label && jsxRuntime.jsx("span", { className: styles$14.labelText, children: label })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$14.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$14.helperText, children: helperText }))] }));
|
|
231
233
|
});
|
|
232
234
|
Checkbox.displayName = 'Checkbox';
|
|
233
235
|
|
|
234
|
-
var styles$
|
|
236
|
+
var styles$13 = {"wrapper":"Datepicker-module_wrapper__SdezU","fullWidth":"Datepicker-module_fullWidth__CAeMt","label":"Datepicker-module_label__qUNBV","inputWrapper":"Datepicker-module_inputWrapper__FK2IJ","sm":"Datepicker-module_sm__DuDMB","md":"Datepicker-module_md__oyus3","lg":"Datepicker-module_lg__2sqBg","icon":"Datepicker-module_icon__WdaRf","input":"Datepicker-module_input__4TCcy","disabled":"Datepicker-module_disabled__W0e-a","error":"Datepicker-module_error__XPpIy","helperText":"Datepicker-module_helperText__UllZP","errorText":"Datepicker-module_errorText__lveyr"};
|
|
235
237
|
|
|
236
238
|
const CalendarIcon = () => (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: "18", rx: "2", ry: "2" }), jsxRuntime.jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), jsxRuntime.jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), jsxRuntime.jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" })] }));
|
|
237
239
|
/**
|
|
@@ -243,23 +245,23 @@ const Datepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
243
245
|
const helperId = `${inputId}-helper`;
|
|
244
246
|
const errorId = `${inputId}-error`;
|
|
245
247
|
const wrapperClasses = [
|
|
246
|
-
styles$
|
|
247
|
-
fullWidth ? styles$
|
|
248
|
+
styles$13.wrapper,
|
|
249
|
+
fullWidth ? styles$13.fullWidth : '',
|
|
248
250
|
className,
|
|
249
251
|
].filter(Boolean).join(' ');
|
|
250
252
|
const inputWrapperClasses = [
|
|
251
|
-
styles$
|
|
252
|
-
styles$
|
|
253
|
-
error ? styles$
|
|
254
|
-
disabled ? styles$
|
|
253
|
+
styles$13.inputWrapper,
|
|
254
|
+
styles$13[size],
|
|
255
|
+
error ? styles$13.error : '',
|
|
256
|
+
disabled ? styles$13.disabled : '',
|
|
255
257
|
].filter(Boolean).join(' ');
|
|
256
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$
|
|
258
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$13.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: styles$13.icon, children: jsxRuntime.jsx(CalendarIcon, {}) }), jsxRuntime.jsx("input", { ref: ref, type: "date", id: inputId, className: styles$13.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
257
259
|
.filter(Boolean)
|
|
258
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$
|
|
260
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$13.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$13.helperText, children: helperText }))] }));
|
|
259
261
|
});
|
|
260
262
|
Datepicker.displayName = 'Datepicker';
|
|
261
263
|
|
|
262
|
-
var styles$
|
|
264
|
+
var styles$12 = {"wrapper":"Input-module_wrapper__-8ija","fullWidth":"Input-module_fullWidth__xXOvN","label":"Input-module_label__t4LH-","inputWrapper":"Input-module_inputWrapper__U4EEd","error":"Input-module_error__fT9Sb","disabled":"Input-module_disabled__3tnIE","sm":"Input-module_sm__lGHP-","md":"Input-module_md__pReoW","lg":"Input-module_lg__iqqov","input":"Input-module_input__PeHY6","icon":"Input-module_icon__jkJiF","textarea":"Input-module_textarea__ZgdBz","helperText":"Input-module_helperText__eKsC8","errorText":"Input-module_errorText__xoiKP"};
|
|
263
265
|
|
|
264
266
|
/**
|
|
265
267
|
* Input component for text entry.
|
|
@@ -267,45 +269,45 @@ var styles$V = {"wrapper":"Input-module_wrapper__-8ija","fullWidth":"Input-modul
|
|
|
267
269
|
const Input = React.forwardRef(({ size = 'md', label, helperText, error, leftIcon, rightIcon, fullWidth = false, className = '', id, disabled, ...props }, ref) => {
|
|
268
270
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
269
271
|
const wrapperClasses = [
|
|
270
|
-
styles$
|
|
271
|
-
fullWidth ? styles$
|
|
272
|
+
styles$12.wrapper,
|
|
273
|
+
fullWidth ? styles$12.fullWidth : '',
|
|
272
274
|
className,
|
|
273
275
|
]
|
|
274
276
|
.filter(Boolean)
|
|
275
277
|
.join(' ');
|
|
276
278
|
const inputWrapperClasses = [
|
|
277
|
-
styles$
|
|
278
|
-
styles$
|
|
279
|
-
error ? styles$
|
|
280
|
-
disabled ? styles$
|
|
279
|
+
styles$12.inputWrapper,
|
|
280
|
+
styles$12[size],
|
|
281
|
+
error ? styles$12.error : '',
|
|
282
|
+
disabled ? styles$12.disabled : '',
|
|
281
283
|
]
|
|
282
284
|
.filter(Boolean)
|
|
283
285
|
.join(' ');
|
|
284
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$
|
|
286
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$12.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: styles$12.icon, children: leftIcon }), jsxRuntime.jsx("input", { ref: ref, id: inputId, className: styles$12.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsxRuntime.jsx("span", { className: styles$12.icon, children: rightIcon })] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$12.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${inputId}-helper`, className: styles$12.helperText, children: helperText }))] }));
|
|
285
287
|
});
|
|
286
288
|
Input.displayName = 'Input';
|
|
287
289
|
const Textarea = React.forwardRef(({ size = 'md', label, helperText, error, fullWidth = false, className = '', id, disabled, rows = 4, ...props }, ref) => {
|
|
288
290
|
const textareaId = id || `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
289
291
|
const wrapperClasses = [
|
|
290
|
-
styles$
|
|
291
|
-
fullWidth ? styles$
|
|
292
|
+
styles$12.wrapper,
|
|
293
|
+
fullWidth ? styles$12.fullWidth : '',
|
|
292
294
|
className,
|
|
293
295
|
]
|
|
294
296
|
.filter(Boolean)
|
|
295
297
|
.join(' ');
|
|
296
298
|
const textareaClasses = [
|
|
297
|
-
styles$
|
|
298
|
-
styles$
|
|
299
|
-
error ? styles$
|
|
300
|
-
disabled ? styles$
|
|
299
|
+
styles$12.textarea,
|
|
300
|
+
styles$12[size],
|
|
301
|
+
error ? styles$12.error : '',
|
|
302
|
+
disabled ? styles$12.disabled : '',
|
|
301
303
|
]
|
|
302
304
|
.filter(Boolean)
|
|
303
305
|
.join(' ');
|
|
304
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: textareaId, className: styles$
|
|
306
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: textareaId, className: styles$12.label, children: label })), jsxRuntime.jsx("textarea", { ref: ref, id: textareaId, className: textareaClasses, disabled: disabled, rows: rows, "aria-invalid": !!error, "aria-describedby": error ? `${textareaId}-error` : helperText ? `${textareaId}-helper` : undefined, ...props }), error && (jsxRuntime.jsx("span", { id: `${textareaId}-error`, className: styles$12.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${textareaId}-helper`, className: styles$12.helperText, children: helperText }))] }));
|
|
305
307
|
});
|
|
306
308
|
Textarea.displayName = 'Textarea';
|
|
307
309
|
|
|
308
|
-
var styles$
|
|
310
|
+
var styles$11 = {"metric":"Metric-module_metric__LZ8D-","dark":"Metric-module_dark__FKdvj","clickable":"Metric-module_clickable__c3-pM","content":"Metric-module_content__YYpBG","valueRow":"Metric-module_valueRow__JpgYR","valueContainer":"Metric-module_valueContainer__CzjZ1","prefix":"Metric-module_prefix__Agpzq","value":"Metric-module_value__zspnf","suffix":"Metric-module_suffix__qvCMJ","warningIcon":"Metric-module_warningIcon__F-Ol5","label":"Metric-module_label__ydcti"};
|
|
309
311
|
|
|
310
312
|
const WarningIcon = () => (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M12 2L1 21h22L12 2zm0 3.5L19.5 19H4.5L12 5.5zM11 10v4h2v-4h-2zm0 6v2h2v-2h-2z" }) }));
|
|
311
313
|
/**
|
|
@@ -315,15 +317,15 @@ const WarningIcon = () => (jsxRuntime.jsx("svg", { width: "24", height: "24", vi
|
|
|
315
317
|
const Metric = ({ value, label, prefix, suffix, dark = false, onClick, className = '', warning = false, }) => {
|
|
316
318
|
const displayValue = value !== undefined && !isNaN(parseFloat(String(value))) ? value : 0;
|
|
317
319
|
return (jsxRuntime.jsx("div", { className: `
|
|
318
|
-
${styles$
|
|
319
|
-
${dark ? styles$
|
|
320
|
-
${onClick ? styles$
|
|
320
|
+
${styles$11.metric}
|
|
321
|
+
${dark ? styles$11.dark : ''}
|
|
322
|
+
${onClick ? styles$11.clickable : ''}
|
|
321
323
|
${className}
|
|
322
|
-
`, onClick: onClick, children: value !== undefined && (jsxRuntime.jsxs("div", { className: styles$
|
|
324
|
+
`, onClick: onClick, children: value !== undefined && (jsxRuntime.jsxs("div", { className: styles$11.content, children: [jsxRuntime.jsxs("div", { className: styles$11.valueRow, children: [jsxRuntime.jsxs("div", { className: styles$11.valueContainer, children: [prefix && jsxRuntime.jsx("span", { className: styles$11.prefix, children: prefix }), jsxRuntime.jsx("span", { className: styles$11.value, children: displayValue }), suffix && jsxRuntime.jsx("span", { className: styles$11.suffix, children: suffix })] }), warning && (jsxRuntime.jsx("div", { className: styles$11.warningIcon, children: jsxRuntime.jsx(WarningIcon, {}) }))] }), jsxRuntime.jsx("div", { className: styles$11.label, children: label })] })) }));
|
|
323
325
|
};
|
|
324
326
|
Metric.displayName = 'Metric';
|
|
325
327
|
|
|
326
|
-
var styles$
|
|
328
|
+
var styles$10 = {"wrapper":"Select-module_wrapper__UN2Bo","fullWidth":"Select-module_fullWidth__GgV-D","label":"Select-module_label__aSRVE","selectWrapper":"Select-module_selectWrapper__OCGYf","sm":"Select-module_sm__oTHGX","md":"Select-module_md__VSZQg","lg":"Select-module_lg__nknhY","select":"Select-module_select__DY-Id","hasLeftIcon":"Select-module_hasLeftIcon__ZrReQ","leftIcon":"Select-module_leftIcon__nBU1-","chevron":"Select-module_chevron__1MAEQ","disabled":"Select-module_disabled__0GOXE","error":"Select-module_error__Yijk5","helperText":"Select-module_helperText__rHrqP","errorText":"Select-module_errorText__1kM2R"};
|
|
327
329
|
|
|
328
330
|
const ChevronDownIcon = () => (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
329
331
|
/**
|
|
@@ -335,16 +337,16 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
335
337
|
const helperId = `${selectId}-helper`;
|
|
336
338
|
const errorId = `${selectId}-error`;
|
|
337
339
|
const wrapperClasses = [
|
|
338
|
-
styles$
|
|
339
|
-
fullWidth ? styles$
|
|
340
|
+
styles$10.wrapper,
|
|
341
|
+
fullWidth ? styles$10.fullWidth : '',
|
|
340
342
|
className,
|
|
341
343
|
].filter(Boolean).join(' ');
|
|
342
344
|
const selectWrapperClasses = [
|
|
343
|
-
styles$
|
|
344
|
-
styles$
|
|
345
|
-
error ? styles$
|
|
346
|
-
disabled ? styles$
|
|
347
|
-
leftIcon ? styles$
|
|
345
|
+
styles$10.selectWrapper,
|
|
346
|
+
styles$10[size],
|
|
347
|
+
error ? styles$10.error : '',
|
|
348
|
+
disabled ? styles$10.disabled : '',
|
|
349
|
+
leftIcon ? styles$10.hasLeftIcon : '',
|
|
348
350
|
].filter(Boolean).join(' ');
|
|
349
351
|
const renderOptions = () => {
|
|
350
352
|
// Render grouped options
|
|
@@ -357,19 +359,19 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
357
359
|
}
|
|
358
360
|
return null;
|
|
359
361
|
};
|
|
360
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: selectId, className: styles$
|
|
362
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: selectId, className: styles$10.label, children: label })), jsxRuntime.jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: styles$10.leftIcon, children: leftIcon }), jsxRuntime.jsxs("select", { ref: ref, id: selectId, className: styles$10.select, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
361
363
|
.filter(Boolean)
|
|
362
|
-
.join(' ') || undefined, ...props, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsxRuntime.jsx("span", { className: styles$
|
|
364
|
+
.join(' ') || undefined, ...props, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsxRuntime.jsx("span", { className: styles$10.chevron, children: jsxRuntime.jsx(ChevronDownIcon, {}) })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$10.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$10.helperText, children: helperText }))] }));
|
|
363
365
|
});
|
|
364
366
|
Select.displayName = 'Select';
|
|
365
367
|
|
|
366
|
-
var styles
|
|
368
|
+
var styles$$ = {"spinner":"Spinner-module_spinner__OZwmB","svg":"Spinner-module_svg__Tusqk","spin":"Spinner-module_spin__YAPc9","track":"Spinner-module_track__NxLfV","indicator":"Spinner-module_indicator__gSUxF","xs":"Spinner-module_xs__4-WEg","sm":"Spinner-module_sm__enoDn","md":"Spinner-module_md__6axf9","lg":"Spinner-module_lg__EvJyC","xl":"Spinner-module_xl__yIXoK","srOnly":"Spinner-module_srOnly__WnZYf"};
|
|
367
369
|
|
|
368
370
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
369
|
-
return (jsxRuntime.jsxs("span", { className: `${styles
|
|
371
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$$.spinner} ${styles$$[size]} ${className}`, role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxRuntime.jsxs("svg", { className: styles$$.svg, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: styles$$.track, cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.jsx("path", { className: styles$$.indicator, fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsxRuntime.jsx("span", { className: styles$$.srOnly, children: label })] }));
|
|
370
372
|
};
|
|
371
373
|
|
|
372
|
-
var styles$
|
|
374
|
+
var styles$_ = {"badge":"StatusBadge-module_badge__-BwEk","ticketed":"StatusBadge-module_ticketed__AJVZM","itinerary":"StatusBadge-module_itinerary__yRFNy","not-ticketed":"StatusBadge-module_not-ticketed__76GXg","submitted":"StatusBadge-module_submitted__QW0LL","pending":"StatusBadge-module_pending__FpMYC","cancelled":"StatusBadge-module_cancelled__XRz4S"};
|
|
373
375
|
|
|
374
376
|
const statusLabels = {
|
|
375
377
|
ticketed: 'Ticketed',
|
|
@@ -381,20 +383,20 @@ const statusLabels = {
|
|
|
381
383
|
};
|
|
382
384
|
const StatusBadge = ({ status, label, className, }) => {
|
|
383
385
|
const displayLabel = label || statusLabels[status] || status;
|
|
384
|
-
return (jsxRuntime.jsx("span", { className: `${styles$
|
|
386
|
+
return (jsxRuntime.jsx("span", { className: `${styles$_.badge} ${styles$_[status]} ${className || ''}`, "data-status": status, children: displayLabel }));
|
|
385
387
|
};
|
|
386
388
|
|
|
387
|
-
var styles$
|
|
389
|
+
var styles$Z = {"tag":"Tag-module_tag__uQVQa","content":"Tag-module_content__Z5bK9","sm":"Tag-module_sm__DvKJV","md":"Tag-module_md__KTo2m","lg":"Tag-module_lg__8xhWB","default":"Tag-module_default__5-uQz","primary":"Tag-module_primary__lwwYl","success":"Tag-module_success__kl3II","warning":"Tag-module_warning__peZRm","error":"Tag-module_error__6xzkl","info":"Tag-module_info__eKYiV","clickable":"Tag-module_clickable__TyiNK","removeButton":"Tag-module_removeButton__peMwo","removeIcon":"Tag-module_removeIcon__dQyJZ"};
|
|
388
390
|
|
|
389
391
|
const Tag = ({ children, variant = 'default', size = 'md', removable = false, onRemove, onClick, className = '', style, }) => {
|
|
390
392
|
const isClickable = Boolean(onClick);
|
|
391
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
393
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$Z.tag} ${styles$Z[variant]} ${styles$Z[size]} ${isClickable ? styles$Z.clickable : ''} ${className}`, onClick: onClick, style: style, role: isClickable ? 'button' : undefined, tabIndex: isClickable ? 0 : undefined, children: [jsxRuntime.jsx("span", { className: styles$Z.content, children: children }), removable && (jsxRuntime.jsx("button", { type: "button", className: styles$Z.removeButton, onClick: (e) => {
|
|
392
394
|
e.stopPropagation();
|
|
393
395
|
onRemove?.();
|
|
394
|
-
}, "aria-label": "Remove", children: jsxRuntime.jsx("svg", { className: styles$
|
|
396
|
+
}, "aria-label": "Remove", children: jsxRuntime.jsx("svg", { className: styles$Z.removeIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] }));
|
|
395
397
|
};
|
|
396
398
|
|
|
397
|
-
var styles$
|
|
399
|
+
var styles$Y = {"wrapper":"Timepicker-module_wrapper__pPrwn","fullWidth":"Timepicker-module_fullWidth__de3hO","label":"Timepicker-module_label__5RDrm","inputWrapper":"Timepicker-module_inputWrapper__-E5pk","sm":"Timepicker-module_sm__sWJu2","md":"Timepicker-module_md__TfpGX","lg":"Timepicker-module_lg__xSlw-","icon":"Timepicker-module_icon__NuPk4","input":"Timepicker-module_input__NxTmR","disabled":"Timepicker-module_disabled__lyxzF","error":"Timepicker-module_error__TOMK7","helperText":"Timepicker-module_helperText__MmcqS","errorText":"Timepicker-module_errorText__pXdnE"};
|
|
398
400
|
|
|
399
401
|
const ClockIcon = () => (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: "10" }), jsxRuntime.jsx("polyline", { points: "12 6 12 12 16 14" })] }));
|
|
400
402
|
/**
|
|
@@ -406,34 +408,34 @@ const Timepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
406
408
|
const helperId = `${inputId}-helper`;
|
|
407
409
|
const errorId = `${inputId}-error`;
|
|
408
410
|
const wrapperClasses = [
|
|
409
|
-
styles$
|
|
410
|
-
fullWidth ? styles$
|
|
411
|
+
styles$Y.wrapper,
|
|
412
|
+
fullWidth ? styles$Y.fullWidth : '',
|
|
411
413
|
className,
|
|
412
414
|
].filter(Boolean).join(' ');
|
|
413
415
|
const inputWrapperClasses = [
|
|
414
|
-
styles$
|
|
415
|
-
styles$
|
|
416
|
-
error ? styles$
|
|
417
|
-
disabled ? styles$
|
|
416
|
+
styles$Y.inputWrapper,
|
|
417
|
+
styles$Y[size],
|
|
418
|
+
error ? styles$Y.error : '',
|
|
419
|
+
disabled ? styles$Y.disabled : '',
|
|
418
420
|
].filter(Boolean).join(' ');
|
|
419
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$
|
|
421
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$Y.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: styles$Y.icon, children: jsxRuntime.jsx(ClockIcon, {}) }), jsxRuntime.jsx("input", { ref: ref, type: "time", id: inputId, className: styles$Y.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
420
422
|
.filter(Boolean)
|
|
421
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$
|
|
423
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$Y.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$Y.helperText, children: helperText }))] }));
|
|
422
424
|
});
|
|
423
425
|
Timepicker.displayName = 'Timepicker';
|
|
424
426
|
|
|
425
|
-
var styles$
|
|
427
|
+
var styles$X = {"title":"Title-module_title__mSSqn","light":"Title-module_light__7mlh-","normal":"Title-module_normal__ZYrS4","medium":"Title-module_medium__UK-Bj","semibold":"Title-module_semibold__07lTs","bold":"Title-module_bold__-oWUS"};
|
|
426
428
|
|
|
427
429
|
/**
|
|
428
430
|
* Title component for page headings.
|
|
429
431
|
* Large, prominent text for page titles.
|
|
430
432
|
*/
|
|
431
433
|
const Title = ({ children, weight = 'light', className = '', }) => {
|
|
432
|
-
return (jsxRuntime.jsx("h1", { className: `${styles$
|
|
434
|
+
return (jsxRuntime.jsx("h1", { className: `${styles$X.title} ${styles$X[weight]} ${className}`, children: children }));
|
|
433
435
|
};
|
|
434
436
|
Title.displayName = 'Title';
|
|
435
437
|
|
|
436
|
-
var styles$
|
|
438
|
+
var styles$W = {"toggle":"Toggle-module_toggle__lRFvk","checked":"Toggle-module_checked__duOWU","disabled":"Toggle-module_disabled__DV2FB","thumb":"Toggle-module_thumb__ehIbb","sm":"Toggle-module_sm__Gs9bK","md":"Toggle-module_md__hTNCY","lg":"Toggle-module_lg__DpHtS","wrapper":"Toggle-module_wrapper__-Bvff","wrapperDisabled":"Toggle-module_wrapperDisabled__ZSCvM","label":"Toggle-module_label__GeuIf"};
|
|
437
439
|
|
|
438
440
|
const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, labelPosition = 'right', className = '', 'aria-label': ariaLabel, }) => {
|
|
439
441
|
const handleClick = () => {
|
|
@@ -447,14 +449,14 @@ const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, label
|
|
|
447
449
|
onChange?.(!checked);
|
|
448
450
|
}
|
|
449
451
|
};
|
|
450
|
-
const toggleElement = (jsxRuntime.jsx("div", { className: `${styles$
|
|
452
|
+
const toggleElement = (jsxRuntime.jsx("div", { className: `${styles$W.toggle} ${styles$W[size]} ${checked ? styles$W.checked : ''} ${disabled ? styles$W.disabled : ''} ${className}`, onClick: handleClick, onKeyDown: handleKeyDown, role: "switch", "aria-checked": checked, "aria-disabled": disabled, "aria-label": ariaLabel || label, tabIndex: disabled ? -1 : 0, children: jsxRuntime.jsx("span", { className: styles$W.thumb }) }));
|
|
451
453
|
if (label) {
|
|
452
|
-
return (jsxRuntime.jsxs("label", { className: `${styles$
|
|
454
|
+
return (jsxRuntime.jsxs("label", { className: `${styles$W.wrapper} ${disabled ? styles$W.wrapperDisabled : ''}`, children: [labelPosition === 'left' && jsxRuntime.jsx("span", { className: styles$W.label, children: label }), toggleElement, labelPosition === 'right' && jsxRuntime.jsx("span", { className: styles$W.label, children: label })] }));
|
|
453
455
|
}
|
|
454
456
|
return toggleElement;
|
|
455
457
|
};
|
|
456
458
|
|
|
457
|
-
var styles$
|
|
459
|
+
var styles$V = {"wrapper":"Tooltip-module_wrapper__9SUwl","tooltip":"Tooltip-module_tooltip__KQ7km","fadeIn":"Tooltip-module_fadeIn__dL8S5","content":"Tooltip-module_content__kO8yx","dark":"Tooltip-module_dark__Y66ss","light":"Tooltip-module_light__mItfR","top":"Tooltip-module_top__1jrIn","bottom":"Tooltip-module_bottom__99YBc","left":"Tooltip-module_left__ZNd1H","right":"Tooltip-module_right__r0j5Q","arrow":"Tooltip-module_arrow__qcKWx","arrowTop":"Tooltip-module_arrowTop__k13dt","arrowBottom":"Tooltip-module_arrowBottom__FP-w2","arrowLeft":"Tooltip-module_arrowLeft__7T1uO","arrowRight":"Tooltip-module_arrowRight__FbPdB"};
|
|
458
460
|
|
|
459
461
|
const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay = 200, disabled = false, className = '', }) => {
|
|
460
462
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
@@ -518,10 +520,10 @@ const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay
|
|
|
518
520
|
}
|
|
519
521
|
};
|
|
520
522
|
}, []);
|
|
521
|
-
return (jsxRuntime.jsxs("div", { ref: triggerRef, className: `${styles$
|
|
523
|
+
return (jsxRuntime.jsxs("div", { ref: triggerRef, className: `${styles$V.wrapper} ${className}`, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, children: [children, isVisible && content && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: `${styles$V.tooltip} ${styles$V[actualPosition]} ${styles$V[variant]}`, role: "tooltip", children: [jsxRuntime.jsx("div", { className: styles$V.content, children: content }), jsxRuntime.jsx("div", { className: `${styles$V.arrow} ${styles$V[`arrow${actualPosition.charAt(0).toUpperCase()}${actualPosition.slice(1)}`]}` })] }))] }));
|
|
522
524
|
};
|
|
523
525
|
|
|
524
|
-
var styles$
|
|
526
|
+
var styles$U = {"service":"TravelServiceIcon-module_service__-4EZb","code":"TravelServiceIcon-module_code__vElzI","multi":"TravelServiceIcon-module_multi__nqZLM","multiIndicator":"TravelServiceIcon-module_multiIndicator__KJF1L"};
|
|
525
527
|
|
|
526
528
|
// Airline brand colors
|
|
527
529
|
const vendorColors = {
|
|
@@ -561,16 +563,16 @@ const TravelServiceIcon = ({ type, vendor, mode = 'icon', size = 28, multi = fal
|
|
|
561
563
|
const colors = mode === 'icon' && vendorColors[vendorKey]
|
|
562
564
|
? vendorColors[vendorKey]
|
|
563
565
|
: typeColors$1[type] || typeColors$1.U;
|
|
564
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
566
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$U.service} ${multi ? styles$U.multi : ''} ${className || ''}`, style: {
|
|
565
567
|
width: size,
|
|
566
568
|
height: size,
|
|
567
569
|
backgroundColor: colors.bg,
|
|
568
570
|
color: colors.fg,
|
|
569
571
|
fontSize: size * 0.4,
|
|
570
|
-
}, title: vendor ? `${vendor} (${type})` : type, children: [mode === 'code' && vendor ? (jsxRuntime.jsx("span", { className: styles$
|
|
572
|
+
}, title: vendor ? `${vendor} (${type})` : type, children: [mode === 'code' && vendor ? (jsxRuntime.jsx("span", { className: styles$U.code, children: vendor })) : (jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: size * 0.55, height: size * 0.55, fill: "currentColor", children: typeIcons$1[type] || typeIcons$1.U })), multi && jsxRuntime.jsx("span", { className: styles$U.multiIndicator, children: "+" })] }));
|
|
571
573
|
};
|
|
572
574
|
|
|
573
|
-
var styles$
|
|
575
|
+
var styles$T = {"icon":"TypeIcon-module_icon__WUL-x"};
|
|
574
576
|
|
|
575
577
|
const typeLabels = {
|
|
576
578
|
A: 'Air',
|
|
@@ -603,7 +605,7 @@ const typeIcons = {
|
|
|
603
605
|
const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
604
606
|
const colors = typeColors[type] || typeColors.U;
|
|
605
607
|
const label = typeLabels[type] || 'Unknown';
|
|
606
|
-
return (jsxRuntime.jsx("span", { className: `${styles$
|
|
608
|
+
return (jsxRuntime.jsx("span", { className: `${styles$T.icon} ${className || ''}`, style: {
|
|
607
609
|
width: size,
|
|
608
610
|
height: size,
|
|
609
611
|
backgroundColor: colors.bg,
|
|
@@ -611,7 +613,7 @@ const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
|
611
613
|
}, title: showTooltip ? label : undefined, "aria-label": label, children: jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: size * 0.6, height: size * 0.6, fill: "currentColor", children: typeIcons[type] || typeIcons.U }) }));
|
|
612
614
|
};
|
|
613
615
|
|
|
614
|
-
var styles$
|
|
616
|
+
var styles$S = {"accordion":"Accordion-module_accordion__I3hmS","headerContainer":"Accordion-module_headerContainer__QhfHx","toggle":"Accordion-module_toggle__rlK5n","caret":"Accordion-module_caret__iZAh1","open":"Accordion-module_open__5jX-w","header":"Accordion-module_header__gzKrn","body":"Accordion-module_body__xTgL6","hidden":"Accordion-module_hidden__wcCWd","visible":"Accordion-module_visible__116om","timeline":"Accordion-module_timeline__ikrdK","line":"Accordion-module_line__buDP1","endCaret":"Accordion-module_endCaret__OXpPJ","content":"Accordion-module_content__aL8Vn"};
|
|
615
617
|
|
|
616
618
|
const CaretIcon = ({ className }) => (jsxRuntime.jsx("svg", { className: className, width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) }));
|
|
617
619
|
/**
|
|
@@ -629,11 +631,34 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
629
631
|
}
|
|
630
632
|
onOpenChange?.(newOpen);
|
|
631
633
|
};
|
|
632
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
634
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$S.accordion} ${className || ''}`, children: [jsxRuntime.jsxs("div", { className: styles$S.headerContainer, children: [jsxRuntime.jsx("button", { type: "button", className: styles$S.toggle, onClick: handleToggle, "aria-expanded": isOpen, children: jsxRuntime.jsx(CaretIcon, { className: `${styles$S.caret} ${isOpen ? styles$S.open : ''}` }) }), jsxRuntime.jsx("div", { className: styles$S.header, children: header })] }), jsxRuntime.jsxs("div", { className: `${styles$S.body} ${isOpen ? styles$S.visible : styles$S.hidden}`, "aria-hidden": !isOpen, children: [showTimeline && (jsxRuntime.jsxs("div", { className: styles$S.timeline, children: [jsxRuntime.jsx("div", { className: styles$S.line }), jsxRuntime.jsx(CaretIcon, { className: styles$S.endCaret })] })), jsxRuntime.jsx("div", { className: styles$S.content, children: children })] })] }));
|
|
633
635
|
};
|
|
634
636
|
Accordion.displayName = 'Accordion';
|
|
635
637
|
|
|
636
|
-
var styles$
|
|
638
|
+
var styles$R = {"selector":"CalendarSelectors-module_selector__1nDos","item":"CalendarSelectors-module_item__CoR5s","active":"CalendarSelectors-module_active__u4w6Z","sm":"CalendarSelectors-module_sm__ju5t-","withLabel":"CalendarSelectors-module_withLabel__Jr9Re","md":"CalendarSelectors-module_md__a-U38","lg":"CalendarSelectors-module_lg__WHvAF","iconOnly":"CalendarSelectors-module_iconOnly__cAjyD"};
|
|
639
|
+
|
|
640
|
+
const ListIcon = () => (jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: [jsxRuntime.jsx("line", { x1: "8", y1: "6", x2: "21", y2: "6" }), jsxRuntime.jsx("line", { x1: "8", y1: "12", x2: "21", y2: "12" }), jsxRuntime.jsx("line", { x1: "8", y1: "18", x2: "21", y2: "18" }), jsxRuntime.jsx("circle", { cx: "3", cy: "6", r: "1", fill: "currentColor", stroke: "none" }), jsxRuntime.jsx("circle", { cx: "3", cy: "12", r: "1", fill: "currentColor", stroke: "none" }), jsxRuntime.jsx("circle", { cx: "3", cy: "18", r: "1", fill: "currentColor", stroke: "none" })] }));
|
|
641
|
+
const SegmentedSelector = ({ options, value, onChange, disabled = false, size = 'md', className = '', ariaLabel = 'View options', }) => (jsxRuntime.jsx("div", { className: [styles$R.selector, className].filter(Boolean).join(' '), role: "group", "aria-label": ariaLabel, children: options.map((option) => {
|
|
642
|
+
const active = option.id === value;
|
|
643
|
+
const accessibleName = option.alt ?? option.label ?? option.id;
|
|
644
|
+
return (jsxRuntime.jsxs("button", { type: "button", title: accessibleName, "aria-label": accessibleName, "aria-pressed": active, disabled: disabled, className: [
|
|
645
|
+
styles$R.item,
|
|
646
|
+
styles$R[size],
|
|
647
|
+
option.label ? styles$R.withLabel : styles$R.iconOnly,
|
|
648
|
+
active ? styles$R.active : '',
|
|
649
|
+
].filter(Boolean).join(' '), onClick: () => onChange?.(option.id), children: [option.icon, option.label && jsxRuntime.jsx("span", { children: option.label })] }, option.id));
|
|
650
|
+
}) }));
|
|
651
|
+
const CalendarViewSelector = ({ value, onChange, ...props }) => (jsxRuntime.jsx(SegmentedSelector, { ...props, ariaLabel: "Calendar view", value: value, onChange: (nextValue) => onChange?.(nextValue), options: [
|
|
652
|
+
{ id: 'calendar', alt: 'Calendar', icon: jsxRuntime.jsx(CalendarIcon$1, { size: 20 }) },
|
|
653
|
+
{ id: 'card', alt: 'Card', icon: jsxRuntime.jsx(GridIcon, { size: 20 }) },
|
|
654
|
+
{ id: 'list', alt: 'List', icon: jsxRuntime.jsx(ListIcon, {}) },
|
|
655
|
+
] }));
|
|
656
|
+
const CalendarTypeSelector = ({ value, onChange, ...props }) => (jsxRuntime.jsx(SegmentedSelector, { ...props, ariaLabel: "Calendar item type", value: value, onChange: (nextValue) => onChange?.(nextValue), options: [
|
|
657
|
+
{ id: 'trips', label: 'Trips' },
|
|
658
|
+
{ id: 'due_dates', label: 'Due Dates' },
|
|
659
|
+
] }));
|
|
660
|
+
|
|
661
|
+
var styles$Q = {"dropdown":"Dropdown-module_dropdown__K4-yz","arrow":"Dropdown-module_arrow__2Xuwf","arrowOpen":"Dropdown-module_arrowOpen__5g2iY","menu":"Dropdown-module_menu__dCgm8","menuOpen":"Dropdown-module_menuOpen__-IXFR","left":"Dropdown-module_left__tnNcS","center":"Dropdown-module_center__s9zhj","right":"Dropdown-module_right__s71gz","item":"Dropdown-module_item__R008o","itemDisabled":"Dropdown-module_itemDisabled__XIuNm","itemIcon":"Dropdown-module_itemIcon__DbSnD"};
|
|
637
662
|
|
|
638
663
|
const Dropdown = ({ label, children, alignment = 'left', width, className = '', disabled = false, }) => {
|
|
639
664
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -656,14 +681,14 @@ const Dropdown = ({ label, children, alignment = 'left', width, className = '',
|
|
|
656
681
|
setIsOpen(false);
|
|
657
682
|
}
|
|
658
683
|
};
|
|
659
|
-
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
684
|
+
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$Q.dropdown} ${className}`, onKeyDown: handleKeyDown, children: [jsxRuntime.jsxs(Button, { variant: "secondary", onClick: () => !disabled && setIsOpen(!isOpen), disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "true", children: [label, jsxRuntime.jsx("svg", { className: `${styles$Q.arrow} ${isOpen ? styles$Q.arrowOpen : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })] }), jsxRuntime.jsx("div", { className: `${styles$Q.menu} ${styles$Q[alignment]} ${isOpen ? styles$Q.menuOpen : ''}`, style: width ? { minWidth: `${width}px` } : undefined, role: "menu", children: children })] }));
|
|
660
685
|
};
|
|
661
686
|
const DropdownItem = ({ children, onClick, disabled = false, icon, className = '', }) => {
|
|
662
|
-
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$
|
|
687
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$Q.item} ${disabled ? styles$Q.itemDisabled : ''} ${className}`, onClick: onClick, disabled: disabled, role: "menuitem", children: [icon && jsxRuntime.jsx("span", { className: styles$Q.itemIcon, children: icon }), children] }));
|
|
663
688
|
};
|
|
664
689
|
Dropdown.Item = DropdownItem;
|
|
665
690
|
|
|
666
|
-
var styles$
|
|
691
|
+
var styles$P = {"wrapper":"FilterChip-module_wrapper__YDRSW","chip":"FilterChip-module_chip__pF7K5","open":"FilterChip-module_open__EYBp7","active":"FilterChip-module_active__JEkku","label":"FilterChip-module_label__tRr-y","value":"FilterChip-module_value__0EcVu","chevron":"FilterChip-module_chevron__kh13z","rotated":"FilterChip-module_rotated__U-FzI","dropdown":"FilterChip-module_dropdown__w3ytW","infoMessage":"FilterChip-module_infoMessage__0TzcA","searchWrapper":"FilterChip-module_searchWrapper__VHOSK","searchIcon":"FilterChip-module_searchIcon__jJ2K-","searchInput":"FilterChip-module_searchInput__FqwvR","optionsList":"FilterChip-module_optionsList__P0dgd","option":"FilterChip-module_option__DMuqM","selected":"FilterChip-module_selected__ltt9Y","noResults":"FilterChip-module_noResults__QGNao"};
|
|
667
692
|
|
|
668
693
|
const FilterChip = ({ label, value, options, onChange, searchable = false, searchPlaceholder = 'Search...', infoMessage, className, }) => {
|
|
669
694
|
const [open, setOpen] = React.useState(false);
|
|
@@ -700,13 +725,13 @@ const FilterChip = ({ label, value, options, onChange, searchable = false, searc
|
|
|
700
725
|
const selectedOption = options.find(opt => opt.value === value);
|
|
701
726
|
const displayValue = selectedOption?.label || value;
|
|
702
727
|
const isDefault = value === options[0]?.value;
|
|
703
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: `${styles$
|
|
728
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: `${styles$P.wrapper} ${className || ''}`, children: [jsxRuntime.jsxs("button", { type: "button", className: `${styles$P.chip} ${open ? styles$P.open : ''} ${!isDefault ? styles$P.active : ''}`, onClick: () => setOpen(!open), "aria-haspopup": "listbox", "aria-expanded": open, children: [jsxRuntime.jsxs("span", { className: styles$P.label, children: [label, ":"] }), jsxRuntime.jsx("span", { className: styles$P.value, children: displayValue }), jsxRuntime.jsx("svg", { className: `${styles$P.chevron} ${open ? styles$P.rotated : ''}`, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" }) })] }), open && (jsxRuntime.jsxs("div", { className: styles$P.dropdown, role: "listbox", children: [infoMessage && (jsxRuntime.jsxs("div", { className: styles$P.infoMessage, children: [jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }) }), jsxRuntime.jsx("span", { children: infoMessage })] })), searchable && (jsxRuntime.jsxs("div", { className: styles$P.searchWrapper, children: [jsxRuntime.jsxs("svg", { className: styles$P.searchIcon, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }), jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsxRuntime.jsx("input", { type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: searchPlaceholder, className: styles$P.searchInput, autoFocus: true })] })), jsxRuntime.jsxs("div", { className: styles$P.optionsList, children: [filteredOptions.map((option) => (jsxRuntime.jsx("button", { type: "button", role: "option", "aria-selected": option.value === value, className: `${styles$P.option} ${option.value === value ? styles$P.selected : ''}`, onClick: () => {
|
|
704
729
|
onChange(option.value);
|
|
705
730
|
setOpen(false);
|
|
706
|
-
}, children: option.label }, option.value))), filteredOptions.length === 0 && (jsxRuntime.jsx("div", { className: styles$
|
|
731
|
+
}, children: option.label }, option.value))), filteredOptions.length === 0 && (jsxRuntime.jsx("div", { className: styles$P.noResults, children: "No results found" }))] })] }))] }));
|
|
707
732
|
};
|
|
708
733
|
|
|
709
|
-
var styles$
|
|
734
|
+
var styles$O = {"formField":"FormField-module_formField__VhLhK","label":"FormField-module_label__CNCs6","required":"FormField-module_required__HkPQf","inputElement":"FormField-module_inputElement__9uvGR","inputError":"FormField-module_inputError__xD7fk","helperText":"FormField-module_helperText__D99kd","errorText":"FormField-module_errorText__8mXAJ","visuallyHidden":"FormField-module_visuallyHidden__YQc7S"};
|
|
710
735
|
|
|
711
736
|
const FormField = React.forwardRef(({ label, helperText, error, required = false, hideLabel = false, className, as = 'input', inputProps, textareaProps, children, }, ref) => {
|
|
712
737
|
const generatedId = React.useId();
|
|
@@ -725,15 +750,15 @@ const FormField = React.forwardRef(({ label, helperText, error, required = false
|
|
|
725
750
|
return children;
|
|
726
751
|
}
|
|
727
752
|
if (as === 'textarea') {
|
|
728
|
-
return (jsxRuntime.jsx(Textarea, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...textareaProps, className: `${styles$
|
|
753
|
+
return (jsxRuntime.jsx(Textarea, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...textareaProps, className: `${styles$O.inputElement} ${hasError ? styles$O.inputError : ''} ${textareaProps?.className || ''}` }));
|
|
729
754
|
}
|
|
730
|
-
return (jsxRuntime.jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: `${styles$
|
|
755
|
+
return (jsxRuntime.jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: `${styles$O.inputElement} ${hasError ? styles$O.inputError : ''} ${inputProps?.className || ''}` }));
|
|
731
756
|
};
|
|
732
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
757
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$O.formField} ${className || ''}`, children: [jsxRuntime.jsxs("label", { htmlFor: inputId, className: `${styles$O.label} ${hideLabel ? styles$O.visuallyHidden : ''}`, children: [label, required && jsxRuntime.jsx("span", { className: styles$O.required, "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsxRuntime.jsx("p", { id: helperId, className: styles$O.helperText, children: helperText })), hasError && (jsxRuntime.jsx("p", { id: errorId, className: styles$O.errorText, role: "alert", children: error }))] }));
|
|
733
758
|
});
|
|
734
759
|
FormField.displayName = 'FormField';
|
|
735
760
|
|
|
736
|
-
var styles$
|
|
761
|
+
var styles$N = {"row":"FormRow-module_row__2ObP9","cols1":"FormRow-module_cols1__WsxX3","cols2":"FormRow-module_cols2__t548T","cols3":"FormRow-module_cols3__zjoSR","cols4":"FormRow-module_cols4__DbZL-","gapsm":"FormRow-module_gapsm__sl0ji","gapmd":"FormRow-module_gapmd__77Yp3","gaplg":"FormRow-module_gaplg__Yb-fh","stackMobile":"FormRow-module_stackMobile__6UluR"};
|
|
737
762
|
|
|
738
763
|
/**
|
|
739
764
|
* FormRow component for laying out form fields in a responsive grid.
|
|
@@ -743,16 +768,16 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
743
768
|
const childCount = React.Children.count(children);
|
|
744
769
|
const colCount = columns || (childCount > 4 ? 4 : childCount);
|
|
745
770
|
return (jsxRuntime.jsx("div", { className: `
|
|
746
|
-
${styles$
|
|
747
|
-
${styles$
|
|
748
|
-
${styles$
|
|
749
|
-
${stackOnMobile ? styles$
|
|
771
|
+
${styles$N.row}
|
|
772
|
+
${styles$N[`cols${colCount}`]}
|
|
773
|
+
${styles$N[`gap${gap}`]}
|
|
774
|
+
${stackOnMobile ? styles$N.stackMobile : ''}
|
|
750
775
|
${className || ''}
|
|
751
776
|
`, children: children }));
|
|
752
777
|
};
|
|
753
778
|
FormRow.displayName = 'FormRow';
|
|
754
779
|
|
|
755
|
-
var styles$
|
|
780
|
+
var styles$M = {"section":"FormSection-module_section__T17Vg","header":"FormSection-module_header__2MkY6","icon":"FormSection-module_icon__uywPB","title":"FormSection-module_title__dlvYD","fieldset":"FormSection-module_fieldset__pDDIo","disabled":"FormSection-module_disabled__xC3-e","status":"FormSection-module_status__2XOyW","statusLabel":"FormSection-module_statusLabel__VAuDb","statusValue":"FormSection-module_statusValue__YKSc-","submitted":"FormSection-module_submitted__sS-zT","not-submitted":"FormSection-module_not-submitted__Kuk2i","draft":"FormSection-module_draft__XHq3-"};
|
|
756
781
|
|
|
757
782
|
/**
|
|
758
783
|
* FormSection component for grouping related form fields with a title and icon.
|
|
@@ -761,40 +786,45 @@ var styles$E = {"section":"FormSection-module_section__T17Vg","header":"FormSect
|
|
|
761
786
|
const FormSection = ({ title, icon, status, disabled = false, children, className, id, }) => {
|
|
762
787
|
const isSubmitted = status === 'submitted';
|
|
763
788
|
const isDisabled = disabled || isSubmitted;
|
|
764
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
789
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$M.section} ${className || ''}`, id: id, children: [jsxRuntime.jsxs("div", { className: styles$M.header, children: [icon && jsxRuntime.jsx("span", { className: styles$M.icon, children: icon }), jsxRuntime.jsx("h2", { className: styles$M.title, children: title })] }), jsxRuntime.jsxs("fieldset", { disabled: isDisabled, className: `${styles$M.fieldset} ${isDisabled ? styles$M.disabled : ''}`, children: [status && (jsxRuntime.jsxs("div", { className: styles$M.status, children: [jsxRuntime.jsx("span", { className: styles$M.statusLabel, children: "Status:" }), jsxRuntime.jsx("span", { className: `${styles$M.statusValue} ${styles$M[status]}`, children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
765
790
|
};
|
|
766
791
|
FormSection.displayName = 'FormSection';
|
|
767
792
|
|
|
768
|
-
var styles$
|
|
793
|
+
var styles$L = {"stack":"FormStack-module_stack__SURjY","sm":"FormStack-module_sm__rt3tb","md":"FormStack-module_md__SRDmc","lg":"FormStack-module_lg__jql3j"};
|
|
794
|
+
|
|
795
|
+
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
796
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: [styles$L.stack, styles$L[gap], className].filter(Boolean).join(' '), children: children }));
|
|
797
|
+
|
|
798
|
+
var styles$K = {"toggle":"ManifestViewToggle-module_toggle__sHnAd","lockedToggle":"ManifestViewToggle-module_lockedToggle__m70h9","tab":"ManifestViewToggle-module_tab__qcwg7","active":"ManifestViewToggle-module_active__ln3B8","locked":"ManifestViewToggle-module_locked__Udun8","lockedActive":"ManifestViewToggle-module_lockedActive__kYSaF","count":"ManifestViewToggle-module_count__M-8a8"};
|
|
769
799
|
|
|
770
800
|
const ManifestViewToggle = ({ view, onView, paxCount, eqCount, locked, className = '', }) => {
|
|
771
801
|
const tabs = [
|
|
772
802
|
{ key: 'passengers', label: 'Passengers', count: paxCount, icon: UsersIcon$1 },
|
|
773
803
|
{ key: 'equipment', label: 'Equipment', count: eqCount, icon: CubeIcon },
|
|
774
804
|
];
|
|
775
|
-
return (jsxRuntime.jsx("div", { className: [styles$
|
|
805
|
+
return (jsxRuntime.jsx("div", { className: [styles$K.toggle, locked ? styles$K.lockedToggle : '', className].filter(Boolean).join(' '), role: "tablist", "aria-label": "Manifest view", children: tabs.map((tab) => {
|
|
776
806
|
const active = view === tab.key;
|
|
777
807
|
const Icon = locked ? LockIcon$1 : tab.icon;
|
|
778
808
|
return (jsxRuntime.jsxs("button", { type: "button", role: "tab", "aria-selected": active, onClick: () => onView(tab.key), className: [
|
|
779
|
-
styles$
|
|
780
|
-
active ? styles$
|
|
781
|
-
locked ? styles$
|
|
782
|
-
locked && active ? styles$
|
|
783
|
-
].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Icon, { size: 16 }), tab.label, jsxRuntime.jsx("span", { className: styles$
|
|
809
|
+
styles$K.tab,
|
|
810
|
+
active ? styles$K.active : '',
|
|
811
|
+
locked ? styles$K.locked : '',
|
|
812
|
+
locked && active ? styles$K.lockedActive : '',
|
|
813
|
+
].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Icon, { size: 16 }), tab.label, jsxRuntime.jsx("span", { className: styles$K.count, children: tab.count })] }, tab.key));
|
|
784
814
|
}) }));
|
|
785
815
|
};
|
|
786
816
|
|
|
787
|
-
var styles$
|
|
817
|
+
var styles$J = {"navItem":"NavItem-module_navItem__4PpZU","disabled":"NavItem-module_disabled__uYqez","default":"NavItem-module_default__VB92P","active":"NavItem-module_active__3bcnW","pill":"NavItem-module_pill__pn5gl","icon":"NavItem-module_icon__j9VQ5","label":"NavItem-module_label__3S3KY","sm":"NavItem-module_sm__1oeZI","md":"NavItem-module_md__ySO90","lg":"NavItem-module_lg__OmaBw","collapsed":"NavItem-module_collapsed__ciZ6-","iconSm":"NavItem-module_iconSm__UvWnu","iconMd":"NavItem-module_iconMd__uAMlQ","iconLg":"NavItem-module_iconLg__PFPKD","badge":"NavItem-module_badge__oP9u2"};
|
|
788
818
|
|
|
789
819
|
const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'default', size = 'md', badge, badgeVariant = 'default', onClick, disabled = false, href, external = false, className, 'aria-label': ariaLabel, }) => {
|
|
790
|
-
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && jsxRuntime.jsx("span", { className: `${styles$
|
|
820
|
+
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && jsxRuntime.jsx("span", { className: `${styles$J.icon} ${styles$J[`icon${size.charAt(0).toUpperCase()}${size.slice(1)}`]}`, "aria-hidden": "true", children: icon }), !collapsed && (jsxRuntime.jsx("span", { className: styles$J.label, children: label })), badge !== undefined && !collapsed && (jsxRuntime.jsx(Badge, { variant: badgeVariant, className: styles$J.badge, children: badge }))] }));
|
|
791
821
|
const classNames = [
|
|
792
|
-
styles$
|
|
793
|
-
styles$
|
|
794
|
-
styles$
|
|
795
|
-
active ? styles$
|
|
796
|
-
collapsed ? styles$
|
|
797
|
-
disabled ? styles$
|
|
822
|
+
styles$J.navItem,
|
|
823
|
+
styles$J[variant],
|
|
824
|
+
styles$J[size],
|
|
825
|
+
active ? styles$J.active : '',
|
|
826
|
+
collapsed ? styles$J.collapsed : '',
|
|
827
|
+
disabled ? styles$J.disabled : '',
|
|
798
828
|
className || '',
|
|
799
829
|
].filter(Boolean).join(' ');
|
|
800
830
|
const commonProps = {
|
|
@@ -809,7 +839,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
809
839
|
return (jsxRuntime.jsx("button", { type: "button", onClick: disabled ? undefined : onClick, disabled: disabled, ...commonProps, children: content }));
|
|
810
840
|
};
|
|
811
841
|
|
|
812
|
-
var styles$
|
|
842
|
+
var styles$I = {"barContainer":"Progress-module_barContainer__e4v8v","barTrack":"Progress-module_barTrack__tJsPO","barFill":"Progress-module_barFill__RbcDy","barxs":"Progress-module_barxs__TLS4q","barsm":"Progress-module_barsm__BFAiw","barmd":"Progress-module_barmd__QDW-h","barlg":"Progress-module_barlg__C-Mzw","barLabel":"Progress-module_barLabel__4PFJ7","circleContainer":"Progress-module_circleContainer__zyOTa","circleSvg":"Progress-module_circleSvg__0Tt1Q","circleTrack":"Progress-module_circleTrack__p4VWf","circleFill":"Progress-module_circleFill__6fU2M","circleLabel":"Progress-module_circleLabel__vHLfU","primary":"Progress-module_primary__H2wpc","success":"Progress-module_success__rmmnE","warning":"Progress-module_warning__68ovy","error":"Progress-module_error__ZXkH0"};
|
|
813
843
|
|
|
814
844
|
const dimensions = {
|
|
815
845
|
xs: 32,
|
|
@@ -825,7 +855,7 @@ const strokeWidths = {
|
|
|
825
855
|
};
|
|
826
856
|
const ProgressBar = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
827
857
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
828
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
858
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$I.barContainer} ${styles$I[`bar${size}`]} ${className}`, children: [jsxRuntime.jsx("div", { className: styles$I.barTrack, children: jsxRuntime.jsx("div", { className: `${styles$I.barFill} ${styles$I[variant]}`, style: { width: `${percentage}%` }, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max }) }), showLabel && (jsxRuntime.jsxs("span", { className: styles$I.barLabel, children: [Math.round(percentage), "%"] }))] }));
|
|
829
859
|
};
|
|
830
860
|
const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
831
861
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
@@ -834,7 +864,7 @@ const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', sh
|
|
|
834
864
|
const radius = (dimension - strokeWidth) / 2;
|
|
835
865
|
const circumference = radius * 2 * Math.PI;
|
|
836
866
|
const strokeDashoffset = circumference - (percentage / 100) * circumference;
|
|
837
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
867
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$I.circleContainer} ${className}`, style: { width: dimension, height: dimension }, children: [jsxRuntime.jsxs("svg", { width: dimension, height: dimension, className: styles$I.circleSvg, children: [jsxRuntime.jsx("circle", { className: styles$I.circleTrack, cx: dimension / 2, cy: dimension / 2, r: radius, strokeWidth: strokeWidth, fill: "transparent" }), jsxRuntime.jsx("circle", { className: `${styles$I.circleFill} ${styles$I[variant]}`, cx: dimension / 2, cy: dimension / 2, r: radius, strokeWidth: strokeWidth, fill: "transparent", strokeDasharray: circumference, strokeDashoffset: strokeDashoffset, strokeLinecap: "round", role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max })] }), showLabel && (jsxRuntime.jsxs("span", { className: styles$I.circleLabel, style: { fontSize: size === 'xs' ? '8px' : size === 'sm' ? '10px' : size === 'md' ? '12px' : '14px' }, children: [Math.round(percentage), "%"] }))] }));
|
|
838
868
|
};
|
|
839
869
|
// Combined export
|
|
840
870
|
const Progress = {
|
|
@@ -842,7 +872,7 @@ const Progress = {
|
|
|
842
872
|
Circle: ProgressCircle,
|
|
843
873
|
};
|
|
844
874
|
|
|
845
|
-
var styles$
|
|
875
|
+
var styles$H = {"toolbar":"RosterToolbar-module_toolbar__IHjs9","leftSection":"RosterToolbar-module_leftSection__baz7E","rightSection":"RosterToolbar-module_rightSection__R2b-D","dropdown":"RosterToolbar-module_dropdown__NKaWV","dropdownTrigger":"RosterToolbar-module_dropdownTrigger__nCoaZ","dropdownMenu":"RosterToolbar-module_dropdownMenu__7QuED","dropdownItem":"RosterToolbar-module_dropdownItem__mrsat","dropdownItemIcon":"RosterToolbar-module_dropdownItemIcon__gx5tx","lockButton":"RosterToolbar-module_lockButton__zw3s0","locked":"RosterToolbar-module_locked__DVnqB","saveButton":"RosterToolbar-module_saveButton__th1lq","spinner":"RosterToolbar-module_spinner__uWdPg"};
|
|
846
876
|
|
|
847
877
|
const ImportIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), jsxRuntime.jsx("polyline", { points: "17 8 12 3 7 8" }), jsxRuntime.jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })] }));
|
|
848
878
|
const ExportIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), jsxRuntime.jsx("polyline", { points: "7 10 12 15 17 10" }), jsxRuntime.jsx("line", { x1: "12", y1: "15", x2: "12", y2: "3" })] }));
|
|
@@ -850,23 +880,23 @@ const ChevronIcon$2 = () => (jsxRuntime.jsx("svg", { width: "12", height: "12",
|
|
|
850
880
|
const LockIcon = () => (jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntime.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }));
|
|
851
881
|
const UnlockIcon = () => (jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntime.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }));
|
|
852
882
|
const SaveIcon = () => (jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }), jsxRuntime.jsx("polyline", { points: "17 21 17 13 7 13 7 21" }), jsxRuntime.jsx("polyline", { points: "7 3 7 8 15 8" })] }));
|
|
853
|
-
const SpinnerIcon = () => (jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: styles$
|
|
883
|
+
const SpinnerIcon = () => (jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: styles$H.spinner, children: jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32" }) }));
|
|
854
884
|
const DropdownButton = ({ label, icon, options, }) => {
|
|
855
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
885
|
+
return (jsxRuntime.jsxs("div", { className: styles$H.dropdown, children: [jsxRuntime.jsxs("button", { type: "button", className: styles$H.dropdownTrigger, children: [icon, jsxRuntime.jsx("span", { children: label }), jsxRuntime.jsx(ChevronIcon$2, {})] }), jsxRuntime.jsx("div", { className: styles$H.dropdownMenu, children: options.map((option, i) => (jsxRuntime.jsxs("button", { type: "button", className: styles$H.dropdownItem, onClick: option.onClick, disabled: option.disabled, children: [option.icon && jsxRuntime.jsx("span", { className: styles$H.dropdownItemIcon, children: option.icon }), option.label] }, i))) })] }));
|
|
856
886
|
};
|
|
857
887
|
/**
|
|
858
888
|
* RosterToolbar - Toolbar for roster management with import/export/save actions
|
|
859
889
|
*/
|
|
860
890
|
const RosterToolbar = ({ importOptions, exportOptions, lockToggle, saveButton, additionalActions, searchField, className = '', }) => {
|
|
861
|
-
const toolbarClasses = [styles$
|
|
862
|
-
return (jsxRuntime.jsxs("div", { className: toolbarClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
863
|
-
styles$
|
|
864
|
-
lockToggle.isLocked ? styles$
|
|
865
|
-
].filter(Boolean).join(' '), onClick: () => lockToggle.onToggle(!lockToggle.isLocked), disabled: lockToggle.disabled, "aria-label": lockToggle.isLocked ? 'Unlock roster' : 'Lock roster', children: [lockToggle.isLocked ? jsxRuntime.jsx(LockIcon, {}) : jsxRuntime.jsx(UnlockIcon, {}), jsxRuntime.jsx("span", { children: lockToggle.isLocked ? 'Locked' : 'Unlocked' })] })), saveButton && (jsxRuntime.jsxs("button", { type: "button", className: styles$
|
|
891
|
+
const toolbarClasses = [styles$H.toolbar, className].filter(Boolean).join(' ');
|
|
892
|
+
return (jsxRuntime.jsxs("div", { className: toolbarClasses, children: [jsxRuntime.jsxs("div", { className: styles$H.leftSection, children: [searchField, additionalActions] }), jsxRuntime.jsxs("div", { className: styles$H.rightSection, children: [importOptions && importOptions.length > 0 && (jsxRuntime.jsx(DropdownButton, { label: "Import", icon: jsxRuntime.jsx(ImportIcon, {}), options: importOptions })), exportOptions && exportOptions.length > 0 && (jsxRuntime.jsx(DropdownButton, { label: "Export", icon: jsxRuntime.jsx(ExportIcon$1, {}), options: exportOptions })), lockToggle && (jsxRuntime.jsxs("button", { type: "button", className: [
|
|
893
|
+
styles$H.lockButton,
|
|
894
|
+
lockToggle.isLocked ? styles$H.locked : '',
|
|
895
|
+
].filter(Boolean).join(' '), onClick: () => lockToggle.onToggle(!lockToggle.isLocked), disabled: lockToggle.disabled, "aria-label": lockToggle.isLocked ? 'Unlock roster' : 'Lock roster', children: [lockToggle.isLocked ? jsxRuntime.jsx(LockIcon, {}) : jsxRuntime.jsx(UnlockIcon, {}), jsxRuntime.jsx("span", { children: lockToggle.isLocked ? 'Locked' : 'Unlocked' })] })), saveButton && (jsxRuntime.jsxs("button", { type: "button", className: styles$H.saveButton, onClick: saveButton.onClick, disabled: saveButton.disabled || saveButton.loading, children: [saveButton.loading ? jsxRuntime.jsx(SpinnerIcon, {}) : jsxRuntime.jsx(SaveIcon, {}), jsxRuntime.jsx("span", { children: saveButton.label || 'Save' })] }))] })] }));
|
|
866
896
|
};
|
|
867
897
|
RosterToolbar.displayName = 'RosterToolbar';
|
|
868
898
|
|
|
869
|
-
var styles$
|
|
899
|
+
var styles$G = {"searchField":"SearchField-module_searchField__c7gUE","inputWrapper":"SearchField-module_inputWrapper__SUzHv","searchIcon":"SearchField-module_searchIcon__MOZ2m","input":"SearchField-module_input__abJcl","clearButton":"SearchField-module_clearButton__RMIg2","sm":"SearchField-module_sm__-sayT","lg":"SearchField-module_lg__QKacI"};
|
|
870
900
|
|
|
871
901
|
const SearchField = React.forwardRef(({ placeholder = 'Search...', value, defaultValue = '', onChange, onSearch, onClear, size = 'md', disabled = false, showClear = true, showButton = true, className, id, 'aria-label': ariaLabel = 'Search', ...props }, ref) => {
|
|
872
902
|
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
@@ -894,17 +924,25 @@ const SearchField = React.forwardRef(({ placeholder = 'Search...', value, defaul
|
|
|
894
924
|
onSearch?.(currentValue);
|
|
895
925
|
}
|
|
896
926
|
};
|
|
897
|
-
return (jsxRuntime.jsxs("form", { className: `${styles$
|
|
927
|
+
return (jsxRuntime.jsxs("form", { className: `${styles$G.searchField} ${styles$G[size]} ${className || ''}`, onSubmit: handleSubmit, role: "search", children: [jsxRuntime.jsxs("div", { className: styles$G.inputWrapper, children: [jsxRuntime.jsx(SearchIcon$1, { className: styles$G.searchIcon, "aria-hidden": "true" }), jsxRuntime.jsx(Input, { ref: ref, id: id, type: "search", placeholder: placeholder, value: currentValue, onChange: handleChange, onKeyDown: handleKeyDown, disabled: disabled, className: styles$G.input, "aria-label": ariaLabel, ...props }), showClear && currentValue && (jsxRuntime.jsx("button", { type: "button", className: styles$G.clearButton, onClick: handleClear, disabled: disabled, "aria-label": "Clear search", children: jsxRuntime.jsx(CloseIcon, { size: 16 }) }))] }), showButton && (jsxRuntime.jsx(Button, { type: "submit", variant: "primary", size: size, disabled: disabled, children: "Search" }))] }));
|
|
898
928
|
});
|
|
899
929
|
SearchField.displayName = 'SearchField';
|
|
900
930
|
|
|
901
|
-
var styles$
|
|
931
|
+
var styles$F = {"form":"SchoolContactForm-module_form__-Mx7k","portalLabel":"SchoolContactForm-module_portalLabel__GAeV6","newContactLabel":"SchoolContactForm-module_newContactLabel__7S3Vw","divider":"SchoolContactForm-module_divider__ZSx-R","nameFields":"SchoolContactForm-module_nameFields__Fcjl8","phoneFields":"SchoolContactForm-module_phoneFields__-zRPe"};
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
935
|
+
* consuming applications retain their form state, validation, and masking.
|
|
936
|
+
*/
|
|
937
|
+
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$F.form, className].filter(Boolean).join(' '), children: [mode === 'Add' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { className: styles$F.portalLabel, children: "Create From Portal User" }), createFromPortalUser] }), jsxRuntime.jsx("div", { className: styles$F.divider, children: jsxRuntime.jsx("strong", { children: "OR" }) }), jsxRuntime.jsx("p", { className: styles$F.newContactLabel, children: "Create New Contact Without Portal Access" })] })), jsxRuntime.jsxs("div", { className: styles$F.nameFields, children: [firstNameField, middleInitialField, lastNameField] }), jsxRuntime.jsxs("div", { className: styles$F.phoneFields, children: [businessPhoneField, cellPhoneField] }), jsxRuntime.jsx("div", { children: emailField })] }));
|
|
938
|
+
|
|
939
|
+
var styles$E = {"segment":"Segment-module_segment__UF-SG","fullWidth":"Segment-module_fullWidth__Hi19i","option":"Segment-module_option__UJUhj","disabled":"Segment-module_disabled__CSxuQ","selected":"Segment-module_selected__gRnVj","sm":"Segment-module_sm__h8S7Z","md":"Segment-module_md__4uTae","lg":"Segment-module_lg__zL0Hv","icon":"Segment-module_icon__ZHRr6"};
|
|
902
940
|
|
|
903
941
|
const Segment = ({ options, value, onChange, size = 'md', fullWidth = false, className = '', 'aria-label': ariaLabel, }) => {
|
|
904
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
942
|
+
return (jsxRuntime.jsx("div", { className: `${styles$E.segment} ${styles$E[size]} ${fullWidth ? styles$E.fullWidth : ''} ${className}`, role: "radiogroup", "aria-label": ariaLabel, children: options.map((option) => (jsxRuntime.jsxs("button", { type: "button", className: `${styles$E.option} ${value === option.value ? styles$E.selected : ''} ${option.disabled ? styles$E.disabled : ''}`, onClick: () => !option.disabled && onChange(option.value), disabled: option.disabled, role: "radio", "aria-checked": value === option.value, children: [option.icon && jsxRuntime.jsx("span", { className: styles$E.icon, children: option.icon }), option.label] }, option.value))) }));
|
|
905
943
|
};
|
|
906
944
|
|
|
907
|
-
var styles$
|
|
945
|
+
var styles$D = {"container":"SelectFilter-module_container__tCC9y","trigger":"SelectFilter-module_trigger__5WbMf","open":"SelectFilter-module_open__oo-Y6","disabled":"SelectFilter-module_disabled__JUdi3","triggerText":"SelectFilter-module_triggerText__LM07K","placeholder":"SelectFilter-module_placeholder__J0xyo","chevron":"SelectFilter-module_chevron__x-Pnr","dropdown":"SelectFilter-module_dropdown__52FPP","tabs":"SelectFilter-module_tabs__wp6on","tab":"SelectFilter-module_tab__JpnWo","activeTab":"SelectFilter-module_activeTab__ShP7x","actions":"SelectFilter-module_actions__phfFl","actionBtn":"SelectFilter-module_actionBtn__ppB--","options":"SelectFilter-module_options__p1iCX","option":"SelectFilter-module_option__0vwfy","selected":"SelectFilter-module_selected__2vxyT","checkbox":"SelectFilter-module_checkbox__qTUjy","optionLabel":"SelectFilter-module_optionLabel__L4CMA","footer":"SelectFilter-module_footer__aq4JP","applyBtn":"SelectFilter-module_applyBtn__RFKei"};
|
|
908
946
|
|
|
909
947
|
const ChevronIcon$1 = () => (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
910
948
|
const CheckIcon = () => (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
@@ -977,11 +1015,11 @@ const SelectFilter = ({ label, options = [], groupedOptions = {}, value = [], on
|
|
|
977
1015
|
}
|
|
978
1016
|
return `${selected.length} selected`;
|
|
979
1017
|
};
|
|
980
|
-
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
1018
|
+
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$D.container} ${className}`, children: [jsxRuntime.jsxs("button", { type: "button", className: `${styles$D.trigger} ${disabled ? styles$D.disabled : ''} ${isOpen ? styles$D.open : ''}`, onClick: () => !disabled && setIsOpen(!isOpen), children: [jsxRuntime.jsx("span", { className: `${styles$D.triggerText} ${selectedValues.length === 0 ? styles$D.placeholder : ''}`, children: getDisplayText() }), jsxRuntime.jsx("span", { className: styles$D.chevron, children: jsxRuntime.jsx(ChevronIcon$1, {}) })] }), isOpen && (jsxRuntime.jsxs("div", { className: styles$D.dropdown, style: { width }, children: [grouped && tabs.length > 0 && (jsxRuntime.jsx("div", { className: styles$D.tabs, children: tabs.map(tab => (jsxRuntime.jsx("button", { type: "button", className: `${styles$D.tab} ${activeTab === tab ? styles$D.activeTab : ''}`, onClick: () => setActiveTab(tab), children: tab.charAt(0).toUpperCase() + tab.slice(1) }, tab))) })), multiselect && (jsxRuntime.jsxs("div", { className: styles$D.actions, children: [jsxRuntime.jsx("button", { type: "button", className: styles$D.actionBtn, onClick: handleSelectAll, children: "Select All" }), jsxRuntime.jsx("button", { type: "button", className: styles$D.actionBtn, onClick: handleClear, children: "Clear" })] })), jsxRuntime.jsx("div", { className: styles$D.options, children: currentOptions.map(option => (jsxRuntime.jsxs("div", { className: `${styles$D.option} ${selectedValues.includes(option.value) ? styles$D.selected : ''}`, onClick: () => handleSelect(option.value), children: [multiselect && (jsxRuntime.jsx("span", { className: styles$D.checkbox, children: selectedValues.includes(option.value) && jsxRuntime.jsx(CheckIcon, {}) })), jsxRuntime.jsx("span", { className: styles$D.optionLabel, children: option.label })] }, option.value))) }), multiselect && (jsxRuntime.jsx("div", { className: styles$D.footer, children: jsxRuntime.jsx("button", { type: "button", className: styles$D.applyBtn, onClick: () => setIsOpen(false), children: "Apply" }) }))] }))] }));
|
|
981
1019
|
};
|
|
982
1020
|
SelectFilter.displayName = 'SelectFilter';
|
|
983
1021
|
|
|
984
|
-
var styles$
|
|
1022
|
+
var styles$C = {"list":"ServiceToggle-module_list__bBts8","item":"ServiceToggle-module_item__4wEbQ","labelContainer":"ServiceToggle-module_labelContainer__oz-I1","clickable":"ServiceToggle-module_clickable__yzQxe","icon":"ServiceToggle-module_icon__8IdST","label":"ServiceToggle-module_label__J98Ve"};
|
|
985
1023
|
|
|
986
1024
|
/**
|
|
987
1025
|
* ServiceToggle component for a single service item.
|
|
@@ -994,32 +1032,56 @@ const ServiceToggle = ({ label, icon, hasToggle = true, enabled = false, onToggl
|
|
|
994
1032
|
onClick();
|
|
995
1033
|
}
|
|
996
1034
|
};
|
|
997
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1035
|
+
return (jsxRuntime.jsxs("div", { className: styles$C.item, children: [jsxRuntime.jsxs("div", { className: `${styles$C.labelContainer} ${isClickable ? styles$C.clickable : ''}`, onClick: handleClick, children: [icon && jsxRuntime.jsx("span", { className: styles$C.icon, children: icon }), jsxRuntime.jsx("span", { className: styles$C.label, children: label })] }), hasToggle && (jsxRuntime.jsx(Toggle, { checked: enabled, onChange: (checked) => onToggle?.(checked), disabled: disabled, size: "sm" }))] }));
|
|
998
1036
|
};
|
|
999
1037
|
/**
|
|
1000
1038
|
* ServiceToggleList component for displaying a list of services with toggles.
|
|
1001
1039
|
* Used in travel request forms for service selection (Air, Hotel, Ground, etc.)
|
|
1002
1040
|
*/
|
|
1003
1041
|
const ServiceToggleList = ({ services, enabledServices = {}, onToggle, onClick, className, }) => {
|
|
1004
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1042
|
+
return (jsxRuntime.jsx("div", { className: `${styles$C.list} ${className || ''}`, children: services.map((service) => (jsxRuntime.jsx(ServiceToggle, { serviceKey: service.key, label: service.label, icon: service.icon, hasToggle: service.hasToggle, enabled: enabledServices[service.key] ?? false, onToggle: (enabled) => onToggle?.(service.key, enabled), onClick: () => onClick?.(service.key) }, service.key))) }));
|
|
1005
1043
|
};
|
|
1006
1044
|
ServiceToggle.displayName = 'ServiceToggle';
|
|
1007
1045
|
ServiceToggleList.displayName = 'ServiceToggleList';
|
|
1008
1046
|
|
|
1009
|
-
var styles$
|
|
1047
|
+
var styles$B = {"toggle":"SupplierTypeToggle-module_toggle__x4pTJ","active":"SupplierTypeToggle-module_active__8BGSe"};
|
|
1048
|
+
|
|
1049
|
+
const SUPPLIER_TYPE_OPTIONS = [
|
|
1050
|
+
{ value: 'A', label: 'Air' },
|
|
1051
|
+
{ value: 'C', label: 'Car' },
|
|
1052
|
+
{ value: 'H', label: 'Hotel' },
|
|
1053
|
+
];
|
|
1054
|
+
const OPTIONS = [
|
|
1055
|
+
{ value: '', label: 'All' },
|
|
1056
|
+
...SUPPLIER_TYPE_OPTIONS,
|
|
1057
|
+
];
|
|
1058
|
+
const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = false, className = '', }) => {
|
|
1059
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
1060
|
+
const activeValue = value ?? internalValue;
|
|
1061
|
+
const handleSelect = (nextValue) => {
|
|
1062
|
+
if (disabled)
|
|
1063
|
+
return;
|
|
1064
|
+
if (value === undefined)
|
|
1065
|
+
setInternalValue(nextValue);
|
|
1066
|
+
onChange?.(nextValue);
|
|
1067
|
+
};
|
|
1068
|
+
return (jsxRuntime.jsx("div", { className: [styles$B.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$B.active : '', onClick: () => handleSelect(option.value), children: option.label }, option.value || 'all'))) }));
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
var styles$A = {"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"};
|
|
1010
1072
|
|
|
1011
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" })] }));
|
|
1012
1074
|
/**
|
|
1013
1075
|
* TeamHeader - Header component for team management pages
|
|
1014
1076
|
*/
|
|
1015
|
-
const TeamHeader = ({ teamCode, teamName, pretitle = 'Team Management', backHref, onBack, actions, className = '', }) => {
|
|
1077
|
+
const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team Management', backHref, onBack, actions, className = '', }) => {
|
|
1016
1078
|
const headerClasses = [
|
|
1017
|
-
styles$
|
|
1079
|
+
styles$A.header,
|
|
1018
1080
|
className,
|
|
1019
1081
|
].filter(Boolean).join(' ');
|
|
1020
|
-
const title = teamCode && teamName
|
|
1082
|
+
const title = suppliedTitle ?? (teamCode && teamName
|
|
1021
1083
|
? `${teamCode} - ${teamName}`
|
|
1022
|
-
: teamName || teamCode || '';
|
|
1084
|
+
: teamName || teamCode || '');
|
|
1023
1085
|
const handleBack = () => {
|
|
1024
1086
|
if (onBack) {
|
|
1025
1087
|
onBack();
|
|
@@ -1029,11 +1091,20 @@ const TeamHeader = ({ teamCode, teamName, pretitle = 'Team Management', backHref
|
|
|
1029
1091
|
window.location.href = backHref;
|
|
1030
1092
|
}
|
|
1031
1093
|
};
|
|
1032
|
-
return (jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1094
|
+
return (jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$A.left, children: [(backHref || onBack) && (jsxRuntime.jsx("button", { type: "button", className: styles$A.backButton, onClick: handleBack, "aria-label": "Go back", children: jsxRuntime.jsx(BackIcon, {}) })), jsxRuntime.jsxs("div", { className: styles$A.titles, children: [pretitle && jsxRuntime.jsx("span", { className: styles$A.pretitle, children: pretitle }), jsxRuntime.jsxs("h1", { className: styles$A.title, children: [title, "\u00A0"] })] })] }), actions && (jsxRuntime.jsx("div", { className: styles$A.actions, children: actions }))] }));
|
|
1033
1095
|
};
|
|
1096
|
+
const DEFAULT_TABS$1 = [
|
|
1097
|
+
{ id: 'profile', label: 'Profile' },
|
|
1098
|
+
{ id: 'roster', label: 'Roster' },
|
|
1099
|
+
{ id: 'equipment', label: 'Equipment' },
|
|
1100
|
+
{ id: 'user-access', label: 'User Access' },
|
|
1101
|
+
];
|
|
1102
|
+
/** Router-agnostic counterpart of Hub's team-management submenu. */
|
|
1103
|
+
const TeamSubMenu = ({ tabs = DEFAULT_TABS$1, activeTab, onTabChange, className = '' }) => (jsxRuntime.jsx("nav", { className: [styles$A.subMenu, className].filter(Boolean).join(' '), "aria-label": "Team management sections", children: tabs.map((tab) => (jsxRuntime.jsx("button", { type: "button", className: activeTab === tab.id ? styles$A.activeTab : '', "aria-current": activeTab === tab.id ? 'page' : undefined, onClick: () => onTabChange?.(tab.id), children: tab.label }, tab.id))) }));
|
|
1034
1104
|
TeamHeader.displayName = 'TeamHeader';
|
|
1105
|
+
TeamSubMenu.displayName = 'TeamSubMenu';
|
|
1035
1106
|
|
|
1036
|
-
var styles$
|
|
1107
|
+
var styles$z = {"segment":"TripSegment-module_segment__jX-Nq","light":"TripSegment-module_light__hHSb3","dark":"TripSegment-module_dark__3Fuo7","empty":"TripSegment-module_empty__vmzg0","item":"TripSegment-module_item__S-RC1","itemHeader":"TripSegment-module_itemHeader__wFWMo","itemType":"TripSegment-module_itemType__NsDLe","itemName":"TripSegment-module_itemName__ysYsC","route":"TripSegment-module_route__Shyz0","location":"TripSegment-module_location__8VCMH","details":"TripSegment-module_details__4U4Km","dates":"TripSegment-module_dates__Wn4-k"};
|
|
1037
1108
|
|
|
1038
1109
|
const PlaneIcon$3 = () => (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("path", { d: "M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5Z" }) }));
|
|
1039
1110
|
const BusIcon$2 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("rect", { x: "4", y: "4", width: "16", height: "14", rx: "2" }), jsxRuntime.jsx("path", { d: "M8 6v6" }), jsxRuntime.jsx("path", { d: "M16 6v6" }), jsxRuntime.jsx("circle", { cx: "8", cy: "16", r: "1" }), jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "1" })] }));
|
|
@@ -1043,51 +1114,157 @@ const ArrowIcon = () => (jsxRuntime.jsxs("svg", { width: "12", height: "12", vie
|
|
|
1043
1114
|
* Base TripSegment component wrapper
|
|
1044
1115
|
*/
|
|
1045
1116
|
const TripSegment = ({ type: _type, variant = 'light', className = '', children, }) => {
|
|
1046
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1117
|
+
return (jsxRuntime.jsx("div", { className: `${styles$z.segment} ${styles$z[variant]} ${className}`, children: children }));
|
|
1047
1118
|
};
|
|
1048
1119
|
/**
|
|
1049
1120
|
* AirSegment component for displaying flight information
|
|
1050
1121
|
*/
|
|
1051
1122
|
const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
1052
1123
|
if (!flights || flights.length === 0) {
|
|
1053
|
-
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$
|
|
1124
|
+
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$z.empty, children: "No flights" }) }));
|
|
1054
1125
|
}
|
|
1055
|
-
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1126
|
+
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxRuntime.jsxs("div", { className: styles$z.item, children: [jsxRuntime.jsxs("div", { className: styles$z.itemHeader, children: [jsxRuntime.jsx(PlaneIcon$3, {}), jsxRuntime.jsx("span", { className: styles$z.itemType, children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxRuntime.jsxs("div", { className: styles$z.route, children: [jsxRuntime.jsx("span", { className: styles$z.location, children: flight.departure }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: styles$z.location, children: flight.arrival })] }), jsxRuntime.jsxs("div", { className: styles$z.details, children: [jsxRuntime.jsx("span", { children: flight.departureDate }), flight.departureTime && jsxRuntime.jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxRuntime.jsxs("div", { className: styles$z.details, children: [jsxRuntime.jsx("span", { children: flight.airline }), flight.flightNumber && jsxRuntime.jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
1056
1127
|
};
|
|
1057
1128
|
/**
|
|
1058
1129
|
* GroundSegment component for displaying ground transportation
|
|
1059
1130
|
*/
|
|
1060
1131
|
const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
1061
1132
|
if (!segments || segments.length === 0) {
|
|
1062
|
-
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$
|
|
1133
|
+
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$z.empty, children: "No ground transportation" }) }));
|
|
1063
1134
|
}
|
|
1064
|
-
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1135
|
+
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxRuntime.jsxs("div", { className: styles$z.item, children: [jsxRuntime.jsxs("div", { className: styles$z.itemHeader, children: [jsxRuntime.jsx(BusIcon$2, {}), jsxRuntime.jsx("span", { className: styles$z.itemType, children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxRuntime.jsxs("div", { className: styles$z.route, children: [jsxRuntime.jsx("span", { className: styles$z.location, children: segment.pickupLocation }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: styles$z.location, children: segment.dropoffLocation })] }), jsxRuntime.jsxs("div", { className: styles$z.details, children: [jsxRuntime.jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsxRuntime.jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxRuntime.jsxs("div", { className: styles$z.details, children: [jsxRuntime.jsx("span", { children: segment.company }), segment.vehicleCount && jsxRuntime.jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
1065
1136
|
};
|
|
1066
1137
|
/**
|
|
1067
1138
|
* HotelSegment component for displaying hotel information
|
|
1068
1139
|
*/
|
|
1069
1140
|
const HotelSegment = ({ hotels, variant = 'light', className = '', }) => {
|
|
1070
1141
|
if (!hotels || hotels.length === 0) {
|
|
1071
|
-
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$
|
|
1142
|
+
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$z.empty, children: "No hotels" }) }));
|
|
1072
1143
|
}
|
|
1073
|
-
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: hotels.map((hotel, i) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1144
|
+
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: hotels.map((hotel, i) => (jsxRuntime.jsxs("div", { className: styles$z.item, children: [jsxRuntime.jsxs("div", { className: styles$z.itemHeader, children: [jsxRuntime.jsx(HotelIcon$3, {}), jsxRuntime.jsx("span", { className: styles$z.itemName, children: hotel.name })] }), hotel.city && (jsxRuntime.jsx("div", { className: styles$z.details, children: jsxRuntime.jsx("span", { children: hotel.city }) })), jsxRuntime.jsxs("div", { className: styles$z.dates, children: [jsxRuntime.jsx("span", { children: hotel.checkIn }), jsxRuntime.jsx("span", { children: "\u2013" }), jsxRuntime.jsx("span", { children: hotel.checkOut })] }), hotel.roomCount && (jsxRuntime.jsx("div", { className: styles$z.details, children: jsxRuntime.jsxs("span", { children: [hotel.roomCount, " rooms"] }) }))] }, i))) }));
|
|
1074
1145
|
};
|
|
1075
1146
|
TripSegment.displayName = 'TripSegment';
|
|
1076
1147
|
AirSegment.displayName = 'AirSegment';
|
|
1077
1148
|
GroundSegment.displayName = 'GroundSegment';
|
|
1078
1149
|
HotelSegment.displayName = 'HotelSegment';
|
|
1079
1150
|
|
|
1080
|
-
var styles$
|
|
1151
|
+
var styles$y = {"sidenav":"Sidenav-module_sidenav__9DKVg","expanded":"Sidenav-module_expanded__TfkMs","collapsed":"Sidenav-module_collapsed__xyLkg","toggle":"Sidenav-module_toggle__JCoZu","logoContainer":"Sidenav-module_logoContainer__lLl0-","nav":"Sidenav-module_nav__ZwGrU","navItem":"Sidenav-module_navItem__HhFpj","active":"Sidenav-module_active__-oHUp","icon":"Sidenav-module_icon__7XJWf","label":"Sidenav-module_label__DJDBw","footer":"Sidenav-module_footer__EgrDk"};
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* Sidenav component for main navigation.
|
|
1155
|
+
* Supports expanded and collapsed states with icons and labels.
|
|
1156
|
+
*/
|
|
1157
|
+
const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultExpanded = true, footer, className = '', ...props }) => {
|
|
1158
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
1159
|
+
const classNames = [
|
|
1160
|
+
styles$y.sidenav,
|
|
1161
|
+
expanded ? styles$y.expanded : styles$y.collapsed,
|
|
1162
|
+
className,
|
|
1163
|
+
]
|
|
1164
|
+
.filter(Boolean)
|
|
1165
|
+
.join(' ');
|
|
1166
|
+
const handleItemClick = (item) => {
|
|
1167
|
+
if (item.onClick) {
|
|
1168
|
+
item.onClick();
|
|
1169
|
+
}
|
|
1170
|
+
if (onItemClick) {
|
|
1171
|
+
onItemClick(item.key);
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
return (jsxRuntime.jsxs("aside", { className: classNames, ...props, children: [jsxRuntime.jsx("button", { className: styles$y.toggle, onClick: () => setExpanded(!expanded), "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', children: expanded ? (jsxRuntime.jsx(ChevronLeftIcon, { size: 16 })) : (jsxRuntime.jsx(ChevronRightIcon$1, { size: 16 })) }), jsxRuntime.jsx("div", { className: styles$y.logoContainer, children: expanded ? logo : logoCollapsed || logo }), jsxRuntime.jsx("nav", { className: styles$y.nav, children: items.map((item) => {
|
|
1175
|
+
const isActive = item.key === activeKey;
|
|
1176
|
+
const itemClasses = [
|
|
1177
|
+
styles$y.navItem,
|
|
1178
|
+
isActive ? styles$y.active : '',
|
|
1179
|
+
]
|
|
1180
|
+
.filter(Boolean)
|
|
1181
|
+
.join(' ');
|
|
1182
|
+
return (jsxRuntime.jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsxRuntime.jsx("span", { className: styles$y.icon, children: item.icon }), expanded && jsxRuntime.jsx("span", { className: styles$y.label, children: item.label })] }, item.key));
|
|
1183
|
+
}) }), footer && jsxRuntime.jsx("div", { className: styles$y.footer, children: footer })] }));
|
|
1184
|
+
};
|
|
1185
|
+
Sidenav.displayName = 'Sidenav';
|
|
1186
|
+
|
|
1187
|
+
var styles$x = {"topbar":"Topbar-module_topbar__U9CDj","left":"Topbar-module_left__m4aap","accountWrapper":"Topbar-module_accountWrapper__5mjDZ","accountSelector":"Topbar-module_accountSelector__iqI--","open":"Topbar-module_open__2Xsp1","accountCode":"Topbar-module_accountCode__KMKWm","accountName":"Topbar-module_accountName__XZYjB","chevron":"Topbar-module_chevron__OSXcD","chevronOpen":"Topbar-module_chevronOpen__jVvEl","dropdown":"Topbar-module_dropdown__fA5Gw","dropdownSearch":"Topbar-module_dropdownSearch__9zqy3","searchIcon":"Topbar-module_searchIcon__sHGnK","searchInput":"Topbar-module_searchInput__1TSc3","dropdownList":"Topbar-module_dropdownList__P4q9b","dropdownItem":"Topbar-module_dropdownItem__w-eHf","selected":"Topbar-module_selected__MylKY","dropdownItemCode":"Topbar-module_dropdownItemCode__cUAn6","dropdownItemName":"Topbar-module_dropdownItemName__MYw3k","noResults":"Topbar-module_noResults__PkNfT","actions":"Topbar-module_actions__KtaiZ"};
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* Topbar component for the main header.
|
|
1191
|
+
* Includes account selector with dropdown and action buttons.
|
|
1192
|
+
*/
|
|
1193
|
+
const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, leftContent, className = '', ...props }) => {
|
|
1194
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
1195
|
+
const [searchQuery, setSearchQuery] = React.useState('');
|
|
1196
|
+
const dropdownRef = React.useRef(null);
|
|
1197
|
+
const searchInputRef = React.useRef(null);
|
|
1198
|
+
const classNames = [styles$x.topbar, className].filter(Boolean).join(' ');
|
|
1199
|
+
// Close dropdown on outside click
|
|
1200
|
+
React.useEffect(() => {
|
|
1201
|
+
if (!isOpen)
|
|
1202
|
+
return;
|
|
1203
|
+
const handleClickOutside = (event) => {
|
|
1204
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
1205
|
+
setIsOpen(false);
|
|
1206
|
+
setSearchQuery('');
|
|
1207
|
+
}
|
|
1208
|
+
};
|
|
1209
|
+
const handleEscape = (event) => {
|
|
1210
|
+
if (event.key === 'Escape') {
|
|
1211
|
+
setIsOpen(false);
|
|
1212
|
+
setSearchQuery('');
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
1216
|
+
document.addEventListener('keydown', handleEscape);
|
|
1217
|
+
return () => {
|
|
1218
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
1219
|
+
document.removeEventListener('keydown', handleEscape);
|
|
1220
|
+
};
|
|
1221
|
+
}, [isOpen]);
|
|
1222
|
+
// Focus search input when dropdown opens
|
|
1223
|
+
React.useEffect(() => {
|
|
1224
|
+
if (isOpen && searchInputRef.current) {
|
|
1225
|
+
searchInputRef.current.focus();
|
|
1226
|
+
}
|
|
1227
|
+
}, [isOpen]);
|
|
1228
|
+
const handleToggle = () => {
|
|
1229
|
+
if (accounts && accounts.length > 0) {
|
|
1230
|
+
setIsOpen(!isOpen);
|
|
1231
|
+
if (!isOpen) {
|
|
1232
|
+
setSearchQuery('');
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
else if (onAccountClick) {
|
|
1236
|
+
onAccountClick();
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1239
|
+
const handleSelectAccount = (selectedAccount) => {
|
|
1240
|
+
onAccountSelect?.(selectedAccount);
|
|
1241
|
+
setIsOpen(false);
|
|
1242
|
+
setSearchQuery('');
|
|
1243
|
+
};
|
|
1244
|
+
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
1245
|
+
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
1246
|
+
const hasDropdown = accounts && accounts.length > 0;
|
|
1247
|
+
return (jsxRuntime.jsxs("header", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$x.left, children: [leftContent, account && (jsxRuntime.jsxs("div", { className: styles$x.accountWrapper, ref: dropdownRef, children: [jsxRuntime.jsxs("button", { className: `${styles$x.accountSelector} ${isOpen ? styles$x.open : ''}`, onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsxRuntime.jsx("span", { className: styles$x.accountCode, children: account.code }), jsxRuntime.jsx("span", { className: styles$x.accountName, children: account.name }), hasDropdown && (jsxRuntime.jsx(ChevronDownIcon$1, { size: 16, className: `${styles$x.chevron} ${isOpen ? styles$x.chevronOpen : ''}` }))] }), isOpen && hasDropdown && (jsxRuntime.jsxs("div", { className: styles$x.dropdown, role: "listbox", children: [jsxRuntime.jsxs("div", { className: styles$x.dropdownSearch, children: [jsxRuntime.jsxs("svg", { className: styles$x.searchIcon, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }), jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsxRuntime.jsx("input", { ref: searchInputRef, type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search accounts...", className: styles$x.searchInput })] }), jsxRuntime.jsx("div", { className: styles$x.dropdownList, children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxRuntime.jsxs("button", { className: `${styles$x.dropdownItem} ${acc.code === account.code ? styles$x.selected : ''}`, onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsxRuntime.jsx("span", { className: styles$x.dropdownItemCode, children: acc.code }), jsxRuntime.jsx("span", { className: styles$x.dropdownItemName, children: acc.name })] }, acc.code)))) : (jsxRuntime.jsx("div", { className: styles$x.noResults, children: "No accounts found" })) })] }))] }))] }), actions && jsxRuntime.jsx("div", { className: styles$x.actions, children: actions })] }));
|
|
1248
|
+
};
|
|
1249
|
+
Topbar.displayName = 'Topbar';
|
|
1250
|
+
|
|
1251
|
+
var styles$w = {"appLayout":"AppLayout-module_appLayout__NFbZk","mainArea":"AppLayout-module_mainArea__t-6oq","content":"AppLayout-module_content__5kV7S"};
|
|
1252
|
+
|
|
1253
|
+
const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account, defaultExpanded = true, onNavItemClick, onAccountClick, children, navFooter, topbarActions, className, }) => {
|
|
1254
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$w.appLayout} ${className || ''}`, children: [jsxRuntime.jsx(Sidenav, { items: navItems, activeKey: activeNavKey, defaultExpanded: defaultExpanded, onItemClick: onNavItemClick, logo: logo, logoCollapsed: collapsedLogo, footer: navFooter }), jsxRuntime.jsxs("div", { className: styles$w.mainArea, children: [jsxRuntime.jsx(Topbar, { account: account, onAccountClick: onAccountClick, actions: topbarActions }), jsxRuntime.jsx("main", { className: styles$w.content, children: children })] })] }));
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
var styles$v = {"card":"Card-module_card__Ak6-W","default":"Card-module_default__e-M3H","bordered":"Card-module_bordered__pUL4k","elevated":"Card-module_elevated__8f-WS","interactive":"Card-module_interactive__6B4fH","padding-none":"Card-module_padding-none__c1qKN","padding-sm":"Card-module_padding-sm__Uejon","padding-md":"Card-module_padding-md__kR4F9","padding-lg":"Card-module_padding-lg__MleX9","header":"Card-module_header__NiVTV","headerContent":"Card-module_headerContent__LyJRB","title":"Card-module_title__3DN1v","subtitle":"Card-module_subtitle__gE5L-","actions":"Card-module_actions__gHmpq","body":"Card-module_body__BU4oo","footer":"Card-module_footer__zjjTd"};
|
|
1081
1258
|
|
|
1082
1259
|
/**
|
|
1083
1260
|
* Card component for grouping related content.
|
|
1084
1261
|
*/
|
|
1085
1262
|
const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
1086
1263
|
const classNames = [
|
|
1087
|
-
styles$
|
|
1088
|
-
styles$
|
|
1089
|
-
styles$
|
|
1090
|
-
interactive ? styles$
|
|
1264
|
+
styles$v.card,
|
|
1265
|
+
styles$v[variant],
|
|
1266
|
+
styles$v[`padding-${padding}`],
|
|
1267
|
+
interactive ? styles$v.interactive : '',
|
|
1091
1268
|
className,
|
|
1092
1269
|
]
|
|
1093
1270
|
.filter(Boolean)
|
|
@@ -1096,22 +1273,22 @@ const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactiv
|
|
|
1096
1273
|
});
|
|
1097
1274
|
Card.displayName = 'Card';
|
|
1098
1275
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
1099
|
-
const classNames = [styles$
|
|
1100
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1276
|
+
const classNames = [styles$v.header, className].filter(Boolean).join(' ');
|
|
1277
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$v.headerContent, children: [title && jsxRuntime.jsx("h3", { className: styles$v.title, children: title }), subtitle && jsxRuntime.jsx("p", { className: styles$v.subtitle, children: subtitle }), children] }), actions && jsxRuntime.jsx("div", { className: styles$v.actions, children: actions })] }));
|
|
1101
1278
|
};
|
|
1102
1279
|
CardHeader.displayName = 'CardHeader';
|
|
1103
1280
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
1104
|
-
const classNames = [styles$
|
|
1281
|
+
const classNames = [styles$v.body, className].filter(Boolean).join(' ');
|
|
1105
1282
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
1106
1283
|
};
|
|
1107
1284
|
CardBody.displayName = 'CardBody';
|
|
1108
1285
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
1109
|
-
const classNames = [styles$
|
|
1286
|
+
const classNames = [styles$v.footer, className].filter(Boolean).join(' ');
|
|
1110
1287
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
1111
1288
|
};
|
|
1112
1289
|
CardFooter.displayName = 'CardFooter';
|
|
1113
1290
|
|
|
1114
|
-
var styles$
|
|
1291
|
+
var styles$u = {"container":"ContactList-module_container__1kjze","alert":"ContactList-module_alert__KC0tz","card":"ContactList-module_card__TOyp2","header":"ContactList-module_header__QysLx","titleRow":"ContactList-module_titleRow__tUDMS","title":"ContactList-module_title__R-IOd","tooltip":"ContactList-module_tooltip__DDMka","list":"ContactList-module_list__6tjo-","contactItem":"ContactList-module_contactItem__4SoW-","contactInfo":"ContactList-module_contactInfo__6cQpi","contactName":"ContactList-module_contactName__z748K","badge":"ContactList-module_badge__USFpb","badgeSecondary":"ContactList-module_badgeSecondary__OSwqF","contactRole":"ContactList-module_contactRole__6kfuQ","contactDetails":"ContactList-module_contactDetails__ihY0M","contactLink":"ContactList-module_contactLink__sWGp9","contactPhone":"ContactList-module_contactPhone__dUn6z","contactActions":"ContactList-module_contactActions__6WT-z","actionButton":"ContactList-module_actionButton__aPnGZ","actionButtonDanger":"ContactList-module_actionButtonDanger__yRBz0","empty":"ContactList-module_empty__bRTDB","footer":"ContactList-module_footer__18gB-","addButton":"ContactList-module_addButton__STUhp"};
|
|
1115
1292
|
|
|
1116
1293
|
const InfoIcon = () => (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: "10" }), jsxRuntime.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }), jsxRuntime.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })] }));
|
|
1117
1294
|
const EditIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), jsxRuntime.jsx("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })] }));
|
|
@@ -1122,18 +1299,18 @@ const PlusIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", vi
|
|
|
1122
1299
|
*/
|
|
1123
1300
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
1124
1301
|
const listClasses = [
|
|
1125
|
-
styles$
|
|
1302
|
+
styles$u.container,
|
|
1126
1303
|
className,
|
|
1127
1304
|
].filter(Boolean).join(' ');
|
|
1128
|
-
return (jsxRuntime.jsxs("div", { className: listClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$
|
|
1305
|
+
return (jsxRuntime.jsxs("div", { className: listClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$u.alert, children: alert })), jsxRuntime.jsxs("div", { className: styles$u.card, children: [jsxRuntime.jsx("div", { className: styles$u.header, children: jsxRuntime.jsxs("div", { className: styles$u.titleRow, children: [jsxRuntime.jsx("h3", { className: styles$u.title, children: title }), tooltip && (jsxRuntime.jsx("span", { className: styles$u.tooltip, children: jsxRuntime.jsx(InfoIcon, {}) }))] }) }), jsxRuntime.jsxs("div", { className: styles$u.list, children: [contacts.map((contact) => (jsxRuntime.jsxs("div", { className: styles$u.contactItem, children: [jsxRuntime.jsxs("div", { className: styles$u.contactInfo, children: [jsxRuntime.jsxs("div", { className: styles$u.contactName, children: [contact.name, contact.isPrimary && (jsxRuntime.jsx("span", { className: styles$u.badge, children: "Primary" })), contact.isSecondary && (jsxRuntime.jsx("span", { className: `${styles$u.badge} ${styles$u.badgeSecondary}`, children: "Secondary" }))] }), contact.role && (jsxRuntime.jsx("div", { className: styles$u.contactRole, children: contact.role })), jsxRuntime.jsxs("div", { className: styles$u.contactDetails, children: [contact.email && (jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, className: styles$u.contactLink, children: contact.email })), contact.phone && (jsxRuntime.jsx("span", { className: styles$u.contactPhone, children: contact.phone }))] })] }), jsxRuntime.jsxs("div", { className: styles$u.contactActions, children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: styles$u.actionButton, onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsxRuntime.jsx(EditIcon$1, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: `${styles$u.actionButton} ${styles$u.actionButtonDanger}`, onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsxRuntime.jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsxRuntime.jsx("div", { className: styles$u.empty, children: "No contacts added" }))] }), showAdd && onAdd && (jsxRuntime.jsx("div", { className: styles$u.footer, children: jsxRuntime.jsxs("button", { type: "button", className: styles$u.addButton, onClick: onAdd, children: [jsxRuntime.jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
1129
1306
|
};
|
|
1130
1307
|
ContactList.displayName = 'ContactList';
|
|
1131
1308
|
|
|
1132
|
-
var styles$
|
|
1309
|
+
var styles$t = {"container":"Drawer-module_container__hXuOY","backdrop":"Drawer-module_backdrop__MIipQ","fadeIn":"Drawer-module_fadeIn__QsuvQ","backdropOpen":"Drawer-module_backdropOpen__YpH--","drawer":"Drawer-module_drawer__EHbbs","right":"Drawer-module_right__x6P6Q","drawerOpen":"Drawer-module_drawerOpen__KTgFg","left":"Drawer-module_left__aVF9t","top":"Drawer-module_top__wuvhi","bottom":"Drawer-module_bottom__rt-VZ","sizeSm":"Drawer-module_sizeSm__LFrm3","sizeMd":"Drawer-module_sizeMd__A1QTQ","sizeLg":"Drawer-module_sizeLg__6laD8","sizeXl":"Drawer-module_sizeXl__FY9mZ","sizeFull":"Drawer-module_sizeFull__BGQ1q","header":"Drawer-module_header__MpR14","headerContent":"Drawer-module_headerContent__dFcLH","title":"Drawer-module_title__0AmOX","closeButton":"Drawer-module_closeButton__VuXsE","body":"Drawer-module_body__GLUGo","footer":"Drawer-module_footer__K5ekS"};
|
|
1133
1310
|
|
|
1134
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1135
|
-
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1136
|
-
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1311
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: `${styles$t.header} ${className}`, children: [jsxRuntime.jsxs("div", { className: styles$t.headerContent, children: [title && jsxRuntime.jsx("h2", { className: styles$t.title, children: title }), children] }), showClose && (jsxRuntime.jsx("button", { type: "button", className: styles$t.closeButton, onClick: onClose, "aria-label": "Close drawer", children: jsxRuntime.jsx("svg", { width: "20", height: "20", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] }));
|
|
1312
|
+
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$t.body} ${className}`, children: children }));
|
|
1313
|
+
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$t.footer} ${className}`, children: children }));
|
|
1137
1314
|
const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, closeOnBackdropClick = true, closeOnEscape = true, showBackdrop = true, className = '', }) => {
|
|
1138
1315
|
const handleEscape = React.useCallback((e) => {
|
|
1139
1316
|
if (closeOnEscape && e.key === 'Escape') {
|
|
@@ -1157,7 +1334,7 @@ const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, cl
|
|
|
1157
1334
|
};
|
|
1158
1335
|
if (!isOpen)
|
|
1159
1336
|
return null;
|
|
1160
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1337
|
+
return (jsxRuntime.jsxs("div", { className: styles$t.container, children: [showBackdrop && (jsxRuntime.jsx("div", { className: `${styles$t.backdrop} ${isOpen ? styles$t.backdropOpen : ''}`, onClick: handleBackdropClick })), jsxRuntime.jsx("div", { className: `${styles$t.drawer} ${styles$t[position]} ${styles$t[`size${size.charAt(0).toUpperCase()}${size.slice(1)}`]} ${isOpen ? styles$t.drawerOpen : ''} ${className}`, role: "dialog", "aria-modal": "true", children: React.Children.map(children, (child) => {
|
|
1161
1338
|
if (React.isValidElement(child) && child.type === DrawerHeader) {
|
|
1162
1339
|
return React.cloneElement(child, {
|
|
1163
1340
|
onClose,
|
|
@@ -1170,7 +1347,38 @@ Drawer.Header = DrawerHeader;
|
|
|
1170
1347
|
Drawer.Body = DrawerBody;
|
|
1171
1348
|
Drawer.Footer = DrawerFooter;
|
|
1172
1349
|
|
|
1173
|
-
var styles$
|
|
1350
|
+
var styles$s = {"drawer":"DueDatesDrawer-module_drawer__TqC4Q","open":"DueDatesDrawer-module_open__Yblf3","body":"DueDatesDrawer-module_body__OwwF-","search":"DueDatesDrawer-module_search__g7-Rl","cards":"DueDatesDrawer-module_cards__bFG90","empty":"DueDatesDrawer-module_empty__K2ULN","card":"DueDatesDrawer-module_card__4Os-5","cardTitle":"DueDatesDrawer-module_cardTitle__fU-cP","status":"DueDatesDrawer-module_status__dXifz","completed":"DueDatesDrawer-module_completed__jWoYi","pastDue":"DueDatesDrawer-module_pastDue__TSikC","tags":"DueDatesDrawer-module_tags__8P87y","completion":"DueDatesDrawer-module_completion__mIrWm"};
|
|
1351
|
+
|
|
1352
|
+
const isTravelDueDateCompleted = (item) => item.status.trim().toLowerCase() === 'completed' || !!item.completeddatetime;
|
|
1353
|
+
const parseLocalDate$1 = (value) => {
|
|
1354
|
+
const iso = value.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
1355
|
+
if (iso)
|
|
1356
|
+
return new Date(Number(iso[1]), Number(iso[2]) - 1, Number(iso[3]));
|
|
1357
|
+
const date = new Date(value.replace('+0000', ' GMT'));
|
|
1358
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
1359
|
+
};
|
|
1360
|
+
const formatDate$2 = (value, options) => parseLocalDate$1(value)?.toLocaleDateString('en-US', options) ?? 'Invalid Date';
|
|
1361
|
+
const sportColor = (code) => code.toUpperCase().startsWith('W') ? '#FFA99A' : code.toUpperCase().startsWith('X') ? '#D1C1C3' : '#8AC6D9';
|
|
1362
|
+
const DueDateCard = ({ item, onToggle, onTaskClick }) => {
|
|
1363
|
+
const completed = isTravelDueDateCompleted(item);
|
|
1364
|
+
const dueDate = parseLocalDate$1(item.duedate);
|
|
1365
|
+
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
1366
|
+
return (jsxRuntime.jsxs("article", { className: styles$s.card, children: [jsxRuntime.jsxs("div", { className: styles$s.cardTitle, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": `${completed ? 'Reopen' : 'Complete'} ${item.tasktitle}`, className: [styles$s.status, completed ? styles$s.completed : pastDue ? styles$s.pastDue : ''].filter(Boolean).join(' '), onClick: () => onToggle?.(item), children: completed ? jsxRuntime.jsx(CheckIcon$2, { size: 12 }) : null }), jsxRuntime.jsx("h5", { children: item.tasktitle })] }), item.description && jsxRuntime.jsx("p", { children: item.description }), jsxRuntime.jsxs("div", { className: styles$s.tags, children: [jsxRuntime.jsx("span", { style: { backgroundColor: sportColor(item.sportCode) }, children: item.sportCode }), jsxRuntime.jsx("button", { type: "button", disabled: !item.masterTripGUID || !onTaskClick, onClick: () => item.masterTripGUID && onTaskClick?.(item.masterTripGUID), children: item.tripName })] }), completed && item.completeddatetime && jsxRuntime.jsxs("div", { className: styles$s.completion, children: [jsxRuntime.jsx(CheckIcon$2, { size: 14 }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("em", { children: "on" }), " ", formatDate$2(item.completeddatetime, { month: 'numeric', day: 'numeric', year: '2-digit' }), " ", jsxRuntime.jsx("em", { children: "by" }), " ", item.completedby] })] })] }));
|
|
1367
|
+
};
|
|
1368
|
+
/** Hub's searchable, status-aware due-dates drawer. */
|
|
1369
|
+
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
1370
|
+
const [search, setSearch] = React.useState('');
|
|
1371
|
+
const filtered = React.useMemo(() => Object.fromEntries(Object.entries(dueDates).flatMap(([date, items]) => {
|
|
1372
|
+
if (selectedDate && date !== selectedDate)
|
|
1373
|
+
return [];
|
|
1374
|
+
const normalized = search.trim().toLowerCase();
|
|
1375
|
+
const matches = items.filter((item) => (!selectedTrip || item.masterTripGUID === String(selectedTrip)) && (!normalized || item.tasktitle.toLowerCase().includes(normalized) || item.sportCode.toLowerCase().includes(normalized) || item.description.toLowerCase().includes(normalized)));
|
|
1376
|
+
return matches.length ? [[date, matches]] : [];
|
|
1377
|
+
})), [dueDates, search, selectedDate, selectedTrip]);
|
|
1378
|
+
return (jsxRuntime.jsxs("aside", { className: [styles$s.drawer, isOpen ? styles$s.open : '', className].filter(Boolean).join(' '), "aria-hidden": !isOpen, "aria-label": "Due Dates", children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("h3", { children: "Due Dates" }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Close due dates", onClick: onClose, children: jsxRuntime.jsx(CloseIcon, { size: 24 }) })] }), jsxRuntime.jsxs("div", { className: styles$s.body, children: [jsxRuntime.jsxs("label", { className: styles$s.search, children: [jsxRuntime.jsx(SearchIcon$1, { size: 16 }), jsxRuntime.jsx("input", { type: "search", placeholder: "Search", value: search, onChange: (event) => setSearch(event.target.value) })] }), !Object.keys(filtered).length ? jsxRuntime.jsx("div", { className: styles$s.empty, children: "No due dates found." }) : Object.entries(filtered).map(([date, items]) => (jsxRuntime.jsxs("section", { children: [jsxRuntime.jsx("h4", { children: formatDate$2(date, { month: 'long', day: 'numeric', year: 'numeric' }) }), jsxRuntime.jsx("div", { className: styles$s.cards, children: items.map((item) => jsxRuntime.jsx(DueDateCard, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
1379
|
+
};
|
|
1380
|
+
|
|
1381
|
+
var styles$r = {"container":"MembershipPrograms-module_container__qsGZu","loading":"MembershipPrograms-module_loading__tjDtr","alert":"MembershipPrograms-module_alert__GZc0f","header":"MembershipPrograms-module_header__ywXOE","title":"MembershipPrograms-module_title__WZGyt","addButton":"MembershipPrograms-module_addButton__rNlNb","empty":"MembershipPrograms-module_empty__pYrHW","list":"MembershipPrograms-module_list__8A9MG","group":"MembershipPrograms-module_group__v1Vc6","groupHeader":"MembershipPrograms-module_groupHeader__I5KJO","groupIcon":"MembershipPrograms-module_groupIcon__e1LIq","groupLabel":"MembershipPrograms-module_groupLabel__Wqift","programs":"MembershipPrograms-module_programs__hxHXQ","program":"MembershipPrograms-module_program__S3HTM","programInfo":"MembershipPrograms-module_programInfo__RJruG","programProvider":"MembershipPrograms-module_programProvider__c7enz","programName":"MembershipPrograms-module_programName__TN42s","programNumber":"MembershipPrograms-module_programNumber__GKav4","programStatus":"MembershipPrograms-module_programStatus__2imvX","programActions":"MembershipPrograms-module_programActions__36LkY","actionButton":"MembershipPrograms-module_actionButton__y-GI4","removeButton":"MembershipPrograms-module_removeButton__cTTuZ"};
|
|
1174
1382
|
|
|
1175
1383
|
const PlaneIcon$2 = () => (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("path", { d: "M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5Z" }) }));
|
|
1176
1384
|
const HotelIcon$2 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M3 21h18" }), jsxRuntime.jsx("path", { d: "M19 21V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v16" }), jsxRuntime.jsx("path", { d: "M9 21v-4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v4" })] }));
|
|
@@ -1196,8 +1404,8 @@ const TYPE_LABELS = {
|
|
|
1196
1404
|
*/
|
|
1197
1405
|
const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, onRemove, onAdd, alert, isLoading = false, emptyMessage = 'No membership programs added', className = '', }) => {
|
|
1198
1406
|
const containerClasses = [
|
|
1199
|
-
styles$
|
|
1200
|
-
isLoading ? styles$
|
|
1407
|
+
styles$r.container,
|
|
1408
|
+
isLoading ? styles$r.loading : '',
|
|
1201
1409
|
className,
|
|
1202
1410
|
].filter(Boolean).join(' ');
|
|
1203
1411
|
const groupedPrograms = programs.reduce((acc, program) => {
|
|
@@ -1208,30 +1416,30 @@ const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, o
|
|
|
1208
1416
|
return acc;
|
|
1209
1417
|
}, {});
|
|
1210
1418
|
const typeOrder = ['airline', 'hotel', 'car', 'other'];
|
|
1211
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, children: [alert && jsxRuntime.jsx("div", { className: styles$
|
|
1419
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, children: [alert && jsxRuntime.jsx("div", { className: styles$r.alert, children: alert }), jsxRuntime.jsxs("div", { className: styles$r.header, children: [jsxRuntime.jsx("h2", { className: styles$r.title, children: title }), onAdd && (jsxRuntime.jsxs("button", { type: "button", className: styles$r.addButton, onClick: onAdd, "aria-label": "Add membership program", children: [jsxRuntime.jsx(PlusIcon, {}), jsxRuntime.jsx("span", { children: "Add Program" })] }))] }), programs.length === 0 ? (jsxRuntime.jsx("div", { className: styles$r.empty, children: jsxRuntime.jsx("p", { children: emptyMessage }) })) : (jsxRuntime.jsx("div", { className: styles$r.list, children: typeOrder.map((type) => {
|
|
1212
1420
|
const typePrograms = groupedPrograms[type];
|
|
1213
1421
|
if (!typePrograms || typePrograms.length === 0)
|
|
1214
1422
|
return null;
|
|
1215
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1423
|
+
return (jsxRuntime.jsxs("div", { className: styles$r.group, children: [jsxRuntime.jsxs("div", { className: styles$r.groupHeader, children: [jsxRuntime.jsx("span", { className: styles$r.groupIcon, children: TYPE_ICONS[type] }), jsxRuntime.jsx("span", { className: styles$r.groupLabel, children: TYPE_LABELS[type] })] }), jsxRuntime.jsx("div", { className: styles$r.programs, children: typePrograms.map((program) => (jsxRuntime.jsxs("div", { className: styles$r.program, children: [jsxRuntime.jsxs("div", { className: styles$r.programInfo, children: [jsxRuntime.jsx("div", { className: styles$r.programProvider, children: program.provider }), program.programName && (jsxRuntime.jsx("div", { className: styles$r.programName, children: program.programName })), jsxRuntime.jsx("div", { className: styles$r.programNumber, children: program.membershipNumber }), program.status && (jsxRuntime.jsx("div", { className: styles$r.programStatus, children: program.status }))] }), jsxRuntime.jsxs("div", { className: styles$r.programActions, children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: styles$r.actionButton, onClick: () => onEdit(program), "aria-label": `Edit ${program.provider} program`, children: jsxRuntime.jsx(EditIcon, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: [styles$r.actionButton, styles$r.removeButton].join(' '), onClick: () => onRemove(program), "aria-label": `Remove ${program.provider} program`, children: jsxRuntime.jsx(TrashIcon, {}) }))] })] }, program.id))) })] }, type));
|
|
1216
1424
|
}) }))] }));
|
|
1217
1425
|
};
|
|
1218
1426
|
MembershipPrograms.displayName = 'MembershipPrograms';
|
|
1219
1427
|
|
|
1220
|
-
var styles$
|
|
1428
|
+
var styles$q = {"stats":"ManifestCapacityStats-module_stats__BA5-o","stat":"ManifestCapacityStats-module_stat__qLJtb","labelRow":"ManifestCapacityStats-module_labelRow__iDQqn","label":"ManifestCapacityStats-module_label__5BRoZ","value":"ManifestCapacityStats-module_value__4hiE5","sub":"ManifestCapacityStats-module_sub__w7djZ","warningText":"ManifestCapacityStats-module_warningText__CZZ9a","warningIcon":"ManifestCapacityStats-module_warningIcon__NoXmW","alertIcon":"ManifestCapacityStats-module_alertIcon__h0QHJ","meter":"ManifestCapacityStats-module_meter__DrUuq","meterFill":"ManifestCapacityStats-module_meterFill__v7zKW","meterOver":"ManifestCapacityStats-module_meterOver__UqigI","alert":"ManifestCapacityStats-module_alert__vwkBX"};
|
|
1221
1429
|
|
|
1222
1430
|
const Stat = ({ label, value, sub, meterValue, meterMax, warn = false }) => {
|
|
1223
1431
|
const ratio = meterMax > 0 ? Math.min(100, Math.max(0, (meterValue / meterMax) * 100)) : 0;
|
|
1224
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1432
|
+
return (jsxRuntime.jsxs("div", { className: styles$q.stat, children: [jsxRuntime.jsxs("div", { className: styles$q.labelRow, children: [jsxRuntime.jsx("span", { className: styles$q.label, children: label }), warn && jsxRuntime.jsx(WarningIcon$1, { size: 14, className: styles$q.warningIcon, "aria-label": `${label} warning` })] }), jsxRuntime.jsx("div", { className: [styles$q.value, warn ? styles$q.warningText : ''].filter(Boolean).join(' '), children: value }), jsxRuntime.jsx("div", { className: styles$q.sub, children: sub }), jsxRuntime.jsx("div", { className: styles$q.meter, "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: [styles$q.meterFill, warn ? styles$q.meterOver : ''].filter(Boolean).join(' '), style: { width: `${ratio}%` } }) })] }));
|
|
1225
1433
|
};
|
|
1226
1434
|
/** Advisory seat and payload meters from Hub's charter manifest. */
|
|
1227
1435
|
const ManifestCapacityStats = ({ paxCount, seats, paxWeight, cargoWeight, payloadLimit, className = '', }) => {
|
|
1228
1436
|
const totalWeight = paxWeight + cargoWeight;
|
|
1229
1437
|
const overSeats = seats > 0 && paxCount > seats;
|
|
1230
1438
|
const overPayload = payloadLimit > 0 && totalWeight > payloadLimit;
|
|
1231
|
-
return (jsxRuntime.jsxs("div", { className: className, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1439
|
+
return (jsxRuntime.jsxs("div", { className: className, children: [jsxRuntime.jsxs("div", { className: styles$q.stats, children: [jsxRuntime.jsx(Stat, { label: "Seats", value: `${paxCount} / ${seats}`, sub: overSeats ? `${paxCount - seats} over capacity` : `${Math.max(0, seats - paxCount)} seats open`, meterValue: paxCount, meterMax: seats, warn: overSeats }), jsxRuntime.jsx(Stat, { label: "Passenger weight", value: `${paxWeight.toLocaleString()} lb`, sub: `${paxCount} passengers`, meterValue: paxWeight, meterMax: payloadLimit }), jsxRuntime.jsx(Stat, { label: "Cargo weight", value: `${cargoWeight.toLocaleString()} lb`, sub: "Equipment + bags", meterValue: cargoWeight, meterMax: payloadLimit }), jsxRuntime.jsx(Stat, { label: "Total payload", value: `${totalWeight.toLocaleString()} lb`, sub: overPayload ? `${(totalWeight - payloadLimit).toLocaleString()} lb over limit` : `Limit ${payloadLimit.toLocaleString()} lb`, meterValue: totalWeight, meterMax: payloadLimit, warn: overPayload })] }), (overSeats || overPayload) && (jsxRuntime.jsxs("div", { className: styles$q.alert, role: "alert", children: [jsxRuntime.jsx(WarningIcon$1, { size: 20, className: styles$q.alertIcon }), jsxRuntime.jsxs("div", { children: [overSeats && (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: "Over seat capacity." }), " Remove ", paxCount - seats, " passenger(s) or split the manifest by segment."] })), overPayload && (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: "Over the contracted payload." }), " Total payload exceeds the quoted maximum \u2014 coordinate with the team/client and confirm with the carrier before sending."] }))] })] }))] }));
|
|
1232
1440
|
};
|
|
1233
1441
|
|
|
1234
|
-
var styles$
|
|
1442
|
+
var styles$p = {"overlay":"Modal-module_overlay__n7Paz","fadeIn":"Modal-module_fadeIn__upWKg","modal":"Modal-module_modal__YZQ-K","slideIn":"Modal-module_slideIn__mtAFr","sm":"Modal-module_sm__QSWSJ","md":"Modal-module_md__6t9J8","lg":"Modal-module_lg__5r3uQ","xl":"Modal-module_xl__JPpjn","full":"Modal-module_full__y9leS","header":"Modal-module_header__xTw6j","title":"Modal-module_title__KvPHy","closeButton":"Modal-module_closeButton__JoRui","body":"Modal-module_body__K3swC","footer":"Modal-module_footer__Z1UcB","footerButtons":"Modal-module_footerButtons__u-Ayv","confirmMessage":"Modal-module_confirmMessage__ZlKV8"};
|
|
1235
1443
|
|
|
1236
1444
|
const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton = true, closeOnBackdropClick = true, closeOnEscape = true, footer, className = '', }) => {
|
|
1237
1445
|
const handleEscape = React.useCallback((e) => {
|
|
@@ -1256,12 +1464,12 @@ const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton
|
|
|
1256
1464
|
};
|
|
1257
1465
|
if (!isOpen)
|
|
1258
1466
|
return null;
|
|
1259
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
1467
|
+
return (jsxRuntime.jsx("div", { className: styles$p.overlay, onClick: handleBackdropClick, children: jsxRuntime.jsxs("div", { className: `${styles$p.modal} ${styles$p[size]} ${className}`, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? 'modal-title' : undefined, children: [(title || showCloseButton) && (jsxRuntime.jsxs("div", { className: styles$p.header, children: [title && (jsxRuntime.jsx("h2", { id: "modal-title", className: styles$p.title, children: title })), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: styles$p.closeButton, onClick: onClose, "aria-label": "Close modal", children: jsxRuntime.jsx("svg", { width: "20", height: "20", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] })), jsxRuntime.jsx("div", { className: styles$p.body, children: children }), footer && jsxRuntime.jsx("div", { className: styles$p.footer, children: footer })] }) }));
|
|
1260
1468
|
};
|
|
1261
|
-
const ModalFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1262
|
-
const ConfirmModal = ({ message, confirmText = 'Confirm', cancelText = 'Cancel', onConfirm, onClose, destructive = false, loading = false, ...props }) => (jsxRuntime.jsx(Modal, { ...props, onClose: onClose, size: "sm", footer: jsxRuntime.jsxs(ModalFooter, { children: [jsxRuntime.jsx(Button, { variant: "secondary", onClick: onClose, children: cancelText }), jsxRuntime.jsx(Button, { variant: destructive ? 'danger' : 'primary', onClick: onConfirm, disabled: loading, children: loading ? 'Loading...' : confirmText })] }), children: jsxRuntime.jsx("div", { className: styles$
|
|
1469
|
+
const ModalFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$p.footerButtons} ${className}`, children: children }));
|
|
1470
|
+
const ConfirmModal = ({ message, confirmText = 'Confirm', cancelText = 'Cancel', onConfirm, onClose, destructive = false, loading = false, ...props }) => (jsxRuntime.jsx(Modal, { ...props, onClose: onClose, size: "sm", footer: jsxRuntime.jsxs(ModalFooter, { children: [jsxRuntime.jsx(Button, { variant: "secondary", onClick: onClose, children: cancelText }), jsxRuntime.jsx(Button, { variant: destructive ? 'danger' : 'primary', onClick: onConfirm, disabled: loading, children: loading ? 'Loading...' : confirmText })] }), children: jsxRuntime.jsx("div", { className: styles$p.confirmMessage, children: message }) }));
|
|
1263
1471
|
|
|
1264
|
-
var styles$
|
|
1472
|
+
var styles$o = {"module":"Module-module_module__1Lglz","header":"Module-module_header__-qP6m","closed":"Module-module_closed__J5FYJ","sm":"Module-module_sm__g-iVI","md":"Module-module_md__zmKQE","lg":"Module-module_lg__5uVgV","titleRow":"Module-module_titleRow__3upJc","icon":"Module-module_icon__MXVy7","iconSpaced":"Module-module_iconSpaced__O8F0i","title":"Module-module_title__Qdyv0","badge":"Module-module_badge__zoNEC","tools":"Module-module_tools__w6Z1b","toggleBtn":"Module-module_toggleBtn__VxH2u","bodyWrapper":"Module-module_bodyWrapper__IogVT","body":"Module-module_body__O9n9B","hidden":"Module-module_hidden__mmUYg","footer":"Module-module_footer__hrUY9","divider":"Module-module_divider__YQKdf","dark":"Module-module_dark__w8Fb-","verticalDivider":"Module-module_verticalDivider__t3g-3"};
|
|
1265
1473
|
|
|
1266
1474
|
const ChevronIcon = ({ direction }) => (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", style: { transform: direction === 'up' ? 'rotate(180deg)' : 'none' }, children: jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
1267
1475
|
/**
|
|
@@ -1283,19 +1491,19 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
1283
1491
|
setOpen(!open);
|
|
1284
1492
|
}
|
|
1285
1493
|
};
|
|
1286
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1494
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$o.module} ${className}`, children: [title && (jsxRuntime.jsx("div", { className: `${styles$o.header} ${styles$o[size]} ${!open ? styles$o.closed : ''} ${headerClassName}`, children: jsxRuntime.jsxs("div", { className: `${styles$o.titleRow} ${styles$o[size]} ${titleClassName}`, children: [icon && (jsxRuntime.jsx("span", { className: `${styles$o.icon} ${size === 'sm' ? '' : styles$o.iconSpaced} ${iconClassName}`, children: icon })), jsxRuntime.jsx("span", { className: styles$o.title, children: title }), badge && jsxRuntime.jsx("span", { className: styles$o.badge, children: badge }), jsxRuntime.jsxs("div", { className: styles$o.tools, children: [tools, useToggle && (jsxRuntime.jsx("button", { type: "button", className: styles$o.toggleBtn, onClick: handleToggle, "aria-expanded": open, children: jsxRuntime.jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxRuntime.jsxs("div", { className: styles$o.bodyWrapper, children: [before, jsxRuntime.jsx("div", { className: `${styles$o.body} ${styles$o[size]} ${!open ? styles$o.hidden : ''} ${bodyClassName}`, children: children }), after] }), footer && (jsxRuntime.jsx("div", { className: `${styles$o.footer} ${!open ? styles$o.hidden : ''}`, children: footer }))] }));
|
|
1287
1495
|
};
|
|
1288
1496
|
/**
|
|
1289
1497
|
* Horizontal divider for Module content
|
|
1290
1498
|
*/
|
|
1291
|
-
const ModuleDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("hr", { className: `${styles$
|
|
1499
|
+
const ModuleDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("hr", { className: `${styles$o.divider} ${dark ? styles$o.dark : ''} ${className}` }));
|
|
1292
1500
|
/**
|
|
1293
1501
|
* Vertical divider for Module content
|
|
1294
1502
|
*/
|
|
1295
|
-
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1503
|
+
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$o.verticalDivider} ${dark ? styles$o.dark : ''} ${className}` }));
|
|
1296
1504
|
Module.displayName = 'Module';
|
|
1297
1505
|
|
|
1298
|
-
var styles$
|
|
1506
|
+
var styles$n = {"stack":"PageBanners-module_stack__v6nwz","banner":"PageBanners-module_banner__8lgnU","system":"PageBanners-module_system__Xiqoe","alert":"PageBanners-module_alert__O2lYb","systemIcon":"PageBanners-module_systemIcon__su3aG","alertIcon":"PageBanners-module_alertIcon__owy3V","alertTitle":"PageBanners-module_alertTitle__zeo3d","alertDismiss":"PageBanners-module_alertDismiss__2JI9V","content":"PageBanners-module_content__ZHLA9","title":"PageBanners-module_title__-53EA","detail":"PageBanners-module_detail__xgNJE","clamp":"PageBanners-module_clamp__iWIIp","alertLink":"PageBanners-module_alertLink__mxQM5","dismiss":"PageBanners-module_dismiss__aWRXw"};
|
|
1299
1507
|
|
|
1300
1508
|
const decodeEntities = (value) => {
|
|
1301
1509
|
if (typeof document === 'undefined')
|
|
@@ -1322,13 +1530,13 @@ const PageBanners = ({ systemBanners, alertBanners, className = '', }) => {
|
|
|
1322
1530
|
const visibleAlerts = alertBanners.filter((banner) => !dismissed.has(banner.id));
|
|
1323
1531
|
if (!visibleSystem.length && !visibleAlerts.length)
|
|
1324
1532
|
return null;
|
|
1325
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1326
|
-
const content = (jsxRuntime.jsxs("div", { className: styles$
|
|
1327
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1533
|
+
return (jsxRuntime.jsxs("div", { className: [styles$n.stack, className].filter(Boolean).join(' '), role: "region", "aria-label": "Page notices", children: [visibleSystem.map((banner) => (jsxRuntime.jsxs("div", { className: [styles$n.banner, styles$n.system].join(' '), role: "status", children: [jsxRuntime.jsx(InfoIcon$1, { className: styles$n.systemIcon, size: 20, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { className: styles$n.content, children: [jsxRuntime.jsx("p", { className: styles$n.title, dangerouslySetInnerHTML: { __html: banner.html } }), banner.detailHtml && (jsxRuntime.jsx("p", { className: styles$n.detail, dangerouslySetInnerHTML: { __html: banner.detailHtml } }))] }), jsxRuntime.jsx("button", { type: "button", className: styles$n.dismiss, "aria-label": "Dismiss notice", onClick: () => dismiss(banner.id), children: jsxRuntime.jsx(CloseIcon, { size: 16 }) })] }, banner.id))), visibleAlerts.map((banner) => {
|
|
1534
|
+
const content = (jsxRuntime.jsxs("div", { className: styles$n.content, children: [jsxRuntime.jsx("p", { className: [styles$n.title, styles$n.alertTitle].join(' '), children: decodeEntities(banner.title) }), banner.body && jsxRuntime.jsx("p", { className: [styles$n.detail, styles$n.clamp].join(' '), children: decodeEntities(banner.body) })] }));
|
|
1535
|
+
return (jsxRuntime.jsxs("div", { className: [styles$n.banner, styles$n.alert].join(' '), role: "alert", children: [jsxRuntime.jsx(WarningIcon$1, { className: styles$n.alertIcon, size: 20, "aria-hidden": "true" }), banner.href ? (jsxRuntime.jsx("a", { href: banner.href, className: styles$n.alertLink, children: content })) : (content), jsxRuntime.jsx("button", { type: "button", className: [styles$n.dismiss, styles$n.alertDismiss].join(' '), "aria-label": "Dismiss alert", onClick: () => dismiss(banner.id), children: jsxRuntime.jsx(CloseIcon, { size: 16 }) })] }, banner.id));
|
|
1328
1536
|
})] }));
|
|
1329
1537
|
};
|
|
1330
1538
|
|
|
1331
|
-
var styles$
|
|
1539
|
+
var styles$m = {"panel":"PreferencesPanel-module_panel__xsxcw","loading":"PreferencesPanel-module_loading__GopYy","alert":"PreferencesPanel-module_alert__9yYz3","title":"PreferencesPanel-module_title__Z5dpP","grid":"PreferencesPanel-module_grid__e0urP","section":"PreferencesPanel-module_section__6cbAx","sectionHeader":"PreferencesPanel-module_sectionHeader__X6e5h","sectionIcon":"PreferencesPanel-module_sectionIcon__jVJwn","sectionTitle":"PreferencesPanel-module_sectionTitle__29M-O","fields":"PreferencesPanel-module_fields__rryQ3","field":"PreferencesPanel-module_field__W3Z9z","fieldLabel":"PreferencesPanel-module_fieldLabel__usgRa","fieldValue":"PreferencesPanel-module_fieldValue__AEJ1C","fieldInput":"PreferencesPanel-module_fieldInput__rS8OR","footer":"PreferencesPanel-module_footer__qTYqi"};
|
|
1332
1540
|
|
|
1333
1541
|
const PlaneIcon$1 = () => (jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("path", { d: "M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5Z" }) }));
|
|
1334
1542
|
const BusIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("rect", { x: "4", y: "4", width: "16", height: "14", rx: "2" }), jsxRuntime.jsx("path", { d: "M8 6v6" }), jsxRuntime.jsx("path", { d: "M16 6v6" }), jsxRuntime.jsx("circle", { cx: "8", cy: "16", r: "1" }), jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "1" })] }));
|
|
@@ -1343,15 +1551,15 @@ const DEFAULT_ICONS = {
|
|
|
1343
1551
|
*/
|
|
1344
1552
|
const PreferencesPanel = ({ title, sections, alert, footer, isLoading = false, className = '', }) => {
|
|
1345
1553
|
const panelClasses = [
|
|
1346
|
-
styles$
|
|
1347
|
-
isLoading ? styles$
|
|
1554
|
+
styles$m.panel,
|
|
1555
|
+
isLoading ? styles$m.loading : '',
|
|
1348
1556
|
className,
|
|
1349
1557
|
].filter(Boolean).join(' ');
|
|
1350
|
-
return (jsxRuntime.jsxs("div", { className: panelClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$
|
|
1558
|
+
return (jsxRuntime.jsxs("div", { className: panelClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$m.alert, children: alert })), title && jsxRuntime.jsx("h2", { className: styles$m.title, children: title }), jsxRuntime.jsx("div", { className: styles$m.grid, children: sections.map((section, i) => (jsxRuntime.jsxs("div", { className: styles$m.section, children: [jsxRuntime.jsxs("div", { className: styles$m.sectionHeader, children: [(section.icon || DEFAULT_ICONS[section.title.toLowerCase()]) && (jsxRuntime.jsx("span", { className: styles$m.sectionIcon, children: section.icon || DEFAULT_ICONS[section.title.toLowerCase()] })), jsxRuntime.jsx("h3", { className: styles$m.sectionTitle, children: section.title })] }), jsxRuntime.jsx("div", { className: styles$m.fields, children: section.fields.map((field, j) => (jsxRuntime.jsxs("div", { className: styles$m.field, children: [jsxRuntime.jsx("label", { className: styles$m.fieldLabel, children: field.label }), field.input ? (jsxRuntime.jsx("div", { className: styles$m.fieldInput, children: field.input })) : (jsxRuntime.jsx("div", { className: styles$m.fieldValue, children: field.value || '—' }))] }, j))) })] }, i))) }), footer && (jsxRuntime.jsx("div", { className: styles$m.footer, children: footer }))] }));
|
|
1351
1559
|
};
|
|
1352
1560
|
PreferencesPanel.displayName = 'PreferencesPanel';
|
|
1353
1561
|
|
|
1354
|
-
var styles$
|
|
1562
|
+
var styles$l = {"summary":"RequestSummary-module_summary__nxews","title":"RequestSummary-module_title__NAq53","submissionInfo":"RequestSummary-module_submissionInfo__dwkaf","label":"RequestSummary-module_label__pGo-5","value":"RequestSummary-module_value__F8m9g","sections":"RequestSummary-module_sections__uWXtM","section":"RequestSummary-module_section__TlxbY","sectionTitle":"RequestSummary-module_sectionTitle__iMPB2","segment":"RequestSummary-module_segment__xq-Lp","segmentTitle":"RequestSummary-module_segmentTitle__ey5-f","row":"RequestSummary-module_row__tfJzQ","empty":"RequestSummary-module_empty__fzxmd"};
|
|
1355
1563
|
|
|
1356
1564
|
/**
|
|
1357
1565
|
* SummaryItem component displays a single label-value pair.
|
|
@@ -1360,7 +1568,7 @@ const SummaryItemRow = ({ item, value }) => {
|
|
|
1360
1568
|
if (!value)
|
|
1361
1569
|
return null;
|
|
1362
1570
|
const formattedValue = item.format ? item.format(value) : String(value);
|
|
1363
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1571
|
+
return (jsxRuntime.jsxs("div", { className: styles$l.row, children: [jsxRuntime.jsx("span", { className: styles$l.label, children: item.label }), jsxRuntime.jsx("span", { className: styles$l.value, children: formattedValue })] }));
|
|
1364
1572
|
};
|
|
1365
1573
|
/**
|
|
1366
1574
|
* SummarySection component for a group of related summary items.
|
|
@@ -1371,7 +1579,7 @@ const SummarySection = ({ section, values }) => {
|
|
|
1371
1579
|
const hasSegments = section.segments?.some(seg => seg.items.some(item => values[`${section.key}_${seg.label}_${item.label}`] || values[item.label]));
|
|
1372
1580
|
if (!hasItems && !hasSegments)
|
|
1373
1581
|
return null;
|
|
1374
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1582
|
+
return (jsxRuntime.jsxs("div", { className: styles$l.section, children: [jsxRuntime.jsx("h3", { className: styles$l.sectionTitle, children: section.title }), section.items?.map((item, i) => (jsxRuntime.jsx(SummaryItemRow, { item: item, value: values[item.label] || values[`${section.key}_${item.label}`] }, i))), section.segments?.map((segment, i) => (jsxRuntime.jsxs("div", { className: styles$l.segment, children: [jsxRuntime.jsx("h4", { className: styles$l.segmentTitle, children: segment.label }), segment.items.map((item, j) => (jsxRuntime.jsx(SummaryItemRow, { item: item, value: values[`${section.key}_${segment.label}_${item.label}`] || values[item.label] }, j)))] }, i)))] }));
|
|
1375
1583
|
};
|
|
1376
1584
|
/**
|
|
1377
1585
|
* RequestSummary component for displaying a summary of travel request form data.
|
|
@@ -1379,47 +1587,39 @@ const SummarySection = ({ section, values }) => {
|
|
|
1379
1587
|
*/
|
|
1380
1588
|
const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo, className, title = 'Request Summary', }) => {
|
|
1381
1589
|
const visibleSections = sections.filter(section => enabledSections[section.key] !== false);
|
|
1382
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1590
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$l.summary} ${className || ''}`, children: [jsxRuntime.jsx("h2", { className: styles$l.title, children: title }), submissionInfo && (jsxRuntime.jsxs("div", { className: styles$l.submissionInfo, children: [jsxRuntime.jsx("span", { className: styles$l.label, children: "Submitted by" }), jsxRuntime.jsx("span", { className: styles$l.value, children: submissionInfo.submittedBy }), jsxRuntime.jsx("span", { className: styles$l.label, children: "on" }), jsxRuntime.jsx("span", { className: styles$l.value, children: submissionInfo.submittedOn })] })), jsxRuntime.jsx("div", { className: styles$l.sections, children: visibleSections.map((section) => (jsxRuntime.jsx(SummarySection, { section: section, values: values }, section.key))) }), visibleSections.length === 0 && (jsxRuntime.jsx("p", { className: styles$l.empty, children: "No services selected" }))] }));
|
|
1383
1591
|
};
|
|
1384
1592
|
RequestSummary.displayName = 'RequestSummary';
|
|
1385
1593
|
|
|
1386
|
-
var styles$
|
|
1594
|
+
var styles$k = {"layout":"RequestFormLayout-module_layout__R-vaM","header":"RequestFormLayout-module_header__705In","headerContent":"RequestFormLayout-module_headerContent__Uu0br","headerTitle":"RequestFormLayout-module_headerTitle__W-fub","pagination":"RequestFormLayout-module_pagination__hTpNr","separator":"RequestFormLayout-module_separator__BgEsp","eventName":"RequestFormLayout-module_eventName__1zpgS","headerRight":"RequestFormLayout-module_headerRight__VjjY3","body":"RequestFormLayout-module_body__RBH8O","sidebar":"RequestFormLayout-module_sidebar__Ozr7m","showOnMobile":"RequestFormLayout-module_showOnMobile__kyyER","sidebarContent":"RequestFormLayout-module_sidebarContent__IdoMX","main":"RequestFormLayout-module_main__132ss","mainContent":"RequestFormLayout-module_mainContent__vnp1R","summarySidebar":"RequestFormLayout-module_summarySidebar__Vfg-z","summaryContent":"RequestFormLayout-module_summaryContent__Oppnd","footer":"RequestFormLayout-module_footer__yxDM5","footerContent":"RequestFormLayout-module_footerContent__GmTkE","button":"RequestFormLayout-module_button__-iWUv","primary":"RequestFormLayout-module_primary__cs2Fb","secondary":"RequestFormLayout-module_secondary__9WNRX"};
|
|
1387
1595
|
|
|
1388
1596
|
/**
|
|
1389
|
-
*
|
|
1390
|
-
* Supports expanded and collapsed states with icons and labels.
|
|
1597
|
+
* RequestFormHeader component for the fixed header in travel request forms.
|
|
1391
1598
|
*/
|
|
1392
|
-
const
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
styles$j.sidenav,
|
|
1396
|
-
expanded ? styles$j.expanded : styles$j.collapsed,
|
|
1397
|
-
className,
|
|
1398
|
-
]
|
|
1399
|
-
.filter(Boolean)
|
|
1400
|
-
.join(' ');
|
|
1401
|
-
const handleItemClick = (item) => {
|
|
1402
|
-
if (item.onClick) {
|
|
1403
|
-
item.onClick();
|
|
1404
|
-
}
|
|
1405
|
-
if (onItemClick) {
|
|
1406
|
-
onItemClick(item.key);
|
|
1407
|
-
}
|
|
1408
|
-
};
|
|
1409
|
-
return (jsxRuntime.jsxs("aside", { className: classNames, ...props, children: [jsxRuntime.jsx("button", { className: styles$j.toggle, onClick: () => setExpanded(!expanded), "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', children: expanded ? (jsxRuntime.jsx(ChevronLeftIcon, { size: 16 })) : (jsxRuntime.jsx(ChevronRightIcon$1, { size: 16 })) }), jsxRuntime.jsx("div", { className: styles$j.logoContainer, children: expanded ? logo : logoCollapsed || logo }), jsxRuntime.jsx("nav", { className: styles$j.nav, children: items.map((item) => {
|
|
1410
|
-
const isActive = item.key === activeKey;
|
|
1411
|
-
const itemClasses = [
|
|
1412
|
-
styles$j.navItem,
|
|
1413
|
-
isActive ? styles$j.active : '',
|
|
1414
|
-
]
|
|
1415
|
-
.filter(Boolean)
|
|
1416
|
-
.join(' ');
|
|
1417
|
-
return (jsxRuntime.jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsxRuntime.jsx("span", { className: styles$j.icon, children: item.icon }), expanded && jsxRuntime.jsx("span", { className: styles$j.label, children: item.label })] }, item.key));
|
|
1418
|
-
}) }), footer && jsxRuntime.jsx("div", { className: styles$j.footer, children: footer })] }));
|
|
1599
|
+
const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightContent, className, }) => {
|
|
1600
|
+
const showPagination = currentPage !== undefined && totalPages !== undefined && totalPages > 1;
|
|
1601
|
+
return (jsxRuntime.jsx("header", { className: `${styles$k.header} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$k.headerContent, children: [jsxRuntime.jsxs("h1", { className: styles$k.headerTitle, children: [title, showPagination && (jsxRuntime.jsxs("span", { className: styles$k.pagination, children: ["(", currentPage, "/", totalPages, ")"] })), eventName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: styles$k.separator, children: "\u2013" }), jsxRuntime.jsx("span", { className: styles$k.eventName, children: eventName })] }))] }), rightContent && jsxRuntime.jsx("div", { className: styles$k.headerRight, children: rightContent })] }) }));
|
|
1419
1602
|
};
|
|
1420
|
-
|
|
1603
|
+
/**
|
|
1604
|
+
* RequestFormFooter component for the fixed footer with navigation buttons.
|
|
1605
|
+
*/
|
|
1606
|
+
const RequestFormFooter = ({ onPrevious, onNext, isFirstPage = false, isLastPage = false, isSubmitting = false, previousText, nextText, className, }) => {
|
|
1607
|
+
const prevLabel = previousText || (isFirstPage ? 'Cancel' : 'Previous');
|
|
1608
|
+
const nextLabel = nextText || (isLastPage ? 'Submit' : 'Next');
|
|
1609
|
+
return (jsxRuntime.jsx("footer", { className: `${styles$k.footer} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$k.footerContent, children: [jsxRuntime.jsx("button", { type: "button", className: `${styles$k.button} ${styles$k.secondary}`, onClick: onPrevious, disabled: isSubmitting, children: prevLabel }), jsxRuntime.jsx("button", { type: "button", className: `${styles$k.button} ${styles$k.primary}`, onClick: onNext, disabled: isSubmitting, children: isSubmitting ? 'Submitting...' : nextLabel })] }) }));
|
|
1610
|
+
};
|
|
1611
|
+
/**
|
|
1612
|
+
* RequestFormLayout organism for travel request forms.
|
|
1613
|
+
* Provides a three-column layout with fixed header and footer.
|
|
1614
|
+
*/
|
|
1615
|
+
const RequestFormLayout = ({ header, sidebar, children, summary, footer, className, showSidebarOnMobile = false, }) => {
|
|
1616
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$k.layout} ${className || ''}`, children: [header, jsxRuntime.jsxs("div", { className: styles$k.body, children: [sidebar && (jsxRuntime.jsx("aside", { className: `${styles$k.sidebar} ${showSidebarOnMobile ? styles$k.showOnMobile : ''}`, children: jsxRuntime.jsx("div", { className: styles$k.sidebarContent, children: sidebar }) })), jsxRuntime.jsx("main", { className: styles$k.main, children: jsxRuntime.jsx("div", { className: styles$k.mainContent, children: children }) }), summary && (jsxRuntime.jsx("aside", { className: styles$k.summarySidebar, children: jsxRuntime.jsx("div", { className: styles$k.summaryContent, children: summary }) }))] }), footer] }));
|
|
1617
|
+
};
|
|
1618
|
+
RequestFormLayout.displayName = 'RequestFormLayout';
|
|
1619
|
+
RequestFormHeader.displayName = 'RequestFormHeader';
|
|
1620
|
+
RequestFormFooter.displayName = 'RequestFormFooter';
|
|
1421
1621
|
|
|
1422
|
-
var styles$
|
|
1622
|
+
var styles$j = {"wrapper":"Table-module_wrapper__1klo5","table":"Table-module_table__fkuUB","header":"Table-module_header__vRy6j","headerCell":"Table-module_headerCell__2KzYn","headerContent":"Table-module_headerContent__HPl8-","sortable":"Table-module_sortable__NiS6E","sortIcon":"Table-module_sortIcon__Fy6z7","body":"Table-module_body__Wt52U","row":"Table-module_row__4GEgX","cell":"Table-module_cell__Xr-7H","alignLeft":"Table-module_alignLeft__FtI9E","alignCenter":"Table-module_alignCenter__p8Tr8","alignRight":"Table-module_alignRight__Ca7Yr","bordered":"Table-module_bordered__9bM3L","striped":"Table-module_striped__6TMF-","hoverable":"Table-module_hoverable__KN5Fp","compact":"Table-module_compact__opzS-","clickable":"Table-module_clickable__2ummV","loading":"Table-module_loading__tFELE","empty":"Table-module_empty__urRiw","pulse":"Table-module_pulse__t32v9"};
|
|
1423
1623
|
|
|
1424
1624
|
const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false, hoverable = true, compact = false, loading = false, emptyMessage = 'No data available', onRowClick, className = '', }) => {
|
|
1425
1625
|
const [sortColumn, setSortColumn] = React.useState(null);
|
|
@@ -1457,12 +1657,12 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
1457
1657
|
}
|
|
1458
1658
|
return row[rowKey] ?? index;
|
|
1459
1659
|
};
|
|
1460
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1660
|
+
return (jsxRuntime.jsx("div", { className: `${styles$j.wrapper} ${className}`, children: jsxRuntime.jsxs("table", { className: `${styles$j.table} ${bordered ? styles$j.bordered : ''} ${striped ? styles$j.striped : ''} ${hoverable ? styles$j.hoverable : ''} ${compact ? styles$j.compact : ''}`, children: [jsxRuntime.jsx("thead", { className: styles$j.header, children: jsxRuntime.jsx("tr", { children: columns.map((column) => (jsxRuntime.jsx("th", { className: `${styles$j.headerCell} ${column.sortable ? styles$j.sortable : ''} ${styles$j[`align${(column.align || 'left').charAt(0).toUpperCase()}${(column.align || 'left').slice(1)}`]}`, style: column.width ? { width: column.width } : undefined, onClick: () => handleSort(column), children: jsxRuntime.jsxs("span", { className: styles$j.headerContent, children: [column.label, column.sortable && (jsxRuntime.jsx("span", { className: styles$j.sortIcon, children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key))) }) }), jsxRuntime.jsx("tbody", { className: styles$j.body, children: loading ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles$j.loading, children: "Loading..." }) })) : sortedData.length === 0 ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles$j.empty, children: emptyMessage }) })) : (sortedData.map((row, rowIndex) => (jsxRuntime.jsx("tr", { className: `${styles$j.row} ${onRowClick ? styles$j.clickable : ''}`, onClick: () => onRowClick?.(row, rowIndex), children: columns.map((column) => (jsxRuntime.jsx("td", { className: `${styles$j.cell} ${styles$j[`align${(column.align || 'left').charAt(0).toUpperCase()}${(column.align || 'left').slice(1)}`]}`, children: column.render
|
|
1461
1661
|
? column.render(row[column.key], row, rowIndex)
|
|
1462
1662
|
: row[column.key] }, column.key))) }, getRowKey(row, rowIndex))))) })] }) }));
|
|
1463
1663
|
};
|
|
1464
1664
|
|
|
1465
|
-
var styles$
|
|
1665
|
+
var styles$i = {"card":"TeamCard-module_card__R2u4q","header":"TeamCard-module_header__XXRUp","icon":"TeamCard-module_icon__l2Go2","title":"TeamCard-module_title__llL8V","body":"TeamCard-module_body__OoVMW","tabs":"TeamCard-module_tabs__SJ7t-","tab":"TeamCard-module_tab__Q5j3C","tabActive":"TeamCard-module_tabActive__dUPwX","list":"TeamCard-module_list__a734u","teamItem":"TeamCard-module_teamItem__OYVIK","teamCode":"TeamCard-module_teamCode__BHB63","teamName":"TeamCard-module_teamName__-Bds2","chevron":"TeamCard-module_chevron__zBxM6","empty":"TeamCard-module_empty__8b5hb"};
|
|
1466
1666
|
|
|
1467
1667
|
const TEAM_GROUPS = [
|
|
1468
1668
|
{ label: 'All', key: undefined },
|
|
@@ -1474,13 +1674,13 @@ const getTeamColor = (code) => {
|
|
|
1474
1674
|
const firstChar = code.charAt(0).toUpperCase();
|
|
1475
1675
|
switch (firstChar) {
|
|
1476
1676
|
case 'M':
|
|
1477
|
-
return '
|
|
1677
|
+
return '#8AC6D9';
|
|
1478
1678
|
case 'W':
|
|
1479
|
-
return '
|
|
1679
|
+
return '#FFA99A';
|
|
1480
1680
|
case 'X':
|
|
1481
|
-
return '
|
|
1681
|
+
return '#D1C1C3';
|
|
1482
1682
|
default:
|
|
1483
|
-
return '
|
|
1683
|
+
return '#8AC6D9';
|
|
1484
1684
|
}
|
|
1485
1685
|
};
|
|
1486
1686
|
const UsersIcon = () => (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" })] }));
|
|
@@ -1496,93 +1696,129 @@ const TeamCard = ({ title = 'Administer Teams', icon, teams, onTeamSelect, class
|
|
|
1496
1696
|
return teams.filter(team => team.category === activeTab);
|
|
1497
1697
|
}, [teams, activeTab]);
|
|
1498
1698
|
const cardClasses = [
|
|
1499
|
-
styles$
|
|
1699
|
+
styles$i.card,
|
|
1500
1700
|
className,
|
|
1501
1701
|
].filter(Boolean).join(' ');
|
|
1502
|
-
return (jsxRuntime.jsxs("div", { className: cardClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1702
|
+
return (jsxRuntime.jsxs("div", { className: cardClasses, children: [jsxRuntime.jsxs("div", { className: styles$i.header, children: [jsxRuntime.jsx("span", { className: styles$i.icon, children: icon || jsxRuntime.jsx(UsersIcon, {}) }), jsxRuntime.jsx("h3", { className: styles$i.title, children: title })] }), jsxRuntime.jsxs("div", { className: styles$i.body, children: [jsxRuntime.jsx("div", { className: styles$i.tabs, children: TEAM_GROUPS.map(({ label, key }) => (jsxRuntime.jsx("button", { type: "button", onClick: () => setActiveTab(key), className: `${styles$i.tab} ${activeTab === key ? styles$i.tabActive : ''}`, children: label }, label))) }), jsxRuntime.jsxs("div", { className: styles$i.list, children: [filteredTeams.map((team) => (jsxRuntime.jsxs("button", { type: "button", className: styles$i.teamItem, onClick: () => onTeamSelect?.(team), children: [jsxRuntime.jsx("span", { className: styles$i.teamCode, style: { backgroundColor: getTeamColor(team.code) }, children: team.code }), jsxRuntime.jsx("span", { className: styles$i.teamName, children: team.description }), jsxRuntime.jsx("span", { className: styles$i.chevron, children: jsxRuntime.jsx(ChevronRightIcon, {}) })] }, team.id))), filteredTeams.length === 0 && (jsxRuntime.jsx("div", { className: styles$i.empty, children: "No teams found" }))] })] })] }));
|
|
1503
1703
|
};
|
|
1504
1704
|
TeamCard.displayName = 'TeamCard';
|
|
1505
1705
|
|
|
1506
|
-
var styles$
|
|
1706
|
+
var styles$h = {"actions":"TeamScheduleActions-module_actions__OvuON","primaryRow":"TeamScheduleActions-module_primaryRow__8rwhE","tripCount":"TeamScheduleActions-module_tripCount__4axn4","seasonNavigator":"TeamScheduleActions-module_seasonNavigator__jmqeE","seasonLabel":"TeamScheduleActions-module_seasonLabel__8MtKK","secondaryRow":"TeamScheduleActions-module_secondaryRow__We2n9"};
|
|
1507
1707
|
|
|
1508
|
-
/**
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1708
|
+
/** Exact presentational counterpart of Hub's Team Schedule action controls. */
|
|
1709
|
+
const TeamScheduleActions = ({ isCompactView, tripCount, seasonLabel, seasonValue, seasonOptions = [], previousSeasonDisabled = false, exportDisabled = false, exporting = false, groupTravelDisabled = false, mergeDisabled = false, merging = false, onViewSchedule, onBack, onPreviousSeason, onNextSeason, onSeasonChange, onExport, onGroupTravelRequest, onMergeEvents, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$h.actions, className].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$h.primaryRow, children: [!isCompactView ? (jsxRuntime.jsx(Button, { size: "sm", onClick: onViewSchedule, children: "View/Edit Schedule" })) : (jsxRuntime.jsx(Button, { size: "sm", onClick: onBack, leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 14 }), children: "Back" })), jsxRuntime.jsxs("div", { className: styles$h.seasonNavigator, children: [jsxRuntime.jsx(Button, { variant: "secondary", size: "sm", square: true, "aria-label": "Previous Season", disabled: previousSeasonDisabled, onClick: onPreviousSeason, children: jsxRuntime.jsx(ChevronLeftIcon, { size: 18 }) }), jsxRuntime.jsxs("div", { className: styles$h.seasonLabel, children: [jsxRuntime.jsx(Button, { variant: "secondary", size: "sm", children: seasonLabel }), !!seasonOptions.length && (jsxRuntime.jsx("select", { "aria-label": "Season", value: seasonValue, onChange: (event) => onSeasonChange?.(event.target.value), children: seasonOptions.map((option) => jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value)) }))] }), jsxRuntime.jsx(Button, { variant: "secondary", size: "sm", square: true, "aria-label": "Next Season", onClick: onNextSeason, children: jsxRuntime.jsx(ChevronRightIcon$1, { size: 18 }) })] }), isCompactView && jsxRuntime.jsx(Button, { variant: "outline", size: "sm", loading: exporting, disabled: exportDisabled, rightIcon: jsxRuntime.jsx(ArrowUpRightIcon, { size: 14 }), onClick: onExport, children: "Export XLS" }), jsxRuntime.jsxs("span", { className: styles$h.tripCount, children: [tripCount, " trips displayed"] })] }), isCompactView && (jsxRuntime.jsxs("div", { className: styles$h.secondaryRow, children: [jsxRuntime.jsx(Button, { variant: "outline", size: "sm", disabled: groupTravelDisabled, onClick: onGroupTravelRequest, children: "Group Travel Request" }), jsxRuntime.jsx(Button, { variant: "outline", size: "sm", disabled: mergeDisabled, loading: merging, onClick: onMergeEvents, children: "Merge Events" })] }))] }));
|
|
1710
|
+
|
|
1711
|
+
var styles$g = {"headers":"TeamScheduleCompactTable-module_headers__FVr2C","tripHeader":"TeamScheduleCompactTable-module_tripHeader__9vr2-","eventHeader":"TeamScheduleCompactTable-module_eventHeader__6gfwo","table":"TeamScheduleCompactTable-module_table__MdE3o","row":"TeamScheduleCompactTable-module_row__Rt0YC","trip":"TeamScheduleCompactTable-module_trip__oAUEQ","events":"TeamScheduleCompactTable-module_events__EwJi9","empty":"TeamScheduleCompactTable-module_empty__1u5HA","addRow":"TeamScheduleCompactTable-module_addRow__ejqSf"};
|
|
1712
|
+
|
|
1713
|
+
const DEFAULT_TRIP_HEADERS = ['', 'GTR', 'Trvl Start', 'Trvl End', 'Trip Name', 'Services', ''];
|
|
1714
|
+
const DEFAULT_EVENT_HEADERS = ['', 'Event Date', 'Opponent/Host', 'Event Title', 'Hm/Awy', ''];
|
|
1715
|
+
/** Hub's two-panel compact Team Schedule shell. Editable rows remain injectable. */
|
|
1716
|
+
const TeamScheduleCompactTable = ({ rows, tripHeaders = DEFAULT_TRIP_HEADERS, eventHeaders = DEFAULT_EVENT_HEADERS, onAddEvent, addEventDisabled = false, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$g.schedule, className].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$g.headers, children: [jsxRuntime.jsx("div", { className: styles$g.tripHeader, children: tripHeaders.map((header, index) => jsxRuntime.jsx("div", { children: header }, index)) }), jsxRuntime.jsx("div", { className: styles$g.eventHeader, children: eventHeaders.map((header, index) => jsxRuntime.jsx("div", { children: header }, index)) })] }), jsxRuntime.jsx("div", { className: styles$g.table, children: !rows.length ? jsxRuntime.jsx("div", { className: styles$g.empty, children: "No data available." }) : rows.map((row) => (jsxRuntime.jsxs("div", { className: styles$g.row, children: [jsxRuntime.jsx("div", { className: styles$g.trip, children: row.trip }), jsxRuntime.jsx("div", { className: styles$g.events, children: row.events })] }, row.id))) }), jsxRuntime.jsx("div", { className: styles$g.addRow, children: jsxRuntime.jsxs("button", { type: "button", disabled: addEventDisabled, onClick: onAddEvent, children: ["Add Event ", jsxRuntime.jsx(PlusIcon$2, { size: 16 })] }) })] }));
|
|
1717
|
+
|
|
1718
|
+
var styles$f = {"table":"TeamScheduleExpandedTable-module_table__hmnHI","header":"TeamScheduleExpandedTable-module_header__7IWV-","row":"TeamScheduleExpandedTable-module_row__9MyHH","body":"TeamScheduleExpandedTable-module_body__NsvB3","cell":"TeamScheduleExpandedTable-module_cell__kgawH","tripLink":"TeamScheduleExpandedTable-module_tripLink__lYoi8","mobileLabel":"TeamScheduleExpandedTable-module_mobileLabel__J6apm","empty":"TeamScheduleExpandedTable-module_empty__d9Afo"};
|
|
1719
|
+
|
|
1720
|
+
const parseLocalDate = (value) => {
|
|
1721
|
+
if (!value)
|
|
1722
|
+
return null;
|
|
1723
|
+
const match = value.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
1724
|
+
if (match)
|
|
1725
|
+
return new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3]));
|
|
1726
|
+
const parsed = new Date(value);
|
|
1727
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
1728
|
+
};
|
|
1729
|
+
const formatDate$1 = (date, includeYear = true) => date.toLocaleDateString('en-US', {
|
|
1730
|
+
month: 'short',
|
|
1731
|
+
day: 'numeric',
|
|
1732
|
+
...(includeYear ? { year: 'numeric' } : {}),
|
|
1733
|
+
});
|
|
1734
|
+
const formatTeamScheduleTravelDates = (startValue, endValue) => {
|
|
1735
|
+
const start = parseLocalDate(startValue);
|
|
1736
|
+
const end = parseLocalDate(endValue);
|
|
1737
|
+
if (!start || !end)
|
|
1738
|
+
return 'No dates';
|
|
1739
|
+
if (start.getTime() === end.getTime())
|
|
1740
|
+
return formatDate$1(start);
|
|
1741
|
+
if (start.getFullYear() !== end.getFullYear())
|
|
1742
|
+
return `${formatDate$1(start)} - ${formatDate$1(end)}`;
|
|
1743
|
+
return `${formatDate$1(start, false)} - ${end.getDate()}, ${end.getFullYear()}`;
|
|
1744
|
+
};
|
|
1745
|
+
const RunningIcon = () => (jsxRuntime.jsxs("svg", { viewBox: "0 0 32 32", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: [jsxRuntime.jsx("circle", { cx: "21", cy: "5", r: "3" }), jsxRuntime.jsx("path", { d: "m18.5 9.3-4.2 4.2-4.1-2.1-1.4 2.8 5.9 3 3.3-3.2 2.3 5.2-5.2 3.2 1.7 2.6 7.4-4.6-3.3-7.2 2.4-2.4 2.1 3.1 2.6-1.8-4.2-6.4zM10 18.8 5.6 26H9l4-6.2z" })] }));
|
|
1746
|
+
const GroundIcon = () => (jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: [jsxRuntime.jsx("rect", { x: "4", y: "3", width: "16", height: "16", rx: "2" }), jsxRuntime.jsx("path", { d: "M4 13h16M8 7h3m2 0h3M7 19v2m10-2v2" })] }));
|
|
1747
|
+
const headers = [
|
|
1748
|
+
{ key: 'sportCode', label: 'Sport', icon: jsxRuntime.jsx(RunningIcon, {}) },
|
|
1749
|
+
{ key: 'travelStartDate', label: 'Date(s)', icon: jsxRuntime.jsx(CalendarIcon$1, { size: 16 }) },
|
|
1750
|
+
{ key: 'tripName', label: 'Trip Name', icon: jsxRuntime.jsx(DocumentIcon, { size: 16 }) },
|
|
1751
|
+
{ label: 'Air', icon: jsxRuntime.jsx(PlaneIcon$4, { size: 16 }) },
|
|
1752
|
+
{ label: 'Ground', icon: jsxRuntime.jsx(GroundIcon, {}) },
|
|
1753
|
+
{ label: 'Hotel', icon: jsxRuntime.jsx(HotelIcon$4, { size: 16 }) },
|
|
1754
|
+
];
|
|
1755
|
+
/** Hub's read-only expanded Team Schedule table. */
|
|
1756
|
+
const TeamScheduleExpandedTable = ({ rows, teamCode, onTripClick, emptyMessage = 'No data available.', className = '' }) => {
|
|
1757
|
+
const [sortKey, setSortKey] = React.useState();
|
|
1758
|
+
const [ascending, setAscending] = React.useState(true);
|
|
1759
|
+
const sortedRows = React.useMemo(() => !sortKey ? rows : [...rows].sort((left, right) => {
|
|
1760
|
+
const leftValue = sortKey === 'sportCode' ? teamCode ?? left.sportCode ?? '' : left[sortKey] ?? '';
|
|
1761
|
+
const rightValue = sortKey === 'sportCode' ? teamCode ?? right.sportCode ?? '' : right[sortKey] ?? '';
|
|
1762
|
+
return String(leftValue).localeCompare(String(rightValue)) * (ascending ? 1 : -1);
|
|
1763
|
+
}), [ascending, rows, sortKey, teamCode]);
|
|
1764
|
+
const sort = (key) => {
|
|
1765
|
+
if (sortKey === key)
|
|
1766
|
+
setAscending((value) => !value);
|
|
1767
|
+
else {
|
|
1768
|
+
setSortKey(key);
|
|
1769
|
+
setAscending(true);
|
|
1556
1770
|
}
|
|
1557
1771
|
};
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1772
|
+
return (jsxRuntime.jsxs("div", { className: [styles$f.table, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx("div", { className: styles$f.header, children: headers.map((header) => (jsxRuntime.jsxs("button", { type: "button", disabled: !header.key, onClick: () => header.key && sort(header.key), children: [header.icon, jsxRuntime.jsx("span", { children: header.label }), header.key === sortKey && jsxRuntime.jsx("span", { "aria-label": ascending ? 'ascending' : 'descending', children: ascending ? '↑' : '↓' })] }, header.label))) }), !sortedRows.length ? jsxRuntime.jsx("div", { className: styles$f.empty, children: emptyMessage }) : jsxRuntime.jsx("div", { className: styles$f.body, children: sortedRows.map((row) => {
|
|
1773
|
+
const values = [
|
|
1774
|
+
teamCode ?? row.sportCode ?? '–',
|
|
1775
|
+
formatTeamScheduleTravelDates(row.travelStartDate, row.travelEndDate),
|
|
1776
|
+
jsxRuntime.jsx("button", { type: "button", className: styles$f.tripLink, onClick: () => onTripClick?.(row), children: row.tripName }),
|
|
1777
|
+
row.airSegment,
|
|
1778
|
+
row.groundSegment,
|
|
1779
|
+
row.hotelSegment,
|
|
1780
|
+
];
|
|
1781
|
+
return jsxRuntime.jsx("div", { className: styles$f.row, children: values.map((value, index) => jsxRuntime.jsxs("div", { className: styles$f.cell, children: [jsxRuntime.jsxs("span", { className: styles$f.mobileLabel, children: [headers[index].icon, headers[index].label] }), jsxRuntime.jsx("div", { children: value || '–' })] }, headers[index].label)) }, row.masterTripGUID || row.tripName);
|
|
1782
|
+
}) })] }));
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1785
|
+
var styles$e = {"grid":"TravelSummaryMetrics-module_grid__RqAU9"};
|
|
1786
|
+
|
|
1787
|
+
const numericValue = (value) => {
|
|
1788
|
+
if (value === undefined || value === null || value === '')
|
|
1789
|
+
return undefined;
|
|
1790
|
+
const parsed = Number(String(value).replace(/[^0-9.-]/g, ''));
|
|
1791
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
1792
|
+
};
|
|
1793
|
+
const formatCompactTripCost = (value) => {
|
|
1794
|
+
const cost = numericValue(value);
|
|
1795
|
+
if (cost === undefined)
|
|
1796
|
+
return undefined;
|
|
1797
|
+
if (cost > 1000000)
|
|
1798
|
+
return `${(cost / 1000000).toFixed(2)}M`;
|
|
1799
|
+
return `${Math.floor(cost / 1000)}K`;
|
|
1800
|
+
};
|
|
1801
|
+
const TravelSummaryMetrics = ({ tripsTraveled, remainingTrips, seasonTripCosts, seasonLabel, overdueActions, onOverdueActionsClick, className = '', }) => {
|
|
1802
|
+
const overdueCount = numericValue(overdueActions) ?? 0;
|
|
1803
|
+
return (jsxRuntime.jsxs("div", { className: [styles$e.grid, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Metric, { value: tripsTraveled, label: "Trips Travelled" }), jsxRuntime.jsx(Metric, { value: remainingTrips, label: "Remaining Trips" }), jsxRuntime.jsx(Metric, { value: formatCompactTripCost(seasonTripCosts), label: `${seasonLabel} Trip Costs`, prefix: "$" }), jsxRuntime.jsx(Metric, { value: overdueActions, label: "Overdue Actions", warning: overdueCount > 0, dark: true, onClick: onOverdueActionsClick })] }));
|
|
1567
1804
|
};
|
|
1568
|
-
Topbar.displayName = 'Topbar';
|
|
1569
1805
|
|
|
1570
|
-
var styles$
|
|
1806
|
+
var styles$d = {"form":"TravelerForm-module_form__wgss7","loading":"TravelerForm-module_loading__u38gT","header":"TravelerForm-module_header__X6v0S","title":"TravelerForm-module_title__pDabg","subtitle":"TravelerForm-module_subtitle__wArO7","content":"TravelerForm-module_content__NDu--","sections":"TravelerForm-module_sections__rnhZw","section":"TravelerForm-module_section__ukKVw","sectionTitle":"TravelerForm-module_sectionTitle__rtWV2","sectionContent":"TravelerForm-module_sectionContent__HPqkN","footer":"TravelerForm-module_footer__qQM1J"};
|
|
1571
1807
|
|
|
1572
1808
|
/**
|
|
1573
1809
|
* TravelerForm - Form layout for editing traveler/roster member details
|
|
1574
1810
|
*/
|
|
1575
1811
|
const TravelerForm = ({ values = {}, title, subtitle, children, renderNameSection, renderDetailsSection, renderPreferencesSection, footer, isLoading = false, className = '', }) => {
|
|
1576
1812
|
const formClasses = [
|
|
1577
|
-
styles$
|
|
1578
|
-
isLoading ? styles$
|
|
1813
|
+
styles$d.form,
|
|
1814
|
+
isLoading ? styles$d.loading : '',
|
|
1579
1815
|
className,
|
|
1580
1816
|
].filter(Boolean).join(' ');
|
|
1581
|
-
return (jsxRuntime.jsxs("div", { className: formClasses, children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: styles$
|
|
1817
|
+
return (jsxRuntime.jsxs("div", { className: formClasses, children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: styles$d.header, children: [title && jsxRuntime.jsx("h2", { className: styles$d.title, children: title }), subtitle && jsxRuntime.jsx("p", { className: styles$d.subtitle, children: subtitle })] })), children ? (jsxRuntime.jsx("div", { className: styles$d.content, children: children })) : (jsxRuntime.jsxs("div", { className: styles$d.sections, children: [renderNameSection && (jsxRuntime.jsxs("div", { className: styles$d.section, children: [jsxRuntime.jsx("h3", { className: styles$d.sectionTitle, children: "Name" }), jsxRuntime.jsx("div", { className: styles$d.sectionContent, children: renderNameSection(values) })] })), renderDetailsSection && (jsxRuntime.jsxs("div", { className: styles$d.section, children: [jsxRuntime.jsx("h3", { className: styles$d.sectionTitle, children: "Details" }), jsxRuntime.jsx("div", { className: styles$d.sectionContent, children: renderDetailsSection(values) })] })), renderPreferencesSection && (jsxRuntime.jsxs("div", { className: styles$d.section, children: [jsxRuntime.jsx("h3", { className: styles$d.sectionTitle, children: "Travel Preferences" }), jsxRuntime.jsx("div", { className: styles$d.sectionContent, children: renderPreferencesSection(values) })] }))] })), footer && (jsxRuntime.jsx("div", { className: styles$d.footer, children: footer }))] }));
|
|
1582
1818
|
};
|
|
1583
1819
|
TravelerForm.displayName = 'TravelerForm';
|
|
1584
1820
|
|
|
1585
|
-
var styles$
|
|
1821
|
+
var styles$c = {"table":"TripTable-module_table__28HM1","header":"TripTable-module_header__VNQyG","serviceHeader":"TripTable-module_serviceHeader__AXqua","requestedHeader":"TripTable-module_requestedHeader__7RhgA","row":"TripTable-module_row__EIDoN","serviceRow":"TripTable-module_serviceRow__jhL2v","requestedRow":"TripTable-module_requestedRow__Sofhd","compact":"TripTable-module_compact__QiKWg","textMuted":"TripTable-module_textMuted__Wl7pk","pnrLink":"TripTable-module_pnrLink__XmIdV","vendorCode":"TripTable-module_vendorCode__mfnDQ","typesCell":"TripTable-module_typesCell__u7wYw","serviceCell":"TripTable-module_serviceCell__8PcQl","servicePlaceholder":"TripTable-module_servicePlaceholder__BEBJ7","viewCol":"TripTable-module_viewCol__LLt-7","viewLink":"TripTable-module_viewLink__lr6Rf","travelerCell":"TripTable-module_travelerCell__8X804","moreCount":"TripTable-module_moreCount__ZoYs5","requestedByCell":"TripTable-module_requestedByCell__6ARM-","submittedDate":"TripTable-module_submittedDate__FBqEI","empty":"TripTable-module_empty__Nzic2","emptyTitle":"TripTable-module_emptyTitle__QkWAx","emptyText":"TripTable-module_emptyText__KPP9Q"};
|
|
1586
1822
|
|
|
1587
1823
|
// TravelerCell component
|
|
1588
1824
|
const TravelerCell = ({ names }) => {
|
|
@@ -1590,7 +1826,7 @@ const TravelerCell = ({ names }) => {
|
|
|
1590
1826
|
return jsxRuntime.jsx("span", { children: "\u2014" });
|
|
1591
1827
|
if (names.length === 1)
|
|
1592
1828
|
return jsxRuntime.jsx("span", { children: names[0] });
|
|
1593
|
-
return (jsxRuntime.jsxs("span", { className: styles$
|
|
1829
|
+
return (jsxRuntime.jsxs("span", { className: styles$c.travelerCell, children: [jsxRuntime.jsx("span", { children: names[0] }), jsxRuntime.jsxs("span", { className: styles$c.moreCount, children: ["+", names.length - 1] })] }));
|
|
1594
1830
|
};
|
|
1595
1831
|
// Chevron icon
|
|
1596
1832
|
const ChevronRight$1 = ({ size = 20 }) => (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) }));
|
|
@@ -1610,66 +1846,32 @@ const TripTable = ({ trips, variant = 'current', density = 'comfortable', vendor
|
|
|
1610
1846
|
};
|
|
1611
1847
|
return statusMap[status] || status.toLowerCase();
|
|
1612
1848
|
};
|
|
1613
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1849
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$c.table} ${className || ''}`, children: [jsxRuntime.jsx("div", { className: `${styles$c.header} ${isRequested ? styles$c.requestedHeader : ''} ${useServiceColumn ? styles$c.serviceHeader : ''}`, children: isRequested ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: "Request ID" }), jsxRuntime.jsx("div", { children: "Traveler(s)" }), jsxRuntime.jsx("div", { children: "Trip Type" }), jsxRuntime.jsx("div", { children: "Requested By" }), jsxRuntime.jsx("div", { className: styles$c.viewCol, children: "View" })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: "Traveler" }), jsxRuntime.jsx("div", { children: "Sport" }), jsxRuntime.jsx("div", { children: "PNR" }), useServiceColumn ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: "Service" }), jsxRuntime.jsx("div", { children: "Itinerary" })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: "Vendor" }), jsxRuntime.jsx("div", { children: "Itinerary" }), jsxRuntime.jsx("div", { children: "Types" })] })), jsxRuntime.jsx("div", { children: "Travel Dates" }), jsxRuntime.jsx("div", { children: "Status" }), jsxRuntime.jsx("div", {})] })) }), trips.length === 0 ? (jsxRuntime.jsxs("div", { className: styles$c.empty, children: [jsxRuntime.jsx("div", { className: styles$c.emptyTitle, children: isRequested ? 'No Requested Trips' : 'No Trips Found' }), jsxRuntime.jsx("div", { className: styles$c.emptyText, children: emptyMessage || (isRequested
|
|
1614
1850
|
? 'Travel requests submitted to STM will appear here until an agent books them.'
|
|
1615
1851
|
: 'Try clearing your filters or widening the date range.') })] })) : (trips.map((trip, index) => (jsxRuntime.jsx("div", { className: `
|
|
1616
|
-
${styles$
|
|
1617
|
-
${isRequested ? styles$
|
|
1618
|
-
${useServiceColumn ? styles$
|
|
1619
|
-
${isCompact ? styles$
|
|
1620
|
-
`, onClick: () => onViewTrip?.(trip.pnr || trip.reqId || trip.id), children: isRequested ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx("a", { href: "#", className: styles$
|
|
1852
|
+
${styles$c.row}
|
|
1853
|
+
${isRequested ? styles$c.requestedRow : ''}
|
|
1854
|
+
${useServiceColumn ? styles$c.serviceRow : ''}
|
|
1855
|
+
${isCompact ? styles$c.compact : ''}
|
|
1856
|
+
`, onClick: () => onViewTrip?.(trip.pnr || trip.reqId || trip.id), children: isRequested ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx("a", { href: "#", className: styles$c.pnrLink, onClick: (e) => {
|
|
1621
1857
|
e.preventDefault();
|
|
1622
1858
|
e.stopPropagation();
|
|
1623
1859
|
onViewTrip?.(trip.reqId || trip.id);
|
|
1624
|
-
}, children: trip.reqId }) }), jsxRuntime.jsx("div", { className: styles$
|
|
1860
|
+
}, children: trip.reqId }) }), jsxRuntime.jsx("div", { className: styles$c.textMuted, children: jsxRuntime.jsx(TravelerCell, { names: trip.travelers }) }), jsxRuntime.jsx("div", { className: styles$c.typesCell, children: trip.types.map((t, ti) => (jsxRuntime.jsx(TypeIcon, { type: t, size: isCompact ? 14 : 16 }, ti))) }), jsxRuntime.jsxs("div", { className: styles$c.requestedByCell, children: [jsxRuntime.jsx("div", { className: styles$c.textMuted, children: trip.requestedBy }), trip.submitted && (jsxRuntime.jsxs("div", { className: styles$c.submittedDate, children: ["Submitted ", trip.submitted] }))] }), jsxRuntime.jsx("div", { className: styles$c.viewCol, children: jsxRuntime.jsx("a", { href: "#", className: styles$c.viewLink, onClick: (e) => {
|
|
1625
1861
|
e.preventDefault();
|
|
1626
1862
|
e.stopPropagation();
|
|
1627
1863
|
onViewTrip?.(trip.reqId || trip.id);
|
|
1628
|
-
}, title: "View request detail", children: jsxRuntime.jsx(ChevronRight$1, {}) }) })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$
|
|
1864
|
+
}, title: "View request detail", children: jsxRuntime.jsx(ChevronRight$1, {}) }) })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$c.textMuted, children: jsxRuntime.jsx(TravelerCell, { names: trip.travelers }) }), jsxRuntime.jsx("div", { className: styles$c.textMuted, children: trip.sport || '—' }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx("a", { href: "#", className: styles$c.pnrLink, onClick: (e) => {
|
|
1629
1865
|
e.preventDefault();
|
|
1630
1866
|
e.stopPropagation();
|
|
1631
1867
|
onViewTrip?.(trip.pnr || trip.id);
|
|
1632
|
-
}, children: trip.pnr }) }), useServiceColumn ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$
|
|
1868
|
+
}, children: trip.pnr }) }), useServiceColumn ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$c.serviceCell, children: ['A', 'H', 'C'].map(slot => (trip.types.includes(slot) ? (jsxRuntime.jsx(TravelServiceIcon, { type: slot, vendor: slot === 'A' ? trip.vendor : undefined, mode: vendorMode, size: serviceIconSize, multi: trip.multiSegments?.includes(slot) }, slot)) : (jsxRuntime.jsx("span", { className: styles$c.servicePlaceholder, style: { width: serviceIconSize, height: serviceIconSize } }, slot)))) }), jsxRuntime.jsx("div", { className: styles$c.textMuted, children: trip.itinerary || '—' })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { children: trip.vendor && vendorMode === 'icon' ? (jsxRuntime.jsx(TravelServiceIcon, { type: "A", vendor: trip.vendor, mode: "icon", size: 24 })) : (jsxRuntime.jsx("span", { className: styles$c.vendorCode, children: trip.vendor || '—' })) }), jsxRuntime.jsx("div", { className: styles$c.textMuted, children: trip.itinerary || '—' }), jsxRuntime.jsx("div", { className: styles$c.typesCell, children: trip.types.map((t, ti) => (jsxRuntime.jsx(TypeIcon, { type: t, size: isCompact ? 14 : 16 }, ti))) })] })), jsxRuntime.jsx("div", { className: styles$c.textMuted, children: trip.dates }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(StatusBadge, { status: mapStatus(trip.status) }) }), jsxRuntime.jsx("div", { className: styles$c.viewCol, children: jsxRuntime.jsx("a", { href: "#", className: styles$c.viewLink, onClick: (e) => {
|
|
1633
1869
|
e.preventDefault();
|
|
1634
1870
|
e.stopPropagation();
|
|
1635
1871
|
onViewTrip?.(trip.pnr || trip.id);
|
|
1636
1872
|
}, title: "View itinerary", children: jsxRuntime.jsx(ChevronRight$1, {}) }) })] })) }, trip.id || trip.pnr || trip.reqId || index))))] }));
|
|
1637
1873
|
};
|
|
1638
1874
|
|
|
1639
|
-
var styles$d = {"appLayout":"AppLayout-module_appLayout__hc9Tm","mainArea":"AppLayout-module_mainArea__yrO-w","content":"AppLayout-module_content__swPpZ"};
|
|
1640
|
-
|
|
1641
|
-
const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account, defaultExpanded = true, onNavItemClick, onAccountClick, children, navFooter, topbarActions, className, }) => {
|
|
1642
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$d.appLayout} ${className || ''}`, children: [jsxRuntime.jsx(Sidenav, { items: navItems, activeKey: activeNavKey, defaultExpanded: defaultExpanded, onItemClick: onNavItemClick, logo: logo, logoCollapsed: collapsedLogo, footer: navFooter }), jsxRuntime.jsxs("div", { className: styles$d.mainArea, children: [jsxRuntime.jsx(Topbar, { account: account, onAccountClick: onAccountClick, actions: topbarActions }), jsxRuntime.jsx("main", { className: styles$d.content, children: children })] })] }));
|
|
1643
|
-
};
|
|
1644
|
-
|
|
1645
|
-
var styles$c = {"layout":"RequestFormLayout-module_layout__DGr3F","header":"RequestFormLayout-module_header__1Fjzd","headerContent":"RequestFormLayout-module_headerContent__xmuP9","headerTitle":"RequestFormLayout-module_headerTitle__PPhML","pagination":"RequestFormLayout-module_pagination__9jgEV","separator":"RequestFormLayout-module_separator__RhyUN","eventName":"RequestFormLayout-module_eventName__uE2BF","headerRight":"RequestFormLayout-module_headerRight__wNqWM","body":"RequestFormLayout-module_body__UkKrz","sidebar":"RequestFormLayout-module_sidebar__4vSWS","showOnMobile":"RequestFormLayout-module_showOnMobile__aQbIq","sidebarContent":"RequestFormLayout-module_sidebarContent__yxQaB","main":"RequestFormLayout-module_main__h8sP3","mainContent":"RequestFormLayout-module_mainContent__H0hQb","summarySidebar":"RequestFormLayout-module_summarySidebar__cA6UQ","summaryContent":"RequestFormLayout-module_summaryContent__kUsbQ","footer":"RequestFormLayout-module_footer__-tAMs","footerContent":"RequestFormLayout-module_footerContent__i8-QZ","button":"RequestFormLayout-module_button__Ql3Z-","primary":"RequestFormLayout-module_primary__U3rme","secondary":"RequestFormLayout-module_secondary__CZtSr"};
|
|
1646
|
-
|
|
1647
|
-
/**
|
|
1648
|
-
* RequestFormHeader component for the fixed header in travel request forms.
|
|
1649
|
-
*/
|
|
1650
|
-
const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightContent, className, }) => {
|
|
1651
|
-
const showPagination = currentPage !== undefined && totalPages !== undefined && totalPages > 1;
|
|
1652
|
-
return (jsxRuntime.jsx("header", { className: `${styles$c.header} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$c.headerContent, children: [jsxRuntime.jsxs("h1", { className: styles$c.headerTitle, children: [title, showPagination && (jsxRuntime.jsxs("span", { className: styles$c.pagination, children: ["(", currentPage, "/", totalPages, ")"] })), eventName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: styles$c.separator, children: "\u2013" }), jsxRuntime.jsx("span", { className: styles$c.eventName, children: eventName })] }))] }), rightContent && jsxRuntime.jsx("div", { className: styles$c.headerRight, children: rightContent })] }) }));
|
|
1653
|
-
};
|
|
1654
|
-
/**
|
|
1655
|
-
* RequestFormFooter component for the fixed footer with navigation buttons.
|
|
1656
|
-
*/
|
|
1657
|
-
const RequestFormFooter = ({ onPrevious, onNext, isFirstPage = false, isLastPage = false, isSubmitting = false, previousText, nextText, className, }) => {
|
|
1658
|
-
const prevLabel = previousText || (isFirstPage ? 'Cancel' : 'Previous');
|
|
1659
|
-
const nextLabel = nextText || (isLastPage ? 'Submit' : 'Next');
|
|
1660
|
-
return (jsxRuntime.jsx("footer", { className: `${styles$c.footer} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$c.footerContent, children: [jsxRuntime.jsx("button", { type: "button", className: `${styles$c.button} ${styles$c.secondary}`, onClick: onPrevious, disabled: isSubmitting, children: prevLabel }), jsxRuntime.jsx("button", { type: "button", className: `${styles$c.button} ${styles$c.primary}`, onClick: onNext, disabled: isSubmitting, children: isSubmitting ? 'Submitting...' : nextLabel })] }) }));
|
|
1661
|
-
};
|
|
1662
|
-
/**
|
|
1663
|
-
* RequestFormLayout template for travel request forms.
|
|
1664
|
-
* Provides a three-column layout with fixed header and footer.
|
|
1665
|
-
*/
|
|
1666
|
-
const RequestFormLayout = ({ header, sidebar, children, summary, footer, className, showSidebarOnMobile = false, }) => {
|
|
1667
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$c.layout} ${className || ''}`, children: [header, jsxRuntime.jsxs("div", { className: styles$c.body, children: [sidebar && (jsxRuntime.jsx("aside", { className: `${styles$c.sidebar} ${showSidebarOnMobile ? styles$c.showOnMobile : ''}`, children: jsxRuntime.jsx("div", { className: styles$c.sidebarContent, children: sidebar }) })), jsxRuntime.jsx("main", { className: styles$c.main, children: jsxRuntime.jsx("div", { className: styles$c.mainContent, children: children }) }), summary && (jsxRuntime.jsx("aside", { className: styles$c.summarySidebar, children: jsxRuntime.jsx("div", { className: styles$c.summaryContent, children: summary }) }))] }), footer] }));
|
|
1668
|
-
};
|
|
1669
|
-
RequestFormLayout.displayName = 'RequestFormLayout';
|
|
1670
|
-
RequestFormHeader.displayName = 'RequestFormHeader';
|
|
1671
|
-
RequestFormFooter.displayName = 'RequestFormFooter';
|
|
1672
|
-
|
|
1673
1875
|
var styles$b = {"page":"AdministrationPage-module_page__48Run","header":"AdministrationPage-module_header__HNQnE","tabs":"AdministrationPage-module_tabs__QPvcD","tab":"AdministrationPage-module_tab__bNaU8","activeTab":"AdministrationPage-module_activeTab__B-e3a","cards":"AdministrationPage-module_cards__nISnI","card":"AdministrationPage-module_card__6r45y","cardIcon":"AdministrationPage-module_cardIcon__GTb3t","cardCopy":"AdministrationPage-module_cardCopy__o9pWk","cardTitle":"AdministrationPage-module_cardTitle__56qEV","cardDescription":"AdministrationPage-module_cardDescription__66e9F","comingSoon":"AdministrationPage-module_comingSoon__LSm-x","chevron":"AdministrationPage-module_chevron__d9RPb"};
|
|
1674
1876
|
|
|
1675
1877
|
const DEFAULT_CARDS = [
|
|
@@ -1723,44 +1925,83 @@ const CharterManifestPage = ({ tripName, travelStartDate, travelEndDate, seats,
|
|
|
1723
1925
|
return (jsxRuntime.jsxs("div", { className: [styles$a.page, className].filter(Boolean).join(' '), "data-screen-label": "Charter Trip Manifest", children: [jsxRuntime.jsxs("header", { className: styles$a.header, children: [jsxRuntime.jsxs("div", { className: styles$a.headerRow, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Back", className: styles$a.back, onClick: onBack, children: jsxRuntime.jsx(ChevronLeftIcon, { size: 28 }) }), jsxRuntime.jsxs("h1", { children: [jsxRuntime.jsx("strong", { children: "Manifest" }), jsxRuntime.jsx(ChevronRightIcon$1, { size: 24 }), jsxRuntime.jsx("span", { children: tripName })] }), jsxRuntime.jsxs("div", { className: styles$a.headerActions, children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: locked }), jsxRuntime.jsx(Button, { variant: "outline", leftIcon: jsxRuntime.jsx(DocumentIcon, { size: 16 }), disabled: carrierName === 'No carrier selected', onClick: onGenerateFile, children: "Generate File" })] })] }), (travelStartDate || travelEndDate) && (jsxRuntime.jsxs("div", { className: styles$a.dateRow, children: [jsxRuntime.jsx("span", { children: formatDate(travelStartDate) }), jsxRuntime.jsx("span", { className: styles$a.dateLine, children: "\u25B6" }), jsxRuntime.jsx("span", { children: formatDate(travelEndDate) })] })), jsxRuntime.jsxs("div", { className: styles$a.metaRow, children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(PlaneIcon$4, { size: 16 }), seats, " seats"] }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(CubeIcon, { size: 16 }), "Payload limit ", payloadLimit.toLocaleString(), " lb"] })] })] }), jsxRuntime.jsxs("div", { className: styles$a.layout, children: [jsxRuntime.jsxs("aside", { className: styles$a.rail, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: styles$a.eyebrow, children: "Flight Manifest" }), jsxRuntime.jsx("div", { className: styles$a.scopeList, children: [{ id: 'all', label: 'Full Trip', detail: 'All flight segments' }, ...segments].map((item) => (jsxRuntime.jsxs("button", { type: "button", className: [styles$a.scope, scope === item.id ? styles$a.activeScope : ''].filter(Boolean).join(' '), onClick: () => setScope(item.id), children: [jsxRuntime.jsx("strong", { children: item.label }), jsxRuntime.jsx("span", { children: item.detail })] }, item.id))) })] }), segments.length > 0 && (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", disabled: locked, onClick: onSplitSegments, children: "Split by Segment" })), jsxRuntime.jsxs("div", { className: styles$a.carrierCard, children: [jsxRuntime.jsx("div", { className: styles$a.eyebrow, children: "Carrier" }), jsxRuntime.jsx("strong", { children: carrierName }), jsxRuntime.jsx("p", { children: carrierNote }), jsxRuntime.jsx(Button, { variant: "outline", size: "sm", fullWidth: true, disabled: locked, leftIcon: jsxRuntime.jsx(SettingsIcon, { size: 15 }), onClick: onChangeCarrier, children: "Change Carrier" })] })] }), jsxRuntime.jsxs("main", { className: styles$a.main, children: [jsxRuntime.jsx("section", { className: styles$a.capacityCard, children: jsxRuntime.jsx(ManifestCapacityStats, { paxCount: passengers.length, seats: seats, paxWeight: passengerWeight, cargoWeight: cargoWeight, payloadLimit: payloadLimit }) }), jsxRuntime.jsxs("div", { className: styles$a.viewRow, children: [jsxRuntime.jsx(ManifestViewToggle, { view: view, onView: setView, paxCount: passengers.length, eqCount: equipment.length, locked: locked }), locked && jsxRuntime.jsx("span", { className: styles$a.lockedMessage, children: "Locked \u2014 coordinate any changes directly with the carrier." })] }), view === 'passengers' ? (jsxRuntime.jsxs("section", { children: [!locked && (jsxRuntime.jsxs("div", { className: styles$a.tableActions, children: [jsxRuntime.jsxs("strong", { children: [passengers.length, " Passengers"] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: "Order by" }), jsxRuntime.jsx("span", { className: styles$a.sortToggle, children: ['name', 'type'].map((option) => (jsxRuntime.jsx("button", { type: "button", className: sort === option ? styles$a.activeSort : '', onClick: () => setSort(option), children: option }, option))) }), jsxRuntime.jsx(Button, { size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 15 }), onClick: onAddPassengers, children: "Add Passengers" })] })] })), jsxRuntime.jsx("div", { className: styles$a.tableWrap, children: jsxRuntime.jsxs("table", { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "#" }), jsxRuntime.jsx("th", { children: "Passenger" }), jsxRuntime.jsx("th", { children: "Type" }), jsxRuntime.jsx("th", { children: "TSA Screening" }), jsxRuntime.jsx("th", { children: "Personal" }), jsxRuntime.jsx("th", { children: "Carry-On" }), jsxRuntime.jsx("th", { children: "Checked" }), jsxRuntime.jsx("th", { children: "Seat" }), jsxRuntime.jsx("th", {})] }) }), jsxRuntime.jsxs("tbody", { children: [!sortedPassengers.length && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 9, className: styles$a.empty, children: "No passengers on this manifest yet. Add passengers from the master list." }) }), sortedPassengers.map((passenger, index) => (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: index + 1 }), jsxRuntime.jsxs("td", { children: [jsxRuntime.jsx("strong", { children: passenger.lastName }), jsxRuntime.jsxs("span", { children: [", ", passenger.firstName] })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(TypeTag, { type: passenger.travelerType }) }), jsxRuntime.jsx("td", { children: passenger.screeningType || '—' }), jsxRuntime.jsxs("td", { children: [passenger.personalWeight ?? 0, " lb"] }), jsxRuntime.jsxs("td", { children: [passenger.carryOnWeight ?? 0, " lb"] }), jsxRuntime.jsxs("td", { children: [passenger.checkedWeight ?? 0, " lb"] }), jsxRuntime.jsx("td", { children: passenger.seatAssignment || '—' }), jsxRuntime.jsx("td", { children: !locked && jsxRuntime.jsx("button", { type: "button", "aria-label": `Remove ${passenger.firstName} ${passenger.lastName}`, className: styles$a.remove, onClick: () => onRemovePassenger?.(passenger), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }) })] }, passenger.id)))] })] }) })] })) : (jsxRuntime.jsxs("section", { children: [!locked && jsxRuntime.jsxs("div", { className: styles$a.tableActions, children: [jsxRuntime.jsxs("strong", { children: [equipment.length, " Equipment Items"] }), jsxRuntime.jsx(Button, { size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 15 }), onClick: onAddEquipment, children: "Add Equipment" })] }), jsxRuntime.jsx("div", { className: styles$a.tableWrap, children: jsxRuntime.jsxs("table", { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "Equipment" }), jsxRuntime.jsx("th", { children: "Quantity" }), jsxRuntime.jsx("th", { children: "Weight" }), jsxRuntime.jsx("th", { children: "Total" }), jsxRuntime.jsx("th", {})] }) }), jsxRuntime.jsx("tbody", { children: equipment.map((item) => jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: jsxRuntime.jsx("strong", { children: item.name }) }), jsxRuntime.jsx("td", { children: item.quantity }), jsxRuntime.jsxs("td", { children: [item.weight.toLocaleString(), " lb"] }), jsxRuntime.jsxs("td", { children: [(item.quantity * item.weight).toLocaleString(), " lb"] }), jsxRuntime.jsx("td", { children: !locked && jsxRuntime.jsx("button", { type: "button", "aria-label": `Remove ${item.name}`, className: styles$a.remove, onClick: () => onRemoveEquipment?.(item), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }) })] }, item.id)) })] }) })] })), !locked && (jsxRuntime.jsxs("section", { className: styles$a.finalize, children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: false }), jsxRuntime.jsx("p", { children: sendState === 'initial-sent' ? 'Initial manifest sent. The final manifest may be sent within 3 days of departure.' : 'No manifest has been transmitted to the carrier yet.' }), jsxRuntime.jsxs("div", { className: styles$a.finalizeActions, children: [sendState === 'none' && jsxRuntime.jsx(Button, { onClick: onSendInitial, children: "Send Initial Manifest" }), sendState === 'initial-sent' && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, { onClick: onSendFinal, children: "Send Final Manifest" }), jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: onUndoInitial, children: "Undo initial" })] })] })] }))] })] })] }));
|
|
1724
1926
|
};
|
|
1725
1927
|
|
|
1726
|
-
var styles$9 = {"page":"ContactUsPage-module_page__j9LWO","
|
|
1928
|
+
var styles$9 = {"page":"ContactUsPage-module_page__j9LWO","container":"ContactUsPage-module_container__uRC-r","header":"ContactUsPage-module_header__I6ypu","printRow":"ContactUsPage-module_printRow__d7O34","primaryGrid":"ContactUsPage-module_primaryGrid__DwUt4","genericGrid":"ContactUsPage-module_genericGrid__Zn-A1","stack":"ContactUsPage-module_stack__uKL2n","card":"ContactUsPage-module_card__WPn4v","cardBody":"ContactUsPage-module_cardBody__FU1io","simpleContact":"ContactUsPage-module_simpleContact__E-jyI","field":"ContactUsPage-module_field__yiMo-","label":"ContactUsPage-module_label__C2fa2","emergencyLabel":"ContactUsPage-module_emergencyLabel__Twetf","emergencyDot":"ContactUsPage-module_emergencyDot__Yg4eF","fieldValue":"ContactUsPage-module_fieldValue__5VT5g","contactColumn":"ContactUsPage-module_contactColumn__U9DGB","support":"ContactUsPage-module_support__Pptkm","emergency":"ContactUsPage-module_emergency__ozZbU","contactPair":"ContactUsPage-module_contactPair__Fxg8p","motorcoachEmergency":"ContactUsPage-module_motorcoachEmergency__-Uo84","centeredState":"ContactUsPage-module_centeredState__eLf0U","error":"ContactUsPage-module_error__XXiUk","warning":"ContactUsPage-module_warning__1--Zg"};
|
|
1727
1929
|
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1930
|
+
const cleanEmail = (email) => email?.replace('.invalid', '');
|
|
1931
|
+
const ContactField = ({ label, children, emergency = false }) => (jsxRuntime.jsxs("div", { className: styles$9.field, children: [jsxRuntime.jsxs("span", { className: emergency ? styles$9.emergencyLabel : styles$9.label, children: [label, emergency && jsxRuntime.jsx("span", { className: styles$9.emergencyDot })] }), jsxRuntime.jsx("div", { className: styles$9.fieldValue, children: children })] }));
|
|
1932
|
+
const ContactCard = ({ title, children }) => (jsxRuntime.jsxs("section", { className: styles$9.card, children: [jsxRuntime.jsx("h2", { children: title }), jsxRuntime.jsx("div", { className: styles$9.cardBody, children: children })] }));
|
|
1933
|
+
const SimpleContactCard = ({ title, contacts = [] }) => {
|
|
1934
|
+
const validContacts = contacts.filter((contact) => contact.name || contact.email || contact.phone);
|
|
1935
|
+
if (!validContacts.length)
|
|
1936
|
+
return null;
|
|
1937
|
+
return (jsxRuntime.jsx(ContactCard, { title: title, children: validContacts.map((contact, index) => (jsxRuntime.jsxs("div", { className: styles$9.simpleContact, children: [contact.name && jsxRuntime.jsx(ContactField, { label: "Name:", children: jsxRuntime.jsx("span", { children: contact.name }) }), contact.email && jsxRuntime.jsx(ContactField, { label: "Email:", children: jsxRuntime.jsx("a", { href: `mailto:${cleanEmail(contact.email)}`, children: cleanEmail(contact.email) }) }), contact.phone && jsxRuntime.jsx(ContactField, { label: "Phone:", children: jsxRuntime.jsx("span", { children: contact.phone }) })] }, `${contact.email ?? contact.name ?? contact.phone}-${index}`))) }));
|
|
1938
|
+
};
|
|
1939
|
+
const ContactColumn = ({ title, contact }) => (jsxRuntime.jsxs("div", { className: styles$9.contactColumn, children: [jsxRuntime.jsx("strong", { children: title }), contact?.name && jsxRuntime.jsx("span", { children: contact.name }), contact?.email && jsxRuntime.jsx("a", { href: `mailto:${cleanEmail(contact.email)}`, children: cleanEmail(contact.email) }), contact?.phone && jsxRuntime.jsxs("span", { children: [contact.phone, contact.show247 && jsxRuntime.jsx("em", { children: " (24/7)" })] })] }));
|
|
1940
|
+
const PairedContacts = ({ contacts = [] }) => (jsxRuntime.jsx(jsxRuntime.Fragment, { children: contacts.map((contact, index) => (jsxRuntime.jsxs("div", { className: styles$9.contactPair, children: [jsxRuntime.jsx(ContactColumn, { title: "Sales Contact", contact: contact.sales }), jsxRuntime.jsx(ContactColumn, { title: "Operations Contact", contact: contact.operations })] }, `${contact.sales?.email ?? contact.operations?.email}-${index}`))) }));
|
|
1941
|
+
const GenericCards = ({ cards }) => (jsxRuntime.jsx("div", { className: styles$9.genericGrid, children: cards.map((card) => jsxRuntime.jsx(SimpleContactCard, { title: card.title, contacts: card.contacts }, card.title)) }));
|
|
1942
|
+
/** Exact presentational counterpart of the Hub Contact Us screen. */
|
|
1943
|
+
const ContactUsPage = ({ title = 'Your Team of Experts', state, errorMessage = 'Unable to fetch contact information.', data, onPrint, cards = [], children, className = '', }) => {
|
|
1944
|
+
const resolvedState = state ?? (data || cards.length || children ? 'data' : 'empty');
|
|
1945
|
+
if (resolvedState === 'loading')
|
|
1946
|
+
return null;
|
|
1947
|
+
if (resolvedState === 'error' || resolvedState === 'empty') {
|
|
1948
|
+
return (jsxRuntime.jsx("div", { className: styles$9.centeredState, children: jsxRuntime.jsx("div", { role: resolvedState === 'error' ? 'alert' : 'status', className: resolvedState === 'error' ? styles$9.error : styles$9.warning, children: resolvedState === 'error' ? errorMessage : 'No contact information available.' }) }));
|
|
1949
|
+
}
|
|
1950
|
+
return (jsxRuntime.jsx("div", { className: [styles$9.page, className].filter(Boolean).join(' '), children: jsxRuntime.jsxs("div", { className: styles$9.container, children: [jsxRuntime.jsx("header", { className: styles$9.header, children: jsxRuntime.jsx("h1", { children: title }) }), jsxRuntime.jsx("div", { className: styles$9.printRow, children: jsxRuntime.jsxs("button", { type: "button", onClick: onPrint ?? (() => window.print()), children: [jsxRuntime.jsx(PrinterIcon, { size: 16 }), "Print"] }) }), children ?? (data ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!!(data.accountManagers?.length || data.travelAgents?.length) && (jsxRuntime.jsxs("div", { className: styles$9.primaryGrid, children: [jsxRuntime.jsx(SimpleContactCard, { title: "Account Manager", contacts: data.accountManagers }), jsxRuntime.jsx(SimpleContactCard, { title: "Travel Agent", contacts: data.travelAgents })] })), jsxRuntime.jsxs("div", { className: styles$9.stack, children: [jsxRuntime.jsxs(ContactCard, { title: "Group/Team Commercial Reservation Specialists", children: [jsxRuntime.jsx(ContactField, { label: "Business Hours:", children: jsxRuntime.jsx("span", { children: "Monday \u2013 Friday 8am-8pm ET" }) }), jsxRuntime.jsx(ContactField, { label: "Toll-Free Number:", children: jsxRuntime.jsx("span", { children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "After Hours/Emergency (24/7):", emergency: true, children: jsxRuntime.jsx("span", { className: styles$9.emergency, children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "Email:", children: jsxRuntime.jsx("a", { href: "mailto:teamtravel@shortstravel.com", children: "teamtravel@shortstravel.com" }) })] }), jsxRuntime.jsxs(ContactCard, { title: "Recruiting Travel Specialists", children: [jsxRuntime.jsx(ContactField, { label: "Business Hours:", children: jsxRuntime.jsx("span", { children: "Monday \u2013 Friday 8am-8pm ET" }) }), jsxRuntime.jsx(ContactField, { label: "Toll-Free Number:", children: jsxRuntime.jsx("span", { children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "After Hours/Emergency (24/7):", emergency: true, children: jsxRuntime.jsx("span", { className: styles$9.emergency, children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "Email:", children: jsxRuntime.jsx("a", { href: "mailto:recruiting@shortstravel.com", children: "recruiting@shortstravel.com" }) })] }), !!data.charterAirContacts?.length && jsxRuntime.jsx(ContactCard, { title: "Charter Air", children: jsxRuntime.jsx(PairedContacts, { contacts: data.charterAirContacts }) }), !!data.motorcoachContacts?.length && (jsxRuntime.jsxs(ContactCard, { title: "Charter Bus / Motorcoach", children: [jsxRuntime.jsx(PairedContacts, { contacts: data.motorcoachContacts }), jsxRuntime.jsx("p", { className: styles$9.motorcoachEmergency, children: "After Hours/Emergency (24/7): 319-423-3007" })] })), !!data.groupHotelContacts?.length && (jsxRuntime.jsx(ContactCard, { title: "Group Hotel", children: data.groupHotelContacts.map((contact, index) => (jsxRuntime.jsxs("div", { className: styles$9.contactPair, children: [jsxRuntime.jsx(ContactColumn, { title: "Sales Contact", contact: contact }), jsxRuntime.jsx("div", { className: styles$9.contactColumn })] }, `${contact.email ?? contact.name}-${index}`))) }))] })] })) : jsxRuntime.jsx(GenericCards, { cards: cards })), jsxRuntime.jsxs("footer", { className: styles$9.support, children: [jsxRuntime.jsx("h2", { children: "Short's Travel Website and Online Booking Tool Support" }), jsxRuntime.jsx("p", { children: "Monday \u2013 Friday 9am-9pm ET, except major holidays" }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: "319-257-5309" }), jsxRuntime.jsx("a", { href: "mailto:onlinesupport@shortstravel.com", children: "onlinesupport@shortstravel.com" })] })] })] }) }));
|
|
1742
1951
|
};
|
|
1743
|
-
ContactUsPage.displayName = 'ContactUsPage';
|
|
1744
1952
|
|
|
1745
|
-
var styles$8 = {"page":"DashboardPage-module_page__PPkbS","pageHeader":"DashboardPage-module_pageHeader__gb8MO","pageActions":"DashboardPage-module_pageActions__1Zgv1","outlineButton":"DashboardPage-module_outlineButton__iLuAv","textButton":"DashboardPage-module_textButton__rEtbe","primaryButton":"DashboardPage-module_primaryButton__uaCW9","customizeButton":"DashboardPage-module_customizeButton__D6kV3","editBanner":"DashboardPage-module_editBanner__7IN5D","syncStatus":"DashboardPage-module_syncStatus__BxFQW","syncError":"DashboardPage-module_syncError__U-uis","grid":"DashboardPage-module_grid__OVgfA","sizeS":"DashboardPage-module_sizeS__leLYa","sizeM":"DashboardPage-module_sizeM__TkfbJ","sizeL":"DashboardPage-module_sizeL__Gbs5b","widget":"DashboardPage-module_widget__p6N-1","widgetHeader":"DashboardPage-module_widgetHeader__m7YWn","widgetIcon":"DashboardPage-module_widgetIcon__1npXI","dragHandle":"DashboardPage-module_dragHandle__rWGWh","widgetActions":"DashboardPage-module_widgetActions__E2pfv","iconButton":"DashboardPage-module_iconButton__v7jtL","sizeToggle":"DashboardPage-module_sizeToggle__wmv6Y","activeSize":"DashboardPage-module_activeSize__vFi0w","widgetBody":"DashboardPage-module_widgetBody__8IPCC","
|
|
1953
|
+
var styles$8 = {"page":"DashboardPage-module_page__PPkbS","pageHeader":"DashboardPage-module_pageHeader__gb8MO","pageActions":"DashboardPage-module_pageActions__1Zgv1","outlineButton":"DashboardPage-module_outlineButton__iLuAv","textButton":"DashboardPage-module_textButton__rEtbe","primaryButton":"DashboardPage-module_primaryButton__uaCW9","customizeButton":"DashboardPage-module_customizeButton__D6kV3","editBanner":"DashboardPage-module_editBanner__7IN5D","syncStatus":"DashboardPage-module_syncStatus__BxFQW","syncError":"DashboardPage-module_syncError__U-uis","grid":"DashboardPage-module_grid__OVgfA","sizeS":"DashboardPage-module_sizeS__leLYa","sizeM":"DashboardPage-module_sizeM__TkfbJ","sizeL":"DashboardPage-module_sizeL__Gbs5b","widget":"DashboardPage-module_widget__p6N-1","editing":"DashboardPage-module_editing__rtEwa","widgetHeader":"DashboardPage-module_widgetHeader__m7YWn","widgetIcon":"DashboardPage-module_widgetIcon__1npXI","dragHandle":"DashboardPage-module_dragHandle__rWGWh","rangeTitle":"DashboardPage-module_rangeTitle__IxHJR","widgetActions":"DashboardPage-module_widgetActions__E2pfv","iconButton":"DashboardPage-module_iconButton__v7jtL","sizeToggle":"DashboardPage-module_sizeToggle__wmv6Y","activeSize":"DashboardPage-module_activeSize__vFi0w","widgetBody":"DashboardPage-module_widgetBody__8IPCC","skeleton":"DashboardPage-module_skeleton__V--PR","pulse":"DashboardPage-module_pulse__VLsO0","state":"DashboardPage-module_state__h3q31","tableBody":"DashboardPage-module_tableBody__iJCJd","tableRow":"DashboardPage-module_tableRow__N5FgV","travelersGrid":"DashboardPage-module_travelersGrid__bYR9i","unusedGrid":"DashboardPage-module_unusedGrid__WyJzI","tableHead":"DashboardPage-module_tableHead__n3RLy","typeChips":"DashboardPage-module_typeChips__zCQA2","carrier":"DashboardPage-module_carrier__EAgok","nearExpiry":"DashboardPage-module_nearExpiry__u13P9","summary":"DashboardPage-module_summary__5kp8D","infoList":"DashboardPage-module_infoList__seS0s","rows":"DashboardPage-module_rows__rPy8n","row":"DashboardPage-module_row__uIAgO","widgetFooter":"DashboardPage-module_widgetFooter__OWOyX","editFooter":"DashboardPage-module_editFooter__OHwct","emptyPage":"DashboardPage-module_emptyPage__2QBJk","scrim":"DashboardPage-module_scrim__9ftDX","catalog":"DashboardPage-module_catalog__PoSpA","catalogBody":"DashboardPage-module_catalogBody__AmzLB","catalogItem":"DashboardPage-module_catalogItem__tgxzn","catalogIcon":"DashboardPage-module_catalogIcon__rXPbn","added":"DashboardPage-module_added__c9XNj","dragGhost":"DashboardPage-module_dragGhost__OemVj"};
|
|
1746
1954
|
|
|
1747
1955
|
const CATALOG = [
|
|
1748
|
-
{ type: 'travelers', title: "Today's Travelers", description: 'Current travelers with dates and travel types.' },
|
|
1749
|
-
{ type: 'unused', title: 'Unused Tickets', description: 'Unused, unexpired airline tickets and
|
|
1956
|
+
{ type: 'travelers', title: "Today's Travelers", description: 'Current travelers with dates and travel types, plus the Where Are My Travelers report.' },
|
|
1957
|
+
{ type: 'unused', title: 'Unused Tickets', description: 'Unused, unexpired airline tickets with traveler, carrier, expiration, and amount.' },
|
|
1750
1958
|
{ type: 'info', title: 'Info Center', description: 'Informational links, newsletters, and training resources.' },
|
|
1751
1959
|
];
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1960
|
+
const TRAVELER_RANGES = [
|
|
1961
|
+
{ key: 'last7', label: "Last 7 Days' Travelers" },
|
|
1962
|
+
{ key: 'yesterday', label: "Yesterday's Travelers" },
|
|
1963
|
+
{ key: 'today', label: "Today's Travelers" },
|
|
1964
|
+
{ key: 'tomorrow', label: "Tomorrow's Travelers" },
|
|
1965
|
+
{ key: 'next7', label: "Next 7 Days' Travelers" },
|
|
1966
|
+
];
|
|
1967
|
+
const rowsForSize = (size) => size === 'S' ? 3 : size === 'M' ? 6 : 10;
|
|
1968
|
+
const WidgetIcon = ({ type }) => type === 'travelers' ? jsxRuntime.jsx(UserIcon, { size: 20 }) : jsxRuntime.jsx(InfoIcon$1, { size: 20 });
|
|
1969
|
+
const LoadingState = () => jsxRuntime.jsxs("div", { className: styles$8.skeleton, children: [jsxRuntime.jsx("i", {}), jsxRuntime.jsx("i", {}), jsxRuntime.jsx("i", {}), jsxRuntime.jsx("span", { children: "Refreshing\u2026" })] });
|
|
1970
|
+
const EmptyState = ({ message }) => jsxRuntime.jsxs("div", { className: styles$8.state, children: [jsxRuntime.jsx(CheckIcon$2, { size: 28 }), jsxRuntime.jsx("span", { children: message })] });
|
|
1971
|
+
const ErrorState = ({ onRetry }) => jsxRuntime.jsxs("div", { className: styles$8.state, children: [jsxRuntime.jsx(WarningIcon$1, { size: 28 }), jsxRuntime.jsx("span", { children: "Couldn't load this card." }), jsxRuntime.jsxs("button", { type: "button", onClick: onRetry, children: [jsxRuntime.jsx(RefreshIcon, { size: 16 }), "Retry"] })] });
|
|
1972
|
+
const TravelersBody = ({ records, size }) => (jsxRuntime.jsxs("div", { className: styles$8.tableBody, children: [jsxRuntime.jsxs("div", { className: [styles$8.tableRow, styles$8.travelersGrid, styles$8.tableHead].join(' '), children: [jsxRuntime.jsx("span", { children: "Traveler(s)" }), jsxRuntime.jsx("span", { children: "Dates" }), jsxRuntime.jsx("span", { children: "Types" })] }), records.slice(0, rowsForSize(size)).map((record, index, visible) => (jsxRuntime.jsxs("div", { className: [styles$8.tableRow, styles$8.travelersGrid].join(' '), "data-last": index === visible.length - 1, children: [jsxRuntime.jsx("strong", { children: record.traveler }), jsxRuntime.jsx("span", { children: record.dates }), jsxRuntime.jsx("span", { className: styles$8.typeChips, children: record.types.map((type) => jsxRuntime.jsx("b", { title: type, children: type }, type)) })] }, `${record.traveler}-${index}`)))] }));
|
|
1973
|
+
const UnusedBody = ({ records, size, totalAmount = '$0.00' }) => (jsxRuntime.jsxs("div", { className: styles$8.tableBody, children: [jsxRuntime.jsxs("div", { className: [styles$8.tableRow, styles$8.unusedGrid, styles$8.tableHead].join(' '), children: [jsxRuntime.jsx("span", { children: "Traveler" }), jsxRuntime.jsx("span", { children: "Air" }), jsxRuntime.jsx("span", { children: "Exp" }), jsxRuntime.jsx("span", { children: "Amount" })] }), records.slice(0, rowsForSize(size)).map((record, index, visible) => (jsxRuntime.jsxs("div", { className: [styles$8.tableRow, styles$8.unusedGrid].join(' '), "data-last": index === visible.length - 1, children: [jsxRuntime.jsx("span", { children: record.traveler }), jsxRuntime.jsxs("strong", { className: styles$8.carrier, children: [record.airlineLogo && jsxRuntime.jsx("img", { src: record.airlineLogo, alt: "" }), record.airline] }), jsxRuntime.jsx("span", { className: record.expDays <= 28 ? styles$8.nearExpiry : '', children: record.exp }), jsxRuntime.jsx("strong", { children: record.amount })] }, `${record.traveler}-${index}`))), jsxRuntime.jsxs("div", { className: styles$8.summary, children: [jsxRuntime.jsxs("span", { children: [records.length, " unused ticket", records.length === 1 ? '' : 's'] }), jsxRuntime.jsxs("span", { children: ["Total ", jsxRuntime.jsx("strong", { children: totalAmount })] })] })] }));
|
|
1974
|
+
const InfoBody = ({ records, size, onNavigate }) => (jsxRuntime.jsx("div", { className: styles$8.infoList, children: records.slice(0, size === 'S' ? 3 : size === 'M' ? 5 : 9).map((item) => item.href ? (jsxRuntime.jsxs("a", { href: item.href, target: "_blank", rel: "noopener noreferrer", children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: item.title }), item.body && jsxRuntime.jsx("small", { children: item.body })] }), jsxRuntime.jsx("b", { children: "\u2197" })] }, item.id)) : (jsxRuntime.jsxs("button", { type: "button", onClick: () => onNavigate?.('/info-center', { openArticleId: item.id }), children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: item.title }), item.body && jsxRuntime.jsx("small", { children: item.body })] }), jsxRuntime.jsx("b", { children: "\u203A" })] }, item.id))) }));
|
|
1975
|
+
const WidgetBody = ({ widget, onNavigate }) => {
|
|
1976
|
+
if (widget.travelerRecords)
|
|
1977
|
+
return jsxRuntime.jsx(TravelersBody, { records: widget.travelerRecords, size: widget.size });
|
|
1978
|
+
if (widget.unusedRecords)
|
|
1979
|
+
return jsxRuntime.jsx(UnusedBody, { records: widget.unusedRecords, totalAmount: widget.unusedTotalAmount, size: widget.size });
|
|
1980
|
+
if (widget.infoCenterRecords)
|
|
1981
|
+
return jsxRuntime.jsx(InfoBody, { records: widget.infoCenterRecords, size: widget.size, onNavigate: onNavigate });
|
|
1982
|
+
return jsxRuntime.jsx("div", { className: styles$8.rows, children: widget.rows?.map((row, index) => jsxRuntime.jsxs("div", { className: styles$8.row, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: row.primary }), row.secondary && jsxRuntime.jsx("span", { children: row.secondary })] }), row.badge && jsxRuntime.jsx("small", { children: row.badge }), row.value && jsxRuntime.jsx("b", { children: row.value })] }, `${row.primary}-${index}`)) });
|
|
1983
|
+
};
|
|
1984
|
+
const WidgetCard = ({ widget, editMode, index, count, onRefresh, onRemove, onResize, onReorder, onTravelerRangeChange, onNavigate }) => {
|
|
1985
|
+
const [rangeIndex, setRangeIndex] = React.useState(2);
|
|
1986
|
+
const isTravelers = widget.type === 'travelers';
|
|
1987
|
+
const changeRange = (delta) => {
|
|
1988
|
+
const next = Math.max(0, Math.min(TRAVELER_RANGES.length - 1, rangeIndex + delta));
|
|
1989
|
+
setRangeIndex(next);
|
|
1990
|
+
onTravelerRangeChange?.(widget, TRAVELER_RANGES[next].key);
|
|
1991
|
+
};
|
|
1992
|
+
const state = widget.state ?? 'data';
|
|
1993
|
+
return (jsxRuntime.jsxs("article", { className: [styles$8.widget, editMode ? styles$8.editing : ''].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("header", { className: styles$8.widgetHeader, children: [editMode && jsxRuntime.jsx("span", { className: styles$8.dragHandle, "aria-hidden": "true", children: "\u283F" }), jsxRuntime.jsx("span", { className: styles$8.widgetIcon, children: jsxRuntime.jsx(WidgetIcon, { type: widget.type }) }), isTravelers ? jsxRuntime.jsxs("div", { className: styles$8.rangeTitle, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Show previous traveler range", disabled: rangeIndex === 0, onClick: () => changeRange(-1), children: jsxRuntime.jsx(ChevronLeftIcon, { size: 14 }) }), jsxRuntime.jsx("h3", { children: TRAVELER_RANGES[rangeIndex].label }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Show next traveler range", disabled: rangeIndex === TRAVELER_RANGES.length - 1, onClick: () => changeRange(1), children: jsxRuntime.jsx(ChevronRightIcon$1, { size: 14 }) })] }) : jsxRuntime.jsx("h3", { children: widget.title }), jsxRuntime.jsx("div", { className: styles$8.widgetActions, children: editMode ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: styles$8.sizeToggle, role: "group", "aria-label": `${widget.title} size`, children: ['S', 'M', 'L'].map((size) => jsxRuntime.jsx("button", { type: "button", "aria-label": { S: 'Small', M: 'Medium', L: 'Large' }[size], "aria-pressed": widget.size === size, className: widget.size === size ? styles$8.activeSize : '', onClick: () => onResize?.(widget, size), children: size }, size)) }), !widget.pinned && jsxRuntime.jsx("button", { type: "button", className: styles$8.iconButton, "aria-label": `Remove ${widget.title} card`, onClick: () => onRemove?.(widget), children: jsxRuntime.jsx(CloseIcon, { size: 16 }) })] }) : jsxRuntime.jsx("button", { type: "button", className: styles$8.iconButton, "aria-label": `Refresh ${widget.title}`, onClick: () => onRefresh?.(widget), disabled: state === 'loading', children: jsxRuntime.jsx(RefreshIcon, { size: 20 }) }) })] }), jsxRuntime.jsx("div", { className: styles$8.widgetBody, children: state === 'loading' ? jsxRuntime.jsx(LoadingState, {}) : state === 'error' ? jsxRuntime.jsx(ErrorState, { onRetry: () => onRefresh?.(widget) }) : state === 'empty' ? jsxRuntime.jsx(EmptyState, { message: widget.emptyMessage ?? 'No records available.' }) : jsxRuntime.jsx(WidgetBody, { widget: widget, onNavigate: onNavigate }) }), !editMode && (state === 'data' || state === 'empty') && (widget.footerLabel || widget.footerSecondary) && jsxRuntime.jsxs("footer", { className: styles$8.widgetFooter, children: [widget.footerSecondary && state === 'data' && jsxRuntime.jsxs("button", { type: "button", onClick: () => onNavigate?.(widget.footerSecondary.path), children: [jsxRuntime.jsx(FilterIcon$1, { size: 16 }), widget.footerSecondary.label] }), widget.footerLabel && jsxRuntime.jsxs("button", { type: "button", onClick: () => onNavigate?.(widget.footerPath ?? '#'), children: [widget.footerLabel, jsxRuntime.jsx("span", { children: "\u2192" })] })] }), editMode && jsxRuntime.jsxs("footer", { className: styles$8.editFooter, children: [jsxRuntime.jsx("span", { children: "Reorder" }), jsxRuntime.jsx("button", { type: "button", "aria-label": `Move ${widget.title} earlier`, disabled: index === 0, onClick: () => onReorder?.(index, index - 1), children: "\u2190" }), jsxRuntime.jsx("button", { type: "button", "aria-label": `Move ${widget.title} later`, disabled: index === count - 1, onClick: () => onReorder?.(index, index + 1), children: "\u2192" })] })] }));
|
|
1994
|
+
};
|
|
1995
|
+
/** Exact, service-free rendering of Hub's personalized home page. */
|
|
1996
|
+
const DashboardPage = ({ greeting = 'Good morning', firstName, accountName, widgets = [], systemBanners = [], alertBanners = [], syncStatus = 'idle', onRefresh, onRemove, onResize, onReorder, onReset, onAddWidget, onTravelerRangeChange, onNavigate, className = '' }) => {
|
|
1759
1997
|
const [editMode, setEditMode] = React.useState(false);
|
|
1760
1998
|
const [catalogOpen, setCatalogOpen] = React.useState(false);
|
|
1999
|
+
const [dragFrom, setDragFrom] = React.useState(null);
|
|
2000
|
+
const dragGhost = React.useRef(null);
|
|
1761
2001
|
const presentTypes = new Set(widgets.map((widget) => widget.type));
|
|
1762
|
-
return (jsxRuntime.jsxs("div", { className: [styles$8.page, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx(PageBanners, { systemBanners: systemBanners, alertBanners: alertBanners }), jsxRuntime.jsxs("header", { className: styles$8.pageHeader, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("h1", { children: [greeting, firstName ? `, ${firstName}` : ''] }), accountName && jsxRuntime.jsxs("p", { children: ["Here's your personalized travel overview for ", accountName, "."] })] }), jsxRuntime.jsx("div", { className: styles$8.pageActions, children: editMode ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", className: styles$8.outlineButton, onClick: () => setCatalogOpen(true), children: [jsxRuntime.jsx(PlusIcon$2, { size: 20 }), "Add card"] }), jsxRuntime.jsx("button", { type: "button", className: styles$8.textButton, onClick: onReset, children: "Reset to default" }), jsxRuntime.jsxs("button", { type: "button", className: styles$8.primaryButton, onClick: () => { setEditMode(false); setCatalogOpen(false); }, children: [jsxRuntime.jsx(CheckIcon$2, { size: 20 }), "Done"] })] }) : jsxRuntime.jsxs("button", { type: "button", className: styles$8.customizeButton, onClick: () => setEditMode(true), children: [jsxRuntime.jsx(SettingsIcon, { size: 20 }), "Customize Your Home Page"] }) })] }), editMode && jsxRuntime.jsxs("div", { className: styles$8.editBanner, children: [jsxRuntime.jsx(EditIcon$2, { size: 20 }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: "Customizing your home page." }), " Drag cards to reorder, resize with S / M / L, or remove cards. Your layout saves automatically."] })] }), syncStatus === 'saving' && jsxRuntime.jsx("p", { className: styles$8.syncStatus, "aria-live": "polite", children: "Saving layout\u2026" }), syncStatus === 'error' && jsxRuntime.jsx("p", { className: [styles$8.syncStatus, styles$8.syncError].join(' '), role: "alert", children: "Layout couldn't be saved. Changes are preserved locally." }), widgets.length ? jsxRuntime.jsx("div", { className: styles$8.grid, children: widgets.map((widget) => jsxRuntime.jsx("div", { className: styles$8[`size${widget.size}`],
|
|
1763
|
-
|
|
2002
|
+
return (jsxRuntime.jsxs("div", { className: [styles$8.page, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx(PageBanners, { systemBanners: systemBanners, alertBanners: alertBanners }), jsxRuntime.jsxs("header", { className: styles$8.pageHeader, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("h1", { children: [greeting, firstName ? `, ${firstName}` : ''] }), accountName && jsxRuntime.jsxs("p", { children: ["Here's your personalized travel overview for ", accountName, "."] })] }), jsxRuntime.jsx("div", { className: styles$8.pageActions, children: editMode ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", className: styles$8.outlineButton, onClick: () => setCatalogOpen(true), children: [jsxRuntime.jsx(PlusIcon$2, { size: 20 }), "Add card"] }), jsxRuntime.jsx("button", { type: "button", className: styles$8.textButton, onClick: onReset, children: "Reset to default" }), jsxRuntime.jsxs("button", { type: "button", className: styles$8.primaryButton, onClick: () => { setEditMode(false); setCatalogOpen(false); }, children: [jsxRuntime.jsx(CheckIcon$2, { size: 20 }), "Done"] })] }) : jsxRuntime.jsxs("button", { type: "button", className: styles$8.customizeButton, onClick: () => setEditMode(true), children: [jsxRuntime.jsx(SettingsIcon, { size: 20 }), "Customize Your Home Page"] }) })] }), editMode && jsxRuntime.jsxs("div", { className: styles$8.editBanner, children: [jsxRuntime.jsx(EditIcon$2, { size: 20 }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: "Customizing your home page." }), " Drag cards to reorder, resize with S / M / L, or remove cards. Your layout saves automatically."] })] }), syncStatus === 'saving' && jsxRuntime.jsx("p", { className: styles$8.syncStatus, "aria-live": "polite", children: "Saving layout\u2026" }), syncStatus === 'error' && jsxRuntime.jsx("p", { className: [styles$8.syncStatus, styles$8.syncError].join(' '), role: "alert", children: "Layout couldn't be saved. Changes are preserved locally." }), widgets.length ? jsxRuntime.jsx("div", { className: styles$8.grid, children: widgets.map((widget, index) => jsxRuntime.jsx("div", { className: styles$8[`size${widget.size}`], draggable: editMode, onDragStart: (event) => { if (!editMode)
|
|
2003
|
+
return; setDragFrom(index); const ghost = document.createElement('div'); ghost.className = styles$8.dragGhost; document.body.appendChild(ghost); dragGhost.current = ghost; event.dataTransfer.setDragImage(ghost, 0, 0); }, onDragOver: (event) => event.preventDefault(), onDrop: () => { if (dragFrom !== null && dragFrom !== index)
|
|
2004
|
+
onReorder?.(dragFrom, index); setDragFrom(null); }, onDragEnd: () => { setDragFrom(null); dragGhost.current?.remove(); dragGhost.current = null; }, children: jsxRuntime.jsx(WidgetCard, { widget: widget, editMode: editMode, index: index, count: widgets.length, onRefresh: onRefresh, onRemove: onRemove, onResize: onResize, onReorder: onReorder, onTravelerRangeChange: onTravelerRangeChange, onNavigate: onNavigate }) }, widget.id)) }) : jsxRuntime.jsxs("div", { className: styles$8.emptyPage, children: [jsxRuntime.jsx(PlusIcon$2, { size: 28 }), jsxRuntime.jsx("strong", { children: "Your home page is empty" }), jsxRuntime.jsx("span", { children: "Use \"Customize\" to add cards from the catalog." })] }), catalogOpen && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", className: styles$8.scrim, "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false) }), jsxRuntime.jsxs("aside", { className: styles$8.catalog, role: "dialog", "aria-modal": "true", "aria-label": "Add cards", children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { children: "Add a card" }), jsxRuntime.jsx("p", { children: "Cards available to your role for this account" })] }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false), children: jsxRuntime.jsx(CloseIcon, { size: 20 }) })] }), jsxRuntime.jsx("div", { className: styles$8.catalogBody, children: CATALOG.map((item) => jsxRuntime.jsxs("div", { className: styles$8.catalogItem, children: [jsxRuntime.jsx("span", { className: styles$8.catalogIcon, children: jsxRuntime.jsx(WidgetIcon, { type: item.type }) }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: item.title }), jsxRuntime.jsx("span", { children: "Account" }), jsxRuntime.jsx("p", { children: item.description })] }), presentTypes.has(item.type) ? jsxRuntime.jsxs("span", { className: styles$8.added, children: [jsxRuntime.jsx(CheckIcon$2, { size: 16 }), "Added"] }) : jsxRuntime.jsxs("button", { type: "button", onClick: () => onAddWidget?.(item.type), children: [jsxRuntime.jsx(PlusIcon$2, { size: 16 }), "Add"] })] }, item.type)) }), jsxRuntime.jsx("footer", { children: "Each card can appear once on your home page." })] })] })] }));
|
|
1764
2005
|
};
|
|
1765
2006
|
|
|
1766
2007
|
var styles$7 = {"sidebarSection":"GroupTravelRequestPage-module_sidebarSection__reGmm","sidebarTitle":"GroupTravelRequestPage-module_sidebarTitle__G-Oc7","formContent":"GroupTravelRequestPage-module_formContent__1nzfw","field":"GroupTravelRequestPage-module_field__-HfoK","label":"GroupTravelRequestPage-module_label__sEOeK","input":"GroupTravelRequestPage-module_input__lXQDl","select":"GroupTravelRequestPage-module_select__D7ICw","textarea":"GroupTravelRequestPage-module_textarea__AYtX1","radioGroup":"GroupTravelRequestPage-module_radioGroup__xP97-","radioLabel":"GroupTravelRequestPage-module_radioLabel__9wYXU","segmentHeader":"GroupTravelRequestPage-module_segmentHeader__8a1Re"};
|
|
@@ -2056,7 +2297,7 @@ const NotFoundPage = ({ errorCode = '404', title = 'Page Not Found', message = '
|
|
|
2056
2297
|
};
|
|
2057
2298
|
NotFoundPage.displayName = 'NotFoundPage';
|
|
2058
2299
|
|
|
2059
|
-
var styles$3 = {"page":"TeamManagementPage-module_page__iRm2r","header":"TeamManagementPage-module_header__ychcg","tabNav":"TeamManagementPage-module_tabNav__uJdI0","tabButton":"TeamManagementPage-module_tabButton__lvZVy","active":"TeamManagementPage-module_active__weGUn","tabIcon":"TeamManagementPage-module_tabIcon__OuuMJ","tabBadge":"TeamManagementPage-module_tabBadge__dapL0","body":"TeamManagementPage-module_body__10aka","main":"TeamManagementPage-module_main__-lFtT","sidebar":"TeamManagementPage-module_sidebar__u8syG","footer":"TeamManagementPage-module_footer__he9G0"};
|
|
2300
|
+
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","header":"TeamManagementPage-module_header__ychcg","tabNav":"TeamManagementPage-module_tabNav__uJdI0","tabButton":"TeamManagementPage-module_tabButton__lvZVy","active":"TeamManagementPage-module_active__weGUn","tabIcon":"TeamManagementPage-module_tabIcon__OuuMJ","tabBadge":"TeamManagementPage-module_tabBadge__dapL0","body":"TeamManagementPage-module_body__10aka","main":"TeamManagementPage-module_main__-lFtT","sidebar":"TeamManagementPage-module_sidebar__u8syG","footer":"TeamManagementPage-module_footer__he9G0"};
|
|
2060
2301
|
|
|
2061
2302
|
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" })] }));
|
|
2062
2303
|
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" })] }));
|
|
@@ -2071,8 +2312,11 @@ const DEFAULT_TABS = [
|
|
|
2071
2312
|
/**
|
|
2072
2313
|
* TeamManagementPage - Layout for team management with tabbed navigation
|
|
2073
2314
|
*/
|
|
2074
|
-
const TeamManagementPage = ({ header, tabs = DEFAULT_TABS, activeTab = 'roster', onTabChange, children, sidebar, footer, className = '', }) => {
|
|
2315
|
+
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = 'roster', onTabChange, children, sidebar, footer, className = '', }) => {
|
|
2075
2316
|
const pageClasses = [styles$3.page, className].filter(Boolean).join(' ');
|
|
2317
|
+
if (variant === 'overview') {
|
|
2318
|
+
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] })] })] }));
|
|
2319
|
+
}
|
|
2076
2320
|
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [header && jsxRuntime.jsx("div", { className: styles$3.header, children: header }), jsxRuntime.jsx("div", { className: styles$3.tabNav, children: tabs.map((tab) => (jsxRuntime.jsxs("button", { type: "button", className: [
|
|
2077
2321
|
styles$3.tabButton,
|
|
2078
2322
|
activeTab === tab.id ? styles$3.active : '',
|
|
@@ -2080,7 +2324,7 @@ const TeamManagementPage = ({ header, tabs = DEFAULT_TABS, activeTab = 'roster',
|
|
|
2080
2324
|
};
|
|
2081
2325
|
TeamManagementPage.displayName = 'TeamManagementPage';
|
|
2082
2326
|
|
|
2083
|
-
var styles$2 = {"page":"TeamSchedulePage-module_page__ubf0D","header":"TeamSchedulePage-module_header__kS9hw","headerMobile":"TeamSchedulePage-module_headerMobile__3oBL2","titleSection":"TeamSchedulePage-module_titleSection__IAfn0","title":"TeamSchedulePage-module_title__XA2Pn","filters":"TeamSchedulePage-module_filters__yJBro","metrics":"TeamSchedulePage-module_metrics__lzVBG","metric":"TeamSchedulePage-module_metric__xhoOH","metricValue":"TeamSchedulePage-module_metricValue__-pZxP","metricLabel":"TeamSchedulePage-module_metricLabel__am8yI","
|
|
2327
|
+
var styles$2 = {"page":"TeamSchedulePage-module_page__ubf0D","header":"TeamSchedulePage-module_header__kS9hw","headerMobile":"TeamSchedulePage-module_headerMobile__3oBL2","titleSection":"TeamSchedulePage-module_titleSection__IAfn0","title":"TeamSchedulePage-module_title__XA2Pn","filters":"TeamSchedulePage-module_filters__yJBro","metrics":"TeamSchedulePage-module_metrics__lzVBG","metric":"TeamSchedulePage-module_metric__xhoOH","metricValue":"TeamSchedulePage-module_metricValue__-pZxP","metricLabel":"TeamSchedulePage-module_metricLabel__am8yI","content":"TeamSchedulePage-module_content__-5J1x"};
|
|
2084
2328
|
|
|
2085
2329
|
/**
|
|
2086
2330
|
* TeamSchedulePage - Team travel schedule page layout
|
|
@@ -2091,7 +2335,7 @@ var styles$2 = {"page":"TeamSchedulePage-module_page__ubf0D","header":"TeamSched
|
|
|
2091
2335
|
* - Action buttons
|
|
2092
2336
|
* - Schedule table (compact or expanded view)
|
|
2093
2337
|
*/
|
|
2094
|
-
const TeamSchedulePage = ({ title = 'Team Travel Schedule', mobileTitle = 'Travel Schedule', metrics = [], teamFilter, serviceFilter, actions, compactView, expandedView, viewMode = 'compact', isMobile = false, className = '', }) => {
|
|
2338
|
+
const TeamSchedulePage = ({ title = 'Team Travel Schedule', mobileTitle = 'Travel Schedule', metrics = [], summary, teamFilter, serviceFilter, actions, compactView, expandedView, viewMode = 'compact', isMobile = false, className = '', }) => {
|
|
2095
2339
|
const pageClasses = [
|
|
2096
2340
|
styles$2.page,
|
|
2097
2341
|
className,
|
|
@@ -2100,11 +2344,11 @@ const TeamSchedulePage = ({ title = 'Team Travel Schedule', mobileTitle = 'Trave
|
|
|
2100
2344
|
styles$2.header,
|
|
2101
2345
|
isMobile ? styles$2.headerMobile : '',
|
|
2102
2346
|
].filter(Boolean).join(' ');
|
|
2103
|
-
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$2.titleSection, children: [jsxRuntime.jsx("h1", { className: styles$2.title, children: isMobile ? mobileTitle : title }), jsxRuntime.jsxs("div", { className: styles$2.filters, children: [teamFilter, serviceFilter] })] }), metrics.length > 0 && (jsxRuntime.jsx("div", { className: styles$2.metrics, children: metrics.map((metric, i) => (jsxRuntime.jsxs("div", { className: styles$2.metric, children: [jsxRuntime.jsxs("span", { className: styles$2.metricValue, children: [metric.prefix, metric.value, metric.suffix] }), jsxRuntime.jsx("span", { className: styles$2.metricLabel, children: metric.label })] }, i))) }))] }), actions
|
|
2347
|
+
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$2.titleSection, children: [jsxRuntime.jsx("h1", { className: styles$2.title, children: isMobile ? mobileTitle : title }), jsxRuntime.jsxs("div", { className: styles$2.filters, children: [teamFilter, serviceFilter] })] }), (summary || metrics.length > 0) && (jsxRuntime.jsx("div", { className: styles$2.metrics, children: summary ?? metrics.map((metric, i) => (jsxRuntime.jsxs("div", { className: styles$2.metric, children: [jsxRuntime.jsxs("span", { className: styles$2.metricValue, children: [metric.prefix, metric.value, metric.suffix] }), jsxRuntime.jsx("span", { className: styles$2.metricLabel, children: metric.label })] }, i))) }))] }), actions, jsxRuntime.jsx("div", { className: styles$2.content, children: viewMode === 'compact' ? compactView : expandedView })] }));
|
|
2104
2348
|
};
|
|
2105
2349
|
TeamSchedulePage.displayName = 'TeamSchedulePage';
|
|
2106
2350
|
|
|
2107
|
-
var styles$1 = {"page":"TeamTravelCalendarPage-module_page__uRR69","header":"TeamTravelCalendarPage-module_header__WWbAV","headerMobile":"TeamTravelCalendarPage-module_headerMobile__qSE3G","titleSection":"TeamTravelCalendarPage-module_titleSection__CjVKu","title":"TeamTravelCalendarPage-module_title__a03rT","filters":"TeamTravelCalendarPage-module_filters__BMjwJ","metrics":"TeamTravelCalendarPage-module_metrics__qy4Vv","metric":"TeamTravelCalendarPage-module_metric__72yC9","metricValue":"TeamTravelCalendarPage-module_metricValue__z83Jz","metricLabel":"TeamTravelCalendarPage-module_metricLabel__jkWNF","
|
|
2351
|
+
var styles$1 = {"page":"TeamTravelCalendarPage-module_page__uRR69","header":"TeamTravelCalendarPage-module_header__WWbAV","headerMobile":"TeamTravelCalendarPage-module_headerMobile__qSE3G","titleSection":"TeamTravelCalendarPage-module_titleSection__CjVKu","title":"TeamTravelCalendarPage-module_title__a03rT","filters":"TeamTravelCalendarPage-module_filters__BMjwJ","metrics":"TeamTravelCalendarPage-module_metrics__qy4Vv","metric":"TeamTravelCalendarPage-module_metric__72yC9","metricValue":"TeamTravelCalendarPage-module_metricValue__z83Jz","metricLabel":"TeamTravelCalendarPage-module_metricLabel__jkWNF","content":"TeamTravelCalendarPage-module_content__w4LsI"};
|
|
2108
2352
|
|
|
2109
2353
|
/**
|
|
2110
2354
|
* TeamTravelCalendarPage - Team travel calendar page layout
|
|
@@ -2116,7 +2360,7 @@ var styles$1 = {"page":"TeamTravelCalendarPage-module_page__uRR69","header":"Tea
|
|
|
2116
2360
|
* - Main calendar/card/list view
|
|
2117
2361
|
* - Sidebar for due dates
|
|
2118
2362
|
*/
|
|
2119
|
-
const TeamTravelCalendarPage = ({ title = 'Team Travel Calendar', mobileTitle = 'Travel Calendar', metrics = [], teamFilter, serviceFilter, viewSelector, typeSelector, calendarView, cardView, listView, sidebar, view = 'calendar', sidebarOpen = false, isMobile = false, className = '', }) => {
|
|
2363
|
+
const TeamTravelCalendarPage = ({ title = 'Team Travel Calendar', mobileTitle = 'Travel Calendar', metrics = [], summary, teamFilter, serviceFilter, viewSelector, typeSelector, calendarView, cardView, listView, sidebar, view = 'calendar', sidebarOpen: _sidebarOpen = false, isMobile = false, className = '', }) => {
|
|
2120
2364
|
const pageClasses = [
|
|
2121
2365
|
styles$1.page,
|
|
2122
2366
|
className,
|
|
@@ -2137,7 +2381,7 @@ const TeamTravelCalendarPage = ({ title = 'Team Travel Calendar', mobileTitle =
|
|
|
2137
2381
|
return null;
|
|
2138
2382
|
}
|
|
2139
2383
|
};
|
|
2140
|
-
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$1.titleSection, children: [jsxRuntime.jsx("h1", { className: styles$1.title, children: isMobile ? mobileTitle : title }), jsxRuntime.jsxs("div", { className: styles$1.filters, children: [teamFilter, serviceFilter, viewSelector, typeSelector] })] }), metrics.length > 0 && (jsxRuntime.jsx("div", { className: styles$1.metrics, children: metrics.map((metric, i) => (jsxRuntime.jsxs("button", { className: styles$1.metric, onClick: metric.onClick, type: "button", disabled: !metric.onClick, children: [jsxRuntime.jsx("span", { className: styles$1.metricValue, children: metric.value }), jsxRuntime.jsx("span", { className: styles$1.metricLabel, children: metric.label })] }, i))) }))] }), jsxRuntime.
|
|
2384
|
+
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$1.titleSection, children: [jsxRuntime.jsx("h1", { className: styles$1.title, children: isMobile ? mobileTitle : title }), jsxRuntime.jsxs("div", { className: styles$1.filters, children: [teamFilter, serviceFilter, viewSelector, typeSelector] })] }), (summary || metrics.length > 0) && (jsxRuntime.jsx("div", { className: styles$1.metrics, children: summary ?? metrics.map((metric, i) => (jsxRuntime.jsxs("button", { className: styles$1.metric, onClick: metric.onClick, type: "button", disabled: !metric.onClick, children: [jsxRuntime.jsx("span", { className: styles$1.metricValue, children: metric.value }), jsxRuntime.jsx("span", { className: styles$1.metricLabel, children: metric.label })] }, i))) }))] }), jsxRuntime.jsx("div", { className: styles$1.content, children: renderView() }), sidebar] }));
|
|
2141
2385
|
};
|
|
2142
2386
|
TeamTravelCalendarPage.displayName = 'TeamTravelCalendarPage';
|
|
2143
2387
|
|
|
@@ -2166,6 +2410,7 @@ exports.AdministrationPage = AdministrationPage;
|
|
|
2166
2410
|
exports.AirSegment = AirSegment;
|
|
2167
2411
|
exports.Alert = Alert;
|
|
2168
2412
|
exports.AppLayout = AppLayout;
|
|
2413
|
+
exports.ArrowDownLeftIcon = ArrowDownLeftIcon;
|
|
2169
2414
|
exports.ArrowUpRightIcon = ArrowUpRightIcon;
|
|
2170
2415
|
exports.Avatar = Avatar;
|
|
2171
2416
|
exports.AvatarGroup = AvatarGroup;
|
|
@@ -2174,6 +2419,8 @@ exports.BuildingIcon = BuildingIcon;
|
|
|
2174
2419
|
exports.BusIcon = BusIcon$3;
|
|
2175
2420
|
exports.Button = Button;
|
|
2176
2421
|
exports.CalendarIcon = CalendarIcon$1;
|
|
2422
|
+
exports.CalendarTypeSelector = CalendarTypeSelector;
|
|
2423
|
+
exports.CalendarViewSelector = CalendarViewSelector;
|
|
2177
2424
|
exports.CarIcon = CarIcon$2;
|
|
2178
2425
|
exports.Card = Card;
|
|
2179
2426
|
exports.CardBody = CardBody;
|
|
@@ -2201,6 +2448,7 @@ exports.DrawerBody = DrawerBody;
|
|
|
2201
2448
|
exports.DrawerFooter = DrawerFooter;
|
|
2202
2449
|
exports.DrawerHeader = DrawerHeader;
|
|
2203
2450
|
exports.Dropdown = Dropdown;
|
|
2451
|
+
exports.DueDatesDrawer = DueDatesDrawer;
|
|
2204
2452
|
exports.EditIcon = EditIcon$2;
|
|
2205
2453
|
exports.EyeIcon = EyeIcon;
|
|
2206
2454
|
exports.FilterChip = FilterChip;
|
|
@@ -2208,6 +2456,7 @@ exports.FilterIcon = FilterIcon$1;
|
|
|
2208
2456
|
exports.FormField = FormField;
|
|
2209
2457
|
exports.FormRow = FormRow;
|
|
2210
2458
|
exports.FormSection = FormSection;
|
|
2459
|
+
exports.FormStack = FormStack;
|
|
2211
2460
|
exports.GridIcon = GridIcon;
|
|
2212
2461
|
exports.GroundSegment = GroundSegment;
|
|
2213
2462
|
exports.GroupTravelRequestPage = GroupTravelRequestPage;
|
|
@@ -2255,9 +2504,12 @@ exports.RequestFormHeader = RequestFormHeader;
|
|
|
2255
2504
|
exports.RequestFormLayout = RequestFormLayout;
|
|
2256
2505
|
exports.RequestSummary = RequestSummary;
|
|
2257
2506
|
exports.RosterToolbar = RosterToolbar;
|
|
2507
|
+
exports.SUPPLIER_TYPE_OPTIONS = SUPPLIER_TYPE_OPTIONS;
|
|
2508
|
+
exports.SchoolContactForm = SchoolContactForm;
|
|
2258
2509
|
exports.SearchField = SearchField;
|
|
2259
2510
|
exports.SearchIcon = SearchIcon$1;
|
|
2260
2511
|
exports.Segment = Segment;
|
|
2512
|
+
exports.SegmentedSelector = SegmentedSelector;
|
|
2261
2513
|
exports.Select = Select;
|
|
2262
2514
|
exports.SelectFilter = SelectFilter;
|
|
2263
2515
|
exports.ServiceToggle = ServiceToggle;
|
|
@@ -2267,12 +2519,17 @@ exports.Sidenav = Sidenav;
|
|
|
2267
2519
|
exports.Spinner = Spinner;
|
|
2268
2520
|
exports.StatusBadge = StatusBadge;
|
|
2269
2521
|
exports.SummarySection = SummarySection;
|
|
2522
|
+
exports.SupplierTypeToggle = SupplierTypeToggle;
|
|
2270
2523
|
exports.Table = Table;
|
|
2271
2524
|
exports.Tag = Tag;
|
|
2272
2525
|
exports.TeamCard = TeamCard;
|
|
2273
2526
|
exports.TeamHeader = TeamHeader;
|
|
2274
2527
|
exports.TeamManagementPage = TeamManagementPage;
|
|
2528
|
+
exports.TeamScheduleActions = TeamScheduleActions;
|
|
2529
|
+
exports.TeamScheduleCompactTable = TeamScheduleCompactTable;
|
|
2530
|
+
exports.TeamScheduleExpandedTable = TeamScheduleExpandedTable;
|
|
2275
2531
|
exports.TeamSchedulePage = TeamSchedulePage;
|
|
2532
|
+
exports.TeamSubMenu = TeamSubMenu;
|
|
2276
2533
|
exports.TeamTravelCalendarPage = TeamTravelCalendarPage;
|
|
2277
2534
|
exports.Textarea = Textarea;
|
|
2278
2535
|
exports.Timepicker = Timepicker;
|
|
@@ -2282,6 +2539,7 @@ exports.Tooltip = Tooltip;
|
|
|
2282
2539
|
exports.Topbar = Topbar;
|
|
2283
2540
|
exports.TrashIcon = TrashIcon$2;
|
|
2284
2541
|
exports.TravelServiceIcon = TravelServiceIcon;
|
|
2542
|
+
exports.TravelSummaryMetrics = TravelSummaryMetrics;
|
|
2285
2543
|
exports.TravelerForm = TravelerForm;
|
|
2286
2544
|
exports.TrendDownIcon = TrendDownIcon;
|
|
2287
2545
|
exports.TrendUpIcon = TrendUpIcon;
|
|
@@ -2293,4 +2551,7 @@ exports.UserIcon = UserIcon;
|
|
|
2293
2551
|
exports.UsersIcon = UsersIcon$1;
|
|
2294
2552
|
exports.WarningIcon = WarningIcon$1;
|
|
2295
2553
|
exports.XIcon = XIcon;
|
|
2554
|
+
exports.formatCompactTripCost = formatCompactTripCost;
|
|
2555
|
+
exports.formatTeamScheduleTravelDates = formatTeamScheduleTravelDates;
|
|
2556
|
+
exports.isTravelDueDateCompleted = isTravelDueDateCompleted;
|
|
2296
2557
|
//# sourceMappingURL=index.js.map
|