@shortstravelmgmt/component-lib 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -2
- package/dist/index.esm.js +253 -246
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +253 -245
- 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.esm.js
CHANGED
|
@@ -107,7 +107,7 @@ const Icons = {
|
|
|
107
107
|
Trash: TrashIcon$2,
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
var styles$
|
|
110
|
+
var styles$18 = {"alert":"Alert-module_alert__xxiES","content":"Alert-module_content__CVX32","icon":"Alert-module_icon__Xyh6J","body":"Alert-module_body__TTkmt","title":"Alert-module_title__7wNPO","message":"Alert-module_message__plreL","dismissButton":"Alert-module_dismissButton__MdRWh","primary":"Alert-module_primary__nME13","success":"Alert-module_success__GDt4S","warning":"Alert-module_warning__y4bLx","error":"Alert-module_error__nKMAG"};
|
|
111
111
|
|
|
112
112
|
const variantIcons = {
|
|
113
113
|
primary: LightbulbIcon,
|
|
@@ -117,10 +117,10 @@ const variantIcons = {
|
|
|
117
117
|
};
|
|
118
118
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
119
119
|
const IconComponent = variantIcons[variant];
|
|
120
|
-
return (jsx("div", { className: `${styles$
|
|
120
|
+
return (jsx("div", { className: `${styles$18.alert} ${styles$18[variant]} ${className}`, role: "alert", children: jsxs("div", { className: styles$18.content, children: [jsx(IconComponent, { className: styles$18.icon, size: 20 }), jsxs("div", { className: styles$18.body, children: [title && jsx("h4", { className: styles$18.title, children: title }), jsx("div", { className: styles$18.message, children: children })] }), dismissible && onDismiss && (jsx("button", { type: "button", onClick: onDismiss, className: styles$18.dismissButton, "aria-label": "Dismiss alert", children: jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
var styles$
|
|
123
|
+
var styles$17 = {"avatar":"Avatar-module_avatar__AcTRg","xs":"Avatar-module_xs__4uGxI","sm":"Avatar-module_sm__NvzTi","md":"Avatar-module_md__PgY8p","lg":"Avatar-module_lg__lhkAZ","xl":"Avatar-module_xl__qTDTF","image":"Avatar-module_image__GX2c9","initials":"Avatar-module_initials__58FHH","group":"Avatar-module_group__XW0b1","overflow":"Avatar-module_overflow__ul4Cc"};
|
|
124
124
|
|
|
125
125
|
const getInitials = (name) => {
|
|
126
126
|
const parts = name.trim().split(/\s+/);
|
|
@@ -135,43 +135,43 @@ const getInitials = (name) => {
|
|
|
135
135
|
const Avatar = ({ src, alt, initials, name, size = 'md', className = '', ...props }) => {
|
|
136
136
|
const displayInitials = initials || (name ? getInitials(name) : '?');
|
|
137
137
|
const classNames = [
|
|
138
|
-
styles$
|
|
139
|
-
styles$
|
|
138
|
+
styles$17.avatar,
|
|
139
|
+
styles$17[size],
|
|
140
140
|
className,
|
|
141
141
|
]
|
|
142
142
|
.filter(Boolean)
|
|
143
143
|
.join(' ');
|
|
144
|
-
return (jsx("div", { className: classNames, ...props, children: src ? (jsx("img", { src: src, alt: alt || name || 'Avatar', className: styles$
|
|
144
|
+
return (jsx("div", { className: classNames, ...props, children: src ? (jsx("img", { src: src, alt: alt || name || 'Avatar', className: styles$17.image })) : (jsx("span", { className: styles$17.initials, children: displayInitials })) }));
|
|
145
145
|
};
|
|
146
146
|
Avatar.displayName = 'Avatar';
|
|
147
147
|
const AvatarGroup = ({ max = 4, className = '', children, ...props }) => {
|
|
148
148
|
const childArray = React.Children.toArray(children);
|
|
149
149
|
const visibleChildren = childArray.slice(0, max);
|
|
150
150
|
const remainingCount = childArray.length - max;
|
|
151
|
-
const classNames = [styles$
|
|
152
|
-
return (jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsx("div", { className: `${styles$
|
|
151
|
+
const classNames = [styles$17.group, className].filter(Boolean).join(' ');
|
|
152
|
+
return (jsxs("div", { className: classNames, ...props, children: [visibleChildren, remainingCount > 0 && (jsx("div", { className: `${styles$17.avatar} ${styles$17.md} ${styles$17.overflow}`, children: jsxs("span", { className: styles$17.initials, children: ["+", remainingCount] }) }))] }));
|
|
153
153
|
};
|
|
154
154
|
AvatarGroup.displayName = 'AvatarGroup';
|
|
155
155
|
|
|
156
|
-
var styles$
|
|
156
|
+
var styles$16 = {"badge":"Badge-module_badge__lvuUg","sm":"Badge-module_sm__OTBAp","md":"Badge-module_md__YG44i","dot":"Badge-module_dot__RgcVD","default":"Badge-module_default__1ga4w","success":"Badge-module_success__jEfI9","warning":"Badge-module_warning__978mf","error":"Badge-module_error__xZJlm","info":"Badge-module_info__Xk7MM"};
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* Badge component for status indicators, labels, and tags.
|
|
160
160
|
*/
|
|
161
161
|
const Badge = ({ variant = 'default', size = 'md', dot = false, className = '', children, ...props }) => {
|
|
162
162
|
const classNames = [
|
|
163
|
-
styles$
|
|
164
|
-
styles$
|
|
165
|
-
styles$
|
|
163
|
+
styles$16.badge,
|
|
164
|
+
styles$16[variant],
|
|
165
|
+
styles$16[size],
|
|
166
166
|
className,
|
|
167
167
|
]
|
|
168
168
|
.filter(Boolean)
|
|
169
169
|
.join(' ');
|
|
170
|
-
return (jsxs("span", { className: classNames, ...props, children: [dot && jsx("span", { className: styles$
|
|
170
|
+
return (jsxs("span", { className: classNames, ...props, children: [dot && jsx("span", { className: styles$16.dot }), children] }));
|
|
171
171
|
};
|
|
172
172
|
Badge.displayName = 'Badge';
|
|
173
173
|
|
|
174
|
-
var styles$
|
|
174
|
+
var styles$15 = {"button":"Button-module_button__xDdzH","sm":"Button-module_sm__fb2AF","md":"Button-module_md__XOa6t","lg":"Button-module_lg__UN9rL","square":"Button-module_square__-o34b","primary":"Button-module_primary__jWHqR","secondary":"Button-module_secondary__30FUq","outline":"Button-module_outline__v98mS","ghost":"Button-module_ghost__XUGB1","danger":"Button-module_danger__NUxPy","fullWidth":"Button-module_fullWidth__p2otK","loading":"Button-module_loading__TsL5I","spinner":"Button-module_spinner__6bZoj","spin":"Button-module_spin__ZPDMG","icon":"Button-module_icon__21hUM","content":"Button-module_content__iVRPQ"};
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
177
|
* Primary button component for user interactions.
|
|
@@ -179,21 +179,21 @@ var styles$14 = {"button":"Button-module_button__xDdzH","sm":"Button-module_sm__
|
|
|
179
179
|
*/
|
|
180
180
|
const Button = forwardRef(({ variant = 'primary', size = 'md', fullWidth = false, loading = false, leftIcon, rightIcon, square = false, className = '', disabled, children, ...props }, ref) => {
|
|
181
181
|
const classNames = [
|
|
182
|
-
styles$
|
|
183
|
-
styles$
|
|
184
|
-
styles$
|
|
185
|
-
fullWidth ? styles$
|
|
186
|
-
square ? styles$
|
|
187
|
-
loading ? styles$
|
|
182
|
+
styles$15.button,
|
|
183
|
+
styles$15[variant],
|
|
184
|
+
styles$15[size],
|
|
185
|
+
fullWidth ? styles$15.fullWidth : '',
|
|
186
|
+
square ? styles$15.square : '',
|
|
187
|
+
loading ? styles$15.loading : '',
|
|
188
188
|
className,
|
|
189
189
|
]
|
|
190
190
|
.filter(Boolean)
|
|
191
191
|
.join(' ');
|
|
192
|
-
return (jsxs("button", { ref: ref, className: classNames, disabled: disabled || loading, ...props, children: [loading && (jsx("span", { className: styles$
|
|
192
|
+
return (jsxs("button", { ref: ref, className: classNames, disabled: disabled || loading, ...props, children: [loading && (jsx("span", { className: styles$15.spinner, children: jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.25" }), jsx("path", { d: "M12 2a10 10 0 0 1 10 10", strokeLinecap: "round" })] }) })), !loading && leftIcon && jsx("span", { className: styles$15.icon, children: leftIcon }), children && jsx("span", { className: styles$15.content, children: children }), !loading && rightIcon && jsx("span", { className: styles$15.icon, children: rightIcon })] }));
|
|
193
193
|
});
|
|
194
194
|
Button.displayName = 'Button';
|
|
195
195
|
|
|
196
|
-
var styles$
|
|
196
|
+
var styles$14 = {"wrapper":"Checkbox-module_wrapper__tYM-f","label":"Checkbox-module_label__x7c9f","disabled":"Checkbox-module_disabled__YtL8b","checkboxWrapper":"Checkbox-module_checkboxWrapper__ez0mi","input":"Checkbox-module_input__xBHoX","checkbox":"Checkbox-module_checkbox__zGuTf","sm":"Checkbox-module_sm__naurE","md":"Checkbox-module_md__LlE6O","lg":"Checkbox-module_lg__dMWT-","hasError":"Checkbox-module_hasError__aCefd","labelText":"Checkbox-module_labelText__7arlw","helperText":"Checkbox-module_helperText__jR4oi","errorText":"Checkbox-module_errorText__u8puP"};
|
|
197
197
|
|
|
198
198
|
const CheckIcon$1 = () => (jsx("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M1 4L3.5 6.5L9 1", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
199
199
|
const IndeterminateIcon = () => (jsx("svg", { width: "10", height: "2", viewBox: "0 0 10 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M1 1H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
@@ -206,10 +206,10 @@ const Checkbox = forwardRef(({ label, size = 'md', helperText, error, indetermin
|
|
|
206
206
|
const helperId = `${checkboxId}-helper`;
|
|
207
207
|
const errorId = `${checkboxId}-error`;
|
|
208
208
|
const wrapperClasses = [
|
|
209
|
-
styles$
|
|
210
|
-
styles$
|
|
211
|
-
disabled ? styles$
|
|
212
|
-
error ? styles$
|
|
209
|
+
styles$14.wrapper,
|
|
210
|
+
styles$14[size],
|
|
211
|
+
disabled ? styles$14.disabled : '',
|
|
212
|
+
error ? styles$14.hasError : '',
|
|
213
213
|
className,
|
|
214
214
|
].filter(Boolean).join(' ');
|
|
215
215
|
// Handle indeterminate state via ref
|
|
@@ -225,13 +225,13 @@ const Checkbox = forwardRef(({ label, size = 'md', helperText, error, indetermin
|
|
|
225
225
|
ref.current = node;
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
return (jsxs("div", { className: wrapperClasses, children: [jsxs("label", { className: styles$
|
|
228
|
+
return (jsxs("div", { className: wrapperClasses, children: [jsxs("label", { className: styles$14.label, children: [jsxs("div", { className: styles$14.checkboxWrapper, children: [jsx("input", { ref: inputRef, type: "checkbox", id: checkboxId, className: styles$14.input, disabled: disabled, checked: checked, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
229
229
|
.filter(Boolean)
|
|
230
|
-
.join(' ') || undefined, ...props }), jsx("span", { className: styles$
|
|
230
|
+
.join(' ') || undefined, ...props }), jsx("span", { className: styles$14.checkbox, children: indeterminate ? jsx(IndeterminateIcon, {}) : jsx(CheckIcon$1, {}) })] }), label && jsx("span", { className: styles$14.labelText, children: label })] }), error && (jsx("span", { id: errorId, className: styles$14.errorText, children: error })), helperText && !error && (jsx("span", { id: helperId, className: styles$14.helperText, children: helperText }))] }));
|
|
231
231
|
});
|
|
232
232
|
Checkbox.displayName = 'Checkbox';
|
|
233
233
|
|
|
234
|
-
var styles$
|
|
234
|
+
var styles$13 = {"wrapper":"Datepicker-module_wrapper__SdezU","fullWidth":"Datepicker-module_fullWidth__CAeMt","label":"Datepicker-module_label__qUNBV","inputWrapper":"Datepicker-module_inputWrapper__FK2IJ","sm":"Datepicker-module_sm__DuDMB","md":"Datepicker-module_md__oyus3","lg":"Datepicker-module_lg__2sqBg","icon":"Datepicker-module_icon__WdaRf","input":"Datepicker-module_input__4TCcy","disabled":"Datepicker-module_disabled__W0e-a","error":"Datepicker-module_error__XPpIy","helperText":"Datepicker-module_helperText__UllZP","errorText":"Datepicker-module_errorText__lveyr"};
|
|
235
235
|
|
|
236
236
|
const CalendarIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" })] }));
|
|
237
237
|
/**
|
|
@@ -243,23 +243,23 @@ const Datepicker = forwardRef(({ size = 'md', label, helperText, error, fullWidt
|
|
|
243
243
|
const helperId = `${inputId}-helper`;
|
|
244
244
|
const errorId = `${inputId}-error`;
|
|
245
245
|
const wrapperClasses = [
|
|
246
|
-
styles$
|
|
247
|
-
fullWidth ? styles$
|
|
246
|
+
styles$13.wrapper,
|
|
247
|
+
fullWidth ? styles$13.fullWidth : '',
|
|
248
248
|
className,
|
|
249
249
|
].filter(Boolean).join(' ');
|
|
250
250
|
const inputWrapperClasses = [
|
|
251
|
-
styles$
|
|
252
|
-
styles$
|
|
253
|
-
error ? styles$
|
|
254
|
-
disabled ? styles$
|
|
251
|
+
styles$13.inputWrapper,
|
|
252
|
+
styles$13[size],
|
|
253
|
+
error ? styles$13.error : '',
|
|
254
|
+
disabled ? styles$13.disabled : '',
|
|
255
255
|
].filter(Boolean).join(' ');
|
|
256
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: styles$
|
|
256
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: styles$13.label, children: label })), jsxs("div", { className: inputWrapperClasses, children: [jsx("span", { className: styles$13.icon, children: jsx(CalendarIcon, {}) }), jsx("input", { ref: ref, type: "date", id: inputId, className: styles$13.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
257
257
|
.filter(Boolean)
|
|
258
|
-
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: styles$
|
|
258
|
+
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: styles$13.errorText, children: error })), helperText && !error && (jsx("span", { id: helperId, className: styles$13.helperText, children: helperText }))] }));
|
|
259
259
|
});
|
|
260
260
|
Datepicker.displayName = 'Datepicker';
|
|
261
261
|
|
|
262
|
-
var styles$
|
|
262
|
+
var styles$12 = {"wrapper":"Input-module_wrapper__-8ija","fullWidth":"Input-module_fullWidth__xXOvN","label":"Input-module_label__t4LH-","inputWrapper":"Input-module_inputWrapper__U4EEd","error":"Input-module_error__fT9Sb","disabled":"Input-module_disabled__3tnIE","sm":"Input-module_sm__lGHP-","md":"Input-module_md__pReoW","lg":"Input-module_lg__iqqov","input":"Input-module_input__PeHY6","icon":"Input-module_icon__jkJiF","textarea":"Input-module_textarea__ZgdBz","helperText":"Input-module_helperText__eKsC8","errorText":"Input-module_errorText__xoiKP"};
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
265
|
* Input component for text entry.
|
|
@@ -267,45 +267,45 @@ var styles$11 = {"wrapper":"Input-module_wrapper__-8ija","fullWidth":"Input-modu
|
|
|
267
267
|
const Input = forwardRef(({ size = 'md', label, helperText, error, leftIcon, rightIcon, fullWidth = false, className = '', id, disabled, ...props }, ref) => {
|
|
268
268
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
269
269
|
const wrapperClasses = [
|
|
270
|
-
styles$
|
|
271
|
-
fullWidth ? styles$
|
|
270
|
+
styles$12.wrapper,
|
|
271
|
+
fullWidth ? styles$12.fullWidth : '',
|
|
272
272
|
className,
|
|
273
273
|
]
|
|
274
274
|
.filter(Boolean)
|
|
275
275
|
.join(' ');
|
|
276
276
|
const inputWrapperClasses = [
|
|
277
|
-
styles$
|
|
278
|
-
styles$
|
|
279
|
-
error ? styles$
|
|
280
|
-
disabled ? styles$
|
|
277
|
+
styles$12.inputWrapper,
|
|
278
|
+
styles$12[size],
|
|
279
|
+
error ? styles$12.error : '',
|
|
280
|
+
disabled ? styles$12.disabled : '',
|
|
281
281
|
]
|
|
282
282
|
.filter(Boolean)
|
|
283
283
|
.join(' ');
|
|
284
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: styles$
|
|
284
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: styles$12.label, children: label })), jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsx("span", { className: styles$12.icon, children: leftIcon }), jsx("input", { ref: ref, id: inputId, className: styles$12.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsx("span", { className: styles$12.icon, children: rightIcon })] }), error && (jsx("span", { id: `${inputId}-error`, className: styles$12.errorText, children: error })), helperText && !error && (jsx("span", { id: `${inputId}-helper`, className: styles$12.helperText, children: helperText }))] }));
|
|
285
285
|
});
|
|
286
286
|
Input.displayName = 'Input';
|
|
287
287
|
const Textarea = forwardRef(({ size = 'md', label, helperText, error, fullWidth = false, className = '', id, disabled, rows = 4, ...props }, ref) => {
|
|
288
288
|
const textareaId = id || `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
289
289
|
const wrapperClasses = [
|
|
290
|
-
styles$
|
|
291
|
-
fullWidth ? styles$
|
|
290
|
+
styles$12.wrapper,
|
|
291
|
+
fullWidth ? styles$12.fullWidth : '',
|
|
292
292
|
className,
|
|
293
293
|
]
|
|
294
294
|
.filter(Boolean)
|
|
295
295
|
.join(' ');
|
|
296
296
|
const textareaClasses = [
|
|
297
|
-
styles$
|
|
298
|
-
styles$
|
|
299
|
-
error ? styles$
|
|
300
|
-
disabled ? styles$
|
|
297
|
+
styles$12.textarea,
|
|
298
|
+
styles$12[size],
|
|
299
|
+
error ? styles$12.error : '',
|
|
300
|
+
disabled ? styles$12.disabled : '',
|
|
301
301
|
]
|
|
302
302
|
.filter(Boolean)
|
|
303
303
|
.join(' ');
|
|
304
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: textareaId, className: styles$
|
|
304
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: textareaId, className: styles$12.label, children: label })), 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 && (jsx("span", { id: `${textareaId}-error`, className: styles$12.errorText, children: error })), helperText && !error && (jsx("span", { id: `${textareaId}-helper`, className: styles$12.helperText, children: helperText }))] }));
|
|
305
305
|
});
|
|
306
306
|
Textarea.displayName = 'Textarea';
|
|
307
307
|
|
|
308
|
-
var styles$
|
|
308
|
+
var styles$11 = {"metric":"Metric-module_metric__LZ8D-","dark":"Metric-module_dark__FKdvj","clickable":"Metric-module_clickable__c3-pM","content":"Metric-module_content__YYpBG","valueRow":"Metric-module_valueRow__JpgYR","valueContainer":"Metric-module_valueContainer__CzjZ1","prefix":"Metric-module_prefix__Agpzq","value":"Metric-module_value__zspnf","suffix":"Metric-module_suffix__qvCMJ","warningIcon":"Metric-module_warningIcon__F-Ol5","label":"Metric-module_label__ydcti"};
|
|
309
309
|
|
|
310
310
|
const WarningIcon = () => (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: jsx("path", { d: "M12 2L1 21h22L12 2zm0 3.5L19.5 19H4.5L12 5.5zM11 10v4h2v-4h-2zm0 6v2h2v-2h-2z" }) }));
|
|
311
311
|
/**
|
|
@@ -315,15 +315,15 @@ const WarningIcon = () => (jsx("svg", { width: "24", height: "24", viewBox: "0 0
|
|
|
315
315
|
const Metric = ({ value, label, prefix, suffix, dark = false, onClick, className = '', warning = false, }) => {
|
|
316
316
|
const displayValue = value !== undefined && !isNaN(parseFloat(String(value))) ? value : 0;
|
|
317
317
|
return (jsx("div", { className: `
|
|
318
|
-
${styles$
|
|
319
|
-
${dark ? styles$
|
|
320
|
-
${onClick ? styles$
|
|
318
|
+
${styles$11.metric}
|
|
319
|
+
${dark ? styles$11.dark : ''}
|
|
320
|
+
${onClick ? styles$11.clickable : ''}
|
|
321
321
|
${className}
|
|
322
|
-
`, onClick: onClick, children: value !== undefined && (jsxs("div", { className: styles$
|
|
322
|
+
`, onClick: onClick, children: value !== undefined && (jsxs("div", { className: styles$11.content, children: [jsxs("div", { className: styles$11.valueRow, children: [jsxs("div", { className: styles$11.valueContainer, children: [prefix && jsx("span", { className: styles$11.prefix, children: prefix }), jsx("span", { className: styles$11.value, children: displayValue }), suffix && jsx("span", { className: styles$11.suffix, children: suffix })] }), warning && (jsx("div", { className: styles$11.warningIcon, children: jsx(WarningIcon, {}) }))] }), jsx("div", { className: styles$11.label, children: label })] })) }));
|
|
323
323
|
};
|
|
324
324
|
Metric.displayName = 'Metric';
|
|
325
325
|
|
|
326
|
-
var styles
|
|
326
|
+
var styles$10 = {"wrapper":"Select-module_wrapper__UN2Bo","fullWidth":"Select-module_fullWidth__GgV-D","label":"Select-module_label__aSRVE","selectWrapper":"Select-module_selectWrapper__OCGYf","sm":"Select-module_sm__oTHGX","md":"Select-module_md__VSZQg","lg":"Select-module_lg__nknhY","select":"Select-module_select__DY-Id","hasLeftIcon":"Select-module_hasLeftIcon__ZrReQ","leftIcon":"Select-module_leftIcon__nBU1-","chevron":"Select-module_chevron__1MAEQ","disabled":"Select-module_disabled__0GOXE","error":"Select-module_error__Yijk5","helperText":"Select-module_helperText__rHrqP","errorText":"Select-module_errorText__1kM2R"};
|
|
327
327
|
|
|
328
328
|
const ChevronDownIcon = () => (jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
329
329
|
/**
|
|
@@ -335,16 +335,16 @@ const Select = forwardRef(({ options, optionGroups, size = 'md', label, placehol
|
|
|
335
335
|
const helperId = `${selectId}-helper`;
|
|
336
336
|
const errorId = `${selectId}-error`;
|
|
337
337
|
const wrapperClasses = [
|
|
338
|
-
styles
|
|
339
|
-
fullWidth ? styles
|
|
338
|
+
styles$10.wrapper,
|
|
339
|
+
fullWidth ? styles$10.fullWidth : '',
|
|
340
340
|
className,
|
|
341
341
|
].filter(Boolean).join(' ');
|
|
342
342
|
const selectWrapperClasses = [
|
|
343
|
-
styles
|
|
344
|
-
styles
|
|
345
|
-
error ? styles
|
|
346
|
-
disabled ? styles
|
|
347
|
-
leftIcon ? styles
|
|
343
|
+
styles$10.selectWrapper,
|
|
344
|
+
styles$10[size],
|
|
345
|
+
error ? styles$10.error : '',
|
|
346
|
+
disabled ? styles$10.disabled : '',
|
|
347
|
+
leftIcon ? styles$10.hasLeftIcon : '',
|
|
348
348
|
].filter(Boolean).join(' ');
|
|
349
349
|
const renderOptions = () => {
|
|
350
350
|
// Render grouped options
|
|
@@ -357,19 +357,19 @@ const Select = forwardRef(({ options, optionGroups, size = 'md', label, placehol
|
|
|
357
357
|
}
|
|
358
358
|
return null;
|
|
359
359
|
};
|
|
360
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: selectId, className: styles
|
|
360
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: selectId, className: styles$10.label, children: label })), jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsx("span", { className: styles$10.leftIcon, children: leftIcon }), jsxs("select", { ref: ref, id: selectId, className: styles$10.select, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
361
361
|
.filter(Boolean)
|
|
362
|
-
.join(' ') || undefined, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsx("span", { className: styles
|
|
362
|
+
.join(' ') || undefined, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsx("span", { className: styles$10.chevron, children: jsx(ChevronDownIcon, {}) })] }), error && (jsx("span", { id: errorId, className: styles$10.errorText, children: error })), helperText && !error && (jsx("span", { id: helperId, className: styles$10.helperText, children: helperText }))] }));
|
|
363
363
|
});
|
|
364
364
|
Select.displayName = 'Select';
|
|
365
365
|
|
|
366
|
-
var styles
|
|
366
|
+
var styles$$ = {"spinner":"Spinner-module_spinner__OZwmB","svg":"Spinner-module_svg__Tusqk","spin":"Spinner-module_spin__YAPc9","track":"Spinner-module_track__NxLfV","indicator":"Spinner-module_indicator__gSUxF","xs":"Spinner-module_xs__4-WEg","sm":"Spinner-module_sm__enoDn","md":"Spinner-module_md__6axf9","lg":"Spinner-module_lg__EvJyC","xl":"Spinner-module_xl__yIXoK","srOnly":"Spinner-module_srOnly__WnZYf"};
|
|
367
367
|
|
|
368
368
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
369
|
-
return (jsxs("span", { className: `${styles
|
|
369
|
+
return (jsxs("span", { className: `${styles$$.spinner} ${styles$$[size]} ${className}`, role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxs("svg", { className: styles$$.svg, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: styles$$.track, cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: styles$$.indicator, fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsx("span", { className: styles$$.srOnly, children: label })] }));
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
-
var styles$
|
|
372
|
+
var styles$_ = {"badge":"StatusBadge-module_badge__-BwEk","ticketed":"StatusBadge-module_ticketed__AJVZM","itinerary":"StatusBadge-module_itinerary__yRFNy","not-ticketed":"StatusBadge-module_not-ticketed__76GXg","submitted":"StatusBadge-module_submitted__QW0LL","pending":"StatusBadge-module_pending__FpMYC","cancelled":"StatusBadge-module_cancelled__XRz4S"};
|
|
373
373
|
|
|
374
374
|
const statusLabels = {
|
|
375
375
|
ticketed: 'Ticketed',
|
|
@@ -381,20 +381,20 @@ const statusLabels = {
|
|
|
381
381
|
};
|
|
382
382
|
const StatusBadge = ({ status, label, className, }) => {
|
|
383
383
|
const displayLabel = label || statusLabels[status] || status;
|
|
384
|
-
return (jsx("span", { className: `${styles$
|
|
384
|
+
return (jsx("span", { className: `${styles$_.badge} ${styles$_[status]} ${className || ''}`, "data-status": status, children: displayLabel }));
|
|
385
385
|
};
|
|
386
386
|
|
|
387
|
-
var styles$
|
|
387
|
+
var styles$Z = {"tag":"Tag-module_tag__uQVQa","content":"Tag-module_content__Z5bK9","sm":"Tag-module_sm__DvKJV","md":"Tag-module_md__KTo2m","lg":"Tag-module_lg__8xhWB","default":"Tag-module_default__5-uQz","primary":"Tag-module_primary__lwwYl","success":"Tag-module_success__kl3II","warning":"Tag-module_warning__peZRm","error":"Tag-module_error__6xzkl","info":"Tag-module_info__eKYiV","clickable":"Tag-module_clickable__TyiNK","removeButton":"Tag-module_removeButton__peMwo","removeIcon":"Tag-module_removeIcon__dQyJZ"};
|
|
388
388
|
|
|
389
389
|
const Tag = ({ children, variant = 'default', size = 'md', removable = false, onRemove, onClick, className = '', style, }) => {
|
|
390
390
|
const isClickable = Boolean(onClick);
|
|
391
|
-
return (jsxs("span", { className: `${styles$
|
|
391
|
+
return (jsxs("span", { className: `${styles$Z.tag} ${styles$Z[variant]} ${styles$Z[size]} ${isClickable ? styles$Z.clickable : ''} ${className}`, onClick: onClick, style: style, role: isClickable ? 'button' : undefined, tabIndex: isClickable ? 0 : undefined, children: [jsx("span", { className: styles$Z.content, children: children }), removable && (jsx("button", { type: "button", className: styles$Z.removeButton, onClick: (e) => {
|
|
392
392
|
e.stopPropagation();
|
|
393
393
|
onRemove?.();
|
|
394
|
-
}, "aria-label": "Remove", children: jsx("svg", { className: styles$
|
|
394
|
+
}, "aria-label": "Remove", children: jsx("svg", { className: styles$Z.removeIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] }));
|
|
395
395
|
};
|
|
396
396
|
|
|
397
|
-
var styles$
|
|
397
|
+
var styles$Y = {"wrapper":"Timepicker-module_wrapper__pPrwn","fullWidth":"Timepicker-module_fullWidth__de3hO","label":"Timepicker-module_label__5RDrm","inputWrapper":"Timepicker-module_inputWrapper__-E5pk","sm":"Timepicker-module_sm__sWJu2","md":"Timepicker-module_md__TfpGX","lg":"Timepicker-module_lg__xSlw-","icon":"Timepicker-module_icon__NuPk4","input":"Timepicker-module_input__NxTmR","disabled":"Timepicker-module_disabled__lyxzF","error":"Timepicker-module_error__TOMK7","helperText":"Timepicker-module_helperText__MmcqS","errorText":"Timepicker-module_errorText__pXdnE"};
|
|
398
398
|
|
|
399
399
|
const ClockIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "12", cy: "12", r: "10" }), jsx("polyline", { points: "12 6 12 12 16 14" })] }));
|
|
400
400
|
/**
|
|
@@ -406,34 +406,34 @@ const Timepicker = forwardRef(({ size = 'md', label, helperText, error, fullWidt
|
|
|
406
406
|
const helperId = `${inputId}-helper`;
|
|
407
407
|
const errorId = `${inputId}-error`;
|
|
408
408
|
const wrapperClasses = [
|
|
409
|
-
styles$
|
|
410
|
-
fullWidth ? styles$
|
|
409
|
+
styles$Y.wrapper,
|
|
410
|
+
fullWidth ? styles$Y.fullWidth : '',
|
|
411
411
|
className,
|
|
412
412
|
].filter(Boolean).join(' ');
|
|
413
413
|
const inputWrapperClasses = [
|
|
414
|
-
styles$
|
|
415
|
-
styles$
|
|
416
|
-
error ? styles$
|
|
417
|
-
disabled ? styles$
|
|
414
|
+
styles$Y.inputWrapper,
|
|
415
|
+
styles$Y[size],
|
|
416
|
+
error ? styles$Y.error : '',
|
|
417
|
+
disabled ? styles$Y.disabled : '',
|
|
418
418
|
].filter(Boolean).join(' ');
|
|
419
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: styles$
|
|
419
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: styles$Y.label, children: label })), jsxs("div", { className: inputWrapperClasses, children: [jsx("span", { className: styles$Y.icon, children: jsx(ClockIcon, {}) }), jsx("input", { ref: ref, type: "time", id: inputId, className: styles$Y.input, disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
420
420
|
.filter(Boolean)
|
|
421
|
-
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: styles$
|
|
421
|
+
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: styles$Y.errorText, children: error })), helperText && !error && (jsx("span", { id: helperId, className: styles$Y.helperText, children: helperText }))] }));
|
|
422
422
|
});
|
|
423
423
|
Timepicker.displayName = 'Timepicker';
|
|
424
424
|
|
|
425
|
-
var styles$
|
|
425
|
+
var styles$X = {"title":"Title-module_title__mSSqn","light":"Title-module_light__7mlh-","normal":"Title-module_normal__ZYrS4","medium":"Title-module_medium__UK-Bj","semibold":"Title-module_semibold__07lTs","bold":"Title-module_bold__-oWUS"};
|
|
426
426
|
|
|
427
427
|
/**
|
|
428
428
|
* Title component for page headings.
|
|
429
429
|
* Large, prominent text for page titles.
|
|
430
430
|
*/
|
|
431
431
|
const Title = ({ children, weight = 'light', className = '', }) => {
|
|
432
|
-
return (jsx("h1", { className: `${styles$
|
|
432
|
+
return (jsx("h1", { className: `${styles$X.title} ${styles$X[weight]} ${className}`, children: children }));
|
|
433
433
|
};
|
|
434
434
|
Title.displayName = 'Title';
|
|
435
435
|
|
|
436
|
-
var styles$
|
|
436
|
+
var styles$W = {"toggle":"Toggle-module_toggle__lRFvk","checked":"Toggle-module_checked__duOWU","disabled":"Toggle-module_disabled__DV2FB","thumb":"Toggle-module_thumb__ehIbb","sm":"Toggle-module_sm__Gs9bK","md":"Toggle-module_md__hTNCY","lg":"Toggle-module_lg__DpHtS","wrapper":"Toggle-module_wrapper__-Bvff","wrapperDisabled":"Toggle-module_wrapperDisabled__ZSCvM","label":"Toggle-module_label__GeuIf"};
|
|
437
437
|
|
|
438
438
|
const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, labelPosition = 'right', className = '', 'aria-label': ariaLabel, }) => {
|
|
439
439
|
const handleClick = () => {
|
|
@@ -447,14 +447,14 @@ const Toggle = ({ checked, onChange, disabled = false, size = 'md', label, label
|
|
|
447
447
|
onChange?.(!checked);
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
|
-
const toggleElement = (jsx("div", { className: `${styles$
|
|
450
|
+
const toggleElement = (jsx("div", { className: `${styles$W.toggle} ${styles$W[size]} ${checked ? styles$W.checked : ''} ${disabled ? styles$W.disabled : ''} ${className}`, onClick: handleClick, onKeyDown: handleKeyDown, role: "switch", "aria-checked": checked, "aria-disabled": disabled, "aria-label": ariaLabel || label, tabIndex: disabled ? -1 : 0, children: jsx("span", { className: styles$W.thumb }) }));
|
|
451
451
|
if (label) {
|
|
452
|
-
return (jsxs("label", { className: `${styles$
|
|
452
|
+
return (jsxs("label", { className: `${styles$W.wrapper} ${disabled ? styles$W.wrapperDisabled : ''}`, children: [labelPosition === 'left' && jsx("span", { className: styles$W.label, children: label }), toggleElement, labelPosition === 'right' && jsx("span", { className: styles$W.label, children: label })] }));
|
|
453
453
|
}
|
|
454
454
|
return toggleElement;
|
|
455
455
|
};
|
|
456
456
|
|
|
457
|
-
var styles$
|
|
457
|
+
var styles$V = {"wrapper":"Tooltip-module_wrapper__9SUwl","tooltip":"Tooltip-module_tooltip__KQ7km","fadeIn":"Tooltip-module_fadeIn__dL8S5","content":"Tooltip-module_content__kO8yx","dark":"Tooltip-module_dark__Y66ss","light":"Tooltip-module_light__mItfR","top":"Tooltip-module_top__1jrIn","bottom":"Tooltip-module_bottom__99YBc","left":"Tooltip-module_left__ZNd1H","right":"Tooltip-module_right__r0j5Q","arrow":"Tooltip-module_arrow__qcKWx","arrowTop":"Tooltip-module_arrowTop__k13dt","arrowBottom":"Tooltip-module_arrowBottom__FP-w2","arrowLeft":"Tooltip-module_arrowLeft__7T1uO","arrowRight":"Tooltip-module_arrowRight__FbPdB"};
|
|
458
458
|
|
|
459
459
|
const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay = 200, disabled = false, className = '', }) => {
|
|
460
460
|
const [isVisible, setIsVisible] = useState(false);
|
|
@@ -518,10 +518,10 @@ const Tooltip = ({ content, children, position = 'top', variant = 'dark', delay
|
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
520
|
}, []);
|
|
521
|
-
return (jsxs("div", { ref: triggerRef, className: `${styles$
|
|
521
|
+
return (jsxs("div", { ref: triggerRef, className: `${styles$V.wrapper} ${className}`, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, children: [children, isVisible && content && (jsxs("div", { ref: tooltipRef, className: `${styles$V.tooltip} ${styles$V[actualPosition]} ${styles$V[variant]}`, role: "tooltip", children: [jsx("div", { className: styles$V.content, children: content }), jsx("div", { className: `${styles$V.arrow} ${styles$V[`arrow${actualPosition.charAt(0).toUpperCase()}${actualPosition.slice(1)}`]}` })] }))] }));
|
|
522
522
|
};
|
|
523
523
|
|
|
524
|
-
var styles$
|
|
524
|
+
var styles$U = {"service":"TravelServiceIcon-module_service__-4EZb","code":"TravelServiceIcon-module_code__vElzI","multi":"TravelServiceIcon-module_multi__nqZLM","multiIndicator":"TravelServiceIcon-module_multiIndicator__KJF1L"};
|
|
525
525
|
|
|
526
526
|
// Airline brand colors
|
|
527
527
|
const vendorColors = {
|
|
@@ -561,16 +561,16 @@ const TravelServiceIcon = ({ type, vendor, mode = 'icon', size = 28, multi = fal
|
|
|
561
561
|
const colors = mode === 'icon' && vendorColors[vendorKey]
|
|
562
562
|
? vendorColors[vendorKey]
|
|
563
563
|
: typeColors$1[type] || typeColors$1.U;
|
|
564
|
-
return (jsxs("span", { className: `${styles$
|
|
564
|
+
return (jsxs("span", { className: `${styles$U.service} ${multi ? styles$U.multi : ''} ${className || ''}`, style: {
|
|
565
565
|
width: size,
|
|
566
566
|
height: size,
|
|
567
567
|
backgroundColor: colors.bg,
|
|
568
568
|
color: colors.fg,
|
|
569
569
|
fontSize: size * 0.4,
|
|
570
|
-
}, title: vendor ? `${vendor} (${type})` : type, children: [mode === 'code' && vendor ? (jsx("span", { className: styles$
|
|
570
|
+
}, title: vendor ? `${vendor} (${type})` : type, children: [mode === 'code' && vendor ? (jsx("span", { className: styles$U.code, children: vendor })) : (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 && jsx("span", { className: styles$U.multiIndicator, children: "+" })] }));
|
|
571
571
|
};
|
|
572
572
|
|
|
573
|
-
var styles$
|
|
573
|
+
var styles$T = {"icon":"TypeIcon-module_icon__WUL-x"};
|
|
574
574
|
|
|
575
575
|
const typeLabels = {
|
|
576
576
|
A: 'Air',
|
|
@@ -603,7 +603,7 @@ const typeIcons = {
|
|
|
603
603
|
const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
604
604
|
const colors = typeColors[type] || typeColors.U;
|
|
605
605
|
const label = typeLabels[type] || 'Unknown';
|
|
606
|
-
return (jsx("span", { className: `${styles$
|
|
606
|
+
return (jsx("span", { className: `${styles$T.icon} ${className || ''}`, style: {
|
|
607
607
|
width: size,
|
|
608
608
|
height: size,
|
|
609
609
|
backgroundColor: colors.bg,
|
|
@@ -611,7 +611,7 @@ const TypeIcon = ({ type, size = 18, showTooltip = true, className, }) => {
|
|
|
611
611
|
}, title: showTooltip ? label : undefined, "aria-label": label, children: jsx("svg", { viewBox: "0 0 24 24", width: size * 0.6, height: size * 0.6, fill: "currentColor", children: typeIcons[type] || typeIcons.U }) }));
|
|
612
612
|
};
|
|
613
613
|
|
|
614
|
-
var styles$
|
|
614
|
+
var styles$S = {"accordion":"Accordion-module_accordion__I3hmS","headerContainer":"Accordion-module_headerContainer__QhfHx","toggle":"Accordion-module_toggle__rlK5n","caret":"Accordion-module_caret__iZAh1","open":"Accordion-module_open__5jX-w","header":"Accordion-module_header__gzKrn","body":"Accordion-module_body__xTgL6","hidden":"Accordion-module_hidden__wcCWd","visible":"Accordion-module_visible__116om","timeline":"Accordion-module_timeline__ikrdK","line":"Accordion-module_line__buDP1","endCaret":"Accordion-module_endCaret__OXpPJ","content":"Accordion-module_content__aL8Vn"};
|
|
615
615
|
|
|
616
616
|
const CaretIcon = ({ className }) => (jsx("svg", { className: className, width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsx("polyline", { points: "9 18 15 12 9 6" }) }));
|
|
617
617
|
/**
|
|
@@ -629,21 +629,21 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
629
629
|
}
|
|
630
630
|
onOpenChange?.(newOpen);
|
|
631
631
|
};
|
|
632
|
-
return (jsxs("div", { className: `${styles$
|
|
632
|
+
return (jsxs("div", { className: `${styles$S.accordion} ${className || ''}`, children: [jsxs("div", { className: styles$S.headerContainer, children: [jsx("button", { type: "button", className: styles$S.toggle, onClick: handleToggle, "aria-expanded": isOpen, children: jsx(CaretIcon, { className: `${styles$S.caret} ${isOpen ? styles$S.open : ''}` }) }), jsx("div", { className: styles$S.header, children: header })] }), jsxs("div", { className: `${styles$S.body} ${isOpen ? styles$S.visible : styles$S.hidden}`, "aria-hidden": !isOpen, children: [showTimeline && (jsxs("div", { className: styles$S.timeline, children: [jsx("div", { className: styles$S.line }), jsx(CaretIcon, { className: styles$S.endCaret })] })), jsx("div", { className: styles$S.content, children: children })] })] }));
|
|
633
633
|
};
|
|
634
634
|
Accordion.displayName = 'Accordion';
|
|
635
635
|
|
|
636
|
-
var styles$
|
|
636
|
+
var styles$R = {"selector":"CalendarSelectors-module_selector__1nDos","item":"CalendarSelectors-module_item__CoR5s","active":"CalendarSelectors-module_active__u4w6Z","sm":"CalendarSelectors-module_sm__ju5t-","withLabel":"CalendarSelectors-module_withLabel__Jr9Re","md":"CalendarSelectors-module_md__a-U38","lg":"CalendarSelectors-module_lg__WHvAF","iconOnly":"CalendarSelectors-module_iconOnly__cAjyD"};
|
|
637
637
|
|
|
638
638
|
const ListIcon = () => (jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: [jsx("line", { x1: "8", y1: "6", x2: "21", y2: "6" }), jsx("line", { x1: "8", y1: "12", x2: "21", y2: "12" }), jsx("line", { x1: "8", y1: "18", x2: "21", y2: "18" }), jsx("circle", { cx: "3", cy: "6", r: "1", fill: "currentColor", stroke: "none" }), jsx("circle", { cx: "3", cy: "12", r: "1", fill: "currentColor", stroke: "none" }), jsx("circle", { cx: "3", cy: "18", r: "1", fill: "currentColor", stroke: "none" })] }));
|
|
639
|
-
const SegmentedSelector = ({ options, value, onChange, disabled = false, size = 'md', className = '', ariaLabel = 'View options', }) => (jsx("div", { className: [styles$
|
|
639
|
+
const SegmentedSelector = ({ options, value, onChange, disabled = false, size = 'md', className = '', ariaLabel = 'View options', }) => (jsx("div", { className: [styles$R.selector, className].filter(Boolean).join(' '), role: "group", "aria-label": ariaLabel, children: options.map((option) => {
|
|
640
640
|
const active = option.id === value;
|
|
641
641
|
const accessibleName = option.alt ?? option.label ?? option.id;
|
|
642
642
|
return (jsxs("button", { type: "button", title: accessibleName, "aria-label": accessibleName, "aria-pressed": active, disabled: disabled, className: [
|
|
643
|
-
styles$
|
|
644
|
-
styles$
|
|
645
|
-
option.label ? styles$
|
|
646
|
-
active ? styles$
|
|
643
|
+
styles$R.item,
|
|
644
|
+
styles$R[size],
|
|
645
|
+
option.label ? styles$R.withLabel : styles$R.iconOnly,
|
|
646
|
+
active ? styles$R.active : '',
|
|
647
647
|
].filter(Boolean).join(' '), onClick: () => onChange?.(option.id), children: [option.icon, option.label && jsx("span", { children: option.label })] }, option.id));
|
|
648
648
|
}) }));
|
|
649
649
|
const CalendarViewSelector = ({ value, onChange, ...props }) => (jsx(SegmentedSelector, { ...props, ariaLabel: "Calendar view", value: value, onChange: (nextValue) => onChange?.(nextValue), options: [
|
|
@@ -656,7 +656,7 @@ const CalendarTypeSelector = ({ value, onChange, ...props }) => (jsx(SegmentedSe
|
|
|
656
656
|
{ id: 'due_dates', label: 'Due Dates' },
|
|
657
657
|
] }));
|
|
658
658
|
|
|
659
|
-
var styles$
|
|
659
|
+
var styles$Q = {"dropdown":"Dropdown-module_dropdown__K4-yz","arrow":"Dropdown-module_arrow__2Xuwf","arrowOpen":"Dropdown-module_arrowOpen__5g2iY","menu":"Dropdown-module_menu__dCgm8","menuOpen":"Dropdown-module_menuOpen__-IXFR","left":"Dropdown-module_left__tnNcS","center":"Dropdown-module_center__s9zhj","right":"Dropdown-module_right__s71gz","item":"Dropdown-module_item__R008o","itemDisabled":"Dropdown-module_itemDisabled__XIuNm","itemIcon":"Dropdown-module_itemIcon__DbSnD"};
|
|
660
660
|
|
|
661
661
|
const Dropdown = ({ label, children, alignment = 'left', width, className = '', disabled = false, }) => {
|
|
662
662
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -679,14 +679,14 @@ const Dropdown = ({ label, children, alignment = 'left', width, className = '',
|
|
|
679
679
|
setIsOpen(false);
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
return (jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
682
|
+
return (jsxs("div", { ref: dropdownRef, className: `${styles$Q.dropdown} ${className}`, onKeyDown: handleKeyDown, children: [jsxs(Button, { variant: "secondary", onClick: () => !disabled && setIsOpen(!isOpen), disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "true", children: [label, jsx("svg", { className: `${styles$Q.arrow} ${isOpen ? styles$Q.arrowOpen : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })] }), jsx("div", { className: `${styles$Q.menu} ${styles$Q[alignment]} ${isOpen ? styles$Q.menuOpen : ''}`, style: width ? { minWidth: `${width}px` } : undefined, role: "menu", children: children })] }));
|
|
683
683
|
};
|
|
684
684
|
const DropdownItem = ({ children, onClick, disabled = false, icon, className = '', }) => {
|
|
685
|
-
return (jsxs("button", { type: "button", className: `${styles$
|
|
685
|
+
return (jsxs("button", { type: "button", className: `${styles$Q.item} ${disabled ? styles$Q.itemDisabled : ''} ${className}`, onClick: onClick, disabled: disabled, role: "menuitem", children: [icon && jsx("span", { className: styles$Q.itemIcon, children: icon }), children] }));
|
|
686
686
|
};
|
|
687
687
|
Dropdown.Item = DropdownItem;
|
|
688
688
|
|
|
689
|
-
var styles$
|
|
689
|
+
var styles$P = {"wrapper":"FilterChip-module_wrapper__YDRSW","chip":"FilterChip-module_chip__pF7K5","open":"FilterChip-module_open__EYBp7","active":"FilterChip-module_active__JEkku","label":"FilterChip-module_label__tRr-y","value":"FilterChip-module_value__0EcVu","chevron":"FilterChip-module_chevron__kh13z","rotated":"FilterChip-module_rotated__U-FzI","dropdown":"FilterChip-module_dropdown__w3ytW","infoMessage":"FilterChip-module_infoMessage__0TzcA","searchWrapper":"FilterChip-module_searchWrapper__VHOSK","searchIcon":"FilterChip-module_searchIcon__jJ2K-","searchInput":"FilterChip-module_searchInput__FqwvR","optionsList":"FilterChip-module_optionsList__P0dgd","option":"FilterChip-module_option__DMuqM","selected":"FilterChip-module_selected__ltt9Y","noResults":"FilterChip-module_noResults__QGNao"};
|
|
690
690
|
|
|
691
691
|
const FilterChip = ({ label, value, options, onChange, searchable = false, searchPlaceholder = 'Search...', infoMessage, className, }) => {
|
|
692
692
|
const [open, setOpen] = useState(false);
|
|
@@ -723,13 +723,13 @@ const FilterChip = ({ label, value, options, onChange, searchable = false, searc
|
|
|
723
723
|
const selectedOption = options.find(opt => opt.value === value);
|
|
724
724
|
const displayValue = selectedOption?.label || value;
|
|
725
725
|
const isDefault = value === options[0]?.value;
|
|
726
|
-
return (jsxs("div", { ref: ref, className: `${styles$
|
|
726
|
+
return (jsxs("div", { ref: ref, className: `${styles$P.wrapper} ${className || ''}`, children: [jsxs("button", { type: "button", className: `${styles$P.chip} ${open ? styles$P.open : ''} ${!isDefault ? styles$P.active : ''}`, onClick: () => setOpen(!open), "aria-haspopup": "listbox", "aria-expanded": open, children: [jsxs("span", { className: styles$P.label, children: [label, ":"] }), jsx("span", { className: styles$P.value, children: displayValue }), jsx("svg", { className: `${styles$P.chevron} ${open ? styles$P.rotated : ''}`, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsx("polyline", { points: "6 9 12 15 18 9" }) })] }), open && (jsxs("div", { className: styles$P.dropdown, role: "listbox", children: [infoMessage && (jsxs("div", { className: styles$P.infoMessage, children: [jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "currentColor", children: 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" }) }), jsx("span", { children: infoMessage })] })), searchable && (jsxs("div", { className: styles$P.searchWrapper, children: [jsxs("svg", { className: styles$P.searchIcon, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "11", cy: "11", r: "8" }), jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsx("input", { type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: searchPlaceholder, className: styles$P.searchInput, autoFocus: true })] })), jsxs("div", { className: styles$P.optionsList, children: [filteredOptions.map((option) => (jsx("button", { type: "button", role: "option", "aria-selected": option.value === value, className: `${styles$P.option} ${option.value === value ? styles$P.selected : ''}`, onClick: () => {
|
|
727
727
|
onChange(option.value);
|
|
728
728
|
setOpen(false);
|
|
729
|
-
}, children: option.label }, option.value))), filteredOptions.length === 0 && (jsx("div", { className: styles$
|
|
729
|
+
}, children: option.label }, option.value))), filteredOptions.length === 0 && (jsx("div", { className: styles$P.noResults, children: "No results found" }))] })] }))] }));
|
|
730
730
|
};
|
|
731
731
|
|
|
732
|
-
var styles$
|
|
732
|
+
var styles$O = {"formField":"FormField-module_formField__VhLhK","label":"FormField-module_label__CNCs6","required":"FormField-module_required__HkPQf","inputElement":"FormField-module_inputElement__9uvGR","inputError":"FormField-module_inputError__xD7fk","helperText":"FormField-module_helperText__D99kd","errorText":"FormField-module_errorText__8mXAJ","visuallyHidden":"FormField-module_visuallyHidden__YQc7S"};
|
|
733
733
|
|
|
734
734
|
const FormField = forwardRef(({ label, helperText, error, required = false, hideLabel = false, className, as = 'input', inputProps, textareaProps, children, }, ref) => {
|
|
735
735
|
const generatedId = useId();
|
|
@@ -748,15 +748,15 @@ const FormField = forwardRef(({ label, helperText, error, required = false, hide
|
|
|
748
748
|
return children;
|
|
749
749
|
}
|
|
750
750
|
if (as === 'textarea') {
|
|
751
|
-
return (jsx(Textarea, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...textareaProps, className: `${styles$
|
|
751
|
+
return (jsx(Textarea, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...textareaProps, className: `${styles$O.inputElement} ${hasError ? styles$O.inputError : ''} ${textareaProps?.className || ''}` }));
|
|
752
752
|
}
|
|
753
|
-
return (jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: `${styles$
|
|
753
|
+
return (jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: `${styles$O.inputElement} ${hasError ? styles$O.inputError : ''} ${inputProps?.className || ''}` }));
|
|
754
754
|
};
|
|
755
|
-
return (jsxs("div", { className: `${styles$
|
|
755
|
+
return (jsxs("div", { className: `${styles$O.formField} ${className || ''}`, children: [jsxs("label", { htmlFor: inputId, className: `${styles$O.label} ${hideLabel ? styles$O.visuallyHidden : ''}`, children: [label, required && jsx("span", { className: styles$O.required, "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsx("p", { id: helperId, className: styles$O.helperText, children: helperText })), hasError && (jsx("p", { id: errorId, className: styles$O.errorText, role: "alert", children: error }))] }));
|
|
756
756
|
});
|
|
757
757
|
FormField.displayName = 'FormField';
|
|
758
758
|
|
|
759
|
-
var styles$
|
|
759
|
+
var styles$N = {"row":"FormRow-module_row__2ObP9","cols1":"FormRow-module_cols1__WsxX3","cols2":"FormRow-module_cols2__t548T","cols3":"FormRow-module_cols3__zjoSR","cols4":"FormRow-module_cols4__DbZL-","gapsm":"FormRow-module_gapsm__sl0ji","gapmd":"FormRow-module_gapmd__77Yp3","gaplg":"FormRow-module_gaplg__Yb-fh","stackMobile":"FormRow-module_stackMobile__6UluR"};
|
|
760
760
|
|
|
761
761
|
/**
|
|
762
762
|
* FormRow component for laying out form fields in a responsive grid.
|
|
@@ -766,16 +766,16 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
766
766
|
const childCount = Children.count(children);
|
|
767
767
|
const colCount = columns || (childCount > 4 ? 4 : childCount);
|
|
768
768
|
return (jsx("div", { className: `
|
|
769
|
-
${styles$
|
|
770
|
-
${styles$
|
|
771
|
-
${styles$
|
|
772
|
-
${stackOnMobile ? styles$
|
|
769
|
+
${styles$N.row}
|
|
770
|
+
${styles$N[`cols${colCount}`]}
|
|
771
|
+
${styles$N[`gap${gap}`]}
|
|
772
|
+
${stackOnMobile ? styles$N.stackMobile : ''}
|
|
773
773
|
${className || ''}
|
|
774
774
|
`, children: children }));
|
|
775
775
|
};
|
|
776
776
|
FormRow.displayName = 'FormRow';
|
|
777
777
|
|
|
778
|
-
var styles$
|
|
778
|
+
var styles$M = {"section":"FormSection-module_section__T17Vg","header":"FormSection-module_header__2MkY6","icon":"FormSection-module_icon__uywPB","title":"FormSection-module_title__dlvYD","fieldset":"FormSection-module_fieldset__pDDIo","disabled":"FormSection-module_disabled__xC3-e","status":"FormSection-module_status__2XOyW","statusLabel":"FormSection-module_statusLabel__VAuDb","statusValue":"FormSection-module_statusValue__YKSc-","submitted":"FormSection-module_submitted__sS-zT","not-submitted":"FormSection-module_not-submitted__Kuk2i","draft":"FormSection-module_draft__XHq3-"};
|
|
779
779
|
|
|
780
780
|
/**
|
|
781
781
|
* FormSection component for grouping related form fields with a title and icon.
|
|
@@ -784,45 +784,45 @@ var styles$L = {"section":"FormSection-module_section__T17Vg","header":"FormSect
|
|
|
784
784
|
const FormSection = ({ title, icon, status, disabled = false, children, className, id, }) => {
|
|
785
785
|
const isSubmitted = status === 'submitted';
|
|
786
786
|
const isDisabled = disabled || isSubmitted;
|
|
787
|
-
return (jsxs("div", { className: `${styles$
|
|
787
|
+
return (jsxs("div", { className: `${styles$M.section} ${className || ''}`, id: id, children: [jsxs("div", { className: styles$M.header, children: [icon && jsx("span", { className: styles$M.icon, children: icon }), jsx("h2", { className: styles$M.title, children: title })] }), jsxs("fieldset", { disabled: isDisabled, className: `${styles$M.fieldset} ${isDisabled ? styles$M.disabled : ''}`, children: [status && (jsxs("div", { className: styles$M.status, children: [jsx("span", { className: styles$M.statusLabel, children: "Status:" }), jsx("span", { className: `${styles$M.statusValue} ${styles$M[status]}`, children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
788
788
|
};
|
|
789
789
|
FormSection.displayName = 'FormSection';
|
|
790
790
|
|
|
791
|
-
var styles$
|
|
791
|
+
var styles$L = {"stack":"FormStack-module_stack__SURjY","sm":"FormStack-module_sm__rt3tb","md":"FormStack-module_md__SRDmc","lg":"FormStack-module_lg__jql3j"};
|
|
792
792
|
|
|
793
793
|
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
794
|
-
const FormStack = ({ children, gap = 'md', className = '' }) => (jsx("div", { className: [styles$
|
|
794
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsx("div", { className: [styles$L.stack, styles$L[gap], className].filter(Boolean).join(' '), children: children }));
|
|
795
795
|
|
|
796
|
-
var styles$
|
|
796
|
+
var styles$K = {"toggle":"ManifestViewToggle-module_toggle__sHnAd","lockedToggle":"ManifestViewToggle-module_lockedToggle__m70h9","tab":"ManifestViewToggle-module_tab__qcwg7","active":"ManifestViewToggle-module_active__ln3B8","locked":"ManifestViewToggle-module_locked__Udun8","lockedActive":"ManifestViewToggle-module_lockedActive__kYSaF","count":"ManifestViewToggle-module_count__M-8a8"};
|
|
797
797
|
|
|
798
798
|
const ManifestViewToggle = ({ view, onView, paxCount, eqCount, locked, className = '', }) => {
|
|
799
799
|
const tabs = [
|
|
800
800
|
{ key: 'passengers', label: 'Passengers', count: paxCount, icon: UsersIcon$1 },
|
|
801
801
|
{ key: 'equipment', label: 'Equipment', count: eqCount, icon: CubeIcon },
|
|
802
802
|
];
|
|
803
|
-
return (jsx("div", { className: [styles$
|
|
803
|
+
return (jsx("div", { className: [styles$K.toggle, locked ? styles$K.lockedToggle : '', className].filter(Boolean).join(' '), role: "tablist", "aria-label": "Manifest view", children: tabs.map((tab) => {
|
|
804
804
|
const active = view === tab.key;
|
|
805
805
|
const Icon = locked ? LockIcon$1 : tab.icon;
|
|
806
806
|
return (jsxs("button", { type: "button", role: "tab", "aria-selected": active, onClick: () => onView(tab.key), className: [
|
|
807
|
-
styles$
|
|
808
|
-
active ? styles$
|
|
809
|
-
locked ? styles$
|
|
810
|
-
locked && active ? styles$
|
|
811
|
-
].filter(Boolean).join(' '), children: [jsx(Icon, { size: 16 }), tab.label, jsx("span", { className: styles$
|
|
807
|
+
styles$K.tab,
|
|
808
|
+
active ? styles$K.active : '',
|
|
809
|
+
locked ? styles$K.locked : '',
|
|
810
|
+
locked && active ? styles$K.lockedActive : '',
|
|
811
|
+
].filter(Boolean).join(' '), children: [jsx(Icon, { size: 16 }), tab.label, jsx("span", { className: styles$K.count, children: tab.count })] }, tab.key));
|
|
812
812
|
}) }));
|
|
813
813
|
};
|
|
814
814
|
|
|
815
|
-
var styles$
|
|
815
|
+
var styles$J = {"navItem":"NavItem-module_navItem__4PpZU","disabled":"NavItem-module_disabled__uYqez","default":"NavItem-module_default__VB92P","active":"NavItem-module_active__3bcnW","pill":"NavItem-module_pill__pn5gl","icon":"NavItem-module_icon__j9VQ5","label":"NavItem-module_label__3S3KY","sm":"NavItem-module_sm__1oeZI","md":"NavItem-module_md__ySO90","lg":"NavItem-module_lg__OmaBw","collapsed":"NavItem-module_collapsed__ciZ6-","iconSm":"NavItem-module_iconSm__UvWnu","iconMd":"NavItem-module_iconMd__uAMlQ","iconLg":"NavItem-module_iconLg__PFPKD","badge":"NavItem-module_badge__oP9u2"};
|
|
816
816
|
|
|
817
817
|
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, }) => {
|
|
818
|
-
const content = (jsxs(Fragment, { children: [icon && jsx("span", { className: `${styles$
|
|
818
|
+
const content = (jsxs(Fragment, { children: [icon && jsx("span", { className: `${styles$J.icon} ${styles$J[`icon${size.charAt(0).toUpperCase()}${size.slice(1)}`]}`, "aria-hidden": "true", children: icon }), !collapsed && (jsx("span", { className: styles$J.label, children: label })), badge !== undefined && !collapsed && (jsx(Badge, { variant: badgeVariant, className: styles$J.badge, children: badge }))] }));
|
|
819
819
|
const classNames = [
|
|
820
|
-
styles$
|
|
821
|
-
styles$
|
|
822
|
-
styles$
|
|
823
|
-
active ? styles$
|
|
824
|
-
collapsed ? styles$
|
|
825
|
-
disabled ? styles$
|
|
820
|
+
styles$J.navItem,
|
|
821
|
+
styles$J[variant],
|
|
822
|
+
styles$J[size],
|
|
823
|
+
active ? styles$J.active : '',
|
|
824
|
+
collapsed ? styles$J.collapsed : '',
|
|
825
|
+
disabled ? styles$J.disabled : '',
|
|
826
826
|
className || '',
|
|
827
827
|
].filter(Boolean).join(' ');
|
|
828
828
|
const commonProps = {
|
|
@@ -837,7 +837,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
837
837
|
return (jsx("button", { type: "button", onClick: disabled ? undefined : onClick, disabled: disabled, ...commonProps, children: content }));
|
|
838
838
|
};
|
|
839
839
|
|
|
840
|
-
var styles$
|
|
840
|
+
var styles$I = {"barContainer":"Progress-module_barContainer__e4v8v","barTrack":"Progress-module_barTrack__tJsPO","barFill":"Progress-module_barFill__RbcDy","barxs":"Progress-module_barxs__TLS4q","barsm":"Progress-module_barsm__BFAiw","barmd":"Progress-module_barmd__QDW-h","barlg":"Progress-module_barlg__C-Mzw","barLabel":"Progress-module_barLabel__4PFJ7","circleContainer":"Progress-module_circleContainer__zyOTa","circleSvg":"Progress-module_circleSvg__0Tt1Q","circleTrack":"Progress-module_circleTrack__p4VWf","circleFill":"Progress-module_circleFill__6fU2M","circleLabel":"Progress-module_circleLabel__vHLfU","primary":"Progress-module_primary__H2wpc","success":"Progress-module_success__rmmnE","warning":"Progress-module_warning__68ovy","error":"Progress-module_error__ZXkH0"};
|
|
841
841
|
|
|
842
842
|
const dimensions = {
|
|
843
843
|
xs: 32,
|
|
@@ -853,7 +853,7 @@ const strokeWidths = {
|
|
|
853
853
|
};
|
|
854
854
|
const ProgressBar = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
855
855
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
856
|
-
return (jsxs("div", { className: `${styles$
|
|
856
|
+
return (jsxs("div", { className: `${styles$I.barContainer} ${styles$I[`bar${size}`]} ${className}`, children: [jsx("div", { className: styles$I.barTrack, children: jsx("div", { className: `${styles$I.barFill} ${styles$I[variant]}`, style: { width: `${percentage}%` }, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max }) }), showLabel && (jsxs("span", { className: styles$I.barLabel, children: [Math.round(percentage), "%"] }))] }));
|
|
857
857
|
};
|
|
858
858
|
const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', showLabel = false, className = '', }) => {
|
|
859
859
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
@@ -862,7 +862,7 @@ const ProgressCircle = ({ value, max = 100, size = 'md', variant = 'primary', sh
|
|
|
862
862
|
const radius = (dimension - strokeWidth) / 2;
|
|
863
863
|
const circumference = radius * 2 * Math.PI;
|
|
864
864
|
const strokeDashoffset = circumference - (percentage / 100) * circumference;
|
|
865
|
-
return (jsxs("div", { className: `${styles$
|
|
865
|
+
return (jsxs("div", { className: `${styles$I.circleContainer} ${className}`, style: { width: dimension, height: dimension }, children: [jsxs("svg", { width: dimension, height: dimension, className: styles$I.circleSvg, children: [jsx("circle", { className: styles$I.circleTrack, cx: dimension / 2, cy: dimension / 2, r: radius, strokeWidth: strokeWidth, fill: "transparent" }), jsx("circle", { className: `${styles$I.circleFill} ${styles$I[variant]}`, cx: dimension / 2, cy: dimension / 2, r: radius, strokeWidth: strokeWidth, fill: "transparent", strokeDasharray: circumference, strokeDashoffset: strokeDashoffset, strokeLinecap: "round", role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max })] }), showLabel && (jsxs("span", { className: styles$I.circleLabel, style: { fontSize: size === 'xs' ? '8px' : size === 'sm' ? '10px' : size === 'md' ? '12px' : '14px' }, children: [Math.round(percentage), "%"] }))] }));
|
|
866
866
|
};
|
|
867
867
|
// Combined export
|
|
868
868
|
const Progress = {
|
|
@@ -870,7 +870,7 @@ const Progress = {
|
|
|
870
870
|
Circle: ProgressCircle,
|
|
871
871
|
};
|
|
872
872
|
|
|
873
|
-
var styles$
|
|
873
|
+
var styles$H = {"toolbar":"RosterToolbar-module_toolbar__IHjs9","leftSection":"RosterToolbar-module_leftSection__baz7E","rightSection":"RosterToolbar-module_rightSection__R2b-D","dropdown":"RosterToolbar-module_dropdown__NKaWV","dropdownTrigger":"RosterToolbar-module_dropdownTrigger__nCoaZ","dropdownMenu":"RosterToolbar-module_dropdownMenu__7QuED","dropdownItem":"RosterToolbar-module_dropdownItem__mrsat","dropdownItemIcon":"RosterToolbar-module_dropdownItemIcon__gx5tx","lockButton":"RosterToolbar-module_lockButton__zw3s0","locked":"RosterToolbar-module_locked__DVnqB","saveButton":"RosterToolbar-module_saveButton__th1lq","spinner":"RosterToolbar-module_spinner__uWdPg"};
|
|
874
874
|
|
|
875
875
|
const ImportIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), jsx("polyline", { points: "17 8 12 3 7 8" }), jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })] }));
|
|
876
876
|
const ExportIcon$1 = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), jsx("polyline", { points: "7 10 12 15 17 10" }), jsx("line", { x1: "12", y1: "15", x2: "12", y2: "3" })] }));
|
|
@@ -878,23 +878,23 @@ const ChevronIcon$2 = () => (jsx("svg", { width: "12", height: "12", viewBox: "0
|
|
|
878
878
|
const LockIcon = () => (jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }));
|
|
879
879
|
const UnlockIcon = () => (jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }));
|
|
880
880
|
const SaveIcon = () => (jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }), jsx("polyline", { points: "17 21 17 13 7 13 7 21" }), jsx("polyline", { points: "7 3 7 8 15 8" })] }));
|
|
881
|
-
const SpinnerIcon = () => (jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: styles$
|
|
881
|
+
const SpinnerIcon = () => (jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: styles$H.spinner, children: jsx("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32" }) }));
|
|
882
882
|
const DropdownButton = ({ label, icon, options, }) => {
|
|
883
|
-
return (jsxs("div", { className: styles$
|
|
883
|
+
return (jsxs("div", { className: styles$H.dropdown, children: [jsxs("button", { type: "button", className: styles$H.dropdownTrigger, children: [icon, jsx("span", { children: label }), jsx(ChevronIcon$2, {})] }), jsx("div", { className: styles$H.dropdownMenu, children: options.map((option, i) => (jsxs("button", { type: "button", className: styles$H.dropdownItem, onClick: option.onClick, disabled: option.disabled, children: [option.icon && jsx("span", { className: styles$H.dropdownItemIcon, children: option.icon }), option.label] }, i))) })] }));
|
|
884
884
|
};
|
|
885
885
|
/**
|
|
886
886
|
* RosterToolbar - Toolbar for roster management with import/export/save actions
|
|
887
887
|
*/
|
|
888
888
|
const RosterToolbar = ({ importOptions, exportOptions, lockToggle, saveButton, additionalActions, searchField, className = '', }) => {
|
|
889
|
-
const toolbarClasses = [styles$
|
|
890
|
-
return (jsxs("div", { className: toolbarClasses, children: [jsxs("div", { className: styles$
|
|
891
|
-
styles$
|
|
892
|
-
lockToggle.isLocked ? styles$
|
|
893
|
-
].filter(Boolean).join(' '), onClick: () => lockToggle.onToggle(!lockToggle.isLocked), disabled: lockToggle.disabled, "aria-label": lockToggle.isLocked ? 'Unlock roster' : 'Lock roster', children: [lockToggle.isLocked ? jsx(LockIcon, {}) : jsx(UnlockIcon, {}), jsx("span", { children: lockToggle.isLocked ? 'Locked' : 'Unlocked' })] })), saveButton && (jsxs("button", { type: "button", className: styles$
|
|
889
|
+
const toolbarClasses = [styles$H.toolbar, className].filter(Boolean).join(' ');
|
|
890
|
+
return (jsxs("div", { className: toolbarClasses, children: [jsxs("div", { className: styles$H.leftSection, children: [searchField, additionalActions] }), jsxs("div", { className: styles$H.rightSection, children: [importOptions && importOptions.length > 0 && (jsx(DropdownButton, { label: "Import", icon: jsx(ImportIcon, {}), options: importOptions })), exportOptions && exportOptions.length > 0 && (jsx(DropdownButton, { label: "Export", icon: jsx(ExportIcon$1, {}), options: exportOptions })), lockToggle && (jsxs("button", { type: "button", className: [
|
|
891
|
+
styles$H.lockButton,
|
|
892
|
+
lockToggle.isLocked ? styles$H.locked : '',
|
|
893
|
+
].filter(Boolean).join(' '), onClick: () => lockToggle.onToggle(!lockToggle.isLocked), disabled: lockToggle.disabled, "aria-label": lockToggle.isLocked ? 'Unlock roster' : 'Lock roster', children: [lockToggle.isLocked ? jsx(LockIcon, {}) : jsx(UnlockIcon, {}), jsx("span", { children: lockToggle.isLocked ? 'Locked' : 'Unlocked' })] })), saveButton && (jsxs("button", { type: "button", className: styles$H.saveButton, onClick: saveButton.onClick, disabled: saveButton.disabled || saveButton.loading, children: [saveButton.loading ? jsx(SpinnerIcon, {}) : jsx(SaveIcon, {}), jsx("span", { children: saveButton.label || 'Save' })] }))] })] }));
|
|
894
894
|
};
|
|
895
895
|
RosterToolbar.displayName = 'RosterToolbar';
|
|
896
896
|
|
|
897
|
-
var styles$
|
|
897
|
+
var styles$G = {"searchField":"SearchField-module_searchField__c7gUE","inputWrapper":"SearchField-module_inputWrapper__SUzHv","searchIcon":"SearchField-module_searchIcon__MOZ2m","input":"SearchField-module_input__abJcl","clearButton":"SearchField-module_clearButton__RMIg2","sm":"SearchField-module_sm__-sayT","lg":"SearchField-module_lg__QKacI"};
|
|
898
898
|
|
|
899
899
|
const SearchField = forwardRef(({ placeholder = 'Search...', value, defaultValue = '', onChange, onSearch, onClear, size = 'md', disabled = false, showClear = true, showButton = true, className, id, 'aria-label': ariaLabel = 'Search', ...props }, ref) => {
|
|
900
900
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
@@ -922,25 +922,25 @@ const SearchField = forwardRef(({ placeholder = 'Search...', value, defaultValue
|
|
|
922
922
|
onSearch?.(currentValue);
|
|
923
923
|
}
|
|
924
924
|
};
|
|
925
|
-
return (jsxs("form", { className: `${styles$
|
|
925
|
+
return (jsxs("form", { className: `${styles$G.searchField} ${styles$G[size]} ${className || ''}`, onSubmit: handleSubmit, role: "search", children: [jsxs("div", { className: styles$G.inputWrapper, children: [jsx(SearchIcon$1, { className: styles$G.searchIcon, "aria-hidden": "true" }), jsx(Input, { ref: ref, id: id, type: "search", placeholder: placeholder, value: currentValue, onChange: handleChange, onKeyDown: handleKeyDown, disabled: disabled, className: styles$G.input, "aria-label": ariaLabel, ...props }), showClear && currentValue && (jsx("button", { type: "button", className: styles$G.clearButton, onClick: handleClear, disabled: disabled, "aria-label": "Clear search", children: jsx(CloseIcon, { size: 16 }) }))] }), showButton && (jsx(Button, { type: "submit", variant: "primary", size: size, disabled: disabled, children: "Search" }))] }));
|
|
926
926
|
});
|
|
927
927
|
SearchField.displayName = 'SearchField';
|
|
928
928
|
|
|
929
|
-
var styles$
|
|
929
|
+
var styles$F = {"form":"SchoolContactForm-module_form__-Mx7k","portalLabel":"SchoolContactForm-module_portalLabel__GAeV6","newContactLabel":"SchoolContactForm-module_newContactLabel__7S3Vw","divider":"SchoolContactForm-module_divider__ZSx-R","nameFields":"SchoolContactForm-module_nameFields__Fcjl8","phoneFields":"SchoolContactForm-module_phoneFields__-zRPe"};
|
|
930
930
|
|
|
931
931
|
/**
|
|
932
932
|
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
933
933
|
* consuming applications retain their form state, validation, and masking.
|
|
934
934
|
*/
|
|
935
|
-
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxs("div", { className: [styles$
|
|
935
|
+
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxs("div", { className: [styles$F.form, className].filter(Boolean).join(' '), children: [mode === 'Add' && (jsxs(Fragment, { children: [jsxs("div", { children: [jsx("label", { className: styles$F.portalLabel, children: "Create From Portal User" }), createFromPortalUser] }), jsx("div", { className: styles$F.divider, children: jsx("strong", { children: "OR" }) }), jsx("p", { className: styles$F.newContactLabel, children: "Create New Contact Without Portal Access" })] })), jsxs("div", { className: styles$F.nameFields, children: [firstNameField, middleInitialField, lastNameField] }), jsxs("div", { className: styles$F.phoneFields, children: [businessPhoneField, cellPhoneField] }), jsx("div", { children: emailField })] }));
|
|
936
936
|
|
|
937
|
-
var styles$
|
|
937
|
+
var styles$E = {"segment":"Segment-module_segment__UF-SG","fullWidth":"Segment-module_fullWidth__Hi19i","option":"Segment-module_option__UJUhj","disabled":"Segment-module_disabled__CSxuQ","selected":"Segment-module_selected__gRnVj","sm":"Segment-module_sm__h8S7Z","md":"Segment-module_md__4uTae","lg":"Segment-module_lg__zL0Hv","icon":"Segment-module_icon__ZHRr6"};
|
|
938
938
|
|
|
939
939
|
const Segment = ({ options, value, onChange, size = 'md', fullWidth = false, className = '', 'aria-label': ariaLabel, }) => {
|
|
940
|
-
return (jsx("div", { className: `${styles$
|
|
940
|
+
return (jsx("div", { className: `${styles$E.segment} ${styles$E[size]} ${fullWidth ? styles$E.fullWidth : ''} ${className}`, role: "radiogroup", "aria-label": ariaLabel, children: options.map((option) => (jsxs("button", { type: "button", className: `${styles$E.option} ${value === option.value ? styles$E.selected : ''} ${option.disabled ? styles$E.disabled : ''}`, onClick: () => !option.disabled && onChange(option.value), disabled: option.disabled, role: "radio", "aria-checked": value === option.value, children: [option.icon && jsx("span", { className: styles$E.icon, children: option.icon }), option.label] }, option.value))) }));
|
|
941
941
|
};
|
|
942
942
|
|
|
943
|
-
var styles$
|
|
943
|
+
var styles$D = {"container":"SelectFilter-module_container__tCC9y","trigger":"SelectFilter-module_trigger__5WbMf","open":"SelectFilter-module_open__oo-Y6","disabled":"SelectFilter-module_disabled__JUdi3","triggerText":"SelectFilter-module_triggerText__LM07K","placeholder":"SelectFilter-module_placeholder__J0xyo","chevron":"SelectFilter-module_chevron__x-Pnr","dropdown":"SelectFilter-module_dropdown__52FPP","tabs":"SelectFilter-module_tabs__wp6on","tab":"SelectFilter-module_tab__JpnWo","activeTab":"SelectFilter-module_activeTab__ShP7x","actions":"SelectFilter-module_actions__phfFl","actionBtn":"SelectFilter-module_actionBtn__ppB--","options":"SelectFilter-module_options__p1iCX","option":"SelectFilter-module_option__0vwfy","selected":"SelectFilter-module_selected__2vxyT","checkbox":"SelectFilter-module_checkbox__qTUjy","optionLabel":"SelectFilter-module_optionLabel__L4CMA","footer":"SelectFilter-module_footer__aq4JP","applyBtn":"SelectFilter-module_applyBtn__RFKei"};
|
|
944
944
|
|
|
945
945
|
const ChevronIcon$1 = () => (jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
946
946
|
const CheckIcon = () => (jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsx("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
@@ -1013,11 +1013,11 @@ const SelectFilter = ({ label, options = [], groupedOptions = {}, value = [], on
|
|
|
1013
1013
|
}
|
|
1014
1014
|
return `${selected.length} selected`;
|
|
1015
1015
|
};
|
|
1016
|
-
return (jsxs("div", { ref: dropdownRef, className: `${styles$
|
|
1016
|
+
return (jsxs("div", { ref: dropdownRef, className: `${styles$D.container} ${className}`, children: [jsxs("button", { type: "button", className: `${styles$D.trigger} ${disabled ? styles$D.disabled : ''} ${isOpen ? styles$D.open : ''}`, onClick: () => !disabled && setIsOpen(!isOpen), children: [jsx("span", { className: `${styles$D.triggerText} ${selectedValues.length === 0 ? styles$D.placeholder : ''}`, children: getDisplayText() }), jsx("span", { className: styles$D.chevron, children: jsx(ChevronIcon$1, {}) })] }), isOpen && (jsxs("div", { className: styles$D.dropdown, style: { width }, children: [grouped && tabs.length > 0 && (jsx("div", { className: styles$D.tabs, children: tabs.map(tab => (jsx("button", { type: "button", className: `${styles$D.tab} ${activeTab === tab ? styles$D.activeTab : ''}`, onClick: () => setActiveTab(tab), children: tab.charAt(0).toUpperCase() + tab.slice(1) }, tab))) })), multiselect && (jsxs("div", { className: styles$D.actions, children: [jsx("button", { type: "button", className: styles$D.actionBtn, onClick: handleSelectAll, children: "Select All" }), jsx("button", { type: "button", className: styles$D.actionBtn, onClick: handleClear, children: "Clear" })] })), jsx("div", { className: styles$D.options, children: currentOptions.map(option => (jsxs("div", { className: `${styles$D.option} ${selectedValues.includes(option.value) ? styles$D.selected : ''}`, onClick: () => handleSelect(option.value), children: [multiselect && (jsx("span", { className: styles$D.checkbox, children: selectedValues.includes(option.value) && jsx(CheckIcon, {}) })), jsx("span", { className: styles$D.optionLabel, children: option.label })] }, option.value))) }), multiselect && (jsx("div", { className: styles$D.footer, children: jsx("button", { type: "button", className: styles$D.applyBtn, onClick: () => setIsOpen(false), children: "Apply" }) }))] }))] }));
|
|
1017
1017
|
};
|
|
1018
1018
|
SelectFilter.displayName = 'SelectFilter';
|
|
1019
1019
|
|
|
1020
|
-
var styles$
|
|
1020
|
+
var styles$C = {"list":"ServiceToggle-module_list__bBts8","item":"ServiceToggle-module_item__4wEbQ","labelContainer":"ServiceToggle-module_labelContainer__oz-I1","clickable":"ServiceToggle-module_clickable__yzQxe","icon":"ServiceToggle-module_icon__8IdST","label":"ServiceToggle-module_label__J98Ve"};
|
|
1021
1021
|
|
|
1022
1022
|
/**
|
|
1023
1023
|
* ServiceToggle component for a single service item.
|
|
@@ -1030,19 +1030,19 @@ const ServiceToggle = ({ label, icon, hasToggle = true, enabled = false, onToggl
|
|
|
1030
1030
|
onClick();
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
|
-
return (jsxs("div", { className: styles$
|
|
1033
|
+
return (jsxs("div", { className: styles$C.item, children: [jsxs("div", { className: `${styles$C.labelContainer} ${isClickable ? styles$C.clickable : ''}`, onClick: handleClick, children: [icon && jsx("span", { className: styles$C.icon, children: icon }), jsx("span", { className: styles$C.label, children: label })] }), hasToggle && (jsx(Toggle, { checked: enabled, onChange: (checked) => onToggle?.(checked), disabled: disabled, size: "sm" }))] }));
|
|
1034
1034
|
};
|
|
1035
1035
|
/**
|
|
1036
1036
|
* ServiceToggleList component for displaying a list of services with toggles.
|
|
1037
1037
|
* Used in travel request forms for service selection (Air, Hotel, Ground, etc.)
|
|
1038
1038
|
*/
|
|
1039
1039
|
const ServiceToggleList = ({ services, enabledServices = {}, onToggle, onClick, className, }) => {
|
|
1040
|
-
return (jsx("div", { className: `${styles$
|
|
1040
|
+
return (jsx("div", { className: `${styles$C.list} ${className || ''}`, children: services.map((service) => (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))) }));
|
|
1041
1041
|
};
|
|
1042
1042
|
ServiceToggle.displayName = 'ServiceToggle';
|
|
1043
1043
|
ServiceToggleList.displayName = 'ServiceToggleList';
|
|
1044
1044
|
|
|
1045
|
-
var styles$
|
|
1045
|
+
var styles$B = {"toggle":"SupplierTypeToggle-module_toggle__x4pTJ","active":"SupplierTypeToggle-module_active__8BGSe"};
|
|
1046
1046
|
|
|
1047
1047
|
const SUPPLIER_TYPE_OPTIONS = [
|
|
1048
1048
|
{ value: 'A', label: 'Air' },
|
|
@@ -1063,10 +1063,10 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
1063
1063
|
setInternalValue(nextValue);
|
|
1064
1064
|
onChange?.(nextValue);
|
|
1065
1065
|
};
|
|
1066
|
-
return (jsx("div", { className: [styles$
|
|
1066
|
+
return (jsx("div", { className: [styles$B.toggle, className].filter(Boolean).join(' '), role: "group", "aria-label": "Supplier type", children: OPTIONS.map((option) => (jsx("button", { type: "button", disabled: disabled, "aria-pressed": activeValue === option.value, className: activeValue === option.value ? styles$B.active : '', onClick: () => handleSelect(option.value), children: option.label }, option.value || 'all'))) }));
|
|
1067
1067
|
};
|
|
1068
1068
|
|
|
1069
|
-
var styles$
|
|
1069
|
+
var styles$A = {"header":"TeamHeader-module_header__3Zx1c","left":"TeamHeader-module_left__yqug2","backButton":"TeamHeader-module_backButton__MqElX","titles":"TeamHeader-module_titles__m3Ne9","pretitle":"TeamHeader-module_pretitle__rZUD6","title":"TeamHeader-module_title__i3dmZ","actions":"TeamHeader-module_actions__ft1DN","subMenu":"TeamHeader-module_subMenu__oL-3Q","activeTab":"TeamHeader-module_activeTab__AUzdq"};
|
|
1070
1070
|
|
|
1071
1071
|
const BackIcon = () => (jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), jsx("polyline", { points: "12 19 5 12 12 5" })] }));
|
|
1072
1072
|
/**
|
|
@@ -1074,7 +1074,7 @@ const BackIcon = () => (jsxs("svg", { width: "20", height: "20", viewBox: "0 0 2
|
|
|
1074
1074
|
*/
|
|
1075
1075
|
const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team Management', backHref, onBack, actions, className = '', }) => {
|
|
1076
1076
|
const headerClasses = [
|
|
1077
|
-
styles$
|
|
1077
|
+
styles$A.header,
|
|
1078
1078
|
className,
|
|
1079
1079
|
].filter(Boolean).join(' ');
|
|
1080
1080
|
const title = suppliedTitle ?? (teamCode && teamName
|
|
@@ -1089,7 +1089,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
1089
1089
|
window.location.href = backHref;
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
return (jsxs("div", { className: headerClasses, children: [jsxs("div", { className: styles$
|
|
1092
|
+
return (jsxs("div", { className: headerClasses, children: [jsxs("div", { className: styles$A.left, children: [(backHref || onBack) && (jsx("button", { type: "button", className: styles$A.backButton, onClick: handleBack, "aria-label": "Go back", children: jsx(BackIcon, {}) })), jsxs("div", { className: styles$A.titles, children: [pretitle && jsx("span", { className: styles$A.pretitle, children: pretitle }), jsxs("h1", { className: styles$A.title, children: [title, "\u00A0"] })] })] }), actions && (jsx("div", { className: styles$A.actions, children: actions }))] }));
|
|
1093
1093
|
};
|
|
1094
1094
|
const DEFAULT_TABS$1 = [
|
|
1095
1095
|
{ id: 'profile', label: 'Profile' },
|
|
@@ -1098,11 +1098,11 @@ const DEFAULT_TABS$1 = [
|
|
|
1098
1098
|
{ id: 'user-access', label: 'User Access' },
|
|
1099
1099
|
];
|
|
1100
1100
|
/** Router-agnostic counterpart of Hub's team-management submenu. */
|
|
1101
|
-
const TeamSubMenu = ({ tabs = DEFAULT_TABS$1, activeTab, onTabChange, className = '' }) => (jsx("nav", { className: [styles$
|
|
1101
|
+
const TeamSubMenu = ({ tabs = DEFAULT_TABS$1, activeTab, onTabChange, className = '' }) => (jsx("nav", { className: [styles$A.subMenu, className].filter(Boolean).join(' '), "aria-label": "Team management sections", children: tabs.map((tab) => (jsx("button", { type: "button", className: activeTab === tab.id ? styles$A.activeTab : '', "aria-current": activeTab === tab.id ? 'page' : undefined, onClick: () => onTabChange?.(tab.id), children: tab.label }, tab.id))) }));
|
|
1102
1102
|
TeamHeader.displayName = 'TeamHeader';
|
|
1103
1103
|
TeamSubMenu.displayName = 'TeamSubMenu';
|
|
1104
1104
|
|
|
1105
|
-
var styles$
|
|
1105
|
+
var styles$z = {"segment":"TripSegment-module_segment__jX-Nq","light":"TripSegment-module_light__hHSb3","dark":"TripSegment-module_dark__3Fuo7","empty":"TripSegment-module_empty__vmzg0","item":"TripSegment-module_item__S-RC1","itemHeader":"TripSegment-module_itemHeader__wFWMo","itemType":"TripSegment-module_itemType__NsDLe","itemName":"TripSegment-module_itemName__ysYsC","route":"TripSegment-module_route__Shyz0","location":"TripSegment-module_location__8VCMH","details":"TripSegment-module_details__4U4Km","dates":"TripSegment-module_dates__Wn4-k"};
|
|
1106
1106
|
|
|
1107
1107
|
const PlaneIcon$3 = () => (jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: 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" }) }));
|
|
1108
1108
|
const BusIcon$2 = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("rect", { x: "4", y: "4", width: "16", height: "14", rx: "2" }), jsx("path", { d: "M8 6v6" }), jsx("path", { d: "M16 6v6" }), jsx("circle", { cx: "8", cy: "16", r: "1" }), jsx("circle", { cx: "16", cy: "16", r: "1" })] }));
|
|
@@ -1112,41 +1112,41 @@ const ArrowIcon = () => (jsxs("svg", { width: "12", height: "12", viewBox: "0 0
|
|
|
1112
1112
|
* Base TripSegment component wrapper
|
|
1113
1113
|
*/
|
|
1114
1114
|
const TripSegment = ({ type: _type, variant = 'light', className = '', children, }) => {
|
|
1115
|
-
return (jsx("div", { className: `${styles$
|
|
1115
|
+
return (jsx("div", { className: `${styles$z.segment} ${styles$z[variant]} ${className}`, children: children }));
|
|
1116
1116
|
};
|
|
1117
1117
|
/**
|
|
1118
1118
|
* AirSegment component for displaying flight information
|
|
1119
1119
|
*/
|
|
1120
1120
|
const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
1121
1121
|
if (!flights || flights.length === 0) {
|
|
1122
|
-
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsx("span", { className: styles$
|
|
1122
|
+
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsx("span", { className: styles$z.empty, children: "No flights" }) }));
|
|
1123
1123
|
}
|
|
1124
|
-
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxs("div", { className: styles$
|
|
1124
|
+
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxs("div", { className: styles$z.item, children: [jsxs("div", { className: styles$z.itemHeader, children: [jsx(PlaneIcon$3, {}), jsx("span", { className: styles$z.itemType, children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxs("div", { className: styles$z.route, children: [jsx("span", { className: styles$z.location, children: flight.departure }), jsx(ArrowIcon, {}), jsx("span", { className: styles$z.location, children: flight.arrival })] }), jsxs("div", { className: styles$z.details, children: [jsx("span", { children: flight.departureDate }), flight.departureTime && jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxs("div", { className: styles$z.details, children: [jsx("span", { children: flight.airline }), flight.flightNumber && jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
1125
1125
|
};
|
|
1126
1126
|
/**
|
|
1127
1127
|
* GroundSegment component for displaying ground transportation
|
|
1128
1128
|
*/
|
|
1129
1129
|
const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
1130
1130
|
if (!segments || segments.length === 0) {
|
|
1131
|
-
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsx("span", { className: styles$
|
|
1131
|
+
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsx("span", { className: styles$z.empty, children: "No ground transportation" }) }));
|
|
1132
1132
|
}
|
|
1133
|
-
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxs("div", { className: styles$
|
|
1133
|
+
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxs("div", { className: styles$z.item, children: [jsxs("div", { className: styles$z.itemHeader, children: [jsx(BusIcon$2, {}), jsx("span", { className: styles$z.itemType, children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxs("div", { className: styles$z.route, children: [jsx("span", { className: styles$z.location, children: segment.pickupLocation }), jsx(ArrowIcon, {}), jsx("span", { className: styles$z.location, children: segment.dropoffLocation })] }), jsxs("div", { className: styles$z.details, children: [jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxs("div", { className: styles$z.details, children: [jsx("span", { children: segment.company }), segment.vehicleCount && jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
1134
1134
|
};
|
|
1135
1135
|
/**
|
|
1136
1136
|
* HotelSegment component for displaying hotel information
|
|
1137
1137
|
*/
|
|
1138
1138
|
const HotelSegment = ({ hotels, variant = 'light', className = '', }) => {
|
|
1139
1139
|
if (!hotels || hotels.length === 0) {
|
|
1140
|
-
return (jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: jsx("span", { className: styles$
|
|
1140
|
+
return (jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: jsx("span", { className: styles$z.empty, children: "No hotels" }) }));
|
|
1141
1141
|
}
|
|
1142
|
-
return (jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: hotels.map((hotel, i) => (jsxs("div", { className: styles$
|
|
1142
|
+
return (jsx(TripSegment, { type: "hotel", variant: variant, className: className, children: hotels.map((hotel, i) => (jsxs("div", { className: styles$z.item, children: [jsxs("div", { className: styles$z.itemHeader, children: [jsx(HotelIcon$3, {}), jsx("span", { className: styles$z.itemName, children: hotel.name })] }), hotel.city && (jsx("div", { className: styles$z.details, children: jsx("span", { children: hotel.city }) })), jsxs("div", { className: styles$z.dates, children: [jsx("span", { children: hotel.checkIn }), jsx("span", { children: "\u2013" }), jsx("span", { children: hotel.checkOut })] }), hotel.roomCount && (jsx("div", { className: styles$z.details, children: jsxs("span", { children: [hotel.roomCount, " rooms"] }) }))] }, i))) }));
|
|
1143
1143
|
};
|
|
1144
1144
|
TripSegment.displayName = 'TripSegment';
|
|
1145
1145
|
AirSegment.displayName = 'AirSegment';
|
|
1146
1146
|
GroundSegment.displayName = 'GroundSegment';
|
|
1147
1147
|
HotelSegment.displayName = 'HotelSegment';
|
|
1148
1148
|
|
|
1149
|
-
var styles$
|
|
1149
|
+
var styles$y = {"sidenav":"Sidenav-module_sidenav__9DKVg","expanded":"Sidenav-module_expanded__TfkMs","collapsed":"Sidenav-module_collapsed__xyLkg","toggle":"Sidenav-module_toggle__JCoZu","logoContainer":"Sidenav-module_logoContainer__lLl0-","nav":"Sidenav-module_nav__ZwGrU","navItem":"Sidenav-module_navItem__HhFpj","active":"Sidenav-module_active__-oHUp","icon":"Sidenav-module_icon__7XJWf","label":"Sidenav-module_label__DJDBw","footer":"Sidenav-module_footer__EgrDk"};
|
|
1150
1150
|
|
|
1151
1151
|
/**
|
|
1152
1152
|
* Sidenav component for main navigation.
|
|
@@ -1155,8 +1155,8 @@ var styles$x = {"sidenav":"Sidenav-module_sidenav__9DKVg","expanded":"Sidenav-mo
|
|
|
1155
1155
|
const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultExpanded = true, footer, className = '', ...props }) => {
|
|
1156
1156
|
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
1157
1157
|
const classNames = [
|
|
1158
|
-
styles$
|
|
1159
|
-
expanded ? styles$
|
|
1158
|
+
styles$y.sidenav,
|
|
1159
|
+
expanded ? styles$y.expanded : styles$y.collapsed,
|
|
1160
1160
|
className,
|
|
1161
1161
|
]
|
|
1162
1162
|
.filter(Boolean)
|
|
@@ -1169,20 +1169,20 @@ const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultEx
|
|
|
1169
1169
|
onItemClick(item.key);
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
|
-
return (jsxs("aside", { className: classNames, ...props, children: [jsx("button", { className: styles$
|
|
1172
|
+
return (jsxs("aside", { className: classNames, ...props, children: [jsx("button", { className: styles$y.toggle, onClick: () => setExpanded(!expanded), "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', children: expanded ? (jsx(ChevronLeftIcon, { size: 16 })) : (jsx(ChevronRightIcon$1, { size: 16 })) }), jsx("div", { className: styles$y.logoContainer, children: expanded ? logo : logoCollapsed || logo }), jsx("nav", { className: styles$y.nav, children: items.map((item) => {
|
|
1173
1173
|
const isActive = item.key === activeKey;
|
|
1174
1174
|
const itemClasses = [
|
|
1175
|
-
styles$
|
|
1176
|
-
isActive ? styles$
|
|
1175
|
+
styles$y.navItem,
|
|
1176
|
+
isActive ? styles$y.active : '',
|
|
1177
1177
|
]
|
|
1178
1178
|
.filter(Boolean)
|
|
1179
1179
|
.join(' ');
|
|
1180
|
-
return (jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsx("span", { className: styles$
|
|
1181
|
-
}) }), footer && jsx("div", { className: styles$
|
|
1180
|
+
return (jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsx("span", { className: styles$y.icon, children: item.icon }), expanded && jsx("span", { className: styles$y.label, children: item.label })] }, item.key));
|
|
1181
|
+
}) }), footer && jsx("div", { className: styles$y.footer, children: footer })] }));
|
|
1182
1182
|
};
|
|
1183
1183
|
Sidenav.displayName = 'Sidenav';
|
|
1184
1184
|
|
|
1185
|
-
var styles$
|
|
1185
|
+
var styles$x = {"topbar":"Topbar-module_topbar__U9CDj","left":"Topbar-module_left__m4aap","accountWrapper":"Topbar-module_accountWrapper__5mjDZ","accountSelector":"Topbar-module_accountSelector__iqI--","open":"Topbar-module_open__2Xsp1","accountCode":"Topbar-module_accountCode__KMKWm","accountName":"Topbar-module_accountName__XZYjB","chevron":"Topbar-module_chevron__OSXcD","chevronOpen":"Topbar-module_chevronOpen__jVvEl","dropdown":"Topbar-module_dropdown__fA5Gw","dropdownSearch":"Topbar-module_dropdownSearch__9zqy3","searchIcon":"Topbar-module_searchIcon__sHGnK","searchInput":"Topbar-module_searchInput__1TSc3","dropdownList":"Topbar-module_dropdownList__P4q9b","dropdownItem":"Topbar-module_dropdownItem__w-eHf","selected":"Topbar-module_selected__MylKY","dropdownItemCode":"Topbar-module_dropdownItemCode__cUAn6","dropdownItemName":"Topbar-module_dropdownItemName__MYw3k","noResults":"Topbar-module_noResults__PkNfT","actions":"Topbar-module_actions__KtaiZ"};
|
|
1186
1186
|
|
|
1187
1187
|
/**
|
|
1188
1188
|
* Topbar component for the main header.
|
|
@@ -1193,7 +1193,7 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
1193
1193
|
const [searchQuery, setSearchQuery] = useState('');
|
|
1194
1194
|
const dropdownRef = useRef(null);
|
|
1195
1195
|
const searchInputRef = useRef(null);
|
|
1196
|
-
const classNames = [styles$
|
|
1196
|
+
const classNames = [styles$x.topbar, className].filter(Boolean).join(' ');
|
|
1197
1197
|
// Close dropdown on outside click
|
|
1198
1198
|
useEffect(() => {
|
|
1199
1199
|
if (!isOpen)
|
|
@@ -1242,27 +1242,27 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
1242
1242
|
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
1243
1243
|
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
1244
1244
|
const hasDropdown = accounts && accounts.length > 0;
|
|
1245
|
-
return (jsxs("header", { className: classNames, ...props, children: [jsxs("div", { className: styles$
|
|
1245
|
+
return (jsxs("header", { className: classNames, ...props, children: [jsxs("div", { className: styles$x.left, children: [leftContent, account && (jsxs("div", { className: styles$x.accountWrapper, ref: dropdownRef, children: [jsxs("button", { className: `${styles$x.accountSelector} ${isOpen ? styles$x.open : ''}`, onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsx("span", { className: styles$x.accountCode, children: account.code }), jsx("span", { className: styles$x.accountName, children: account.name }), hasDropdown && (jsx(ChevronDownIcon$1, { size: 16, className: `${styles$x.chevron} ${isOpen ? styles$x.chevronOpen : ''}` }))] }), isOpen && hasDropdown && (jsxs("div", { className: styles$x.dropdown, role: "listbox", children: [jsxs("div", { className: styles$x.dropdownSearch, children: [jsxs("svg", { className: styles$x.searchIcon, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "11", cy: "11", r: "8" }), jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsx("input", { ref: searchInputRef, type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search accounts...", className: styles$x.searchInput })] }), jsx("div", { className: styles$x.dropdownList, children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxs("button", { className: `${styles$x.dropdownItem} ${acc.code === account.code ? styles$x.selected : ''}`, onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsx("span", { className: styles$x.dropdownItemCode, children: acc.code }), jsx("span", { className: styles$x.dropdownItemName, children: acc.name })] }, acc.code)))) : (jsx("div", { className: styles$x.noResults, children: "No accounts found" })) })] }))] }))] }), actions && jsx("div", { className: styles$x.actions, children: actions })] }));
|
|
1246
1246
|
};
|
|
1247
1247
|
Topbar.displayName = 'Topbar';
|
|
1248
1248
|
|
|
1249
|
-
var styles$
|
|
1249
|
+
var styles$w = {"appLayout":"AppLayout-module_appLayout__NFbZk","mainArea":"AppLayout-module_mainArea__t-6oq","content":"AppLayout-module_content__5kV7S"};
|
|
1250
1250
|
|
|
1251
1251
|
const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account, defaultExpanded = true, onNavItemClick, onAccountClick, children, navFooter, topbarActions, className, }) => {
|
|
1252
|
-
return (jsxs("div", { className: `${styles$
|
|
1252
|
+
return (jsxs("div", { className: `${styles$w.appLayout} ${className || ''}`, children: [jsx(Sidenav, { items: navItems, activeKey: activeNavKey, defaultExpanded: defaultExpanded, onItemClick: onNavItemClick, logo: logo, logoCollapsed: collapsedLogo, footer: navFooter }), jsxs("div", { className: styles$w.mainArea, children: [jsx(Topbar, { account: account, onAccountClick: onAccountClick, actions: topbarActions }), jsx("main", { className: styles$w.content, children: children })] })] }));
|
|
1253
1253
|
};
|
|
1254
1254
|
|
|
1255
|
-
var styles$
|
|
1255
|
+
var styles$v = {"card":"Card-module_card__Ak6-W","default":"Card-module_default__e-M3H","bordered":"Card-module_bordered__pUL4k","elevated":"Card-module_elevated__8f-WS","interactive":"Card-module_interactive__6B4fH","padding-none":"Card-module_padding-none__c1qKN","padding-sm":"Card-module_padding-sm__Uejon","padding-md":"Card-module_padding-md__kR4F9","padding-lg":"Card-module_padding-lg__MleX9","header":"Card-module_header__NiVTV","headerContent":"Card-module_headerContent__LyJRB","title":"Card-module_title__3DN1v","subtitle":"Card-module_subtitle__gE5L-","actions":"Card-module_actions__gHmpq","body":"Card-module_body__BU4oo","footer":"Card-module_footer__zjjTd"};
|
|
1256
1256
|
|
|
1257
1257
|
/**
|
|
1258
1258
|
* Card component for grouping related content.
|
|
1259
1259
|
*/
|
|
1260
1260
|
const Card = forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
1261
1261
|
const classNames = [
|
|
1262
|
-
styles$
|
|
1263
|
-
styles$
|
|
1264
|
-
styles$
|
|
1265
|
-
interactive ? styles$
|
|
1262
|
+
styles$v.card,
|
|
1263
|
+
styles$v[variant],
|
|
1264
|
+
styles$v[`padding-${padding}`],
|
|
1265
|
+
interactive ? styles$v.interactive : '',
|
|
1266
1266
|
className,
|
|
1267
1267
|
]
|
|
1268
1268
|
.filter(Boolean)
|
|
@@ -1271,22 +1271,22 @@ const Card = forwardRef(({ variant = 'default', padding = 'md', interactive = fa
|
|
|
1271
1271
|
});
|
|
1272
1272
|
Card.displayName = 'Card';
|
|
1273
1273
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
1274
|
-
const classNames = [styles$
|
|
1275
|
-
return (jsxs("div", { className: classNames, ...props, children: [jsxs("div", { className: styles$
|
|
1274
|
+
const classNames = [styles$v.header, className].filter(Boolean).join(' ');
|
|
1275
|
+
return (jsxs("div", { className: classNames, ...props, children: [jsxs("div", { className: styles$v.headerContent, children: [title && jsx("h3", { className: styles$v.title, children: title }), subtitle && jsx("p", { className: styles$v.subtitle, children: subtitle }), children] }), actions && jsx("div", { className: styles$v.actions, children: actions })] }));
|
|
1276
1276
|
};
|
|
1277
1277
|
CardHeader.displayName = 'CardHeader';
|
|
1278
1278
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
1279
|
-
const classNames = [styles$
|
|
1279
|
+
const classNames = [styles$v.body, className].filter(Boolean).join(' ');
|
|
1280
1280
|
return (jsx("div", { className: classNames, ...props, children: children }));
|
|
1281
1281
|
};
|
|
1282
1282
|
CardBody.displayName = 'CardBody';
|
|
1283
1283
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
1284
|
-
const classNames = [styles$
|
|
1284
|
+
const classNames = [styles$v.footer, className].filter(Boolean).join(' ');
|
|
1285
1285
|
return (jsx("div", { className: classNames, ...props, children: children }));
|
|
1286
1286
|
};
|
|
1287
1287
|
CardFooter.displayName = 'CardFooter';
|
|
1288
1288
|
|
|
1289
|
-
var styles$
|
|
1289
|
+
var styles$u = {"container":"ContactList-module_container__1kjze","alert":"ContactList-module_alert__KC0tz","card":"ContactList-module_card__TOyp2","header":"ContactList-module_header__QysLx","titleRow":"ContactList-module_titleRow__tUDMS","title":"ContactList-module_title__R-IOd","tooltip":"ContactList-module_tooltip__DDMka","list":"ContactList-module_list__6tjo-","contactItem":"ContactList-module_contactItem__4SoW-","contactInfo":"ContactList-module_contactInfo__6cQpi","contactName":"ContactList-module_contactName__z748K","badge":"ContactList-module_badge__USFpb","badgeSecondary":"ContactList-module_badgeSecondary__OSwqF","contactRole":"ContactList-module_contactRole__6kfuQ","contactDetails":"ContactList-module_contactDetails__ihY0M","contactLink":"ContactList-module_contactLink__sWGp9","contactPhone":"ContactList-module_contactPhone__dUn6z","contactActions":"ContactList-module_contactActions__6WT-z","actionButton":"ContactList-module_actionButton__aPnGZ","actionButtonDanger":"ContactList-module_actionButtonDanger__yRBz0","empty":"ContactList-module_empty__bRTDB","footer":"ContactList-module_footer__18gB-","addButton":"ContactList-module_addButton__STUhp"};
|
|
1290
1290
|
|
|
1291
1291
|
const InfoIcon = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "12", cy: "12", r: "10" }), jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }), jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })] }));
|
|
1292
1292
|
const EditIcon$1 = () => (jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), jsx("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })] }));
|
|
@@ -1297,18 +1297,18 @@ const PlusIcon$1 = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0
|
|
|
1297
1297
|
*/
|
|
1298
1298
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
1299
1299
|
const listClasses = [
|
|
1300
|
-
styles$
|
|
1300
|
+
styles$u.container,
|
|
1301
1301
|
className,
|
|
1302
1302
|
].filter(Boolean).join(' ');
|
|
1303
|
-
return (jsxs("div", { className: listClasses, children: [alert && (jsx("div", { className: styles$
|
|
1303
|
+
return (jsxs("div", { className: listClasses, children: [alert && (jsx("div", { className: styles$u.alert, children: alert })), jsxs("div", { className: styles$u.card, children: [jsx("div", { className: styles$u.header, children: jsxs("div", { className: styles$u.titleRow, children: [jsx("h3", { className: styles$u.title, children: title }), tooltip && (jsx("span", { className: styles$u.tooltip, children: jsx(InfoIcon, {}) }))] }) }), jsxs("div", { className: styles$u.list, children: [contacts.map((contact) => (jsxs("div", { className: styles$u.contactItem, children: [jsxs("div", { className: styles$u.contactInfo, children: [jsxs("div", { className: styles$u.contactName, children: [contact.name, contact.isPrimary && (jsx("span", { className: styles$u.badge, children: "Primary" })), contact.isSecondary && (jsx("span", { className: `${styles$u.badge} ${styles$u.badgeSecondary}`, children: "Secondary" }))] }), contact.role && (jsx("div", { className: styles$u.contactRole, children: contact.role })), jsxs("div", { className: styles$u.contactDetails, children: [contact.email && (jsx("a", { href: `mailto:${contact.email}`, className: styles$u.contactLink, children: contact.email })), contact.phone && (jsx("span", { className: styles$u.contactPhone, children: contact.phone }))] })] }), jsxs("div", { className: styles$u.contactActions, children: [onEdit && (jsx("button", { type: "button", className: styles$u.actionButton, onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsx(EditIcon$1, {}) })), onRemove && (jsx("button", { type: "button", className: `${styles$u.actionButton} ${styles$u.actionButtonDanger}`, onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsx("div", { className: styles$u.empty, children: "No contacts added" }))] }), showAdd && onAdd && (jsx("div", { className: styles$u.footer, children: jsxs("button", { type: "button", className: styles$u.addButton, onClick: onAdd, children: [jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
1304
1304
|
};
|
|
1305
1305
|
ContactList.displayName = 'ContactList';
|
|
1306
1306
|
|
|
1307
|
-
var styles$
|
|
1307
|
+
var styles$t = {"container":"Drawer-module_container__hXuOY","backdrop":"Drawer-module_backdrop__MIipQ","fadeIn":"Drawer-module_fadeIn__QsuvQ","backdropOpen":"Drawer-module_backdropOpen__YpH--","drawer":"Drawer-module_drawer__EHbbs","right":"Drawer-module_right__x6P6Q","drawerOpen":"Drawer-module_drawerOpen__KTgFg","left":"Drawer-module_left__aVF9t","top":"Drawer-module_top__wuvhi","bottom":"Drawer-module_bottom__rt-VZ","sizeSm":"Drawer-module_sizeSm__LFrm3","sizeMd":"Drawer-module_sizeMd__A1QTQ","sizeLg":"Drawer-module_sizeLg__6laD8","sizeXl":"Drawer-module_sizeXl__FY9mZ","sizeFull":"Drawer-module_sizeFull__BGQ1q","header":"Drawer-module_header__MpR14","headerContent":"Drawer-module_headerContent__dFcLH","title":"Drawer-module_title__0AmOX","closeButton":"Drawer-module_closeButton__VuXsE","body":"Drawer-module_body__GLUGo","footer":"Drawer-module_footer__K5ekS"};
|
|
1308
1308
|
|
|
1309
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxs("div", { className: `${styles$
|
|
1310
|
-
const DrawerBody = ({ children, className = '' }) => (jsx("div", { className: `${styles$
|
|
1311
|
-
const DrawerFooter = ({ children, className = '' }) => (jsx("div", { className: `${styles$
|
|
1309
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxs("div", { className: `${styles$t.header} ${className}`, children: [jsxs("div", { className: styles$t.headerContent, children: [title && jsx("h2", { className: styles$t.title, children: title }), children] }), showClose && (jsx("button", { type: "button", className: styles$t.closeButton, onClick: onClose, "aria-label": "Close drawer", children: jsx("svg", { width: "20", height: "20", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] }));
|
|
1310
|
+
const DrawerBody = ({ children, className = '' }) => (jsx("div", { className: `${styles$t.body} ${className}`, children: children }));
|
|
1311
|
+
const DrawerFooter = ({ children, className = '' }) => (jsx("div", { className: `${styles$t.footer} ${className}`, children: children }));
|
|
1312
1312
|
const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, closeOnBackdropClick = true, closeOnEscape = true, showBackdrop = true, className = '', }) => {
|
|
1313
1313
|
const handleEscape = useCallback((e) => {
|
|
1314
1314
|
if (closeOnEscape && e.key === 'Escape') {
|
|
@@ -1332,7 +1332,7 @@ const Drawer = ({ isOpen, onClose, position = 'right', size = 'md', children, cl
|
|
|
1332
1332
|
};
|
|
1333
1333
|
if (!isOpen)
|
|
1334
1334
|
return null;
|
|
1335
|
-
return (jsxs("div", { className: styles$
|
|
1335
|
+
return (jsxs("div", { className: styles$t.container, children: [showBackdrop && (jsx("div", { className: `${styles$t.backdrop} ${isOpen ? styles$t.backdropOpen : ''}`, onClick: handleBackdropClick })), jsx("div", { className: `${styles$t.drawer} ${styles$t[position]} ${styles$t[`size${size.charAt(0).toUpperCase()}${size.slice(1)}`]} ${isOpen ? styles$t.drawerOpen : ''} ${className}`, role: "dialog", "aria-modal": "true", children: React.Children.map(children, (child) => {
|
|
1336
1336
|
if (React.isValidElement(child) && child.type === DrawerHeader) {
|
|
1337
1337
|
return React.cloneElement(child, {
|
|
1338
1338
|
onClose,
|
|
@@ -1345,7 +1345,7 @@ Drawer.Header = DrawerHeader;
|
|
|
1345
1345
|
Drawer.Body = DrawerBody;
|
|
1346
1346
|
Drawer.Footer = DrawerFooter;
|
|
1347
1347
|
|
|
1348
|
-
var styles$
|
|
1348
|
+
var styles$s = {"drawer":"DueDatesDrawer-module_drawer__TqC4Q","open":"DueDatesDrawer-module_open__Yblf3","body":"DueDatesDrawer-module_body__OwwF-","search":"DueDatesDrawer-module_search__g7-Rl","cards":"DueDatesDrawer-module_cards__bFG90","empty":"DueDatesDrawer-module_empty__K2ULN","card":"DueDatesDrawer-module_card__4Os-5","cardTitle":"DueDatesDrawer-module_cardTitle__fU-cP","status":"DueDatesDrawer-module_status__dXifz","completed":"DueDatesDrawer-module_completed__jWoYi","pastDue":"DueDatesDrawer-module_pastDue__TSikC","tags":"DueDatesDrawer-module_tags__8P87y","completion":"DueDatesDrawer-module_completion__mIrWm"};
|
|
1349
1349
|
|
|
1350
1350
|
const isTravelDueDateCompleted = (item) => item.status.trim().toLowerCase() === 'completed' || !!item.completeddatetime;
|
|
1351
1351
|
const parseLocalDate$1 = (value) => {
|
|
@@ -1361,7 +1361,7 @@ const DueDateCard = ({ item, onToggle, onTaskClick }) => {
|
|
|
1361
1361
|
const completed = isTravelDueDateCompleted(item);
|
|
1362
1362
|
const dueDate = parseLocalDate$1(item.duedate);
|
|
1363
1363
|
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
1364
|
-
return (jsxs("article", { className: styles$
|
|
1364
|
+
return (jsxs("article", { className: styles$s.card, children: [jsxs("div", { className: styles$s.cardTitle, children: [jsx("button", { type: "button", "aria-label": `${completed ? 'Reopen' : 'Complete'} ${item.tasktitle}`, className: [styles$s.status, completed ? styles$s.completed : pastDue ? styles$s.pastDue : ''].filter(Boolean).join(' '), onClick: () => onToggle?.(item), children: completed ? jsx(CheckIcon$2, { size: 12 }) : null }), jsx("h5", { children: item.tasktitle })] }), item.description && jsx("p", { children: item.description }), jsxs("div", { className: styles$s.tags, children: [jsx("span", { style: { backgroundColor: sportColor(item.sportCode) }, children: item.sportCode }), jsx("button", { type: "button", disabled: !item.masterTripGUID || !onTaskClick, onClick: () => item.masterTripGUID && onTaskClick?.(item.masterTripGUID), children: item.tripName })] }), completed && item.completeddatetime && jsxs("div", { className: styles$s.completion, children: [jsx(CheckIcon$2, { size: 14 }), jsxs("span", { children: [jsx("em", { children: "on" }), " ", formatDate$2(item.completeddatetime, { month: 'numeric', day: 'numeric', year: '2-digit' }), " ", jsx("em", { children: "by" }), " ", item.completedby] })] })] }));
|
|
1365
1365
|
};
|
|
1366
1366
|
/** Hub's searchable, status-aware due-dates drawer. */
|
|
1367
1367
|
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
@@ -1373,10 +1373,10 @@ const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, onClose,
|
|
|
1373
1373
|
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)));
|
|
1374
1374
|
return matches.length ? [[date, matches]] : [];
|
|
1375
1375
|
})), [dueDates, search, selectedDate, selectedTrip]);
|
|
1376
|
-
return (jsxs("aside", { className: [styles$
|
|
1376
|
+
return (jsxs("aside", { className: [styles$s.drawer, isOpen ? styles$s.open : '', className].filter(Boolean).join(' '), "aria-hidden": !isOpen, "aria-label": "Due Dates", children: [jsxs("header", { children: [jsx("h3", { children: "Due Dates" }), jsx("button", { type: "button", "aria-label": "Close due dates", onClick: onClose, children: jsx(CloseIcon, { size: 24 }) })] }), jsxs("div", { className: styles$s.body, children: [jsxs("label", { className: styles$s.search, children: [jsx(SearchIcon$1, { size: 16 }), jsx("input", { type: "search", placeholder: "Search", value: search, onChange: (event) => setSearch(event.target.value) })] }), !Object.keys(filtered).length ? jsx("div", { className: styles$s.empty, children: "No due dates found." }) : Object.entries(filtered).map(([date, items]) => (jsxs("section", { children: [jsx("h4", { children: formatDate$2(date, { month: 'long', day: 'numeric', year: 'numeric' }) }), jsx("div", { className: styles$s.cards, children: items.map((item) => jsx(DueDateCard, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
1377
1377
|
};
|
|
1378
1378
|
|
|
1379
|
-
var styles$
|
|
1379
|
+
var styles$r = {"container":"MembershipPrograms-module_container__qsGZu","loading":"MembershipPrograms-module_loading__tjDtr","alert":"MembershipPrograms-module_alert__GZc0f","header":"MembershipPrograms-module_header__ywXOE","title":"MembershipPrograms-module_title__WZGyt","addButton":"MembershipPrograms-module_addButton__rNlNb","empty":"MembershipPrograms-module_empty__pYrHW","list":"MembershipPrograms-module_list__8A9MG","group":"MembershipPrograms-module_group__v1Vc6","groupHeader":"MembershipPrograms-module_groupHeader__I5KJO","groupIcon":"MembershipPrograms-module_groupIcon__e1LIq","groupLabel":"MembershipPrograms-module_groupLabel__Wqift","programs":"MembershipPrograms-module_programs__hxHXQ","program":"MembershipPrograms-module_program__S3HTM","programInfo":"MembershipPrograms-module_programInfo__RJruG","programProvider":"MembershipPrograms-module_programProvider__c7enz","programName":"MembershipPrograms-module_programName__TN42s","programNumber":"MembershipPrograms-module_programNumber__GKav4","programStatus":"MembershipPrograms-module_programStatus__2imvX","programActions":"MembershipPrograms-module_programActions__36LkY","actionButton":"MembershipPrograms-module_actionButton__y-GI4","removeButton":"MembershipPrograms-module_removeButton__cTTuZ"};
|
|
1380
1380
|
|
|
1381
1381
|
const PlaneIcon$2 = () => (jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: 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" }) }));
|
|
1382
1382
|
const HotelIcon$2 = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("path", { d: "M3 21h18" }), jsx("path", { d: "M19 21V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v16" }), jsx("path", { d: "M9 21v-4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v4" })] }));
|
|
@@ -1402,8 +1402,8 @@ const TYPE_LABELS = {
|
|
|
1402
1402
|
*/
|
|
1403
1403
|
const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, onRemove, onAdd, alert, isLoading = false, emptyMessage = 'No membership programs added', className = '', }) => {
|
|
1404
1404
|
const containerClasses = [
|
|
1405
|
-
styles$
|
|
1406
|
-
isLoading ? styles$
|
|
1405
|
+
styles$r.container,
|
|
1406
|
+
isLoading ? styles$r.loading : '',
|
|
1407
1407
|
className,
|
|
1408
1408
|
].filter(Boolean).join(' ');
|
|
1409
1409
|
const groupedPrograms = programs.reduce((acc, program) => {
|
|
@@ -1414,30 +1414,30 @@ const MembershipPrograms = ({ title = 'Membership Programs', programs, onEdit, o
|
|
|
1414
1414
|
return acc;
|
|
1415
1415
|
}, {});
|
|
1416
1416
|
const typeOrder = ['airline', 'hotel', 'car', 'other'];
|
|
1417
|
-
return (jsxs("div", { className: containerClasses, children: [alert && jsx("div", { className: styles$
|
|
1417
|
+
return (jsxs("div", { className: containerClasses, children: [alert && jsx("div", { className: styles$r.alert, children: alert }), jsxs("div", { className: styles$r.header, children: [jsx("h2", { className: styles$r.title, children: title }), onAdd && (jsxs("button", { type: "button", className: styles$r.addButton, onClick: onAdd, "aria-label": "Add membership program", children: [jsx(PlusIcon, {}), jsx("span", { children: "Add Program" })] }))] }), programs.length === 0 ? (jsx("div", { className: styles$r.empty, children: jsx("p", { children: emptyMessage }) })) : (jsx("div", { className: styles$r.list, children: typeOrder.map((type) => {
|
|
1418
1418
|
const typePrograms = groupedPrograms[type];
|
|
1419
1419
|
if (!typePrograms || typePrograms.length === 0)
|
|
1420
1420
|
return null;
|
|
1421
|
-
return (jsxs("div", { className: styles$
|
|
1421
|
+
return (jsxs("div", { className: styles$r.group, children: [jsxs("div", { className: styles$r.groupHeader, children: [jsx("span", { className: styles$r.groupIcon, children: TYPE_ICONS[type] }), jsx("span", { className: styles$r.groupLabel, children: TYPE_LABELS[type] })] }), jsx("div", { className: styles$r.programs, children: typePrograms.map((program) => (jsxs("div", { className: styles$r.program, children: [jsxs("div", { className: styles$r.programInfo, children: [jsx("div", { className: styles$r.programProvider, children: program.provider }), program.programName && (jsx("div", { className: styles$r.programName, children: program.programName })), jsx("div", { className: styles$r.programNumber, children: program.membershipNumber }), program.status && (jsx("div", { className: styles$r.programStatus, children: program.status }))] }), jsxs("div", { className: styles$r.programActions, children: [onEdit && (jsx("button", { type: "button", className: styles$r.actionButton, onClick: () => onEdit(program), "aria-label": `Edit ${program.provider} program`, children: jsx(EditIcon, {}) })), onRemove && (jsx("button", { type: "button", className: [styles$r.actionButton, styles$r.removeButton].join(' '), onClick: () => onRemove(program), "aria-label": `Remove ${program.provider} program`, children: jsx(TrashIcon, {}) }))] })] }, program.id))) })] }, type));
|
|
1422
1422
|
}) }))] }));
|
|
1423
1423
|
};
|
|
1424
1424
|
MembershipPrograms.displayName = 'MembershipPrograms';
|
|
1425
1425
|
|
|
1426
|
-
var styles$
|
|
1426
|
+
var styles$q = {"stats":"ManifestCapacityStats-module_stats__BA5-o","stat":"ManifestCapacityStats-module_stat__qLJtb","labelRow":"ManifestCapacityStats-module_labelRow__iDQqn","label":"ManifestCapacityStats-module_label__5BRoZ","value":"ManifestCapacityStats-module_value__4hiE5","sub":"ManifestCapacityStats-module_sub__w7djZ","warningText":"ManifestCapacityStats-module_warningText__CZZ9a","warningIcon":"ManifestCapacityStats-module_warningIcon__NoXmW","alertIcon":"ManifestCapacityStats-module_alertIcon__h0QHJ","meter":"ManifestCapacityStats-module_meter__DrUuq","meterFill":"ManifestCapacityStats-module_meterFill__v7zKW","meterOver":"ManifestCapacityStats-module_meterOver__UqigI","alert":"ManifestCapacityStats-module_alert__vwkBX"};
|
|
1427
1427
|
|
|
1428
1428
|
const Stat = ({ label, value, sub, meterValue, meterMax, warn = false }) => {
|
|
1429
1429
|
const ratio = meterMax > 0 ? Math.min(100, Math.max(0, (meterValue / meterMax) * 100)) : 0;
|
|
1430
|
-
return (jsxs("div", { className: styles$
|
|
1430
|
+
return (jsxs("div", { className: styles$q.stat, children: [jsxs("div", { className: styles$q.labelRow, children: [jsx("span", { className: styles$q.label, children: label }), warn && jsx(WarningIcon$1, { size: 14, className: styles$q.warningIcon, "aria-label": `${label} warning` })] }), jsx("div", { className: [styles$q.value, warn ? styles$q.warningText : ''].filter(Boolean).join(' '), children: value }), jsx("div", { className: styles$q.sub, children: sub }), jsx("div", { className: styles$q.meter, "aria-hidden": "true", children: jsx("span", { className: [styles$q.meterFill, warn ? styles$q.meterOver : ''].filter(Boolean).join(' '), style: { width: `${ratio}%` } }) })] }));
|
|
1431
1431
|
};
|
|
1432
1432
|
/** Advisory seat and payload meters from Hub's charter manifest. */
|
|
1433
1433
|
const ManifestCapacityStats = ({ paxCount, seats, paxWeight, cargoWeight, payloadLimit, className = '', }) => {
|
|
1434
1434
|
const totalWeight = paxWeight + cargoWeight;
|
|
1435
1435
|
const overSeats = seats > 0 && paxCount > seats;
|
|
1436
1436
|
const overPayload = payloadLimit > 0 && totalWeight > payloadLimit;
|
|
1437
|
-
return (jsxs("div", { className: className, children: [jsxs("div", { className: styles$
|
|
1437
|
+
return (jsxs("div", { className: className, children: [jsxs("div", { className: styles$q.stats, children: [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 }), jsx(Stat, { label: "Passenger weight", value: `${paxWeight.toLocaleString()} lb`, sub: `${paxCount} passengers`, meterValue: paxWeight, meterMax: payloadLimit }), jsx(Stat, { label: "Cargo weight", value: `${cargoWeight.toLocaleString()} lb`, sub: "Equipment + bags", meterValue: cargoWeight, meterMax: payloadLimit }), 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) && (jsxs("div", { className: styles$q.alert, role: "alert", children: [jsx(WarningIcon$1, { size: 20, className: styles$q.alertIcon }), jsxs("div", { children: [overSeats && (jsxs("div", { children: [jsx("strong", { children: "Over seat capacity." }), " Remove ", paxCount - seats, " passenger(s) or split the manifest by segment."] })), overPayload && (jsxs("div", { children: [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."] }))] })] }))] }));
|
|
1438
1438
|
};
|
|
1439
1439
|
|
|
1440
|
-
var styles$
|
|
1440
|
+
var styles$p = {"overlay":"Modal-module_overlay__n7Paz","fadeIn":"Modal-module_fadeIn__upWKg","modal":"Modal-module_modal__YZQ-K","slideIn":"Modal-module_slideIn__mtAFr","sm":"Modal-module_sm__QSWSJ","md":"Modal-module_md__6t9J8","lg":"Modal-module_lg__5r3uQ","xl":"Modal-module_xl__JPpjn","full":"Modal-module_full__y9leS","header":"Modal-module_header__xTw6j","title":"Modal-module_title__KvPHy","closeButton":"Modal-module_closeButton__JoRui","body":"Modal-module_body__K3swC","footer":"Modal-module_footer__Z1UcB","footerButtons":"Modal-module_footerButtons__u-Ayv","confirmMessage":"Modal-module_confirmMessage__ZlKV8"};
|
|
1441
1441
|
|
|
1442
1442
|
const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton = true, closeOnBackdropClick = true, closeOnEscape = true, footer, className = '', }) => {
|
|
1443
1443
|
const handleEscape = useCallback((e) => {
|
|
@@ -1462,12 +1462,12 @@ const Modal = ({ isOpen, onClose, title, children, size = 'md', showCloseButton
|
|
|
1462
1462
|
};
|
|
1463
1463
|
if (!isOpen)
|
|
1464
1464
|
return null;
|
|
1465
|
-
return (jsx("div", { className: styles$
|
|
1465
|
+
return (jsx("div", { className: styles$p.overlay, onClick: handleBackdropClick, children: jsxs("div", { className: `${styles$p.modal} ${styles$p[size]} ${className}`, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? 'modal-title' : undefined, children: [(title || showCloseButton) && (jsxs("div", { className: styles$p.header, children: [title && (jsx("h2", { id: "modal-title", className: styles$p.title, children: title })), showCloseButton && (jsx("button", { type: "button", className: styles$p.closeButton, onClick: onClose, "aria-label": "Close modal", children: jsx("svg", { width: "20", height: "20", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] })), jsx("div", { className: styles$p.body, children: children }), footer && jsx("div", { className: styles$p.footer, children: footer })] }) }));
|
|
1466
1466
|
};
|
|
1467
|
-
const ModalFooter = ({ children, className = '' }) => (jsx("div", { className: `${styles$
|
|
1468
|
-
const ConfirmModal = ({ message, confirmText = 'Confirm', cancelText = 'Cancel', onConfirm, onClose, destructive = false, loading = false, ...props }) => (jsx(Modal, { ...props, onClose: onClose, size: "sm", footer: jsxs(ModalFooter, { children: [jsx(Button, { variant: "secondary", onClick: onClose, children: cancelText }), jsx(Button, { variant: destructive ? 'danger' : 'primary', onClick: onConfirm, disabled: loading, children: loading ? 'Loading...' : confirmText })] }), children: jsx("div", { className: styles$
|
|
1467
|
+
const ModalFooter = ({ children, className = '' }) => (jsx("div", { className: `${styles$p.footerButtons} ${className}`, children: children }));
|
|
1468
|
+
const ConfirmModal = ({ message, confirmText = 'Confirm', cancelText = 'Cancel', onConfirm, onClose, destructive = false, loading = false, ...props }) => (jsx(Modal, { ...props, onClose: onClose, size: "sm", footer: jsxs(ModalFooter, { children: [jsx(Button, { variant: "secondary", onClick: onClose, children: cancelText }), jsx(Button, { variant: destructive ? 'danger' : 'primary', onClick: onConfirm, disabled: loading, children: loading ? 'Loading...' : confirmText })] }), children: jsx("div", { className: styles$p.confirmMessage, children: message }) }));
|
|
1469
1469
|
|
|
1470
|
-
var styles$
|
|
1470
|
+
var styles$o = {"module":"Module-module_module__1Lglz","header":"Module-module_header__-qP6m","closed":"Module-module_closed__J5FYJ","sm":"Module-module_sm__g-iVI","md":"Module-module_md__zmKQE","lg":"Module-module_lg__5uVgV","titleRow":"Module-module_titleRow__3upJc","icon":"Module-module_icon__MXVy7","iconSpaced":"Module-module_iconSpaced__O8F0i","title":"Module-module_title__Qdyv0","badge":"Module-module_badge__zoNEC","tools":"Module-module_tools__w6Z1b","toggleBtn":"Module-module_toggleBtn__VxH2u","bodyWrapper":"Module-module_bodyWrapper__IogVT","body":"Module-module_body__O9n9B","hidden":"Module-module_hidden__mmUYg","footer":"Module-module_footer__hrUY9","divider":"Module-module_divider__YQKdf","dark":"Module-module_dark__w8Fb-","verticalDivider":"Module-module_verticalDivider__t3g-3"};
|
|
1471
1471
|
|
|
1472
1472
|
const ChevronIcon = ({ direction }) => (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: jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
1473
1473
|
/**
|
|
@@ -1489,19 +1489,19 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
1489
1489
|
setOpen(!open);
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
|
-
return (jsxs("div", { className: `${styles$
|
|
1492
|
+
return (jsxs("div", { className: `${styles$o.module} ${className}`, children: [title && (jsx("div", { className: `${styles$o.header} ${styles$o[size]} ${!open ? styles$o.closed : ''} ${headerClassName}`, children: jsxs("div", { className: `${styles$o.titleRow} ${styles$o[size]} ${titleClassName}`, children: [icon && (jsx("span", { className: `${styles$o.icon} ${size === 'sm' ? '' : styles$o.iconSpaced} ${iconClassName}`, children: icon })), jsx("span", { className: styles$o.title, children: title }), badge && jsx("span", { className: styles$o.badge, children: badge }), jsxs("div", { className: styles$o.tools, children: [tools, useToggle && (jsx("button", { type: "button", className: styles$o.toggleBtn, onClick: handleToggle, "aria-expanded": open, children: jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxs("div", { className: styles$o.bodyWrapper, children: [before, jsx("div", { className: `${styles$o.body} ${styles$o[size]} ${!open ? styles$o.hidden : ''} ${bodyClassName}`, children: children }), after] }), footer && (jsx("div", { className: `${styles$o.footer} ${!open ? styles$o.hidden : ''}`, children: footer }))] }));
|
|
1493
1493
|
};
|
|
1494
1494
|
/**
|
|
1495
1495
|
* Horizontal divider for Module content
|
|
1496
1496
|
*/
|
|
1497
|
-
const ModuleDivider = ({ dark = false, className = '' }) => (jsx("hr", { className: `${styles$
|
|
1497
|
+
const ModuleDivider = ({ dark = false, className = '' }) => (jsx("hr", { className: `${styles$o.divider} ${dark ? styles$o.dark : ''} ${className}` }));
|
|
1498
1498
|
/**
|
|
1499
1499
|
* Vertical divider for Module content
|
|
1500
1500
|
*/
|
|
1501
|
-
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsx("div", { className: `${styles$
|
|
1501
|
+
const ModuleVerticalDivider = ({ dark = false, className = '' }) => (jsx("div", { className: `${styles$o.verticalDivider} ${dark ? styles$o.dark : ''} ${className}` }));
|
|
1502
1502
|
Module.displayName = 'Module';
|
|
1503
1503
|
|
|
1504
|
-
var styles$
|
|
1504
|
+
var styles$n = {"stack":"PageBanners-module_stack__v6nwz","banner":"PageBanners-module_banner__8lgnU","system":"PageBanners-module_system__Xiqoe","alert":"PageBanners-module_alert__O2lYb","systemIcon":"PageBanners-module_systemIcon__su3aG","alertIcon":"PageBanners-module_alertIcon__owy3V","alertTitle":"PageBanners-module_alertTitle__zeo3d","alertDismiss":"PageBanners-module_alertDismiss__2JI9V","content":"PageBanners-module_content__ZHLA9","title":"PageBanners-module_title__-53EA","detail":"PageBanners-module_detail__xgNJE","clamp":"PageBanners-module_clamp__iWIIp","alertLink":"PageBanners-module_alertLink__mxQM5","dismiss":"PageBanners-module_dismiss__aWRXw"};
|
|
1505
1505
|
|
|
1506
1506
|
const decodeEntities = (value) => {
|
|
1507
1507
|
if (typeof document === 'undefined')
|
|
@@ -1528,13 +1528,13 @@ const PageBanners = ({ systemBanners, alertBanners, className = '', }) => {
|
|
|
1528
1528
|
const visibleAlerts = alertBanners.filter((banner) => !dismissed.has(banner.id));
|
|
1529
1529
|
if (!visibleSystem.length && !visibleAlerts.length)
|
|
1530
1530
|
return null;
|
|
1531
|
-
return (jsxs("div", { className: [styles$
|
|
1532
|
-
const content = (jsxs("div", { className: styles$
|
|
1533
|
-
return (jsxs("div", { className: [styles$
|
|
1531
|
+
return (jsxs("div", { className: [styles$n.stack, className].filter(Boolean).join(' '), role: "region", "aria-label": "Page notices", children: [visibleSystem.map((banner) => (jsxs("div", { className: [styles$n.banner, styles$n.system].join(' '), role: "status", children: [jsx(InfoIcon$1, { className: styles$n.systemIcon, size: 20, "aria-hidden": "true" }), jsxs("div", { className: styles$n.content, children: [jsx("p", { className: styles$n.title, dangerouslySetInnerHTML: { __html: banner.html } }), banner.detailHtml && (jsx("p", { className: styles$n.detail, dangerouslySetInnerHTML: { __html: banner.detailHtml } }))] }), jsx("button", { type: "button", className: styles$n.dismiss, "aria-label": "Dismiss notice", onClick: () => dismiss(banner.id), children: jsx(CloseIcon, { size: 16 }) })] }, banner.id))), visibleAlerts.map((banner) => {
|
|
1532
|
+
const content = (jsxs("div", { className: styles$n.content, children: [jsx("p", { className: [styles$n.title, styles$n.alertTitle].join(' '), children: decodeEntities(banner.title) }), banner.body && jsx("p", { className: [styles$n.detail, styles$n.clamp].join(' '), children: decodeEntities(banner.body) })] }));
|
|
1533
|
+
return (jsxs("div", { className: [styles$n.banner, styles$n.alert].join(' '), role: "alert", children: [jsx(WarningIcon$1, { className: styles$n.alertIcon, size: 20, "aria-hidden": "true" }), banner.href ? (jsx("a", { href: banner.href, className: styles$n.alertLink, children: content })) : (content), jsx("button", { type: "button", className: [styles$n.dismiss, styles$n.alertDismiss].join(' '), "aria-label": "Dismiss alert", onClick: () => dismiss(banner.id), children: jsx(CloseIcon, { size: 16 }) })] }, banner.id));
|
|
1534
1534
|
})] }));
|
|
1535
1535
|
};
|
|
1536
1536
|
|
|
1537
|
-
var styles$
|
|
1537
|
+
var styles$m = {"panel":"PreferencesPanel-module_panel__xsxcw","loading":"PreferencesPanel-module_loading__GopYy","alert":"PreferencesPanel-module_alert__9yYz3","title":"PreferencesPanel-module_title__Z5dpP","grid":"PreferencesPanel-module_grid__e0urP","section":"PreferencesPanel-module_section__6cbAx","sectionHeader":"PreferencesPanel-module_sectionHeader__X6e5h","sectionIcon":"PreferencesPanel-module_sectionIcon__jVJwn","sectionTitle":"PreferencesPanel-module_sectionTitle__29M-O","fields":"PreferencesPanel-module_fields__rryQ3","field":"PreferencesPanel-module_field__W3Z9z","fieldLabel":"PreferencesPanel-module_fieldLabel__usgRa","fieldValue":"PreferencesPanel-module_fieldValue__AEJ1C","fieldInput":"PreferencesPanel-module_fieldInput__rS8OR","footer":"PreferencesPanel-module_footer__qTYqi"};
|
|
1538
1538
|
|
|
1539
1539
|
const PlaneIcon$1 = () => (jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: 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" }) }));
|
|
1540
1540
|
const BusIcon$1 = () => (jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("rect", { x: "4", y: "4", width: "16", height: "14", rx: "2" }), jsx("path", { d: "M8 6v6" }), jsx("path", { d: "M16 6v6" }), jsx("circle", { cx: "8", cy: "16", r: "1" }), jsx("circle", { cx: "16", cy: "16", r: "1" })] }));
|
|
@@ -1549,15 +1549,15 @@ const DEFAULT_ICONS = {
|
|
|
1549
1549
|
*/
|
|
1550
1550
|
const PreferencesPanel = ({ title, sections, alert, footer, isLoading = false, className = '', }) => {
|
|
1551
1551
|
const panelClasses = [
|
|
1552
|
-
styles$
|
|
1553
|
-
isLoading ? styles$
|
|
1552
|
+
styles$m.panel,
|
|
1553
|
+
isLoading ? styles$m.loading : '',
|
|
1554
1554
|
className,
|
|
1555
1555
|
].filter(Boolean).join(' ');
|
|
1556
|
-
return (jsxs("div", { className: panelClasses, children: [alert && (jsx("div", { className: styles$
|
|
1556
|
+
return (jsxs("div", { className: panelClasses, children: [alert && (jsx("div", { className: styles$m.alert, children: alert })), title && jsx("h2", { className: styles$m.title, children: title }), jsx("div", { className: styles$m.grid, children: sections.map((section, i) => (jsxs("div", { className: styles$m.section, children: [jsxs("div", { className: styles$m.sectionHeader, children: [(section.icon || DEFAULT_ICONS[section.title.toLowerCase()]) && (jsx("span", { className: styles$m.sectionIcon, children: section.icon || DEFAULT_ICONS[section.title.toLowerCase()] })), jsx("h3", { className: styles$m.sectionTitle, children: section.title })] }), jsx("div", { className: styles$m.fields, children: section.fields.map((field, j) => (jsxs("div", { className: styles$m.field, children: [jsx("label", { className: styles$m.fieldLabel, children: field.label }), field.input ? (jsx("div", { className: styles$m.fieldInput, children: field.input })) : (jsx("div", { className: styles$m.fieldValue, children: field.value || '—' }))] }, j))) })] }, i))) }), footer && (jsx("div", { className: styles$m.footer, children: footer }))] }));
|
|
1557
1557
|
};
|
|
1558
1558
|
PreferencesPanel.displayName = 'PreferencesPanel';
|
|
1559
1559
|
|
|
1560
|
-
var styles$
|
|
1560
|
+
var styles$l = {"summary":"RequestSummary-module_summary__nxews","title":"RequestSummary-module_title__NAq53","submissionInfo":"RequestSummary-module_submissionInfo__dwkaf","label":"RequestSummary-module_label__pGo-5","value":"RequestSummary-module_value__F8m9g","sections":"RequestSummary-module_sections__uWXtM","section":"RequestSummary-module_section__TlxbY","sectionTitle":"RequestSummary-module_sectionTitle__iMPB2","segment":"RequestSummary-module_segment__xq-Lp","segmentTitle":"RequestSummary-module_segmentTitle__ey5-f","row":"RequestSummary-module_row__tfJzQ","empty":"RequestSummary-module_empty__fzxmd"};
|
|
1561
1561
|
|
|
1562
1562
|
/**
|
|
1563
1563
|
* SummaryItem component displays a single label-value pair.
|
|
@@ -1566,7 +1566,7 @@ const SummaryItemRow = ({ item, value }) => {
|
|
|
1566
1566
|
if (!value)
|
|
1567
1567
|
return null;
|
|
1568
1568
|
const formattedValue = item.format ? item.format(value) : String(value);
|
|
1569
|
-
return (jsxs("div", { className: styles$
|
|
1569
|
+
return (jsxs("div", { className: styles$l.row, children: [jsx("span", { className: styles$l.label, children: item.label }), jsx("span", { className: styles$l.value, children: formattedValue })] }));
|
|
1570
1570
|
};
|
|
1571
1571
|
/**
|
|
1572
1572
|
* SummarySection component for a group of related summary items.
|
|
@@ -1577,7 +1577,7 @@ const SummarySection = ({ section, values }) => {
|
|
|
1577
1577
|
const hasSegments = section.segments?.some(seg => seg.items.some(item => values[`${section.key}_${seg.label}_${item.label}`] || values[item.label]));
|
|
1578
1578
|
if (!hasItems && !hasSegments)
|
|
1579
1579
|
return null;
|
|
1580
|
-
return (jsxs("div", { className: styles$
|
|
1580
|
+
return (jsxs("div", { className: styles$l.section, children: [jsx("h3", { className: styles$l.sectionTitle, children: section.title }), section.items?.map((item, i) => (jsx(SummaryItemRow, { item: item, value: values[item.label] || values[`${section.key}_${item.label}`] }, i))), section.segments?.map((segment, i) => (jsxs("div", { className: styles$l.segment, children: [jsx("h4", { className: styles$l.segmentTitle, children: segment.label }), segment.items.map((item, j) => (jsx(SummaryItemRow, { item: item, value: values[`${section.key}_${segment.label}_${item.label}`] || values[item.label] }, j)))] }, i)))] }));
|
|
1581
1581
|
};
|
|
1582
1582
|
/**
|
|
1583
1583
|
* RequestSummary component for displaying a summary of travel request form data.
|
|
@@ -1585,18 +1585,18 @@ const SummarySection = ({ section, values }) => {
|
|
|
1585
1585
|
*/
|
|
1586
1586
|
const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo, className, title = 'Request Summary', }) => {
|
|
1587
1587
|
const visibleSections = sections.filter(section => enabledSections[section.key] !== false);
|
|
1588
|
-
return (jsxs("div", { className: `${styles$
|
|
1588
|
+
return (jsxs("div", { className: `${styles$l.summary} ${className || ''}`, children: [jsx("h2", { className: styles$l.title, children: title }), submissionInfo && (jsxs("div", { className: styles$l.submissionInfo, children: [jsx("span", { className: styles$l.label, children: "Submitted by" }), jsx("span", { className: styles$l.value, children: submissionInfo.submittedBy }), jsx("span", { className: styles$l.label, children: "on" }), jsx("span", { className: styles$l.value, children: submissionInfo.submittedOn })] })), jsx("div", { className: styles$l.sections, children: visibleSections.map((section) => (jsx(SummarySection, { section: section, values: values }, section.key))) }), visibleSections.length === 0 && (jsx("p", { className: styles$l.empty, children: "No services selected" }))] }));
|
|
1589
1589
|
};
|
|
1590
1590
|
RequestSummary.displayName = 'RequestSummary';
|
|
1591
1591
|
|
|
1592
|
-
var styles$
|
|
1592
|
+
var styles$k = {"layout":"RequestFormLayout-module_layout__R-vaM","header":"RequestFormLayout-module_header__705In","headerContent":"RequestFormLayout-module_headerContent__Uu0br","headerTitle":"RequestFormLayout-module_headerTitle__W-fub","pagination":"RequestFormLayout-module_pagination__hTpNr","separator":"RequestFormLayout-module_separator__BgEsp","eventName":"RequestFormLayout-module_eventName__1zpgS","headerRight":"RequestFormLayout-module_headerRight__VjjY3","body":"RequestFormLayout-module_body__RBH8O","sidebar":"RequestFormLayout-module_sidebar__Ozr7m","showOnMobile":"RequestFormLayout-module_showOnMobile__kyyER","sidebarContent":"RequestFormLayout-module_sidebarContent__IdoMX","main":"RequestFormLayout-module_main__132ss","mainContent":"RequestFormLayout-module_mainContent__vnp1R","summarySidebar":"RequestFormLayout-module_summarySidebar__Vfg-z","summaryContent":"RequestFormLayout-module_summaryContent__Oppnd","footer":"RequestFormLayout-module_footer__yxDM5","footerContent":"RequestFormLayout-module_footerContent__GmTkE","button":"RequestFormLayout-module_button__-iWUv","primary":"RequestFormLayout-module_primary__cs2Fb","secondary":"RequestFormLayout-module_secondary__9WNRX"};
|
|
1593
1593
|
|
|
1594
1594
|
/**
|
|
1595
1595
|
* RequestFormHeader component for the fixed header in travel request forms.
|
|
1596
1596
|
*/
|
|
1597
1597
|
const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightContent, className, }) => {
|
|
1598
1598
|
const showPagination = currentPage !== undefined && totalPages !== undefined && totalPages > 1;
|
|
1599
|
-
return (jsx("header", { className: `${styles$
|
|
1599
|
+
return (jsx("header", { className: `${styles$k.header} ${className || ''}`, children: jsxs("div", { className: styles$k.headerContent, children: [jsxs("h1", { className: styles$k.headerTitle, children: [title, showPagination && (jsxs("span", { className: styles$k.pagination, children: ["(", currentPage, "/", totalPages, ")"] })), eventName && (jsxs(Fragment, { children: [jsx("span", { className: styles$k.separator, children: "\u2013" }), jsx("span", { className: styles$k.eventName, children: eventName })] }))] }), rightContent && jsx("div", { className: styles$k.headerRight, children: rightContent })] }) }));
|
|
1600
1600
|
};
|
|
1601
1601
|
/**
|
|
1602
1602
|
* RequestFormFooter component for the fixed footer with navigation buttons.
|
|
@@ -1604,20 +1604,20 @@ const RequestFormHeader = ({ title, currentPage, totalPages, eventName, rightCon
|
|
|
1604
1604
|
const RequestFormFooter = ({ onPrevious, onNext, isFirstPage = false, isLastPage = false, isSubmitting = false, previousText, nextText, className, }) => {
|
|
1605
1605
|
const prevLabel = previousText || (isFirstPage ? 'Cancel' : 'Previous');
|
|
1606
1606
|
const nextLabel = nextText || (isLastPage ? 'Submit' : 'Next');
|
|
1607
|
-
return (jsx("footer", { className: `${styles$
|
|
1607
|
+
return (jsx("footer", { className: `${styles$k.footer} ${className || ''}`, children: jsxs("div", { className: styles$k.footerContent, children: [jsx("button", { type: "button", className: `${styles$k.button} ${styles$k.secondary}`, onClick: onPrevious, disabled: isSubmitting, children: prevLabel }), jsx("button", { type: "button", className: `${styles$k.button} ${styles$k.primary}`, onClick: onNext, disabled: isSubmitting, children: isSubmitting ? 'Submitting...' : nextLabel })] }) }));
|
|
1608
1608
|
};
|
|
1609
1609
|
/**
|
|
1610
1610
|
* RequestFormLayout organism for travel request forms.
|
|
1611
1611
|
* Provides a three-column layout with fixed header and footer.
|
|
1612
1612
|
*/
|
|
1613
1613
|
const RequestFormLayout = ({ header, sidebar, children, summary, footer, className, showSidebarOnMobile = false, }) => {
|
|
1614
|
-
return (jsxs("div", { className: `${styles$
|
|
1614
|
+
return (jsxs("div", { className: `${styles$k.layout} ${className || ''}`, children: [header, jsxs("div", { className: styles$k.body, children: [sidebar && (jsx("aside", { className: `${styles$k.sidebar} ${showSidebarOnMobile ? styles$k.showOnMobile : ''}`, children: jsx("div", { className: styles$k.sidebarContent, children: sidebar }) })), jsx("main", { className: styles$k.main, children: jsx("div", { className: styles$k.mainContent, children: children }) }), summary && (jsx("aside", { className: styles$k.summarySidebar, children: jsx("div", { className: styles$k.summaryContent, children: summary }) }))] }), footer] }));
|
|
1615
1615
|
};
|
|
1616
1616
|
RequestFormLayout.displayName = 'RequestFormLayout';
|
|
1617
1617
|
RequestFormHeader.displayName = 'RequestFormHeader';
|
|
1618
1618
|
RequestFormFooter.displayName = 'RequestFormFooter';
|
|
1619
1619
|
|
|
1620
|
-
var styles$
|
|
1620
|
+
var styles$j = {"wrapper":"Table-module_wrapper__1klo5","table":"Table-module_table__fkuUB","header":"Table-module_header__vRy6j","headerCell":"Table-module_headerCell__2KzYn","headerContent":"Table-module_headerContent__HPl8-","sortable":"Table-module_sortable__NiS6E","sortIcon":"Table-module_sortIcon__Fy6z7","body":"Table-module_body__Wt52U","row":"Table-module_row__4GEgX","cell":"Table-module_cell__Xr-7H","alignLeft":"Table-module_alignLeft__FtI9E","alignCenter":"Table-module_alignCenter__p8Tr8","alignRight":"Table-module_alignRight__Ca7Yr","bordered":"Table-module_bordered__9bM3L","striped":"Table-module_striped__6TMF-","hoverable":"Table-module_hoverable__KN5Fp","compact":"Table-module_compact__opzS-","clickable":"Table-module_clickable__2ummV","loading":"Table-module_loading__tFELE","empty":"Table-module_empty__urRiw","pulse":"Table-module_pulse__t32v9"};
|
|
1621
1621
|
|
|
1622
1622
|
const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false, hoverable = true, compact = false, loading = false, emptyMessage = 'No data available', onRowClick, className = '', }) => {
|
|
1623
1623
|
const [sortColumn, setSortColumn] = useState(null);
|
|
@@ -1655,12 +1655,12 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
1655
1655
|
}
|
|
1656
1656
|
return row[rowKey] ?? index;
|
|
1657
1657
|
};
|
|
1658
|
-
return (jsx("div", { className: `${styles$
|
|
1658
|
+
return (jsx("div", { className: `${styles$j.wrapper} ${className}`, children: jsxs("table", { className: `${styles$j.table} ${bordered ? styles$j.bordered : ''} ${striped ? styles$j.striped : ''} ${hoverable ? styles$j.hoverable : ''} ${compact ? styles$j.compact : ''}`, children: [jsx("thead", { className: styles$j.header, children: jsx("tr", { children: columns.map((column) => (jsx("th", { className: `${styles$j.headerCell} ${column.sortable ? styles$j.sortable : ''} ${styles$j[`align${(column.align || 'left').charAt(0).toUpperCase()}${(column.align || 'left').slice(1)}`]}`, style: column.width ? { width: column.width } : undefined, onClick: () => handleSort(column), children: jsxs("span", { className: styles$j.headerContent, children: [column.label, column.sortable && (jsx("span", { className: styles$j.sortIcon, children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key))) }) }), jsx("tbody", { className: styles$j.body, children: loading ? (jsx("tr", { children: jsx("td", { colSpan: columns.length, className: styles$j.loading, children: "Loading..." }) })) : sortedData.length === 0 ? (jsx("tr", { children: jsx("td", { colSpan: columns.length, className: styles$j.empty, children: emptyMessage }) })) : (sortedData.map((row, rowIndex) => (jsx("tr", { className: `${styles$j.row} ${onRowClick ? styles$j.clickable : ''}`, onClick: () => onRowClick?.(row, rowIndex), children: columns.map((column) => (jsx("td", { className: `${styles$j.cell} ${styles$j[`align${(column.align || 'left').charAt(0).toUpperCase()}${(column.align || 'left').slice(1)}`]}`, children: column.render
|
|
1659
1659
|
? column.render(row[column.key], row, rowIndex)
|
|
1660
1660
|
: row[column.key] }, column.key))) }, getRowKey(row, rowIndex))))) })] }) }));
|
|
1661
1661
|
};
|
|
1662
1662
|
|
|
1663
|
-
var styles$
|
|
1663
|
+
var styles$i = {"card":"TeamCard-module_card__R2u4q","header":"TeamCard-module_header__XXRUp","icon":"TeamCard-module_icon__l2Go2","title":"TeamCard-module_title__llL8V","body":"TeamCard-module_body__OoVMW","tabs":"TeamCard-module_tabs__SJ7t-","tab":"TeamCard-module_tab__Q5j3C","tabActive":"TeamCard-module_tabActive__dUPwX","list":"TeamCard-module_list__a734u","teamItem":"TeamCard-module_teamItem__OYVIK","teamCode":"TeamCard-module_teamCode__BHB63","teamName":"TeamCard-module_teamName__-Bds2","chevron":"TeamCard-module_chevron__zBxM6","empty":"TeamCard-module_empty__8b5hb"};
|
|
1664
1664
|
|
|
1665
1665
|
const TEAM_GROUPS = [
|
|
1666
1666
|
{ label: 'All', key: undefined },
|
|
@@ -1694,17 +1694,24 @@ const TeamCard = ({ title = 'Administer Teams', icon, teams, onTeamSelect, class
|
|
|
1694
1694
|
return teams.filter(team => team.category === activeTab);
|
|
1695
1695
|
}, [teams, activeTab]);
|
|
1696
1696
|
const cardClasses = [
|
|
1697
|
-
styles$
|
|
1697
|
+
styles$i.card,
|
|
1698
1698
|
className,
|
|
1699
1699
|
].filter(Boolean).join(' ');
|
|
1700
|
-
return (jsxs("div", { className: cardClasses, children: [jsxs("div", { className: styles$
|
|
1700
|
+
return (jsxs("div", { className: cardClasses, children: [jsxs("div", { className: styles$i.header, children: [jsx("span", { className: styles$i.icon, children: icon || jsx(UsersIcon, {}) }), jsx("h3", { className: styles$i.title, children: title })] }), jsxs("div", { className: styles$i.body, children: [jsx("div", { className: styles$i.tabs, children: TEAM_GROUPS.map(({ label, key }) => (jsx("button", { type: "button", onClick: () => setActiveTab(key), className: `${styles$i.tab} ${activeTab === key ? styles$i.tabActive : ''}`, children: label }, label))) }), jsxs("div", { className: styles$i.list, children: [filteredTeams.map((team) => (jsxs("button", { type: "button", className: styles$i.teamItem, onClick: () => onTeamSelect?.(team), children: [jsx("span", { className: styles$i.teamCode, style: { backgroundColor: getTeamColor(team.code) }, children: team.code }), jsx("span", { className: styles$i.teamName, children: team.description }), jsx("span", { className: styles$i.chevron, children: jsx(ChevronRightIcon, {}) })] }, team.id))), filteredTeams.length === 0 && (jsx("div", { className: styles$i.empty, children: "No teams found" }))] })] })] }));
|
|
1701
1701
|
};
|
|
1702
1702
|
TeamCard.displayName = 'TeamCard';
|
|
1703
1703
|
|
|
1704
|
-
var styles$
|
|
1704
|
+
var styles$h = {"actions":"TeamScheduleActions-module_actions__OvuON","primaryRow":"TeamScheduleActions-module_primaryRow__8rwhE","tripCount":"TeamScheduleActions-module_tripCount__4axn4","seasonNavigator":"TeamScheduleActions-module_seasonNavigator__jmqeE","seasonLabel":"TeamScheduleActions-module_seasonLabel__8MtKK","secondaryRow":"TeamScheduleActions-module_secondaryRow__We2n9"};
|
|
1705
1705
|
|
|
1706
1706
|
/** Exact presentational counterpart of Hub's Team Schedule action controls. */
|
|
1707
|
-
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 = '', }) => (jsxs("div", { className: [styles$
|
|
1707
|
+
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 = '', }) => (jsxs("div", { className: [styles$h.actions, className].filter(Boolean).join(' '), children: [jsxs("div", { className: styles$h.primaryRow, children: [!isCompactView ? (jsx(Button, { size: "sm", onClick: onViewSchedule, children: "View/Edit Schedule" })) : (jsx(Button, { size: "sm", onClick: onBack, leftIcon: jsx(ChevronLeftIcon, { size: 14 }), children: "Back" })), jsxs("div", { className: styles$h.seasonNavigator, children: [jsx(Button, { variant: "secondary", size: "sm", square: true, "aria-label": "Previous Season", disabled: previousSeasonDisabled, onClick: onPreviousSeason, children: jsx(ChevronLeftIcon, { size: 18 }) }), jsxs("div", { className: styles$h.seasonLabel, children: [jsx(Button, { variant: "secondary", size: "sm", children: seasonLabel }), !!seasonOptions.length && (jsx("select", { "aria-label": "Season", value: seasonValue, onChange: (event) => onSeasonChange?.(event.target.value), children: seasonOptions.map((option) => jsx("option", { value: option.value, children: option.label }, option.value)) }))] }), jsx(Button, { variant: "secondary", size: "sm", square: true, "aria-label": "Next Season", onClick: onNextSeason, children: jsx(ChevronRightIcon$1, { size: 18 }) })] }), isCompactView && jsx(Button, { variant: "outline", size: "sm", loading: exporting, disabled: exportDisabled, rightIcon: jsx(ArrowUpRightIcon, { size: 14 }), onClick: onExport, children: "Export XLS" }), jsxs("span", { className: styles$h.tripCount, children: [tripCount, " trips displayed"] })] }), isCompactView && (jsxs("div", { className: styles$h.secondaryRow, children: [jsx(Button, { variant: "outline", size: "sm", disabled: groupTravelDisabled, onClick: onGroupTravelRequest, children: "Group Travel Request" }), jsx(Button, { variant: "outline", size: "sm", disabled: mergeDisabled, loading: merging, onClick: onMergeEvents, children: "Merge Events" })] }))] }));
|
|
1708
|
+
|
|
1709
|
+
var styles$g = {"headers":"TeamScheduleCompactTable-module_headers__FVr2C","tripHeader":"TeamScheduleCompactTable-module_tripHeader__9vr2-","eventHeader":"TeamScheduleCompactTable-module_eventHeader__6gfwo","table":"TeamScheduleCompactTable-module_table__MdE3o","row":"TeamScheduleCompactTable-module_row__Rt0YC","trip":"TeamScheduleCompactTable-module_trip__oAUEQ","events":"TeamScheduleCompactTable-module_events__EwJi9","empty":"TeamScheduleCompactTable-module_empty__1u5HA","addRow":"TeamScheduleCompactTable-module_addRow__ejqSf"};
|
|
1710
|
+
|
|
1711
|
+
const DEFAULT_TRIP_HEADERS = ['', 'GTR', 'Trvl Start', 'Trvl End', 'Trip Name', 'Services', ''];
|
|
1712
|
+
const DEFAULT_EVENT_HEADERS = ['', 'Event Date', 'Opponent/Host', 'Event Title', 'Hm/Awy', ''];
|
|
1713
|
+
/** Hub's two-panel compact Team Schedule shell. Editable rows remain injectable. */
|
|
1714
|
+
const TeamScheduleCompactTable = ({ rows, tripHeaders = DEFAULT_TRIP_HEADERS, eventHeaders = DEFAULT_EVENT_HEADERS, onAddEvent, addEventDisabled = false, className = '', }) => (jsxs("div", { className: [styles$g.schedule, className].filter(Boolean).join(' '), children: [jsxs("div", { className: styles$g.headers, children: [jsx("div", { className: styles$g.tripHeader, children: tripHeaders.map((header, index) => jsx("div", { children: header }, index)) }), jsx("div", { className: styles$g.eventHeader, children: eventHeaders.map((header, index) => jsx("div", { children: header }, index)) })] }), jsx("div", { className: styles$g.table, children: !rows.length ? jsx("div", { className: styles$g.empty, children: "No data available." }) : rows.map((row) => (jsxs("div", { className: styles$g.row, children: [jsx("div", { className: styles$g.trip, children: row.trip }), jsx("div", { className: styles$g.events, children: row.events })] }, row.id))) }), jsx("div", { className: styles$g.addRow, children: jsxs("button", { type: "button", disabled: addEventDisabled, onClick: onAddEvent, children: ["Add Event ", jsx(PlusIcon$2, { size: 16 })] }) })] }));
|
|
1708
1715
|
|
|
1709
1716
|
var styles$f = {"table":"TeamScheduleExpandedTable-module_table__hmnHI","header":"TeamScheduleExpandedTable-module_header__7IWV-","row":"TeamScheduleExpandedTable-module_row__9MyHH","body":"TeamScheduleExpandedTable-module_body__NsvB3","cell":"TeamScheduleExpandedTable-module_cell__kgawH","tripLink":"TeamScheduleExpandedTable-module_tripLink__lYoi8","mobileLabel":"TeamScheduleExpandedTable-module_mobileLabel__J6apm","empty":"TeamScheduleExpandedTable-module_empty__d9Afo"};
|
|
1710
1717
|
|
|
@@ -2396,5 +2403,5 @@ const TripDetailPage = ({ header, airSegment, groundSegment, hotelSegment, files
|
|
|
2396
2403
|
};
|
|
2397
2404
|
TripDetailPage.displayName = 'TripDetailPage';
|
|
2398
2405
|
|
|
2399
|
-
export { Accordion, AdministrationPage, AirSegment, Alert, AppLayout, ArrowDownLeftIcon, ArrowUpRightIcon, Avatar, AvatarGroup, Badge, BuildingIcon, BusIcon$3 as BusIcon, Button, CalendarIcon$1 as CalendarIcon, CalendarTypeSelector, CalendarViewSelector, CarIcon$2 as CarIcon, Card, CardBody, CardFooter, CardHeader, CharterManifestPage, CheckIcon$2 as CheckIcon, Checkbox, ChevronDownIcon$1 as ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon$1 as ChevronRightIcon, ChevronUpIcon, CloseIcon, ConfirmModal, ContactList, ContactUsPage, CubeIcon, DashboardIcon, DashboardPage, Datepicker, DocumentIcon, DownloadIcon, Drawer, DrawerBody, DrawerFooter, DrawerHeader, Dropdown, DueDatesDrawer, EditIcon$2 as EditIcon, EyeIcon, FilterChip, FilterIcon$1 as FilterIcon, FormField, FormRow, FormSection, FormStack, GridIcon, GroundSegment, GroupTravelRequestPage, HomeIcon, HotelIcon$4 as HotelIcon, HotelSegment, Icons, IndividualTravelPage, InfoCenterPage, InfoIcon$1 as InfoIcon, Input, LightbulbIcon, LimoIcon, LockIcon$1 as LockIcon, LogoIcon, MailIcon, ManifestCapacityStats, ManifestViewToggle, MegaphoneIcon, MembershipPrograms, MenuIcon, Metric, MinusIcon, Modal, ModalFooter, Module, ModuleDivider, ModuleVerticalDivider, NavItem, NotFoundPage, PageBanners, PhoneIcon, PlaneIcon$4 as PlaneIcon, PlusIcon$2 as PlusIcon, PreferencesPanel, PrinterIcon, Progress, ProgressBar, ProgressCircle, RailIcon, RefreshIcon, ReportIcon, RequestFormFooter, RequestFormHeader, RequestFormLayout, RequestSummary, RosterToolbar, SUPPLIER_TYPE_OPTIONS, SchoolContactForm, SearchField, SearchIcon$1 as SearchIcon, Segment, SegmentedSelector, Select, SelectFilter, ServiceToggle, ServiceToggleList, SettingsIcon, Sidenav, Spinner, StatusBadge, SummarySection, SupplierTypeToggle, Table, Tag, TeamCard, TeamHeader, TeamManagementPage, TeamScheduleActions, TeamScheduleExpandedTable, TeamSchedulePage, TeamSubMenu, TeamTravelCalendarPage, Textarea, Timepicker, Title, Toggle, Tooltip, Topbar, TrashIcon$2 as TrashIcon, TravelServiceIcon, TravelSummaryMetrics, TravelerForm, TrendDownIcon, TrendUpIcon, TripDetailPage, TripSegment, TripTable, TypeIcon, UserIcon, UsersIcon$1 as UsersIcon, WarningIcon$1 as WarningIcon, XIcon, formatCompactTripCost, formatTeamScheduleTravelDates, isTravelDueDateCompleted };
|
|
2406
|
+
export { Accordion, AdministrationPage, AirSegment, Alert, AppLayout, ArrowDownLeftIcon, ArrowUpRightIcon, Avatar, AvatarGroup, Badge, BuildingIcon, BusIcon$3 as BusIcon, Button, CalendarIcon$1 as CalendarIcon, CalendarTypeSelector, CalendarViewSelector, CarIcon$2 as CarIcon, Card, CardBody, CardFooter, CardHeader, CharterManifestPage, CheckIcon$2 as CheckIcon, Checkbox, ChevronDownIcon$1 as ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon$1 as ChevronRightIcon, ChevronUpIcon, CloseIcon, ConfirmModal, ContactList, ContactUsPage, CubeIcon, DashboardIcon, DashboardPage, Datepicker, DocumentIcon, DownloadIcon, Drawer, DrawerBody, DrawerFooter, DrawerHeader, Dropdown, DueDatesDrawer, EditIcon$2 as EditIcon, EyeIcon, FilterChip, FilterIcon$1 as FilterIcon, FormField, FormRow, FormSection, FormStack, GridIcon, GroundSegment, GroupTravelRequestPage, HomeIcon, HotelIcon$4 as HotelIcon, HotelSegment, Icons, IndividualTravelPage, InfoCenterPage, InfoIcon$1 as InfoIcon, Input, LightbulbIcon, LimoIcon, LockIcon$1 as LockIcon, LogoIcon, MailIcon, ManifestCapacityStats, ManifestViewToggle, MegaphoneIcon, MembershipPrograms, MenuIcon, Metric, MinusIcon, Modal, ModalFooter, Module, ModuleDivider, ModuleVerticalDivider, NavItem, NotFoundPage, PageBanners, PhoneIcon, PlaneIcon$4 as PlaneIcon, PlusIcon$2 as PlusIcon, PreferencesPanel, PrinterIcon, Progress, ProgressBar, ProgressCircle, RailIcon, RefreshIcon, ReportIcon, RequestFormFooter, RequestFormHeader, RequestFormLayout, RequestSummary, RosterToolbar, SUPPLIER_TYPE_OPTIONS, SchoolContactForm, SearchField, SearchIcon$1 as SearchIcon, Segment, SegmentedSelector, Select, SelectFilter, ServiceToggle, ServiceToggleList, SettingsIcon, Sidenav, Spinner, StatusBadge, SummarySection, SupplierTypeToggle, Table, Tag, TeamCard, TeamHeader, TeamManagementPage, TeamScheduleActions, TeamScheduleCompactTable, TeamScheduleExpandedTable, TeamSchedulePage, TeamSubMenu, TeamTravelCalendarPage, Textarea, Timepicker, Title, Toggle, Tooltip, Topbar, TrashIcon$2 as TrashIcon, TravelServiceIcon, TravelSummaryMetrics, TravelerForm, TrendDownIcon, TrendUpIcon, TripDetailPage, TripSegment, TripTable, TypeIcon, UserIcon, UsersIcon$1 as UsersIcon, WarningIcon$1 as WarningIcon, XIcon, formatCompactTripCost, formatTeamScheduleTravelDates, isTravelDueDateCompleted };
|
|
2400
2407
|
//# sourceMappingURL=index.esm.js.map
|