@shortstravelmgmt/component-lib 0.1.7 → 0.1.9
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 +119 -17
- package/dist/index.esm.js +678 -398
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +688 -402
- 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
|
@@ -9,12 +9,12 @@ const createIcon = (children, displayName) => {
|
|
|
9
9
|
return Icon;
|
|
10
10
|
};
|
|
11
11
|
// Travel / segment type icons
|
|
12
|
-
const PlaneIcon$
|
|
13
|
-
const CarIcon$
|
|
14
|
-
const HotelIcon$
|
|
12
|
+
const PlaneIcon$3 = createIcon(jsxRuntime.jsx("path", { d: "M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z" }), 'PlaneIcon');
|
|
13
|
+
const CarIcon$1 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2" }), jsxRuntime.jsx("circle", { cx: "7", cy: "17", r: "2" }), jsxRuntime.jsx("path", { d: "M9 17h6" }), jsxRuntime.jsx("circle", { cx: "17", cy: "17", r: "2" })] }), 'CarIcon');
|
|
14
|
+
const HotelIcon$3 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M10 22v-6.57" }), jsxRuntime.jsx("path", { d: "M12 11h.01" }), jsxRuntime.jsx("path", { d: "M12 7h.01" }), jsxRuntime.jsx("path", { d: "M14 15.43V22" }), jsxRuntime.jsx("path", { d: "M15 16a5 5 0 0 0-6 0" }), jsxRuntime.jsx("path", { d: "M16 11h.01" }), jsxRuntime.jsx("path", { d: "M16 7h.01" }), jsxRuntime.jsx("path", { d: "M8 11h.01" }), jsxRuntime.jsx("path", { d: "M8 7h.01" }), jsxRuntime.jsx("rect", { x: "4", y: "2", width: "16", height: "20", rx: "2" })] }), 'HotelIcon');
|
|
15
15
|
const LimoIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8" }), jsxRuntime.jsx("path", { d: "M7 14h.01" }), jsxRuntime.jsx("path", { d: "M17 14h.01" }), jsxRuntime.jsx("rect", { width: "18", height: "8", x: "3", y: "10", rx: "2" }), jsxRuntime.jsx("path", { d: "M5 18v2" }), jsxRuntime.jsx("path", { d: "M19 18v2" })] }), 'LimoIcon');
|
|
16
16
|
const RailIcon = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M8 3.1V7a4 4 0 0 0 8 0V3.1" }), jsxRuntime.jsx("path", { d: "m9 15-1-1" }), jsxRuntime.jsx("path", { d: "m15 15 1-1" }), jsxRuntime.jsx("path", { d: "M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z" }), jsxRuntime.jsx("path", { d: "m8 19-2 3" }), jsxRuntime.jsx("path", { d: "m16 19 2 3" })] }), 'RailIcon');
|
|
17
|
-
const BusIcon$
|
|
17
|
+
const BusIcon$2 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M8 6v6" }), jsxRuntime.jsx("path", { d: "M15 6v6" }), jsxRuntime.jsx("path", { d: "M2 12h19.6" }), jsxRuntime.jsx("path", { d: "M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3" }), jsxRuntime.jsx("circle", { cx: "7", cy: "18", r: "2" }), jsxRuntime.jsx("path", { d: "M9 18h5" }), jsxRuntime.jsx("circle", { cx: "16", cy: "18", r: "2" })] }), 'BusIcon');
|
|
18
18
|
// Control / chrome icons
|
|
19
19
|
const SearchIcon$1 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }), jsxRuntime.jsx("path", { d: "m21 21-4.3-4.3" })] }), 'SearchIcon');
|
|
20
20
|
const ChevronDownIcon$1 = createIcon(jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" }), 'ChevronDownIcon');
|
|
@@ -61,12 +61,12 @@ const LockIcon$1 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
|
61
61
|
const TrashIcon$2 = createIcon(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M3 6h18" }), jsxRuntime.jsx("path", { d: "M8 6V4h8v2" }), jsxRuntime.jsx("path", { d: "m19 6-1 15H6L5 6" }), jsxRuntime.jsx("path", { d: "M10 11v5" }), jsxRuntime.jsx("path", { d: "M14 11v5" })] }), 'TrashIcon');
|
|
62
62
|
// Export all icons as a map for dynamic access
|
|
63
63
|
const Icons = {
|
|
64
|
-
Plane: PlaneIcon$
|
|
65
|
-
Car: CarIcon$
|
|
66
|
-
Hotel: HotelIcon$
|
|
64
|
+
Plane: PlaneIcon$3,
|
|
65
|
+
Car: CarIcon$1,
|
|
66
|
+
Hotel: HotelIcon$3,
|
|
67
67
|
Limo: LimoIcon,
|
|
68
68
|
Rail: RailIcon,
|
|
69
|
-
Bus: BusIcon$
|
|
69
|
+
Bus: BusIcon$2,
|
|
70
70
|
Search: SearchIcon$1,
|
|
71
71
|
ChevronDown: ChevronDownIcon$1,
|
|
72
72
|
ChevronUp: ChevronUpIcon,
|
|
@@ -110,7 +110,7 @@ const Icons = {
|
|
|
110
110
|
Trash: TrashIcon$2,
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
var styles$
|
|
113
|
+
var styles$1c = {"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"};
|
|
114
114
|
|
|
115
115
|
const variantIcons = {
|
|
116
116
|
primary: LightbulbIcon,
|
|
@@ -120,10 +120,10 @@ const variantIcons = {
|
|
|
120
120
|
};
|
|
121
121
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
122
122
|
const IconComponent = variantIcons[variant];
|
|
123
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
123
|
+
return (jsxRuntime.jsx("div", { className: `${styles$1c.alert} ${styles$1c[variant]} ${className}`, role: "alert", children: jsxRuntime.jsxs("div", { className: styles$1c.content, children: [jsxRuntime.jsx(IconComponent, { className: styles$1c.icon, size: 20 }), jsxRuntime.jsxs("div", { className: styles$1c.body, children: [title && jsxRuntime.jsx("h4", { className: styles$1c.title, children: title }), jsxRuntime.jsx("div", { className: styles$1c.message, children: children })] }), dismissible && onDismiss && (jsxRuntime.jsx("button", { type: "button", onClick: onDismiss, className: styles$1c.dismissButton, "aria-label": "Dismiss alert", children: jsxRuntime.jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
-
var styles$
|
|
126
|
+
var styles$1b = {"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"};
|
|
127
127
|
|
|
128
128
|
const getInitials = (name) => {
|
|
129
129
|
const parts = name.trim().split(/\s+/);
|
|
@@ -138,43 +138,43 @@ const getInitials = (name) => {
|
|
|
138
138
|
const Avatar = ({ src, alt, initials, name, size = 'md', className = '', ...props }) => {
|
|
139
139
|
const displayInitials = initials || (name ? getInitials(name) : '?');
|
|
140
140
|
const classNames = [
|
|
141
|
-
styles$
|
|
142
|
-
styles$
|
|
141
|
+
styles$1b.avatar,
|
|
142
|
+
styles$1b[size],
|
|
143
143
|
className,
|
|
144
144
|
]
|
|
145
145
|
.filter(Boolean)
|
|
146
146
|
.join(' ');
|
|
147
|
-
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$1b.image })) : (jsxRuntime.jsx("span", { className: styles$1b.initials, children: displayInitials })) }));
|
|
148
148
|
};
|
|
149
149
|
Avatar.displayName = 'Avatar';
|
|
150
150
|
const AvatarGroup = ({ max = 4, className = '', children, ...props }) => {
|
|
151
151
|
const childArray = React.Children.toArray(children);
|
|
152
152
|
const visibleChildren = childArray.slice(0, max);
|
|
153
153
|
const remainingCount = childArray.length - max;
|
|
154
|
-
const classNames = [styles$
|
|
155
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsxRuntime.jsx("div", { className: `${styles$
|
|
154
|
+
const classNames = [styles$1b.group, className].filter(Boolean).join(' ');
|
|
155
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsxRuntime.jsx("div", { className: `${styles$1b.avatar} ${styles$1b.md} ${styles$1b.overflow}`, children: jsxRuntime.jsxs("span", { className: styles$1b.initials, children: ["+", remainingCount] }) }))] }));
|
|
156
156
|
};
|
|
157
157
|
AvatarGroup.displayName = 'AvatarGroup';
|
|
158
158
|
|
|
159
|
-
var styles$
|
|
159
|
+
var styles$1a = {"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"};
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
162
|
* Badge component for status indicators, labels, and tags.
|
|
163
163
|
*/
|
|
164
164
|
const Badge = ({ variant = 'default', size = 'md', dot = false, className = '', children, ...props }) => {
|
|
165
165
|
const classNames = [
|
|
166
|
-
styles$
|
|
167
|
-
styles$
|
|
168
|
-
styles$
|
|
166
|
+
styles$1a.badge,
|
|
167
|
+
styles$1a[variant],
|
|
168
|
+
styles$1a[size],
|
|
169
169
|
className,
|
|
170
170
|
]
|
|
171
171
|
.filter(Boolean)
|
|
172
172
|
.join(' ');
|
|
173
|
-
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$1a.dot }), children] }));
|
|
174
174
|
};
|
|
175
175
|
Badge.displayName = 'Badge';
|
|
176
176
|
|
|
177
|
-
var styles$
|
|
177
|
+
var styles$19 = {"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"};
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Primary button component for user interactions.
|
|
@@ -182,21 +182,21 @@ var styles$18 = {"button":"Button-module_button__xDdzH","sm":"Button-module_sm__
|
|
|
182
182
|
*/
|
|
183
183
|
const Button = React.forwardRef(({ variant = 'primary', size = 'md', fullWidth = false, loading = false, leftIcon, rightIcon, square = false, className = '', disabled, children, ...props }, ref) => {
|
|
184
184
|
const classNames = [
|
|
185
|
-
styles$
|
|
186
|
-
styles$
|
|
187
|
-
styles$
|
|
188
|
-
fullWidth ? styles$
|
|
189
|
-
square ? styles$
|
|
190
|
-
loading ? styles$
|
|
185
|
+
styles$19.button,
|
|
186
|
+
styles$19[variant],
|
|
187
|
+
styles$19[size],
|
|
188
|
+
fullWidth ? styles$19.fullWidth : '',
|
|
189
|
+
square ? styles$19.square : '',
|
|
190
|
+
loading ? styles$19.loading : '',
|
|
191
191
|
className,
|
|
192
192
|
]
|
|
193
193
|
.filter(Boolean)
|
|
194
194
|
.join(' ');
|
|
195
|
-
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$19.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$19.icon, children: leftIcon }), children && jsxRuntime.jsx("span", { className: styles$19.content, children: children }), !loading && rightIcon && jsxRuntime.jsx("span", { className: styles$19.icon, children: rightIcon })] }));
|
|
196
196
|
});
|
|
197
197
|
Button.displayName = 'Button';
|
|
198
198
|
|
|
199
|
-
var styles$
|
|
199
|
+
var styles$18 = {"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"};
|
|
200
200
|
|
|
201
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" }) }));
|
|
202
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" }) }));
|
|
@@ -209,10 +209,10 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
209
209
|
const helperId = `${checkboxId}-helper`;
|
|
210
210
|
const errorId = `${checkboxId}-error`;
|
|
211
211
|
const wrapperClasses = [
|
|
212
|
-
styles$
|
|
213
|
-
styles$
|
|
214
|
-
disabled ? styles$
|
|
215
|
-
error ? styles$
|
|
212
|
+
styles$18.wrapper,
|
|
213
|
+
styles$18[size],
|
|
214
|
+
disabled ? styles$18.disabled : '',
|
|
215
|
+
error ? styles$18.hasError : '',
|
|
216
216
|
className,
|
|
217
217
|
].filter(Boolean).join(' ');
|
|
218
218
|
// Handle indeterminate state via ref
|
|
@@ -228,13 +228,13 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
228
228
|
ref.current = node;
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
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$18.label, children: [jsxRuntime.jsxs("div", { className: styles$18.checkboxWrapper, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", id: checkboxId, className: styles$18.input, disabled: disabled, checked: checked, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
232
232
|
.filter(Boolean)
|
|
233
|
-
.join(' ') || undefined, ...props }), jsxRuntime.jsx("span", { className: styles$
|
|
233
|
+
.join(' ') || undefined, ...props }), jsxRuntime.jsx("span", { className: styles$18.checkbox, children: indeterminate ? jsxRuntime.jsx(IndeterminateIcon, {}) : jsxRuntime.jsx(CheckIcon$1, {}) })] }), label && jsxRuntime.jsx("span", { className: styles$18.labelText, children: label })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$18.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$18.helperText, children: helperText }))] }));
|
|
234
234
|
});
|
|
235
235
|
Checkbox.displayName = 'Checkbox';
|
|
236
236
|
|
|
237
|
-
var styles$
|
|
237
|
+
var styles$17 = {"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"};
|
|
238
238
|
|
|
239
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" })] }));
|
|
240
240
|
/**
|
|
@@ -246,23 +246,23 @@ const Datepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
246
246
|
const helperId = `${inputId}-helper`;
|
|
247
247
|
const errorId = `${inputId}-error`;
|
|
248
248
|
const wrapperClasses = [
|
|
249
|
-
styles$
|
|
250
|
-
fullWidth ? styles$
|
|
249
|
+
styles$17.wrapper,
|
|
250
|
+
fullWidth ? styles$17.fullWidth : '',
|
|
251
251
|
className,
|
|
252
252
|
].filter(Boolean).join(' ');
|
|
253
253
|
const inputWrapperClasses = [
|
|
254
|
-
styles$
|
|
255
|
-
styles$
|
|
256
|
-
error ? styles$
|
|
257
|
-
disabled ? styles$
|
|
254
|
+
styles$17.inputWrapper,
|
|
255
|
+
styles$17[size],
|
|
256
|
+
error ? styles$17.error : '',
|
|
257
|
+
disabled ? styles$17.disabled : '',
|
|
258
258
|
].filter(Boolean).join(' ');
|
|
259
|
-
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$17.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: styles$17.icon, children: jsxRuntime.jsx(CalendarIcon, {}) }), jsxRuntime.jsx("input", { ref: ref, type: "date", id: inputId, className: styles$17.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
260
260
|
.filter(Boolean)
|
|
261
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$
|
|
261
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$17.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$17.helperText, children: helperText }))] }));
|
|
262
262
|
});
|
|
263
263
|
Datepicker.displayName = 'Datepicker';
|
|
264
264
|
|
|
265
|
-
var styles$
|
|
265
|
+
var styles$16 = {"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"};
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* Input component for text entry.
|
|
@@ -270,45 +270,45 @@ var styles$15 = {"wrapper":"Input-module_wrapper__-8ija","fullWidth":"Input-modu
|
|
|
270
270
|
const Input = React.forwardRef(({ size = 'md', label, helperText, error, leftIcon, rightIcon, fullWidth = false, className = '', id, disabled, ...props }, ref) => {
|
|
271
271
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
272
272
|
const wrapperClasses = [
|
|
273
|
-
styles$
|
|
274
|
-
fullWidth ? styles$
|
|
273
|
+
styles$16.wrapper,
|
|
274
|
+
fullWidth ? styles$16.fullWidth : '',
|
|
275
275
|
className,
|
|
276
276
|
]
|
|
277
277
|
.filter(Boolean)
|
|
278
278
|
.join(' ');
|
|
279
279
|
const inputWrapperClasses = [
|
|
280
|
-
styles$
|
|
281
|
-
styles$
|
|
282
|
-
error ? styles$
|
|
283
|
-
disabled ? styles$
|
|
280
|
+
styles$16.inputWrapper,
|
|
281
|
+
styles$16[size],
|
|
282
|
+
error ? styles$16.error : '',
|
|
283
|
+
disabled ? styles$16.disabled : '',
|
|
284
284
|
]
|
|
285
285
|
.filter(Boolean)
|
|
286
286
|
.join(' ');
|
|
287
|
-
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$16.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: styles$16.icon, children: leftIcon }), jsxRuntime.jsx("input", { ref: ref, id: inputId, className: styles$16.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsxRuntime.jsx("span", { className: styles$16.icon, children: rightIcon })] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$16.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${inputId}-helper`, className: styles$16.helperText, children: helperText }))] }));
|
|
288
288
|
});
|
|
289
289
|
Input.displayName = 'Input';
|
|
290
290
|
const Textarea = React.forwardRef(({ size = 'md', label, helperText, error, fullWidth = false, className = '', id, disabled, rows = 4, ...props }, ref) => {
|
|
291
291
|
const textareaId = id || `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
292
292
|
const wrapperClasses = [
|
|
293
|
-
styles$
|
|
294
|
-
fullWidth ? styles$
|
|
293
|
+
styles$16.wrapper,
|
|
294
|
+
fullWidth ? styles$16.fullWidth : '',
|
|
295
295
|
className,
|
|
296
296
|
]
|
|
297
297
|
.filter(Boolean)
|
|
298
298
|
.join(' ');
|
|
299
299
|
const textareaClasses = [
|
|
300
|
-
styles$
|
|
301
|
-
styles$
|
|
302
|
-
error ? styles$
|
|
303
|
-
disabled ? styles$
|
|
300
|
+
styles$16.textarea,
|
|
301
|
+
styles$16[size],
|
|
302
|
+
error ? styles$16.error : '',
|
|
303
|
+
disabled ? styles$16.disabled : '',
|
|
304
304
|
]
|
|
305
305
|
.filter(Boolean)
|
|
306
306
|
.join(' ');
|
|
307
|
-
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$16.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$16.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${textareaId}-helper`, className: styles$16.helperText, children: helperText }))] }));
|
|
308
308
|
});
|
|
309
309
|
Textarea.displayName = 'Textarea';
|
|
310
310
|
|
|
311
|
-
var styles$
|
|
311
|
+
var styles$15 = {"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"};
|
|
312
312
|
|
|
313
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" }) }));
|
|
314
314
|
/**
|
|
@@ -318,15 +318,15 @@ const WarningIcon = () => (jsxRuntime.jsx("svg", { width: "24", height: "24", vi
|
|
|
318
318
|
const Metric = ({ value, label, prefix, suffix, dark = false, onClick, className = '', warning = false, }) => {
|
|
319
319
|
const displayValue = value !== undefined && !isNaN(parseFloat(String(value))) ? value : 0;
|
|
320
320
|
return (jsxRuntime.jsx("div", { className: `
|
|
321
|
-
${styles$
|
|
322
|
-
${dark ? styles$
|
|
323
|
-
${onClick ? styles$
|
|
321
|
+
${styles$15.metric}
|
|
322
|
+
${dark ? styles$15.dark : ''}
|
|
323
|
+
${onClick ? styles$15.clickable : ''}
|
|
324
324
|
${className}
|
|
325
|
-
`, onClick: onClick, children: value !== undefined && (jsxRuntime.jsxs("div", { className: styles$
|
|
325
|
+
`, onClick: onClick, children: value !== undefined && (jsxRuntime.jsxs("div", { className: styles$15.content, children: [jsxRuntime.jsxs("div", { className: styles$15.valueRow, children: [jsxRuntime.jsxs("div", { className: styles$15.valueContainer, children: [prefix && jsxRuntime.jsx("span", { className: styles$15.prefix, children: prefix }), jsxRuntime.jsx("span", { className: styles$15.value, children: displayValue }), suffix && jsxRuntime.jsx("span", { className: styles$15.suffix, children: suffix })] }), warning && (jsxRuntime.jsx("div", { className: styles$15.warningIcon, children: jsxRuntime.jsx(WarningIcon, {}) }))] }), jsxRuntime.jsx("div", { className: styles$15.label, children: label })] })) }));
|
|
326
326
|
};
|
|
327
327
|
Metric.displayName = 'Metric';
|
|
328
328
|
|
|
329
|
-
var styles$
|
|
329
|
+
var styles$14 = {"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"};
|
|
330
330
|
|
|
331
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" }) }));
|
|
332
332
|
/**
|
|
@@ -338,16 +338,16 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
338
338
|
const helperId = `${selectId}-helper`;
|
|
339
339
|
const errorId = `${selectId}-error`;
|
|
340
340
|
const wrapperClasses = [
|
|
341
|
-
styles$
|
|
342
|
-
fullWidth ? styles$
|
|
341
|
+
styles$14.wrapper,
|
|
342
|
+
fullWidth ? styles$14.fullWidth : '',
|
|
343
343
|
className,
|
|
344
344
|
].filter(Boolean).join(' ');
|
|
345
345
|
const selectWrapperClasses = [
|
|
346
|
-
styles$
|
|
347
|
-
styles$
|
|
348
|
-
error ? styles$
|
|
349
|
-
disabled ? styles$
|
|
350
|
-
leftIcon ? styles$
|
|
346
|
+
styles$14.selectWrapper,
|
|
347
|
+
styles$14[size],
|
|
348
|
+
error ? styles$14.error : '',
|
|
349
|
+
disabled ? styles$14.disabled : '',
|
|
350
|
+
leftIcon ? styles$14.hasLeftIcon : '',
|
|
351
351
|
].filter(Boolean).join(' ');
|
|
352
352
|
const renderOptions = () => {
|
|
353
353
|
// Render grouped options
|
|
@@ -360,19 +360,19 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
360
360
|
}
|
|
361
361
|
return null;
|
|
362
362
|
};
|
|
363
|
-
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$14.label, children: label })), jsxRuntime.jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: styles$14.leftIcon, children: leftIcon }), jsxRuntime.jsxs("select", { ref: ref, id: selectId, className: styles$14.select, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
364
364
|
.filter(Boolean)
|
|
365
|
-
.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$14.chevron, children: jsxRuntime.jsx(ChevronDownIcon, {}) })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$14.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$14.helperText, children: helperText }))] }));
|
|
366
366
|
});
|
|
367
367
|
Select.displayName = 'Select';
|
|
368
368
|
|
|
369
|
-
var styles$
|
|
369
|
+
var styles$13 = {"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"};
|
|
370
370
|
|
|
371
371
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
372
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
372
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$13.spinner} ${styles$13[size]} ${className}`, role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxRuntime.jsxs("svg", { className: styles$13.svg, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: styles$13.track, cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.jsx("path", { className: styles$13.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$13.srOnly, children: label })] }));
|
|
373
373
|
};
|
|
374
374
|
|
|
375
|
-
var styles$
|
|
375
|
+
var styles$12 = {"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"};
|
|
376
376
|
|
|
377
377
|
const statusLabels = {
|
|
378
378
|
ticketed: 'Ticketed',
|
|
@@ -384,20 +384,20 @@ const statusLabels = {
|
|
|
384
384
|
};
|
|
385
385
|
const StatusBadge = ({ status, label, className, }) => {
|
|
386
386
|
const displayLabel = label || statusLabels[status] || status;
|
|
387
|
-
return (jsxRuntime.jsx("span", { className: `${styles$
|
|
387
|
+
return (jsxRuntime.jsx("span", { className: `${styles$12.badge} ${styles$12[status]} ${className || ''}`, "data-status": status, children: displayLabel }));
|
|
388
388
|
};
|
|
389
389
|
|
|
390
|
-
var styles$
|
|
390
|
+
var styles$11 = {"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"};
|
|
391
391
|
|
|
392
392
|
const Tag = ({ children, variant = 'default', size = 'md', removable = false, onRemove, onClick, className = '', style, }) => {
|
|
393
393
|
const isClickable = Boolean(onClick);
|
|
394
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
394
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$11.tag} ${styles$11[variant]} ${styles$11[size]} ${isClickable ? styles$11.clickable : ''} ${className}`, onClick: onClick, style: style, role: isClickable ? 'button' : undefined, tabIndex: isClickable ? 0 : undefined, children: [jsxRuntime.jsx("span", { className: styles$11.content, children: children }), removable && (jsxRuntime.jsx("button", { type: "button", className: styles$11.removeButton, onClick: (e) => {
|
|
395
395
|
e.stopPropagation();
|
|
396
396
|
onRemove?.();
|
|
397
|
-
}, "aria-label": "Remove", children: jsxRuntime.jsx("svg", { className: styles$
|
|
397
|
+
}, "aria-label": "Remove", children: jsxRuntime.jsx("svg", { className: styles$11.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" }) }) }))] }));
|
|
398
398
|
};
|
|
399
399
|
|
|
400
|
-
var styles
|
|
400
|
+
var styles$10 = {"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"};
|
|
401
401
|
|
|
402
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" })] }));
|
|
403
403
|
/**
|
|
@@ -409,34 +409,34 @@ const Timepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
409
409
|
const helperId = `${inputId}-helper`;
|
|
410
410
|
const errorId = `${inputId}-error`;
|
|
411
411
|
const wrapperClasses = [
|
|
412
|
-
styles
|
|
413
|
-
fullWidth ? styles
|
|
412
|
+
styles$10.wrapper,
|
|
413
|
+
fullWidth ? styles$10.fullWidth : '',
|
|
414
414
|
className,
|
|
415
415
|
].filter(Boolean).join(' ');
|
|
416
416
|
const inputWrapperClasses = [
|
|
417
|
-
styles
|
|
418
|
-
styles
|
|
419
|
-
error ? styles
|
|
420
|
-
disabled ? styles
|
|
417
|
+
styles$10.inputWrapper,
|
|
418
|
+
styles$10[size],
|
|
419
|
+
error ? styles$10.error : '',
|
|
420
|
+
disabled ? styles$10.disabled : '',
|
|
421
421
|
].filter(Boolean).join(' ');
|
|
422
|
-
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$10.label, children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: styles$10.icon, children: jsxRuntime.jsx(ClockIcon, {}) }), jsxRuntime.jsx("input", { ref: ref, type: "time", id: inputId, className: styles$10.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
423
423
|
.filter(Boolean)
|
|
424
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles
|
|
424
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: styles$10.errorText, children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: styles$10.helperText, children: helperText }))] }));
|
|
425
425
|
});
|
|
426
426
|
Timepicker.displayName = 'Timepicker';
|
|
427
427
|
|
|
428
|
-
var styles
|
|
428
|
+
var styles$$ = {"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"};
|
|
429
429
|
|
|
430
430
|
/**
|
|
431
431
|
* Title component for page headings.
|
|
432
432
|
* Large, prominent text for page titles.
|
|
433
433
|
*/
|
|
434
434
|
const Title = ({ children, weight = 'light', className = '', }) => {
|
|
435
|
-
return (jsxRuntime.jsx("h1", { className: `${styles
|
|
435
|
+
return (jsxRuntime.jsx("h1", { className: `${styles$$.title} ${styles$$[weight]} ${className}`, children: children }));
|
|
436
436
|
};
|
|
437
437
|
Title.displayName = 'Title';
|
|
438
438
|
|
|
439
|
-
var styles$
|
|
439
|
+
var styles$_ = {"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"};
|
|
440
440
|
|
|
441
441
|
const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, labelPosition = 'right', className = '', 'aria-label': ariaLabel, }) => {
|
|
442
442
|
const handleClick = () => {
|
|
@@ -450,14 +450,14 @@ const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, label
|
|
|
450
450
|
onChange?.(!checked);
|
|
451
451
|
}
|
|
452
452
|
};
|
|
453
|
-
const toggleElement = (jsxRuntime.jsx("div", { className: `${styles$
|
|
453
|
+
const toggleElement = (jsxRuntime.jsx("div", { className: `${styles$_.toggle} ${styles$_[size]} ${checked ? styles$_.checked : ''} ${disabled ? styles$_.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$_.thumb }) }));
|
|
454
454
|
if (label) {
|
|
455
|
-
return (jsxRuntime.jsxs("label", { className: `${styles$
|
|
455
|
+
return (jsxRuntime.jsxs("label", { className: `${styles$_.wrapper} ${disabled ? styles$_.wrapperDisabled : ''}`, children: [labelPosition === 'left' && jsxRuntime.jsx("span", { className: styles$_.label, children: label }), toggleElement, labelPosition === 'right' && jsxRuntime.jsx("span", { className: styles$_.label, children: label })] }));
|
|
456
456
|
}
|
|
457
457
|
return toggleElement;
|
|
458
458
|
};
|
|
459
459
|
|
|
460
|
-
var styles$
|
|
460
|
+
var styles$Z = {"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"};
|
|
461
461
|
|
|
462
462
|
const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay = 200, disabled = false, className = '', }) => {
|
|
463
463
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
@@ -521,10 +521,10 @@ const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay
|
|
|
521
521
|
}
|
|
522
522
|
};
|
|
523
523
|
}, []);
|
|
524
|
-
return (jsxRuntime.jsxs("div", { ref: triggerRef, className: `${styles$
|
|
524
|
+
return (jsxRuntime.jsxs("div", { ref: triggerRef, className: `${styles$Z.wrapper} ${className}`, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, children: [children, isVisible && content && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: `${styles$Z.tooltip} ${styles$Z[actualPosition]} ${styles$Z[variant]}`, role: "tooltip", children: [jsxRuntime.jsx("div", { className: styles$Z.content, children: content }), jsxRuntime.jsx("div", { className: `${styles$Z.arrow} ${styles$Z[`arrow${actualPosition.charAt(0).toUpperCase()}${actualPosition.slice(1)}`]}` })] }))] }));
|
|
525
525
|
};
|
|
526
526
|
|
|
527
|
-
var styles$
|
|
527
|
+
var styles$Y = {"service":"TravelServiceIcon-module_service__-4EZb","code":"TravelServiceIcon-module_code__vElzI","multi":"TravelServiceIcon-module_multi__nqZLM","multiIndicator":"TravelServiceIcon-module_multiIndicator__KJF1L"};
|
|
528
528
|
|
|
529
529
|
// Airline brand colors
|
|
530
530
|
const vendorColors = {
|
|
@@ -564,16 +564,16 @@ const TravelServiceIcon = ({ type, vendor, mode = 'icon', size = 28, multi = fal
|
|
|
564
564
|
const colors = mode === 'icon' && vendorColors[vendorKey]
|
|
565
565
|
? vendorColors[vendorKey]
|
|
566
566
|
: typeColors$1[type] || typeColors$1.U;
|
|
567
|
-
return (jsxRuntime.jsxs("span", { className: `${styles$
|
|
567
|
+
return (jsxRuntime.jsxs("span", { className: `${styles$Y.service} ${multi ? styles$Y.multi : ''} ${className || ''}`, style: {
|
|
568
568
|
width: size,
|
|
569
569
|
height: size,
|
|
570
570
|
backgroundColor: colors.bg,
|
|
571
571
|
color: colors.fg,
|
|
572
572
|
fontSize: size * 0.4,
|
|
573
|
-
}, 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$Y.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$Y.multiIndicator, children: "+" })] }));
|
|
574
574
|
};
|
|
575
575
|
|
|
576
|
-
var styles$
|
|
576
|
+
var styles$X = {"icon":"TypeIcon-module_icon__WUL-x"};
|
|
577
577
|
|
|
578
578
|
const typeLabels = {
|
|
579
579
|
A: 'Air',
|
|
@@ -606,7 +606,7 @@ const typeIcons = {
|
|
|
606
606
|
const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
607
607
|
const colors = typeColors[type] || typeColors.U;
|
|
608
608
|
const label = typeLabels[type] || 'Unknown';
|
|
609
|
-
return (jsxRuntime.jsx("span", { className: `${styles$
|
|
609
|
+
return (jsxRuntime.jsx("span", { className: `${styles$X.icon} ${className || ''}`, style: {
|
|
610
610
|
width: size,
|
|
611
611
|
height: size,
|
|
612
612
|
backgroundColor: colors.bg,
|
|
@@ -614,7 +614,7 @@ const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
|
614
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 }) }));
|
|
615
615
|
};
|
|
616
616
|
|
|
617
|
-
var styles$
|
|
617
|
+
var styles$W = {"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"};
|
|
618
618
|
|
|
619
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" }) }));
|
|
620
620
|
/**
|
|
@@ -632,21 +632,21 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
632
632
|
}
|
|
633
633
|
onOpenChange?.(newOpen);
|
|
634
634
|
};
|
|
635
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
635
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$W.accordion} ${className || ''}`, children: [jsxRuntime.jsxs("div", { className: styles$W.headerContainer, children: [jsxRuntime.jsx("button", { type: "button", className: styles$W.toggle, onClick: handleToggle, "aria-expanded": isOpen, children: jsxRuntime.jsx(CaretIcon, { className: `${styles$W.caret} ${isOpen ? styles$W.open : ''}` }) }), jsxRuntime.jsx("div", { className: styles$W.header, children: header })] }), jsxRuntime.jsxs("div", { className: `${styles$W.body} ${isOpen ? styles$W.visible : styles$W.hidden}`, "aria-hidden": !isOpen, children: [showTimeline && (jsxRuntime.jsxs("div", { className: styles$W.timeline, children: [jsxRuntime.jsx("div", { className: styles$W.line }), jsxRuntime.jsx(CaretIcon, { className: styles$W.endCaret })] })), jsxRuntime.jsx("div", { className: styles$W.content, children: children })] })] }));
|
|
636
636
|
};
|
|
637
637
|
Accordion.displayName = 'Accordion';
|
|
638
638
|
|
|
639
|
-
var styles$
|
|
639
|
+
var styles$V = {"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"};
|
|
640
640
|
|
|
641
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" })] }));
|
|
642
|
-
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$V.selector, className].filter(Boolean).join(' '), role: "group", "aria-label": ariaLabel, children: options.map((option) => {
|
|
643
643
|
const active = option.id === value;
|
|
644
644
|
const accessibleName = option.alt ?? option.label ?? option.id;
|
|
645
645
|
return (jsxRuntime.jsxs("button", { type: "button", title: accessibleName, "aria-label": accessibleName, "aria-pressed": active, disabled: disabled, className: [
|
|
646
|
-
styles$
|
|
647
|
-
styles$
|
|
648
|
-
option.label ? styles$
|
|
649
|
-
active ? styles$
|
|
646
|
+
styles$V.item,
|
|
647
|
+
styles$V[size],
|
|
648
|
+
option.label ? styles$V.withLabel : styles$V.iconOnly,
|
|
649
|
+
active ? styles$V.active : '',
|
|
650
650
|
].filter(Boolean).join(' '), onClick: () => onChange?.(option.id), children: [option.icon, option.label && jsxRuntime.jsx("span", { children: option.label })] }, option.id));
|
|
651
651
|
}) }));
|
|
652
652
|
const CalendarViewSelector = ({ value, onChange, ...props }) => (jsxRuntime.jsx(SegmentedSelector, { ...props, ariaLabel: "Calendar view", value: value, onChange: (nextValue) => onChange?.(nextValue), options: [
|
|
@@ -659,7 +659,7 @@ const CalendarTypeSelector = ({ value, onChange, ...props }) => (jsxRuntime.jsx(
|
|
|
659
659
|
{ id: 'due_dates', label: 'Due Dates' },
|
|
660
660
|
] }));
|
|
661
661
|
|
|
662
|
-
var styles$
|
|
662
|
+
var styles$U = {"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"};
|
|
663
663
|
|
|
664
664
|
const Dropdown = ({ label, children, alignment = 'left', width, className = '', disabled = false, }) => {
|
|
665
665
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -682,14 +682,14 @@ const Dropdown = ({ label, children, alignment = 'left', width, className = '',
|
|
|
682
682
|
setIsOpen(false);
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
|
-
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
685
|
+
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$U.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$U.arrow} ${isOpen ? styles$U.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$U.menu} ${styles$U[alignment]} ${isOpen ? styles$U.menuOpen : ''}`, style: width ? { minWidth: `${width}px` } : undefined, role: "menu", children: children })] }));
|
|
686
686
|
};
|
|
687
687
|
const DropdownItem = ({ children, onClick, disabled = false, icon, className = '', }) => {
|
|
688
|
-
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$
|
|
688
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$U.item} ${disabled ? styles$U.itemDisabled : ''} ${className}`, onClick: onClick, disabled: disabled, role: "menuitem", children: [icon && jsxRuntime.jsx("span", { className: styles$U.itemIcon, children: icon }), children] }));
|
|
689
689
|
};
|
|
690
690
|
Dropdown.Item = DropdownItem;
|
|
691
691
|
|
|
692
|
-
var styles$
|
|
692
|
+
var styles$T = {"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"};
|
|
693
693
|
|
|
694
694
|
const FilterChip = ({ label, value, options, onChange, searchable = false, searchPlaceholder = 'Search...', infoMessage, className, }) => {
|
|
695
695
|
const [open, setOpen] = React.useState(false);
|
|
@@ -726,13 +726,13 @@ const FilterChip = ({ label, value, options, onChange, searchable = false, searc
|
|
|
726
726
|
const selectedOption = options.find(opt => opt.value === value);
|
|
727
727
|
const displayValue = selectedOption?.label || value;
|
|
728
728
|
const isDefault = value === options[0]?.value;
|
|
729
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: `${styles$
|
|
729
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: `${styles$T.wrapper} ${className || ''}`, children: [jsxRuntime.jsxs("button", { type: "button", className: `${styles$T.chip} ${open ? styles$T.open : ''} ${!isDefault ? styles$T.active : ''}`, onClick: () => setOpen(!open), "aria-haspopup": "listbox", "aria-expanded": open, children: [jsxRuntime.jsxs("span", { className: styles$T.label, children: [label, ":"] }), jsxRuntime.jsx("span", { className: styles$T.value, children: displayValue }), jsxRuntime.jsx("svg", { className: `${styles$T.chevron} ${open ? styles$T.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$T.dropdown, role: "listbox", children: [infoMessage && (jsxRuntime.jsxs("div", { className: styles$T.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$T.searchWrapper, children: [jsxRuntime.jsxs("svg", { className: styles$T.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$T.searchInput, autoFocus: true })] })), jsxRuntime.jsxs("div", { className: styles$T.optionsList, children: [filteredOptions.map((option) => (jsxRuntime.jsx("button", { type: "button", role: "option", "aria-selected": option.value === value, className: `${styles$T.option} ${option.value === value ? styles$T.selected : ''}`, onClick: () => {
|
|
730
730
|
onChange(option.value);
|
|
731
731
|
setOpen(false);
|
|
732
|
-
}, 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$T.noResults, children: "No results found" }))] })] }))] }));
|
|
733
733
|
};
|
|
734
734
|
|
|
735
|
-
var styles$
|
|
735
|
+
var styles$S = {"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"};
|
|
736
736
|
|
|
737
737
|
const FormField = React.forwardRef(({ label, helperText, error, required = false, hideLabel = false, className, as = 'input', inputProps, textareaProps, children, }, ref) => {
|
|
738
738
|
const generatedId = React.useId();
|
|
@@ -751,15 +751,15 @@ const FormField = React.forwardRef(({ label, helperText, error, required = false
|
|
|
751
751
|
return children;
|
|
752
752
|
}
|
|
753
753
|
if (as === 'textarea') {
|
|
754
|
-
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$S.inputElement} ${hasError ? styles$S.inputError : ''} ${textareaProps?.className || ''}` }));
|
|
755
755
|
}
|
|
756
|
-
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$S.inputElement} ${hasError ? styles$S.inputError : ''} ${inputProps?.className || ''}` }));
|
|
757
757
|
};
|
|
758
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
758
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$S.formField} ${className || ''}`, children: [jsxRuntime.jsxs("label", { htmlFor: inputId, className: `${styles$S.label} ${hideLabel ? styles$S.visuallyHidden : ''}`, children: [label, required && jsxRuntime.jsx("span", { className: styles$S.required, "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsxRuntime.jsx("p", { id: helperId, className: styles$S.helperText, children: helperText })), hasError && (jsxRuntime.jsx("p", { id: errorId, className: styles$S.errorText, role: "alert", children: error }))] }));
|
|
759
759
|
});
|
|
760
760
|
FormField.displayName = 'FormField';
|
|
761
761
|
|
|
762
|
-
var styles$
|
|
762
|
+
var styles$R = {"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"};
|
|
763
763
|
|
|
764
764
|
/**
|
|
765
765
|
* FormRow component for laying out form fields in a responsive grid.
|
|
@@ -769,16 +769,16 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
769
769
|
const childCount = React.Children.count(children);
|
|
770
770
|
const colCount = columns || (childCount > 4 ? 4 : childCount);
|
|
771
771
|
return (jsxRuntime.jsx("div", { className: `
|
|
772
|
-
${styles$
|
|
773
|
-
${styles$
|
|
774
|
-
${styles$
|
|
775
|
-
${stackOnMobile ? styles$
|
|
772
|
+
${styles$R.row}
|
|
773
|
+
${styles$R[`cols${colCount}`]}
|
|
774
|
+
${styles$R[`gap${gap}`]}
|
|
775
|
+
${stackOnMobile ? styles$R.stackMobile : ''}
|
|
776
776
|
${className || ''}
|
|
777
777
|
`, children: children }));
|
|
778
778
|
};
|
|
779
779
|
FormRow.displayName = 'FormRow';
|
|
780
780
|
|
|
781
|
-
var styles$
|
|
781
|
+
var styles$Q = {"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-"};
|
|
782
782
|
|
|
783
783
|
/**
|
|
784
784
|
* FormSection component for grouping related form fields with a title and icon.
|
|
@@ -787,45 +787,45 @@ var styles$P = {"section":"FormSection-module_section__T17Vg","header":"FormSect
|
|
|
787
787
|
const FormSection = ({ title, icon, status, disabled = false, children, className, id, }) => {
|
|
788
788
|
const isSubmitted = status === 'submitted';
|
|
789
789
|
const isDisabled = disabled || isSubmitted;
|
|
790
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
790
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$Q.section} ${className || ''}`, id: id, children: [jsxRuntime.jsxs("div", { className: styles$Q.header, children: [icon && jsxRuntime.jsx("span", { className: styles$Q.icon, children: icon }), jsxRuntime.jsx("h2", { className: styles$Q.title, children: title })] }), jsxRuntime.jsxs("fieldset", { disabled: isDisabled, className: `${styles$Q.fieldset} ${isDisabled ? styles$Q.disabled : ''}`, children: [status && (jsxRuntime.jsxs("div", { className: styles$Q.status, children: [jsxRuntime.jsx("span", { className: styles$Q.statusLabel, children: "Status:" }), jsxRuntime.jsx("span", { className: `${styles$Q.statusValue} ${styles$Q[status]}`, children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
791
791
|
};
|
|
792
792
|
FormSection.displayName = 'FormSection';
|
|
793
793
|
|
|
794
|
-
var styles$
|
|
794
|
+
var styles$P = {"stack":"FormStack-module_stack__SURjY","sm":"FormStack-module_sm__rt3tb","md":"FormStack-module_md__SRDmc","lg":"FormStack-module_lg__jql3j"};
|
|
795
795
|
|
|
796
796
|
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
797
|
-
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: [styles$
|
|
797
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: [styles$P.stack, styles$P[gap], className].filter(Boolean).join(' '), children: children }));
|
|
798
798
|
|
|
799
|
-
var styles$
|
|
799
|
+
var styles$O = {"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"};
|
|
800
800
|
|
|
801
801
|
const ManifestViewToggle = ({ view, onView, paxCount, eqCount, locked, className = '', }) => {
|
|
802
802
|
const tabs = [
|
|
803
803
|
{ key: 'passengers', label: 'Passengers', count: paxCount, icon: UsersIcon$1 },
|
|
804
804
|
{ key: 'equipment', label: 'Equipment', count: eqCount, icon: CubeIcon },
|
|
805
805
|
];
|
|
806
|
-
return (jsxRuntime.jsx("div", { className: [styles$
|
|
806
|
+
return (jsxRuntime.jsx("div", { className: [styles$O.toggle, locked ? styles$O.lockedToggle : '', className].filter(Boolean).join(' '), role: "tablist", "aria-label": "Manifest view", children: tabs.map((tab) => {
|
|
807
807
|
const active = view === tab.key;
|
|
808
808
|
const Icon = locked ? LockIcon$1 : tab.icon;
|
|
809
809
|
return (jsxRuntime.jsxs("button", { type: "button", role: "tab", "aria-selected": active, onClick: () => onView(tab.key), className: [
|
|
810
|
-
styles$
|
|
811
|
-
active ? styles$
|
|
812
|
-
locked ? styles$
|
|
813
|
-
locked && active ? styles$
|
|
814
|
-
].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Icon, { size: 16 }), tab.label, jsxRuntime.jsx("span", { className: styles$
|
|
810
|
+
styles$O.tab,
|
|
811
|
+
active ? styles$O.active : '',
|
|
812
|
+
locked ? styles$O.locked : '',
|
|
813
|
+
locked && active ? styles$O.lockedActive : '',
|
|
814
|
+
].filter(Boolean).join(' '), children: [jsxRuntime.jsx(Icon, { size: 16 }), tab.label, jsxRuntime.jsx("span", { className: styles$O.count, children: tab.count })] }, tab.key));
|
|
815
815
|
}) }));
|
|
816
816
|
};
|
|
817
817
|
|
|
818
|
-
var styles$
|
|
818
|
+
var styles$N = {"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"};
|
|
819
819
|
|
|
820
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, }) => {
|
|
821
|
-
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$N.icon} ${styles$N[`icon${size.charAt(0).toUpperCase()}${size.slice(1)}`]}`, "aria-hidden": "true", children: icon }), !collapsed && (jsxRuntime.jsx("span", { className: styles$N.label, children: label })), badge !== undefined && !collapsed && (jsxRuntime.jsx(Badge, { variant: badgeVariant, className: styles$N.badge, children: badge }))] }));
|
|
822
822
|
const classNames = [
|
|
823
|
-
styles$
|
|
824
|
-
styles$
|
|
825
|
-
styles$
|
|
826
|
-
active ? styles$
|
|
827
|
-
collapsed ? styles$
|
|
828
|
-
disabled ? styles$
|
|
823
|
+
styles$N.navItem,
|
|
824
|
+
styles$N[variant],
|
|
825
|
+
styles$N[size],
|
|
826
|
+
active ? styles$N.active : '',
|
|
827
|
+
collapsed ? styles$N.collapsed : '',
|
|
828
|
+
disabled ? styles$N.disabled : '',
|
|
829
829
|
className || '',
|
|
830
830
|
].filter(Boolean).join(' ');
|
|
831
831
|
const commonProps = {
|
|
@@ -840,7 +840,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
840
840
|
return (jsxRuntime.jsx("button", { type: "button", onClick: disabled ? undefined : onClick, disabled: disabled, ...commonProps, children: content }));
|
|
841
841
|
};
|
|
842
842
|
|
|
843
|
-
var styles$
|
|
843
|
+
var styles$M = {"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"};
|
|
844
844
|
|
|
845
845
|
const dimensions = {
|
|
846
846
|
xs: 32,
|
|
@@ -856,7 +856,7 @@ const strokeWidths = {
|
|
|
856
856
|
};
|
|
857
857
|
const ProgressBar = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
858
858
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
859
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
859
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$M.barContainer} ${styles$M[`bar${size}`]} ${className}`, children: [jsxRuntime.jsx("div", { className: styles$M.barTrack, children: jsxRuntime.jsx("div", { className: `${styles$M.barFill} ${styles$M[variant]}`, style: { width: `${percentage}%` }, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max }) }), showLabel && (jsxRuntime.jsxs("span", { className: styles$M.barLabel, children: [Math.round(percentage), "%"] }))] }));
|
|
860
860
|
};
|
|
861
861
|
const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
862
862
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
@@ -865,7 +865,7 @@ const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', sh
|
|
|
865
865
|
const radius = (dimension - strokeWidth) / 2;
|
|
866
866
|
const circumference = radius * 2 * Math.PI;
|
|
867
867
|
const strokeDashoffset = circumference - (percentage / 100) * circumference;
|
|
868
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
868
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$M.circleContainer} ${className}`, style: { width: dimension, height: dimension }, children: [jsxRuntime.jsxs("svg", { width: dimension, height: dimension, className: styles$M.circleSvg, children: [jsxRuntime.jsx("circle", { className: styles$M.circleTrack, cx: dimension / 2, cy: dimension / 2, r: radius, strokeWidth: strokeWidth, fill: "transparent" }), jsxRuntime.jsx("circle", { className: `${styles$M.circleFill} ${styles$M[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$M.circleLabel, style: { fontSize: size === 'xs' ? '8px' : size === 'sm' ? '10px' : size === 'md' ? '12px' : '14px' }, children: [Math.round(percentage), "%"] }))] }));
|
|
869
869
|
};
|
|
870
870
|
// Combined export
|
|
871
871
|
const Progress = {
|
|
@@ -873,7 +873,7 @@ const Progress = {
|
|
|
873
873
|
Circle: ProgressCircle,
|
|
874
874
|
};
|
|
875
875
|
|
|
876
|
-
var styles$
|
|
876
|
+
var styles$L = {"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"};
|
|
877
877
|
|
|
878
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" })] }));
|
|
879
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" })] }));
|
|
@@ -881,23 +881,23 @@ const ChevronIcon$2 = () => (jsxRuntime.jsx("svg", { width: "12", height: "12",
|
|
|
881
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" })] }));
|
|
882
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" })] }));
|
|
883
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" })] }));
|
|
884
|
-
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$L.spinner, children: jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32" }) }));
|
|
885
885
|
const DropdownButton = ({ label, icon, options, }) => {
|
|
886
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
886
|
+
return (jsxRuntime.jsxs("div", { className: styles$L.dropdown, children: [jsxRuntime.jsxs("button", { type: "button", className: styles$L.dropdownTrigger, children: [icon, jsxRuntime.jsx("span", { children: label }), jsxRuntime.jsx(ChevronIcon$2, {})] }), jsxRuntime.jsx("div", { className: styles$L.dropdownMenu, children: options.map((option, i) => (jsxRuntime.jsxs("button", { type: "button", className: styles$L.dropdownItem, onClick: option.onClick, disabled: option.disabled, children: [option.icon && jsxRuntime.jsx("span", { className: styles$L.dropdownItemIcon, children: option.icon }), option.label] }, i))) })] }));
|
|
887
887
|
};
|
|
888
888
|
/**
|
|
889
889
|
* RosterToolbar - Toolbar for roster management with import/export/save actions
|
|
890
890
|
*/
|
|
891
891
|
const RosterToolbar = ({ importOptions, exportOptions, lockToggle, saveButton, additionalActions, searchField, className = '', }) => {
|
|
892
|
-
const toolbarClasses = [styles$
|
|
893
|
-
return (jsxRuntime.jsxs("div", { className: toolbarClasses, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
894
|
-
styles$
|
|
895
|
-
lockToggle.isLocked ? styles$
|
|
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$
|
|
892
|
+
const toolbarClasses = [styles$L.toolbar, className].filter(Boolean).join(' ');
|
|
893
|
+
return (jsxRuntime.jsxs("div", { className: toolbarClasses, children: [jsxRuntime.jsxs("div", { className: styles$L.leftSection, children: [searchField, additionalActions] }), jsxRuntime.jsxs("div", { className: styles$L.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$L.lockButton,
|
|
895
|
+
lockToggle.isLocked ? styles$L.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$L.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' })] }))] })] }));
|
|
897
897
|
};
|
|
898
898
|
RosterToolbar.displayName = 'RosterToolbar';
|
|
899
899
|
|
|
900
|
-
var styles$
|
|
900
|
+
var styles$K = {"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"};
|
|
901
901
|
|
|
902
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) => {
|
|
903
903
|
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
@@ -925,25 +925,25 @@ const SearchField = React.forwardRef(({ placeholder = 'Search...', value, defaul
|
|
|
925
925
|
onSearch?.(currentValue);
|
|
926
926
|
}
|
|
927
927
|
};
|
|
928
|
-
return (jsxRuntime.jsxs("form", { className: `${styles$
|
|
928
|
+
return (jsxRuntime.jsxs("form", { className: `${styles$K.searchField} ${styles$K[size]} ${className || ''}`, onSubmit: handleSubmit, role: "search", children: [jsxRuntime.jsxs("div", { className: styles$K.inputWrapper, children: [jsxRuntime.jsx(SearchIcon$1, { className: styles$K.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$K.input, "aria-label": ariaLabel, ...props }), showClear && currentValue && (jsxRuntime.jsx("button", { type: "button", className: styles$K.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" }))] }));
|
|
929
929
|
});
|
|
930
930
|
SearchField.displayName = 'SearchField';
|
|
931
931
|
|
|
932
|
-
var styles$
|
|
932
|
+
var styles$J = {"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"};
|
|
933
933
|
|
|
934
934
|
/**
|
|
935
935
|
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
936
936
|
* consuming applications retain their form state, validation, and masking.
|
|
937
937
|
*/
|
|
938
|
-
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$J.form, className].filter(Boolean).join(' '), children: [mode === 'Add' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { className: styles$J.portalLabel, children: "Create From Portal User" }), createFromPortalUser] }), jsxRuntime.jsx("div", { className: styles$J.divider, children: jsxRuntime.jsx("strong", { children: "OR" }) }), jsxRuntime.jsx("p", { className: styles$J.newContactLabel, children: "Create New Contact Without Portal Access" })] })), jsxRuntime.jsxs("div", { className: styles$J.nameFields, children: [firstNameField, middleInitialField, lastNameField] }), jsxRuntime.jsxs("div", { className: styles$J.phoneFields, children: [businessPhoneField, cellPhoneField] }), jsxRuntime.jsx("div", { children: emailField })] }));
|
|
939
939
|
|
|
940
|
-
var styles$
|
|
940
|
+
var styles$I = {"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"};
|
|
941
941
|
|
|
942
942
|
const Segment = ({ options, value, onChange, size = 'md', fullWidth = false, className = '', 'aria-label': ariaLabel, }) => {
|
|
943
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
943
|
+
return (jsxRuntime.jsx("div", { className: `${styles$I.segment} ${styles$I[size]} ${fullWidth ? styles$I.fullWidth : ''} ${className}`, role: "radiogroup", "aria-label": ariaLabel, children: options.map((option) => (jsxRuntime.jsxs("button", { type: "button", className: `${styles$I.option} ${value === option.value ? styles$I.selected : ''} ${option.disabled ? styles$I.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$I.icon, children: option.icon }), option.label] }, option.value))) }));
|
|
944
944
|
};
|
|
945
945
|
|
|
946
|
-
var styles$
|
|
946
|
+
var styles$H = {"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"};
|
|
947
947
|
|
|
948
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" }) }));
|
|
949
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" }) }));
|
|
@@ -1016,11 +1016,11 @@ const SelectFilter = ({ label, options = [], groupedOptions = {}, value = [], on
|
|
|
1016
1016
|
}
|
|
1017
1017
|
return `${selected.length} selected`;
|
|
1018
1018
|
};
|
|
1019
|
-
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
1019
|
+
return (jsxRuntime.jsxs("div", { ref: dropdownRef, className: `${styles$H.container} ${className}`, children: [jsxRuntime.jsxs("button", { type: "button", className: `${styles$H.trigger} ${disabled ? styles$H.disabled : ''} ${isOpen ? styles$H.open : ''}`, onClick: () => !disabled && setIsOpen(!isOpen), children: [jsxRuntime.jsx("span", { className: `${styles$H.triggerText} ${selectedValues.length === 0 ? styles$H.placeholder : ''}`, children: getDisplayText() }), jsxRuntime.jsx("span", { className: styles$H.chevron, children: jsxRuntime.jsx(ChevronIcon$1, {}) })] }), isOpen && (jsxRuntime.jsxs("div", { className: styles$H.dropdown, style: { width }, children: [grouped && tabs.length > 0 && (jsxRuntime.jsx("div", { className: styles$H.tabs, children: tabs.map(tab => (jsxRuntime.jsx("button", { type: "button", className: `${styles$H.tab} ${activeTab === tab ? styles$H.activeTab : ''}`, onClick: () => setActiveTab(tab), children: tab.charAt(0).toUpperCase() + tab.slice(1) }, tab))) })), multiselect && (jsxRuntime.jsxs("div", { className: styles$H.actions, children: [jsxRuntime.jsx("button", { type: "button", className: styles$H.actionBtn, onClick: handleSelectAll, children: "Select All" }), jsxRuntime.jsx("button", { type: "button", className: styles$H.actionBtn, onClick: handleClear, children: "Clear" })] })), jsxRuntime.jsx("div", { className: styles$H.options, children: currentOptions.map(option => (jsxRuntime.jsxs("div", { className: `${styles$H.option} ${selectedValues.includes(option.value) ? styles$H.selected : ''}`, onClick: () => handleSelect(option.value), children: [multiselect && (jsxRuntime.jsx("span", { className: styles$H.checkbox, children: selectedValues.includes(option.value) && jsxRuntime.jsx(CheckIcon, {}) })), jsxRuntime.jsx("span", { className: styles$H.optionLabel, children: option.label })] }, option.value))) }), multiselect && (jsxRuntime.jsx("div", { className: styles$H.footer, children: jsxRuntime.jsx("button", { type: "button", className: styles$H.applyBtn, onClick: () => setIsOpen(false), children: "Apply" }) }))] }))] }));
|
|
1020
1020
|
};
|
|
1021
1021
|
SelectFilter.displayName = 'SelectFilter';
|
|
1022
1022
|
|
|
1023
|
-
var styles$
|
|
1023
|
+
var styles$G = {"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"};
|
|
1024
1024
|
|
|
1025
1025
|
/**
|
|
1026
1026
|
* ServiceToggle component for a single service item.
|
|
@@ -1033,19 +1033,19 @@ const ServiceToggle = ({ label, icon, hasToggle = true, enabled = false, onToggl
|
|
|
1033
1033
|
onClick();
|
|
1034
1034
|
}
|
|
1035
1035
|
};
|
|
1036
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1036
|
+
return (jsxRuntime.jsxs("div", { className: styles$G.item, children: [jsxRuntime.jsxs("div", { className: `${styles$G.labelContainer} ${isClickable ? styles$G.clickable : ''}`, onClick: handleClick, children: [icon && jsxRuntime.jsx("span", { className: styles$G.icon, children: icon }), jsxRuntime.jsx("span", { className: styles$G.label, children: label })] }), hasToggle && (jsxRuntime.jsx(Toggle, { "aria-label": label, checked: enabled, onChange: (checked) => onToggle?.(checked), disabled: disabled, size: "sm" }))] }));
|
|
1037
1037
|
};
|
|
1038
1038
|
/**
|
|
1039
1039
|
* ServiceToggleList component for displaying a list of services with toggles.
|
|
1040
1040
|
* Used in travel request forms for service selection (Air, Hotel, Ground, etc.)
|
|
1041
1041
|
*/
|
|
1042
1042
|
const ServiceToggleList = ({ services, enabledServices = {}, onToggle, onClick, className, }) => {
|
|
1043
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1043
|
+
return (jsxRuntime.jsx("div", { className: `${styles$G.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))) }));
|
|
1044
1044
|
};
|
|
1045
1045
|
ServiceToggle.displayName = 'ServiceToggle';
|
|
1046
1046
|
ServiceToggleList.displayName = 'ServiceToggleList';
|
|
1047
1047
|
|
|
1048
|
-
var styles$
|
|
1048
|
+
var styles$F = {"toggle":"SupplierTypeToggle-module_toggle__x4pTJ","active":"SupplierTypeToggle-module_active__8BGSe"};
|
|
1049
1049
|
|
|
1050
1050
|
const SUPPLIER_TYPE_OPTIONS = [
|
|
1051
1051
|
{ value: 'A', label: 'Air' },
|
|
@@ -1066,10 +1066,10 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
1066
1066
|
setInternalValue(nextValue);
|
|
1067
1067
|
onChange?.(nextValue);
|
|
1068
1068
|
};
|
|
1069
|
-
return (jsxRuntime.jsx("div", { className: [styles$
|
|
1069
|
+
return (jsxRuntime.jsx("div", { className: [styles$F.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$F.active : '', onClick: () => handleSelect(option.value), children: option.label }, option.value || 'all'))) }));
|
|
1070
1070
|
};
|
|
1071
1071
|
|
|
1072
|
-
var styles$
|
|
1072
|
+
var styles$E = {"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"};
|
|
1073
1073
|
|
|
1074
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" })] }));
|
|
1075
1075
|
/**
|
|
@@ -1080,8 +1080,8 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
1080
1080
|
? `${teamCode} - ${teamName}`
|
|
1081
1081
|
: teamName || teamCode || '');
|
|
1082
1082
|
const headerClasses = [
|
|
1083
|
-
styles$
|
|
1084
|
-
!title ? styles$
|
|
1083
|
+
styles$E.header,
|
|
1084
|
+
!title ? styles$E.empty : '',
|
|
1085
1085
|
className,
|
|
1086
1086
|
].filter(Boolean).join(' ');
|
|
1087
1087
|
const handleBack = () => {
|
|
@@ -1093,7 +1093,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
1093
1093
|
window.location.href = backHref;
|
|
1094
1094
|
}
|
|
1095
1095
|
};
|
|
1096
|
-
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$E.left, children: [(backHref || onBack) && (jsxRuntime.jsx("button", { type: "button", className: styles$E.backButton, onClick: handleBack, "aria-label": "Go back", children: jsxRuntime.jsx(BackIcon, {}) })), jsxRuntime.jsxs("div", { className: styles$E.titles, children: [pretitle && jsxRuntime.jsx("span", { className: styles$E.pretitle, children: pretitle }), jsxRuntime.jsxs("h1", { className: styles$E.title, children: [title, "\u00A0"] })] })] }), actions && (jsxRuntime.jsx("div", { className: styles$E.actions, children: actions }))] }));
|
|
1097
1097
|
};
|
|
1098
1098
|
const DEFAULT_TABS$1 = [
|
|
1099
1099
|
{ id: 'profile', label: 'Profile' },
|
|
@@ -1102,55 +1102,55 @@ const DEFAULT_TABS$1 = [
|
|
|
1102
1102
|
{ id: 'user-access', label: 'User Access' },
|
|
1103
1103
|
];
|
|
1104
1104
|
/** Router-agnostic counterpart of Hub's team-management submenu. */
|
|
1105
|
-
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$E.subMenu, className].filter(Boolean).join(' '), "aria-label": "Team management sections", children: tabs.map((tab) => (jsxRuntime.jsx("button", { type: "button", className: activeTab === tab.id ? styles$E.activeTab : '', "aria-current": activeTab === tab.id ? 'page' : undefined, onClick: () => onTabChange?.(tab.id), children: tab.label }, tab.id))) }));
|
|
1106
1106
|
TeamHeader.displayName = 'TeamHeader';
|
|
1107
1107
|
TeamSubMenu.displayName = 'TeamSubMenu';
|
|
1108
1108
|
|
|
1109
|
-
var styles$
|
|
1109
|
+
var styles$D = {"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"};
|
|
1110
1110
|
|
|
1111
|
-
const PlaneIcon$
|
|
1112
|
-
const BusIcon$
|
|
1113
|
-
const HotelIcon$
|
|
1111
|
+
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" }) }));
|
|
1112
|
+
const BusIcon$1 = () => (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" })] }));
|
|
1113
|
+
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" })] }));
|
|
1114
1114
|
const ArrowIcon = () => (jsxRuntime.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }), jsxRuntime.jsx("polyline", { points: "12 5 19 12 12 19" })] }));
|
|
1115
1115
|
/**
|
|
1116
1116
|
* Base TripSegment component wrapper
|
|
1117
1117
|
*/
|
|
1118
1118
|
const TripSegment = ({ type: _type, variant = 'light', className = '', children, }) => {
|
|
1119
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1119
|
+
return (jsxRuntime.jsx("div", { className: `${styles$D.segment} ${styles$D[variant]} ${className}`, children: children }));
|
|
1120
1120
|
};
|
|
1121
1121
|
/**
|
|
1122
1122
|
* AirSegment component for displaying flight information
|
|
1123
1123
|
*/
|
|
1124
1124
|
const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
1125
1125
|
if (!flights || flights.length === 0) {
|
|
1126
|
-
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$D.empty, children: "No flights" }) }));
|
|
1127
1127
|
}
|
|
1128
|
-
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$D.item, children: [jsxRuntime.jsxs("div", { className: styles$D.itemHeader, children: [jsxRuntime.jsx(PlaneIcon$2, {}), jsxRuntime.jsx("span", { className: styles$D.itemType, children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxRuntime.jsxs("div", { className: styles$D.route, children: [jsxRuntime.jsx("span", { className: styles$D.location, children: flight.departure }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: styles$D.location, children: flight.arrival })] }), jsxRuntime.jsxs("div", { className: styles$D.details, children: [jsxRuntime.jsx("span", { children: flight.departureDate }), flight.departureTime && jsxRuntime.jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxRuntime.jsxs("div", { className: styles$D.details, children: [jsxRuntime.jsx("span", { children: flight.airline }), flight.flightNumber && jsxRuntime.jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
1129
1129
|
};
|
|
1130
1130
|
/**
|
|
1131
1131
|
* GroundSegment component for displaying ground transportation
|
|
1132
1132
|
*/
|
|
1133
1133
|
const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
1134
1134
|
if (!segments || segments.length === 0) {
|
|
1135
|
-
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$D.empty, children: "No ground transportation" }) }));
|
|
1136
1136
|
}
|
|
1137
|
-
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$D.item, children: [jsxRuntime.jsxs("div", { className: styles$D.itemHeader, children: [jsxRuntime.jsx(BusIcon$1, {}), jsxRuntime.jsx("span", { className: styles$D.itemType, children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxRuntime.jsxs("div", { className: styles$D.route, children: [jsxRuntime.jsx("span", { className: styles$D.location, children: segment.pickupLocation }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: styles$D.location, children: segment.dropoffLocation })] }), jsxRuntime.jsxs("div", { className: styles$D.details, children: [jsxRuntime.jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsxRuntime.jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxRuntime.jsxs("div", { className: styles$D.details, children: [jsxRuntime.jsx("span", { children: segment.company }), segment.vehicleCount && jsxRuntime.jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
1138
1138
|
};
|
|
1139
1139
|
/**
|
|
1140
1140
|
* HotelSegment component for displaying hotel information
|
|
1141
1141
|
*/
|
|
1142
1142
|
const HotelSegment = ({ hotels, variant = 'light', className = '', }) => {
|
|
1143
1143
|
if (!hotels || hotels.length === 0) {
|
|
1144
|
-
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$D.empty, children: "No hotels" }) }));
|
|
1145
1145
|
}
|
|
1146
|
-
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$D.item, children: [jsxRuntime.jsxs("div", { className: styles$D.itemHeader, children: [jsxRuntime.jsx(HotelIcon$2, {}), jsxRuntime.jsx("span", { className: styles$D.itemName, children: hotel.name })] }), hotel.city && (jsxRuntime.jsx("div", { className: styles$D.details, children: jsxRuntime.jsx("span", { children: hotel.city }) })), jsxRuntime.jsxs("div", { className: styles$D.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$D.details, children: jsxRuntime.jsxs("span", { children: [hotel.roomCount, " rooms"] }) }))] }, i))) }));
|
|
1147
1147
|
};
|
|
1148
1148
|
TripSegment.displayName = 'TripSegment';
|
|
1149
1149
|
AirSegment.displayName = 'AirSegment';
|
|
1150
1150
|
GroundSegment.displayName = 'GroundSegment';
|
|
1151
1151
|
HotelSegment.displayName = 'HotelSegment';
|
|
1152
1152
|
|
|
1153
|
-
var styles$
|
|
1153
|
+
var styles$C = {"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"};
|
|
1154
1154
|
|
|
1155
1155
|
/**
|
|
1156
1156
|
* Sidenav component for main navigation.
|
|
@@ -1159,8 +1159,8 @@ var styles$B = {"sidenav":"Sidenav-module_sidenav__9DKVg","expanded":"Sidenav-mo
|
|
|
1159
1159
|
const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultExpanded = true, footer, className = '', ...props }) => {
|
|
1160
1160
|
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
1161
1161
|
const classNames = [
|
|
1162
|
-
styles$
|
|
1163
|
-
expanded ? styles$
|
|
1162
|
+
styles$C.sidenav,
|
|
1163
|
+
expanded ? styles$C.expanded : styles$C.collapsed,
|
|
1164
1164
|
className,
|
|
1165
1165
|
]
|
|
1166
1166
|
.filter(Boolean)
|
|
@@ -1173,20 +1173,20 @@ const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultEx
|
|
|
1173
1173
|
onItemClick(item.key);
|
|
1174
1174
|
}
|
|
1175
1175
|
};
|
|
1176
|
-
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$C.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$C.logoContainer, children: expanded ? logo : logoCollapsed || logo }), jsxRuntime.jsx("nav", { className: styles$C.nav, children: items.map((item) => {
|
|
1177
1177
|
const isActive = item.key === activeKey;
|
|
1178
1178
|
const itemClasses = [
|
|
1179
|
-
styles$
|
|
1180
|
-
isActive ? styles$
|
|
1179
|
+
styles$C.navItem,
|
|
1180
|
+
isActive ? styles$C.active : '',
|
|
1181
1181
|
]
|
|
1182
1182
|
.filter(Boolean)
|
|
1183
1183
|
.join(' ');
|
|
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$
|
|
1185
|
-
}) }), 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$C.icon, children: item.icon }), expanded && jsxRuntime.jsx("span", { className: styles$C.label, children: item.label })] }, item.key));
|
|
1185
|
+
}) }), footer && jsxRuntime.jsx("div", { className: styles$C.footer, children: footer })] }));
|
|
1186
1186
|
};
|
|
1187
1187
|
Sidenav.displayName = 'Sidenav';
|
|
1188
1188
|
|
|
1189
|
-
var styles$
|
|
1189
|
+
var styles$B = {"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"};
|
|
1190
1190
|
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Topbar component for the main header.
|
|
@@ -1197,7 +1197,7 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
1197
1197
|
const [searchQuery, setSearchQuery] = React.useState('');
|
|
1198
1198
|
const dropdownRef = React.useRef(null);
|
|
1199
1199
|
const searchInputRef = React.useRef(null);
|
|
1200
|
-
const classNames = [styles$
|
|
1200
|
+
const classNames = [styles$B.topbar, className].filter(Boolean).join(' ');
|
|
1201
1201
|
// Close dropdown on outside click
|
|
1202
1202
|
React.useEffect(() => {
|
|
1203
1203
|
if (!isOpen)
|
|
@@ -1246,27 +1246,27 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
1246
1246
|
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
1247
1247
|
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
1248
1248
|
const hasDropdown = accounts && accounts.length > 0;
|
|
1249
|
-
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$B.left, children: [leftContent, account && (jsxRuntime.jsxs("div", { className: styles$B.accountWrapper, ref: dropdownRef, children: [jsxRuntime.jsxs("button", { className: `${styles$B.accountSelector} ${isOpen ? styles$B.open : ''}`, onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsxRuntime.jsx("span", { className: styles$B.accountCode, children: account.code }), jsxRuntime.jsx("span", { className: styles$B.accountName, children: account.name }), hasDropdown && (jsxRuntime.jsx(ChevronDownIcon$1, { size: 16, className: `${styles$B.chevron} ${isOpen ? styles$B.chevronOpen : ''}` }))] }), isOpen && hasDropdown && (jsxRuntime.jsxs("div", { className: styles$B.dropdown, role: "listbox", children: [jsxRuntime.jsxs("div", { className: styles$B.dropdownSearch, children: [jsxRuntime.jsxs("svg", { className: styles$B.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$B.searchInput })] }), jsxRuntime.jsx("div", { className: styles$B.dropdownList, children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxRuntime.jsxs("button", { className: `${styles$B.dropdownItem} ${acc.code === account.code ? styles$B.selected : ''}`, onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsxRuntime.jsx("span", { className: styles$B.dropdownItemCode, children: acc.code }), jsxRuntime.jsx("span", { className: styles$B.dropdownItemName, children: acc.name })] }, acc.code)))) : (jsxRuntime.jsx("div", { className: styles$B.noResults, children: "No accounts found" })) })] }))] }))] }), actions && jsxRuntime.jsx("div", { className: styles$B.actions, children: actions })] }));
|
|
1250
1250
|
};
|
|
1251
1251
|
Topbar.displayName = 'Topbar';
|
|
1252
1252
|
|
|
1253
|
-
var styles$
|
|
1253
|
+
var styles$A = {"appLayout":"AppLayout-module_appLayout__NFbZk","mainArea":"AppLayout-module_mainArea__t-6oq","content":"AppLayout-module_content__5kV7S"};
|
|
1254
1254
|
|
|
1255
1255
|
const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account, defaultExpanded = true, onNavItemClick, onAccountClick, children, navFooter, topbarActions, className, }) => {
|
|
1256
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1256
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$A.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$A.mainArea, children: [jsxRuntime.jsx(Topbar, { account: account, onAccountClick: onAccountClick, actions: topbarActions }), jsxRuntime.jsx("main", { className: styles$A.content, children: children })] })] }));
|
|
1257
1257
|
};
|
|
1258
1258
|
|
|
1259
|
-
var styles$
|
|
1259
|
+
var styles$z = {"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"};
|
|
1260
1260
|
|
|
1261
1261
|
/**
|
|
1262
1262
|
* Card component for grouping related content.
|
|
1263
1263
|
*/
|
|
1264
1264
|
const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
1265
1265
|
const classNames = [
|
|
1266
|
-
styles$
|
|
1267
|
-
styles$
|
|
1268
|
-
styles$
|
|
1269
|
-
interactive ? styles$
|
|
1266
|
+
styles$z.card,
|
|
1267
|
+
styles$z[variant],
|
|
1268
|
+
styles$z[`padding-${padding}`],
|
|
1269
|
+
interactive ? styles$z.interactive : '',
|
|
1270
1270
|
className,
|
|
1271
1271
|
]
|
|
1272
1272
|
.filter(Boolean)
|
|
@@ -1275,22 +1275,22 @@ const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactiv
|
|
|
1275
1275
|
});
|
|
1276
1276
|
Card.displayName = 'Card';
|
|
1277
1277
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
1278
|
-
const classNames = [styles$
|
|
1279
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1278
|
+
const classNames = [styles$z.header, className].filter(Boolean).join(' ');
|
|
1279
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: styles$z.headerContent, children: [title && jsxRuntime.jsx("h3", { className: styles$z.title, children: title }), subtitle && jsxRuntime.jsx("p", { className: styles$z.subtitle, children: subtitle }), children] }), actions && jsxRuntime.jsx("div", { className: styles$z.actions, children: actions })] }));
|
|
1280
1280
|
};
|
|
1281
1281
|
CardHeader.displayName = 'CardHeader';
|
|
1282
1282
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
1283
|
-
const classNames = [styles$
|
|
1283
|
+
const classNames = [styles$z.body, className].filter(Boolean).join(' ');
|
|
1284
1284
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
1285
1285
|
};
|
|
1286
1286
|
CardBody.displayName = 'CardBody';
|
|
1287
1287
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
1288
|
-
const classNames = [styles$
|
|
1288
|
+
const classNames = [styles$z.footer, className].filter(Boolean).join(' ');
|
|
1289
1289
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
1290
1290
|
};
|
|
1291
1291
|
CardFooter.displayName = 'CardFooter';
|
|
1292
1292
|
|
|
1293
|
-
var styles$
|
|
1293
|
+
var styles$y = {"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"};
|
|
1294
1294
|
|
|
1295
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" })] }));
|
|
1296
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" })] }));
|
|
@@ -1301,18 +1301,18 @@ const PlusIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", vi
|
|
|
1301
1301
|
*/
|
|
1302
1302
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
1303
1303
|
const listClasses = [
|
|
1304
|
-
styles$
|
|
1304
|
+
styles$y.container,
|
|
1305
1305
|
className,
|
|
1306
1306
|
].filter(Boolean).join(' ');
|
|
1307
|
-
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$y.alert, children: alert })), jsxRuntime.jsxs("div", { className: styles$y.card, children: [jsxRuntime.jsx("div", { className: styles$y.header, children: jsxRuntime.jsxs("div", { className: styles$y.titleRow, children: [jsxRuntime.jsx("h3", { className: styles$y.title, children: title }), tooltip && (jsxRuntime.jsx("span", { className: styles$y.tooltip, children: jsxRuntime.jsx(InfoIcon, {}) }))] }) }), jsxRuntime.jsxs("div", { className: styles$y.list, children: [contacts.map((contact) => (jsxRuntime.jsxs("div", { className: styles$y.contactItem, children: [jsxRuntime.jsxs("div", { className: styles$y.contactInfo, children: [jsxRuntime.jsxs("div", { className: styles$y.contactName, children: [contact.name, contact.isPrimary && (jsxRuntime.jsx("span", { className: styles$y.badge, children: "Primary" })), contact.isSecondary && (jsxRuntime.jsx("span", { className: `${styles$y.badge} ${styles$y.badgeSecondary}`, children: "Secondary" }))] }), contact.role && (jsxRuntime.jsx("div", { className: styles$y.contactRole, children: contact.role })), jsxRuntime.jsxs("div", { className: styles$y.contactDetails, children: [contact.email && (jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, className: styles$y.contactLink, children: contact.email })), contact.phone && (jsxRuntime.jsx("span", { className: styles$y.contactPhone, children: contact.phone }))] })] }), jsxRuntime.jsxs("div", { className: styles$y.contactActions, children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: styles$y.actionButton, onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsxRuntime.jsx(EditIcon$1, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: `${styles$y.actionButton} ${styles$y.actionButtonDanger}`, onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsxRuntime.jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsxRuntime.jsx("div", { className: styles$y.empty, children: "No contacts added" }))] }), showAdd && onAdd && (jsxRuntime.jsx("div", { className: styles$y.footer, children: jsxRuntime.jsxs("button", { type: "button", className: styles$y.addButton, onClick: onAdd, children: [jsxRuntime.jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
1308
1308
|
};
|
|
1309
1309
|
ContactList.displayName = 'ContactList';
|
|
1310
1310
|
|
|
1311
|
-
var styles$
|
|
1311
|
+
var styles$x = {"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"};
|
|
1312
1312
|
|
|
1313
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1314
|
-
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1315
|
-
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1313
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: `${styles$x.header} ${className}`, children: [jsxRuntime.jsxs("div", { className: styles$x.headerContent, children: [title && jsxRuntime.jsx("h2", { className: styles$x.title, children: title }), children] }), showClose && (jsxRuntime.jsx("button", { type: "button", className: styles$x.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$x.body} ${className}`, children: children }));
|
|
1315
|
+
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$x.footer} ${className}`, children: children }));
|
|
1316
1316
|
const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, closeOnBackdropClick = true, closeOnEscape = true, showBackdrop = true, className = '', }) => {
|
|
1317
1317
|
const handleEscape = React.useCallback((e) => {
|
|
1318
1318
|
if (closeOnEscape && e.key === 'Escape') {
|
|
@@ -1336,7 +1336,7 @@ const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, cl
|
|
|
1336
1336
|
};
|
|
1337
1337
|
if (!isOpen)
|
|
1338
1338
|
return null;
|
|
1339
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1339
|
+
return (jsxRuntime.jsxs("div", { className: styles$x.container, children: [showBackdrop && (jsxRuntime.jsx("div", { className: `${styles$x.backdrop} ${isOpen ? styles$x.backdropOpen : ''}`, onClick: handleBackdropClick })), jsxRuntime.jsx("div", { className: `${styles$x.drawer} ${styles$x[position]} ${styles$x[`size${size.charAt(0).toUpperCase()}${size.slice(1)}`]} ${isOpen ? styles$x.drawerOpen : ''} ${className}`, role: "dialog", "aria-modal": "true", children: React.Children.map(children, (child) => {
|
|
1340
1340
|
if (React.isValidElement(child) && child.type === DrawerHeader) {
|
|
1341
1341
|
return React.cloneElement(child, {
|
|
1342
1342
|
onClose,
|
|
@@ -1349,7 +1349,7 @@ Drawer.Header = DrawerHeader;
|
|
|
1349
1349
|
Drawer.Body = DrawerBody;
|
|
1350
1350
|
Drawer.Footer = DrawerFooter;
|
|
1351
1351
|
|
|
1352
|
-
var styles$
|
|
1352
|
+
var styles$w = {"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"};
|
|
1353
1353
|
|
|
1354
1354
|
const isTravelDueDateCompleted = (item) => item.status.trim().toLowerCase() === 'completed' || !!item.completeddatetime;
|
|
1355
1355
|
const parseLocalDate$1 = (value) => {
|
|
@@ -1360,12 +1360,12 @@ const parseLocalDate$1 = (value) => {
|
|
|
1360
1360
|
return Number.isNaN(date.getTime()) ? null : date;
|
|
1361
1361
|
};
|
|
1362
1362
|
const formatDate$2 = (value, options) => parseLocalDate$1(value)?.toLocaleDateString('en-US', options) ?? 'Invalid Date';
|
|
1363
|
-
const sportColor = (code) => code.toUpperCase().startsWith('W') ? '#FFA99A' : code.toUpperCase().startsWith('X') ? '#D1C1C3' : '#8AC6D9';
|
|
1364
|
-
const DueDateCard = ({ item, onToggle, onTaskClick }) => {
|
|
1363
|
+
const sportColor$1 = (code) => code.toUpperCase().startsWith('W') ? '#FFA99A' : code.toUpperCase().startsWith('X') ? '#D1C1C3' : '#8AC6D9';
|
|
1364
|
+
const DueDateCard$1 = ({ item, onToggle, onTaskClick }) => {
|
|
1365
1365
|
const completed = isTravelDueDateCompleted(item);
|
|
1366
1366
|
const dueDate = parseLocalDate$1(item.duedate);
|
|
1367
1367
|
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
1368
|
-
return (jsxRuntime.jsxs("article", { className: styles$
|
|
1368
|
+
return (jsxRuntime.jsxs("article", { className: styles$w.card, children: [jsxRuntime.jsxs("div", { className: styles$w.cardTitle, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": `${completed ? 'Reopen' : 'Complete'} ${item.tasktitle}`, className: [styles$w.status, completed ? styles$w.completed : pastDue ? styles$w.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$w.tags, children: [jsxRuntime.jsx("span", { style: { backgroundColor: sportColor$1(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$w.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] })] })] }));
|
|
1369
1369
|
};
|
|
1370
1370
|
/** Hub's searchable, status-aware due-dates drawer. */
|
|
1371
1371
|
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
@@ -1377,10 +1377,10 @@ const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose,
|
|
|
1377
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)));
|
|
1378
1378
|
return matches.length ? [[date, matches]] : [];
|
|
1379
1379
|
})), [dueDates, search, selectedDate, selectedTrip]);
|
|
1380
|
-
return (jsxRuntime.jsxs("aside", { className: [styles$
|
|
1380
|
+
return (jsxRuntime.jsxs("aside", { className: [styles$w.drawer, isOpen ? styles$w.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$w.body, children: [jsxRuntime.jsxs("label", { className: styles$w.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$w.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$w.cards, children: items.map((item) => jsxRuntime.jsx(DueDateCard$1, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
1381
1381
|
};
|
|
1382
1382
|
|
|
1383
|
-
var styles$
|
|
1383
|
+
var styles$v = {"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"};
|
|
1384
1384
|
|
|
1385
1385
|
const HUB_INDIVIDUAL_TRAVEL_ITEM = { key: 'individual-travel', label: 'Individual Travel', path: '/individual-travel', icon: jsxRuntime.jsx(UserIcon, { size: 24 }) };
|
|
1386
1386
|
const HUB_NAV_ITEMS = [
|
|
@@ -1390,9 +1390,9 @@ const HUB_NAV_ITEMS = [
|
|
|
1390
1390
|
{ key: 'team-management', label: 'Team Management', path: '/team-management', icon: jsxRuntime.jsx(UsersIcon$1, { size: 24 }) },
|
|
1391
1391
|
];
|
|
1392
1392
|
const HUB_ADMIN_ITEM = { key: 'administration', label: 'Administration', path: '/administration', icon: jsxRuntime.jsx(SettingsIcon, { size: 24 }) };
|
|
1393
|
-
const DefaultLogo = ({ expanded }) => jsxRuntime.jsxs("div", { className: styles$
|
|
1394
|
-
const DefaultAccount = () => jsxRuntime.jsxs("button", { type: "button", className: styles$
|
|
1395
|
-
const DefaultActions = ({ isMobileNavOpen, toggleMobileNav }) => (jsxRuntime.jsxs("div", { className: styles$
|
|
1393
|
+
const DefaultLogo = ({ expanded }) => jsxRuntime.jsxs("div", { className: styles$v.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$v.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$v.defaultActions, children: [jsxRuntime.jsxs("div", { className: styles$v.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$v.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 }) })] })] }));
|
|
1396
1396
|
/** The shared application navigation and content shell used by Hub and its Storybook pages. */
|
|
1397
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 = '', }) => {
|
|
1398
1398
|
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
@@ -1415,23 +1415,23 @@ const HubAppShell = ({ children, navItems = HUB_NAV_ITEMS, individualTravelItem
|
|
|
1415
1415
|
onNavigate?.(item);
|
|
1416
1416
|
closeMobileNav();
|
|
1417
1417
|
};
|
|
1418
|
-
const renderNavItem = (item, mobile = false) => (jsxRuntime.jsxs("button", { type: "button", className: [styles$
|
|
1419
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1418
|
+
const renderNavItem = (item, mobile = false) => (jsxRuntime.jsxs("button", { type: "button", className: [styles$v.navItem, activeNavKey === item.key ? styles$v.active : '', mobile ? styles$v.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$v.navIcon, children: item.icon }), (expanded || mobile) && jsxRuntime.jsx("span", { children: item.label })] }, item.key));
|
|
1419
|
+
return (jsxRuntime.jsxs("div", { className: [styles$v.shell, expanded ? styles$v.shellExpanded : '', className].filter(Boolean).join(' '), children: [loading && jsxRuntime.jsx("div", { className: styles$v.loading, role: "status", "aria-label": "Loading", "data-testid": "loading-overlay", children: jsxRuntime.jsx("span", {}) }), betaLabel && jsxRuntime.jsx("div", { className: styles$v.beta, children: betaLabel }), jsxRuntime.jsxs("aside", { className: styles$v.sidebar, "data-expanded": expanded, children: [jsxRuntime.jsx("button", { type: "button", className: styles$v.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$v.logo, "aria-label": "Go to Home", onClick: onLogoClick, children: logo ?? jsxRuntime.jsx(DefaultLogo, { expanded: expanded }) }), jsxRuntime.jsxs("nav", { className: styles$v.desktopNav, "aria-label": "Hub navigation", children: [jsxRuntime.jsxs("button", { type: "button", className: styles$v.navItem, "aria-label": "Old Portal", title: "Old Portal", onClick: onLegacyPortal, children: [jsxRuntime.jsx("span", { className: styles$v.navIcon, children: jsxRuntime.jsx(ArrowUpRightIcon, { size: 24 }) }), expanded && jsxRuntime.jsx("span", { children: "Old Portal" })] }), renderNavItem(individualTravelItem), jsxRuntime.jsx("div", { className: navigationDisabled ? styles$v.disabledNav : '', children: navItems.map((item) => renderNavItem(item)) })] }), jsxRuntime.jsxs("div", { className: styles$v.sidebarFooter, children: [isAdmin && renderNavItem(adminItem), jsxRuntime.jsxs("div", { className: styles$v.profile, ref: profileRef, children: [jsxRuntime.jsx("button", { type: "button", className: styles$v.avatar, "aria-label": "User Information", onClick: () => setIsProfileOpen((value) => !value), children: userInitials }), isProfileOpen && profileMenu && jsxRuntime.jsx("div", { className: styles$v.profileMenu, children: profileMenu })] })] })] }), jsxRuntime.jsxs("div", { className: styles$v.main, children: [jsxRuntime.jsxs("header", { className: styles$v.topbar, children: [jsxRuntime.jsx("div", { children: accountSelector ?? jsxRuntime.jsx(DefaultAccount, {}) }), renderTopbarActions?.(actions) ?? jsxRuntime.jsx(DefaultActions, { ...actions })] }), isMobileNavOpen && jsxRuntime.jsxs("div", { className: styles$v.mobileNav, children: [jsxRuntime.jsx("nav", { "aria-label": "Mobile Hub navigation", children: navItems.map((item) => renderNavItem(item, true)) }), jsxRuntime.jsxs("div", { className: styles$v.mobileExtras, role: "group", "aria-label": "Mobile navigation actions", children: [renderMobileExtras?.(closeMobileNav) ?? jsxRuntime.jsxs("button", { type: "button", className: styles$v.mobileBooking, onClick: closeMobileNav, children: [jsxRuntime.jsx(ArrowUpRightIcon, { size: 20 }), jsxRuntime.jsx("span", { children: "Book Team Travel" })] }), jsxRuntime.jsxs("button", { type: "button", className: styles$v.mobilePrimary, onClick: () => { onLegacyPortal?.(); closeMobileNav(); }, children: [jsxRuntime.jsx(ArrowUpRightIcon, { size: 20 }), jsxRuntime.jsx("span", { children: "Legacy Portal" })] })] }), mobileFooter && jsxRuntime.jsx("div", { className: styles$v.mobileFooter, children: mobileFooter })] }), showContent && jsxRuntime.jsx("main", { className: [styles$v.content, contentDisabled ? styles$v.contentDisabled : ''].filter(Boolean).join(' '), children: children })] })] }));
|
|
1420
1420
|
};
|
|
1421
1421
|
|
|
1422
|
-
var styles$
|
|
1422
|
+
var styles$u = {"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"};
|
|
1423
1423
|
|
|
1424
|
-
const PlaneIcon$
|
|
1425
|
-
const HotelIcon$
|
|
1426
|
-
const CarIcon
|
|
1424
|
+
const PlaneIcon$1 = () => (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" }) }));
|
|
1425
|
+
const HotelIcon$1 = () => (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" })] }));
|
|
1426
|
+
const CarIcon = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("path", { d: "M7 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }), jsxRuntime.jsx("path", { d: "M17 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }), jsxRuntime.jsx("path", { d: "M5 17h-2v-6l2 -5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0h-6m-6 -6h15m-6 0v-5" })] }));
|
|
1427
1427
|
const StarIcon = () => (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) }));
|
|
1428
1428
|
const EditIcon = () => (jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntime.jsx("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" }) }));
|
|
1429
1429
|
const TrashIcon = () => (jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("polyline", { points: "3 6 5 6 21 6" }), jsxRuntime.jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })] }));
|
|
1430
1430
|
const PlusIcon = () => (jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })] }));
|
|
1431
1431
|
const TYPE_ICONS = {
|
|
1432
|
-
airline: jsxRuntime.jsx(PlaneIcon$
|
|
1433
|
-
hotel: jsxRuntime.jsx(HotelIcon$
|
|
1434
|
-
car: jsxRuntime.jsx(CarIcon
|
|
1432
|
+
airline: jsxRuntime.jsx(PlaneIcon$1, {}),
|
|
1433
|
+
hotel: jsxRuntime.jsx(HotelIcon$1, {}),
|
|
1434
|
+
car: jsxRuntime.jsx(CarIcon, {}),
|
|
1435
1435
|
other: jsxRuntime.jsx(StarIcon, {}),
|
|
1436
1436
|
};
|
|
1437
1437
|
const TYPE_LABELS = {
|
|
@@ -1445,8 +1445,8 @@ const TYPE_LABELS = {
|
|
|
1445
1445
|
*/
|
|
1446
1446
|
const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, onRemove, onAdd, alert, isLoading = false, emptyMessage = 'No membership programs added', className = '', }) => {
|
|
1447
1447
|
const containerClasses = [
|
|
1448
|
-
styles$
|
|
1449
|
-
isLoading ? styles$
|
|
1448
|
+
styles$u.container,
|
|
1449
|
+
isLoading ? styles$u.loading : '',
|
|
1450
1450
|
className,
|
|
1451
1451
|
].filter(Boolean).join(' ');
|
|
1452
1452
|
const groupedPrograms = programs.reduce((acc, program) => {
|
|
@@ -1457,30 +1457,30 @@ const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, o
|
|
|
1457
1457
|
return acc;
|
|
1458
1458
|
}, {});
|
|
1459
1459
|
const typeOrder = ['airline', 'hotel', 'car', 'other'];
|
|
1460
|
-
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$u.alert, children: alert }), jsxRuntime.jsxs("div", { className: styles$u.header, children: [jsxRuntime.jsx("h2", { className: styles$u.title, children: title }), onAdd && (jsxRuntime.jsxs("button", { type: "button", className: styles$u.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$u.empty, children: jsxRuntime.jsx("p", { children: emptyMessage }) })) : (jsxRuntime.jsx("div", { className: styles$u.list, children: typeOrder.map((type) => {
|
|
1461
1461
|
const typePrograms = groupedPrograms[type];
|
|
1462
1462
|
if (!typePrograms || typePrograms.length === 0)
|
|
1463
1463
|
return null;
|
|
1464
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1464
|
+
return (jsxRuntime.jsxs("div", { className: styles$u.group, children: [jsxRuntime.jsxs("div", { className: styles$u.groupHeader, children: [jsxRuntime.jsx("span", { className: styles$u.groupIcon, children: TYPE_ICONS[type] }), jsxRuntime.jsx("span", { className: styles$u.groupLabel, children: TYPE_LABELS[type] })] }), jsxRuntime.jsx("div", { className: styles$u.programs, children: typePrograms.map((program) => (jsxRuntime.jsxs("div", { className: styles$u.program, children: [jsxRuntime.jsxs("div", { className: styles$u.programInfo, children: [jsxRuntime.jsx("div", { className: styles$u.programProvider, children: program.provider }), program.programName && (jsxRuntime.jsx("div", { className: styles$u.programName, children: program.programName })), jsxRuntime.jsx("div", { className: styles$u.programNumber, children: program.membershipNumber }), program.status && (jsxRuntime.jsx("div", { className: styles$u.programStatus, children: program.status }))] }), jsxRuntime.jsxs("div", { className: styles$u.programActions, children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: styles$u.actionButton, onClick: () => onEdit(program), "aria-label": `Edit ${program.provider} program`, children: jsxRuntime.jsx(EditIcon, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: [styles$u.actionButton, styles$u.removeButton].join(' '), onClick: () => onRemove(program), "aria-label": `Remove ${program.provider} program`, children: jsxRuntime.jsx(TrashIcon, {}) }))] })] }, program.id))) })] }, type));
|
|
1465
1465
|
}) }))] }));
|
|
1466
1466
|
};
|
|
1467
1467
|
MembershipPrograms.displayName = 'MembershipPrograms';
|
|
1468
1468
|
|
|
1469
|
-
var styles$
|
|
1469
|
+
var styles$t = {"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"};
|
|
1470
1470
|
|
|
1471
1471
|
const Stat = ({ label, value, sub, meterValue, meterMax, warn = false }) => {
|
|
1472
1472
|
const ratio = meterMax > 0 ? Math.min(100, Math.max(0, (meterValue / meterMax) * 100)) : 0;
|
|
1473
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1473
|
+
return (jsxRuntime.jsxs("div", { className: styles$t.stat, children: [jsxRuntime.jsxs("div", { className: styles$t.labelRow, children: [jsxRuntime.jsx("span", { className: styles$t.label, children: label }), warn && jsxRuntime.jsx(WarningIcon$1, { size: 14, className: styles$t.warningIcon, "aria-label": `${label} warning` })] }), jsxRuntime.jsx("div", { className: [styles$t.value, warn ? styles$t.warningText : ''].filter(Boolean).join(' '), children: value }), jsxRuntime.jsx("div", { className: styles$t.sub, children: sub }), jsxRuntime.jsx("div", { className: styles$t.meter, "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: [styles$t.meterFill, warn ? styles$t.meterOver : ''].filter(Boolean).join(' '), style: { width: `${ratio}%` } }) })] }));
|
|
1474
1474
|
};
|
|
1475
1475
|
/** Advisory seat and payload meters from Hub's charter manifest. */
|
|
1476
1476
|
const ManifestCapacityStats = ({ paxCount, seats, paxWeight, cargoWeight, payloadLimit, className = '', }) => {
|
|
1477
1477
|
const totalWeight = paxWeight + cargoWeight;
|
|
1478
1478
|
const overSeats = seats > 0 && paxCount > seats;
|
|
1479
1479
|
const overPayload = payloadLimit > 0 && totalWeight > payloadLimit;
|
|
1480
|
-
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$t.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$t.alert, role: "alert", children: [jsxRuntime.jsx(WarningIcon$1, { size: 20, className: styles$t.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."] }))] })] }))] }));
|
|
1481
1481
|
};
|
|
1482
1482
|
|
|
1483
|
-
var styles$
|
|
1483
|
+
var styles$s = {"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"};
|
|
1484
1484
|
|
|
1485
1485
|
const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton = true, closeOnBackdropClick = true, closeOnEscape = true, footer, className = '', }) => {
|
|
1486
1486
|
const handleEscape = React.useCallback((e) => {
|
|
@@ -1505,12 +1505,12 @@ const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton
|
|
|
1505
1505
|
};
|
|
1506
1506
|
if (!isOpen)
|
|
1507
1507
|
return null;
|
|
1508
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
1508
|
+
return (jsxRuntime.jsx("div", { className: styles$s.overlay, onClick: handleBackdropClick, children: jsxRuntime.jsxs("div", { className: `${styles$s.modal} ${styles$s[size]} ${className}`, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? 'modal-title' : undefined, children: [(title || showCloseButton) && (jsxRuntime.jsxs("div", { className: styles$s.header, children: [title && (jsxRuntime.jsx("h2", { id: "modal-title", className: styles$s.title, children: title })), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: styles$s.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$s.body, children: children }), footer && jsxRuntime.jsx("div", { className: styles$s.footer, children: footer })] }) }));
|
|
1509
1509
|
};
|
|
1510
|
-
const ModalFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
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$
|
|
1510
|
+
const ModalFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$s.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$s.confirmMessage, children: message }) }));
|
|
1512
1512
|
|
|
1513
|
-
var styles$
|
|
1513
|
+
var styles$r = {"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"};
|
|
1514
1514
|
|
|
1515
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" }) }));
|
|
1516
1516
|
/**
|
|
@@ -1532,19 +1532,19 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
1532
1532
|
setOpen(!open);
|
|
1533
1533
|
}
|
|
1534
1534
|
};
|
|
1535
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1535
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$r.module} ${className}`, children: [title && (jsxRuntime.jsx("div", { className: `${styles$r.header} ${styles$r[size]} ${!open ? styles$r.closed : ''} ${headerClassName}`, children: jsxRuntime.jsxs("div", { className: `${styles$r.titleRow} ${styles$r[size]} ${titleClassName}`, children: [icon && (jsxRuntime.jsx("span", { className: `${styles$r.icon} ${size === 'sm' ? '' : styles$r.iconSpaced} ${iconClassName}`, children: icon })), jsxRuntime.jsx("span", { className: styles$r.title, children: title }), badge && jsxRuntime.jsx("span", { className: styles$r.badge, children: badge }), jsxRuntime.jsxs("div", { className: styles$r.tools, children: [tools, useToggle && (jsxRuntime.jsx("button", { type: "button", className: styles$r.toggleBtn, onClick: handleToggle, "aria-expanded": open, children: jsxRuntime.jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxRuntime.jsxs("div", { className: styles$r.bodyWrapper, children: [before, jsxRuntime.jsx("div", { className: `${styles$r.body} ${styles$r[size]} ${!open ? styles$r.hidden : ''} ${bodyClassName}`, children: children }), after] }), footer && (jsxRuntime.jsx("div", { className: `${styles$r.footer} ${!open ? styles$r.hidden : ''}`, children: footer }))] }));
|
|
1536
1536
|
};
|
|
1537
1537
|
/**
|
|
1538
1538
|
* Horizontal divider for Module content
|
|
1539
1539
|
*/
|
|
1540
|
-
const ModuleDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("hr", { className: `${styles$
|
|
1540
|
+
const ModuleDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("hr", { className: `${styles$r.divider} ${dark ? styles$r.dark : ''} ${className}` }));
|
|
1541
1541
|
/**
|
|
1542
1542
|
* Vertical divider for Module content
|
|
1543
1543
|
*/
|
|
1544
|
-
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$
|
|
1544
|
+
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsxRuntime.jsx("div", { className: `${styles$r.verticalDivider} ${dark ? styles$r.dark : ''} ${className}` }));
|
|
1545
1545
|
Module.displayName = 'Module';
|
|
1546
1546
|
|
|
1547
|
-
var styles$
|
|
1547
|
+
var styles$q = {"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"};
|
|
1548
1548
|
|
|
1549
1549
|
const decodeEntities = (value) => {
|
|
1550
1550
|
if (typeof document === 'undefined')
|
|
@@ -1571,36 +1571,36 @@ const PageBanners = ({ systemBanners, alertBanners, className = '', }) => {
|
|
|
1571
1571
|
const visibleAlerts = alertBanners.filter((banner) => !dismissed.has(banner.id));
|
|
1572
1572
|
if (!visibleSystem.length && !visibleAlerts.length)
|
|
1573
1573
|
return null;
|
|
1574
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1575
|
-
const content = (jsxRuntime.jsxs("div", { className: styles$
|
|
1576
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1574
|
+
return (jsxRuntime.jsxs("div", { className: [styles$q.stack, className].filter(Boolean).join(' '), role: "region", "aria-label": "Page notices", children: [visibleSystem.map((banner) => (jsxRuntime.jsxs("div", { className: [styles$q.banner, styles$q.system].join(' '), role: "status", children: [jsxRuntime.jsx(InfoIcon$1, { className: styles$q.systemIcon, size: 20, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { className: styles$q.content, children: [jsxRuntime.jsx("p", { className: styles$q.title, dangerouslySetInnerHTML: { __html: banner.html } }), banner.detailHtml && (jsxRuntime.jsx("p", { className: styles$q.detail, dangerouslySetInnerHTML: { __html: banner.detailHtml } }))] }), jsxRuntime.jsx("button", { type: "button", className: styles$q.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$q.content, children: [jsxRuntime.jsx("p", { className: [styles$q.title, styles$q.alertTitle].join(' '), children: decodeEntities(banner.title) }), banner.body && jsxRuntime.jsx("p", { className: [styles$q.detail, styles$q.clamp].join(' '), children: decodeEntities(banner.body) })] }));
|
|
1576
|
+
return (jsxRuntime.jsxs("div", { className: [styles$q.banner, styles$q.alert].join(' '), role: "alert", children: [jsxRuntime.jsx(WarningIcon$1, { className: styles$q.alertIcon, size: 20, "aria-hidden": "true" }), banner.href ? (jsxRuntime.jsx("a", { href: banner.href, className: styles$q.alertLink, children: content })) : (content), jsxRuntime.jsx("button", { type: "button", className: [styles$q.dismiss, styles$q.alertDismiss].join(' '), "aria-label": "Dismiss alert", onClick: () => dismiss(banner.id), children: jsxRuntime.jsx(CloseIcon, { size: 16 }) })] }, banner.id));
|
|
1577
1577
|
})] }));
|
|
1578
1578
|
};
|
|
1579
1579
|
|
|
1580
|
-
var styles$
|
|
1580
|
+
var styles$p = {"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"};
|
|
1581
1581
|
|
|
1582
|
-
const PlaneIcon
|
|
1583
|
-
const BusIcon
|
|
1584
|
-
const HotelIcon
|
|
1582
|
+
const PlaneIcon = () => (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" }) }));
|
|
1583
|
+
const BusIcon = () => (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" })] }));
|
|
1584
|
+
const HotelIcon = () => (jsxRuntime.jsxs("svg", { width: "20", height: "20", 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" })] }));
|
|
1585
1585
|
const DEFAULT_ICONS = {
|
|
1586
|
-
air: jsxRuntime.jsx(PlaneIcon
|
|
1587
|
-
ground: jsxRuntime.jsx(BusIcon
|
|
1588
|
-
hotel: jsxRuntime.jsx(HotelIcon
|
|
1586
|
+
air: jsxRuntime.jsx(PlaneIcon, {}),
|
|
1587
|
+
ground: jsxRuntime.jsx(BusIcon, {}),
|
|
1588
|
+
hotel: jsxRuntime.jsx(HotelIcon, {}),
|
|
1589
1589
|
};
|
|
1590
1590
|
/**
|
|
1591
1591
|
* PreferencesPanel - Displays travel preferences in a multi-column layout
|
|
1592
1592
|
*/
|
|
1593
1593
|
const PreferencesPanel = ({ title, sections, alert, footer, isLoading = false, className = '', }) => {
|
|
1594
1594
|
const panelClasses = [
|
|
1595
|
-
styles$
|
|
1596
|
-
isLoading ? styles$
|
|
1595
|
+
styles$p.panel,
|
|
1596
|
+
isLoading ? styles$p.loading : '',
|
|
1597
1597
|
className,
|
|
1598
1598
|
].filter(Boolean).join(' ');
|
|
1599
|
-
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$p.alert, children: alert })), title && jsxRuntime.jsx("h2", { className: styles$p.title, children: title }), jsxRuntime.jsx("div", { className: styles$p.grid, children: sections.map((section, i) => (jsxRuntime.jsxs("div", { className: styles$p.section, children: [jsxRuntime.jsxs("div", { className: styles$p.sectionHeader, children: [(section.icon || DEFAULT_ICONS[section.title.toLowerCase()]) && (jsxRuntime.jsx("span", { className: styles$p.sectionIcon, children: section.icon || DEFAULT_ICONS[section.title.toLowerCase()] })), jsxRuntime.jsx("h3", { className: styles$p.sectionTitle, children: section.title })] }), jsxRuntime.jsx("div", { className: styles$p.fields, children: section.fields.map((field, j) => (jsxRuntime.jsxs("div", { className: styles$p.field, children: [jsxRuntime.jsx("label", { className: styles$p.fieldLabel, children: field.label }), field.input ? (jsxRuntime.jsx("div", { className: styles$p.fieldInput, children: field.input })) : (jsxRuntime.jsx("div", { className: styles$p.fieldValue, children: field.value || '—' }))] }, j))) })] }, i))) }), footer && (jsxRuntime.jsx("div", { className: styles$p.footer, children: footer }))] }));
|
|
1600
1600
|
};
|
|
1601
1601
|
PreferencesPanel.displayName = 'PreferencesPanel';
|
|
1602
1602
|
|
|
1603
|
-
var styles$
|
|
1603
|
+
var styles$o = {"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"};
|
|
1604
1604
|
|
|
1605
1605
|
/**
|
|
1606
1606
|
* SummaryItem component displays a single label-value pair.
|
|
@@ -1609,7 +1609,7 @@ const SummaryItemRow = ({ item, value }) => {
|
|
|
1609
1609
|
if (!value)
|
|
1610
1610
|
return null;
|
|
1611
1611
|
const formattedValue = item.format ? item.format(value) : String(value);
|
|
1612
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1612
|
+
return (jsxRuntime.jsxs("div", { className: styles$o.row, children: [jsxRuntime.jsx("span", { className: styles$o.label, children: item.label }), jsxRuntime.jsx("span", { className: styles$o.value, children: formattedValue })] }));
|
|
1613
1613
|
};
|
|
1614
1614
|
/**
|
|
1615
1615
|
* SummarySection component for a group of related summary items.
|
|
@@ -1620,26 +1620,26 @@ const SummarySection = ({ section, values }) => {
|
|
|
1620
1620
|
const hasSegments = section.segments?.some(seg => seg.items.some(item => values[`${section.key}_${seg.label}_${item.label}`] || values[item.label]));
|
|
1621
1621
|
if (!hasItems && !hasSegments)
|
|
1622
1622
|
return null;
|
|
1623
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1623
|
+
return (jsxRuntime.jsxs("div", { className: styles$o.section, children: [jsxRuntime.jsx("h3", { className: styles$o.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$o.segment, children: [jsxRuntime.jsx("h4", { className: styles$o.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)))] }));
|
|
1624
1624
|
};
|
|
1625
1625
|
/**
|
|
1626
1626
|
* RequestSummary component for displaying a summary of travel request form data.
|
|
1627
1627
|
* Shows enabled sections with their filled-in values.
|
|
1628
1628
|
*/
|
|
1629
|
-
const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo, className, title = 'Request Summary', }) => {
|
|
1629
|
+
const RequestSummary$1 = ({ sections, values, enabledSections = {}, submissionInfo, className, title = 'Request Summary', }) => {
|
|
1630
1630
|
const visibleSections = sections.filter(section => enabledSections[section.key] !== false);
|
|
1631
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1631
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$o.summary} ${className || ''}`, children: [jsxRuntime.jsx("h2", { className: styles$o.title, children: title }), submissionInfo && (jsxRuntime.jsxs("div", { className: styles$o.submissionInfo, children: [jsxRuntime.jsx("span", { className: styles$o.label, children: "Submitted by" }), jsxRuntime.jsx("span", { className: styles$o.value, children: submissionInfo.submittedBy }), jsxRuntime.jsx("span", { className: styles$o.label, children: "on" }), jsxRuntime.jsx("span", { className: styles$o.value, children: submissionInfo.submittedOn })] })), jsxRuntime.jsx("div", { className: styles$o.sections, children: visibleSections.map((section) => (jsxRuntime.jsx(SummarySection, { section: section, values: values }, section.key))) }), visibleSections.length === 0 && (jsxRuntime.jsx("p", { className: styles$o.empty, children: "No services selected" }))] }));
|
|
1632
1632
|
};
|
|
1633
|
-
RequestSummary.displayName = 'RequestSummary';
|
|
1633
|
+
RequestSummary$1.displayName = 'RequestSummary';
|
|
1634
1634
|
|
|
1635
|
-
var styles$
|
|
1635
|
+
var styles$n = {"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"};
|
|
1636
1636
|
|
|
1637
1637
|
/**
|
|
1638
1638
|
* RequestFormHeader component for the fixed header in travel request forms.
|
|
1639
1639
|
*/
|
|
1640
1640
|
const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightContent, className, }) => {
|
|
1641
1641
|
const showPagination = currentPage !== undefined && totalPages !== undefined && totalPages > 1;
|
|
1642
|
-
return (jsxRuntime.jsx("header", { className: `${styles$
|
|
1642
|
+
return (jsxRuntime.jsx("header", { className: `${styles$n.header} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$n.headerContent, children: [jsxRuntime.jsxs("h1", { className: styles$n.headerTitle, children: [title, showPagination && (jsxRuntime.jsxs("span", { className: styles$n.pagination, children: ["(", currentPage, "/", totalPages, ")"] })), eventName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: styles$n.separator, children: "\u2013" }), jsxRuntime.jsx("span", { className: styles$n.eventName, children: eventName })] }))] }), rightContent && jsxRuntime.jsx("div", { className: styles$n.headerRight, children: rightContent })] }) }));
|
|
1643
1643
|
};
|
|
1644
1644
|
/**
|
|
1645
1645
|
* RequestFormFooter component for the fixed footer with navigation buttons.
|
|
@@ -1647,20 +1647,20 @@ const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightCon
|
|
|
1647
1647
|
const RequestFormFooter = ({ onPrevious, onNext, isFirstPage = false, isLastPage = false, isSubmitting = false, previousText, nextText, className, }) => {
|
|
1648
1648
|
const prevLabel = previousText || (isFirstPage ? 'Cancel' : 'Previous');
|
|
1649
1649
|
const nextLabel = nextText || (isLastPage ? 'Submit' : 'Next');
|
|
1650
|
-
return (jsxRuntime.jsx("footer", { className: `${styles$
|
|
1650
|
+
return (jsxRuntime.jsx("footer", { className: `${styles$n.footer} ${className || ''}`, children: jsxRuntime.jsxs("div", { className: styles$n.footerContent, children: [jsxRuntime.jsx("button", { type: "button", className: `${styles$n.button} ${styles$n.secondary}`, onClick: onPrevious, disabled: isSubmitting, children: prevLabel }), jsxRuntime.jsx("button", { type: "button", className: `${styles$n.button} ${styles$n.primary}`, onClick: onNext, disabled: isSubmitting, children: isSubmitting ? 'Submitting...' : nextLabel })] }) }));
|
|
1651
1651
|
};
|
|
1652
1652
|
/**
|
|
1653
1653
|
* RequestFormLayout organism for travel request forms.
|
|
1654
1654
|
* Provides a three-column layout with fixed header and footer.
|
|
1655
1655
|
*/
|
|
1656
1656
|
const RequestFormLayout = ({ header, sidebar, children, summary, footer, className, showSidebarOnMobile = false, }) => {
|
|
1657
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1657
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$n.layout} ${className || ''}`, children: [header, jsxRuntime.jsxs("div", { className: styles$n.body, children: [sidebar && (jsxRuntime.jsx("aside", { className: `${styles$n.sidebar} ${showSidebarOnMobile ? styles$n.showOnMobile : ''}`, children: jsxRuntime.jsx("div", { className: styles$n.sidebarContent, children: sidebar }) })), jsxRuntime.jsx("main", { className: styles$n.main, children: jsxRuntime.jsx("div", { className: styles$n.mainContent, children: children }) }), summary && (jsxRuntime.jsx("aside", { className: styles$n.summarySidebar, children: jsxRuntime.jsx("div", { className: styles$n.summaryContent, children: summary }) }))] }), footer] }));
|
|
1658
1658
|
};
|
|
1659
1659
|
RequestFormLayout.displayName = 'RequestFormLayout';
|
|
1660
1660
|
RequestFormHeader.displayName = 'RequestFormHeader';
|
|
1661
1661
|
RequestFormFooter.displayName = 'RequestFormFooter';
|
|
1662
1662
|
|
|
1663
|
-
var styles$
|
|
1663
|
+
var styles$m = {"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"};
|
|
1664
1664
|
|
|
1665
1665
|
const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false, hoverable = true, compact = false, loading = false, emptyMessage = 'No data available', onRowClick, className = '', }) => {
|
|
1666
1666
|
const [sortColumn, setSortColumn] = React.useState(null);
|
|
@@ -1698,12 +1698,12 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
1698
1698
|
}
|
|
1699
1699
|
return row[rowKey] ?? index;
|
|
1700
1700
|
};
|
|
1701
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
1701
|
+
return (jsxRuntime.jsx("div", { className: `${styles$m.wrapper} ${className}`, children: jsxRuntime.jsxs("table", { className: `${styles$m.table} ${bordered ? styles$m.bordered : ''} ${striped ? styles$m.striped : ''} ${hoverable ? styles$m.hoverable : ''} ${compact ? styles$m.compact : ''}`, children: [jsxRuntime.jsx("thead", { className: styles$m.header, children: jsxRuntime.jsx("tr", { children: columns.map((column) => (jsxRuntime.jsx("th", { className: `${styles$m.headerCell} ${column.sortable ? styles$m.sortable : ''} ${styles$m[`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$m.headerContent, children: [column.label, column.sortable && (jsxRuntime.jsx("span", { className: styles$m.sortIcon, children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key))) }) }), jsxRuntime.jsx("tbody", { className: styles$m.body, children: loading ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles$m.loading, children: "Loading..." }) })) : sortedData.length === 0 ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: columns.length, className: styles$m.empty, children: emptyMessage }) })) : (sortedData.map((row, rowIndex) => (jsxRuntime.jsx("tr", { className: `${styles$m.row} ${onRowClick ? styles$m.clickable : ''}`, onClick: () => onRowClick?.(row, rowIndex), children: columns.map((column) => (jsxRuntime.jsx("td", { className: `${styles$m.cell} ${styles$m[`align${(column.align || 'left').charAt(0).toUpperCase()}${(column.align || 'left').slice(1)}`]}`, children: column.render
|
|
1702
1702
|
? column.render(row[column.key], row, rowIndex)
|
|
1703
1703
|
: row[column.key] }, column.key))) }, getRowKey(row, rowIndex))))) })] }) }));
|
|
1704
1704
|
};
|
|
1705
1705
|
|
|
1706
|
-
var styles$
|
|
1706
|
+
var styles$l = {"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"};
|
|
1707
1707
|
|
|
1708
1708
|
const TEAM_GROUPS = [
|
|
1709
1709
|
{ label: 'All', key: undefined },
|
|
@@ -1737,26 +1737,26 @@ const TeamCard = ({ title = 'Administer Teams', icon, teams, onTeamSelect, class
|
|
|
1737
1737
|
return teams.filter(team => team.category === activeTab);
|
|
1738
1738
|
}, [teams, activeTab]);
|
|
1739
1739
|
const cardClasses = [
|
|
1740
|
-
styles$
|
|
1740
|
+
styles$l.card,
|
|
1741
1741
|
className,
|
|
1742
1742
|
].filter(Boolean).join(' ');
|
|
1743
|
-
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$l.header, children: [jsxRuntime.jsx("span", { className: styles$l.icon, children: icon || jsxRuntime.jsx(UsersIcon, {}) }), jsxRuntime.jsx("h3", { className: styles$l.title, children: title })] }), jsxRuntime.jsxs("div", { className: styles$l.body, children: [jsxRuntime.jsx("div", { className: styles$l.tabs, children: TEAM_GROUPS.map(({ label, key }) => (jsxRuntime.jsx("button", { type: "button", onClick: () => setActiveTab(key), className: `${styles$l.tab} ${activeTab === key ? styles$l.tabActive : ''}`, children: label }, label))) }), jsxRuntime.jsxs("div", { className: styles$l.list, children: [filteredTeams.map((team) => (jsxRuntime.jsxs("button", { type: "button", className: styles$l.teamItem, onClick: () => onTeamSelect?.(team), children: [jsxRuntime.jsx("span", { className: styles$l.teamCode, style: { backgroundColor: getTeamColor(team.code) }, children: team.code }), jsxRuntime.jsx("span", { className: styles$l.teamName, children: team.description }), jsxRuntime.jsx("span", { className: styles$l.chevron, children: jsxRuntime.jsx(ChevronRightIcon, {}) })] }, team.id))), filteredTeams.length === 0 && (jsxRuntime.jsx("div", { className: styles$l.empty, children: "No teams found" }))] })] })] }));
|
|
1744
1744
|
};
|
|
1745
1745
|
TeamCard.displayName = 'TeamCard';
|
|
1746
1746
|
|
|
1747
|
-
var styles$
|
|
1747
|
+
var styles$k = {"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"};
|
|
1748
1748
|
|
|
1749
1749
|
/** Exact presentational counterpart of Hub's Team Schedule action controls. */
|
|
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$
|
|
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$k.actions, className].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$k.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$k.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$k.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$k.tripCount, children: [tripCount, " trips displayed"] })] }), isCompactView && (jsxRuntime.jsxs("div", { className: styles$k.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" })] }))] }));
|
|
1751
1751
|
|
|
1752
|
-
var styles$
|
|
1752
|
+
var styles$j = {"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"};
|
|
1753
1753
|
|
|
1754
1754
|
const DEFAULT_TRIP_HEADERS = ['', 'GTR', 'Trvl Start', 'Trvl End', 'Trip Name', 'Services', ''];
|
|
1755
1755
|
const DEFAULT_EVENT_HEADERS = ['', 'Event Date', 'Opponent/Host', 'Event Title', 'Hm/Awy', ''];
|
|
1756
1756
|
/** Hub's two-panel compact Team Schedule shell. Editable rows remain injectable. */
|
|
1757
|
-
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$j.schedule, className].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$j.headers, children: [jsxRuntime.jsx("div", { className: styles$j.tripHeader, children: tripHeaders.map((header, index) => jsxRuntime.jsx("div", { children: header }, index)) }), jsxRuntime.jsx("div", { className: styles$j.eventHeader, children: eventHeaders.map((header, index) => jsxRuntime.jsx("div", { children: header }, index)) })] }), jsxRuntime.jsx("div", { className: styles$j.table, children: !rows.length ? jsxRuntime.jsx("div", { className: styles$j.empty, children: "No data available." }) : rows.map((row) => (jsxRuntime.jsxs("div", { className: styles$j.row, children: [jsxRuntime.jsx("div", { className: styles$j.trip, children: row.trip }), jsxRuntime.jsx("div", { className: styles$j.events, children: row.events })] }, row.id))) }), jsxRuntime.jsx("div", { className: styles$j.addRow, children: jsxRuntime.jsxs("button", { type: "button", disabled: addEventDisabled, onClick: onAddEvent, children: ["Add Event ", jsxRuntime.jsx(PlusIcon$2, { size: 16 })] }) })] }));
|
|
1758
1758
|
|
|
1759
|
-
var styles$
|
|
1759
|
+
var styles$i = {"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"};
|
|
1760
1760
|
|
|
1761
1761
|
const parseLocalDate = (value) => {
|
|
1762
1762
|
if (!value)
|
|
@@ -1789,9 +1789,9 @@ const headers = [
|
|
|
1789
1789
|
{ key: 'sportCode', label: 'Sport', icon: jsxRuntime.jsx(RunningIcon, {}) },
|
|
1790
1790
|
{ key: 'travelStartDate', label: 'Date(s)', icon: jsxRuntime.jsx(CalendarIcon$1, { size: 16 }) },
|
|
1791
1791
|
{ key: 'tripName', label: 'Trip Name', icon: jsxRuntime.jsx(DocumentIcon, { size: 16 }) },
|
|
1792
|
-
{ label: 'Air', icon: jsxRuntime.jsx(PlaneIcon$
|
|
1792
|
+
{ label: 'Air', icon: jsxRuntime.jsx(PlaneIcon$3, { size: 16 }) },
|
|
1793
1793
|
{ label: 'Ground', icon: jsxRuntime.jsx(GroundIcon, {}) },
|
|
1794
|
-
{ label: 'Hotel', icon: jsxRuntime.jsx(HotelIcon$
|
|
1794
|
+
{ label: 'Hotel', icon: jsxRuntime.jsx(HotelIcon$3, { size: 16 }) },
|
|
1795
1795
|
];
|
|
1796
1796
|
/** Hub's read-only expanded Team Schedule table. */
|
|
1797
1797
|
const TeamScheduleExpandedTable = ({ rows, teamCode, onTripClick, emptyMessage = 'No data available.', className = '' }) => {
|
|
@@ -1810,20 +1810,20 @@ const TeamScheduleExpandedTable = ({ rows, teamCode, onTripClick, emptyMessage =
|
|
|
1810
1810
|
setAscending(true);
|
|
1811
1811
|
}
|
|
1812
1812
|
};
|
|
1813
|
-
return (jsxRuntime.jsxs("div", { className: [styles$
|
|
1813
|
+
return (jsxRuntime.jsxs("div", { className: [styles$i.table, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx("div", { className: styles$i.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$i.empty, children: emptyMessage }) : jsxRuntime.jsx("div", { className: styles$i.body, children: sortedRows.map((row) => {
|
|
1814
1814
|
const values = [
|
|
1815
1815
|
teamCode ?? row.sportCode ?? '–',
|
|
1816
1816
|
formatTeamScheduleTravelDates(row.travelStartDate, row.travelEndDate),
|
|
1817
|
-
jsxRuntime.jsx("button", { type: "button", className: styles$
|
|
1817
|
+
jsxRuntime.jsx("button", { type: "button", className: styles$i.tripLink, onClick: () => onTripClick?.(row), children: row.tripName }),
|
|
1818
1818
|
row.airSegment,
|
|
1819
1819
|
row.groundSegment,
|
|
1820
1820
|
row.hotelSegment,
|
|
1821
1821
|
];
|
|
1822
|
-
return jsxRuntime.jsx("div", { className: styles$
|
|
1822
|
+
return jsxRuntime.jsx("div", { className: styles$i.row, children: values.map((value, index) => jsxRuntime.jsxs("div", { className: styles$i.cell, children: [jsxRuntime.jsxs("span", { className: styles$i.mobileLabel, children: [headers[index].icon, headers[index].label] }), jsxRuntime.jsx("div", { children: value || '–' })] }, headers[index].label)) }, row.masterTripGUID || row.tripName);
|
|
1823
1823
|
}) })] }));
|
|
1824
1824
|
};
|
|
1825
1825
|
|
|
1826
|
-
var styles$
|
|
1826
|
+
var styles$h = {"tripRow":"TeamScheduleEditor-module_tripRow__EgrxR","eventRow":"TeamScheduleEditor-module_eventRow__DaHf9","cell":"TeamScheduleEditor-module_cell__eocMi","actionsCell":"TeamScheduleEditor-module_actionsCell__mQ-30","services":"TeamScheduleEditor-module_services__DvbXH","inactiveService":"TeamScheduleEditor-module_inactiveService__WcyOT","gtrButton":"TeamScheduleEditor-module_gtrButton__D1ZXr","eventList":"TeamScheduleEditor-module_eventList__-F-3-"};
|
|
1827
1827
|
|
|
1828
1828
|
const EMPTY_EVENT = {
|
|
1829
1829
|
eventDate: '',
|
|
@@ -1847,37 +1847,37 @@ const TripRow = ({ trip, editing, selected, disabled, onSelectedChange, onEdit,
|
|
|
1847
1847
|
const [draft, setDraft] = React.useState(editing);
|
|
1848
1848
|
const values = draft ?? editing;
|
|
1849
1849
|
if (editing && values) {
|
|
1850
|
-
return (jsxRuntime.jsxs("form", { className: styles$
|
|
1850
|
+
return (jsxRuntime.jsxs("form", { className: styles$h.tripRow, "aria-label": `Edit trip ${trip.tripName}`, onSubmit: (event) => {
|
|
1851
1851
|
event.preventDefault();
|
|
1852
1852
|
onSave(values);
|
|
1853
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
1853
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx(Checkbox, { "aria-label": `Select trip ${trip.tripName}`, checked: selected, disabled: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx("button", { type: "button", className: styles$h.gtrButton, "aria-label": `Open group travel request for ${trip.tripName}`, disabled: true, children: trip.gtrExists ? jsxRuntime.jsx(DocumentIcon, { size: 18 }) : jsxRuntime.jsx(PlusIcon$2, { size: 18 }) }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Trvl Start", children: jsxRuntime.jsx(Input, { "aria-label": "Travel Start", type: "date", size: "sm", value: values.travelStartDate, onChange: (event) => setDraft({ ...values, travelStartDate: event.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Trvl End", children: jsxRuntime.jsx(Input, { "aria-label": "Travel End", type: "date", size: "sm", min: values.travelStartDate, value: values.travelEndDate, onChange: (event) => setDraft({ ...values, travelEndDate: event.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Trip Name", children: jsxRuntime.jsx(Input, { "aria-label": "Trip Name", size: "sm", value: values.tripName, onChange: (event) => setDraft({ ...values, tripName: event.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Services", children: jsxRuntime.jsx(ServiceCodes, { services: trip.services }) }), jsxRuntime.jsxs("div", { className: `${styles$h.cell} ${styles$h.actionsCell}`, children: [jsxRuntime.jsx(Button, { type: "submit", variant: "ghost", size: "sm", square: true, "aria-label": `Save trip ${trip.tripName}`, children: jsxRuntime.jsx(CheckIcon$2, { size: 17 }) }), jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": `Cancel trip ${trip.tripName}`, onClick: onCancel, children: jsxRuntime.jsx(XIcon, { size: 17 }) })] })] }));
|
|
1854
1854
|
}
|
|
1855
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1855
|
+
return (jsxRuntime.jsxs("div", { className: styles$h.tripRow, children: [jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx(Checkbox, { "aria-label": `Select trip ${trip.tripName}`, checked: selected, onChange: (event) => onSelectedChange(event.target.checked), disabled: disabled }) }), jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx("button", { type: "button", className: styles$h.gtrButton, "aria-label": `Open group travel request for ${trip.tripName}`, onClick: onOpenGroupTravelRequest, disabled: disabled, children: trip.gtrExists ? jsxRuntime.jsx(DocumentIcon, { size: 18 }) : jsxRuntime.jsx(PlusIcon$2, { size: 18 }) }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Trvl Start", children: dateLabel(trip.travelStartDate) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Trvl End", children: dateLabel(trip.travelEndDate) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Trip Name", children: trip.tripName }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Services", children: jsxRuntime.jsx(ServiceCodes, { services: trip.services }) }), jsxRuntime.jsxs("div", { className: `${styles$h.cell} ${styles$h.actionsCell}`, children: [jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": `Edit trip ${trip.tripName}`, onClick: onEdit, disabled: disabled, children: jsxRuntime.jsx(EditIcon$2, { size: 17 }) }), jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": `Delete trip ${trip.tripName}`, onClick: onDelete, disabled: disabled, children: jsxRuntime.jsx(TrashIcon$2, { size: 17 }) })] })] }));
|
|
1856
1856
|
};
|
|
1857
|
-
const ServiceCodes = ({ services }) => (jsxRuntime.jsx("div", { className: styles$
|
|
1857
|
+
const ServiceCodes = ({ services }) => (jsxRuntime.jsx("div", { className: styles$h.services, children: serviceLabels(services).map(({ service, active }) => jsxRuntime.jsx("span", { className: active ? '' : styles$h.inactiveService, children: service }, service)) }));
|
|
1858
1858
|
const EventRow = ({ event, editing, selected, disabled, opponentOptions, onSelectedChange, onEdit, onSave, onCancel, onDelete, }) => {
|
|
1859
1859
|
const [draft, setDraft] = React.useState(editing);
|
|
1860
1860
|
const values = draft ?? editing;
|
|
1861
1861
|
if (editing && values) {
|
|
1862
|
-
return (jsxRuntime.jsxs("form", { className: styles$
|
|
1862
|
+
return (jsxRuntime.jsxs("form", { className: styles$h.eventRow, "aria-label": `Edit event ${event.eventTitle}`, onSubmit: (submitEvent) => {
|
|
1863
1863
|
submitEvent.preventDefault();
|
|
1864
1864
|
onSave(values);
|
|
1865
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
1865
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx(Checkbox, { "aria-label": `Select event ${event.eventTitle}`, checked: selected, disabled: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Event Date", children: jsxRuntime.jsx(Input, { "aria-label": "Event Date", type: "date", size: "sm", value: values.eventDate, onChange: (changeEvent) => setDraft({ ...values, eventDate: changeEvent.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsxs("div", { className: styles$h.cell, "data-label": "Opponent/Host", children: [jsxRuntime.jsx(Input, { "aria-label": "Opponent or Host", size: "sm", list: "team-schedule-opponents", value: values.opponent, onChange: (changeEvent) => {
|
|
1866
1866
|
const opponent = changeEvent.target.value;
|
|
1867
1867
|
setDraft({ ...values, opponent, eventTitle: values.eventTitle || opponent });
|
|
1868
|
-
}, required: true, fullWidth: true }), jsxRuntime.jsx("datalist", { id: "team-schedule-opponents", children: opponentOptions.map((option) => jsxRuntime.jsx("option", { value: option }, option)) })] }), jsxRuntime.jsx("div", { className: styles$
|
|
1868
|
+
}, required: true, fullWidth: true }), jsxRuntime.jsx("datalist", { id: "team-schedule-opponents", children: opponentOptions.map((option) => jsxRuntime.jsx("option", { value: option }, option)) })] }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Event Title", children: jsxRuntime.jsx(Input, { "aria-label": "Event Title", size: "sm", value: values.eventTitle, onChange: (changeEvent) => setDraft({ ...values, eventTitle: changeEvent.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Hm/Awy", children: jsxRuntime.jsx(Select, { "aria-label": "Home or Away", size: "sm", options: ['Home', 'Away', 'Neutral'].map((option) => ({ label: option, value: option })), value: values.homeOrAway, onChange: (changeEvent) => setDraft({ ...values, homeOrAway: changeEvent.target.value }), fullWidth: true }) }), jsxRuntime.jsxs("div", { className: `${styles$h.cell} ${styles$h.actionsCell}`, children: [jsxRuntime.jsx(Button, { type: "submit", variant: "ghost", size: "sm", square: true, "aria-label": `Save event ${event.eventTitle}`, children: jsxRuntime.jsx(CheckIcon$2, { size: 17 }) }), jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": `Cancel event ${event.eventTitle}`, onClick: onCancel, children: jsxRuntime.jsx(XIcon, { size: 17 }) })] })] }));
|
|
1869
1869
|
}
|
|
1870
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1870
|
+
return (jsxRuntime.jsxs("div", { className: styles$h.eventRow, children: [jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx(Checkbox, { "aria-label": `Select event ${event.eventTitle}`, checked: selected, onChange: (changeEvent) => onSelectedChange(changeEvent.target.checked), disabled: disabled || event.mergeable === false }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Event Date", children: dateLabel(event.eventDate) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Opponent/Host", children: event.opponent || '–' }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Event Title", children: event.eventTitle || '–' }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Hm/Awy", children: event.homeOrAway }), jsxRuntime.jsxs("div", { className: `${styles$h.cell} ${styles$h.actionsCell}`, children: [jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": `Edit event ${event.eventTitle}`, onClick: onEdit, disabled: disabled, children: jsxRuntime.jsx(EditIcon$2, { size: 17 }) }), jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": `Delete event ${event.eventTitle}`, onClick: onDelete, disabled: disabled, children: jsxRuntime.jsx(TrashIcon$2, { size: 17 }) })] })] }));
|
|
1871
1871
|
};
|
|
1872
1872
|
const NewEventRow = ({ values: initialValues, opponentOptions, onSave, onCancel, }) => {
|
|
1873
1873
|
const [values, setValues] = React.useState(initialValues);
|
|
1874
|
-
return (jsxRuntime.jsxs("form", { className: styles$
|
|
1874
|
+
return (jsxRuntime.jsxs("form", { className: styles$h.eventRow, "aria-label": "Add event", onSubmit: (event) => {
|
|
1875
1875
|
event.preventDefault();
|
|
1876
1876
|
onSave(values);
|
|
1877
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
1877
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$h.cell, children: jsxRuntime.jsx(Checkbox, { "aria-label": "Select new event", disabled: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Event Date", children: jsxRuntime.jsx(Input, { "aria-label": "Event Date", type: "date", size: "sm", value: values.eventDate, onChange: (event) => setValues({ ...values, eventDate: event.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsxs("div", { className: styles$h.cell, "data-label": "Opponent/Host", children: [jsxRuntime.jsx(Input, { "aria-label": "Opponent or Host", size: "sm", list: "team-schedule-new-opponents", value: values.opponent, onChange: (event) => {
|
|
1878
1878
|
const opponent = event.target.value;
|
|
1879
1879
|
setValues({ ...values, opponent, eventTitle: values.eventTitle || opponent });
|
|
1880
|
-
}, required: true, fullWidth: true }), jsxRuntime.jsx("datalist", { id: "team-schedule-new-opponents", children: opponentOptions.map((option) => jsxRuntime.jsx("option", { value: option }, option)) })] }), jsxRuntime.jsx("div", { className: styles$
|
|
1880
|
+
}, required: true, fullWidth: true }), jsxRuntime.jsx("datalist", { id: "team-schedule-new-opponents", children: opponentOptions.map((option) => jsxRuntime.jsx("option", { value: option }, option)) })] }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Event Title", children: jsxRuntime.jsx(Input, { "aria-label": "Event Title", size: "sm", value: values.eventTitle, onChange: (event) => setValues({ ...values, eventTitle: event.target.value }), required: true, fullWidth: true }) }), jsxRuntime.jsx("div", { className: styles$h.cell, "data-label": "Hm/Awy", children: jsxRuntime.jsx(Select, { "aria-label": "Home or Away", size: "sm", options: ['Home', 'Away', 'Neutral'].map((option) => ({ label: option, value: option })), value: values.homeOrAway, onChange: (event) => setValues({ ...values, homeOrAway: event.target.value }), fullWidth: true }) }), jsxRuntime.jsxs("div", { className: `${styles$h.cell} ${styles$h.actionsCell}`, children: [jsxRuntime.jsx(Button, { type: "submit", variant: "ghost", size: "sm", square: true, "aria-label": "Save new event", children: jsxRuntime.jsx(CheckIcon$2, { size: 17 }) }), jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", square: true, "aria-label": "Cancel new event", onClick: onCancel, children: jsxRuntime.jsx(XIcon, { size: 17 }) })] })] }));
|
|
1881
1881
|
};
|
|
1882
1882
|
const TeamScheduleEditor = ({ rows, initialRows = [], opponentOptions = [], onChange, onSaveTrip, onDeleteTrip, onSaveEvent, onDeleteEvent, onOpenGroupTravelRequest, onSelectedTripsChange, onSelectedEventsChange, className, }) => {
|
|
1883
1883
|
const [internalRows, setInternalRows] = React.useState(initialRows);
|
|
@@ -1949,7 +1949,7 @@ const TeamScheduleEditor = ({ rows, initialRows = [], opponentOptions = [], onCh
|
|
|
1949
1949
|
const tableRows = scheduleRows.map((trip) => ({
|
|
1950
1950
|
id: trip.id,
|
|
1951
1951
|
trip: (jsxRuntime.jsx(TripRow, { trip: trip, editing: editState?.kind === 'trip' && editState.tripId === trip.id ? editState.values : undefined, selected: selectedTrips.includes(trip.id), disabled: Boolean(editState), onSelectedChange: (selected) => changeSelectedTrips(toggleSelection(selectedTrips, trip.id, selected)), onEdit: () => setEditState({ kind: 'trip', tripId: trip.id, values: { travelStartDate: trip.travelStartDate, travelEndDate: trip.travelEndDate, tripName: trip.tripName } }), onSave: (values) => saveTrip(trip, values), onCancel: () => setEditState(null), onDelete: () => setDeleteState({ kind: 'trip', trip }), onOpenGroupTravelRequest: () => onOpenGroupTravelRequest?.(trip) }, editState?.kind === 'trip' && editState.tripId === trip.id ? `trip-edit-${trip.id}` : `trip-view-${trip.id}`)),
|
|
1952
|
-
events: (jsxRuntime.jsx("div", { className: styles$
|
|
1952
|
+
events: (jsxRuntime.jsx("div", { className: styles$h.eventList, children: trip.events.map((event) => (jsxRuntime.jsx(EventRow, { event: event, editing: editState?.kind === 'event' && editState.eventId === event.id ? editState.values : undefined, selected: selectedEvents.includes(event.id), disabled: Boolean(editState), opponentOptions: opponentOptions, onSelectedChange: (selected) => changeSelectedEvents(toggleSelection(selectedEvents, event.id, selected)), onEdit: () => setEditState({ kind: 'event', tripId: trip.id, eventId: event.id, values: { eventDate: event.eventDate, opponent: event.opponent, eventTitle: event.eventTitle, homeOrAway: event.homeOrAway } }), onSave: (values) => saveEvent(trip, event, values), onCancel: () => setEditState(null), onDelete: () => setDeleteState({ kind: 'event', trip, event }) }, editState?.kind === 'event' && editState.eventId === event.id ? `event-edit-${event.id}` : `event-view-${event.id}`))) })),
|
|
1953
1953
|
}));
|
|
1954
1954
|
if (editState?.kind === 'new-event') {
|
|
1955
1955
|
tableRows.push({
|
|
@@ -1976,6 +1976,188 @@ const TeamScheduleEditor = ({ rows, initialRows = [], opponentOptions = [], onCh
|
|
|
1976
1976
|
], rows: tableRows, onAddEvent: () => setEditState({ kind: 'new-event', values: EMPTY_EVENT }), addEventDisabled: Boolean(editState) }), jsxRuntime.jsx(ConfirmModal, { isOpen: Boolean(deleteState), onClose: () => setDeleteState(null), onConfirm: confirmDelete, title: `Delete ${deleteState?.kind === 'trip' ? 'Trip' : 'Event'}`, message: `Are you sure you would like to delete this ${deleteState?.kind ?? 'record'}?`, confirmText: "Delete", destructive: true })] }));
|
|
1977
1977
|
};
|
|
1978
1978
|
|
|
1979
|
+
var styles$g = {"toolbar":"TeamTravelCalendarViews-module_toolbar__5t4I2","todayButton":"TeamTravelCalendarViews-module_todayButton__-C90j","periodNavigation":"TeamTravelCalendarViews-module_periodNavigation__J9S80","navigationButton":"TeamTravelCalendarViews-module_navigationButton__j-2Bn","periodButton":"TeamTravelCalendarViews-module_periodButton__W-UmM","calendarView":"TeamTravelCalendarViews-module_calendarView__FVQKl","cardView":"TeamTravelCalendarViews-module_cardView__3w9PZ","listView":"TeamTravelCalendarViews-module_listView__4Ro3J","weekdayRow":"TeamTravelCalendarViews-module_weekdayRow__rPqds","calendarGrid":"TeamTravelCalendarViews-module_calendarGrid__L3MoK","weekday":"TeamTravelCalendarViews-module_weekday__Ozwh8","weekdayShort":"TeamTravelCalendarViews-module_weekdayShort__kAxAP","calendarDay":"TeamTravelCalendarViews-module_calendarDay__imFhq","outsidePeriod":"TeamTravelCalendarViews-module_outsidePeriod__FkfcK","today":"TeamTravelCalendarViews-module_today__h-el6","dayNumber":"TeamTravelCalendarViews-module_dayNumber__d4FpZ","dayItems":"TeamTravelCalendarViews-module_dayItems__r5TFy","tripEvent":"TeamTravelCalendarViews-module_tripEvent__Np4nN","sportTag":"TeamTravelCalendarViews-module_sportTag__-EPtk","dueSportTag":"TeamTravelCalendarViews-module_dueSportTag__tb-mi","eventName":"TeamTravelCalendarViews-module_eventName__bZBBx","dueDateName":"TeamTravelCalendarViews-module_dueDateName__LX6Xv","dueDateEvent":"TeamTravelCalendarViews-module_dueDateEvent__HV2JF","statusButton":"TeamTravelCalendarViews-module_statusButton__SNqiu","listStatusButton":"TeamTravelCalendarViews-module_listStatusButton__vT9zM","completeStatus":"TeamTravelCalendarViews-module_completeStatus__3Vd2E","overdueStatus":"TeamTravelCalendarViews-module_overdueStatus__6G4eC","teamGroups":"TeamTravelCalendarViews-module_teamGroups__9g2sK","teamGroup":"TeamTravelCalendarViews-module_teamGroup__Rlmp2","teamPanel":"TeamTravelCalendarViews-module_teamPanel__u1E8J","teamIdentity":"TeamTravelCalendarViews-module_teamIdentity__Pe53X","teamCode":"TeamTravelCalendarViews-module_teamCode__w9Utr","infoTiles":"TeamTravelCalendarViews-module_infoTiles__PyPHh","infoTile":"TeamTravelCalendarViews-module_infoTile__t-mEg","cardsScroller":"TeamTravelCalendarViews-module_cardsScroller__Y6aJw","tripCard":"TeamTravelCalendarViews-module_tripCard__2LPBR","featuredCard":"TeamTravelCalendarViews-module_featuredCard__B4nvH","tripCardHeader":"TeamTravelCalendarViews-module_tripCardHeader__-ARSM","dueDateColumnHeader":"TeamTravelCalendarViews-module_dueDateColumnHeader__nayVI","dateLabel":"TeamTravelCalendarViews-module_dateLabel__OJY64","progressBadge":"TeamTravelCalendarViews-module_progressBadge__vJoU9","progressCircle":"TeamTravelCalendarViews-module_progressCircle__8YfEC","tripCardTitle":"TeamTravelCalendarViews-module_tripCardTitle__E-YJ5","serviceGrid":"TeamTravelCalendarViews-module_serviceGrid__5rwTv","serviceTile":"TeamTravelCalendarViews-module_serviceTile__F1Oge","air":"TeamTravelCalendarViews-module_air__Ald0h","ground":"TeamTravelCalendarViews-module_ground__eN71m","hotel":"TeamTravelCalendarViews-module_hotel__paHF-","serviceLabel":"TeamTravelCalendarViews-module_serviceLabel__vaNlz","bookingStatus":"TeamTravelCalendarViews-module_bookingStatus__xrru7","requestStatus":"TeamTravelCalendarViews-module_requestStatus__Oeppm","tableStatus":"TeamTravelCalendarViews-module_tableStatus__yoM6Z","tableRequest":"TeamTravelCalendarViews-module_tableRequest__LRSjx","tripEvents":"TeamTravelCalendarViews-module_tripEvents__36pK5","tripEventDetail":"TeamTravelCalendarViews-module_tripEventDetail__ev8-C","star":"TeamTravelCalendarViews-module_star__w0-ji","opponentLine":"TeamTravelCalendarViews-module_opponentLine__35K7l","homeAway":"TeamTravelCalendarViews-module_homeAway__8dpYe","venueLine":"TeamTravelCalendarViews-module_venueLine__il1nq","dueDateColumn":"TeamTravelCalendarViews-module_dueDateColumn__dHHT9","dueDateCards":"TeamTravelCalendarViews-module_dueDateCards__oQYwk","dueDateCard":"TeamTravelCalendarViews-module_dueDateCard__E61iS","dueCardCopy":"TeamTravelCalendarViews-module_dueCardCopy__dxvuE","emptyState":"TeamTravelCalendarViews-module_emptyState__6Rwjp","resultCount":"TeamTravelCalendarViews-module_resultCount__rtH-2","tableScroller":"TeamTravelCalendarViews-module_tableScroller__PCl6F","travelTable":"TeamTravelCalendarViews-module_travelTable__gxhK9","tableSport":"TeamTravelCalendarViews-module_tableSport__CDOnL","tableLink":"TeamTravelCalendarViews-module_tableLink__PKEym","tableProgress":"TeamTravelCalendarViews-module_tableProgress__wsMuj","dueDateTable":"TeamTravelCalendarViews-module_dueDateTable__YwP10","weekdayLong":"TeamTravelCalendarViews-module_weekdayLong__irl1L"};
|
|
1980
|
+
|
|
1981
|
+
const ChevronLeft$1 = () => (jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) }));
|
|
1982
|
+
const ChevronRight$2 = () => (jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) }));
|
|
1983
|
+
const CalendarGlyph = () => (jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: [jsxRuntime.jsx("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }), jsxRuntime.jsx("path", { d: "M16 3v4M8 3v4M3 10h18" })] }));
|
|
1984
|
+
const PlaneGlyph = () => (jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", width: "15", height: "15", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: [jsxRuntime.jsx("path", { d: "m22 2-7 20-4-9-9-4 20-7Z" }), jsxRuntime.jsx("path", { d: "M22 2 11 13" })] }));
|
|
1985
|
+
const BusGlyph = () => (jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", width: "15", height: "15", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: [jsxRuntime.jsx("rect", { x: "4", y: "3", width: "16", height: "17", rx: "3" }), jsxRuntime.jsx("path", { d: "M4 11h16M8 20v2M16 20v2M8 15h.01M16 15h.01" })] }));
|
|
1986
|
+
const HotelGlyph = () => (jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "15", height: "15", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: jsxRuntime.jsx("path", { d: "M3 21V3h14v18M17 9h4v12M7 7h2M12 7h2M7 11h2M12 11h2M7 15h2M12 15h2M2 21h20" }) }));
|
|
1987
|
+
const StarGlyph = () => (jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "17", height: "17", fill: "currentColor", "aria-hidden": "true", children: jsxRuntime.jsx("path", { d: "m12 2.5 2.9 5.88 6.5.95-4.7 4.58 1.1 6.47L12 17.32l-5.8 3.06 1.1-6.47-4.7-4.58 6.5-.95L12 2.5Z" }) }));
|
|
1988
|
+
const CheckGlyph = () => (jsxRuntime.jsxs("svg", { viewBox: "0 0 20 20", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: [jsxRuntime.jsx("circle", { cx: "10", cy: "10", r: "9" }), jsxRuntime.jsx("path", { d: "m6 10 2.5 2.5L14.5 7", fill: "none", stroke: "white", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
1989
|
+
const CircleGlyph = () => (jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: jsxRuntime.jsx("circle", { cx: "10", cy: "10", r: "8" }) }));
|
|
1990
|
+
const parseDate = (value) => {
|
|
1991
|
+
if (value instanceof Date)
|
|
1992
|
+
return new Date(value.getFullYear(), value.getMonth(), value.getDate());
|
|
1993
|
+
const match = value.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
1994
|
+
if (match)
|
|
1995
|
+
return new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3]));
|
|
1996
|
+
const parsed = new Date(value);
|
|
1997
|
+
return new Date(parsed.getFullYear(), parsed.getMonth(), parsed.getDate());
|
|
1998
|
+
};
|
|
1999
|
+
const addDays = (date, amount) => {
|
|
2000
|
+
const next = new Date(date);
|
|
2001
|
+
next.setDate(next.getDate() + amount);
|
|
2002
|
+
return next;
|
|
2003
|
+
};
|
|
2004
|
+
const dateKey = (date) => [
|
|
2005
|
+
date.getFullYear(),
|
|
2006
|
+
String(date.getMonth() + 1).padStart(2, '0'),
|
|
2007
|
+
String(date.getDate()).padStart(2, '0'),
|
|
2008
|
+
].join('-');
|
|
2009
|
+
const startOfWeek = (date) => addDays(date, -((date.getDay() + 6) % 7));
|
|
2010
|
+
const formatShortDate = (value) => {
|
|
2011
|
+
if (!value)
|
|
2012
|
+
return 'None';
|
|
2013
|
+
return parseDate(value).toLocaleDateString('en-US', { month: 'numeric', day: 'numeric', year: 'numeric' });
|
|
2014
|
+
};
|
|
2015
|
+
const formatDateRange = (start, end) => {
|
|
2016
|
+
const startDate = parseDate(start);
|
|
2017
|
+
const endDate = parseDate(end);
|
|
2018
|
+
if (dateKey(startDate) === dateKey(endDate)) {
|
|
2019
|
+
return startDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
2020
|
+
}
|
|
2021
|
+
const startLabel = startDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
|
|
2022
|
+
const endLabel = endDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
2023
|
+
return `${startLabel} – ${endLabel}`;
|
|
2024
|
+
};
|
|
2025
|
+
const formatLongDate = (value) => value
|
|
2026
|
+
? parseDate(value).toLocaleDateString('en-US', { month: 'long', day: '2-digit', year: 'numeric' })
|
|
2027
|
+
: '–';
|
|
2028
|
+
const isCompleted = (dueDate) => {
|
|
2029
|
+
const status = dueDate.status?.toLowerCase();
|
|
2030
|
+
return status === 'complete' || status === 'completed' || Boolean(dueDate.completeddatetime);
|
|
2031
|
+
};
|
|
2032
|
+
const sportColor = (sportCode) => {
|
|
2033
|
+
const prefix = sportCode?.charAt(0).toUpperCase();
|
|
2034
|
+
if (prefix === 'W')
|
|
2035
|
+
return '#FFA99A';
|
|
2036
|
+
if (prefix === 'X')
|
|
2037
|
+
return '#D1C1C3';
|
|
2038
|
+
return '#8AC6D9';
|
|
2039
|
+
};
|
|
2040
|
+
const TeamTravelCalendarToolbar = ({ duration, label = '', navigation, onDurationChange, onToday, onPrevious, onNext, className = '', }) => (jsxRuntime.jsxs("div", { className: [styles$g.toolbar, className].filter(Boolean).join(' '), children: [jsxRuntime.jsx("button", { type: "button", className: styles$g.todayButton, onClick: onToday, children: "Today" }), jsxRuntime.jsx(SegmentedSelector, { value: duration, size: "sm", ariaLabel: "Calendar duration", onChange: (value) => onDurationChange?.(value), options: [{ id: 'month', label: 'Month' }, { id: 'week', label: 'Week' }] }), navigation ?? (jsxRuntime.jsxs("div", { className: styles$g.periodNavigation, children: [jsxRuntime.jsx("button", { type: "button", className: styles$g.navigationButton, "aria-label": `Previous ${duration}`, onClick: onPrevious, children: jsxRuntime.jsx(ChevronLeft$1, {}) }), jsxRuntime.jsx("button", { type: "button", className: styles$g.periodButton, children: label }), jsxRuntime.jsx("button", { type: "button", className: styles$g.navigationButton, "aria-label": `Next ${duration}`, onClick: onNext, children: jsxRuntime.jsx(ChevronRight$2, {}) })] }))] }));
|
|
2041
|
+
const getVisibleDates = (activeDate, duration) => {
|
|
2042
|
+
const active = parseDate(activeDate);
|
|
2043
|
+
if (duration === 'week') {
|
|
2044
|
+
const first = startOfWeek(active);
|
|
2045
|
+
return Array.from({ length: 7 }, (_, index) => addDays(first, index));
|
|
2046
|
+
}
|
|
2047
|
+
const monthStart = new Date(active.getFullYear(), active.getMonth(), 1);
|
|
2048
|
+
const monthEnd = new Date(active.getFullYear(), active.getMonth() + 1, 0);
|
|
2049
|
+
const first = startOfWeek(monthStart);
|
|
2050
|
+
const finalOffset = (monthEnd.getDay() + 6) % 7;
|
|
2051
|
+
const last = addDays(monthEnd, 6 - finalOffset);
|
|
2052
|
+
const length = Math.round((last.getTime() - first.getTime()) / 86400000) + 1;
|
|
2053
|
+
return Array.from({ length }, (_, index) => addDays(first, index));
|
|
2054
|
+
};
|
|
2055
|
+
const TeamTravelCalendarView = ({ activeDate, duration = 'month', type = 'trips', trips = [], dueDates = [], today, toolbar, onTripClick, onDueDateClick, onDueDateToggle, className = '', }) => {
|
|
2056
|
+
const active = parseDate(activeDate);
|
|
2057
|
+
const visibleDates = getVisibleDates(activeDate, duration);
|
|
2058
|
+
const todayKey = dateKey(today ? parseDate(today) : new Date());
|
|
2059
|
+
const shortWeekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
2060
|
+
const longWeekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
|
2061
|
+
return (jsxRuntime.jsxs("section", { className: [styles$g.calendarView, className].filter(Boolean).join(' '), "aria-label": "Team travel calendar", children: [toolbar, jsxRuntime.jsx("div", { className: styles$g.weekdayRow, role: "row", children: longWeekdays.map((weekday, index) => (jsxRuntime.jsxs("div", { className: styles$g.weekday, role: "columnheader", children: [jsxRuntime.jsx("span", { className: styles$g.weekdayLong, children: weekday }), jsxRuntime.jsx("span", { className: styles$g.weekdayShort, children: shortWeekdays[index] })] }, weekday))) }), jsxRuntime.jsx("div", { className: styles$g.calendarGrid, role: "grid", children: visibleDates.map((date) => {
|
|
2062
|
+
const key = dateKey(date);
|
|
2063
|
+
const currentPeriod = duration === 'week' || date.getMonth() === active.getMonth();
|
|
2064
|
+
const dayTrips = trips.filter((trip) => key >= dateKey(parseDate(trip.tripStart)) && key <= dateKey(parseDate(trip.tripEnd)));
|
|
2065
|
+
const dayDueDates = dueDates.filter((dueDate) => dateKey(parseDate(dueDate.duedate)) === key);
|
|
2066
|
+
return (jsxRuntime.jsxs("div", { role: "gridcell", "aria-label": date.toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' }), className: [
|
|
2067
|
+
styles$g.calendarDay,
|
|
2068
|
+
!currentPeriod ? styles$g.outsidePeriod : '',
|
|
2069
|
+
key === todayKey ? styles$g.today : '',
|
|
2070
|
+
].filter(Boolean).join(' '), children: [jsxRuntime.jsx("time", { className: styles$g.dayNumber, dateTime: key, children: date.getDate() }), jsxRuntime.jsxs("div", { className: styles$g.dayItems, children: [type === 'trips' && dayTrips.map((trip) => {
|
|
2071
|
+
const color = sportColor(trip.sportCode);
|
|
2072
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: styles$g.tripEvent, style: { '--event-color': color }, onClick: () => onTripClick?.(trip), "aria-label": `${trip.sportCode}: ${trip.tripName}`, title: `${trip.sportCode}: ${trip.tripName}`, children: [jsxRuntime.jsx("span", { className: styles$g.sportTag, children: trip.sportCode }), jsxRuntime.jsx("span", { className: styles$g.eventName, children: trip.tripName })] }, trip.masterTripGUID));
|
|
2073
|
+
}), type === 'due_dates' && dayDueDates.map((dueDate) => {
|
|
2074
|
+
const completed = isCompleted(dueDate);
|
|
2075
|
+
const overdue = !completed && parseDate(dueDate.duedate) < parseDate(today ?? dateKey(new Date()));
|
|
2076
|
+
return (jsxRuntime.jsxs("div", { className: styles$g.dueDateEvent, role: "button", tabIndex: 0, onClick: () => onDueDateClick?.(key, dueDate), onKeyDown: (event) => {
|
|
2077
|
+
if (event.key === 'Enter' || event.key === ' ')
|
|
2078
|
+
onDueDateClick?.(key, dueDate);
|
|
2079
|
+
}, children: [jsxRuntime.jsx("button", { type: "button", className: [styles$g.statusButton, completed ? styles$g.completeStatus : '', overdue ? styles$g.overdueStatus : ''].filter(Boolean).join(' '), "aria-label": `${completed ? 'Mark incomplete' : 'Mark complete'}: ${dueDate.tasktitle}`, onClick: (event) => {
|
|
2080
|
+
event.stopPropagation();
|
|
2081
|
+
onDueDateToggle?.(dueDate);
|
|
2082
|
+
}, children: completed ? jsxRuntime.jsx(CheckGlyph, {}) : jsxRuntime.jsx(CircleGlyph, {}) }), jsxRuntime.jsx("span", { className: styles$g.dueSportTag, style: { backgroundColor: sportColor(dueDate.sportCode) }, children: dueDate.sportCode }), jsxRuntime.jsx("span", { className: styles$g.dueDateName, children: dueDate.tasktitle })] }, dueDate.taskid));
|
|
2083
|
+
})] })] }, key));
|
|
2084
|
+
}) })] }));
|
|
2085
|
+
};
|
|
2086
|
+
const ServiceTile = ({ label, status, icon, tone }) => (jsxRuntime.jsxs("div", { className: [styles$g.serviceTile, styles$g[tone]].join(' '), children: [jsxRuntime.jsxs("div", { className: styles$g.serviceLabel, children: [icon, jsxRuntime.jsx("span", { children: label })] }), status ? jsxRuntime.jsx("span", { className: styles$g.bookingStatus, children: status }) : jsxRuntime.jsx("span", { className: styles$g.requestStatus, children: "Request" })] }));
|
|
2087
|
+
const ProgressBadge = ({ completed, total }) => {
|
|
2088
|
+
const progress = total > 0 ? Math.round((completed / total) * 100) : 0;
|
|
2089
|
+
return (jsxRuntime.jsxs("span", { className: styles$g.progressBadge, children: [jsxRuntime.jsxs("span", { children: [completed, "/", total] }), jsxRuntime.jsx("span", { className: styles$g.progressCircle, style: { '--progress': `${progress * 3.6}deg` }, "aria-label": `${progress}% complete` })] }));
|
|
2090
|
+
};
|
|
2091
|
+
const TripCard = ({ trip, featured, onClick }) => {
|
|
2092
|
+
const dueDates = trip.duedates ?? [];
|
|
2093
|
+
const completeCount = dueDates.filter(isCompleted).length;
|
|
2094
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: [styles$g.tripCard, featured ? styles$g.featuredCard : ''].filter(Boolean).join(' '), onClick: onClick, children: [jsxRuntime.jsxs("div", { className: styles$g.tripCardHeader, children: [jsxRuntime.jsxs("span", { className: styles$g.dateLabel, children: [jsxRuntime.jsx(CalendarGlyph, {}), formatDateRange(trip.tripStart, trip.tripEnd)] }), jsxRuntime.jsx(ProgressBadge, { completed: completeCount, total: dueDates.length })] }), jsxRuntime.jsx("h3", { className: styles$g.tripCardTitle, children: trip.tripName }), jsxRuntime.jsxs("div", { className: styles$g.serviceGrid, children: [jsxRuntime.jsx(ServiceTile, { label: "Air", status: trip.air_status || trip.charter_status, icon: jsxRuntime.jsx(PlaneGlyph, {}), tone: "air" }), jsxRuntime.jsx(ServiceTile, { label: "Ground", status: trip.ground_status, icon: jsxRuntime.jsx(BusGlyph, {}), tone: "ground" }), jsxRuntime.jsx(ServiceTile, { label: "Hotel", status: trip.hotel_status, icon: jsxRuntime.jsx(HotelGlyph, {}), tone: "hotel" })] }), jsxRuntime.jsx("div", { className: styles$g.tripEvents, children: (trip.events ?? []).map((event, index) => (jsxRuntime.jsxs("div", { className: styles$g.tripEventDetail, children: [jsxRuntime.jsx("span", { className: styles$g.star, children: jsxRuntime.jsx(StarGlyph, {}) }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: styles$g.opponentLine, children: [jsxRuntime.jsx("strong", { children: event.eventtitle || event.opponentname }), jsxRuntime.jsx("span", { className: styles$g.homeAway, children: event.homeoraway || 'Away' })] }), jsxRuntime.jsxs("span", { className: styles$g.venueLine, children: [event.venuename ? `${event.venuename} • ` : '', formatShortDate(event.eventstartdate)] })] })] }, event.id ?? `${event.eventtitle}-${index}`))) })] }));
|
|
2095
|
+
};
|
|
2096
|
+
const DueDateCard = ({ dueDate, onClick, onToggle }) => {
|
|
2097
|
+
const completed = isCompleted(dueDate);
|
|
2098
|
+
return (jsxRuntime.jsxs("div", { className: styles$g.dueDateCard, role: "button", tabIndex: 0, onClick: onClick, onKeyDown: (event) => {
|
|
2099
|
+
if (event.key === 'Enter' || event.key === ' ')
|
|
2100
|
+
onClick?.();
|
|
2101
|
+
}, children: [jsxRuntime.jsx("button", { type: "button", className: [styles$g.statusButton, completed ? styles$g.completeStatus : ''].filter(Boolean).join(' '), "aria-label": `${completed ? 'Mark incomplete' : 'Mark complete'}: ${dueDate.tasktitle}`, onClick: (event) => {
|
|
2102
|
+
event.stopPropagation();
|
|
2103
|
+
onToggle?.();
|
|
2104
|
+
}, children: completed ? jsxRuntime.jsx(CheckGlyph, {}) : jsxRuntime.jsx(CircleGlyph, {}) }), jsxRuntime.jsxs("div", { className: styles$g.dueCardCopy, children: [jsxRuntime.jsx("strong", { children: dueDate.tasktitle }), dueDate.description && jsxRuntime.jsx("span", { children: dueDate.description }), jsxRuntime.jsxs("small", { children: [dueDate.tripName, dueDate.tripStart ? ` • ${formatShortDate(dueDate.tripStart)}` : ''] })] })] }));
|
|
2105
|
+
};
|
|
2106
|
+
const TeamTravelCalendarCardView = ({ groups, type = 'trips', toolbar, onTripClick, onDueDateClick, onDueDateToggle, className = '', }) => (jsxRuntime.jsxs("section", { className: [styles$g.cardView, className].filter(Boolean).join(' '), "aria-label": "Team travel cards", children: [toolbar, jsxRuntime.jsx("div", { className: styles$g.teamGroups, children: groups.map((group) => {
|
|
2107
|
+
const groupDueDates = group.trips.flatMap((trip) => (trip.duedates ?? []).map((dueDate) => ({
|
|
2108
|
+
...dueDate,
|
|
2109
|
+
sportCode: dueDate.sportCode ?? group.sportCode,
|
|
2110
|
+
tripName: dueDate.tripName ?? trip.tripName,
|
|
2111
|
+
tripStart: dueDate.tripStart ?? trip.tripStart,
|
|
2112
|
+
masterTripGUID: dueDate.masterTripGUID ?? trip.masterTripGUID,
|
|
2113
|
+
})));
|
|
2114
|
+
const dueDateGroups = Object.entries(groupDueDates.reduce((result, dueDate) => {
|
|
2115
|
+
const key = dateKey(parseDate(dueDate.duedate));
|
|
2116
|
+
result[key] = [...(result[key] ?? []), dueDate];
|
|
2117
|
+
return result;
|
|
2118
|
+
}, {})).sort(([left], [right]) => left.localeCompare(right));
|
|
2119
|
+
return (jsxRuntime.jsxs("article", { className: styles$g.teamGroup, children: [jsxRuntime.jsxs("div", { className: styles$g.teamPanel, children: [jsxRuntime.jsxs("div", { className: styles$g.teamIdentity, children: [jsxRuntime.jsx("span", { className: styles$g.teamCode, children: group.sportCode }), jsxRuntime.jsx("strong", { children: group.sportDescription })] }), jsxRuntime.jsxs("div", { className: styles$g.infoTiles, children: [jsxRuntime.jsxs("div", { className: styles$g.infoTile, children: [jsxRuntime.jsx(PlaneGlyph, {}), jsxRuntime.jsx("strong", { children: group.upcomingCount ?? group.trips.length }), jsxRuntime.jsx("span", { children: "Upcoming" })] }), jsxRuntime.jsxs("div", { className: styles$g.infoTile, children: [jsxRuntime.jsx(CalendarGlyph, {}), jsxRuntime.jsx("strong", { children: formatShortDate(group.nextTripStartDate ?? group.trips[0]?.tripStart) }), jsxRuntime.jsx("span", { children: "Next Trip" })] })] })] }), jsxRuntime.jsxs("div", { className: styles$g.cardsScroller, children: [type === 'trips' && group.trips.map((trip, index) => (jsxRuntime.jsx(TripCard, { trip: trip, featured: index === 0, onClick: () => onTripClick?.(trip) }, trip.masterTripGUID))), type === 'due_dates' && dueDateGroups.map(([dueDate, items], index) => (jsxRuntime.jsxs("div", { className: [styles$g.dueDateColumn, index === 0 ? styles$g.featuredCard : ''].filter(Boolean).join(' '), children: [jsxRuntime.jsxs("div", { className: styles$g.dueDateColumnHeader, children: [jsxRuntime.jsxs("span", { className: styles$g.dateLabel, children: [jsxRuntime.jsx(CalendarGlyph, {}), formatLongDate(dueDate)] }), jsxRuntime.jsx(ProgressBadge, { completed: items.filter(isCompleted).length, total: items.length })] }), jsxRuntime.jsx("div", { className: styles$g.dueDateCards, children: items.map((item) => jsxRuntime.jsx(DueDateCard, { dueDate: item, onClick: () => onDueDateClick?.(item), onToggle: () => onDueDateToggle?.(item) }, item.taskid)) })] }, dueDate))), ((type === 'trips' && group.trips.length === 0) || (type === 'due_dates' && dueDateGroups.length === 0)) && (jsxRuntime.jsxs("div", { className: styles$g.emptyState, children: ["No ", type === 'trips' ? 'trips' : 'due dates', " found for ", group.sportDescription] }))] })] }, group.sportCode));
|
|
2120
|
+
}) })] }));
|
|
2121
|
+
const StatusPill$1 = ({ status }) => status
|
|
2122
|
+
? jsxRuntime.jsx("span", { className: styles$g.tableStatus, children: status })
|
|
2123
|
+
: jsxRuntime.jsx("span", { className: styles$g.tableRequest, children: "Request" });
|
|
2124
|
+
const TeamTravelCalendarListView = ({ trips, type = 'trips', toolbar, periodLabel = '', upcomingTrips = trips.length, onTripClick, onDueDatesClick, onDueDateClick, onDueDateToggle, className = '', }) => {
|
|
2125
|
+
const dueDates = trips.flatMap((trip) => (trip.duedates ?? []).map((dueDate) => ({
|
|
2126
|
+
...dueDate,
|
|
2127
|
+
sportCode: dueDate.sportCode ?? trip.sportCode,
|
|
2128
|
+
tripId: dueDate.tripId ?? String(trip.masterTripID ?? ''),
|
|
2129
|
+
tripName: dueDate.tripName ?? trip.tripName,
|
|
2130
|
+
tripStart: dueDate.tripStart ?? trip.tripStart,
|
|
2131
|
+
masterTripGUID: dueDate.masterTripGUID ?? trip.masterTripGUID,
|
|
2132
|
+
})));
|
|
2133
|
+
return (jsxRuntime.jsxs("section", { className: [styles$g.listView, className].filter(Boolean).join(' '), "aria-label": "Team travel list", children: [toolbar, type === 'trips' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("p", { className: styles$g.resultCount, children: ["Showing ", trips.length, " travel items (", upcomingTrips, " upcoming trips)"] }), jsxRuntime.jsx("div", { className: styles$g.tableScroller, children: jsxRuntime.jsxs("table", { className: styles$g.travelTable, children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "Sport" }), jsxRuntime.jsx("th", { children: "Travel Date(s)" }), jsxRuntime.jsx("th", { children: "Trip Name" }), jsxRuntime.jsx("th", { children: "Due Dates" }), jsxRuntime.jsx("th", { children: "Air" }), jsxRuntime.jsx("th", { children: "Ground" }), jsxRuntime.jsx("th", { children: "Hotel" })] }) }), jsxRuntime.jsx("tbody", { children: trips.map((trip) => {
|
|
2134
|
+
const dueDatesForTrip = trip.duedates ?? [];
|
|
2135
|
+
return (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: jsxRuntime.jsx("span", { className: styles$g.tableSport, children: trip.sportCode }) }), jsxRuntime.jsx("td", { children: formatDateRange(trip.tripStart, trip.tripEnd) }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx("button", { type: "button", className: styles$g.tableLink, onClick: () => onTripClick?.(trip), children: trip.tripName }) }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx("button", { type: "button", className: styles$g.tableProgress, onClick: () => onDueDatesClick?.(trip), children: jsxRuntime.jsx(ProgressBadge, { completed: dueDatesForTrip.filter(isCompleted).length, total: dueDatesForTrip.length }) }) }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(StatusPill$1, { status: trip.air_status || trip.charter_status }) }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(StatusPill$1, { status: trip.ground_status }) }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(StatusPill$1, { status: trip.hotel_status }) })] }, trip.masterTripGUID));
|
|
2136
|
+
}) })] }) })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("p", { className: styles$g.resultCount, children: ["Showing ", dueDates.length, " due date ", dueDates.length === 1 ? 'item' : 'items', periodLabel ? ` for ${periodLabel}` : ''] }), jsxRuntime.jsx("div", { className: styles$g.tableScroller, children: jsxRuntime.jsxs("table", { className: [styles$g.travelTable, styles$g.dueDateTable].join(' '), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "Reminder" }), jsxRuntime.jsx("th", { children: "Description" }), jsxRuntime.jsx("th", { children: "Due Date" }), jsxRuntime.jsx("th", { children: "Trip Name" }), jsxRuntime.jsx("th", { children: "Trip Start Date" }), jsxRuntime.jsx("th", { children: "Service Type" }), jsxRuntime.jsx("th", { children: "Status" })] }) }), jsxRuntime.jsx("tbody", { children: dueDates.map((dueDate) => {
|
|
2137
|
+
const completed = isCompleted(dueDate);
|
|
2138
|
+
return (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: jsxRuntime.jsx("button", { type: "button", className: styles$g.tableLink, onClick: () => onDueDateClick?.(dueDate), children: dueDate.tasktitle }) }), jsxRuntime.jsx("td", { children: dueDate.description || '–' }), jsxRuntime.jsx("td", { children: formatLongDate(dueDate.duedate) }), jsxRuntime.jsx("td", { children: dueDate.tripName }), jsxRuntime.jsx("td", { children: formatLongDate(dueDate.tripStart) }), jsxRuntime.jsx("td", { children: dueDate.servicetype || '–' }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx("button", { type: "button", className: [styles$g.listStatusButton, completed ? styles$g.completeStatus : ''].filter(Boolean).join(' '), "aria-label": `${completed ? 'Mark incomplete' : 'Mark complete'}: ${dueDate.tasktitle}`, onClick: () => onDueDateToggle?.(dueDate), children: completed ? jsxRuntime.jsx(CheckGlyph, {}) : jsxRuntime.jsx(CircleGlyph, {}) }) })] }, `${dueDate.masterTripGUID}-${dueDate.taskid}`));
|
|
2139
|
+
}) })] }) })] }))] }));
|
|
2140
|
+
};
|
|
2141
|
+
const getTeamTravelCalendarPeriodLabel = (activeDate, duration) => {
|
|
2142
|
+
const active = parseDate(activeDate);
|
|
2143
|
+
if (duration === 'month')
|
|
2144
|
+
return active.toLocaleDateString('en-US', { month: 'long', year: 'numeric' });
|
|
2145
|
+
const first = startOfWeek(active);
|
|
2146
|
+
const last = addDays(first, 6);
|
|
2147
|
+
const firstLabel = first.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
|
|
2148
|
+
const lastLabel = first.getMonth() === last.getMonth() && first.getFullYear() === last.getFullYear()
|
|
2149
|
+
? `${last.getDate()}, ${last.getFullYear()}`
|
|
2150
|
+
: last.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
2151
|
+
return `${firstLabel} – ${lastLabel}`;
|
|
2152
|
+
};
|
|
2153
|
+
const moveTeamTravelCalendarPeriod = (activeDate, duration, amount) => {
|
|
2154
|
+
const active = parseDate(activeDate);
|
|
2155
|
+
if (duration === 'week')
|
|
2156
|
+
return dateKey(addDays(active, amount * 7));
|
|
2157
|
+
const next = new Date(active.getFullYear(), active.getMonth() + amount, 1);
|
|
2158
|
+
return dateKey(next);
|
|
2159
|
+
};
|
|
2160
|
+
|
|
1979
2161
|
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"};
|
|
1980
2162
|
|
|
1981
2163
|
const useManagedValues = (controlledValues, initialValues, onChange) => {
|
|
@@ -2099,7 +2281,7 @@ const TeamRosterMemberForm = ({ mode = 'Add', values, initialValues, onChange, o
|
|
|
2099
2281
|
}, 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({
|
|
2100
2282
|
noMiddleName: event.target.checked,
|
|
2101
2283
|
middleName: event.target.checked ? '' : formValues.middleName,
|
|
2102
|
-
}), 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$
|
|
2284
|
+
}), 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$3, { 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 }) })] }));
|
|
2103
2285
|
};
|
|
2104
2286
|
const IMPORT_COPY = {
|
|
2105
2287
|
equipment: {
|
|
@@ -2241,7 +2423,7 @@ const DEFAULT_CARDS = [
|
|
|
2241
2423
|
key: 'suppliers',
|
|
2242
2424
|
title: 'Suppliers',
|
|
2243
2425
|
description: 'Manage air, car, and hotel suppliers',
|
|
2244
|
-
icon: jsxRuntime.jsx(PlaneIcon$
|
|
2426
|
+
icon: jsxRuntime.jsx(PlaneIcon$3, { size: 16 }),
|
|
2245
2427
|
},
|
|
2246
2428
|
];
|
|
2247
2429
|
/** Hub administration shell and system-card index. */
|
|
@@ -2278,7 +2460,7 @@ const CharterManifestPage = ({ tripName, travelStartDate, travelEndDate, seats,
|
|
|
2278
2460
|
}
|
|
2279
2461
|
return a.lastName.localeCompare(b.lastName);
|
|
2280
2462
|
}), [passengers, sort]);
|
|
2281
|
-
return (jsxRuntime.jsxs("div", { className: [styles$a.page, className].filter(Boolean).join(' '), "data-screen-label": "Charter Trip Manifest", children: [jsxRuntime.jsxs("header", { className: styles$a.header, children: [jsxRuntime.jsxs("div", { className: styles$a.headerRow, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Back", className: styles$a.back, onClick: onBack, children: jsxRuntime.jsx(ChevronLeftIcon, { size: 28 }) }), jsxRuntime.jsxs("h1", { children: [jsxRuntime.jsx("strong", { children: "Manifest" }), jsxRuntime.jsx(ChevronRightIcon$1, { size: 24 }), jsxRuntime.jsx("span", { children: tripName })] }), jsxRuntime.jsxs("div", { className: styles$a.headerActions, children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: locked }), jsxRuntime.jsx(Button, { variant: "outline", leftIcon: jsxRuntime.jsx(DocumentIcon, { size: 16 }), disabled: carrierName === 'No carrier selected', onClick: onGenerateFile, children: "Generate File" })] })] }), (travelStartDate || travelEndDate) && (jsxRuntime.jsxs("div", { className: styles$a.dateRow, children: [jsxRuntime.jsx("span", { children: formatDate(travelStartDate) }), jsxRuntime.jsx("span", { className: styles$a.dateLine, children: "\u25B6" }), jsxRuntime.jsx("span", { children: formatDate(travelEndDate) })] })), jsxRuntime.jsxs("div", { className: styles$a.metaRow, children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(PlaneIcon$
|
|
2463
|
+
return (jsxRuntime.jsxs("div", { className: [styles$a.page, className].filter(Boolean).join(' '), "data-screen-label": "Charter Trip Manifest", children: [jsxRuntime.jsxs("header", { className: styles$a.header, children: [jsxRuntime.jsxs("div", { className: styles$a.headerRow, children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Back", className: styles$a.back, onClick: onBack, children: jsxRuntime.jsx(ChevronLeftIcon, { size: 28 }) }), jsxRuntime.jsxs("h1", { children: [jsxRuntime.jsx("strong", { children: "Manifest" }), jsxRuntime.jsx(ChevronRightIcon$1, { size: 24 }), jsxRuntime.jsx("span", { children: tripName })] }), jsxRuntime.jsxs("div", { className: styles$a.headerActions, children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: locked }), jsxRuntime.jsx(Button, { variant: "outline", leftIcon: jsxRuntime.jsx(DocumentIcon, { size: 16 }), disabled: carrierName === 'No carrier selected', onClick: onGenerateFile, children: "Generate File" })] })] }), (travelStartDate || travelEndDate) && (jsxRuntime.jsxs("div", { className: styles$a.dateRow, children: [jsxRuntime.jsx("span", { children: formatDate(travelStartDate) }), jsxRuntime.jsx("span", { className: styles$a.dateLine, children: "\u25B6" }), jsxRuntime.jsx("span", { children: formatDate(travelEndDate) })] })), jsxRuntime.jsxs("div", { className: styles$a.metaRow, children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(PlaneIcon$3, { size: 16 }), seats, " seats"] }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(CubeIcon, { size: 16 }), "Payload limit ", payloadLimit.toLocaleString(), " lb"] })] })] }), jsxRuntime.jsxs("div", { className: styles$a.layout, children: [jsxRuntime.jsxs("aside", { className: styles$a.rail, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: styles$a.eyebrow, children: "Flight Manifest" }), jsxRuntime.jsx("div", { className: styles$a.scopeList, children: [{ id: 'all', label: 'Full Trip', detail: 'All flight segments' }, ...segments].map((item) => (jsxRuntime.jsxs("button", { type: "button", className: [styles$a.scope, scope === item.id ? styles$a.activeScope : ''].filter(Boolean).join(' '), onClick: () => setScope(item.id), children: [jsxRuntime.jsx("strong", { children: item.label }), jsxRuntime.jsx("span", { children: item.detail })] }, item.id))) })] }), segments.length > 0 && (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", disabled: locked, onClick: onSplitSegments, children: "Split by Segment" })), jsxRuntime.jsxs("div", { className: styles$a.carrierCard, children: [jsxRuntime.jsx("div", { className: styles$a.eyebrow, children: "Carrier" }), jsxRuntime.jsx("strong", { children: carrierName }), jsxRuntime.jsx("p", { children: carrierNote }), jsxRuntime.jsx(Button, { variant: "outline", size: "sm", fullWidth: true, disabled: locked, leftIcon: jsxRuntime.jsx(SettingsIcon, { size: 15 }), onClick: onChangeCarrier, children: "Change Carrier" })] })] }), jsxRuntime.jsxs("main", { className: styles$a.main, children: [jsxRuntime.jsx("section", { className: styles$a.capacityCard, children: jsxRuntime.jsx(ManifestCapacityStats, { paxCount: passengers.length, seats: seats, paxWeight: passengerWeight, cargoWeight: cargoWeight, payloadLimit: payloadLimit }) }), jsxRuntime.jsxs("div", { className: styles$a.viewRow, children: [jsxRuntime.jsx(ManifestViewToggle, { view: view, onView: setView, paxCount: passengers.length, eqCount: equipment.length, locked: locked }), locked && jsxRuntime.jsx("span", { className: styles$a.lockedMessage, children: "Locked \u2014 coordinate any changes directly with the carrier." })] }), view === 'passengers' ? (jsxRuntime.jsxs("section", { children: [!locked && (jsxRuntime.jsxs("div", { className: styles$a.tableActions, children: [jsxRuntime.jsxs("strong", { children: [passengers.length, " Passengers"] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: "Order by" }), jsxRuntime.jsx("span", { className: styles$a.sortToggle, children: ['name', 'type'].map((option) => (jsxRuntime.jsx("button", { type: "button", className: sort === option ? styles$a.activeSort : '', onClick: () => setSort(option), children: option }, option))) }), jsxRuntime.jsx(Button, { size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 15 }), onClick: onAddPassengers, children: "Add Passengers" })] })] })), jsxRuntime.jsx("div", { className: styles$a.tableWrap, children: jsxRuntime.jsxs("table", { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "#" }), jsxRuntime.jsx("th", { children: "Passenger" }), jsxRuntime.jsx("th", { children: "Type" }), jsxRuntime.jsx("th", { children: "TSA Screening" }), jsxRuntime.jsx("th", { children: "Personal" }), jsxRuntime.jsx("th", { children: "Carry-On" }), jsxRuntime.jsx("th", { children: "Checked" }), jsxRuntime.jsx("th", { children: "Seat" }), jsxRuntime.jsx("th", {})] }) }), jsxRuntime.jsxs("tbody", { children: [!sortedPassengers.length && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 9, className: styles$a.empty, children: "No passengers on this manifest yet. Add passengers from the master list." }) }), sortedPassengers.map((passenger, index) => (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: index + 1 }), jsxRuntime.jsxs("td", { children: [jsxRuntime.jsx("strong", { children: passenger.lastName }), jsxRuntime.jsxs("span", { children: [", ", passenger.firstName] })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(TypeTag, { type: passenger.travelerType }) }), jsxRuntime.jsx("td", { children: passenger.screeningType || '—' }), jsxRuntime.jsxs("td", { children: [passenger.personalWeight ?? 0, " lb"] }), jsxRuntime.jsxs("td", { children: [passenger.carryOnWeight ?? 0, " lb"] }), jsxRuntime.jsxs("td", { children: [passenger.checkedWeight ?? 0, " lb"] }), jsxRuntime.jsx("td", { children: passenger.seatAssignment || '—' }), jsxRuntime.jsx("td", { children: !locked && jsxRuntime.jsx("button", { type: "button", "aria-label": `Remove ${passenger.firstName} ${passenger.lastName}`, className: styles$a.remove, onClick: () => onRemovePassenger?.(passenger), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }) })] }, passenger.id)))] })] }) })] })) : (jsxRuntime.jsxs("section", { children: [!locked && jsxRuntime.jsxs("div", { className: styles$a.tableActions, children: [jsxRuntime.jsxs("strong", { children: [equipment.length, " Equipment Items"] }), jsxRuntime.jsx(Button, { size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 15 }), onClick: onAddEquipment, children: "Add Equipment" })] }), jsxRuntime.jsx("div", { className: styles$a.tableWrap, children: jsxRuntime.jsxs("table", { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "Equipment" }), jsxRuntime.jsx("th", { children: "Quantity" }), jsxRuntime.jsx("th", { children: "Weight" }), jsxRuntime.jsx("th", { children: "Total" }), jsxRuntime.jsx("th", {})] }) }), jsxRuntime.jsx("tbody", { children: equipment.map((item) => jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: jsxRuntime.jsx("strong", { children: item.name }) }), jsxRuntime.jsx("td", { children: item.quantity }), jsxRuntime.jsxs("td", { children: [item.weight.toLocaleString(), " lb"] }), jsxRuntime.jsxs("td", { children: [(item.quantity * item.weight).toLocaleString(), " lb"] }), jsxRuntime.jsx("td", { children: !locked && jsxRuntime.jsx("button", { type: "button", "aria-label": `Remove ${item.name}`, className: styles$a.remove, onClick: () => onRemoveEquipment?.(item), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }) })] }, item.id)) })] }) })] })), !locked && (jsxRuntime.jsxs("section", { className: styles$a.finalize, children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: false }), jsxRuntime.jsx("p", { children: sendState === 'initial-sent' ? 'Initial manifest sent. The final manifest may be sent within 3 days of departure.' : 'No manifest has been transmitted to the carrier yet.' }), jsxRuntime.jsxs("div", { className: styles$a.finalizeActions, children: [sendState === 'none' && jsxRuntime.jsx(Button, { onClick: onSendInitial, children: "Send Initial Manifest" }), sendState === 'initial-sent' && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, { onClick: onSendFinal, children: "Send Final Manifest" }), jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: onUndoInitial, children: "Undo initial" })] })] })] }))] })] })] }));
|
|
2282
2464
|
};
|
|
2283
2465
|
|
|
2284
2466
|
var styles$9 = {"page":"ContactUsPage-module_page__j9LWO","container":"ContactUsPage-module_container__uRC-r","header":"ContactUsPage-module_header__I6ypu","printRow":"ContactUsPage-module_printRow__d7O34","primaryGrid":"ContactUsPage-module_primaryGrid__DwUt4","genericGrid":"ContactUsPage-module_genericGrid__Zn-A1","stack":"ContactUsPage-module_stack__uKL2n","card":"ContactUsPage-module_card__WPn4v","cardBody":"ContactUsPage-module_cardBody__FU1io","simpleContact":"ContactUsPage-module_simpleContact__E-jyI","field":"ContactUsPage-module_field__yiMo-","label":"ContactUsPage-module_label__C2fa2","emergencyLabel":"ContactUsPage-module_emergencyLabel__Twetf","emergencyDot":"ContactUsPage-module_emergencyDot__Yg4eF","fieldValue":"ContactUsPage-module_fieldValue__5VT5g","contactColumn":"ContactUsPage-module_contactColumn__U9DGB","support":"ContactUsPage-module_support__Pptkm","emergency":"ContactUsPage-module_emergency__ozZbU","contactPair":"ContactUsPage-module_contactPair__Fxg8p","motorcoachEmergency":"ContactUsPage-module_motorcoachEmergency__-Uo84","centeredState":"ContactUsPage-module_centeredState__eLf0U","error":"ContactUsPage-module_error__XXiUk","warning":"ContactUsPage-module_warning__1--Zg"};
|
|
@@ -2360,109 +2542,207 @@ const DashboardPage = ({ greeting = 'Good morning', firstName, accountName, widg
|
|
|
2360
2542
|
onReorder?.(dragFrom, index); setDragFrom(null); }, onDragEnd: () => { setDragFrom(null); dragGhost.current?.remove(); dragGhost.current = null; }, children: jsxRuntime.jsx(WidgetCard, { widget: widget, editMode: editMode, index: index, count: widgets.length, onRefresh: onRefresh, onRemove: onRemove, onResize: onResize, onReorder: onReorder, onTravelerRangeChange: onTravelerRangeChange, onNavigate: onNavigate }) }, widget.id)) }) : jsxRuntime.jsxs("div", { className: styles$8.emptyPage, children: [jsxRuntime.jsx(PlusIcon$2, { size: 28 }), jsxRuntime.jsx("strong", { children: "Your home page is empty" }), jsxRuntime.jsx("span", { children: "Use \"Customize\" to add cards from the catalog." })] }), catalogOpen && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", className: styles$8.scrim, "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false) }), jsxRuntime.jsxs("aside", { className: styles$8.catalog, role: "dialog", "aria-modal": "true", "aria-label": "Add cards", children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { children: "Add a card" }), jsxRuntime.jsx("p", { children: "Cards available to your role for this account" })] }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false), children: jsxRuntime.jsx(CloseIcon, { size: 20 }) })] }), jsxRuntime.jsx("div", { className: styles$8.catalogBody, children: CATALOG.map((item) => jsxRuntime.jsxs("div", { className: styles$8.catalogItem, children: [jsxRuntime.jsx("span", { className: styles$8.catalogIcon, children: jsxRuntime.jsx(WidgetIcon, { type: item.type }) }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: item.title }), jsxRuntime.jsx("span", { children: "Account" }), jsxRuntime.jsx("p", { children: item.description })] }), presentTypes.has(item.type) ? jsxRuntime.jsxs("span", { className: styles$8.added, children: [jsxRuntime.jsx(CheckIcon$2, { size: 16 }), "Added"] }) : jsxRuntime.jsxs("button", { type: "button", onClick: () => onAddWidget?.(item.type), children: [jsxRuntime.jsx(PlusIcon$2, { size: 16 }), "Add"] })] }, item.type)) }), jsxRuntime.jsx("footer", { children: "Each card can appear once on your home page." })] })] })] }));
|
|
2361
2543
|
};
|
|
2362
2544
|
|
|
2363
|
-
var styles$7 = {"
|
|
2545
|
+
var styles$7 = {"page":"GroupTravelRequestPage-module_page__0JriY","pageHeader":"GroupTravelRequestPage-module_pageHeader__oP6rE","workspace":"GroupTravelRequestPage-module_workspace__SIOli","serviceSidebar":"GroupTravelRequestPage-module_serviceSidebar__XUlqR","tripEvents":"GroupTravelRequestPage-module_tripEvents__6Upvv","formMain":"GroupTravelRequestPage-module_formMain__pFK7N","serviceSection":"GroupTravelRequestPage-module_serviceSection__10nXm","summarySidebar":"GroupTravelRequestPage-module_summarySidebar__HoAGy","summaryCard":"GroupTravelRequestPage-module_summaryCard__YvX-g","summarySection":"GroupTravelRequestPage-module_summarySection__uY5FU","summaryRow":"GroupTravelRequestPage-module_summaryRow__el7jN","emptySummary":"GroupTravelRequestPage-module_emptySummary__veL9N","field":"GroupTravelRequestPage-module_field__-HfoK","label":"GroupTravelRequestPage-module_label__sEOeK","input":"GroupTravelRequestPage-module_input__lXQDl","select":"GroupTravelRequestPage-module_select__D7ICw","textarea":"GroupTravelRequestPage-module_textarea__AYtX1","note":"GroupTravelRequestPage-module_note__9loDq","choiceFieldset":"GroupTravelRequestPage-module_choiceFieldset__dMlZv","radioGroup":"GroupTravelRequestPage-module_radioGroup__xP97-","radioLabel":"GroupTravelRequestPage-module_radioLabel__9wYXU","checkToggle":"GroupTravelRequestPage-module_checkToggle__PZAHF","segments":"GroupTravelRequestPage-module_segments__07a9Y","contactGroup":"GroupTravelRequestPage-module_contactGroup__MQ7mD","destinationList":"GroupTravelRequestPage-module_destinationList__uaHzR","segmentHeader":"GroupTravelRequestPage-module_segmentHeader__8a1Re","destinationRow":"GroupTravelRequestPage-module_destinationRow__swSrv","pageFooter":"GroupTravelRequestPage-module_pageFooter__mQcPZ","pageButtons":"GroupTravelRequestPage-module_pageButtons__jfH5X","currentPage":"GroupTravelRequestPage-module_currentPage__WfmWO","mobileTabs":"GroupTravelRequestPage-module_mobileTabs__GEAo2","mobileServices":"GroupTravelRequestPage-module_mobileServices__XN2Vw","mobileEnable":"GroupTravelRequestPage-module_mobileEnable__DRf4H","activeTab":"GroupTravelRequestPage-module_activeTab__dolkN","activeService":"GroupTravelRequestPage-module_activeService__VXHEF","mobileHidden":"GroupTravelRequestPage-module_mobileHidden__RYc4x","summaryMobileHidden":"GroupTravelRequestPage-module_summaryMobileHidden__0QaCt"};
|
|
2364
2546
|
|
|
2365
|
-
|
|
2366
|
-
const
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
const TRAVEL_SERVICES = [
|
|
2373
|
-
{ key: 'general', label: 'General Details', icon: jsxRuntime.jsx(EventsIcon, {}), hasToggle: false },
|
|
2374
|
-
{ key: 'air', label: 'Commercial Air', icon: jsxRuntime.jsx(PlaneIcon, {}), hasToggle: true },
|
|
2375
|
-
{ key: 'charter', label: 'Charter Air', icon: jsxRuntime.jsx(PlaneIcon, {}), hasToggle: true },
|
|
2376
|
-
{ key: 'hotel', label: 'Hotel', icon: jsxRuntime.jsx(HotelIcon, {}), hasToggle: true },
|
|
2377
|
-
{ key: 'ground', label: 'Ground Transportation', icon: jsxRuntime.jsx(CarIcon, {}), hasToggle: true },
|
|
2378
|
-
{ key: 'bus', label: 'Bus Needed', icon: jsxRuntime.jsx(BusIcon, {}), hasToggle: true },
|
|
2547
|
+
const FLIGHT_TYPES = ['One Way', 'Round Trip', 'Multiple Destinations'];
|
|
2548
|
+
const FLIGHT_TIMES = [
|
|
2549
|
+
'Early Morning (5:00am – 8:00am)',
|
|
2550
|
+
'Morning (8:00am – 12:00pm)',
|
|
2551
|
+
'Afternoon (12:00pm - 3:00pm)',
|
|
2552
|
+
'Late Afternoon (3:00pm – 6:00pm)',
|
|
2553
|
+
'Evening (6:00pm – 12:00am)',
|
|
2379
2554
|
];
|
|
2380
|
-
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
{ label: 'Travel Party Size', value: null },
|
|
2387
|
-
{ label: 'Trip Start', value: null },
|
|
2388
|
-
{ label: 'Trip Return', value: null },
|
|
2389
|
-
{ label: 'Booking Contact', value: null },
|
|
2390
|
-
],
|
|
2391
|
-
},
|
|
2392
|
-
{
|
|
2393
|
-
key: 'air',
|
|
2394
|
-
title: 'Commercial Air Request',
|
|
2395
|
-
items: [
|
|
2396
|
-
{ label: 'Flight Type', value: null },
|
|
2397
|
-
{ label: 'Departure Airport', value: null },
|
|
2398
|
-
{ label: 'Arrival Airport', value: null },
|
|
2399
|
-
],
|
|
2400
|
-
},
|
|
2401
|
-
{
|
|
2402
|
-
key: 'hotel',
|
|
2403
|
-
title: 'Hotel Request',
|
|
2404
|
-
items: [
|
|
2405
|
-
{ label: 'Check-in Date', value: null },
|
|
2406
|
-
{ label: 'Check-out Date', value: null },
|
|
2407
|
-
{ label: 'Number of Rooms', value: null },
|
|
2408
|
-
],
|
|
2409
|
-
},
|
|
2410
|
-
{
|
|
2411
|
-
key: 'ground',
|
|
2412
|
-
title: 'Ground Transportation',
|
|
2413
|
-
items: [
|
|
2414
|
-
{ label: 'Vehicle Type', value: null },
|
|
2415
|
-
{ label: 'Pickup Location', value: null },
|
|
2416
|
-
],
|
|
2417
|
-
},
|
|
2555
|
+
const AIRCRAFT_SEATING = ['0-30', '30-50', '50-100', '100+'];
|
|
2556
|
+
const BUS_TYPES = [
|
|
2557
|
+
'Drive To & From Campus',
|
|
2558
|
+
'Airport Pickup & Dropoff',
|
|
2559
|
+
'Drive to Event/Fly Home',
|
|
2560
|
+
'Fly to Event/Drive Home',
|
|
2418
2561
|
];
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2562
|
+
const DEFAULT_CATERING = ['No Catering', 'Snacks and Beverages', 'Cold Meal', 'Hot Meal'];
|
|
2563
|
+
const EventsIcon = () => jsxRuntime.jsx(CalendarIcon$1, { size: 24 });
|
|
2564
|
+
const DEFAULT_SERVICES = [
|
|
2565
|
+
{ key: 'general', label: 'General', icon: jsxRuntime.jsx(EventsIcon, {}), hasToggle: false },
|
|
2566
|
+
{ key: 'air', label: 'Commercial Air', icon: jsxRuntime.jsx(PlaneIcon$3, { size: 22 }), hasToggle: true },
|
|
2567
|
+
{ key: 'charter', label: 'Charter Air', icon: jsxRuntime.jsx(PlaneIcon$3, { size: 22 }), hasToggle: true },
|
|
2568
|
+
{ key: 'hotel', label: 'Hotel', icon: jsxRuntime.jsx(HotelIcon$3, { size: 22 }), hasToggle: true },
|
|
2569
|
+
{ key: 'ground', label: 'Vehicle Rental', icon: jsxRuntime.jsx(CarIcon$1, { size: 22 }), hasToggle: true },
|
|
2570
|
+
{ key: 'busneeded', label: 'Bus Charter', icon: jsxRuntime.jsx(BusIcon$2, { size: 22 }), hasToggle: true },
|
|
2571
|
+
];
|
|
2572
|
+
const isEnabledValue = (value) => value === true || Number(value) === 1;
|
|
2573
|
+
const textValue = (value) => value === undefined ? '' : String(value);
|
|
2574
|
+
const suffix = (index) => index ? String(index + 1) : '';
|
|
2575
|
+
const airFieldName = (name, index) => index === 3 ? `air${name}${index + 1}` : `${name}${suffix(index)}`;
|
|
2576
|
+
const prefixedFieldName = (prefix, name, index) => `${prefix}${name}${suffix(index)}`;
|
|
2577
|
+
const hotelFieldName = (name, index) => `${name}${suffix(index)}`;
|
|
2578
|
+
const Field = ({ label, name, values, setValue, type = 'text', required, disabled, max, min, maxDate, placeholder, note, options, multiline, }) => {
|
|
2579
|
+
const inputId = `gtr-${name}`;
|
|
2580
|
+
const common = {
|
|
2581
|
+
id: inputId,
|
|
2582
|
+
name,
|
|
2583
|
+
value: textValue(values[name]),
|
|
2584
|
+
required,
|
|
2585
|
+
disabled,
|
|
2586
|
+
'aria-describedby': note ? `${inputId}-note` : undefined,
|
|
2587
|
+
onChange: (event) => setValue(name, event.target.value),
|
|
2588
|
+
};
|
|
2589
|
+
return (jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsxs("label", { className: styles$7.label, htmlFor: inputId, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: " *" })] }), multiline ? (jsxRuntime.jsx("textarea", { ...common, className: styles$7.textarea, rows: 3, maxLength: 5000, placeholder: placeholder })) : options ? (jsxRuntime.jsxs("select", { ...common, className: styles$7.select, children: [jsxRuntime.jsx("option", { value: "", children: "Select" }), options.map((option) => jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))] })) : (jsxRuntime.jsx("input", { ...common, className: styles$7.input, type: type, max: type === 'date' ? maxDate : max, min: type === 'date' ? textValue(min) : min, placeholder: placeholder })), note && jsxRuntime.jsx("div", { className: styles$7.note, id: `${inputId}-note`, children: note })] }));
|
|
2590
|
+
};
|
|
2591
|
+
const ChoiceGroup = ({ label, name, options, values, setValue, required, }) => (jsxRuntime.jsxs("fieldset", { className: styles$7.choiceFieldset, children: [jsxRuntime.jsxs("legend", { className: styles$7.label, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: " *" })] }), jsxRuntime.jsx("div", { className: styles$7.radioGroup, children: options.map((option) => (jsxRuntime.jsxs("label", { className: styles$7.radioLabel, children: [jsxRuntime.jsx("input", { type: "radio", name: name, value: option, checked: values[name] === option, onChange: () => setValue(name, option), required: required }), jsxRuntime.jsx("span", { children: option })] }, option))) })] }));
|
|
2592
|
+
const CheckToggle = ({ label, name, values, setValue, }) => (jsxRuntime.jsxs("div", { className: styles$7.checkToggle, children: [jsxRuntime.jsx(Toggle, { "aria-label": label, checked: isEnabledValue(values[name]), onChange: (checked) => setValue(name, checked ? 1 : 0), size: "sm" }), jsxRuntime.jsx("span", { children: label })] }));
|
|
2593
|
+
const YesNo = ({ label, name, values, setValue }) => (jsxRuntime.jsx(ChoiceGroup, { label: label, name: name, options: ['Yes', 'No'], values: { ...values, [name]: values[name] === 1 ? 'Yes' : values[name] === 0 ? 'No' : values[name] }, setValue: (_, value) => setValue(name, value === 'Yes' ? 1 : 0), required: true }));
|
|
2594
|
+
const SegmentHeader = ({ label, index, canDelete, onDelete }) => (jsxRuntime.jsxs("div", { className: styles$7.segmentHeader, children: [jsxRuntime.jsxs("span", { children: [label, " ", index + 1] }), canDelete && jsxRuntime.jsxs(Button, { type: "button", size: "sm", variant: "outline", rightIcon: jsxRuntime.jsx(TrashIcon$2, { size: 14 }), onClick: onDelete, children: ["Delete ", label] })] }));
|
|
2595
|
+
const FlightRequest = ({ prefix, values, setValue, cateringOptions, }) => {
|
|
2596
|
+
const typeName = `${prefix}multiplesegments`;
|
|
2597
|
+
const flightType = textValue(values[typeName]);
|
|
2598
|
+
const allowsMultiple = flightType === 'One Way' || flightType === 'Multiple Destinations';
|
|
2599
|
+
const [count, setCount] = React.useState(1);
|
|
2600
|
+
const isCharter = prefix === 'charter';
|
|
2601
|
+
const fieldName = (name, index) => isCharter ? prefixedFieldName('charter', name, index) : airFieldName(name, index);
|
|
2602
|
+
const segmentFields = isCharter
|
|
2603
|
+
? ['departlocation', 'departdate', 'departtime', 'departtime_tbd', 'departonewayoutboundpricing', 'arrivelocation', 'returndate', 'returntime', 'arrivetime_tbd', 'cateringoptions', 'departlocationfbo', 'preferredcarriers']
|
|
2604
|
+
: ['departlocation', 'departdate', 'departtime', 'departlowestfareanytime', 'arrivelocation', 'returndate', 'returntime', 'arrivelowestfareanytime', 'preferredcarriers', 'passengertargetfare'];
|
|
2605
|
+
const deleteSegment = (index) => {
|
|
2606
|
+
for (let position = index; position < count; position += 1) {
|
|
2607
|
+
segmentFields.forEach((field) => {
|
|
2608
|
+
const current = fieldName(field, position);
|
|
2609
|
+
const next = fieldName(field, position + 1);
|
|
2610
|
+
setValue(current, position === count - 1 ? '' : values[next]);
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
setCount((current) => Math.max(1, current - 1));
|
|
2614
|
+
};
|
|
2615
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isCharter && jsxRuntime.jsxs(Alert, { children: [jsxRuntime.jsx("strong", { children: "NOTE:" }), " Desired departure times are shared with carrier partners immediately, and availability may require schedule adjustments."] }), jsxRuntime.jsx(ChoiceGroup, { label: "Flight Type", name: typeName, options: FLIGHT_TYPES, values: values, setValue: (name, value) => {
|
|
2616
|
+
setValue(name, value);
|
|
2617
|
+
if (value === 'Round Trip')
|
|
2618
|
+
setCount(1);
|
|
2619
|
+
}, required: true }), jsxRuntime.jsxs("div", { className: styles$7.segments, children: [Array.from({ length: count }, (_, index) => {
|
|
2620
|
+
const departLocation = fieldName('departlocation', index);
|
|
2621
|
+
const departDate = fieldName('departdate', index);
|
|
2622
|
+
const departTime = fieldName('departtime', index);
|
|
2623
|
+
const arrivalLocation = fieldName('arrivelocation', index);
|
|
2624
|
+
const returnDate = fieldName('returndate', index);
|
|
2625
|
+
const returnTime = fieldName('returntime', index);
|
|
2626
|
+
return (jsxRuntime.jsxs(Accordion, { header: jsxRuntime.jsx(SegmentHeader, { label: "Flight", index: index, canDelete: allowsMultiple && count > 1, onDelete: () => deleteSegment(index) }), showTimeline: true, children: [jsxRuntime.jsx(Field, { label: "Departure Airport", name: departLocation, values: values, setValue: setValue, required: true }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Departure Date", name: departDate, values: values, setValue: setValue, type: "date", min: textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: isCharter ? 'Desired Departure Time' : 'Departure Time', name: departTime, values: values, setValue: setValue, type: isCharter ? 'time' : 'text', options: isCharter ? undefined : FLIGHT_TIMES.map((option) => ({ label: option, value: option })), required: !isCharter })] }), isCharter
|
|
2627
|
+
? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CheckToggle, { label: "Departure Time TBD", name: fieldName('departtime_tbd', index), values: values, setValue: setValue }), ['Round Trip', 'Multiple Destinations'].includes(flightType) && jsxRuntime.jsx(CheckToggle, { label: "Also Include Pricing for One Way Outbound Flight", name: fieldName('departonewayoutboundpricing', index), values: values, setValue: setValue })] })
|
|
2628
|
+
: jsxRuntime.jsx(CheckToggle, { label: "Also Consider Lowest Fare Anytime of Day", name: fieldName('departlowestfareanytime', index), values: values, setValue: setValue }), jsxRuntime.jsx(Field, { label: "Arrival Airport", name: arrivalLocation, values: values, setValue: setValue, required: true }), flightType === 'Round Trip' && jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Return Date", name: returnDate, values: values, setValue: setValue, type: "date", min: textValue(values[departDate]) || textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: isCharter ? 'Desired Return Time' : 'Return Time', name: returnTime, values: values, setValue: setValue, type: isCharter ? 'time' : 'text', options: isCharter ? undefined : FLIGHT_TIMES.map((option) => ({ label: option, value: option })), required: !isCharter })] }), isCharter
|
|
2629
|
+
? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [flightType === 'Round Trip' && jsxRuntime.jsx(CheckToggle, { label: "Return Time TBD", name: fieldName('arrivetime_tbd', index), values: values, setValue: setValue }), flightType === 'Round Trip' && jsxRuntime.jsx(CheckToggle, { label: "Also Include Pricing for One Way Return Flight", name: "charterarriveonewayreturnpricing", values: values, setValue: setValue }), jsxRuntime.jsxs(FormRow, { columns: 3, children: [jsxRuntime.jsx(Field, { label: "Catering Options", name: fieldName('cateringoptions', index), values: values, setValue: setValue, options: cateringOptions.map((option) => ({ label: option, value: option })), required: true }), jsxRuntime.jsx(Field, { label: "Preferred FBO (Departure Airport)", name: fieldName('departlocationfbo', index), values: values, setValue: setValue }), jsxRuntime.jsx(Field, { label: "Preferred Carriers", name: fieldName('preferredcarriers', index), values: values, setValue: setValue })] })] })
|
|
2630
|
+
: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [flightType === 'Round Trip' && jsxRuntime.jsx(CheckToggle, { label: "Also Consider Lowest Fare Anytime of Day", name: fieldName('arrivelowestfareanytime', index), values: values, setValue: setValue }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Preferred Carriers", name: fieldName('preferredcarriers', index), values: values, setValue: setValue }), jsxRuntime.jsx(Field, { label: "Target Fare Per Passenger", name: fieldName('passengertargetfare', index), values: values, setValue: setValue, type: "number", min: 0 })] })] })] }, `${prefix}-${index}`));
|
|
2631
|
+
}), allowsMultiple && count < 4 && jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Button, { type: "button", size: "sm", variant: "secondary", rightIcon: jsxRuntime.jsx(PlusIcon$2, { size: 16 }), onClick: () => setCount((current) => current + 1), children: "Add Flight" }) })] }), isCharter && jsxRuntime.jsx(ChoiceGroup, { label: "Preferred Aircraft Seating", name: "charterpreferredseatingrange", options: AIRCRAFT_SEATING, values: values, setValue: setValue }), jsxRuntime.jsx(Field, { label: "General Notes on Air Request", name: isCharter ? 'details_charters' : 'details_air', values: values, setValue: setValue, multiline: true })] }));
|
|
2632
|
+
};
|
|
2633
|
+
const HotelRequest = ({ values, setValue }) => {
|
|
2634
|
+
const [count, setCount] = React.useState(1);
|
|
2635
|
+
const totalRooms = Array.from({ length: count }, (_, index) => Number(values[hotelFieldName('rooms', index)] || 0)).reduce((total, rooms) => total + rooms, 0);
|
|
2636
|
+
const deleteHotel = (index) => {
|
|
2637
|
+
const fields = ['hotellocation', 'hotelproperty', 'kings', 'doubles', 'rooms', 'checkin', 'checkout'];
|
|
2638
|
+
for (let position = index; position < count; position += 1) {
|
|
2639
|
+
fields.forEach((field) => setValue(hotelFieldName(field, position), position === count - 1 ? '' : values[hotelFieldName(field, position + 1)]));
|
|
2640
|
+
}
|
|
2641
|
+
setCount((current) => Math.max(1, current - 1));
|
|
2642
|
+
};
|
|
2643
|
+
const updateRooms = (index, type, value) => {
|
|
2644
|
+
setValue(hotelFieldName(type, index), value);
|
|
2645
|
+
const other = type === 'kings' ? 'doubles' : 'kings';
|
|
2646
|
+
setValue(hotelFieldName('rooms', index), Number(value || 0) + Number(values[hotelFieldName(other, index)] || 0));
|
|
2647
|
+
};
|
|
2648
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [totalRooms > 0 && totalRooms < 8 && jsxRuntime.jsxs(Alert, { children: [jsxRuntime.jsx("strong", { children: "NOTE:" }), " Seven or fewer rooms are booked by an agent instead of STM Stay."] }), jsxRuntime.jsxs("div", { className: styles$7.segments, children: [Array.from({ length: count }, (_, index) => jsxRuntime.jsxs(Accordion, { header: jsxRuntime.jsx(SegmentHeader, { label: "Hotel", index: index, canDelete: count > 1, onDelete: () => deleteHotel(index) }), showTimeline: true, children: [jsxRuntime.jsx(Field, { label: "City", name: hotelFieldName('hotellocation', index), values: values, setValue: setValue, required: true }), jsxRuntime.jsx(Field, { label: "Preferred Hotel(s)", name: hotelFieldName('hotelproperty', index), values: values, setValue: setValue }), jsxRuntime.jsxs(FormRow, { columns: 3, children: [jsxRuntime.jsx(Field, { label: "# of King Rooms", name: hotelFieldName('kings', index), values: values, setValue: (_name, value) => updateRooms(index, 'kings', value), type: "number", min: 0, max: 999, required: true }), jsxRuntime.jsx(Field, { label: "# of Double Rooms", name: hotelFieldName('doubles', index), values: values, setValue: (_name, value) => updateRooms(index, 'doubles', value), type: "number", min: 0, max: 999, required: true }), jsxRuntime.jsx(Field, { label: "Total Rooms", name: hotelFieldName('rooms', index), values: values, setValue: setValue, disabled: true })] }), jsxRuntime.jsx(Alert, { variant: "error", children: "Please include bus driver room if needed." }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Check-In Date", name: hotelFieldName('checkin', index), values: values, setValue: setValue, type: "date", min: textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: "Check-Out Date", name: hotelFieldName('checkout', index), values: values, setValue: setValue, type: "date", min: textValue(values[hotelFieldName('checkin', index)]) || textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true })] })] }, index)), count < 3 && jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Button, { type: "button", size: "sm", variant: "secondary", rightIcon: jsxRuntime.jsx(PlusIcon$2, { size: 16 }), onClick: () => setCount((current) => current + 1), children: "Add Hotel" }) })] }), jsxRuntime.jsx(YesNo, { label: "Do you need a room for the bus driver?", name: "busdriverroom", values: values, setValue: setValue }), totalRooms > 7 && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(YesNo, { label: "Do you need meeting space for the team?", name: "teammeetingspaceflag", values: values, setValue: setValue }), Number(values.teammeetingspaceflag) === 1 && jsxRuntime.jsx(Field, { label: "How many people do you need the meeting space set for?", name: "teammeetingspace", values: values, setValue: setValue, type: "number", min: 1, max: 999, required: true })] }), jsxRuntime.jsx(Field, { label: "General Notes on Hotel Request", name: "details_hotel", values: values, setValue: setValue, multiline: true })] });
|
|
2649
|
+
};
|
|
2650
|
+
const VehicleRentalRequest = ({ values, setValue }) => {
|
|
2651
|
+
const hasAir = isEnabledValue(values.air) || isEnabledValue(values.charter);
|
|
2652
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(FormRow, { columns: 3, children: [jsxRuntime.jsx(Field, { label: "Pickup Date", name: "pickupdate", values: values, setValue: setValue, type: "date", min: textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: "Pickup Time", name: "pickuptime", values: values, setValue: setValue, type: "time", required: !hasAir }), jsxRuntime.jsx(Field, { label: "Pickup Location", name: "pickuplocation", values: values, setValue: setValue, required: true })] }), hasAir && jsxRuntime.jsx(CheckToggle, { label: "I will be picking up from the airport", name: "carairportpickup", values: values, setValue: (name, value) => {
|
|
2653
|
+
setValue(name, value);
|
|
2654
|
+
if (Number(value) === 1)
|
|
2655
|
+
setValue('pickuplocation', values.arrivelocation || values.charterarrivelocation);
|
|
2656
|
+
} }), jsxRuntime.jsxs(FormRow, { columns: 3, children: [jsxRuntime.jsx(Field, { label: "Drop Off Date", name: "dropoffdate", values: values, setValue: setValue, type: "date", min: textValue(values.pickupdate) || textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: "Drop Off Time", name: "dropofftime", values: values, setValue: setValue, type: "time", required: !hasAir }), jsxRuntime.jsx(Field, { label: "Drop Off Location", name: "cardropofflocation", values: values, setValue: setValue, required: true })] }), hasAir && jsxRuntime.jsx(CheckToggle, { label: "I will be dropping off at the airport", name: "carairportdropoff", values: values, setValue: setValue }), jsxRuntime.jsx(Field, { label: "# of Rentals", name: "carqty", values: values, setValue: setValue, type: "number", min: 1, max: 99, required: true }), jsxRuntime.jsx(Field, { label: "Vehicle Type/Size Preference", name: "carsizepref", values: values, setValue: setValue, placeholder: "Economy, Compact, ..." }), jsxRuntime.jsx(Field, { label: "Driver Name(s) for Reservation", name: "cardriver", values: values, setValue: setValue, placeholder: "Name 1, Name 2", required: true }), jsxRuntime.jsx(Field, { label: "General Notes on Vehicle Rental Request", name: "details_ground", values: values, setValue: setValue, multiline: true })] });
|
|
2657
|
+
};
|
|
2658
|
+
const BusRequest = ({ values, setValue, schoolAddress }) => {
|
|
2659
|
+
const [destinations, setDestinations] = React.useState(1);
|
|
2660
|
+
const busType = textValue(values.bustype);
|
|
2661
|
+
const destinationName = (index) => `busdestination${suffix(index)}`;
|
|
2662
|
+
const updateBusType = (name, value) => {
|
|
2663
|
+
setValue(name, value);
|
|
2664
|
+
if (['Drive To & From Campus', 'Drive to Event/Fly Home'].includes(String(value)))
|
|
2665
|
+
setValue('buspickuplocation', schoolAddress);
|
|
2666
|
+
if (['Drive To & From Campus', 'Fly to Event/Drive Home'].includes(String(value)))
|
|
2667
|
+
setValue('busdropofflocation', schoolAddress);
|
|
2668
|
+
};
|
|
2669
|
+
const deleteDestination = (index) => {
|
|
2670
|
+
for (let position = index; position < destinations; position += 1)
|
|
2671
|
+
setValue(destinationName(position), position === destinations - 1 ? '' : values[destinationName(position + 1)]);
|
|
2672
|
+
setDestinations((current) => Math.max(1, current - 1));
|
|
2673
|
+
};
|
|
2674
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChoiceGroup, { label: "Charter Bus Type", name: "bustype", options: BUS_TYPES, values: values, setValue: updateBusType, required: true }), busType && busType !== BUS_TYPES[0] && jsxRuntime.jsx(CheckToggle, { label: "Do you need local airport transfers?", name: "buslocalairporttransfers", values: values, setValue: setValue }), jsxRuntime.jsxs(FormRow, { columns: 3, children: [jsxRuntime.jsx(Field, { label: "Pickup Date", name: "buspickupdate", values: values, setValue: setValue, type: "date", min: textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: "Pickup Time", name: "buspickuptime", values: values, setValue: setValue, type: "time", required: true }), jsxRuntime.jsx(Field, { label: "# of Buses", name: "numbuses", values: values, setValue: setValue, type: "number", min: 1, max: 99, required: true })] }), jsxRuntime.jsx(Field, { label: "Motorcoach/Airport Pickup Location", name: "buspickuplocation", values: values, setValue: setValue, required: true }), jsxRuntime.jsxs("div", { className: styles$7.destinationList, children: [jsxRuntime.jsx("span", { className: styles$7.label, children: "Destinations *" }), Array.from({ length: destinations }, (_, index) => jsxRuntime.jsxs("div", { className: styles$7.destinationRow, children: [jsxRuntime.jsx(Field, { label: `Destination ${index + 1}`, name: destinationName(index), values: values, setValue: setValue, placeholder: `Destination ${index + 1}`, required: true }), destinations > 1 && jsxRuntime.jsx(Button, { type: "button", size: "sm", variant: "outline", square: true, "aria-label": `Delete Destination ${index + 1}`, onClick: () => deleteDestination(index), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) })] }, index)), destinations < 4 && jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Button, { type: "button", size: "sm", variant: "secondary", rightIcon: jsxRuntime.jsx(PlusIcon$2, { size: 16 }), onClick: () => setDestinations((current) => current + 1), children: "Add Destination" }) })] }), busType === BUS_TYPES[1] && jsxRuntime.jsx(CheckToggle, { label: "Are you flying back from a different airport than you flew in to?", name: "busdifferentairport", values: values, setValue: setValue }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Return / Drop Off Date", name: "busreturndate", values: values, setValue: setValue, type: "date", min: textValue(values.buspickupdate) || textValue(values.tripstartdate), maxDate: textValue(values.tripreturndate), required: true }), jsxRuntime.jsx(Field, { label: "Return / Drop Off Time", name: "busreturntime", values: values, setValue: setValue, type: "time", required: true })] }), jsxRuntime.jsx(Field, { label: "Motorcoach/Airport Dropoff Location", name: "busdropofflocation", values: values, setValue: setValue, required: true }), jsxRuntime.jsx(Field, { label: "General Notes on Bus Charter Request", name: "busdetails", values: values, setValue: setValue, multiline: true })] });
|
|
2675
|
+
};
|
|
2676
|
+
const SummaryRow = ({ label, value }) => !value ? null : jsxRuntime.jsxs("div", { className: styles$7.summaryRow, children: [jsxRuntime.jsx("span", { children: label }), jsxRuntime.jsx("strong", { children: String(value) })] });
|
|
2677
|
+
const RequestSummary = ({ values, enabled }) => {
|
|
2678
|
+
const sections = [
|
|
2679
|
+
enabled.air && { key: 'air', title: 'Commercial Air Request', rows: [['Flight Type', values.airmultiplesegments], ['Departure Airport', values.departlocation], ['Departure Date', values.departdate], ['Arrival Airport', values.arrivelocation]] },
|
|
2680
|
+
enabled.charter && { key: 'charter', title: 'Charter Air Request', rows: [['Flight Type', values.chartermultiplesegments], ['Departure Airport', values.charterdepartlocation], ['Departure Date', values.charterdepartdate], ['Arrival Airport', values.charterarrivelocation]] },
|
|
2681
|
+
enabled.hotel && { key: 'hotel', title: 'Hotel Request', rows: [['City', values.hotellocation], ['Preferred Hotel(s)', values.hotelproperty], ['# of King Rooms', values.kings], ['# of Double Rooms', values.doubles], ['Check In', values.checkin], ['Check Out', values.checkout]] },
|
|
2682
|
+
enabled.ground && { key: 'ground', title: 'Vehicle Rental Request', rows: [['Number of Rentals', values.carqty], ['Vehicle Type/Size Preference', values.carsizepref], ['Pickup Location', values.pickuplocation], ['Pickup Date', values.pickupdate], ['Drop-off Location', values.cardropofflocation]] },
|
|
2683
|
+
enabled.busneeded && { key: 'busneeded', title: 'Bus Charter Request', rows: [['Charter Bus Type', values.bustype], ['Number of Buses', values.numbuses], ['Pickup Location', values.buspickuplocation], ['Pickup Date', values.buspickupdate], ['Return Date', values.busreturndate]] },
|
|
2684
|
+
].filter(Boolean);
|
|
2685
|
+
const populated = sections.filter((section) => section.rows.some(([, value]) => Boolean(value)));
|
|
2686
|
+
return jsxRuntime.jsxs("div", { className: styles$7.summaryCard, children: [jsxRuntime.jsx("h2", { children: "Request Summary" }), populated.map((section) => jsxRuntime.jsxs("section", { className: styles$7.summarySection, children: [jsxRuntime.jsx("h3", { children: section.title }), section.rows.map(([label, value]) => jsxRuntime.jsx(SummaryRow, { label: label, value: value }, label))] }, section.key)), !populated.length && jsxRuntime.jsx("p", { className: styles$7.emptySummary, children: "No services selected" })] });
|
|
2687
|
+
};
|
|
2688
|
+
const GroupTravelRequestPage = ({ eventName = 'New Trip', totalPages = 1, onSubmit, onCancel, onChange, initialValues = {}, contacts = [], cateringOptions = DEFAULT_CATERING, schoolAddress = '', services = DEFAULT_SERVICES, summarySections, className = '', }) => {
|
|
2424
2689
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
2425
|
-
const [
|
|
2690
|
+
const [activeTab, setActiveTab] = React.useState('form');
|
|
2691
|
+
const [activeService, setActiveService] = React.useState('general');
|
|
2692
|
+
const [validationMessage, setValidationMessage] = React.useState('');
|
|
2693
|
+
const [values, setValues] = React.useState(() => ({
|
|
2694
|
+
air: 0,
|
|
2695
|
+
charter: 0,
|
|
2696
|
+
hotel: 0,
|
|
2697
|
+
ground: 0,
|
|
2698
|
+
busneeded: 0,
|
|
2699
|
+
...initialValues,
|
|
2700
|
+
...(initialValues.bus !== undefined && initialValues.busneeded === undefined ? { busneeded: initialValues.bus } : {}),
|
|
2701
|
+
}));
|
|
2702
|
+
const enabled = React.useMemo(() => ({
|
|
2426
2703
|
general: true,
|
|
2427
|
-
air:
|
|
2428
|
-
charter:
|
|
2429
|
-
hotel:
|
|
2430
|
-
ground:
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2704
|
+
air: isEnabledValue(values.air),
|
|
2705
|
+
charter: isEnabledValue(values.charter),
|
|
2706
|
+
hotel: isEnabledValue(values.hotel),
|
|
2707
|
+
ground: isEnabledValue(values.ground),
|
|
2708
|
+
busneeded: isEnabledValue(values.busneeded),
|
|
2709
|
+
}), [values]);
|
|
2710
|
+
const setValue = (name, value) => {
|
|
2711
|
+
setValues((current) => {
|
|
2712
|
+
const next = { ...current, [name]: value };
|
|
2713
|
+
onChange?.(next);
|
|
2714
|
+
return next;
|
|
2715
|
+
});
|
|
2716
|
+
setValidationMessage('');
|
|
2439
2717
|
};
|
|
2440
|
-
const
|
|
2441
|
-
|
|
2442
|
-
if (
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2718
|
+
const toggleService = (key, checked) => {
|
|
2719
|
+
setValue(key === 'bus' ? 'busneeded' : key, checked ? 1 : 0);
|
|
2720
|
+
if (checked)
|
|
2721
|
+
setActiveService((key === 'bus' ? 'busneeded' : key));
|
|
2445
2722
|
};
|
|
2446
|
-
const
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
onCancel?.();
|
|
2723
|
+
const submit = (event) => {
|
|
2724
|
+
event.preventDefault();
|
|
2725
|
+
if (![enabled.air, enabled.charter, enabled.hotel, enabled.ground, enabled.busneeded].some(Boolean)) {
|
|
2726
|
+
setValidationMessage('At least one service must be selected.');
|
|
2727
|
+
return;
|
|
2452
2728
|
}
|
|
2453
|
-
};
|
|
2454
|
-
const handleNext = () => {
|
|
2455
2729
|
if (currentPage < totalPages) {
|
|
2456
|
-
setCurrentPage(
|
|
2457
|
-
|
|
2458
|
-
else {
|
|
2459
|
-
onSubmit?.(formValues);
|
|
2730
|
+
setCurrentPage((page) => page + 1);
|
|
2731
|
+
return;
|
|
2460
2732
|
}
|
|
2733
|
+
onSubmit?.(values);
|
|
2461
2734
|
};
|
|
2462
|
-
const
|
|
2463
|
-
|
|
2735
|
+
const previous = () => currentPage > 1 ? setCurrentPage((page) => page - 1) : onCancel?.();
|
|
2736
|
+
const contactOptions = contacts.map((contact) => ({ label: contact.name, value: String(contact.id) }));
|
|
2737
|
+
const selectContact = (field, id) => {
|
|
2738
|
+
const contact = contacts.find((item) => String(item.id) === String(id));
|
|
2739
|
+
setValue(`${field}id`, id);
|
|
2740
|
+
setValue(field, contact?.name ?? '');
|
|
2741
|
+
setValue(`${field}phone`, contact?.phone ?? '');
|
|
2742
|
+
setValue(`${field}email`, contact?.email ?? '');
|
|
2464
2743
|
};
|
|
2465
|
-
return (jsxRuntime.jsx(RequestFormLayout, { className: className, header: jsxRuntime.jsx(RequestFormHeader, { title: "Group Travel Request", currentPage: totalPages > 1 ? currentPage : undefined, totalPages: totalPages > 1 ? totalPages : undefined, eventName: eventName }), sidebar: jsxRuntime.jsxs("div", { className: styles$7.sidebarSection, children: [jsxRuntime.jsx("h3", { className: styles$7.sidebarTitle, children: "Services" }), jsxRuntime.jsx(ServiceToggleList, { services: services, enabledServices: enabledServices, onToggle: handleToggle, onClick: handleServiceClick })] }), summary: jsxRuntime.jsx(RequestSummary, { sections: summarySections, values: formValues, enabledSections: enabledServices }), footer: jsxRuntime.jsx(RequestFormFooter, { onPrevious: handlePrevious, onNext: handleNext, isFirstPage: currentPage === 1, isLastPage: currentPage === totalPages }), children: jsxRuntime.jsxs("div", { className: styles$7.formContent, children: [jsxRuntime.jsxs(FormSection, { id: "general", title: "General Details", icon: jsxRuntime.jsx(EventsIcon, {}), children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Travel Party Size *" }), jsxRuntime.jsx("input", { type: "number", className: styles$7.input, style: { width: '200px' }, min: 1, max: 999, value: formValues['Travel Party Size'] || '', onChange: (e) => updateFormValue('Travel Party Size', e.target.value) })] }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Trip Start *" }), jsxRuntime.jsx("input", { type: "date", className: styles$7.input, value: formValues['Trip Start'] || '', onChange: (e) => updateFormValue('Trip Start', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Trip Return *" }), jsxRuntime.jsx("input", { type: "date", className: styles$7.input, value: formValues['Trip Return'] || '', onChange: (e) => updateFormValue('Trip Return', e.target.value) })] })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Booking Contact *" }), jsxRuntime.jsx("input", { type: "text", className: styles$7.input, placeholder: "Full Name", value: formValues['Booking Contact'] || '', onChange: (e) => updateFormValue('Booking Contact', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "General Notes" }), jsxRuntime.jsx("textarea", { className: styles$7.textarea, rows: 4, placeholder: "Any notes regarding this trip...", value: formValues['General Notes'] || '', onChange: (e) => updateFormValue('General Notes', e.target.value) })] })] }), enabledServices.air && (jsxRuntime.jsxs(FormSection, { id: "air", title: "Commercial Air Request", icon: jsxRuntime.jsx(PlaneIcon, {}), children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Flight Type *" }), jsxRuntime.jsx("div", { className: styles$7.radioGroup, children: ['One Way', 'Round Trip', 'Multiple Destinations'].map(option => (jsxRuntime.jsxs("label", { className: styles$7.radioLabel, children: [jsxRuntime.jsx("input", { type: "radio", name: "flightType", value: option, checked: formValues['Flight Type'] === option, onChange: (e) => updateFormValue('Flight Type', e.target.value) }), jsxRuntime.jsx("span", { children: option })] }, option))) })] }), jsxRuntime.jsxs(Accordion, { header: jsxRuntime.jsx("span", { className: styles$7.segmentHeader, children: "Flight 1" }), showTimeline: true, children: [jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Departure Airport *" }), jsxRuntime.jsx("input", { type: "text", className: styles$7.input, placeholder: "e.g., JFK", value: formValues['Departure Airport'] || '', onChange: (e) => updateFormValue('Departure Airport', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Arrival Airport *" }), jsxRuntime.jsx("input", { type: "text", className: styles$7.input, placeholder: "e.g., LAX", value: formValues['Arrival Airport'] || '', onChange: (e) => updateFormValue('Arrival Airport', e.target.value) })] })] }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Departure Date *" }), jsxRuntime.jsx("input", { type: "date", className: styles$7.input, value: formValues['Departure Date'] || '', onChange: (e) => updateFormValue('Departure Date', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Departure Time *" }), jsxRuntime.jsxs("select", { className: styles$7.select, value: formValues['Departure Time'] || '', onChange: (e) => updateFormValue('Departure Time', e.target.value), children: [jsxRuntime.jsx("option", { value: "", children: "Select time range" }), jsxRuntime.jsx("option", { value: "Early Morning (5:00am \u2013 8:00am)", children: "Early Morning (5:00am \u2013 8:00am)" }), jsxRuntime.jsx("option", { value: "Morning (8:00am \u2013 12:00pm)", children: "Morning (8:00am \u2013 12:00pm)" }), jsxRuntime.jsx("option", { value: "Afternoon (12:00pm - 3:00pm)", children: "Afternoon (12:00pm - 3:00pm)" }), jsxRuntime.jsx("option", { value: "Late Afternoon (3:00pm \u2013 6:00pm)", children: "Late Afternoon (3:00pm \u2013 6:00pm)" }), jsxRuntime.jsx("option", { value: "Evening (6:00pm \u2013 12:00am)", children: "Evening (6:00pm \u2013 12:00am)" })] })] })] })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Air Travel Notes" }), jsxRuntime.jsx("textarea", { className: styles$7.textarea, rows: 3, placeholder: "Any special requirements for air travel..." })] })] })), enabledServices.hotel && (jsxRuntime.jsxs(FormSection, { id: "hotel", title: "Hotel Request", icon: jsxRuntime.jsx(HotelIcon, {}), children: [jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Check-in Date *" }), jsxRuntime.jsx("input", { type: "date", className: styles$7.input, value: formValues['Check-in Date'] || '', onChange: (e) => updateFormValue('Check-in Date', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Check-out Date *" }), jsxRuntime.jsx("input", { type: "date", className: styles$7.input, value: formValues['Check-out Date'] || '', onChange: (e) => updateFormValue('Check-out Date', e.target.value) })] })] }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Number of Rooms *" }), jsxRuntime.jsx("input", { type: "number", className: styles$7.input, min: 1, value: formValues['Number of Rooms'] || '', onChange: (e) => updateFormValue('Number of Rooms', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Room Type" }), jsxRuntime.jsxs("select", { className: styles$7.select, value: formValues['Room Type'] || '', onChange: (e) => updateFormValue('Room Type', e.target.value), children: [jsxRuntime.jsx("option", { value: "", children: "Select room type" }), jsxRuntime.jsx("option", { value: "Standard", children: "Standard" }), jsxRuntime.jsx("option", { value: "Double", children: "Double" }), jsxRuntime.jsx("option", { value: "Suite", children: "Suite" })] })] })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Hotel Preferences" }), jsxRuntime.jsx("textarea", { className: styles$7.textarea, rows: 3, placeholder: "Preferred hotel chain, location requirements, amenities...", value: formValues['Hotel Preferences'] || '', onChange: (e) => updateFormValue('Hotel Preferences', e.target.value) })] })] })), enabledServices.ground && (jsxRuntime.jsxs(FormSection, { id: "ground", title: "Ground Transportation", icon: jsxRuntime.jsx(CarIcon, {}), children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Vehicle Type *" }), jsxRuntime.jsxs("select", { className: styles$7.select, value: formValues['Vehicle Type'] || '', onChange: (e) => updateFormValue('Vehicle Type', e.target.value), children: [jsxRuntime.jsx("option", { value: "", children: "Select vehicle type" }), jsxRuntime.jsx("option", { value: "Sedan", children: "Sedan" }), jsxRuntime.jsx("option", { value: "SUV", children: "SUV" }), jsxRuntime.jsx("option", { value: "Van", children: "Van" }), jsxRuntime.jsx("option", { value: "Limousine", children: "Limousine" })] })] }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Pickup Location *" }), jsxRuntime.jsx("input", { type: "text", className: styles$7.input, placeholder: "Airport, hotel, etc.", value: formValues['Pickup Location'] || '', onChange: (e) => updateFormValue('Pickup Location', e.target.value) })] }), jsxRuntime.jsxs("div", { className: styles$7.field, children: [jsxRuntime.jsx("label", { className: styles$7.label, children: "Dropoff Location *" }), jsxRuntime.jsx("input", { type: "text", className: styles$7.input, placeholder: "Hotel, venue, etc.", value: formValues['Dropoff Location'] || '', onChange: (e) => updateFormValue('Dropoff Location', e.target.value) })] })] })] }))] }) }));
|
|
2744
|
+
const section = (key, title, icon, body) => enabled[key] && (jsxRuntime.jsx("div", { id: key, className: styles$7.serviceSection, "data-mobile-active": activeService === key, children: jsxRuntime.jsx(FormSection, { title: title, icon: icon, status: key === 'general' ? undefined : 'not-submitted', children: body }) }));
|
|
2745
|
+
return jsxRuntime.jsxs("form", { className: `${styles$7.page} ${className}`, onSubmit: submit, "aria-label": "Group Travel Request form", children: [jsxRuntime.jsx("header", { className: styles$7.pageHeader, children: jsxRuntime.jsxs("h1", { children: ["Group Travel Request ", totalPages > 1 && jsxRuntime.jsxs("span", { children: ["(", currentPage, "/", totalPages, ")"] }), " ", jsxRuntime.jsxs("span", { children: ["\u2013 ", eventName] })] }) }), jsxRuntime.jsxs("div", { className: styles$7.mobileTabs, children: [jsxRuntime.jsx("button", { type: "button", className: activeTab === 'form' ? styles$7.activeTab : '', onClick: () => setActiveTab('form'), children: "Request Form" }), jsxRuntime.jsx("button", { type: "button", className: activeTab === 'summary' ? styles$7.activeTab : '', onClick: () => setActiveTab('summary'), children: "Summary" })] }), activeTab === 'form' && jsxRuntime.jsx("div", { className: styles$7.mobileServices, children: services.map((service) => jsxRuntime.jsxs("button", { type: "button", className: activeService === service.key ? styles$7.activeService : '', onClick: () => setActiveService((service.key === 'bus' ? 'busneeded' : service.key)), children: [service.icon, jsxRuntime.jsx("span", { children: service.label })] }, service.key)) }), jsxRuntime.jsxs("div", { className: styles$7.workspace, children: [jsxRuntime.jsxs("aside", { className: styles$7.serviceSidebar, children: [jsxRuntime.jsx(ServiceToggleList, { services: services, enabledServices: enabled, onToggle: toggleService, onClick: (key) => document.getElementById(key)?.scrollIntoView({ behavior: 'smooth', block: 'start' }) }), jsxRuntime.jsxs("div", { className: styles$7.tripEvents, children: [jsxRuntime.jsx("h3", { children: "Trip Events" }), jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx(CalendarIcon$1, { size: 17 }), " ", eventName] })] })] }), jsxRuntime.jsxs("main", { className: `${styles$7.formMain} ${activeTab !== 'form' ? styles$7.mobileHidden : ''}`, children: [validationMessage && jsxRuntime.jsx(Alert, { variant: "error", children: validationMessage }), activeService !== 'general' && !enabled[activeService] && jsxRuntime.jsxs("div", { className: styles$7.mobileEnable, children: [jsxRuntime.jsx("span", { children: "Enable Service" }), jsxRuntime.jsx(Toggle, { "aria-label": `Enable ${activeService}`, checked: false, onChange: (checked) => toggleService(activeService, checked), size: "sm" })] }), section('general', 'General Details', jsxRuntime.jsx(EventsIcon, {}), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Field, { label: "Travel Party Size", name: "attendees", values: values, setValue: setValue, type: "number", min: 1, max: 999, note: "For Commercial Air requests, begin with the largest expected travel party.", required: true }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Trip Start", name: "tripstartdate", values: values, setValue: setValue, type: "date", required: true }), jsxRuntime.jsx(Field, { label: "Trip Return", name: "tripreturndate", values: values, setValue: setValue, type: "date", min: textValue(values.tripstartdate), required: true })] }), jsxRuntime.jsxs("div", { className: styles$7.contactGroup, children: [jsxRuntime.jsx("span", { className: styles$7.label, children: "Booking Contact *" }), jsxRuntime.jsx(Field, { label: "Full Name", name: "bookingcontact", values: values, setValue: setValue, disabled: true }), jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Phone Number", name: "bookingcontactphone", values: values, setValue: setValue, disabled: true }), jsxRuntime.jsx(Field, { label: "Email Address", name: "bookingcontactemail", values: values, setValue: setValue, type: "email", disabled: true })] })] }), jsxRuntime.jsx(Field, { label: "Request Email CC", name: "ccemail", values: values, setValue: setValue, type: "email", note: "Email addresses, comma delimited." }), jsxRuntime.jsx(Field, { label: "Main Travel Contact", name: "travelcontactid", values: values, setValue: (_name, value) => selectContact('travelcontact', value), options: contactOptions, required: true }), values.travelcontact && jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Main Contact Phone", name: "travelcontactphone", values: values, setValue: setValue, disabled: true }), jsxRuntime.jsx(Field, { label: "Main Contact Email", name: "travelcontactemail", values: values, setValue: setValue, disabled: true })] }), jsxRuntime.jsx(Field, { label: "Alternate Travel Contact", name: "alternatetravelcontactid", values: values, setValue: (_name, value) => selectContact('alternatetravelcontact', value), options: contactOptions }), values.alternatetravelcontact && jsxRuntime.jsxs(FormRow, { columns: 2, children: [jsxRuntime.jsx(Field, { label: "Alternate Contact Phone", name: "alternatetravelcontactphone", values: values, setValue: setValue, disabled: true }), jsxRuntime.jsx(Field, { label: "Alternate Contact Email", name: "alternatetravelcontactemail", values: values, setValue: setValue, disabled: true })] }), jsxRuntime.jsx(YesNo, { label: "Is this request for an elimination event or tournament that could require early departure?", name: "tournamenttripelimination", values: values, setValue: setValue }), jsxRuntime.jsx(Field, { label: "General Notes Regarding This Trip", name: "notes", values: values, setValue: setValue, multiline: true })] })), section('air', 'Commercial Air Request', jsxRuntime.jsx(PlaneIcon$3, { size: 24 }), jsxRuntime.jsx(FlightRequest, { prefix: "air", values: values, setValue: setValue, cateringOptions: cateringOptions })), section('charter', 'Charter Air Request', jsxRuntime.jsx(PlaneIcon$3, { size: 24 }), jsxRuntime.jsx(FlightRequest, { prefix: "charter", values: values, setValue: setValue, cateringOptions: cateringOptions })), section('hotel', 'Hotel Request', jsxRuntime.jsx(HotelIcon$3, { size: 24 }), jsxRuntime.jsx(HotelRequest, { values: values, setValue: setValue })), section('ground', 'Vehicle Rental Request', jsxRuntime.jsx(CarIcon$1, { size: 24 }), jsxRuntime.jsx(VehicleRentalRequest, { values: values, setValue: setValue })), section('busneeded', 'Bus Charter Request', jsxRuntime.jsx(BusIcon$2, { size: 24 }), jsxRuntime.jsx(BusRequest, { values: values, setValue: setValue, schoolAddress: schoolAddress }))] }), jsxRuntime.jsx("aside", { className: `${styles$7.summarySidebar} ${activeTab !== 'summary' ? styles$7.summaryMobileHidden : ''}`, children: jsxRuntime.jsx(RequestSummary, { values: values, enabled: enabled }) })] }), jsxRuntime.jsxs("footer", { className: styles$7.pageFooter, children: [jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: previous, children: currentPage === 1 ? totalPages > 1 ? 'Cancel All' : 'Cancel' : 'Previous' }), totalPages > 1 && jsxRuntime.jsx("div", { className: styles$7.pageButtons, children: Array.from({ length: totalPages }, (_, index) => jsxRuntime.jsx("button", { type: "button", className: currentPage === index + 1 ? styles$7.currentPage : '', disabled: index + 1 > currentPage, onClick: () => setCurrentPage(index + 1), children: index + 1 }, index)) }), jsxRuntime.jsx(Button, { type: "submit", children: currentPage === totalPages ? totalPages > 1 ? 'Submit All' : 'Submit' : 'Next' })] })] });
|
|
2466
2746
|
};
|
|
2467
2747
|
GroupTravelRequestPage.displayName = 'GroupTravelRequestPage';
|
|
2468
2748
|
|
|
@@ -2549,9 +2829,9 @@ var styles$5 = {"page":"InfoCenterPage-module_page__HHBce","breadcrumb":"InfoCen
|
|
|
2549
2829
|
|
|
2550
2830
|
const CATEGORY_META = {
|
|
2551
2831
|
Alert: { label: 'Alert', icon: WarningIcon$1, alert: true },
|
|
2552
|
-
Air: { label: 'Air', icon: PlaneIcon$
|
|
2553
|
-
Car: { label: 'Car', icon: CarIcon$
|
|
2554
|
-
Hotel: { label: 'Hotel', icon: HotelIcon$
|
|
2832
|
+
Air: { label: 'Air', icon: PlaneIcon$3 },
|
|
2833
|
+
Car: { label: 'Car', icon: CarIcon$1 },
|
|
2834
|
+
Hotel: { label: 'Hotel', icon: HotelIcon$3 },
|
|
2555
2835
|
Policy: { label: 'Policy', icon: DocumentIcon },
|
|
2556
2836
|
General: { label: 'General', icon: DocumentIcon },
|
|
2557
2837
|
STM: { label: "Short's Info", icon: InfoIcon$1 },
|
|
@@ -2765,12 +3045,12 @@ exports.Avatar = Avatar;
|
|
|
2765
3045
|
exports.AvatarGroup = AvatarGroup;
|
|
2766
3046
|
exports.Badge = Badge;
|
|
2767
3047
|
exports.BuildingIcon = BuildingIcon;
|
|
2768
|
-
exports.BusIcon = BusIcon$
|
|
3048
|
+
exports.BusIcon = BusIcon$2;
|
|
2769
3049
|
exports.Button = Button;
|
|
2770
3050
|
exports.CalendarIcon = CalendarIcon$1;
|
|
2771
3051
|
exports.CalendarTypeSelector = CalendarTypeSelector;
|
|
2772
3052
|
exports.CalendarViewSelector = CalendarViewSelector;
|
|
2773
|
-
exports.CarIcon = CarIcon$
|
|
3053
|
+
exports.CarIcon = CarIcon$1;
|
|
2774
3054
|
exports.Card = Card;
|
|
2775
3055
|
exports.CardBody = CardBody;
|
|
2776
3056
|
exports.CardFooter = CardFooter;
|
|
@@ -2813,7 +3093,7 @@ exports.HUB_ADMIN_ITEM = HUB_ADMIN_ITEM;
|
|
|
2813
3093
|
exports.HUB_INDIVIDUAL_TRAVEL_ITEM = HUB_INDIVIDUAL_TRAVEL_ITEM;
|
|
2814
3094
|
exports.HUB_NAV_ITEMS = HUB_NAV_ITEMS;
|
|
2815
3095
|
exports.HomeIcon = HomeIcon;
|
|
2816
|
-
exports.HotelIcon = HotelIcon$
|
|
3096
|
+
exports.HotelIcon = HotelIcon$3;
|
|
2817
3097
|
exports.HotelSegment = HotelSegment;
|
|
2818
3098
|
exports.HubAppShell = HubAppShell;
|
|
2819
3099
|
exports.Icons = Icons;
|
|
@@ -2842,7 +3122,7 @@ exports.NavItem = NavItem;
|
|
|
2842
3122
|
exports.NotFoundPage = NotFoundPage;
|
|
2843
3123
|
exports.PageBanners = PageBanners;
|
|
2844
3124
|
exports.PhoneIcon = PhoneIcon;
|
|
2845
|
-
exports.PlaneIcon = PlaneIcon$
|
|
3125
|
+
exports.PlaneIcon = PlaneIcon$3;
|
|
2846
3126
|
exports.PlusIcon = PlusIcon$2;
|
|
2847
3127
|
exports.PreferencesPanel = PreferencesPanel;
|
|
2848
3128
|
exports.PrinterIcon = PrinterIcon;
|
|
@@ -2855,7 +3135,7 @@ exports.ReportIcon = ReportIcon;
|
|
|
2855
3135
|
exports.RequestFormFooter = RequestFormFooter;
|
|
2856
3136
|
exports.RequestFormHeader = RequestFormHeader;
|
|
2857
3137
|
exports.RequestFormLayout = RequestFormLayout;
|
|
2858
|
-
exports.RequestSummary = RequestSummary;
|
|
3138
|
+
exports.RequestSummary = RequestSummary$1;
|
|
2859
3139
|
exports.RosterToolbar = RosterToolbar;
|
|
2860
3140
|
exports.SUPPLIER_TYPE_OPTIONS = SUPPLIER_TYPE_OPTIONS;
|
|
2861
3141
|
exports.SchoolContactForm = SchoolContactForm;
|
|
@@ -2888,7 +3168,11 @@ exports.TeamScheduleEditor = TeamScheduleEditor;
|
|
|
2888
3168
|
exports.TeamScheduleExpandedTable = TeamScheduleExpandedTable;
|
|
2889
3169
|
exports.TeamSchedulePage = TeamSchedulePage;
|
|
2890
3170
|
exports.TeamSubMenu = TeamSubMenu;
|
|
3171
|
+
exports.TeamTravelCalendarCardView = TeamTravelCalendarCardView;
|
|
3172
|
+
exports.TeamTravelCalendarListView = TeamTravelCalendarListView;
|
|
2891
3173
|
exports.TeamTravelCalendarPage = TeamTravelCalendarPage;
|
|
3174
|
+
exports.TeamTravelCalendarToolbar = TeamTravelCalendarToolbar;
|
|
3175
|
+
exports.TeamTravelCalendarView = TeamTravelCalendarView;
|
|
2892
3176
|
exports.TeamUserAccessForm = TeamUserAccessForm;
|
|
2893
3177
|
exports.Textarea = Textarea;
|
|
2894
3178
|
exports.Timepicker = Timepicker;
|
|
@@ -2913,5 +3197,7 @@ exports.WarningIcon = WarningIcon$1;
|
|
|
2913
3197
|
exports.XIcon = XIcon;
|
|
2914
3198
|
exports.formatCompactTripCost = formatCompactTripCost;
|
|
2915
3199
|
exports.formatTeamScheduleTravelDates = formatTeamScheduleTravelDates;
|
|
3200
|
+
exports.getTeamTravelCalendarPeriodLabel = getTeamTravelCalendarPeriodLabel;
|
|
2916
3201
|
exports.isTravelDueDateCompleted = isTravelDueDateCompleted;
|
|
3202
|
+
exports.moveTeamTravelCalendarPeriod = moveTeamTravelCalendarPeriod;
|
|
2917
3203
|
//# sourceMappingURL=index.js.map
|