@shortstravelmgmt/component-lib 0.1.3 → 0.1.5
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 +89 -7
- package/dist/index.esm.js +432 -275
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +437 -274
- 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
|
@@ -25,6 +25,7 @@ const ArrowUpRightIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { child
|
|
|
25
25
|
const ArrowDownLeftIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M17 7 7 17" }), jsxRuntime.jsx("path", { d: "M17 17H7V7" })] }), 'ArrowDownLeftIcon');
|
|
26
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');
|
|
27
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');
|
|
28
|
+
const UploadIcon = 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: "17 8 12 3 7 8" }), jsxRuntime.jsx("line", { x1: "12", x2: "12", y1: "3", y2: "15" })] }), 'UploadIcon');
|
|
28
29
|
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');
|
|
29
30
|
const CalendarIcon$1 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M8 2v4" }), jsxRuntime.jsx("path", { d: "M16 2v4" }), jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }), jsxRuntime.jsx("path", { d: "M3 10h18" })] }), 'CalendarIcon');
|
|
30
31
|
const UserIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }), jsxRuntime.jsx("circle", { cx: "12", cy: "7", r: "4" })] }), 'UserIcon');
|
|
@@ -109,7 +110,7 @@ const Icons = {
|
|
|
109
110
|
Trash: TrashIcon$2,
|
|
110
111
|
};
|
|
111
112
|
|
|
112
|
-
var styles$
|
|
113
|
+
var styles$1a = {"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"};
|
|
113
114
|
|
|
114
115
|
const variantIcons = {
|
|
115
116
|
primary: LightbulbIcon,
|
|
@@ -119,10 +120,10 @@ const variantIcons = {
|
|
|
119
120
|
};
|
|
120
121
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
121
122
|
const IconComponent = variantIcons[variant];
|
|
122
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
123
|
+
return (jsxRuntime.jsx("div", { className: `${styles$1a.alert} ${styles$1a[variant]} ${className}`, role: "alert", children: jsxRuntime.jsxs("div", { className: styles$1a.content, children: [jsxRuntime.jsx(IconComponent, { className: styles$1a.icon, size: 20 }), jsxRuntime.jsxs("div", { className: styles$1a.body, children: [title && jsxRuntime.jsx("h4", { className: styles$1a.title, children: title }), jsxRuntime.jsx("div", { className: styles$1a.message, children: children })] }), dismissible && onDismiss && (jsxRuntime.jsx("button", { type: "button", onClick: onDismiss, className: styles$1a.dismissButton, "aria-label": "Dismiss alert", children: jsxRuntime.jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
123
124
|
};
|
|
124
125
|
|
|
125
|
-
var styles$
|
|
126
|
+
var styles$19 = {"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"};
|
|
126
127
|
|
|
127
128
|
const getInitials = (name) => {
|
|
128
129
|
const parts = name.trim().split(/\s+/);
|
|
@@ -137,43 +138,43 @@ const getInitials = (name) => {
|
|
|
137
138
|
const Avatar = ({ src, alt, initials, name, size = 'md', className = '', ...props }) => {
|
|
138
139
|
const displayInitials = initials || (name ? getInitials(name) : '?');
|
|
139
140
|
const classNames = [
|
|
140
|
-
styles$
|
|
141
|
-
styles$
|
|
141
|
+
styles$19.avatar,
|
|
142
|
+
styles$19[size],
|
|
142
143
|
className,
|
|
143
144
|
]
|
|
144
145
|
.filter(Boolean)
|
|
145
146
|
.join(' ');
|
|
146
|
-
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: src ? (jsxRuntime.jsx("img", { src: src, alt: alt || name || 'Avatar', className: styles$
|
|
147
|
+
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: src ? (jsxRuntime.jsx("img", { src: src, alt: alt || name || 'Avatar', className: styles$19.image })) : (jsxRuntime.jsx("span", { className: styles$19.initials, children: displayInitials })) }));
|
|
147
148
|
};
|
|
148
149
|
Avatar.displayName = 'Avatar';
|
|
149
150
|
const AvatarGroup = ({ max = 4, className = '', children, ...props }) => {
|
|
150
151
|
const childArray = React.Children.toArray(children);
|
|
151
152
|
const visibleChildren = childArray.slice(0, max);
|
|
152
153
|
const remainingCount = childArray.length - max;
|
|
153
|
-
const classNames = [styles$
|
|
154
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsxRuntime.jsx("div", { className: `${styles$
|
|
154
|
+
const classNames = [styles$19.group, className].filter(Boolean).join(' ');
|
|
155
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsxRuntime.jsx("div", { className: `${styles$19.avatar} ${styles$19.md} ${styles$19.overflow}`, children: jsxRuntime.jsxs("span", { className: styles$19.initials, children: ["+", remainingCount] }) }))] }));
|
|
155
156
|
};
|
|
156
157
|
AvatarGroup.displayName = 'AvatarGroup';
|
|
157
158
|
|
|
158
|
-
var styles$
|
|
159
|
+
var styles$18 = {"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"};
|
|
159
160
|
|
|
160
161
|
/**
|
|
161
162
|
* Badge component for status indicators, labels, and tags.
|
|
162
163
|
*/
|
|
163
164
|
const Badge = ({ variant = 'default', size = 'md', dot = false, className = '', children, ...props }) => {
|
|
164
165
|
const classNames = [
|
|
165
|
-
styles$
|
|
166
|
-
styles$
|
|
167
|
-
styles$
|
|
166
|
+
styles$18.badge,
|
|
167
|
+
styles$18[variant],
|
|
168
|
+
styles$18[size],
|
|
168
169
|
className,
|
|
169
170
|
]
|
|
170
171
|
.filter(Boolean)
|
|
171
172
|
.join(' ');
|
|
172
|
-
return (jsxRuntime.jsxs("span", { className: classNames, ...props, children: [dot && jsxRuntime.jsx("span", { className: styles$
|
|
173
|
+
return (jsxRuntime.jsxs("span", { className: classNames, ...props, children: [dot && jsxRuntime.jsx("span", { className: styles$18.dot }), children] }));
|
|
173
174
|
};
|
|
174
175
|
Badge.displayName = 'Badge';
|
|
175
176
|
|
|
176
|
-
var styles$
|
|
177
|
+
var styles$17 = {"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"};
|
|
177
178
|
|
|
178
179
|
/**
|
|
179
180
|
* Primary button component for user interactions.
|
|
@@ -181,21 +182,21 @@ var styles$16 = {"button":"Button-module_button__xDdzH","sm":"Button-module_sm__
|
|
|
181
182
|
*/
|
|
182
183
|
const Button = React.forwardRef(({ variant = 'primary', size = 'md', fullWidth = false, loading = false, leftIcon, rightIcon, square = false, className = '', disabled, children, ...props }, ref) => {
|
|
183
184
|
const classNames = [
|
|
184
|
-
styles$
|
|
185
|
-
styles$
|
|
186
|
-
styles$
|
|
187
|
-
fullWidth ? styles$
|
|
188
|
-
square ? styles$
|
|
189
|
-
loading ? styles$
|
|
185
|
+
styles$17.button,
|
|
186
|
+
styles$17[variant],
|
|
187
|
+
styles$17[size],
|
|
188
|
+
fullWidth ? styles$17.fullWidth : '',
|
|
189
|
+
square ? styles$17.square : '',
|
|
190
|
+
loading ? styles$17.loading : '',
|
|
190
191
|
className,
|
|
191
192
|
]
|
|
192
193
|
.filter(Boolean)
|
|
193
194
|
.join(' ');
|
|
194
|
-
return (jsxRuntime.jsxs("button", { ref: ref, className: classNames, disabled: disabled || loading, ...props, children: [loading && (jsxRuntime.jsx("span", { className: styles$
|
|
195
|
+
return (jsxRuntime.jsxs("button", { ref: ref, className: classNames, disabled: disabled || loading, ...props, children: [loading && (jsxRuntime.jsx("span", { className: styles$17.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$17.icon, children: leftIcon }), children && jsxRuntime.jsx("span", { className: styles$17.content, children: children }), !loading && rightIcon && jsxRuntime.jsx("span", { className: styles$17.icon, children: rightIcon })] }));
|
|
195
196
|
});
|
|
196
197
|
Button.displayName = 'Button';
|
|
197
198
|
|
|
198
|
-
var styles$
|
|
199
|
+
var styles$16 = {"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"};
|
|
199
200
|
|
|
200
201
|
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" }) }));
|
|
201
202
|
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" }) }));
|
|
@@ -208,10 +209,10 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
208
209
|
const helperId = `${checkboxId}-helper`;
|
|
209
210
|
const errorId = `${checkboxId}-error`;
|
|
210
211
|
const wrapperClasses = [
|
|
211
|
-
styles$
|
|
212
|
-
styles$
|
|
213
|
-
disabled ? styles$
|
|
214
|
-
error ? styles$
|
|
212
|
+
styles$16.wrapper,
|
|
213
|
+
styles$16[size],
|
|
214
|
+
disabled ? styles$16.disabled : '',
|
|
215
|
+
error ? styles$16.hasError : '',
|
|
215
216
|
className,
|
|
216
217
|
].filter(Boolean).join(' ');
|
|
217
218
|
// Handle indeterminate state via ref
|
|
@@ -227,13 +228,13 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
227
228
|
ref.current = node;
|
|
228
229
|
}
|
|
229
230
|
};
|
|
230
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [jsxRuntime.jsxs("label", { className: styles$
|
|
231
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [jsxRuntime.jsxs("label", { className: styles$16.label, children: [jsxRuntime.jsxs("div", { className: styles$16.checkboxWrapper, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", id: checkboxId, className: styles$16.input, disabled: disabled, checked: checked, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
231
232
|
.filter(Boolean)
|
|
232
|
-
.join(' ') || undefined, ...props }), jsxRuntime.jsx("span", { className: styles$
|
|
233
|
+
.join(' ') || undefined, ...props }), jsxRuntime.jsx("span", { className: styles$16.checkbox, children: indeterminate ? jsxRuntime.jsx(IndeterminateIcon, {}) : jsxRuntime.jsx(CheckIcon$1, {}) })] }), label && jsxRuntime.jsx("span", { className: styles$16.labelText, children: label })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$16.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$16.helperText, children: helperText }))] }));
|
|
233
234
|
});
|
|
234
235
|
Checkbox.displayName = 'Checkbox';
|
|
235
236
|
|
|
236
|
-
var styles$
|
|
237
|
+
var styles$15 = {"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"};
|
|
237
238
|
|
|
238
239
|
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" })] }));
|
|
239
240
|
/**
|
|
@@ -245,23 +246,23 @@ const Datepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
245
246
|
const helperId = `${inputId}-helper`;
|
|
246
247
|
const errorId = `${inputId}-error`;
|
|
247
248
|
const wrapperClasses = [
|
|
248
|
-
styles$
|
|
249
|
-
fullWidth ? styles$
|
|
249
|
+
styles$15.wrapper,
|
|
250
|
+
fullWidth ? styles$15.fullWidth : '',
|
|
250
251
|
className,
|
|
251
252
|
].filter(Boolean).join(' ');
|
|
252
253
|
const inputWrapperClasses = [
|
|
253
|
-
styles$
|
|
254
|
-
styles$
|
|
255
|
-
error ? styles$
|
|
256
|
-
disabled ? styles$
|
|
254
|
+
styles$15.inputWrapper,
|
|
255
|
+
styles$15[size],
|
|
256
|
+
error ? styles$15.error : '',
|
|
257
|
+
disabled ? styles$15.disabled : '',
|
|
257
258
|
].filter(Boolean).join(' ');
|
|
258
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$
|
|
259
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$15.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: styles$15.icon, children: jsxRuntime.jsx(CalendarIcon, {}) }), jsxRuntime.jsx("input", { ref: ref, type: "date", id: inputId, className: styles$15.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
259
260
|
.filter(Boolean)
|
|
260
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$
|
|
261
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$15.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$15.helperText, children: helperText }))] }));
|
|
261
262
|
});
|
|
262
263
|
Datepicker.displayName = 'Datepicker';
|
|
263
264
|
|
|
264
|
-
var styles$
|
|
265
|
+
var styles$14 = {"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"};
|
|
265
266
|
|
|
266
267
|
/**
|
|
267
268
|
* Input component for text entry.
|
|
@@ -269,45 +270,45 @@ var styles$13 = {"wrapper":"Input-module_wrapper__-8ija","fullWidth":"Input-modu
|
|
|
269
270
|
const Input = React.forwardRef(({ size = 'md', label, helperText, error, leftIcon, rightIcon, fullWidth = false, className = '', id, disabled, ...props }, ref) => {
|
|
270
271
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
271
272
|
const wrapperClasses = [
|
|
272
|
-
styles$
|
|
273
|
-
fullWidth ? styles$
|
|
273
|
+
styles$14.wrapper,
|
|
274
|
+
fullWidth ? styles$14.fullWidth : '',
|
|
274
275
|
className,
|
|
275
276
|
]
|
|
276
277
|
.filter(Boolean)
|
|
277
278
|
.join(' ');
|
|
278
279
|
const inputWrapperClasses = [
|
|
279
|
-
styles$
|
|
280
|
-
styles$
|
|
281
|
-
error ? styles$
|
|
282
|
-
disabled ? styles$
|
|
280
|
+
styles$14.inputWrapper,
|
|
281
|
+
styles$14[size],
|
|
282
|
+
error ? styles$14.error : '',
|
|
283
|
+
disabled ? styles$14.disabled : '',
|
|
283
284
|
]
|
|
284
285
|
.filter(Boolean)
|
|
285
286
|
.join(' ');
|
|
286
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$
|
|
287
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$14.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: styles$14.icon, children: leftIcon }), jsxRuntime.jsx("input", { ref: ref, id: inputId, className: styles$14.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsxRuntime.jsx("span", { className: styles$14.icon, children: rightIcon })] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$14.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${inputId}-helper`, className: styles$14.helperText, children: helperText }))] }));
|
|
287
288
|
});
|
|
288
289
|
Input.displayName = 'Input';
|
|
289
290
|
const Textarea = React.forwardRef(({ size = 'md', label, helperText, error, fullWidth = false, className = '', id, disabled, rows = 4, ...props }, ref) => {
|
|
290
291
|
const textareaId = id || `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
291
292
|
const wrapperClasses = [
|
|
292
|
-
styles$
|
|
293
|
-
fullWidth ? styles$
|
|
293
|
+
styles$14.wrapper,
|
|
294
|
+
fullWidth ? styles$14.fullWidth : '',
|
|
294
295
|
className,
|
|
295
296
|
]
|
|
296
297
|
.filter(Boolean)
|
|
297
298
|
.join(' ');
|
|
298
299
|
const textareaClasses = [
|
|
299
|
-
styles$
|
|
300
|
-
styles$
|
|
301
|
-
error ? styles$
|
|
302
|
-
disabled ? styles$
|
|
300
|
+
styles$14.textarea,
|
|
301
|
+
styles$14[size],
|
|
302
|
+
error ? styles$14.error : '',
|
|
303
|
+
disabled ? styles$14.disabled : '',
|
|
303
304
|
]
|
|
304
305
|
.filter(Boolean)
|
|
305
306
|
.join(' ');
|
|
306
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: textareaId, className: styles$
|
|
307
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: textareaId, className: styles$14.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$14.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${textareaId}-helper`, className: styles$14.helperText, children: helperText }))] }));
|
|
307
308
|
});
|
|
308
309
|
Textarea.displayName = 'Textarea';
|
|
309
310
|
|
|
310
|
-
var styles$
|
|
311
|
+
var styles$13 = {"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"};
|
|
311
312
|
|
|
312
313
|
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" }) }));
|
|
313
314
|
/**
|
|
@@ -317,15 +318,15 @@ const WarningIcon = () => (jsxRuntime.jsx("svg", { width: "24", height: "24", vi
|
|
|
317
318
|
const Metric = ({ value, label, prefix, suffix, dark = false, onClick, className = '', warning = false, }) => {
|
|
318
319
|
const displayValue = value !== undefined && !isNaN(parseFloat(String(value))) ? value : 0;
|
|
319
320
|
return (jsxRuntime.jsx("div", { className: `
|
|
320
|
-
${styles$
|
|
321
|
-
${dark ? styles$
|
|
322
|
-
${onClick ? styles$
|
|
321
|
+
${styles$13.metric}
|
|
322
|
+
${dark ? styles$13.dark : ''}
|
|
323
|
+
${onClick ? styles$13.clickable : ''}
|
|
323
324
|
${className}
|
|
324
|
-
`, onClick: onClick, children: value !== undefined && (jsxRuntime.jsxs("div", { className: styles$
|
|
325
|
+
`, onClick: onClick, children: value !== undefined && (jsxRuntime.jsxs("div", { className: styles$13.content, children: [jsxRuntime.jsxs("div", { className: styles$13.valueRow, children: [jsxRuntime.jsxs("div", { className: styles$13.valueContainer, children: [prefix && jsxRuntime.jsx("span", { className: styles$13.prefix, children: prefix }), jsxRuntime.jsx("span", { className: styles$13.value, children: displayValue }), suffix && jsxRuntime.jsx("span", { className: styles$13.suffix, children: suffix })] }), warning && (jsxRuntime.jsx("div", { className: styles$13.warningIcon, children: jsxRuntime.jsx(WarningIcon, {}) }))] }), jsxRuntime.jsx("div", { className: styles$13.label, children: label })] })) }));
|
|
325
326
|
};
|
|
326
327
|
Metric.displayName = 'Metric';
|
|
327
328
|
|
|
328
|
-
var styles$
|
|
329
|
+
var styles$12 = {"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"};
|
|
329
330
|
|
|
330
331
|
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" }) }));
|
|
331
332
|
/**
|
|
@@ -337,16 +338,16 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
337
338
|
const helperId = `${selectId}-helper`;
|
|
338
339
|
const errorId = `${selectId}-error`;
|
|
339
340
|
const wrapperClasses = [
|
|
340
|
-
styles$
|
|
341
|
-
fullWidth ? styles$
|
|
341
|
+
styles$12.wrapper,
|
|
342
|
+
fullWidth ? styles$12.fullWidth : '',
|
|
342
343
|
className,
|
|
343
344
|
].filter(Boolean).join(' ');
|
|
344
345
|
const selectWrapperClasses = [
|
|
345
|
-
styles$
|
|
346
|
-
styles$
|
|
347
|
-
error ? styles$
|
|
348
|
-
disabled ? styles$
|
|
349
|
-
leftIcon ? styles$
|
|
346
|
+
styles$12.selectWrapper,
|
|
347
|
+
styles$12[size],
|
|
348
|
+
error ? styles$12.error : '',
|
|
349
|
+
disabled ? styles$12.disabled : '',
|
|
350
|
+
leftIcon ? styles$12.hasLeftIcon : '',
|
|
350
351
|
].filter(Boolean).join(' ');
|
|
351
352
|
const renderOptions = () => {
|
|
352
353
|
// Render grouped options
|
|
@@ -359,19 +360,19 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
359
360
|
}
|
|
360
361
|
return null;
|
|
361
362
|
};
|
|
362
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: selectId, className: styles$
|
|
363
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: selectId, className: styles$12.label, children: label })), jsxRuntime.jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: styles$12.leftIcon, children: leftIcon }), jsxRuntime.jsxs("select", { ref: ref, id: selectId, className: styles$12.select, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
363
364
|
.filter(Boolean)
|
|
364
|
-
.join(' ') || undefined, ...props, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsxRuntime.jsx("span", { className: styles$
|
|
365
|
+
.join(' ') || undefined, ...props, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsxRuntime.jsx("span", { className: styles$12.chevron, children: jsxRuntime.jsx(ChevronDownIcon, {}) })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$12.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$12.helperText, children: helperText }))] }));
|
|
365
366
|
});
|
|
366
367
|
Select.displayName = 'Select';
|
|
367
368
|
|
|
368
|
-
var styles$
|
|
369
|
+
var styles$11 = {"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"};
|
|
369
370
|
|
|
370
371
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
371
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
372
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$11.spinner} ${styles$11[size]} ${className}`, role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxRuntime.jsxs("svg", { className: styles$11.svg, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: styles$11.track, cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.jsx("path", { className: styles$11.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$11.srOnly, children: label })] }));
|
|
372
373
|
};
|
|
373
374
|
|
|
374
|
-
var styles
|
|
375
|
+
var styles$10 = {"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"};
|
|
375
376
|
|
|
376
377
|
const statusLabels = {
|
|
377
378
|
ticketed: 'Ticketed',
|
|
@@ -383,20 +384,20 @@ const statusLabels = {
|
|
|
383
384
|
};
|
|
384
385
|
const StatusBadge = ({ status, label, className, }) => {
|
|
385
386
|
const displayLabel = label || statusLabels[status] || status;
|
|
386
|
-
return (jsxRuntime.jsx("span", { className: `${styles
|
|
387
|
+
return (jsxRuntime.jsx("span", { className: `${styles$10.badge} ${styles$10[status]} ${className || ''}`, "data-status": status, children: displayLabel }));
|
|
387
388
|
};
|
|
388
389
|
|
|
389
|
-
var styles
|
|
390
|
+
var styles$$ = {"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"};
|
|
390
391
|
|
|
391
392
|
const Tag = ({ children, variant = 'default', size = 'md', removable = false, onRemove, onClick, className = '', style, }) => {
|
|
392
393
|
const isClickable = Boolean(onClick);
|
|
393
|
-
return (jsxRuntime.jsxs("span", { className: `${styles
|
|
394
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$$.tag} ${styles$$[variant]} ${styles$$[size]} ${isClickable ? styles$$.clickable : ''} ${className}`, onClick: onClick, style: style, role: isClickable ? 'button' : undefined, tabIndex: isClickable ? 0 : undefined, children: [jsxRuntime.jsx("span", { className: styles$$.content, children: children }), removable && (jsxRuntime.jsx("button", { type: "button", className: styles$$.removeButton, onClick: (e) => {
|
|
394
395
|
e.stopPropagation();
|
|
395
396
|
onRemove?.();
|
|
396
|
-
}, "aria-label": "Remove", children: jsxRuntime.jsx("svg", { className: styles
|
|
397
|
+
}, "aria-label": "Remove", children: jsxRuntime.jsx("svg", { className: styles$$.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" }) }) }))] }));
|
|
397
398
|
};
|
|
398
399
|
|
|
399
|
-
var styles$
|
|
400
|
+
var styles$_ = {"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"};
|
|
400
401
|
|
|
401
402
|
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" })] }));
|
|
402
403
|
/**
|
|
@@ -408,34 +409,34 @@ const Timepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
408
409
|
const helperId = `${inputId}-helper`;
|
|
409
410
|
const errorId = `${inputId}-error`;
|
|
410
411
|
const wrapperClasses = [
|
|
411
|
-
styles$
|
|
412
|
-
fullWidth ? styles$
|
|
412
|
+
styles$_.wrapper,
|
|
413
|
+
fullWidth ? styles$_.fullWidth : '',
|
|
413
414
|
className,
|
|
414
415
|
].filter(Boolean).join(' ');
|
|
415
416
|
const inputWrapperClasses = [
|
|
416
|
-
styles$
|
|
417
|
-
styles$
|
|
418
|
-
error ? styles$
|
|
419
|
-
disabled ? styles$
|
|
417
|
+
styles$_.inputWrapper,
|
|
418
|
+
styles$_[size],
|
|
419
|
+
error ? styles$_.error : '',
|
|
420
|
+
disabled ? styles$_.disabled : '',
|
|
420
421
|
].filter(Boolean).join(' ');
|
|
421
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$
|
|
422
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: styles$_.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: styles$_.icon, children: jsxRuntime.jsx(ClockIcon, {}) }), jsxRuntime.jsx("input", { ref: ref, type: "time", id: inputId, className: styles$_.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
422
423
|
.filter(Boolean)
|
|
423
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$
|
|
424
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$_.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$_.helperText, children: helperText }))] }));
|
|
424
425
|
});
|
|
425
426
|
Timepicker.displayName = 'Timepicker';
|
|
426
427
|
|
|
427
|
-
var styles$
|
|
428
|
+
var styles$Z = {"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"};
|
|
428
429
|
|
|
429
430
|
/**
|
|
430
431
|
* Title component for page headings.
|
|
431
432
|
* Large, prominent text for page titles.
|
|
432
433
|
*/
|
|
433
434
|
const Title = ({ children, weight = 'light', className = '', }) => {
|
|
434
|
-
return (jsxRuntime.jsx("h1", { className: `${styles$
|
|
435
|
+
return (jsxRuntime.jsx("h1", { className: `${styles$Z.title} ${styles$Z[weight]} ${className}`, children: children }));
|
|
435
436
|
};
|
|
436
437
|
Title.displayName = 'Title';
|
|
437
438
|
|
|
438
|
-
var styles$
|
|
439
|
+
var styles$Y = {"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"};
|
|
439
440
|
|
|
440
441
|
const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, labelPosition = 'right', className = '', 'aria-label': ariaLabel, }) => {
|
|
441
442
|
const handleClick = () => {
|
|
@@ -449,14 +450,14 @@ const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, label
|
|
|
449
450
|
onChange?.(!checked);
|
|
450
451
|
}
|
|
451
452
|
};
|
|
452
|
-
const toggleElement = (jsxRuntime.jsx("div", { className: `${styles$
|
|
453
|
+
const toggleElement = (jsxRuntime.jsx("div", { className: `${styles$Y.toggle} ${styles$Y[size]} ${checked ? styles$Y.checked : ''} ${disabled ? styles$Y.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$Y.thumb }) }));
|
|
453
454
|
if (label) {
|
|
454
|
-
return (jsxRuntime.jsxs("label", { className: `${styles$
|
|
455
|
+
return (jsxRuntime.jsxs("label", { className: `${styles$Y.wrapper} ${disabled ? styles$Y.wrapperDisabled : ''}`, children: [labelPosition === 'left' && jsxRuntime.jsx("span", { className: styles$Y.label, children: label }), toggleElement, labelPosition === 'right' && jsxRuntime.jsx("span", { className: styles$Y.label, children: label })] }));
|
|
455
456
|
}
|
|
456
457
|
return toggleElement;
|
|
457
458
|
};
|
|
458
459
|
|
|
459
|
-
var styles$
|
|
460
|
+
var styles$X = {"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"};
|
|
460
461
|
|
|
461
462
|
const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay = 200, disabled = false, className = '', }) => {
|
|
462
463
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
@@ -520,10 +521,10 @@ const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay
|
|
|
520
521
|
}
|
|
521
522
|
};
|
|
522
523
|
}, []);
|
|
523
|
-
return (jsxRuntime.jsxs("div", { ref: triggerRef, className: `${styles$
|
|
524
|
+
return (jsxRuntime.jsxs("div", { ref: triggerRef, className: `${styles$X.wrapper} ${className}`, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, children: [children, isVisible && content && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: `${styles$X.tooltip} ${styles$X[actualPosition]} ${styles$X[variant]}`, role: "tooltip", children: [jsxRuntime.jsx("div", { className: styles$X.content, children: content }), jsxRuntime.jsx("div", { className: `${styles$X.arrow} ${styles$X[`arrow${actualPosition.charAt(0).toUpperCase()}${actualPosition.slice(1)}`]}` })] }))] }));
|
|
524
525
|
};
|
|
525
526
|
|
|
526
|
-
var styles$
|
|
527
|
+
var styles$W = {"service":"TravelServiceIcon-module_service__-4EZb","code":"TravelServiceIcon-module_code__vElzI","multi":"TravelServiceIcon-module_multi__nqZLM","multiIndicator":"TravelServiceIcon-module_multiIndicator__KJF1L"};
|
|
527
528
|
|
|
528
529
|
// Airline brand colors
|
|
529
530
|
const vendorColors = {
|
|
@@ -563,16 +564,16 @@ const TravelServiceIcon = ({ type, vendor, mode = 'icon', size = 28, multi = fal
|
|
|
563
564
|
const colors = mode === 'icon' && vendorColors[vendorKey]
|
|
564
565
|
? vendorColors[vendorKey]
|
|
565
566
|
: typeColors$1[type] || typeColors$1.U;
|
|
566
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
567
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$W.service} ${multi ? styles$W.multi : ''} ${className || ''}`, style: {
|
|
567
568
|
width: size,
|
|
568
569
|
height: size,
|
|
569
570
|
backgroundColor: colors.bg,
|
|
570
571
|
color: colors.fg,
|
|
571
572
|
fontSize: size * 0.4,
|
|
572
|
-
}, title: vendor ? `${vendor} (${type})` : type, children: [mode === 'code' && vendor ? (jsxRuntime.jsx("span", { className: styles$
|
|
573
|
+
}, title: vendor ? `${vendor} (${type})` : type, children: [mode === 'code' && vendor ? (jsxRuntime.jsx("span", { className: styles$W.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$W.multiIndicator, children: "+" })] }));
|
|
573
574
|
};
|
|
574
575
|
|
|
575
|
-
var styles$
|
|
576
|
+
var styles$V = {"icon":"TypeIcon-module_icon__WUL-x"};
|
|
576
577
|
|
|
577
578
|
const typeLabels = {
|
|
578
579
|
A: 'Air',
|
|
@@ -605,7 +606,7 @@ const typeIcons = {
|
|
|
605
606
|
const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
606
607
|
const colors = typeColors[type] || typeColors.U;
|
|
607
608
|
const label = typeLabels[type] || 'Unknown';
|
|
608
|
-
return (jsxRuntime.jsx("span", { className: `${styles$
|
|
609
|
+
return (jsxRuntime.jsx("span", { className: `${styles$V.icon} ${className || ''}`, style: {
|
|
609
610
|
width: size,
|
|
610
611
|
height: size,
|
|
611
612
|
backgroundColor: colors.bg,
|
|
@@ -613,7 +614,7 @@ const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
|
613
614
|
}, 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 }) }));
|
|
614
615
|
};
|
|
615
616
|
|
|
616
|
-
var styles$
|
|
617
|
+
var styles$U = {"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"};
|
|
617
618
|
|
|
618
619
|
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" }) }));
|
|
619
620
|
/**
|
|
@@ -631,21 +632,21 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
631
632
|
}
|
|
632
633
|
onOpenChange?.(newOpen);
|
|
633
634
|
};
|
|
634
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
635
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$U.accordion} ${className || ''}`, children: [jsxRuntime.jsxs("div", { className: styles$U.headerContainer, children: [jsxRuntime.jsx("button", { type: "button", className: styles$U.toggle, onClick: handleToggle, "aria-expanded": isOpen, children: jsxRuntime.jsx(CaretIcon, { className: `${styles$U.caret} ${isOpen ? styles$U.open : ''}` }) }), jsxRuntime.jsx("div", { className: styles$U.header, children: header })] }), jsxRuntime.jsxs("div", { className: `${styles$U.body} ${isOpen ? styles$U.visible : styles$U.hidden}`, "aria-hidden": !isOpen, children: [showTimeline && (jsxRuntime.jsxs("div", { className: styles$U.timeline, children: [jsxRuntime.jsx("div", { className: styles$U.line }), jsxRuntime.jsx(CaretIcon, { className: styles$U.endCaret })] })), jsxRuntime.jsx("div", { className: styles$U.content, children: children })] })] }));
|
|
635
636
|
};
|
|
636
637
|
Accordion.displayName = 'Accordion';
|
|
637
638
|
|
|
638
|
-
var styles$
|
|
639
|
+
var styles$T = {"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
|
|
|
640
641
|
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$
|
|
642
|
+
const SegmentedSelector = ({ options, value, onChange, disabled = false, size = 'md', className = '', ariaLabel = 'View options', }) => (jsxRuntime.jsx("div", { className: [styles$T.selector, className].filter(Boolean).join(' '), role: "group", "aria-label": ariaLabel, children: options.map((option) => {
|
|
642
643
|
const active = option.id === value;
|
|
643
644
|
const accessibleName = option.alt ?? option.label ?? option.id;
|
|
644
645
|
return (jsxRuntime.jsxs("button", { type: "button", title: accessibleName, "aria-label": accessibleName, "aria-pressed": active, disabled: disabled, className: [
|
|
645
|
-
styles$
|
|
646
|
-
styles$
|
|
647
|
-
option.label ? styles$
|
|
648
|
-
active ? styles$
|
|
646
|
+
styles$T.item,
|
|
647
|
+
styles$T[size],
|
|
648
|
+
option.label ? styles$T.withLabel : styles$T.iconOnly,
|
|
649
|
+
active ? styles$T.active : '',
|
|
649
650
|
].filter(Boolean).join(' '), onClick: () => onChange?.(option.id), children: [option.icon, option.label && jsxRuntime.jsx("span", { children: option.label })] }, option.id));
|
|
650
651
|
}) }));
|
|
651
652
|
const CalendarViewSelector = ({ value, onChange, ...props }) => (jsxRuntime.jsx(SegmentedSelector, { ...props, ariaLabel: "Calendar view", value: value, onChange: (nextValue) => onChange?.(nextValue), options: [
|
|
@@ -658,7 +659,7 @@ const CalendarTypeSelector = ({ value, onChange, ...props }) => (jsxRuntime.jsx(
|
|
|
658
659
|
{ id: 'due_dates', label: 'Due Dates' },
|
|
659
660
|
] }));
|
|
660
661
|
|
|
661
|
-
var styles$
|
|
662
|
+
var styles$S = {"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"};
|
|
662
663
|
|
|
663
664
|
const Dropdown = ({ label, children, alignment = 'left', width, className = '', disabled = false, }) => {
|
|
664
665
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -681,14 +682,14 @@ const Dropdown = ({ label, children, alignment = 'left', width, className = '',
|
|
|
681
682
|
setIsOpen(false);
|
|
682
683
|
}
|
|
683
684
|
};
|
|
684
|
-
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
685
|
+
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$S.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$S.arrow} ${isOpen ? styles$S.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$S.menu} ${styles$S[alignment]} ${isOpen ? styles$S.menuOpen : ''}`, style: width ? { minWidth: `${width}px` } : undefined, role: "menu", children: children })] }));
|
|
685
686
|
};
|
|
686
687
|
const DropdownItem = ({ children, onClick, disabled = false, icon, className = '', }) => {
|
|
687
|
-
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$
|
|
688
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$S.item} ${disabled ? styles$S.itemDisabled : ''} ${className}`, onClick: onClick, disabled: disabled, role: "menuitem", children: [icon && jsxRuntime.jsx("span", { className: styles$S.itemIcon, children: icon }), children] }));
|
|
688
689
|
};
|
|
689
690
|
Dropdown.Item = DropdownItem;
|
|
690
691
|
|
|
691
|
-
var styles$
|
|
692
|
+
var styles$R = {"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"};
|
|
692
693
|
|
|
693
694
|
const FilterChip = ({ label, value, options, onChange, searchable = false, searchPlaceholder = 'Search...', infoMessage, className, }) => {
|
|
694
695
|
const [open, setOpen] = React.useState(false);
|
|
@@ -725,13 +726,13 @@ const FilterChip = ({ label, value, options, onChange, searchable = false, searc
|
|
|
725
726
|
const selectedOption = options.find(opt => opt.value === value);
|
|
726
727
|
const displayValue = selectedOption?.label || value;
|
|
727
728
|
const isDefault = value === options[0]?.value;
|
|
728
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: `${styles$
|
|
729
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: `${styles$R.wrapper} ${className || ''}`, children: [jsxRuntime.jsxs("button", { type: "button", className: `${styles$R.chip} ${open ? styles$R.open : ''} ${!isDefault ? styles$R.active : ''}`, onClick: () => setOpen(!open), "aria-haspopup": "listbox", "aria-expanded": open, children: [jsxRuntime.jsxs("span", { className: styles$R.label, children: [label, ":"] }), jsxRuntime.jsx("span", { className: styles$R.value, children: displayValue }), jsxRuntime.jsx("svg", { className: `${styles$R.chevron} ${open ? styles$R.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$R.dropdown, role: "listbox", children: [infoMessage && (jsxRuntime.jsxs("div", { className: styles$R.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$R.searchWrapper, children: [jsxRuntime.jsxs("svg", { className: styles$R.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$R.searchInput, autoFocus: true })] })), jsxRuntime.jsxs("div", { className: styles$R.optionsList, children: [filteredOptions.map((option) => (jsxRuntime.jsx("button", { type: "button", role: "option", "aria-selected": option.value === value, className: `${styles$R.option} ${option.value === value ? styles$R.selected : ''}`, onClick: () => {
|
|
729
730
|
onChange(option.value);
|
|
730
731
|
setOpen(false);
|
|
731
|
-
}, children: option.label }, option.value))), filteredOptions.length === 0 && (jsxRuntime.jsx("div", { className: styles$
|
|
732
|
+
}, children: option.label }, option.value))), filteredOptions.length === 0 && (jsxRuntime.jsx("div", { className: styles$R.noResults, children: "No results found" }))] })] }))] }));
|
|
732
733
|
};
|
|
733
734
|
|
|
734
|
-
var styles$
|
|
735
|
+
var styles$Q = {"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"};
|
|
735
736
|
|
|
736
737
|
const FormField = React.forwardRef(({ label, helperText, error, required = false, hideLabel = false, className, as = 'input', inputProps, textareaProps, children, }, ref) => {
|
|
737
738
|
const generatedId = React.useId();
|
|
@@ -750,15 +751,15 @@ const FormField = React.forwardRef(({ label, helperText, error, required = false
|
|
|
750
751
|
return children;
|
|
751
752
|
}
|
|
752
753
|
if (as === 'textarea') {
|
|
753
|
-
return (jsxRuntime.jsx(Textarea, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...textareaProps, className: `${styles$
|
|
754
|
+
return (jsxRuntime.jsx(Textarea, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...textareaProps, className: `${styles$Q.inputElement} ${hasError ? styles$Q.inputError : ''} ${textareaProps?.className || ''}` }));
|
|
754
755
|
}
|
|
755
|
-
return (jsxRuntime.jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: `${styles$
|
|
756
|
+
return (jsxRuntime.jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: `${styles$Q.inputElement} ${hasError ? styles$Q.inputError : ''} ${inputProps?.className || ''}` }));
|
|
756
757
|
};
|
|
757
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
758
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$Q.formField} ${className || ''}`, children: [jsxRuntime.jsxs("label", { htmlFor: inputId, className: `${styles$Q.label} ${hideLabel ? styles$Q.visuallyHidden : ''}`, children: [label, required && jsxRuntime.jsx("span", { className: styles$Q.required, "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsxRuntime.jsx("p", { id: helperId, className: styles$Q.helperText, children: helperText })), hasError && (jsxRuntime.jsx("p", { id: errorId, className: styles$Q.errorText, role: "alert", children: error }))] }));
|
|
758
759
|
});
|
|
759
760
|
FormField.displayName = 'FormField';
|
|
760
761
|
|
|
761
|
-
var styles$
|
|
762
|
+
var styles$P = {"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"};
|
|
762
763
|
|
|
763
764
|
/**
|
|
764
765
|
* FormRow component for laying out form fields in a responsive grid.
|
|
@@ -768,16 +769,16 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
768
769
|
const childCount = React.Children.count(children);
|
|
769
770
|
const colCount = columns || (childCount > 4 ? 4 : childCount);
|
|
770
771
|
return (jsxRuntime.jsx("div", { className: `
|
|
771
|
-
${styles$
|
|
772
|
-
${styles$
|
|
773
|
-
${styles$
|
|
774
|
-
${stackOnMobile ? styles$
|
|
772
|
+
${styles$P.row}
|
|
773
|
+
${styles$P[`cols${colCount}`]}
|
|
774
|
+
${styles$P[`gap${gap}`]}
|
|
775
|
+
${stackOnMobile ? styles$P.stackMobile : ''}
|
|
775
776
|
${className || ''}
|
|
776
777
|
`, children: children }));
|
|
777
778
|
};
|
|
778
779
|
FormRow.displayName = 'FormRow';
|
|
779
780
|
|
|
780
|
-
var styles$
|
|
781
|
+
var styles$O = {"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-"};
|
|
781
782
|
|
|
782
783
|
/**
|
|
783
784
|
* FormSection component for grouping related form fields with a title and icon.
|
|
@@ -786,45 +787,45 @@ var styles$N = {"section":"FormSection-module_section__T17Vg","header":"FormSect
|
|
|
786
787
|
const FormSection = ({ title, icon, status, disabled = false, children, className, id, }) => {
|
|
787
788
|
const isSubmitted = status === 'submitted';
|
|
788
789
|
const isDisabled = disabled || isSubmitted;
|
|
789
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
790
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$O.section} ${className || ''}`, id: id, children: [jsxRuntime.jsxs("div", { className: styles$O.header, children: [icon && jsxRuntime.jsx("span", { className: styles$O.icon, children: icon }), jsxRuntime.jsx("h2", { className: styles$O.title, children: title })] }), jsxRuntime.jsxs("fieldset", { disabled: isDisabled, className: `${styles$O.fieldset} ${isDisabled ? styles$O.disabled : ''}`, children: [status && (jsxRuntime.jsxs("div", { className: styles$O.status, children: [jsxRuntime.jsx("span", { className: styles$O.statusLabel, children: "Status:" }), jsxRuntime.jsx("span", { className: `${styles$O.statusValue} ${styles$O[status]}`, children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
790
791
|
};
|
|
791
792
|
FormSection.displayName = 'FormSection';
|
|
792
793
|
|
|
793
|
-
var styles$
|
|
794
|
+
var styles$N = {"stack":"FormStack-module_stack__SURjY","sm":"FormStack-module_sm__rt3tb","md":"FormStack-module_md__SRDmc","lg":"FormStack-module_lg__jql3j"};
|
|
794
795
|
|
|
795
796
|
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
796
|
-
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: [styles$
|
|
797
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: [styles$N.stack, styles$N[gap], className].filter(Boolean).join(' '), children: children }));
|
|
797
798
|
|
|
798
|
-
var styles$
|
|
799
|
+
var styles$M = {"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"};
|
|
799
800
|
|
|
800
801
|
const ManifestViewToggle = ({ view, onView, paxCount, eqCount, locked, className = '', }) => {
|
|
801
802
|
const tabs = [
|
|
802
803
|
{ key: 'passengers', label: 'Passengers', count: paxCount, icon: UsersIcon$1 },
|
|
803
804
|
{ key: 'equipment', label: 'Equipment', count: eqCount, icon: CubeIcon },
|
|
804
805
|
];
|
|
805
|
-
return (jsxRuntime.jsx("div", { className: [styles$
|
|
806
|
+
return (jsxRuntime.jsx("div", { className: [styles$M.toggle, locked ? styles$M.lockedToggle : '', className].filter(Boolean).join(' '), role: "tablist", "aria-label": "Manifest view", children: tabs.map((tab) => {
|
|
806
807
|
const active = view === tab.key;
|
|
807
808
|
const Icon = locked ? LockIcon$1 : tab.icon;
|
|
808
809
|
return (jsxRuntime.jsxs("button", { type: "button", role: "tab", "aria-selected": active, onClick: () => onView(tab.key), className: [
|
|
809
|
-
styles$
|
|
810
|
-
active ? styles$
|
|
811
|
-
locked ? styles$
|
|
812
|
-
locked && active ? styles$
|
|
813
|
-
].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Icon, { size: 16 }), tab.label, jsxRuntime.jsx("span", { className: styles$
|
|
810
|
+
styles$M.tab,
|
|
811
|
+
active ? styles$M.active : '',
|
|
812
|
+
locked ? styles$M.locked : '',
|
|
813
|
+
locked && active ? styles$M.lockedActive : '',
|
|
814
|
+
].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Icon, { size: 16 }), tab.label, jsxRuntime.jsx("span", { className: styles$M.count, children: tab.count })] }, tab.key));
|
|
814
815
|
}) }));
|
|
815
816
|
};
|
|
816
817
|
|
|
817
|
-
var styles$
|
|
818
|
+
var styles$L = {"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"};
|
|
818
819
|
|
|
819
820
|
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, }) => {
|
|
820
|
-
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && jsxRuntime.jsx("span", { className: `${styles$
|
|
821
|
+
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && jsxRuntime.jsx("span", { className: `${styles$L.icon} ${styles$L[`icon${size.charAt(0).toUpperCase()}${size.slice(1)}`]}`, "aria-hidden": "true", children: icon }), !collapsed && (jsxRuntime.jsx("span", { className: styles$L.label, children: label })), badge !== undefined && !collapsed && (jsxRuntime.jsx(Badge, { variant: badgeVariant, className: styles$L.badge, children: badge }))] }));
|
|
821
822
|
const classNames = [
|
|
822
|
-
styles$
|
|
823
|
-
styles$
|
|
824
|
-
styles$
|
|
825
|
-
active ? styles$
|
|
826
|
-
collapsed ? styles$
|
|
827
|
-
disabled ? styles$
|
|
823
|
+
styles$L.navItem,
|
|
824
|
+
styles$L[variant],
|
|
825
|
+
styles$L[size],
|
|
826
|
+
active ? styles$L.active : '',
|
|
827
|
+
collapsed ? styles$L.collapsed : '',
|
|
828
|
+
disabled ? styles$L.disabled : '',
|
|
828
829
|
className || '',
|
|
829
830
|
].filter(Boolean).join(' ');
|
|
830
831
|
const commonProps = {
|
|
@@ -839,7 +840,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
839
840
|
return (jsxRuntime.jsx("button", { type: "button", onClick: disabled ? undefined : onClick, disabled: disabled, ...commonProps, children: content }));
|
|
840
841
|
};
|
|
841
842
|
|
|
842
|
-
var styles$
|
|
843
|
+
var styles$K = {"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"};
|
|
843
844
|
|
|
844
845
|
const dimensions = {
|
|
845
846
|
xs: 32,
|
|
@@ -855,7 +856,7 @@ const strokeWidths = {
|
|
|
855
856
|
};
|
|
856
857
|
const ProgressBar = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
857
858
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
858
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
859
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$K.barContainer} ${styles$K[`bar${size}`]} ${className}`, children: [jsxRuntime.jsx("div", { className: styles$K.barTrack, children: jsxRuntime.jsx("div", { className: `${styles$K.barFill} ${styles$K[variant]}`, style: { width: `${percentage}%` }, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max }) }), showLabel && (jsxRuntime.jsxs("span", { className: styles$K.barLabel, children: [Math.round(percentage), "%"] }))] }));
|
|
859
860
|
};
|
|
860
861
|
const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
861
862
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
@@ -864,7 +865,7 @@ const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', sh
|
|
|
864
865
|
const radius = (dimension - strokeWidth) / 2;
|
|
865
866
|
const circumference = radius * 2 * Math.PI;
|
|
866
867
|
const strokeDashoffset = circumference - (percentage / 100) * circumference;
|
|
867
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
868
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$K.circleContainer} ${className}`, style: { width: dimension, height: dimension }, children: [jsxRuntime.jsxs("svg", { width: dimension, height: dimension, className: styles$K.circleSvg, children: [jsxRuntime.jsx("circle", { className: styles$K.circleTrack, cx: dimension / 2, cy: dimension / 2, r: radius, strokeWidth: strokeWidth, fill: "transparent" }), jsxRuntime.jsx("circle", { className: `${styles$K.circleFill} ${styles$K[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$K.circleLabel, style: { fontSize: size === 'xs' ? '8px' : size === 'sm' ? '10px' : size === 'md' ? '12px' : '14px' }, children: [Math.round(percentage), "%"] }))] }));
|
|
868
869
|
};
|
|
869
870
|
// Combined export
|
|
870
871
|
const Progress = {
|
|
@@ -872,7 +873,7 @@ const Progress = {
|
|
|
872
873
|
Circle: ProgressCircle,
|
|
873
874
|
};
|
|
874
875
|
|
|
875
|
-
var styles$
|
|
876
|
+
var styles$J = {"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"};
|
|
876
877
|
|
|
877
878
|
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" })] }));
|
|
878
879
|
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" })] }));
|
|
@@ -880,23 +881,23 @@ const ChevronIcon$2 = () => (jsxRuntime.jsx("svg", { width: "12", height: "12",
|
|
|
880
881
|
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" })] }));
|
|
881
882
|
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" })] }));
|
|
882
883
|
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" })] }));
|
|
883
|
-
const SpinnerIcon = () => (jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: styles$
|
|
884
|
+
const SpinnerIcon = () => (jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: styles$J.spinner, children: jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32" }) }));
|
|
884
885
|
const DropdownButton = ({ label, icon, options, }) => {
|
|
885
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
886
|
+
return (jsxRuntime.jsxs("div", { className: styles$J.dropdown, children: [jsxRuntime.jsxs("button", { type: "button", className: styles$J.dropdownTrigger, children: [icon, jsxRuntime.jsx("span", { children: label }), jsxRuntime.jsx(ChevronIcon$2, {})] }), jsxRuntime.jsx("div", { className: styles$J.dropdownMenu, children: options.map((option, i) => (jsxRuntime.jsxs("button", { type: "button", className: styles$J.dropdownItem, onClick: option.onClick, disabled: option.disabled, children: [option.icon && jsxRuntime.jsx("span", { className: styles$J.dropdownItemIcon, children: option.icon }), option.label] }, i))) })] }));
|
|
886
887
|
};
|
|
887
888
|
/**
|
|
888
889
|
* RosterToolbar - Toolbar for roster management with import/export/save actions
|
|
889
890
|
*/
|
|
890
891
|
const RosterToolbar = ({ importOptions, exportOptions, lockToggle, saveButton, additionalActions, searchField, className = '', }) => {
|
|
891
|
-
const toolbarClasses = [styles$
|
|
892
|
-
return (jsxRuntime.jsxs("div", { className: toolbarClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
893
|
-
styles$
|
|
894
|
-
lockToggle.isLocked ? styles$
|
|
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$
|
|
892
|
+
const toolbarClasses = [styles$J.toolbar, className].filter(Boolean).join(' ');
|
|
893
|
+
return (jsxRuntime.jsxs("div", { className: toolbarClasses, children: [jsxRuntime.jsxs("div", { className: styles$J.leftSection, children: [searchField, additionalActions] }), jsxRuntime.jsxs("div", { className: styles$J.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: [
|
|
894
|
+
styles$J.lockButton,
|
|
895
|
+
lockToggle.isLocked ? styles$J.locked : '',
|
|
896
|
+
].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$J.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' })] }))] })] }));
|
|
896
897
|
};
|
|
897
898
|
RosterToolbar.displayName = 'RosterToolbar';
|
|
898
899
|
|
|
899
|
-
var styles$
|
|
900
|
+
var styles$I = {"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"};
|
|
900
901
|
|
|
901
902
|
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) => {
|
|
902
903
|
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
@@ -924,25 +925,25 @@ const SearchField = React.forwardRef(({ placeholder = 'Search...', value, defaul
|
|
|
924
925
|
onSearch?.(currentValue);
|
|
925
926
|
}
|
|
926
927
|
};
|
|
927
|
-
return (jsxRuntime.jsxs("form", { className: `${styles$
|
|
928
|
+
return (jsxRuntime.jsxs("form", { className: `${styles$I.searchField} ${styles$I[size]} ${className || ''}`, onSubmit: handleSubmit, role: "search", children: [jsxRuntime.jsxs("div", { className: styles$I.inputWrapper, children: [jsxRuntime.jsx(SearchIcon$1, { className: styles$I.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$I.input, "aria-label": ariaLabel, ...props }), showClear && currentValue && (jsxRuntime.jsx("button", { type: "button", className: styles$I.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" }))] }));
|
|
928
929
|
});
|
|
929
930
|
SearchField.displayName = 'SearchField';
|
|
930
931
|
|
|
931
|
-
var styles$
|
|
932
|
+
var styles$H = {"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
|
|
|
933
934
|
/**
|
|
934
935
|
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
935
936
|
* consuming applications retain their form state, validation, and masking.
|
|
936
937
|
*/
|
|
937
|
-
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$
|
|
938
|
+
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$H.form, className].filter(Boolean).join(' '), children: [mode === 'Add' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { className: styles$H.portalLabel, children: "Create From Portal User" }), createFromPortalUser] }), jsxRuntime.jsx("div", { className: styles$H.divider, children: jsxRuntime.jsx("strong", { children: "OR" }) }), jsxRuntime.jsx("p", { className: styles$H.newContactLabel, children: "Create New Contact Without Portal Access" })] })), jsxRuntime.jsxs("div", { className: styles$H.nameFields, children: [firstNameField, middleInitialField, lastNameField] }), jsxRuntime.jsxs("div", { className: styles$H.phoneFields, children: [businessPhoneField, cellPhoneField] }), jsxRuntime.jsx("div", { children: emailField })] }));
|
|
938
939
|
|
|
939
|
-
var styles$
|
|
940
|
+
var styles$G = {"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"};
|
|
940
941
|
|
|
941
942
|
const Segment = ({ options, value, onChange, size = 'md', fullWidth = false, className = '', 'aria-label': ariaLabel, }) => {
|
|
942
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
943
|
+
return (jsxRuntime.jsx("div", { className: `${styles$G.segment} ${styles$G[size]} ${fullWidth ? styles$G.fullWidth : ''} ${className}`, role: "radiogroup", "aria-label": ariaLabel, children: options.map((option) => (jsxRuntime.jsxs("button", { type: "button", className: `${styles$G.option} ${value === option.value ? styles$G.selected : ''} ${option.disabled ? styles$G.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$G.icon, children: option.icon }), option.label] }, option.value))) }));
|
|
943
944
|
};
|
|
944
945
|
|
|
945
|
-
var styles$
|
|
946
|
+
var styles$F = {"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"};
|
|
946
947
|
|
|
947
948
|
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" }) }));
|
|
948
949
|
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" }) }));
|
|
@@ -1015,11 +1016,11 @@ const SelectFilter = ({ label, options = [], groupedOptions = {}, value = [], on
|
|
|
1015
1016
|
}
|
|
1016
1017
|
return `${selected.length} selected`;
|
|
1017
1018
|
};
|
|
1018
|
-
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
1019
|
+
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$F.container} ${className}`, children: [jsxRuntime.jsxs("button", { type: "button", className: `${styles$F.trigger} ${disabled ? styles$F.disabled : ''} ${isOpen ? styles$F.open : ''}`, onClick: () => !disabled && setIsOpen(!isOpen), children: [jsxRuntime.jsx("span", { className: `${styles$F.triggerText} ${selectedValues.length === 0 ? styles$F.placeholder : ''}`, children: getDisplayText() }), jsxRuntime.jsx("span", { className: styles$F.chevron, children: jsxRuntime.jsx(ChevronIcon$1, {}) })] }), isOpen && (jsxRuntime.jsxs("div", { className: styles$F.dropdown, style: { width }, children: [grouped && tabs.length > 0 && (jsxRuntime.jsx("div", { className: styles$F.tabs, children: tabs.map(tab => (jsxRuntime.jsx("button", { type: "button", className: `${styles$F.tab} ${activeTab === tab ? styles$F.activeTab : ''}`, onClick: () => setActiveTab(tab), children: tab.charAt(0).toUpperCase() + tab.slice(1) }, tab))) })), multiselect && (jsxRuntime.jsxs("div", { className: styles$F.actions, children: [jsxRuntime.jsx("button", { type: "button", className: styles$F.actionBtn, onClick: handleSelectAll, children: "Select All" }), jsxRuntime.jsx("button", { type: "button", className: styles$F.actionBtn, onClick: handleClear, children: "Clear" })] })), jsxRuntime.jsx("div", { className: styles$F.options, children: currentOptions.map(option => (jsxRuntime.jsxs("div", { className: `${styles$F.option} ${selectedValues.includes(option.value) ? styles$F.selected : ''}`, onClick: () => handleSelect(option.value), children: [multiselect && (jsxRuntime.jsx("span", { className: styles$F.checkbox, children: selectedValues.includes(option.value) && jsxRuntime.jsx(CheckIcon, {}) })), jsxRuntime.jsx("span", { className: styles$F.optionLabel, children: option.label })] }, option.value))) }), multiselect && (jsxRuntime.jsx("div", { className: styles$F.footer, children: jsxRuntime.jsx("button", { type: "button", className: styles$F.applyBtn, onClick: () => setIsOpen(false), children: "Apply" }) }))] }))] }));
|
|
1019
1020
|
};
|
|
1020
1021
|
SelectFilter.displayName = 'SelectFilter';
|
|
1021
1022
|
|
|
1022
|
-
var styles$
|
|
1023
|
+
var styles$E = {"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"};
|
|
1023
1024
|
|
|
1024
1025
|
/**
|
|
1025
1026
|
* ServiceToggle component for a single service item.
|
|
@@ -1032,19 +1033,19 @@ const ServiceToggle = ({ label, icon, hasToggle = true, enabled = false, onToggl
|
|
|
1032
1033
|
onClick();
|
|
1033
1034
|
}
|
|
1034
1035
|
};
|
|
1035
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1036
|
+
return (jsxRuntime.jsxs("div", { className: styles$E.item, children: [jsxRuntime.jsxs("div", { className: `${styles$E.labelContainer} ${isClickable ? styles$E.clickable : ''}`, onClick: handleClick, children: [icon && jsxRuntime.jsx("span", { className: styles$E.icon, children: icon }), jsxRuntime.jsx("span", { className: styles$E.label, children: label })] }), hasToggle && (jsxRuntime.jsx(Toggle, { checked: enabled, onChange: (checked) => onToggle?.(checked), disabled: disabled, size: "sm" }))] }));
|
|
1036
1037
|
};
|
|
1037
1038
|
/**
|
|
1038
1039
|
* ServiceToggleList component for displaying a list of services with toggles.
|
|
1039
1040
|
* Used in travel request forms for service selection (Air, Hotel, Ground, etc.)
|
|
1040
1041
|
*/
|
|
1041
1042
|
const ServiceToggleList = ({ services, enabledServices = {}, onToggle, onClick, className, }) => {
|
|
1042
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1043
|
+
return (jsxRuntime.jsx("div", { className: `${styles$E.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))) }));
|
|
1043
1044
|
};
|
|
1044
1045
|
ServiceToggle.displayName = 'ServiceToggle';
|
|
1045
1046
|
ServiceToggleList.displayName = 'ServiceToggleList';
|
|
1046
1047
|
|
|
1047
|
-
var styles$
|
|
1048
|
+
var styles$D = {"toggle":"SupplierTypeToggle-module_toggle__x4pTJ","active":"SupplierTypeToggle-module_active__8BGSe"};
|
|
1048
1049
|
|
|
1049
1050
|
const SUPPLIER_TYPE_OPTIONS = [
|
|
1050
1051
|
{ value: 'A', label: 'Air' },
|
|
@@ -1065,23 +1066,24 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
1065
1066
|
setInternalValue(nextValue);
|
|
1066
1067
|
onChange?.(nextValue);
|
|
1067
1068
|
};
|
|
1068
|
-
return (jsxRuntime.jsx("div", { className: [styles$
|
|
1069
|
+
return (jsxRuntime.jsx("div", { className: [styles$D.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$D.active : '', onClick: () => handleSelect(option.value), children: option.label }, option.value || 'all'))) }));
|
|
1069
1070
|
};
|
|
1070
1071
|
|
|
1071
|
-
var styles$
|
|
1072
|
+
var styles$C = {"header":"TeamHeader-module_header__3Zx1c","empty":"TeamHeader-module_empty__fKrFE","left":"TeamHeader-module_left__yqug2","backButton":"TeamHeader-module_backButton__MqElX","titles":"TeamHeader-module_titles__m3Ne9","pretitle":"TeamHeader-module_pretitle__rZUD6","title":"TeamHeader-module_title__i3dmZ","actions":"TeamHeader-module_actions__ft1DN","subMenu":"TeamHeader-module_subMenu__oL-3Q","activeTab":"TeamHeader-module_activeTab__AUzdq"};
|
|
1072
1073
|
|
|
1073
1074
|
const BackIcon = () => (jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), jsxRuntime.jsx("polyline", { points: "12 19 5 12 12 5" })] }));
|
|
1074
1075
|
/**
|
|
1075
1076
|
* TeamHeader - Header component for team management pages
|
|
1076
1077
|
*/
|
|
1077
1078
|
const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team Management', backHref, onBack, actions, className = '', }) => {
|
|
1078
|
-
const headerClasses = [
|
|
1079
|
-
styles$B.header,
|
|
1080
|
-
className,
|
|
1081
|
-
].filter(Boolean).join(' ');
|
|
1082
1079
|
const title = suppliedTitle ?? (teamCode && teamName
|
|
1083
1080
|
? `${teamCode} - ${teamName}`
|
|
1084
1081
|
: teamName || teamCode || '');
|
|
1082
|
+
const headerClasses = [
|
|
1083
|
+
styles$C.header,
|
|
1084
|
+
!title ? styles$C.empty : '',
|
|
1085
|
+
className,
|
|
1086
|
+
].filter(Boolean).join(' ');
|
|
1085
1087
|
const handleBack = () => {
|
|
1086
1088
|
if (onBack) {
|
|
1087
1089
|
onBack();
|
|
@@ -1091,7 +1093,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
1091
1093
|
window.location.href = backHref;
|
|
1092
1094
|
}
|
|
1093
1095
|
};
|
|
1094
|
-
return (jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1096
|
+
return (jsxRuntime.jsxs("div", { className: headerClasses, children: [jsxRuntime.jsxs("div", { className: styles$C.left, children: [(backHref || onBack) && (jsxRuntime.jsx("button", { type: "button", className: styles$C.backButton, onClick: handleBack, "aria-label": "Go back", children: jsxRuntime.jsx(BackIcon, {}) })), jsxRuntime.jsxs("div", { className: styles$C.titles, children: [pretitle && jsxRuntime.jsx("span", { className: styles$C.pretitle, children: pretitle }), jsxRuntime.jsxs("h1", { className: styles$C.title, children: [title, "\u00A0"] })] })] }), actions && (jsxRuntime.jsx("div", { className: styles$C.actions, children: actions }))] }));
|
|
1095
1097
|
};
|
|
1096
1098
|
const DEFAULT_TABS$1 = [
|
|
1097
1099
|
{ id: 'profile', label: 'Profile' },
|
|
@@ -1100,11 +1102,11 @@ const DEFAULT_TABS$1 = [
|
|
|
1100
1102
|
{ id: 'user-access', label: 'User Access' },
|
|
1101
1103
|
];
|
|
1102
1104
|
/** Router-agnostic counterpart of Hub's team-management submenu. */
|
|
1103
|
-
const TeamSubMenu = ({ tabs = DEFAULT_TABS$1, activeTab, onTabChange, className = '' }) => (jsxRuntime.jsx("nav", { className: [styles$
|
|
1105
|
+
const TeamSubMenu = ({ tabs = DEFAULT_TABS$1, activeTab, onTabChange, className = '' }) => (jsxRuntime.jsx("nav", { className: [styles$C.subMenu, className].filter(Boolean).join(' '), "aria-label": "Team management sections", children: tabs.map((tab) => (jsxRuntime.jsx("button", { type: "button", className: activeTab === tab.id ? styles$C.activeTab : '', "aria-current": activeTab === tab.id ? 'page' : undefined, onClick: () => onTabChange?.(tab.id), children: tab.label }, tab.id))) }));
|
|
1104
1106
|
TeamHeader.displayName = 'TeamHeader';
|
|
1105
1107
|
TeamSubMenu.displayName = 'TeamSubMenu';
|
|
1106
1108
|
|
|
1107
|
-
var styles$
|
|
1109
|
+
var styles$B = {"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"};
|
|
1108
1110
|
|
|
1109
1111
|
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" }) }));
|
|
1110
1112
|
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" })] }));
|
|
@@ -1114,41 +1116,41 @@ const ArrowIcon = () => (jsxRuntime.jsxs("svg", { width: "12", height: "12", vie
|
|
|
1114
1116
|
* Base TripSegment component wrapper
|
|
1115
1117
|
*/
|
|
1116
1118
|
const TripSegment = ({ type: _type, variant = 'light', className = '', children, }) => {
|
|
1117
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1119
|
+
return (jsxRuntime.jsx("div", { className: `${styles$B.segment} ${styles$B[variant]} ${className}`, children: children }));
|
|
1118
1120
|
};
|
|
1119
1121
|
/**
|
|
1120
1122
|
* AirSegment component for displaying flight information
|
|
1121
1123
|
*/
|
|
1122
1124
|
const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
1123
1125
|
if (!flights || flights.length === 0) {
|
|
1124
|
-
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$
|
|
1126
|
+
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$B.empty, children: "No flights" }) }));
|
|
1125
1127
|
}
|
|
1126
|
-
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1128
|
+
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxRuntime.jsxs("div", { className: styles$B.item, children: [jsxRuntime.jsxs("div", { className: styles$B.itemHeader, children: [jsxRuntime.jsx(PlaneIcon$3, {}), jsxRuntime.jsx("span", { className: styles$B.itemType, children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxRuntime.jsxs("div", { className: styles$B.route, children: [jsxRuntime.jsx("span", { className: styles$B.location, children: flight.departure }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: styles$B.location, children: flight.arrival })] }), jsxRuntime.jsxs("div", { className: styles$B.details, children: [jsxRuntime.jsx("span", { children: flight.departureDate }), flight.departureTime && jsxRuntime.jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxRuntime.jsxs("div", { className: styles$B.details, children: [jsxRuntime.jsx("span", { children: flight.airline }), flight.flightNumber && jsxRuntime.jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
1127
1129
|
};
|
|
1128
1130
|
/**
|
|
1129
1131
|
* GroundSegment component for displaying ground transportation
|
|
1130
1132
|
*/
|
|
1131
1133
|
const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
1132
1134
|
if (!segments || segments.length === 0) {
|
|
1133
|
-
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$
|
|
1135
|
+
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$B.empty, children: "No ground transportation" }) }));
|
|
1134
1136
|
}
|
|
1135
|
-
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1137
|
+
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxRuntime.jsxs("div", { className: styles$B.item, children: [jsxRuntime.jsxs("div", { className: styles$B.itemHeader, children: [jsxRuntime.jsx(BusIcon$2, {}), jsxRuntime.jsx("span", { className: styles$B.itemType, children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxRuntime.jsxs("div", { className: styles$B.route, children: [jsxRuntime.jsx("span", { className: styles$B.location, children: segment.pickupLocation }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: styles$B.location, children: segment.dropoffLocation })] }), jsxRuntime.jsxs("div", { className: styles$B.details, children: [jsxRuntime.jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsxRuntime.jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxRuntime.jsxs("div", { className: styles$B.details, children: [jsxRuntime.jsx("span", { children: segment.company }), segment.vehicleCount && jsxRuntime.jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
1136
1138
|
};
|
|
1137
1139
|
/**
|
|
1138
1140
|
* HotelSegment component for displaying hotel information
|
|
1139
1141
|
*/
|
|
1140
1142
|
const HotelSegment = ({ hotels, variant = 'light', className = '', }) => {
|
|
1141
1143
|
if (!hotels || hotels.length === 0) {
|
|
1142
|
-
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$
|
|
1144
|
+
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: styles$B.empty, children: "No hotels" }) }));
|
|
1143
1145
|
}
|
|
1144
|
-
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: hotels.map((hotel, i) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1146
|
+
return (jsxRuntime.jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: hotels.map((hotel, i) => (jsxRuntime.jsxs("div", { className: styles$B.item, children: [jsxRuntime.jsxs("div", { className: styles$B.itemHeader, children: [jsxRuntime.jsx(HotelIcon$3, {}), jsxRuntime.jsx("span", { className: styles$B.itemName, children: hotel.name })] }), hotel.city && (jsxRuntime.jsx("div", { className: styles$B.details, children: jsxRuntime.jsx("span", { children: hotel.city }) })), jsxRuntime.jsxs("div", { className: styles$B.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$B.details, children: jsxRuntime.jsxs("span", { children: [hotel.roomCount, " rooms"] }) }))] }, i))) }));
|
|
1145
1147
|
};
|
|
1146
1148
|
TripSegment.displayName = 'TripSegment';
|
|
1147
1149
|
AirSegment.displayName = 'AirSegment';
|
|
1148
1150
|
GroundSegment.displayName = 'GroundSegment';
|
|
1149
1151
|
HotelSegment.displayName = 'HotelSegment';
|
|
1150
1152
|
|
|
1151
|
-
var styles$
|
|
1153
|
+
var styles$A = {"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
1154
|
|
|
1153
1155
|
/**
|
|
1154
1156
|
* Sidenav component for main navigation.
|
|
@@ -1157,8 +1159,8 @@ var styles$z = {"sidenav":"Sidenav-module_sidenav__9DKVg","expanded":"Sidenav-mo
|
|
|
1157
1159
|
const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultExpanded = true, footer, className = '', ...props }) => {
|
|
1158
1160
|
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
1159
1161
|
const classNames = [
|
|
1160
|
-
styles$
|
|
1161
|
-
expanded ? styles$
|
|
1162
|
+
styles$A.sidenav,
|
|
1163
|
+
expanded ? styles$A.expanded : styles$A.collapsed,
|
|
1162
1164
|
className,
|
|
1163
1165
|
]
|
|
1164
1166
|
.filter(Boolean)
|
|
@@ -1171,20 +1173,20 @@ const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultEx
|
|
|
1171
1173
|
onItemClick(item.key);
|
|
1172
1174
|
}
|
|
1173
1175
|
};
|
|
1174
|
-
return (jsxRuntime.jsxs("aside", { className: classNames, ...props, children: [jsxRuntime.jsx("button", { className: styles$
|
|
1176
|
+
return (jsxRuntime.jsxs("aside", { className: classNames, ...props, children: [jsxRuntime.jsx("button", { className: styles$A.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$A.logoContainer, children: expanded ? logo : logoCollapsed || logo }), jsxRuntime.jsx("nav", { className: styles$A.nav, children: items.map((item) => {
|
|
1175
1177
|
const isActive = item.key === activeKey;
|
|
1176
1178
|
const itemClasses = [
|
|
1177
|
-
styles$
|
|
1178
|
-
isActive ? styles$
|
|
1179
|
+
styles$A.navItem,
|
|
1180
|
+
isActive ? styles$A.active : '',
|
|
1179
1181
|
]
|
|
1180
1182
|
.filter(Boolean)
|
|
1181
1183
|
.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$
|
|
1183
|
-
}) }), footer && jsxRuntime.jsx("div", { className: styles$
|
|
1184
|
+
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$A.icon, children: item.icon }), expanded && jsxRuntime.jsx("span", { className: styles$A.label, children: item.label })] }, item.key));
|
|
1185
|
+
}) }), footer && jsxRuntime.jsx("div", { className: styles$A.footer, children: footer })] }));
|
|
1184
1186
|
};
|
|
1185
1187
|
Sidenav.displayName = 'Sidenav';
|
|
1186
1188
|
|
|
1187
|
-
var styles$
|
|
1189
|
+
var styles$z = {"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
1190
|
|
|
1189
1191
|
/**
|
|
1190
1192
|
* Topbar component for the main header.
|
|
@@ -1195,7 +1197,7 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
1195
1197
|
const [searchQuery, setSearchQuery] = React.useState('');
|
|
1196
1198
|
const dropdownRef = React.useRef(null);
|
|
1197
1199
|
const searchInputRef = React.useRef(null);
|
|
1198
|
-
const classNames = [styles$
|
|
1200
|
+
const classNames = [styles$z.topbar, className].filter(Boolean).join(' ');
|
|
1199
1201
|
// Close dropdown on outside click
|
|
1200
1202
|
React.useEffect(() => {
|
|
1201
1203
|
if (!isOpen)
|
|
@@ -1244,27 +1246,27 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
1244
1246
|
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
1245
1247
|
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
1246
1248
|
const hasDropdown = accounts && accounts.length > 0;
|
|
1247
|
-
return (jsxRuntime.jsxs("header", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1249
|
+
return (jsxRuntime.jsxs("header", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$z.left, children: [leftContent, account && (jsxRuntime.jsxs("div", { className: styles$z.accountWrapper, ref: dropdownRef, children: [jsxRuntime.jsxs("button", { className: `${styles$z.accountSelector} ${isOpen ? styles$z.open : ''}`, onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsxRuntime.jsx("span", { className: styles$z.accountCode, children: account.code }), jsxRuntime.jsx("span", { className: styles$z.accountName, children: account.name }), hasDropdown && (jsxRuntime.jsx(ChevronDownIcon$1, { size: 16, className: `${styles$z.chevron} ${isOpen ? styles$z.chevronOpen : ''}` }))] }), isOpen && hasDropdown && (jsxRuntime.jsxs("div", { className: styles$z.dropdown, role: "listbox", children: [jsxRuntime.jsxs("div", { className: styles$z.dropdownSearch, children: [jsxRuntime.jsxs("svg", { className: styles$z.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$z.searchInput })] }), jsxRuntime.jsx("div", { className: styles$z.dropdownList, children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxRuntime.jsxs("button", { className: `${styles$z.dropdownItem} ${acc.code === account.code ? styles$z.selected : ''}`, onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsxRuntime.jsx("span", { className: styles$z.dropdownItemCode, children: acc.code }), jsxRuntime.jsx("span", { className: styles$z.dropdownItemName, children: acc.name })] }, acc.code)))) : (jsxRuntime.jsx("div", { className: styles$z.noResults, children: "No accounts found" })) })] }))] }))] }), actions && jsxRuntime.jsx("div", { className: styles$z.actions, children: actions })] }));
|
|
1248
1250
|
};
|
|
1249
1251
|
Topbar.displayName = 'Topbar';
|
|
1250
1252
|
|
|
1251
|
-
var styles$
|
|
1253
|
+
var styles$y = {"appLayout":"AppLayout-module_appLayout__NFbZk","mainArea":"AppLayout-module_mainArea__t-6oq","content":"AppLayout-module_content__5kV7S"};
|
|
1252
1254
|
|
|
1253
1255
|
const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account, defaultExpanded = true, onNavItemClick, onAccountClick, children, navFooter, topbarActions, className, }) => {
|
|
1254
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1256
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$y.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$y.mainArea, children: [jsxRuntime.jsx(Topbar, { account: account, onAccountClick: onAccountClick, actions: topbarActions }), jsxRuntime.jsx("main", { className: styles$y.content, children: children })] })] }));
|
|
1255
1257
|
};
|
|
1256
1258
|
|
|
1257
|
-
var styles$
|
|
1259
|
+
var styles$x = {"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"};
|
|
1258
1260
|
|
|
1259
1261
|
/**
|
|
1260
1262
|
* Card component for grouping related content.
|
|
1261
1263
|
*/
|
|
1262
1264
|
const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
1263
1265
|
const classNames = [
|
|
1264
|
-
styles$
|
|
1265
|
-
styles$
|
|
1266
|
-
styles$
|
|
1267
|
-
interactive ? styles$
|
|
1266
|
+
styles$x.card,
|
|
1267
|
+
styles$x[variant],
|
|
1268
|
+
styles$x[`padding-${padding}`],
|
|
1269
|
+
interactive ? styles$x.interactive : '',
|
|
1268
1270
|
className,
|
|
1269
1271
|
]
|
|
1270
1272
|
.filter(Boolean)
|
|
@@ -1273,22 +1275,22 @@ const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactiv
|
|
|
1273
1275
|
});
|
|
1274
1276
|
Card.displayName = 'Card';
|
|
1275
1277
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
1276
|
-
const classNames = [styles$
|
|
1277
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1278
|
+
const classNames = [styles$x.header, className].filter(Boolean).join(' ');
|
|
1279
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$x.headerContent, children: [title && jsxRuntime.jsx("h3", { className: styles$x.title, children: title }), subtitle && jsxRuntime.jsx("p", { className: styles$x.subtitle, children: subtitle }), children] }), actions && jsxRuntime.jsx("div", { className: styles$x.actions, children: actions })] }));
|
|
1278
1280
|
};
|
|
1279
1281
|
CardHeader.displayName = 'CardHeader';
|
|
1280
1282
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
1281
|
-
const classNames = [styles$
|
|
1283
|
+
const classNames = [styles$x.body, className].filter(Boolean).join(' ');
|
|
1282
1284
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
1283
1285
|
};
|
|
1284
1286
|
CardBody.displayName = 'CardBody';
|
|
1285
1287
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
1286
|
-
const classNames = [styles$
|
|
1288
|
+
const classNames = [styles$x.footer, className].filter(Boolean).join(' ');
|
|
1287
1289
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
1288
1290
|
};
|
|
1289
1291
|
CardFooter.displayName = 'CardFooter';
|
|
1290
1292
|
|
|
1291
|
-
var styles$
|
|
1293
|
+
var styles$w = {"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"};
|
|
1292
1294
|
|
|
1293
1295
|
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" })] }));
|
|
1294
1296
|
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" })] }));
|
|
@@ -1299,18 +1301,18 @@ const PlusIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", vi
|
|
|
1299
1301
|
*/
|
|
1300
1302
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
1301
1303
|
const listClasses = [
|
|
1302
|
-
styles$
|
|
1304
|
+
styles$w.container,
|
|
1303
1305
|
className,
|
|
1304
1306
|
].filter(Boolean).join(' ');
|
|
1305
|
-
return (jsxRuntime.jsxs("div", { className: listClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$
|
|
1307
|
+
return (jsxRuntime.jsxs("div", { className: listClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$w.alert, children: alert })), jsxRuntime.jsxs("div", { className: styles$w.card, children: [jsxRuntime.jsx("div", { className: styles$w.header, children: jsxRuntime.jsxs("div", { className: styles$w.titleRow, children: [jsxRuntime.jsx("h3", { className: styles$w.title, children: title }), tooltip && (jsxRuntime.jsx("span", { className: styles$w.tooltip, children: jsxRuntime.jsx(InfoIcon, {}) }))] }) }), jsxRuntime.jsxs("div", { className: styles$w.list, children: [contacts.map((contact) => (jsxRuntime.jsxs("div", { className: styles$w.contactItem, children: [jsxRuntime.jsxs("div", { className: styles$w.contactInfo, children: [jsxRuntime.jsxs("div", { className: styles$w.contactName, children: [contact.name, contact.isPrimary && (jsxRuntime.jsx("span", { className: styles$w.badge, children: "Primary" })), contact.isSecondary && (jsxRuntime.jsx("span", { className: `${styles$w.badge} ${styles$w.badgeSecondary}`, children: "Secondary" }))] }), contact.role && (jsxRuntime.jsx("div", { className: styles$w.contactRole, children: contact.role })), jsxRuntime.jsxs("div", { className: styles$w.contactDetails, children: [contact.email && (jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, className: styles$w.contactLink, children: contact.email })), contact.phone && (jsxRuntime.jsx("span", { className: styles$w.contactPhone, children: contact.phone }))] })] }), jsxRuntime.jsxs("div", { className: styles$w.contactActions, children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: styles$w.actionButton, onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsxRuntime.jsx(EditIcon$1, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: `${styles$w.actionButton} ${styles$w.actionButtonDanger}`, onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsxRuntime.jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsxRuntime.jsx("div", { className: styles$w.empty, children: "No contacts added" }))] }), showAdd && onAdd && (jsxRuntime.jsx("div", { className: styles$w.footer, children: jsxRuntime.jsxs("button", { type: "button", className: styles$w.addButton, onClick: onAdd, children: [jsxRuntime.jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
1306
1308
|
};
|
|
1307
1309
|
ContactList.displayName = 'ContactList';
|
|
1308
1310
|
|
|
1309
|
-
var styles$
|
|
1311
|
+
var styles$v = {"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"};
|
|
1310
1312
|
|
|
1311
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1312
|
-
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1313
|
-
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1313
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: `${styles$v.header} ${className}`, children: [jsxRuntime.jsxs("div", { className: styles$v.headerContent, children: [title && jsxRuntime.jsx("h2", { className: styles$v.title, children: title }), children] }), showClose && (jsxRuntime.jsx("button", { type: "button", className: styles$v.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" }) }) }))] }));
|
|
1314
|
+
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$v.body} ${className}`, children: children }));
|
|
1315
|
+
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$v.footer} ${className}`, children: children }));
|
|
1314
1316
|
const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, closeOnBackdropClick = true, closeOnEscape = true, showBackdrop = true, className = '', }) => {
|
|
1315
1317
|
const handleEscape = React.useCallback((e) => {
|
|
1316
1318
|
if (closeOnEscape && e.key === 'Escape') {
|
|
@@ -1334,7 +1336,7 @@ const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, cl
|
|
|
1334
1336
|
};
|
|
1335
1337
|
if (!isOpen)
|
|
1336
1338
|
return null;
|
|
1337
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1339
|
+
return (jsxRuntime.jsxs("div", { className: styles$v.container, children: [showBackdrop && (jsxRuntime.jsx("div", { className: `${styles$v.backdrop} ${isOpen ? styles$v.backdropOpen : ''}`, onClick: handleBackdropClick })), jsxRuntime.jsx("div", { className: `${styles$v.drawer} ${styles$v[position]} ${styles$v[`size${size.charAt(0).toUpperCase()}${size.slice(1)}`]} ${isOpen ? styles$v.drawerOpen : ''} ${className}`, role: "dialog", "aria-modal": "true", children: React.Children.map(children, (child) => {
|
|
1338
1340
|
if (React.isValidElement(child) && child.type === DrawerHeader) {
|
|
1339
1341
|
return React.cloneElement(child, {
|
|
1340
1342
|
onClose,
|
|
@@ -1347,7 +1349,7 @@ Drawer.Header = DrawerHeader;
|
|
|
1347
1349
|
Drawer.Body = DrawerBody;
|
|
1348
1350
|
Drawer.Footer = DrawerFooter;
|
|
1349
1351
|
|
|
1350
|
-
var styles$
|
|
1352
|
+
var styles$u = {"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
1353
|
|
|
1352
1354
|
const isTravelDueDateCompleted = (item) => item.status.trim().toLowerCase() === 'completed' || !!item.completeddatetime;
|
|
1353
1355
|
const parseLocalDate$1 = (value) => {
|
|
@@ -1363,7 +1365,7 @@ const DueDateCard = ({ item, onToggle, onTaskClick }) => {
|
|
|
1363
1365
|
const completed = isTravelDueDateCompleted(item);
|
|
1364
1366
|
const dueDate = parseLocalDate$1(item.duedate);
|
|
1365
1367
|
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
1366
|
-
return (jsxRuntime.jsxs("article", { className: styles$
|
|
1368
|
+
return (jsxRuntime.jsxs("article", { className: styles$u.card, children: [jsxRuntime.jsxs("div", { className: styles$u.cardTitle, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": `${completed ? 'Reopen' : 'Complete'} ${item.tasktitle}`, className: [styles$u.status, completed ? styles$u.completed : pastDue ? styles$u.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$u.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$u.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
1369
|
};
|
|
1368
1370
|
/** Hub's searchable, status-aware due-dates drawer. */
|
|
1369
1371
|
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
@@ -1375,10 +1377,10 @@ const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose,
|
|
|
1375
1377
|
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
1378
|
return matches.length ? [[date, matches]] : [];
|
|
1377
1379
|
})), [dueDates, search, selectedDate, selectedTrip]);
|
|
1378
|
-
return (jsxRuntime.jsxs("aside", { className: [styles$
|
|
1380
|
+
return (jsxRuntime.jsxs("aside", { className: [styles$u.drawer, isOpen ? styles$u.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$u.body, children: [jsxRuntime.jsxs("label", { className: styles$u.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$u.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$u.cards, children: items.map((item) => jsxRuntime.jsx(DueDateCard, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
1379
1381
|
};
|
|
1380
1382
|
|
|
1381
|
-
var styles$
|
|
1383
|
+
var styles$t = {"shell":"HubAppShell-module_shell__Y13Fo","main":"HubAppShell-module_main__OvnjA","beta":"HubAppShell-module_beta__V8Dzh","sidebar":"HubAppShell-module_sidebar__73gt6","shellExpanded":"HubAppShell-module_shellExpanded__z9cLL","expandButton":"HubAppShell-module_expandButton__hyYi-","logo":"HubAppShell-module_logo__iylLM","defaultLogo":"HubAppShell-module_defaultLogo__tVCz-","desktopNav":"HubAppShell-module_desktopNav__-ZRGD","navItem":"HubAppShell-module_navItem__FKkXN","active":"HubAppShell-module_active__zu1-B","navIcon":"HubAppShell-module_navIcon__QRImh","disabledNav":"HubAppShell-module_disabledNav__zj07n","sidebarFooter":"HubAppShell-module_sidebarFooter__kA2bq","profile":"HubAppShell-module_profile__JCGL5","avatar":"HubAppShell-module_avatar__V-lFG","profileMenu":"HubAppShell-module_profileMenu__qqWSu","topbar":"HubAppShell-module_topbar__U4w0A","defaultAccount":"HubAppShell-module_defaultAccount__3vohz","defaultActions":"HubAppShell-module_defaultActions__wAEJb","desktopActions":"HubAppShell-module_desktopActions__uVRKY","mobileActions":"HubAppShell-module_mobileActions__W6Rf9","content":"HubAppShell-module_content__yCgGs","contentDisabled":"HubAppShell-module_contentDisabled__btmCY","mobileNav":"HubAppShell-module_mobileNav__X0zBs","mobileNavItem":"HubAppShell-module_mobileNavItem__1x94j","mobileExtras":"HubAppShell-module_mobileExtras__xo3qI","mobileBooking":"HubAppShell-module_mobileBooking__-Jz9h","mobilePrimary":"HubAppShell-module_mobilePrimary__p5PCn","mobileFooter":"HubAppShell-module_mobileFooter__QvsE-","loading":"HubAppShell-module_loading__V8RiG"};
|
|
1382
1384
|
|
|
1383
1385
|
const HUB_INDIVIDUAL_TRAVEL_ITEM = { key: 'individual-travel', label: 'Individual Travel', path: '/individual-travel', icon: jsxRuntime.jsx(UserIcon, { size: 24 }) };
|
|
1384
1386
|
const HUB_NAV_ITEMS = [
|
|
@@ -1388,9 +1390,9 @@ const HUB_NAV_ITEMS = [
|
|
|
1388
1390
|
{ key: 'team-management', label: 'Team Management', path: '/team-management', icon: jsxRuntime.jsx(UsersIcon$1, { size: 24 }) },
|
|
1389
1391
|
];
|
|
1390
1392
|
const HUB_ADMIN_ITEM = { key: 'administration', label: 'Administration', path: '/administration', icon: jsxRuntime.jsx(SettingsIcon, { size: 24 }) };
|
|
1391
|
-
const DefaultLogo = ({ expanded }) => jsxRuntime.jsxs("div", { className: styles$
|
|
1392
|
-
const DefaultAccount = () => jsxRuntime.jsxs("button", { type: "button", className: styles$
|
|
1393
|
-
const DefaultActions = ({ isMobileNavOpen, toggleMobileNav }) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1393
|
+
const DefaultLogo = ({ expanded }) => jsxRuntime.jsxs("div", { className: styles$t.defaultLogo, children: [jsxRuntime.jsx(LogoIcon, { size: expanded ? 38 : 32 }), expanded && jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: "SHORT'S" }), jsxRuntime.jsx("small", { children: "TRAVEL MANAGEMENT" })] })] });
|
|
1394
|
+
const DefaultAccount = () => jsxRuntime.jsxs("button", { type: "button", className: styles$t.defaultAccount, children: [jsxRuntime.jsx("span", { children: "UNI" }), jsxRuntime.jsx("strong", { children: "University of Northern Iowa" })] });
|
|
1395
|
+
const DefaultActions = ({ isMobileNavOpen, toggleMobileNav }) => (jsxRuntime.jsxs("div", { className: styles$t.defaultActions, children: [jsxRuntime.jsxs("div", { className: styles$t.desktopActions, children: [jsxRuntime.jsx(Button, { size: "lg", leftIcon: jsxRuntime.jsx(ArrowUpRightIcon, { size: 18 }), children: "Book Team Travel" }), jsxRuntime.jsx(Button, { variant: "secondary", size: "lg", square: true, "aria-label": "Provide Feedback", children: jsxRuntime.jsx(LightbulbIcon, { size: 18 }) }), jsxRuntime.jsx(Button, { variant: "secondary", size: "lg", square: true, "aria-label": "Announcements", children: jsxRuntime.jsx(MegaphoneIcon, { size: 18 }) }), jsxRuntime.jsx(Button, { variant: "secondary", size: "lg", square: true, "aria-label": "Contact Us", children: jsxRuntime.jsx(PhoneIcon, { size: 18 }) })] }), jsxRuntime.jsxs("div", { className: styles$t.mobileActions, children: [jsxRuntime.jsx(Button, { variant: "ghost", size: "lg", square: true, "aria-label": "Announcements", children: jsxRuntime.jsx(MegaphoneIcon, { size: 20 }) }), jsxRuntime.jsx(Button, { variant: "ghost", size: "lg", square: true, "aria-label": isMobileNavOpen ? 'Close navigation' : 'Open navigation', onClick: toggleMobileNav, children: isMobileNavOpen ? jsxRuntime.jsx(CloseIcon, { size: 22 }) : jsxRuntime.jsx(MenuIcon, { size: 22 }) })] })] }));
|
|
1394
1396
|
/** The shared application navigation and content shell used by Hub and its Storybook pages. */
|
|
1395
1397
|
const HubAppShell = ({ children, navItems = HUB_NAV_ITEMS, individualTravelItem = HUB_INDIVIDUAL_TRAVEL_ITEM, adminItem = HUB_ADMIN_ITEM, activeNavKey, onNavigate, onLogoClick, onLegacyPortal, accountSelector, renderTopbarActions, renderMobileExtras, mobileFooter, profileMenu, userInitials = 'KM', isAdmin = true, navigationDisabled = false, loading = false, contentDisabled = false, showContent = true, logo, defaultExpanded = false, betaLabel = 'Beta Version', className = '', }) => {
|
|
1396
1398
|
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
@@ -1413,11 +1415,11 @@ const HubAppShell = ({ children, navItems = HUB_NAV_ITEMS, individualTravelItem
|
|
|
1413
1415
|
onNavigate?.(item);
|
|
1414
1416
|
closeMobileNav();
|
|
1415
1417
|
};
|
|
1416
|
-
const renderNavItem = (item, mobile = false) => (jsxRuntime.jsxs("button", { type: "button", className: [styles$
|
|
1417
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1418
|
+
const renderNavItem = (item, mobile = false) => (jsxRuntime.jsxs("button", { type: "button", className: [styles$t.navItem, activeNavKey === item.key ? styles$t.active : '', mobile ? styles$t.mobileNavItem : ''].filter(Boolean).join(' '), "aria-current": activeNavKey === item.key ? 'page' : undefined, "aria-label": item.label, title: item.label, onClick: () => navigate(item), children: [jsxRuntime.jsx("span", { className: styles$t.navIcon, children: item.icon }), (expanded || mobile) && jsxRuntime.jsx("span", { children: item.label })] }, item.key));
|
|
1419
|
+
return (jsxRuntime.jsxs("div", { className: [styles$t.shell, expanded ? styles$t.shellExpanded : '', className].filter(Boolean).join(' '), children: [loading && jsxRuntime.jsx("div", { className: styles$t.loading, role: "status", "aria-label": "Loading", "data-testid": "loading-overlay", children: jsxRuntime.jsx("span", {}) }), betaLabel && jsxRuntime.jsx("div", { className: styles$t.beta, children: betaLabel }), jsxRuntime.jsxs("aside", { className: styles$t.sidebar, "data-expanded": expanded, children: [jsxRuntime.jsx("button", { type: "button", className: styles$t.expandButton, "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', onClick: () => setExpanded((value) => !value), children: expanded ? jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }) : jsxRuntime.jsx(ChevronRightIcon$1, { size: 16 }) }), jsxRuntime.jsx("button", { type: "button", className: styles$t.logo, "aria-label": "Go to Home", onClick: onLogoClick, children: logo ?? jsxRuntime.jsx(DefaultLogo, { expanded: expanded }) }), jsxRuntime.jsxs("nav", { className: styles$t.desktopNav, "aria-label": "Hub navigation", children: [jsxRuntime.jsxs("button", { type: "button", className: styles$t.navItem, "aria-label": "Old Portal", title: "Old Portal", onClick: onLegacyPortal, children: [jsxRuntime.jsx("span", { className: styles$t.navIcon, children: jsxRuntime.jsx(ArrowUpRightIcon, { size: 24 }) }), expanded && jsxRuntime.jsx("span", { children: "Old Portal" })] }), renderNavItem(individualTravelItem), jsxRuntime.jsx("div", { className: navigationDisabled ? styles$t.disabledNav : '', children: navItems.map((item) => renderNavItem(item)) })] }), jsxRuntime.jsxs("div", { className: styles$t.sidebarFooter, children: [isAdmin && renderNavItem(adminItem), jsxRuntime.jsxs("div", { className: styles$t.profile, ref: profileRef, children: [jsxRuntime.jsx("button", { type: "button", className: styles$t.avatar, "aria-label": "User Information", onClick: () => setIsProfileOpen((value) => !value), children: userInitials }), isProfileOpen && profileMenu && jsxRuntime.jsx("div", { className: styles$t.profileMenu, children: profileMenu })] })] })] }), jsxRuntime.jsxs("div", { className: styles$t.main, children: [jsxRuntime.jsxs("header", { className: styles$t.topbar, children: [jsxRuntime.jsx("div", { children: accountSelector ?? jsxRuntime.jsx(DefaultAccount, {}) }), renderTopbarActions?.(actions) ?? jsxRuntime.jsx(DefaultActions, { ...actions })] }), isMobileNavOpen && jsxRuntime.jsxs("div", { className: styles$t.mobileNav, children: [jsxRuntime.jsx("nav", { "aria-label": "Mobile Hub navigation", children: navItems.map((item) => renderNavItem(item, true)) }), jsxRuntime.jsxs("div", { className: styles$t.mobileExtras, role: "group", "aria-label": "Mobile navigation actions", children: [renderMobileExtras?.(closeMobileNav) ?? jsxRuntime.jsxs("button", { type: "button", className: styles$t.mobileBooking, onClick: closeMobileNav, children: [jsxRuntime.jsx(ArrowUpRightIcon, { size: 20 }), jsxRuntime.jsx("span", { children: "Book Team Travel" })] }), jsxRuntime.jsxs("button", { type: "button", className: styles$t.mobilePrimary, onClick: () => { onLegacyPortal?.(); closeMobileNav(); }, children: [jsxRuntime.jsx(ArrowUpRightIcon, { size: 20 }), jsxRuntime.jsx("span", { children: "Legacy Portal" })] })] }), mobileFooter && jsxRuntime.jsx("div", { className: styles$t.mobileFooter, children: mobileFooter })] }), showContent && jsxRuntime.jsx("main", { className: [styles$t.content, contentDisabled ? styles$t.contentDisabled : ''].filter(Boolean).join(' '), children: children })] })] }));
|
|
1418
1420
|
};
|
|
1419
1421
|
|
|
1420
|
-
var styles$
|
|
1422
|
+
var styles$s = {"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"};
|
|
1421
1423
|
|
|
1422
1424
|
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" }) }));
|
|
1423
1425
|
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" })] }));
|
|
@@ -1443,8 +1445,8 @@ const TYPE_LABELS = {
|
|
|
1443
1445
|
*/
|
|
1444
1446
|
const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, onRemove, onAdd, alert, isLoading = false, emptyMessage = 'No membership programs added', className = '', }) => {
|
|
1445
1447
|
const containerClasses = [
|
|
1446
|
-
styles$
|
|
1447
|
-
isLoading ? styles$
|
|
1448
|
+
styles$s.container,
|
|
1449
|
+
isLoading ? styles$s.loading : '',
|
|
1448
1450
|
className,
|
|
1449
1451
|
].filter(Boolean).join(' ');
|
|
1450
1452
|
const groupedPrograms = programs.reduce((acc, program) => {
|
|
@@ -1455,30 +1457,30 @@ const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, o
|
|
|
1455
1457
|
return acc;
|
|
1456
1458
|
}, {});
|
|
1457
1459
|
const typeOrder = ['airline', 'hotel', 'car', 'other'];
|
|
1458
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, children: [alert && jsxRuntime.jsx("div", { className: styles$
|
|
1460
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, children: [alert && jsxRuntime.jsx("div", { className: styles$s.alert, children: alert }), jsxRuntime.jsxs("div", { className: styles$s.header, children: [jsxRuntime.jsx("h2", { className: styles$s.title, children: title }), onAdd && (jsxRuntime.jsxs("button", { type: "button", className: styles$s.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$s.empty, children: jsxRuntime.jsx("p", { children: emptyMessage }) })) : (jsxRuntime.jsx("div", { className: styles$s.list, children: typeOrder.map((type) => {
|
|
1459
1461
|
const typePrograms = groupedPrograms[type];
|
|
1460
1462
|
if (!typePrograms || typePrograms.length === 0)
|
|
1461
1463
|
return null;
|
|
1462
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1464
|
+
return (jsxRuntime.jsxs("div", { className: styles$s.group, children: [jsxRuntime.jsxs("div", { className: styles$s.groupHeader, children: [jsxRuntime.jsx("span", { className: styles$s.groupIcon, children: TYPE_ICONS[type] }), jsxRuntime.jsx("span", { className: styles$s.groupLabel, children: TYPE_LABELS[type] })] }), jsxRuntime.jsx("div", { className: styles$s.programs, children: typePrograms.map((program) => (jsxRuntime.jsxs("div", { className: styles$s.program, children: [jsxRuntime.jsxs("div", { className: styles$s.programInfo, children: [jsxRuntime.jsx("div", { className: styles$s.programProvider, children: program.provider }), program.programName && (jsxRuntime.jsx("div", { className: styles$s.programName, children: program.programName })), jsxRuntime.jsx("div", { className: styles$s.programNumber, children: program.membershipNumber }), program.status && (jsxRuntime.jsx("div", { className: styles$s.programStatus, children: program.status }))] }), jsxRuntime.jsxs("div", { className: styles$s.programActions, children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: styles$s.actionButton, onClick: () => onEdit(program), "aria-label": `Edit ${program.provider} program`, children: jsxRuntime.jsx(EditIcon, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: [styles$s.actionButton, styles$s.removeButton].join(' '), onClick: () => onRemove(program), "aria-label": `Remove ${program.provider} program`, children: jsxRuntime.jsx(TrashIcon, {}) }))] })] }, program.id))) })] }, type));
|
|
1463
1465
|
}) }))] }));
|
|
1464
1466
|
};
|
|
1465
1467
|
MembershipPrograms.displayName = 'MembershipPrograms';
|
|
1466
1468
|
|
|
1467
|
-
var styles$
|
|
1469
|
+
var styles$r = {"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"};
|
|
1468
1470
|
|
|
1469
1471
|
const Stat = ({ label, value, sub, meterValue, meterMax, warn = false }) => {
|
|
1470
1472
|
const ratio = meterMax > 0 ? Math.min(100, Math.max(0, (meterValue / meterMax) * 100)) : 0;
|
|
1471
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1473
|
+
return (jsxRuntime.jsxs("div", { className: styles$r.stat, children: [jsxRuntime.jsxs("div", { className: styles$r.labelRow, children: [jsxRuntime.jsx("span", { className: styles$r.label, children: label }), warn && jsxRuntime.jsx(WarningIcon$1, { size: 14, className: styles$r.warningIcon, "aria-label": `${label} warning` })] }), jsxRuntime.jsx("div", { className: [styles$r.value, warn ? styles$r.warningText : ''].filter(Boolean).join(' '), children: value }), jsxRuntime.jsx("div", { className: styles$r.sub, children: sub }), jsxRuntime.jsx("div", { className: styles$r.meter, "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: [styles$r.meterFill, warn ? styles$r.meterOver : ''].filter(Boolean).join(' '), style: { width: `${ratio}%` } }) })] }));
|
|
1472
1474
|
};
|
|
1473
1475
|
/** Advisory seat and payload meters from Hub's charter manifest. */
|
|
1474
1476
|
const ManifestCapacityStats = ({ paxCount, seats, paxWeight, cargoWeight, payloadLimit, className = '', }) => {
|
|
1475
1477
|
const totalWeight = paxWeight + cargoWeight;
|
|
1476
1478
|
const overSeats = seats > 0 && paxCount > seats;
|
|
1477
1479
|
const overPayload = payloadLimit > 0 && totalWeight > payloadLimit;
|
|
1478
|
-
return (jsxRuntime.jsxs("div", { className: className, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1480
|
+
return (jsxRuntime.jsxs("div", { className: className, children: [jsxRuntime.jsxs("div", { className: styles$r.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$r.alert, role: "alert", children: [jsxRuntime.jsx(WarningIcon$1, { size: 20, className: styles$r.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."] }))] })] }))] }));
|
|
1479
1481
|
};
|
|
1480
1482
|
|
|
1481
|
-
var styles$
|
|
1483
|
+
var styles$q = {"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"};
|
|
1482
1484
|
|
|
1483
1485
|
const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton = true, closeOnBackdropClick = true, closeOnEscape = true, footer, className = '', }) => {
|
|
1484
1486
|
const handleEscape = React.useCallback((e) => {
|
|
@@ -1503,12 +1505,12 @@ const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton
|
|
|
1503
1505
|
};
|
|
1504
1506
|
if (!isOpen)
|
|
1505
1507
|
return null;
|
|
1506
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
1508
|
+
return (jsxRuntime.jsx("div", { className: styles$q.overlay, onClick: handleBackdropClick, children: jsxRuntime.jsxs("div", { className: `${styles$q.modal} ${styles$q[size]} ${className}`, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? 'modal-title' : undefined, children: [(title || showCloseButton) && (jsxRuntime.jsxs("div", { className: styles$q.header, children: [title && (jsxRuntime.jsx("h2", { id: "modal-title", className: styles$q.title, children: title })), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: styles$q.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$q.body, children: children }), footer && jsxRuntime.jsx("div", { className: styles$q.footer, children: footer })] }) }));
|
|
1507
1509
|
};
|
|
1508
|
-
const ModalFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1509
|
-
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$
|
|
1510
|
+
const ModalFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$q.footerButtons} ${className}`, children: children }));
|
|
1511
|
+
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$q.confirmMessage, children: message }) }));
|
|
1510
1512
|
|
|
1511
|
-
var styles$
|
|
1513
|
+
var styles$p = {"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"};
|
|
1512
1514
|
|
|
1513
1515
|
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" }) }));
|
|
1514
1516
|
/**
|
|
@@ -1530,19 +1532,19 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
1530
1532
|
setOpen(!open);
|
|
1531
1533
|
}
|
|
1532
1534
|
};
|
|
1533
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1535
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$p.module} ${className}`, children: [title && (jsxRuntime.jsx("div", { className: `${styles$p.header} ${styles$p[size]} ${!open ? styles$p.closed : ''} ${headerClassName}`, children: jsxRuntime.jsxs("div", { className: `${styles$p.titleRow} ${styles$p[size]} ${titleClassName}`, children: [icon && (jsxRuntime.jsx("span", { className: `${styles$p.icon} ${size === 'sm' ? '' : styles$p.iconSpaced} ${iconClassName}`, children: icon })), jsxRuntime.jsx("span", { className: styles$p.title, children: title }), badge && jsxRuntime.jsx("span", { className: styles$p.badge, children: badge }), jsxRuntime.jsxs("div", { className: styles$p.tools, children: [tools, useToggle && (jsxRuntime.jsx("button", { type: "button", className: styles$p.toggleBtn, onClick: handleToggle, "aria-expanded": open, children: jsxRuntime.jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxRuntime.jsxs("div", { className: styles$p.bodyWrapper, children: [before, jsxRuntime.jsx("div", { className: `${styles$p.body} ${styles$p[size]} ${!open ? styles$p.hidden : ''} ${bodyClassName}`, children: children }), after] }), footer && (jsxRuntime.jsx("div", { className: `${styles$p.footer} ${!open ? styles$p.hidden : ''}`, children: footer }))] }));
|
|
1534
1536
|
};
|
|
1535
1537
|
/**
|
|
1536
1538
|
* Horizontal divider for Module content
|
|
1537
1539
|
*/
|
|
1538
|
-
const ModuleDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("hr", { className: `${styles$
|
|
1540
|
+
const ModuleDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("hr", { className: `${styles$p.divider} ${dark ? styles$p.dark : ''} ${className}` }));
|
|
1539
1541
|
/**
|
|
1540
1542
|
* Vertical divider for Module content
|
|
1541
1543
|
*/
|
|
1542
|
-
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1544
|
+
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$p.verticalDivider} ${dark ? styles$p.dark : ''} ${className}` }));
|
|
1543
1545
|
Module.displayName = 'Module';
|
|
1544
1546
|
|
|
1545
|
-
var styles$
|
|
1547
|
+
var styles$o = {"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"};
|
|
1546
1548
|
|
|
1547
1549
|
const decodeEntities = (value) => {
|
|
1548
1550
|
if (typeof document === 'undefined')
|
|
@@ -1569,13 +1571,13 @@ const PageBanners = ({ systemBanners, alertBanners, className = '', }) => {
|
|
|
1569
1571
|
const visibleAlerts = alertBanners.filter((banner) => !dismissed.has(banner.id));
|
|
1570
1572
|
if (!visibleSystem.length && !visibleAlerts.length)
|
|
1571
1573
|
return null;
|
|
1572
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1573
|
-
const content = (jsxRuntime.jsxs("div", { className: styles$
|
|
1574
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1574
|
+
return (jsxRuntime.jsxs("div", { className: [styles$o.stack, className].filter(Boolean).join(' '), role: "region", "aria-label": "Page notices", children: [visibleSystem.map((banner) => (jsxRuntime.jsxs("div", { className: [styles$o.banner, styles$o.system].join(' '), role: "status", children: [jsxRuntime.jsx(InfoIcon$1, { className: styles$o.systemIcon, size: 20, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { className: styles$o.content, children: [jsxRuntime.jsx("p", { className: styles$o.title, dangerouslySetInnerHTML: { __html: banner.html } }), banner.detailHtml && (jsxRuntime.jsx("p", { className: styles$o.detail, dangerouslySetInnerHTML: { __html: banner.detailHtml } }))] }), jsxRuntime.jsx("button", { type: "button", className: styles$o.dismiss, "aria-label": "Dismiss notice", onClick: () => dismiss(banner.id), children: jsxRuntime.jsx(CloseIcon, { size: 16 }) })] }, banner.id))), visibleAlerts.map((banner) => {
|
|
1575
|
+
const content = (jsxRuntime.jsxs("div", { className: styles$o.content, children: [jsxRuntime.jsx("p", { className: [styles$o.title, styles$o.alertTitle].join(' '), children: decodeEntities(banner.title) }), banner.body && jsxRuntime.jsx("p", { className: [styles$o.detail, styles$o.clamp].join(' '), children: decodeEntities(banner.body) })] }));
|
|
1576
|
+
return (jsxRuntime.jsxs("div", { className: [styles$o.banner, styles$o.alert].join(' '), role: "alert", children: [jsxRuntime.jsx(WarningIcon$1, { className: styles$o.alertIcon, size: 20, "aria-hidden": "true" }), banner.href ? (jsxRuntime.jsx("a", { href: banner.href, className: styles$o.alertLink, children: content })) : (content), jsxRuntime.jsx("button", { type: "button", className: [styles$o.dismiss, styles$o.alertDismiss].join(' '), "aria-label": "Dismiss alert", onClick: () => dismiss(banner.id), children: jsxRuntime.jsx(CloseIcon, { size: 16 }) })] }, banner.id));
|
|
1575
1577
|
})] }));
|
|
1576
1578
|
};
|
|
1577
1579
|
|
|
1578
|
-
var styles$
|
|
1580
|
+
var styles$n = {"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"};
|
|
1579
1581
|
|
|
1580
1582
|
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" }) }));
|
|
1581
1583
|
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" })] }));
|
|
@@ -1590,15 +1592,15 @@ const DEFAULT_ICONS = {
|
|
|
1590
1592
|
*/
|
|
1591
1593
|
const PreferencesPanel = ({ title, sections, alert, footer, isLoading = false, className = '', }) => {
|
|
1592
1594
|
const panelClasses = [
|
|
1593
|
-
styles$
|
|
1594
|
-
isLoading ? styles$
|
|
1595
|
+
styles$n.panel,
|
|
1596
|
+
isLoading ? styles$n.loading : '',
|
|
1595
1597
|
className,
|
|
1596
1598
|
].filter(Boolean).join(' ');
|
|
1597
|
-
return (jsxRuntime.jsxs("div", { className: panelClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$
|
|
1599
|
+
return (jsxRuntime.jsxs("div", { className: panelClasses, children: [alert && (jsxRuntime.jsx("div", { className: styles$n.alert, children: alert })), title && jsxRuntime.jsx("h2", { className: styles$n.title, children: title }), jsxRuntime.jsx("div", { className: styles$n.grid, children: sections.map((section, i) => (jsxRuntime.jsxs("div", { className: styles$n.section, children: [jsxRuntime.jsxs("div", { className: styles$n.sectionHeader, children: [(section.icon || DEFAULT_ICONS[section.title.toLowerCase()]) && (jsxRuntime.jsx("span", { className: styles$n.sectionIcon, children: section.icon || DEFAULT_ICONS[section.title.toLowerCase()] })), jsxRuntime.jsx("h3", { className: styles$n.sectionTitle, children: section.title })] }), jsxRuntime.jsx("div", { className: styles$n.fields, children: section.fields.map((field, j) => (jsxRuntime.jsxs("div", { className: styles$n.field, children: [jsxRuntime.jsx("label", { className: styles$n.fieldLabel, children: field.label }), field.input ? (jsxRuntime.jsx("div", { className: styles$n.fieldInput, children: field.input })) : (jsxRuntime.jsx("div", { className: styles$n.fieldValue, children: field.value || '—' }))] }, j))) })] }, i))) }), footer && (jsxRuntime.jsx("div", { className: styles$n.footer, children: footer }))] }));
|
|
1598
1600
|
};
|
|
1599
1601
|
PreferencesPanel.displayName = 'PreferencesPanel';
|
|
1600
1602
|
|
|
1601
|
-
var styles$
|
|
1603
|
+
var styles$m = {"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"};
|
|
1602
1604
|
|
|
1603
1605
|
/**
|
|
1604
1606
|
* SummaryItem component displays a single label-value pair.
|
|
@@ -1607,7 +1609,7 @@ const SummaryItemRow = ({ item, value }) => {
|
|
|
1607
1609
|
if (!value)
|
|
1608
1610
|
return null;
|
|
1609
1611
|
const formattedValue = item.format ? item.format(value) : String(value);
|
|
1610
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1612
|
+
return (jsxRuntime.jsxs("div", { className: styles$m.row, children: [jsxRuntime.jsx("span", { className: styles$m.label, children: item.label }), jsxRuntime.jsx("span", { className: styles$m.value, children: formattedValue })] }));
|
|
1611
1613
|
};
|
|
1612
1614
|
/**
|
|
1613
1615
|
* SummarySection component for a group of related summary items.
|
|
@@ -1618,7 +1620,7 @@ const SummarySection = ({ section, values }) => {
|
|
|
1618
1620
|
const hasSegments = section.segments?.some(seg => seg.items.some(item => values[`${section.key}_${seg.label}_${item.label}`] || values[item.label]));
|
|
1619
1621
|
if (!hasItems && !hasSegments)
|
|
1620
1622
|
return null;
|
|
1621
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1623
|
+
return (jsxRuntime.jsxs("div", { className: styles$m.section, children: [jsxRuntime.jsx("h3", { className: styles$m.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$m.segment, children: [jsxRuntime.jsx("h4", { className: styles$m.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)))] }));
|
|
1622
1624
|
};
|
|
1623
1625
|
/**
|
|
1624
1626
|
* RequestSummary component for displaying a summary of travel request form data.
|
|
@@ -1626,18 +1628,18 @@ const SummarySection = ({ section, values }) => {
|
|
|
1626
1628
|
*/
|
|
1627
1629
|
const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo, className, title = 'Request Summary', }) => {
|
|
1628
1630
|
const visibleSections = sections.filter(section => enabledSections[section.key] !== false);
|
|
1629
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1631
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$m.summary} ${className || ''}`, children: [jsxRuntime.jsx("h2", { className: styles$m.title, children: title }), submissionInfo && (jsxRuntime.jsxs("div", { className: styles$m.submissionInfo, children: [jsxRuntime.jsx("span", { className: styles$m.label, children: "Submitted by" }), jsxRuntime.jsx("span", { className: styles$m.value, children: submissionInfo.submittedBy }), jsxRuntime.jsx("span", { className: styles$m.label, children: "on" }), jsxRuntime.jsx("span", { className: styles$m.value, children: submissionInfo.submittedOn })] })), jsxRuntime.jsx("div", { className: styles$m.sections, children: visibleSections.map((section) => (jsxRuntime.jsx(SummarySection, { section: section, values: values }, section.key))) }), visibleSections.length === 0 && (jsxRuntime.jsx("p", { className: styles$m.empty, children: "No services selected" }))] }));
|
|
1630
1632
|
};
|
|
1631
1633
|
RequestSummary.displayName = 'RequestSummary';
|
|
1632
1634
|
|
|
1633
|
-
var styles$
|
|
1635
|
+
var styles$l = {"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"};
|
|
1634
1636
|
|
|
1635
1637
|
/**
|
|
1636
1638
|
* RequestFormHeader component for the fixed header in travel request forms.
|
|
1637
1639
|
*/
|
|
1638
1640
|
const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightContent, className, }) => {
|
|
1639
1641
|
const showPagination = currentPage !== undefined && totalPages !== undefined && totalPages > 1;
|
|
1640
|
-
return (jsxRuntime.jsx("header", { className: `${styles$
|
|
1642
|
+
return (jsxRuntime.jsx("header", { className: `${styles$l.header} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$l.headerContent, children: [jsxRuntime.jsxs("h1", { className: styles$l.headerTitle, children: [title, showPagination && (jsxRuntime.jsxs("span", { className: styles$l.pagination, children: ["(", currentPage, "/", totalPages, ")"] })), eventName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: styles$l.separator, children: "\u2013" }), jsxRuntime.jsx("span", { className: styles$l.eventName, children: eventName })] }))] }), rightContent && jsxRuntime.jsx("div", { className: styles$l.headerRight, children: rightContent })] }) }));
|
|
1641
1643
|
};
|
|
1642
1644
|
/**
|
|
1643
1645
|
* RequestFormFooter component for the fixed footer with navigation buttons.
|
|
@@ -1645,20 +1647,20 @@ const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightCon
|
|
|
1645
1647
|
const RequestFormFooter = ({ onPrevious, onNext, isFirstPage = false, isLastPage = false, isSubmitting = false, previousText, nextText, className, }) => {
|
|
1646
1648
|
const prevLabel = previousText || (isFirstPage ? 'Cancel' : 'Previous');
|
|
1647
1649
|
const nextLabel = nextText || (isLastPage ? 'Submit' : 'Next');
|
|
1648
|
-
return (jsxRuntime.jsx("footer", { className: `${styles$
|
|
1650
|
+
return (jsxRuntime.jsx("footer", { className: `${styles$l.footer} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$l.footerContent, children: [jsxRuntime.jsx("button", { type: "button", className: `${styles$l.button} ${styles$l.secondary}`, onClick: onPrevious, disabled: isSubmitting, children: prevLabel }), jsxRuntime.jsx("button", { type: "button", className: `${styles$l.button} ${styles$l.primary}`, onClick: onNext, disabled: isSubmitting, children: isSubmitting ? 'Submitting...' : nextLabel })] }) }));
|
|
1649
1651
|
};
|
|
1650
1652
|
/**
|
|
1651
1653
|
* RequestFormLayout organism for travel request forms.
|
|
1652
1654
|
* Provides a three-column layout with fixed header and footer.
|
|
1653
1655
|
*/
|
|
1654
1656
|
const RequestFormLayout = ({ header, sidebar, children, summary, footer, className, showSidebarOnMobile = false, }) => {
|
|
1655
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1657
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$l.layout} ${className || ''}`, children: [header, jsxRuntime.jsxs("div", { className: styles$l.body, children: [sidebar && (jsxRuntime.jsx("aside", { className: `${styles$l.sidebar} ${showSidebarOnMobile ? styles$l.showOnMobile : ''}`, children: jsxRuntime.jsx("div", { className: styles$l.sidebarContent, children: sidebar }) })), jsxRuntime.jsx("main", { className: styles$l.main, children: jsxRuntime.jsx("div", { className: styles$l.mainContent, children: children }) }), summary && (jsxRuntime.jsx("aside", { className: styles$l.summarySidebar, children: jsxRuntime.jsx("div", { className: styles$l.summaryContent, children: summary }) }))] }), footer] }));
|
|
1656
1658
|
};
|
|
1657
1659
|
RequestFormLayout.displayName = 'RequestFormLayout';
|
|
1658
1660
|
RequestFormHeader.displayName = 'RequestFormHeader';
|
|
1659
1661
|
RequestFormFooter.displayName = 'RequestFormFooter';
|
|
1660
1662
|
|
|
1661
|
-
var styles$
|
|
1663
|
+
var styles$k = {"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"};
|
|
1662
1664
|
|
|
1663
1665
|
const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false, hoverable = true, compact = false, loading = false, emptyMessage = 'No data available', onRowClick, className = '', }) => {
|
|
1664
1666
|
const [sortColumn, setSortColumn] = React.useState(null);
|
|
@@ -1696,12 +1698,12 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
1696
1698
|
}
|
|
1697
1699
|
return row[rowKey] ?? index;
|
|
1698
1700
|
};
|
|
1699
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1701
|
+
return (jsxRuntime.jsx("div", { className: `${styles$k.wrapper} ${className}`, children: jsxRuntime.jsxs("table", { className: `${styles$k.table} ${bordered ? styles$k.bordered : ''} ${striped ? styles$k.striped : ''} ${hoverable ? styles$k.hoverable : ''} ${compact ? styles$k.compact : ''}`, children: [jsxRuntime.jsx("thead", { className: styles$k.header, children: jsxRuntime.jsx("tr", { children: columns.map((column) => (jsxRuntime.jsx("th", { className: `${styles$k.headerCell} ${column.sortable ? styles$k.sortable : ''} ${styles$k[`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$k.headerContent, children: [column.label, column.sortable && (jsxRuntime.jsx("span", { className: styles$k.sortIcon, children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key))) }) }), jsxRuntime.jsx("tbody", { className: styles$k.body, children: loading ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles$k.loading, children: "Loading..." }) })) : sortedData.length === 0 ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles$k.empty, children: emptyMessage }) })) : (sortedData.map((row, rowIndex) => (jsxRuntime.jsx("tr", { className: `${styles$k.row} ${onRowClick ? styles$k.clickable : ''}`, onClick: () => onRowClick?.(row, rowIndex), children: columns.map((column) => (jsxRuntime.jsx("td", { className: `${styles$k.cell} ${styles$k[`align${(column.align || 'left').charAt(0).toUpperCase()}${(column.align || 'left').slice(1)}`]}`, children: column.render
|
|
1700
1702
|
? column.render(row[column.key], row, rowIndex)
|
|
1701
1703
|
: row[column.key] }, column.key))) }, getRowKey(row, rowIndex))))) })] }) }));
|
|
1702
1704
|
};
|
|
1703
1705
|
|
|
1704
|
-
var styles$
|
|
1706
|
+
var styles$j = {"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"};
|
|
1705
1707
|
|
|
1706
1708
|
const TEAM_GROUPS = [
|
|
1707
1709
|
{ label: 'All', key: undefined },
|
|
@@ -1735,26 +1737,26 @@ const TeamCard = ({ title = 'Administer Teams', icon, teams, onTeamSelect, class
|
|
|
1735
1737
|
return teams.filter(team => team.category === activeTab);
|
|
1736
1738
|
}, [teams, activeTab]);
|
|
1737
1739
|
const cardClasses = [
|
|
1738
|
-
styles$
|
|
1740
|
+
styles$j.card,
|
|
1739
1741
|
className,
|
|
1740
1742
|
].filter(Boolean).join(' ');
|
|
1741
|
-
return (jsxRuntime.jsxs("div", { className: cardClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1743
|
+
return (jsxRuntime.jsxs("div", { className: cardClasses, children: [jsxRuntime.jsxs("div", { className: styles$j.header, children: [jsxRuntime.jsx("span", { className: styles$j.icon, children: icon || jsxRuntime.jsx(UsersIcon, {}) }), jsxRuntime.jsx("h3", { className: styles$j.title, children: title })] }), jsxRuntime.jsxs("div", { className: styles$j.body, children: [jsxRuntime.jsx("div", { className: styles$j.tabs, children: TEAM_GROUPS.map(({ label, key }) => (jsxRuntime.jsx("button", { type: "button", onClick: () => setActiveTab(key), className: `${styles$j.tab} ${activeTab === key ? styles$j.tabActive : ''}`, children: label }, label))) }), jsxRuntime.jsxs("div", { className: styles$j.list, children: [filteredTeams.map((team) => (jsxRuntime.jsxs("button", { type: "button", className: styles$j.teamItem, onClick: () => onTeamSelect?.(team), children: [jsxRuntime.jsx("span", { className: styles$j.teamCode, style: { backgroundColor: getTeamColor(team.code) }, children: team.code }), jsxRuntime.jsx("span", { className: styles$j.teamName, children: team.description }), jsxRuntime.jsx("span", { className: styles$j.chevron, children: jsxRuntime.jsx(ChevronRightIcon, {}) })] }, team.id))), filteredTeams.length === 0 && (jsxRuntime.jsx("div", { className: styles$j.empty, children: "No teams found" }))] })] })] }));
|
|
1742
1744
|
};
|
|
1743
1745
|
TeamCard.displayName = 'TeamCard';
|
|
1744
1746
|
|
|
1745
|
-
var styles$
|
|
1747
|
+
var styles$i = {"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"};
|
|
1746
1748
|
|
|
1747
1749
|
/** Exact presentational counterpart of Hub's Team Schedule action controls. */
|
|
1748
|
-
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$
|
|
1750
|
+
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$i.actions, className].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$i.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$i.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$i.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$i.tripCount, children: [tripCount, " trips displayed"] })] }), isCompactView && (jsxRuntime.jsxs("div", { className: styles$i.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" })] }))] }));
|
|
1749
1751
|
|
|
1750
|
-
var styles$
|
|
1752
|
+
var styles$h = {"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"};
|
|
1751
1753
|
|
|
1752
1754
|
const DEFAULT_TRIP_HEADERS = ['', 'GTR', 'Trvl Start', 'Trvl End', 'Trip Name', 'Services', ''];
|
|
1753
1755
|
const DEFAULT_EVENT_HEADERS = ['', 'Event Date', 'Opponent/Host', 'Event Title', 'Hm/Awy', ''];
|
|
1754
1756
|
/** Hub's two-panel compact Team Schedule shell. Editable rows remain injectable. */
|
|
1755
|
-
const TeamScheduleCompactTable = ({ rows, tripHeaders = DEFAULT_TRIP_HEADERS, eventHeaders = DEFAULT_EVENT_HEADERS, onAddEvent, addEventDisabled = false, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$
|
|
1757
|
+
const TeamScheduleCompactTable = ({ rows, tripHeaders = DEFAULT_TRIP_HEADERS, eventHeaders = DEFAULT_EVENT_HEADERS, onAddEvent, addEventDisabled = false, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$h.schedule, className].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$h.headers, children: [jsxRuntime.jsx("div", { className: styles$h.tripHeader, children: tripHeaders.map((header, index) => jsxRuntime.jsx("div", { children: header }, index)) }), jsxRuntime.jsx("div", { className: styles$h.eventHeader, children: eventHeaders.map((header, index) => jsxRuntime.jsx("div", { children: header }, index)) })] }), jsxRuntime.jsx("div", { className: styles$h.table, children: !rows.length ? jsxRuntime.jsx("div", { className: styles$h.empty, children: "No data available." }) : rows.map((row) => (jsxRuntime.jsxs("div", { className: styles$h.row, children: [jsxRuntime.jsx("div", { className: styles$h.trip, children: row.trip }), jsxRuntime.jsx("div", { className: styles$h.events, children: row.events })] }, row.id))) }), jsxRuntime.jsx("div", { className: styles$h.addRow, children: jsxRuntime.jsxs("button", { type: "button", disabled: addEventDisabled, onClick: onAddEvent, children: ["Add Event ", jsxRuntime.jsx(PlusIcon$2, { size: 16 })] }) })] }));
|
|
1756
1758
|
|
|
1757
|
-
var styles$
|
|
1759
|
+
var styles$g = {"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"};
|
|
1758
1760
|
|
|
1759
1761
|
const parseLocalDate = (value) => {
|
|
1760
1762
|
if (!value)
|
|
@@ -1808,19 +1810,181 @@ const TeamScheduleExpandedTable = ({ rows, teamCode, onTripClick, emptyMessage =
|
|
|
1808
1810
|
setAscending(true);
|
|
1809
1811
|
}
|
|
1810
1812
|
};
|
|
1811
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1813
|
+
return (jsxRuntime.jsxs("div", { className: [styles$g.table, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx("div", { className: styles$g.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$g.empty, children: emptyMessage }) : jsxRuntime.jsx("div", { className: styles$g.body, children: sortedRows.map((row) => {
|
|
1812
1814
|
const values = [
|
|
1813
1815
|
teamCode ?? row.sportCode ?? '–',
|
|
1814
1816
|
formatTeamScheduleTravelDates(row.travelStartDate, row.travelEndDate),
|
|
1815
|
-
jsxRuntime.jsx("button", { type: "button", className: styles$
|
|
1817
|
+
jsxRuntime.jsx("button", { type: "button", className: styles$g.tripLink, onClick: () => onTripClick?.(row), children: row.tripName }),
|
|
1816
1818
|
row.airSegment,
|
|
1817
1819
|
row.groundSegment,
|
|
1818
1820
|
row.hotelSegment,
|
|
1819
1821
|
];
|
|
1820
|
-
return jsxRuntime.jsx("div", { className: styles$
|
|
1822
|
+
return jsxRuntime.jsx("div", { className: styles$g.row, children: values.map((value, index) => jsxRuntime.jsxs("div", { className: styles$g.cell, children: [jsxRuntime.jsxs("span", { className: styles$g.mobileLabel, children: [headers[index].icon, headers[index].label] }), jsxRuntime.jsx("div", { children: value || '–' })] }, headers[index].label)) }, row.masterTripGUID || row.tripName);
|
|
1821
1823
|
}) })] }));
|
|
1822
1824
|
};
|
|
1823
1825
|
|
|
1826
|
+
var styles$f = {"form":"TeamManagementForms-module_form__bF0qU","stack":"TeamManagementForms-module_stack__5XyWb","twoColumnGrid":"TeamManagementForms-module_twoColumnGrid__zKQM6","threeColumnGrid":"TeamManagementForms-module_threeColumnGrid__HiCa7","actions":"TeamManagementForms-module_actions__Y2lA0","sectionCard":"TeamManagementForms-module_sectionCard__IPv1F","blueSection":"TeamManagementForms-module_blueSection__FsxUA","sectionHeader":"TeamManagementForms-module_sectionHeader__rM4Oj","sectionIcon":"TeamManagementForms-module_sectionIcon__VkbW8","sectionHeading":"TeamManagementForms-module_sectionHeading__m8szw","badge":"TeamManagementForms-module_badge__IOqxe","optionalBadge":"TeamManagementForms-module_optionalBadge__PHhTy","completeBadge":"TeamManagementForms-module_completeBadge__ZLyyr","incompleteBadge":"TeamManagementForms-module_incompleteBadge__70kvV","middleNameField":"TeamManagementForms-module_middleNameField__43-7h","fieldHeader":"TeamManagementForms-module_fieldHeader__jG-Ej","fileField":"TeamManagementForms-module_fileField__JnFhb","instructions":"TeamManagementForms-module_instructions__qTJI6","sampleLink":"TeamManagementForms-module_sampleLink__L4qXl"};
|
|
1827
|
+
|
|
1828
|
+
const useManagedValues = (controlledValues, initialValues, onChange) => {
|
|
1829
|
+
const [internalValues, setInternalValues] = React.useState(initialValues);
|
|
1830
|
+
const currentValues = controlledValues ?? internalValues;
|
|
1831
|
+
const updateValues = (patch) => {
|
|
1832
|
+
const nextValues = { ...currentValues, ...patch };
|
|
1833
|
+
if (controlledValues === undefined)
|
|
1834
|
+
setInternalValues(nextValues);
|
|
1835
|
+
onChange?.(nextValues);
|
|
1836
|
+
};
|
|
1837
|
+
return [currentValues, updateValues];
|
|
1838
|
+
};
|
|
1839
|
+
const numericValue$1 = (value) => value === '' ? '' : Number(value);
|
|
1840
|
+
const FormShell = ({ ariaLabel, children, className = '', disabled = false, onCancel, onSubmit, showActions = true, values, }) => {
|
|
1841
|
+
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, showActions && (jsxRuntime.jsxs("div", { className: styles$f.actions, children: [jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, disabled: disabled, children: "Cancel" }), jsxRuntime.jsx(Button, { type: "submit", disabled: disabled, children: "Save" })] }))] }));
|
|
1842
|
+
if (!showActions)
|
|
1843
|
+
return jsxRuntime.jsx("div", { className: `${styles$f.form} ${className}`, children: content });
|
|
1844
|
+
return (jsxRuntime.jsx("form", { "aria-label": ariaLabel, className: `${styles$f.form} ${className}`, onSubmit: (event) => {
|
|
1845
|
+
event.preventDefault();
|
|
1846
|
+
onSubmit?.(values);
|
|
1847
|
+
}, children: content }));
|
|
1848
|
+
};
|
|
1849
|
+
const EMPTY_EQUIPMENT = {
|
|
1850
|
+
description: '',
|
|
1851
|
+
weight: '',
|
|
1852
|
+
quantity: '',
|
|
1853
|
+
height: '',
|
|
1854
|
+
width: '',
|
|
1855
|
+
depth: '',
|
|
1856
|
+
};
|
|
1857
|
+
const TeamEquipmentForm = ({ mode = 'Add', values, initialValues, onChange, onSubmit, onCancel, showActions = true, disabled = false, className, }) => {
|
|
1858
|
+
const [formValues, updateValues] = useManagedValues(values, { ...EMPTY_EQUIPMENT, ...initialValues }, onChange);
|
|
1859
|
+
return (jsxRuntime.jsx(FormShell, { ariaLabel: `${mode} equipment`, className: className, disabled: disabled, onCancel: onCancel, onSubmit: onSubmit, showActions: showActions, values: formValues, children: jsxRuntime.jsxs("div", { className: styles$f.stack, children: [jsxRuntime.jsx(Input, { label: "Item Name *", value: formValues.description, onChange: (event) => updateValues({ description: event.target.value }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsxs("div", { className: styles$f.twoColumnGrid, children: [jsxRuntime.jsx(Input, { label: "Weight (lbs) *", type: "number", min: "0", step: "0.1", value: formValues.weight, onChange: (event) => updateValues({ weight: numericValue$1(event.target.value) }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Quantity *", type: "number", min: "1", step: "1", value: formValues.quantity, onChange: (event) => updateValues({ quantity: numericValue$1(event.target.value) }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Height (inches)", type: "number", min: "0", step: "0.1", value: formValues.height, onChange: (event) => updateValues({ height: numericValue$1(event.target.value) }), disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Width (inches)", type: "number", min: "0", step: "0.1", value: formValues.width, onChange: (event) => updateValues({ width: numericValue$1(event.target.value) }), disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Depth (inches)", type: "number", min: "0", step: "0.1", value: formValues.depth, onChange: (event) => updateValues({ depth: numericValue$1(event.target.value) }), disabled: disabled, fullWidth: true })] })] }) }));
|
|
1860
|
+
};
|
|
1861
|
+
const TeamUserAccessForm = ({ options, values, initialValues, onChange, onSubmit, onCancel, showActions = true, disabled = false, className, }) => {
|
|
1862
|
+
const [formValues, updateValues] = useManagedValues(values, { userId: '', ...initialValues }, onChange);
|
|
1863
|
+
return (jsxRuntime.jsx(FormShell, { ariaLabel: "Add team access", className: className, disabled: disabled, onCancel: onCancel, onSubmit: onSubmit, showActions: showActions, values: formValues, children: jsxRuntime.jsx(Select, { label: "Available Users *", placeholder: "Select a school contact", options: options, value: formValues.userId, onChange: (event) => updateValues({ userId: event.target.value }), required: true, disabled: disabled, fullWidth: true }) }));
|
|
1864
|
+
};
|
|
1865
|
+
const DEFAULT_SUPPLIERS = {
|
|
1866
|
+
Air: [
|
|
1867
|
+
{ label: 'American Airlines', value: 'American Airlines' },
|
|
1868
|
+
{ label: 'Delta Air Lines', value: 'Delta Air Lines' },
|
|
1869
|
+
{ label: 'United Airlines', value: 'United Airlines' },
|
|
1870
|
+
],
|
|
1871
|
+
Car: [
|
|
1872
|
+
{ label: 'Enterprise', value: 'Enterprise' },
|
|
1873
|
+
{ label: 'Hertz', value: 'Hertz' },
|
|
1874
|
+
{ label: 'National', value: 'National' },
|
|
1875
|
+
],
|
|
1876
|
+
Hotel: [
|
|
1877
|
+
{ label: 'Hilton', value: 'Hilton' },
|
|
1878
|
+
{ label: 'Hyatt', value: 'Hyatt' },
|
|
1879
|
+
{ label: 'Marriott', value: 'Marriott' },
|
|
1880
|
+
],
|
|
1881
|
+
};
|
|
1882
|
+
const TeamProgramForm = ({ values, initialValues, onChange, onSubmit, onCancel, showActions = true, disabled = false, className, supplierOptions, }) => {
|
|
1883
|
+
const [formValues, updateValues] = useManagedValues(values, { type: 'Air', supplier: '', accountNumber: '', ...initialValues }, onChange);
|
|
1884
|
+
const options = { ...DEFAULT_SUPPLIERS, ...supplierOptions };
|
|
1885
|
+
return (jsxRuntime.jsx(FormShell, { ariaLabel: "Add loyalty program", className: className, disabled: disabled, onCancel: onCancel, onSubmit: onSubmit, showActions: showActions, values: formValues, children: jsxRuntime.jsxs("div", { className: styles$f.stack, children: [jsxRuntime.jsx(Select, { label: "Type", options: ['Air', 'Car', 'Hotel'].map((type) => ({ label: type, value: type })), value: formValues.type, onChange: (event) => updateValues({ type: event.target.value, supplier: '' }), disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Select, { label: "Company *", placeholder: "Select a company", options: options[formValues.type] ?? [], value: formValues.supplier, onChange: (event) => updateValues({ supplier: event.target.value }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Program Number *", value: formValues.accountNumber, onChange: (event) => updateValues({ accountNumber: event.target.value }), required: true, disabled: disabled, fullWidth: true })] }) }));
|
|
1886
|
+
};
|
|
1887
|
+
const EMPTY_ROSTER_MEMBER = {
|
|
1888
|
+
portalUserId: '',
|
|
1889
|
+
firstName: '',
|
|
1890
|
+
middleName: '',
|
|
1891
|
+
noMiddleName: false,
|
|
1892
|
+
lastName: '',
|
|
1893
|
+
travelerType: '',
|
|
1894
|
+
birthDate: '',
|
|
1895
|
+
gender: '',
|
|
1896
|
+
weight: '',
|
|
1897
|
+
passportNumber: '',
|
|
1898
|
+
knownTravelerNumber: '',
|
|
1899
|
+
dhsRedressNumber: '',
|
|
1900
|
+
airline: '',
|
|
1901
|
+
frequentFlyerNumber: '',
|
|
1902
|
+
specialRequests: '',
|
|
1903
|
+
};
|
|
1904
|
+
const DEFAULT_TRAVELER_TYPES = [
|
|
1905
|
+
'Band Member',
|
|
1906
|
+
'Cheerleader',
|
|
1907
|
+
'Coach',
|
|
1908
|
+
'Mascot',
|
|
1909
|
+
'Non-Athlete (General)',
|
|
1910
|
+
'Student Athlete',
|
|
1911
|
+
'Trainer/Manager',
|
|
1912
|
+
].map((label) => ({ label, value: label }));
|
|
1913
|
+
const DEFAULT_AIRLINES = [
|
|
1914
|
+
{ label: 'American Airlines', value: 'American Airlines' },
|
|
1915
|
+
{ label: 'Delta Air Lines', value: 'Delta Air Lines' },
|
|
1916
|
+
{ label: 'Southwest Airlines', value: 'Southwest Airlines' },
|
|
1917
|
+
{ label: 'United Airlines', value: 'United Airlines' },
|
|
1918
|
+
];
|
|
1919
|
+
const localDateString = (date) => {
|
|
1920
|
+
const year = date.getFullYear();
|
|
1921
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
1922
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
1923
|
+
return `${year}-${month}-${day}`;
|
|
1924
|
+
};
|
|
1925
|
+
const SectionBadge = ({ complete, optional, label }) => {
|
|
1926
|
+
if (optional)
|
|
1927
|
+
return jsxRuntime.jsx("span", { className: `${styles$f.badge} ${styles$f.optionalBadge}`, children: "Optional" });
|
|
1928
|
+
if (complete)
|
|
1929
|
+
return jsxRuntime.jsxs("span", { className: `${styles$f.badge} ${styles$f.completeBadge}`, children: [jsxRuntime.jsx(CheckIcon$2, { size: 12 }), "Complete"] });
|
|
1930
|
+
return jsxRuntime.jsxs("span", { className: `${styles$f.badge} ${styles$f.incompleteBadge}`, children: [jsxRuntime.jsx(WarningIcon$1, { size: 12 }), label ?? 'Incomplete'] });
|
|
1931
|
+
};
|
|
1932
|
+
const SectionCard = ({ icon, title, subtitle, badge, blue = false, children, }) => (jsxRuntime.jsxs("section", { className: `${styles$f.sectionCard} ${blue ? styles$f.blueSection : ''}`, children: [jsxRuntime.jsxs("div", { className: styles$f.sectionHeader, children: [jsxRuntime.jsx("div", { className: styles$f.sectionIcon, children: icon }), jsxRuntime.jsxs("div", { className: styles$f.sectionHeading, children: [jsxRuntime.jsx("h3", { children: title }), jsxRuntime.jsx("p", { children: subtitle })] }), badge] }), children] }));
|
|
1933
|
+
const TeamRosterMemberForm = ({ mode = 'Add', values, initialValues, onChange, onSubmit, onCancel, showActions = true, disabled = false, className, portalUsers = [], airlineOptions = DEFAULT_AIRLINES, travelerTypeOptions = DEFAULT_TRAVELER_TYPES, }) => {
|
|
1934
|
+
const [formValues, updateValues] = useManagedValues(values, { ...EMPTY_ROSTER_MEMBER, ...initialValues }, onChange);
|
|
1935
|
+
const minBirthDate = new Date();
|
|
1936
|
+
minBirthDate.setFullYear(minBirthDate.getFullYear() - 130);
|
|
1937
|
+
const identityComplete = Boolean(formValues.firstName.trim()
|
|
1938
|
+
&& formValues.lastName.trim()
|
|
1939
|
+
&& (formValues.noMiddleName || formValues.middleName.trim())
|
|
1940
|
+
&& formValues.travelerType);
|
|
1941
|
+
const secureFlightComplete = Boolean(formValues.birthDate && formValues.gender && Number(formValues.weight) >= 1);
|
|
1942
|
+
return (jsxRuntime.jsxs(FormShell, { ariaLabel: `${mode} team member`, className: className, disabled: disabled, onCancel: onCancel, onSubmit: onSubmit, showActions: showActions, values: formValues, children: [mode === 'Add' && (jsxRuntime.jsx(SectionCard, { icon: jsxRuntime.jsx(UsersIcon$1, { size: 20 }), title: "Create from Portal User", subtitle: "Search an existing portal user to copy their traveler details", badge: jsxRuntime.jsx(SectionBadge, { optional: true }), blue: true, children: jsxRuntime.jsx(Select, { "aria-label": "Create from Portal User", placeholder: "Search portal users", options: portalUsers, value: formValues.portalUserId, onChange: (event) => {
|
|
1943
|
+
const portalUserId = event.target.value;
|
|
1944
|
+
const selectedUser = portalUsers.find((option) => String(option.value) === portalUserId);
|
|
1945
|
+
updateValues({ ...selectedUser?.traveler, portalUserId });
|
|
1946
|
+
}, disabled: disabled, fullWidth: true }) })), jsxRuntime.jsxs(SectionCard, { icon: jsxRuntime.jsx(UserIcon, { size: 20 }), title: "Identity", subtitle: "Name as it appears on government ID", badge: jsxRuntime.jsx(SectionBadge, { complete: identityComplete }), children: [jsxRuntime.jsxs("div", { className: styles$f.threeColumnGrid, children: [jsxRuntime.jsx(Input, { label: "First Name *", value: formValues.firstName, onChange: (event) => updateValues({ firstName: event.target.value }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsxs("div", { className: styles$f.middleNameField, children: [jsxRuntime.jsxs("div", { className: styles$f.fieldHeader, children: [jsxRuntime.jsx("label", { htmlFor: "team-middle-name", children: "Middle Name" }), jsxRuntime.jsx(Checkbox, { label: "None", size: "sm", checked: formValues.noMiddleName, onChange: (event) => updateValues({
|
|
1947
|
+
noMiddleName: event.target.checked,
|
|
1948
|
+
middleName: event.target.checked ? '' : formValues.middleName,
|
|
1949
|
+
}), disabled: disabled })] }), jsxRuntime.jsx(Input, { id: "team-middle-name", "aria-label": "Middle Name", placeholder: formValues.noMiddleName ? 'None' : '', value: formValues.middleName, onChange: (event) => updateValues({ middleName: event.target.value }), required: !formValues.noMiddleName, disabled: disabled || formValues.noMiddleName, fullWidth: true })] }), jsxRuntime.jsx(Input, { label: "Last Name *", value: formValues.lastName, onChange: (event) => updateValues({ lastName: event.target.value }), required: true, disabled: disabled, fullWidth: true })] }), jsxRuntime.jsx(Select, { label: "Traveler Type *", placeholder: "Select traveler type", options: travelerTypeOptions, value: formValues.travelerType, onChange: (event) => updateValues({ travelerType: event.target.value }), required: true, disabled: disabled, fullWidth: true })] }), jsxRuntime.jsx(SectionCard, { icon: jsxRuntime.jsx(LockIcon$1, { size: 20 }), title: "Secure Flight", subtitle: "TSA-required for every air booking", badge: jsxRuntime.jsx(SectionBadge, { complete: secureFlightComplete, label: !formValues.weight || Number(formValues.weight) < 1 ? 'Add weight' : undefined }), children: jsxRuntime.jsxs("div", { className: styles$f.threeColumnGrid, children: [jsxRuntime.jsx(Input, { label: "Date of Birth *", type: "date", min: localDateString(minBirthDate), max: localDateString(new Date()), value: formValues.birthDate, onChange: (event) => updateValues({ birthDate: event.target.value }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Select, { label: "Gender *", placeholder: "Select gender", options: ['Male', 'Female', 'Unspecified (X)'].map((label) => ({ label, value: label })), value: formValues.gender, onChange: (event) => updateValues({ gender: event.target.value }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Weight (lbs) *", type: "number", min: "1", value: formValues.weight, onChange: (event) => updateValues({ weight: numericValue$1(event.target.value) }), required: true, disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Passport No.", placeholder: "Add for intl. travel", value: formValues.passportNumber, onChange: (event) => updateValues({ passportNumber: event.target.value.toUpperCase() }), disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Known Traveler No.", placeholder: "KTN", value: formValues.knownTravelerNumber, onChange: (event) => updateValues({ knownTravelerNumber: event.target.value.toUpperCase() }), disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "DHS Redress No.", placeholder: "Add if issued", value: formValues.dhsRedressNumber, onChange: (event) => updateValues({ dhsRedressNumber: event.target.value.toUpperCase() }), disabled: disabled, fullWidth: true })] }) }), mode === 'Add' && (jsxRuntime.jsx(SectionCard, { icon: jsxRuntime.jsx(PlaneIcon$4, { size: 20 }), title: "Frequent Flyer", subtitle: "Airline loyalty program details", badge: jsxRuntime.jsx(SectionBadge, { optional: true }), children: jsxRuntime.jsxs("div", { className: styles$f.twoColumnGrid, children: [jsxRuntime.jsx(Select, { label: "Airline", placeholder: "Select airline", options: airlineOptions, value: formValues.airline, onChange: (event) => updateValues({ airline: event.target.value }), disabled: disabled, fullWidth: true }), jsxRuntime.jsx(Input, { label: "Frequent Flyer Number", value: formValues.frequentFlyerNumber, onChange: (event) => updateValues({ frequentFlyerNumber: event.target.value }), disabled: disabled, fullWidth: true })] }) })), jsxRuntime.jsx(SectionCard, { icon: jsxRuntime.jsx(InfoIcon$1, { size: 20 }), title: "Special Requests", subtitle: "Dietary, seating, accessibility, rooming", badge: jsxRuntime.jsx(SectionBadge, { optional: true }), children: jsxRuntime.jsx(Textarea, { "aria-label": "Special Requests", placeholder: "Add anything the travel desk should know\u2026", value: formValues.specialRequests, onChange: (event) => updateValues({ specialRequests: event.target.value }), rows: 3, disabled: disabled, fullWidth: true }) })] }));
|
|
1950
|
+
};
|
|
1951
|
+
const IMPORT_COPY = {
|
|
1952
|
+
equipment: {
|
|
1953
|
+
sample: 'Sports Equipment Sample.xlsx',
|
|
1954
|
+
instructions: [
|
|
1955
|
+
'All fields must be in the exact format and order of the sample spreadsheet.',
|
|
1956
|
+
'Weight is in pounds and dimensions are in inches, whole numbers only.',
|
|
1957
|
+
'Delete equipment that is not traveling before uploading a new sheet.',
|
|
1958
|
+
'The spreadsheet adds equipment; it does not overwrite existing data.',
|
|
1959
|
+
],
|
|
1960
|
+
},
|
|
1961
|
+
roster: {
|
|
1962
|
+
sample: 'Sports Manifest Sample.xlsx',
|
|
1963
|
+
instructions: [
|
|
1964
|
+
'All fields must match the exact format and order of the sample spreadsheet.',
|
|
1965
|
+
'Traveler Type must be valid and spelled correctly.',
|
|
1966
|
+
'Date of Birth must be MM/DD/YYYY and Gender must be Male or Female.',
|
|
1967
|
+
'The spreadsheet adds travelers; it does not overwrite existing data.',
|
|
1968
|
+
],
|
|
1969
|
+
},
|
|
1970
|
+
'teamworks-roster': {
|
|
1971
|
+
sample: 'Teamworks Spreadsheet Sample.xlsx',
|
|
1972
|
+
instructions: [
|
|
1973
|
+
'Follow the exact format and order of the Teamworks sample spreadsheet.',
|
|
1974
|
+
'Date of Birth must be MM/DD/YYYY.',
|
|
1975
|
+
],
|
|
1976
|
+
},
|
|
1977
|
+
};
|
|
1978
|
+
const TeamImportForm = ({ kind, onSubmit, onCancel, disabled = false, className = '' }) => {
|
|
1979
|
+
const [file, setFile] = React.useState(null);
|
|
1980
|
+
const copy = IMPORT_COPY[kind];
|
|
1981
|
+
return (jsxRuntime.jsxs("form", { "aria-label": `Import ${kind}`, className: `${styles$f.form} ${className}`, onSubmit: (event) => {
|
|
1982
|
+
event.preventDefault();
|
|
1983
|
+
if (file)
|
|
1984
|
+
onSubmit?.(file);
|
|
1985
|
+
}, children: [jsxRuntime.jsx("ol", { className: styles$f.instructions, children: copy.instructions.map((instruction, index) => jsxRuntime.jsxs("li", { children: [index + 1, ". ", instruction] }, instruction)) }), jsxRuntime.jsx("a", { className: styles$f.sampleLink, href: `/${copy.sample}`, download: true, children: copy.sample }), jsxRuntime.jsxs("label", { className: styles$f.fileField, children: [jsxRuntime.jsx(UploadIcon, { size: 24 }), jsxRuntime.jsx("span", { children: file?.name ?? 'Choose an Excel spreadsheet' }), jsxRuntime.jsx("input", { "aria-label": "Spreadsheet file", type: "file", accept: ".xlsx,.xls", onChange: (event) => setFile(event.target.files?.[0] ?? null), required: true, disabled: disabled })] }), jsxRuntime.jsxs("div", { className: styles$f.actions, children: [jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, disabled: disabled, children: "Cancel" }), jsxRuntime.jsx(Button, { type: "submit", disabled: disabled || !file, children: "Import" })] })] }));
|
|
1986
|
+
};
|
|
1987
|
+
|
|
1824
1988
|
var styles$e = {"grid":"TravelSummaryMetrics-module_grid__RqAU9"};
|
|
1825
1989
|
|
|
1826
1990
|
const numericValue = (value) => {
|
|
@@ -2336,30 +2500,23 @@ const NotFoundPage = ({ errorCode = '404', title = 'Page Not Found', message = '
|
|
|
2336
2500
|
};
|
|
2337
2501
|
NotFoundPage.displayName = 'NotFoundPage';
|
|
2338
2502
|
|
|
2339
|
-
var styles$3 = {"page":"TeamManagementPage-module_page__iRm2r","overview":"TeamManagementPage-module_overview__HDnLX","overviewHeader":"TeamManagementPage-module_overviewHeader__OYpB8","overviewGrid":"TeamManagementPage-module_overviewGrid__u8VZy","contactsColumn":"TeamManagementPage-module_contactsColumn__g-gm8","
|
|
2503
|
+
var styles$3 = {"page":"TeamManagementPage-module_page__iRm2r","overview":"TeamManagementPage-module_overview__HDnLX","overviewHeader":"TeamManagementPage-module_overviewHeader__OYpB8","overviewGrid":"TeamManagementPage-module_overviewGrid__u8VZy","contactsColumn":"TeamManagementPage-module_contactsColumn__g-gm8","body":"TeamManagementPage-module_body__10aka","main":"TeamManagementPage-module_main__-lFtT","sidebar":"TeamManagementPage-module_sidebar__u8syG","footer":"TeamManagementPage-module_footer__he9G0"};
|
|
2340
2504
|
|
|
2341
|
-
const RosterIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }), jsxRuntime.jsx("circle", { cx: "9", cy: "7", r: "4" }), jsxRuntime.jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }), jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })] }));
|
|
2342
|
-
const ContactsIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }), jsxRuntime.jsx("polyline", { points: "22,6 12,13 2,6" })] }));
|
|
2343
|
-
const PreferencesIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "3" }), jsxRuntime.jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })] }));
|
|
2344
|
-
const ProgramsIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "4", rx: "1" }), jsxRuntime.jsx("rect", { x: "3", y: "10", width: "18", height: "4", rx: "1" }), jsxRuntime.jsx("rect", { x: "3", y: "16", width: "18", height: "4", rx: "1" })] }));
|
|
2345
2505
|
const DEFAULT_TABS = [
|
|
2346
|
-
{ id: '
|
|
2347
|
-
{ id: '
|
|
2348
|
-
{ id: '
|
|
2349
|
-
{ id: '
|
|
2506
|
+
{ id: 'profile', label: 'Profile' },
|
|
2507
|
+
{ id: 'roster', label: 'Roster' },
|
|
2508
|
+
{ id: 'equipment', label: 'Equipment' },
|
|
2509
|
+
{ id: 'user-access', label: 'User Access' },
|
|
2350
2510
|
];
|
|
2351
2511
|
/**
|
|
2352
2512
|
* TeamManagementPage - Layout for team management with tabbed navigation
|
|
2353
2513
|
*/
|
|
2354
|
-
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = '
|
|
2514
|
+
const TeamManagementPage = ({ variant = 'team', title = 'Team Management', teamPanel, contactsTitle = 'School Contacts', contactAlert, contacts, header, tabs = DEFAULT_TABS, activeTab = 'profile', onTabChange, children, sidebar, footer, className = '', }) => {
|
|
2355
2515
|
const pageClasses = [styles$3.page, className].filter(Boolean).join(' ');
|
|
2356
2516
|
if (variant === 'overview') {
|
|
2357
2517
|
return (jsxRuntime.jsxs("div", { className: [styles$3.overview, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx("header", { className: styles$3.overviewHeader, children: jsxRuntime.jsx("h1", { children: title }) }), jsxRuntime.jsxs("div", { className: styles$3.overviewGrid, children: [jsxRuntime.jsx("aside", { children: teamPanel }), jsxRuntime.jsxs("section", { className: styles$3.contactsColumn, children: [jsxRuntime.jsx("h2", { children: contactsTitle }), contactAlert, contacts] })] })] }));
|
|
2358
2518
|
}
|
|
2359
|
-
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [header
|
|
2360
|
-
styles$3.tabButton,
|
|
2361
|
-
activeTab === tab.id ? styles$3.active : '',
|
|
2362
|
-
].filter(Boolean).join(' '), onClick: () => onTabChange?.(tab.id), "aria-selected": activeTab === tab.id, children: [tab.icon && jsxRuntime.jsx("span", { className: styles$3.tabIcon, children: tab.icon }), jsxRuntime.jsx("span", { children: tab.label }), tab.badge !== undefined && tab.badge > 0 && (jsxRuntime.jsx("span", { className: styles$3.tabBadge, children: tab.badge }))] }, tab.id))) }), jsxRuntime.jsxs("div", { className: styles$3.body, children: [jsxRuntime.jsx("main", { className: styles$3.main, children: children }), sidebar && (jsxRuntime.jsx("aside", { className: styles$3.sidebar, children: sidebar }))] }), footer && jsxRuntime.jsx("div", { className: styles$3.footer, children: footer })] }));
|
|
2519
|
+
return (jsxRuntime.jsxs("div", { className: pageClasses, children: [header, jsxRuntime.jsx(TeamSubMenu, { tabs: tabs, activeTab: activeTab, onTabChange: onTabChange }), sidebar ? jsxRuntime.jsxs("div", { className: styles$3.body, children: [jsxRuntime.jsx("main", { className: styles$3.main, children: children }), sidebar && (jsxRuntime.jsx("aside", { className: styles$3.sidebar, children: sidebar }))] }) : children, footer && jsxRuntime.jsx("div", { className: styles$3.footer, children: footer })] }));
|
|
2363
2520
|
};
|
|
2364
2521
|
TeamManagementPage.displayName = 'TeamManagementPage';
|
|
2365
2522
|
|
|
@@ -2566,14 +2723,19 @@ exports.SupplierTypeToggle = SupplierTypeToggle;
|
|
|
2566
2723
|
exports.Table = Table;
|
|
2567
2724
|
exports.Tag = Tag;
|
|
2568
2725
|
exports.TeamCard = TeamCard;
|
|
2726
|
+
exports.TeamEquipmentForm = TeamEquipmentForm;
|
|
2569
2727
|
exports.TeamHeader = TeamHeader;
|
|
2728
|
+
exports.TeamImportForm = TeamImportForm;
|
|
2570
2729
|
exports.TeamManagementPage = TeamManagementPage;
|
|
2730
|
+
exports.TeamProgramForm = TeamProgramForm;
|
|
2731
|
+
exports.TeamRosterMemberForm = TeamRosterMemberForm;
|
|
2571
2732
|
exports.TeamScheduleActions = TeamScheduleActions;
|
|
2572
2733
|
exports.TeamScheduleCompactTable = TeamScheduleCompactTable;
|
|
2573
2734
|
exports.TeamScheduleExpandedTable = TeamScheduleExpandedTable;
|
|
2574
2735
|
exports.TeamSchedulePage = TeamSchedulePage;
|
|
2575
2736
|
exports.TeamSubMenu = TeamSubMenu;
|
|
2576
2737
|
exports.TeamTravelCalendarPage = TeamTravelCalendarPage;
|
|
2738
|
+
exports.TeamUserAccessForm = TeamUserAccessForm;
|
|
2577
2739
|
exports.Textarea = Textarea;
|
|
2578
2740
|
exports.Timepicker = Timepicker;
|
|
2579
2741
|
exports.Title = Title;
|
|
@@ -2590,6 +2752,7 @@ exports.TripDetailPage = TripDetailPage;
|
|
|
2590
2752
|
exports.TripSegment = TripSegment;
|
|
2591
2753
|
exports.TripTable = TripTable;
|
|
2592
2754
|
exports.TypeIcon = TypeIcon;
|
|
2755
|
+
exports.UploadIcon = UploadIcon;
|
|
2593
2756
|
exports.UserIcon = UserIcon;
|
|
2594
2757
|
exports.UsersIcon = UsersIcon$1;
|
|
2595
2758
|
exports.WarningIcon = WarningIcon$1;
|