@shortstravelmgmt/component-lib 0.5.0 → 0.5.1-canary.95.g6683883
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 +365 -2
- package/dist/index.esm.js +941 -152
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +959 -151
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1124,7 +1124,7 @@ const contentStyle$e = {
|
|
|
1124
1124
|
const iconStyle$i = {
|
|
1125
1125
|
label: 'Alert-iconStyle', flexShrink: 0, marginTop: 1, color: 'var(--alert-accent)'
|
|
1126
1126
|
};
|
|
1127
|
-
const bodyStyle$
|
|
1127
|
+
const bodyStyle$f = {
|
|
1128
1128
|
label: 'Alert-bodyStyle', flex: 1, minWidth: 0
|
|
1129
1129
|
};
|
|
1130
1130
|
const titleStyle$J = {
|
|
@@ -1196,7 +1196,7 @@ const variantIcons = {
|
|
|
1196
1196
|
*/
|
|
1197
1197
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
1198
1198
|
const IconComponent = variantIcons[variant];
|
|
1199
|
-
return (jsx("div", { className: cx(sx(alertStyle$5), sx(variantStyles$8[variant]), className), role: "alert", children: jsxs("div", { className: sx(contentStyle$e), children: [jsx(IconComponent, { className: sx(iconStyle$i), size: 20 }), jsxs("div", { className: sx(bodyStyle$
|
|
1199
|
+
return (jsx("div", { className: cx(sx(alertStyle$5), sx(variantStyles$8[variant]), className), role: "alert", children: jsxs("div", { className: sx(contentStyle$e), children: [jsx(IconComponent, { className: sx(iconStyle$i), size: 20 }), jsxs("div", { className: sx(bodyStyle$f), children: [title && jsx("h4", { className: sx(titleStyle$J), children: title }), jsx("div", { className: sx(messageStyle$3), children: children })] }), dismissible && onDismiss && (jsx("button", { type: "button", onClick: onDismiss, className: sx(dismissButtonStyle), "aria-label": "Dismiss alert", children: jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
1200
1200
|
};
|
|
1201
1201
|
|
|
1202
1202
|
const avatarSizeStyles = {
|
|
@@ -2011,12 +2011,12 @@ const labelTextSizeStyles = {
|
|
|
2011
2011
|
lg: { fontSize: 'var(--text-base)' },
|
|
2012
2012
|
};
|
|
2013
2013
|
/** Helper and error text hang under the label, indented past the box. */
|
|
2014
|
-
const helperTextStyle$
|
|
2014
|
+
const helperTextStyle$7 = {
|
|
2015
2015
|
label: 'Checkbox-helperTextStyle',
|
|
2016
2016
|
fontSize: 'var(--text-xs)',
|
|
2017
2017
|
color: 'var(--color-gray-500)',
|
|
2018
2018
|
};
|
|
2019
|
-
const errorTextStyle$
|
|
2019
|
+
const errorTextStyle$7 = {
|
|
2020
2020
|
label: 'Checkbox-errorTextStyle',
|
|
2021
2021
|
fontSize: 'var(--text-xs)',
|
|
2022
2022
|
color: 'var(--color-red-500)',
|
|
@@ -2063,7 +2063,7 @@ const Checkbox = forwardRef(({ label, size = 'md', helperText, error, indetermin
|
|
|
2063
2063
|
? indicator({ checked: !!checked, indeterminate, disabled: !!disabled })
|
|
2064
2064
|
: indeterminate
|
|
2065
2065
|
? jsx(IndeterminateIcon, {})
|
|
2066
|
-
: jsx(CheckIcon, {}) })] }), label && (jsx("span", { className: cx(sx(labelTextStyle), sx(labelTextSizeStyles[size])), children: label }))] }), error && (jsx("span", { id: errorId, className: cx(sx(errorTextStyle$
|
|
2066
|
+
: jsx(CheckIcon, {}) })] }), label && (jsx("span", { className: cx(sx(labelTextStyle), sx(labelTextSizeStyles[size])), children: label }))] }), error && (jsx("span", { id: errorId, className: cx(sx(errorTextStyle$7), sx(assistiveOffsetStyles[size])), children: error })), helperText && !error && (jsx("span", { id: helperId, className: cx(sx(helperTextStyle$7), sx(assistiveOffsetStyles[size])), children: helperText }))] }));
|
|
2067
2067
|
});
|
|
2068
2068
|
Checkbox.displayName = 'Checkbox';
|
|
2069
2069
|
|
|
@@ -2192,12 +2192,12 @@ const inputDisabledStyle = {
|
|
|
2192
2192
|
cursor: 'not-allowed',
|
|
2193
2193
|
color: 'var(--color-gray-500)',
|
|
2194
2194
|
};
|
|
2195
|
-
const helperTextStyle$
|
|
2195
|
+
const helperTextStyle$6 = {
|
|
2196
2196
|
label: 'Datepicker-helperTextStyle',
|
|
2197
2197
|
fontSize: 'var(--text-xs)',
|
|
2198
2198
|
color: 'var(--color-gray-500)',
|
|
2199
2199
|
};
|
|
2200
|
-
const errorTextStyle$
|
|
2200
|
+
const errorTextStyle$6 = {
|
|
2201
2201
|
label: 'Datepicker-errorTextStyle',
|
|
2202
2202
|
fontSize: 'var(--text-xs)',
|
|
2203
2203
|
color: 'var(--color-red-500)',
|
|
@@ -2218,7 +2218,7 @@ const Datepicker = forwardRef(({ size = 'md', label, helperText, error, fullWidt
|
|
|
2218
2218
|
!error && !disabled && sx(inputWrapperHoverStyle), error && sx(inputWrapperErrorStyle), disabled && sx(inputWrapperDisabledStyle));
|
|
2219
2219
|
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$h), children: label })), jsxs("div", { className: inputWrapperClasses, children: [jsx("span", { className: cx(sx(iconStyle$f), sx(iconSizeStyles$1[size])), children: jsx(CalendarIcon, {}) }), jsx("input", { ref: ref, type: "date", id: inputId, className: cx(sx(inputStyle$6), sx(inputSizeStyles$1[size]), disabled && sx(inputDisabledStyle)), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
2220
2220
|
.filter(Boolean)
|
|
2221
|
-
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
2221
|
+
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$6), children: error })), helperText && !error && (jsx("span", { id: helperId, className: sx(helperTextStyle$6), children: helperText }))] }));
|
|
2222
2222
|
});
|
|
2223
2223
|
Datepicker.displayName = 'Datepicker';
|
|
2224
2224
|
|
|
@@ -2915,12 +2915,12 @@ const disabledStyle$6 = {
|
|
|
2915
2915
|
cursor: 'not-allowed',
|
|
2916
2916
|
},
|
|
2917
2917
|
};
|
|
2918
|
-
const helperTextStyle$
|
|
2918
|
+
const helperTextStyle$5 = {
|
|
2919
2919
|
label: 'Input-helperTextStyle',
|
|
2920
2920
|
fontSize: 'var(--fs-xs)',
|
|
2921
2921
|
color: 'var(--fg-3)',
|
|
2922
2922
|
};
|
|
2923
|
-
const errorTextStyle$
|
|
2923
|
+
const errorTextStyle$5 = {
|
|
2924
2924
|
label: 'Input-errorTextStyle',
|
|
2925
2925
|
fontSize: 'var(--fs-xs)',
|
|
2926
2926
|
color: 'var(--color-error)',
|
|
@@ -3034,7 +3034,7 @@ const Input = forwardRef(({ size = 'md', sizing = 'fixed', label, helperText, er
|
|
|
3034
3034
|
// The fixed-height class still applies its horizontal padding and gap;
|
|
3035
3035
|
// the padded classes that follow override height and the vertical rhythm.
|
|
3036
3036
|
sx(sizeStyles$8[size]), paddedClasses(sizing, size), error && sx(errorStyle$4), disabled && sx(disabledStyle$6));
|
|
3037
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$g), children: label })), jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsx("span", { className: sx(iconStyle$e), children: leftIcon }), jsx("input", { ref: ref, id: inputId, className: sx(inputStyle$5), disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsx("span", { className: sx(iconStyle$e), children: rightIcon })] }), error && (jsx("span", { id: `${inputId}-error`, className: sx(errorTextStyle$
|
|
3037
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$g), children: label })), jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsx("span", { className: sx(iconStyle$e), children: leftIcon }), jsx("input", { ref: ref, id: inputId, className: sx(inputStyle$5), disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsx("span", { className: sx(iconStyle$e), children: rightIcon })] }), error && (jsx("span", { id: `${inputId}-error`, className: sx(errorTextStyle$5), children: error })), helperText && !error && (jsx("span", { id: `${inputId}-helper`, className: sx(helperTextStyle$5), children: helperText }))] }));
|
|
3038
3038
|
});
|
|
3039
3039
|
Input.displayName = 'Input';
|
|
3040
3040
|
/**
|
|
@@ -3050,7 +3050,7 @@ const Textarea = forwardRef(({ size = 'md', sizing = 'fixed', label, helperText,
|
|
|
3050
3050
|
// `.textarea.paddedSm` — the type scale the padded rules put on a
|
|
3051
3051
|
// descendant `.input` that a bare <textarea> does not have.
|
|
3052
3052
|
sizing === 'padded' && sx(textareaPaddedSizeStyles[size]), error && sx(errorStyle$4), disabled && sx(disabledStyle$6));
|
|
3053
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: textareaId, className: sx(labelStyle$g), 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: sx(errorTextStyle$
|
|
3053
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: textareaId, className: sx(labelStyle$g), 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: sx(errorTextStyle$5), children: error })), helperText && !error && (jsx("span", { id: `${textareaId}-helper`, className: sx(helperTextStyle$5), children: helperText }))] }));
|
|
3054
3054
|
});
|
|
3055
3055
|
Textarea.displayName = 'Textarea';
|
|
3056
3056
|
|
|
@@ -3441,12 +3441,12 @@ const paddedSizeStyles = {
|
|
|
3441
3441
|
},
|
|
3442
3442
|
},
|
|
3443
3443
|
};
|
|
3444
|
-
const helperTextStyle$
|
|
3444
|
+
const helperTextStyle$4 = {
|
|
3445
3445
|
label: 'Select-helperTextStyle',
|
|
3446
3446
|
fontSize: 'var(--text-xs)',
|
|
3447
3447
|
color: 'var(--color-gray-500)',
|
|
3448
3448
|
};
|
|
3449
|
-
const errorTextStyle$
|
|
3449
|
+
const errorTextStyle$4 = {
|
|
3450
3450
|
label: 'Select-errorTextStyle',
|
|
3451
3451
|
fontSize: 'var(--text-xs)',
|
|
3452
3452
|
color: 'var(--color-red-500)',
|
|
@@ -3483,7 +3483,7 @@ const Select = forwardRef(({ options, optionGroups, size = 'md', label, placehol
|
|
|
3483
3483
|
};
|
|
3484
3484
|
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: selectId, className: sx(labelStyle$e), children: label })), jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsx("span", { className: sx(leftIconStyle), children: leftIcon }), jsxs("select", { ref: ref, id: selectId, className: sx(selectStyle$2), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
3485
3485
|
.filter(Boolean)
|
|
3486
|
-
.join(' ') || undefined, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsx("span", { className: sx(chevronStyle$5), children: jsx(ChevronDownIcon, {}) })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
3486
|
+
.join(' ') || undefined, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsx("span", { className: sx(chevronStyle$5), children: jsx(ChevronDownIcon, {}) })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$4), children: error })), helperText && !error && (jsx("span", { id: helperId, className: sx(helperTextStyle$4), children: helperText }))] }));
|
|
3487
3487
|
});
|
|
3488
3488
|
Select.displayName = 'Select';
|
|
3489
3489
|
|
|
@@ -3525,14 +3525,14 @@ const sizeStyles$6 = {
|
|
|
3525
3525
|
xl: { width: 40, height: 40 },
|
|
3526
3526
|
};
|
|
3527
3527
|
/** The theme's own helper — this was a verbatim copy of it. */
|
|
3528
|
-
const srOnlyStyle$
|
|
3528
|
+
const srOnlyStyle$5 = srOnly;
|
|
3529
3529
|
|
|
3530
3530
|
/**
|
|
3531
3531
|
* Indeterminate loading indicator for waits with no known duration.
|
|
3532
3532
|
* Exposes its label to screen readers, so give it one that says what is loading.
|
|
3533
3533
|
*/
|
|
3534
3534
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
3535
|
-
return (jsxs("span", { className: cx(sx(spinnerStyle$1), sx(sizeStyles$6[size]), className), role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxs("svg", { className: sx(svgStyle), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: sx(trackStyle), cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: sx(indicatorStyle), 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: sx(srOnlyStyle$
|
|
3535
|
+
return (jsxs("span", { className: cx(sx(spinnerStyle$1), sx(sizeStyles$6[size]), className), role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxs("svg", { className: sx(svgStyle), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: sx(trackStyle), cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: sx(indicatorStyle), 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: sx(srOnlyStyle$5), children: label })] }));
|
|
3536
3536
|
};
|
|
3537
3537
|
|
|
3538
3538
|
const statusVariantStyles = (theme) => ({
|
|
@@ -3856,12 +3856,12 @@ const sizeStyles$5 = {
|
|
|
3856
3856
|
},
|
|
3857
3857
|
},
|
|
3858
3858
|
};
|
|
3859
|
-
const helperTextStyle$
|
|
3859
|
+
const helperTextStyle$3 = {
|
|
3860
3860
|
label: 'Timepicker-helperTextStyle',
|
|
3861
3861
|
fontSize: 'var(--text-xs)',
|
|
3862
3862
|
color: 'var(--color-gray-500)',
|
|
3863
3863
|
};
|
|
3864
|
-
const errorTextStyle$
|
|
3864
|
+
const errorTextStyle$3 = {
|
|
3865
3865
|
label: 'Timepicker-errorTextStyle',
|
|
3866
3866
|
fontSize: 'var(--text-xs)',
|
|
3867
3867
|
color: 'var(--color-red-500)',
|
|
@@ -3880,7 +3880,7 @@ const Timepicker = forwardRef(({ size = 'md', label, helperText, error, fullWidt
|
|
|
3880
3880
|
const inputWrapperClasses = cx(sx(inputWrapperStyle$2), sx(sizeStyles$5[size]), error ? sx(errorStyle$2) : '', disabled ? sx(disabledStyle$4) : '');
|
|
3881
3881
|
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$d), children: label })), jsxs("div", { className: inputWrapperClasses, children: [jsx("span", { className: sx(iconStyle$d), children: jsx(ClockIcon$1, {}) }), jsx("input", { ref: ref, type: "time", id: inputId, className: sx(inputStyle$4), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
3882
3882
|
.filter(Boolean)
|
|
3883
|
-
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
3883
|
+
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$3), children: error })), helperText && !error && (jsx("span", { id: helperId, className: sx(helperTextStyle$3), children: helperText }))] }));
|
|
3884
3884
|
});
|
|
3885
3885
|
Timepicker.displayName = 'Timepicker';
|
|
3886
3886
|
|
|
@@ -4564,11 +4564,11 @@ const openStyle$3 = {
|
|
|
4564
4564
|
transform: 'rotate(90deg)',
|
|
4565
4565
|
},
|
|
4566
4566
|
};
|
|
4567
|
-
const headerStyle$
|
|
4567
|
+
const headerStyle$N = {
|
|
4568
4568
|
label: 'Accordion-headerStyle',
|
|
4569
4569
|
flex: 1,
|
|
4570
4570
|
};
|
|
4571
|
-
const bodyStyle$
|
|
4571
|
+
const bodyStyle$e = {
|
|
4572
4572
|
label: 'Accordion-bodyStyle',
|
|
4573
4573
|
position: 'relative',
|
|
4574
4574
|
paddingLeft: 24,
|
|
@@ -4638,7 +4638,7 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
4638
4638
|
}
|
|
4639
4639
|
onOpenChange?.(newOpen);
|
|
4640
4640
|
};
|
|
4641
|
-
return (jsxs("div", { className: cx(sx(accordionStyle), className), children: [jsxs("div", { className: sx(headerContainerStyle), children: [jsx("button", { type: "button", className: sx(toggleStyle$4), onClick: handleToggle, "aria-expanded": isOpen, children: jsx(CaretIcon, { className: cx(sx(caretStyle), isOpen && sx(openStyle$3)) }) }), jsx("div", { className: sx(headerStyle$
|
|
4641
|
+
return (jsxs("div", { className: cx(sx(accordionStyle), className), children: [jsxs("div", { className: sx(headerContainerStyle), children: [jsx("button", { type: "button", className: sx(toggleStyle$4), onClick: handleToggle, "aria-expanded": isOpen, children: jsx(CaretIcon, { className: cx(sx(caretStyle), isOpen && sx(openStyle$3)) }) }), jsx("div", { className: sx(headerStyle$N), children: header })] }), jsxs("div", { className: cx(sx(bodyStyle$e), isOpen ? sx(visibleStyle) : sx(hiddenStyle$2)), "aria-hidden": !isOpen, children: [showTimeline && (jsxs("div", { className: sx(timelineStyle$1), children: [jsx("div", { className: sx(lineStyle) }), jsx(CaretIcon, { className: sx(endCaretStyle) })] })), jsx("div", { className: sx(contentStyle$9), children: children })] })] }));
|
|
4642
4642
|
};
|
|
4643
4643
|
Accordion.displayName = 'Accordion';
|
|
4644
4644
|
|
|
@@ -4773,7 +4773,7 @@ const contactStyle$1 = {
|
|
|
4773
4773
|
display: 'flex',
|
|
4774
4774
|
gap: 12,
|
|
4775
4775
|
};
|
|
4776
|
-
const bodyStyle$
|
|
4776
|
+
const bodyStyle$d = {
|
|
4777
4777
|
label: 'ContactCard-bodyStyle',
|
|
4778
4778
|
display: 'flex',
|
|
4779
4779
|
flexDirection: 'column',
|
|
@@ -4820,7 +4820,7 @@ const linkTextStyle = {
|
|
|
4820
4820
|
const ContactCard$1 = ({ name, title, phone, email, action, showAvatar = true, className = '', }) => {
|
|
4821
4821
|
if (!action && !name)
|
|
4822
4822
|
return null;
|
|
4823
|
-
return (jsxs("div", { className: cx(sx(contactStyle$1), className), children: [name && showAvatar && jsx(Avatar, { name: name, size: 36 }), jsxs("div", { className: sx(bodyStyle$
|
|
4823
|
+
return (jsxs("div", { className: cx(sx(contactStyle$1), className), children: [name && showAvatar && jsx(Avatar, { name: name, size: 36 }), jsxs("div", { className: sx(bodyStyle$d), children: [jsxs("div", { className: sx(identityStyle$2), children: [action || jsx("span", { className: sx(nameStyle$6), children: name }), title && jsx("span", { className: sx(titleStyle$H), children: title })] }), phone && (jsxs("a", { href: `tel:${phone}`, className: sx(linkStyle$1), children: [jsx(PhoneIcon, { size: 16, "aria-hidden": "true" }), jsx("span", { className: sx(linkTextStyle), children: phone })] })), email && (jsxs("a", { href: `mailto:${email}`, className: sx(linkStyle$1), children: [jsx(MailIcon, { size: 16, "aria-hidden": "true" }), jsx("span", { className: sx(linkTextStyle), children: email })] }))] })] }));
|
|
4824
4824
|
};
|
|
4825
4825
|
ContactCard$1.displayName = 'ContactCard';
|
|
4826
4826
|
|
|
@@ -5148,7 +5148,7 @@ const titleStyle$G = {
|
|
|
5148
5148
|
fontWeight: 'var(--fw-semibold)',
|
|
5149
5149
|
lineHeight: 'var(--lh-base)',
|
|
5150
5150
|
};
|
|
5151
|
-
const descriptionStyle$
|
|
5151
|
+
const descriptionStyle$b = {
|
|
5152
5152
|
label: 'EmptyState-descriptionStyle',
|
|
5153
5153
|
maxWidth: '46ch',
|
|
5154
5154
|
margin: 0,
|
|
@@ -5156,7 +5156,7 @@ const descriptionStyle$a = {
|
|
|
5156
5156
|
fontSize: 'var(--fs-sm)',
|
|
5157
5157
|
lineHeight: 'var(--lh-sm)',
|
|
5158
5158
|
};
|
|
5159
|
-
const actionsStyle$
|
|
5159
|
+
const actionsStyle$d = {
|
|
5160
5160
|
label: 'EmptyState-actionsStyle',
|
|
5161
5161
|
display: 'flex',
|
|
5162
5162
|
flexWrap: 'wrap',
|
|
@@ -5166,7 +5166,7 @@ const actionsStyle$c = {
|
|
|
5166
5166
|
};
|
|
5167
5167
|
|
|
5168
5168
|
/** Placeholder shown when a list, table, or panel has nothing to display. */
|
|
5169
|
-
const EmptyState$1 = ({ title, description, icon, actionLabel, onAction, secondaryActionLabel, onSecondaryAction, size = 'md', children, className = '', }) => (jsxs("div", { className: cx(sx(emptyStateStyle$1), sx(sizeStyles$4[size]), className), "data-test": "empty-state", children: [icon && jsx("div", { className: sx(iconStyle$b), "aria-hidden": "true", children: icon }), jsx("p", { className: sx(titleStyle$G), children: title }), description && jsx("p", { className: sx(descriptionStyle$
|
|
5169
|
+
const EmptyState$1 = ({ title, description, icon, actionLabel, onAction, secondaryActionLabel, onSecondaryAction, size = 'md', children, className = '', }) => (jsxs("div", { className: cx(sx(emptyStateStyle$1), sx(sizeStyles$4[size]), className), "data-test": "empty-state", children: [icon && jsx("div", { className: sx(iconStyle$b), "aria-hidden": "true", children: icon }), jsx("p", { className: sx(titleStyle$G), children: title }), description && jsx("p", { className: sx(descriptionStyle$b), children: description }), (actionLabel || secondaryActionLabel) && (jsxs("div", { className: sx(actionsStyle$d), children: [actionLabel && (jsx(Button, { size: "sm", onClick: onAction, "data-test": "empty-state-action", children: actionLabel })), secondaryActionLabel && (jsx(Button, { size: "sm", variant: "secondary", onClick: onSecondaryAction, "data-test": "empty-state-secondary-action", children: secondaryActionLabel }))] })), children] }));
|
|
5170
5170
|
|
|
5171
5171
|
/** FieldLayout's compiled rules. */
|
|
5172
5172
|
const fieldStyle$4 = {
|
|
@@ -5250,7 +5250,7 @@ const errorStyle$1 = {
|
|
|
5250
5250
|
label: 'FieldLayout-errorStyle',
|
|
5251
5251
|
color: 'var(--color-error, #940000)',
|
|
5252
5252
|
};
|
|
5253
|
-
const noteStyle$
|
|
5253
|
+
const noteStyle$3 = {
|
|
5254
5254
|
label: 'FieldLayout-noteStyle',
|
|
5255
5255
|
color: 'var(--color-stone, #787878)',
|
|
5256
5256
|
};
|
|
@@ -5292,7 +5292,7 @@ const FieldLayout = ({ children, label, labelPosition = 'top', showLabel = true,
|
|
|
5292
5292
|
const hasError = Boolean(error);
|
|
5293
5293
|
const describedBy = [hint ? hintId : '', hasError ? errorId : ''].filter(Boolean).join(' ') || undefined;
|
|
5294
5294
|
const hintElement = hint ? (jsx("p", { id: hintId, className: cx(sx(messageStyle$2), sx(hintStyle$1), labelPosition === 'top' ? '' : sx(hintBesideStyle(Boolean(label && showLabel)))), children: hint })) : null;
|
|
5295
|
-
return (jsxs("div", { className: cx(sx(fieldStyle$4), sx(labelPositionStyles[labelPosition]), className), children: [label && showLabel && (jsxs("label", { htmlFor: id, className: cx(sx(labelStyle$b), hasError ? sx(labelErrorStyle) : ''), children: [label, required && !disabled && (jsx("span", { className: sx(requiredStyle$2), "aria-hidden": "true", children: "*" })), tooltip && (jsx(Tooltip, { className: sx(tooltipStyle$1), content: tooltip, children: jsx(InfoIcon$1, { size: 16 }) }))] })), labelPosition === 'top' && hintElement, jsxs("div", { className: sx(controlStyle$2), children: [leftIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconLeftStyle)), "aria-hidden": "true", children: leftIcon })), children({ id, describedBy, hasError }), rightIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconRightStyle)), "aria-hidden": "true", children: rightIcon }))] }), hasError && (jsx("p", { id: errorId, className: cx(sx(messageStyle$2), sx(errorStyle$1)), children: error })), note && jsx("p", { className: cx(sx(messageStyle$2), sx(noteStyle$
|
|
5295
|
+
return (jsxs("div", { className: cx(sx(fieldStyle$4), sx(labelPositionStyles[labelPosition]), className), children: [label && showLabel && (jsxs("label", { htmlFor: id, className: cx(sx(labelStyle$b), hasError ? sx(labelErrorStyle) : ''), children: [label, required && !disabled && (jsx("span", { className: sx(requiredStyle$2), "aria-hidden": "true", children: "*" })), tooltip && (jsx(Tooltip, { className: sx(tooltipStyle$1), content: tooltip, children: jsx(InfoIcon$1, { size: 16 }) }))] })), labelPosition === 'top' && hintElement, jsxs("div", { className: sx(controlStyle$2), children: [leftIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconLeftStyle)), "aria-hidden": "true", children: leftIcon })), children({ id, describedBy, hasError }), rightIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconRightStyle)), "aria-hidden": "true", children: rightIcon }))] }), hasError && (jsx("p", { id: errorId, className: cx(sx(messageStyle$2), sx(errorStyle$1)), children: error })), note && jsx("p", { className: cx(sx(messageStyle$2), sx(noteStyle$3)), children: note }), labelPosition !== 'top' && hintElement] }));
|
|
5296
5296
|
};
|
|
5297
5297
|
FieldLayout.displayName = 'FieldLayout';
|
|
5298
5298
|
|
|
@@ -5644,14 +5644,14 @@ const inputErrorStyle = {
|
|
|
5644
5644
|
boxShadow: '0 0 0 3px rgba(220, 38, 38, 0.1) !important',
|
|
5645
5645
|
},
|
|
5646
5646
|
};
|
|
5647
|
-
const helperTextStyle$
|
|
5647
|
+
const helperTextStyle$2 = {
|
|
5648
5648
|
label: 'FormField-helperTextStyle',
|
|
5649
5649
|
fontSize: 'var(--font-size-xs)',
|
|
5650
5650
|
color: 'var(--color-neutral-500)',
|
|
5651
5651
|
margin: 0,
|
|
5652
5652
|
lineHeight: 'var(--line-height-normal)',
|
|
5653
5653
|
};
|
|
5654
|
-
const errorTextStyle$
|
|
5654
|
+
const errorTextStyle$2 = {
|
|
5655
5655
|
label: 'FormField-errorTextStyle',
|
|
5656
5656
|
fontSize: 'var(--font-size-xs)',
|
|
5657
5657
|
color: 'var(--color-status-error)',
|
|
@@ -5709,12 +5709,12 @@ const FormField = forwardRef(({ label, helperText, error, required = false, hide
|
|
|
5709
5709
|
}
|
|
5710
5710
|
return (jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: cx(sx(inputElementStyle), hasError && sx(inputErrorStyle), inputProps?.className) }));
|
|
5711
5711
|
};
|
|
5712
|
-
return (jsxs("div", { className: cx(sx(formFieldStyle), className), children: [jsxs("label", { htmlFor: inputId, className: cx(sx(labelStyle$9), hideLabel && sx(visuallyHiddenStyle$2)), children: [label, required && jsx("span", { className: sx(requiredStyle$1), "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsx("p", { id: helperId, className: sx(helperTextStyle$
|
|
5712
|
+
return (jsxs("div", { className: cx(sx(formFieldStyle), className), children: [jsxs("label", { htmlFor: inputId, className: cx(sx(labelStyle$9), hideLabel && sx(visuallyHiddenStyle$2)), children: [label, required && jsx("span", { className: sx(requiredStyle$1), "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsx("p", { id: helperId, className: sx(helperTextStyle$2), children: helperText })), hasError && (jsx("p", { id: errorId, className: sx(errorTextStyle$2), role: "alert", children: error }))] }));
|
|
5713
5713
|
});
|
|
5714
5714
|
FormField.displayName = 'FormField';
|
|
5715
5715
|
|
|
5716
5716
|
/** FormRow's compiled rules. */
|
|
5717
|
-
const rowStyle$
|
|
5717
|
+
const rowStyle$9 = {
|
|
5718
5718
|
label: 'FormRow-rowStyle',
|
|
5719
5719
|
display: 'grid',
|
|
5720
5720
|
width: '100%',
|
|
@@ -5763,7 +5763,7 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
5763
5763
|
// With no children at all `colCount` is 0, which the module stylesheet met
|
|
5764
5764
|
// with a missing `.cols0` — no column rule. The cast keeps that shape honest.
|
|
5765
5765
|
const columnStyle = colsStyles[colCount];
|
|
5766
|
-
return (jsx("div", { className: cx(sx(rowStyle$
|
|
5766
|
+
return (jsx("div", { className: cx(sx(rowStyle$9), columnStyle ? sx(columnStyle) : '', sx(gapStyles$1[gap]), stackOnMobile ? sx(stackMobileStyle) : '', className || ''), children: children }));
|
|
5767
5767
|
};
|
|
5768
5768
|
FormRow.displayName = 'FormRow';
|
|
5769
5769
|
|
|
@@ -5785,14 +5785,14 @@ const sectionStyle$a = {
|
|
|
5785
5785
|
* Declared before `headerStyle` so its content-hashed class name can be
|
|
5786
5786
|
* resolved for the `:has()` below.
|
|
5787
5787
|
*/
|
|
5788
|
-
const descriptionStyle$
|
|
5788
|
+
const descriptionStyle$a = {
|
|
5789
5789
|
label: 'FormSection-descriptionStyle',
|
|
5790
5790
|
margin: '4px 0 0',
|
|
5791
5791
|
color: 'var(--fg-3, #5C5C5C)',
|
|
5792
5792
|
fontSize: 14,
|
|
5793
5793
|
lineHeight: 1.5,
|
|
5794
5794
|
};
|
|
5795
|
-
const headerStyle$
|
|
5795
|
+
const headerStyle$M = {
|
|
5796
5796
|
label: 'FormSection-headerStyle',
|
|
5797
5797
|
display: 'flex',
|
|
5798
5798
|
alignItems: 'center',
|
|
@@ -5802,7 +5802,7 @@ const headerStyle$L = {
|
|
|
5802
5802
|
rather than to the middle of the block. `:has()` is scored by its argument,
|
|
5803
5803
|
so this is (0,2,0) against the base rule's (0,1,0) — the same margin the
|
|
5804
5804
|
stylesheet had. */
|
|
5805
|
-
[`&:has(.${sx(descriptionStyle$
|
|
5805
|
+
[`&:has(.${sx(descriptionStyle$a)})`]: {
|
|
5806
5806
|
alignItems: 'flex-start',
|
|
5807
5807
|
},
|
|
5808
5808
|
};
|
|
@@ -5833,7 +5833,7 @@ const titleStyle$F = {
|
|
|
5833
5833
|
fontSize: 20,
|
|
5834
5834
|
},
|
|
5835
5835
|
};
|
|
5836
|
-
const fieldsetStyle = {
|
|
5836
|
+
const fieldsetStyle$2 = {
|
|
5837
5837
|
label: 'FormSection-fieldsetStyle',
|
|
5838
5838
|
display: 'flex',
|
|
5839
5839
|
flexDirection: 'column',
|
|
@@ -5890,12 +5890,12 @@ const statusStyles = {
|
|
|
5890
5890
|
const FormSection = ({ title, icon, description, action, status, disabled = false, children, className, id, dataTest, }) => {
|
|
5891
5891
|
const isSubmitted = status === 'submitted';
|
|
5892
5892
|
const isDisabled = disabled || isSubmitted;
|
|
5893
|
-
return (jsxs("div", { className: cx(sx(sectionStyle$a), className), id: id, "data-test": dataTest, children: [jsxs("div", { className: sx(headerStyle$
|
|
5893
|
+
return (jsxs("div", { className: cx(sx(sectionStyle$a), className), id: id, "data-test": dataTest, children: [jsxs("div", { className: sx(headerStyle$M), children: [icon && jsx("span", { className: sx(iconStyle$9), children: icon }), jsxs("div", { className: sx(headingStyle$5), children: [jsx("h2", { className: sx(titleStyle$F), children: title }), description && jsx("p", { className: sx(descriptionStyle$a), children: description })] }), action && jsx("div", { className: sx(actionStyle$1), children: action })] }), jsxs("fieldset", { disabled: isDisabled, className: cx(sx(fieldsetStyle$2), isDisabled && sx(disabledStyle$3)), children: [status && (jsxs("div", { className: sx(statusStyle$6), children: [jsx("span", { className: sx(statusLabelStyle), children: "Status:" }), jsx("span", { className: cx(sx(statusValueStyle), sx(statusStyles[status])), children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
5894
5894
|
};
|
|
5895
5895
|
FormSection.displayName = 'FormSection';
|
|
5896
5896
|
|
|
5897
5897
|
/** Vertical grid the form fields sit in. */
|
|
5898
|
-
const stackStyle$
|
|
5898
|
+
const stackStyle$6 = {
|
|
5899
5899
|
label: 'FormStack-stackStyle',
|
|
5900
5900
|
display: 'grid',
|
|
5901
5901
|
};
|
|
@@ -5907,7 +5907,7 @@ const gapStyles = {
|
|
|
5907
5907
|
};
|
|
5908
5908
|
|
|
5909
5909
|
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
5910
|
-
const FormStack = ({ children, gap = 'md', className = '' }) => (jsx("div", { className: cx(sx(stackStyle$
|
|
5910
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsx("div", { className: cx(sx(stackStyle$6), sx(gapStyles[gap]), className), children: children }));
|
|
5911
5911
|
|
|
5912
5912
|
/* IconRevealLink's rules — an icon that, on hover or keyboard focus, slides
|
|
5913
5913
|
its text label out beside it. The label is collapsed (zero width, clear,
|
|
@@ -6639,7 +6639,7 @@ const hintStyle = {
|
|
|
6639
6639
|
color: 'var(--fg-3)',
|
|
6640
6640
|
boxShadow: 'var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))',
|
|
6641
6641
|
};
|
|
6642
|
-
const helperTextStyle = {
|
|
6642
|
+
const helperTextStyle$1 = {
|
|
6643
6643
|
label: 'MultiUserSearch-helperTextStyle',
|
|
6644
6644
|
fontSize: 'var(--fs-xs)',
|
|
6645
6645
|
color: 'var(--fg-3)',
|
|
@@ -6649,7 +6649,7 @@ const helperTextStyle = {
|
|
|
6649
6649
|
* Doubled: `.errorText` and `.helperText` were both (0,1,0) and both set
|
|
6650
6650
|
* `color`, so the error colour won only by sitting later in the file.
|
|
6651
6651
|
*/
|
|
6652
|
-
const errorTextStyle = {
|
|
6652
|
+
const errorTextStyle$1 = {
|
|
6653
6653
|
label: 'MultiUserSearch-errorTextStyle',
|
|
6654
6654
|
'&&': {
|
|
6655
6655
|
color: 'var(--color-error)',
|
|
@@ -6785,7 +6785,7 @@ const MultiUserSearch = ({ label = 'Search users', placeholder = 'Type to search
|
|
|
6785
6785
|
return (jsxs("div", { ref: containerRef, className: cx(sx(containerStyle$4), disabled && sx(disabledStyle$2), className), "data-test": dataTest, children: [label && (jsx("label", { className: sx(labelStyle$8), htmlFor: `${dataTest}-input`, children: label })), selectedUsers.length > 0 && (jsx("div", { className: sx(selectedUsersStyle), "data-test": `${dataTest}-selected`, children: selectedUsers.map((user) => (jsx(Badge, { variant: "info", size: "sm", className: sx(selectedBadgeStyle), "data-test": `${dataTest}-selected-${user.id}`, children: jsxs("span", { className: sx(badgeContentStyle), children: [user.name, jsx("button", { type: "button", className: sx(removeButtonStyle$1), onClick: () => removeSelection(user.id), "aria-label": `Remove ${user.name}`, disabled: disabled, children: jsx(CloseIcon, { size: 12 }) })] }) }, user.id))) })), jsxs("div", { className: sx(inputWrapperStyle$1), children: [jsx(Input, { ref: inputRef, id: `${dataTest}-input`, type: "search", placeholder: placeholder, value: query, onChange: handleInputChange, onFocus: handleInputFocus, onKeyDown: handleKeyDown, disabled: disabled, leftIcon: jsx(SearchIcon$1, { size: 16 }), rightIcon: loading ? jsx(Spinner, { size: "xs", label: "Searching" }) : undefined, "aria-expanded": isOpen, "aria-controls": `${dataTest}-listbox`, "aria-autocomplete": "list", "aria-activedescendant": highlightedIndex >= 0
|
|
6786
6786
|
? `${dataTest}-option-${availableOptions[highlightedIndex]?.id}`
|
|
6787
6787
|
: undefined, role: "combobox", fullWidth: true, "data-test": `${dataTest}-input` }), showDropdown && (jsxs("ul", { ref: listRef, id: `${dataTest}-listbox`, className: sx(listboxStyle), role: "listbox", "aria-label": "Search results", "data-test": `${dataTest}-listbox`, children: [loading && (jsxs("li", { className: sx(loadingItemStyle), role: "status", children: [jsx(Spinner, { size: "sm", label: "Searching users" }), jsx("span", { children: "Searching users\u2026" })] })), !loading &&
|
|
6788
|
-
availableOptions.map((option, index) => (jsxs("li", { id: `${dataTest}-option-${option.id}`, role: "option", "aria-selected": highlightedIndex === index, "aria-disabled": option.disabled, className: cx(sx(optionStyle$2), highlightedIndex === index && sx(highlightedStyle), option.disabled && sx(optionDisabledStyle)), onClick: () => selectOption(option), title: option.disabledReason, "data-test": `${dataTest}-option-${option.id}`, children: [jsx("span", { className: sx(optionAvatarStyle$1), "aria-hidden": "true", children: jsx(UserIcon, { size: 16 }) }), jsxs("span", { className: sx(optionContentStyle), children: [jsx("span", { className: sx(optionNameStyle), children: option.name }), jsx("span", { className: sx(optionEmailStyle), children: option.email }), option.title && (jsx("span", { className: sx(optionTitleStyle), children: option.title }))] })] }, option.id))), showNoResults && (jsxs("li", { className: sx(noResultsStyle$1), role: "status", children: ["No users found matching \"", trimmedQuery, "\""] }))] })), showMinLengthHint && (jsxs("div", { className: sx(hintStyle), role: "status", children: ["Enter at least ", minSearchLength, " characters to search"] }))] }), (helperText || error) && (jsx("p", { className: cx(sx(helperTextStyle), error && sx(errorTextStyle)), role: error ? 'alert' : undefined, children: error || helperText }))] }));
|
|
6788
|
+
availableOptions.map((option, index) => (jsxs("li", { id: `${dataTest}-option-${option.id}`, role: "option", "aria-selected": highlightedIndex === index, "aria-disabled": option.disabled, className: cx(sx(optionStyle$2), highlightedIndex === index && sx(highlightedStyle), option.disabled && sx(optionDisabledStyle)), onClick: () => selectOption(option), title: option.disabledReason, "data-test": `${dataTest}-option-${option.id}`, children: [jsx("span", { className: sx(optionAvatarStyle$1), "aria-hidden": "true", children: jsx(UserIcon, { size: 16 }) }), jsxs("span", { className: sx(optionContentStyle), children: [jsx("span", { className: sx(optionNameStyle), children: option.name }), jsx("span", { className: sx(optionEmailStyle), children: option.email }), option.title && (jsx("span", { className: sx(optionTitleStyle), children: option.title }))] })] }, option.id))), showNoResults && (jsxs("li", { className: sx(noResultsStyle$1), role: "status", children: ["No users found matching \"", trimmedQuery, "\""] }))] })), showMinLengthHint && (jsxs("div", { className: sx(hintStyle), role: "status", children: ["Enter at least ", minSearchLength, " characters to search"] }))] }), (helperText || error) && (jsx("p", { className: cx(sx(helperTextStyle$1), error && sx(errorTextStyle$1)), role: error ? 'alert' : undefined, children: error || helperText }))] }));
|
|
6789
6789
|
};
|
|
6790
6790
|
MultiUserSearch.displayName = 'MultiUserSearch';
|
|
6791
6791
|
|
|
@@ -7026,7 +7026,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
7026
7026
|
* The header reserves its space even with nothing to show, fading in once a
|
|
7027
7027
|
* title arrives, so the page below does not jump as data loads.
|
|
7028
7028
|
*/
|
|
7029
|
-
const headerStyle$
|
|
7029
|
+
const headerStyle$L = {
|
|
7030
7030
|
label: 'PageHeader-headerStyle',
|
|
7031
7031
|
display: 'flex',
|
|
7032
7032
|
alignItems: 'flex-start',
|
|
@@ -7042,7 +7042,7 @@ const emptyStyle$n = {
|
|
|
7042
7042
|
opacity: 0,
|
|
7043
7043
|
pointerEvents: 'none',
|
|
7044
7044
|
};
|
|
7045
|
-
const bodyStyle$
|
|
7045
|
+
const bodyStyle$c = {
|
|
7046
7046
|
label: 'PageHeader-bodyStyle',
|
|
7047
7047
|
display: 'flex',
|
|
7048
7048
|
justifyContent: 'space-between',
|
|
@@ -7084,7 +7084,7 @@ const titleStyle$E = {
|
|
|
7084
7084
|
* The header keeps its height while `title` is empty and fades in once one
|
|
7085
7085
|
* arrives, so pages do not jump as their data loads.
|
|
7086
7086
|
*/
|
|
7087
|
-
const PageHeader = ({ title, pretitle, after, back, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$
|
|
7087
|
+
const PageHeader = ({ title, pretitle, after, back, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$L), !title && sx(emptyStyle$n), className), children: [back, jsx("div", { className: sx(bodyStyle$c), children: jsxs("div", { className: sx(textStyle), children: [pretitle && jsx("h2", { className: sx(pretitleStyle$1), children: pretitle }), jsxs("h1", { className: sx(titleStyle$E), children: [title, "\u00A0"] }), after] }) })] }));
|
|
7088
7088
|
PageHeader.displayName = 'PageHeader';
|
|
7089
7089
|
|
|
7090
7090
|
/**
|
|
@@ -7093,7 +7093,7 @@ PageHeader.displayName = 'PageHeader';
|
|
|
7093
7093
|
* The back arrow leads the section line, so the arrow and the page name both
|
|
7094
7094
|
* start on the page's left edge and the header lines up with the content below.
|
|
7095
7095
|
*/
|
|
7096
|
-
const headerStyle$
|
|
7096
|
+
const headerStyle$K = {
|
|
7097
7097
|
label: 'PageHeaderSubsection-headerStyle',
|
|
7098
7098
|
display: 'grid',
|
|
7099
7099
|
gridTemplateColumns: 'minmax(0, 1fr) auto',
|
|
@@ -7151,13 +7151,13 @@ const titleStyle$D = {
|
|
|
7151
7151
|
fontWeight: 400,
|
|
7152
7152
|
lineHeight: '44px',
|
|
7153
7153
|
};
|
|
7154
|
-
const metaStyle$
|
|
7154
|
+
const metaStyle$2 = {
|
|
7155
7155
|
label: 'PageHeaderSubsection-metaStyle',
|
|
7156
7156
|
gridArea: 'meta',
|
|
7157
7157
|
minWidth: 0,
|
|
7158
7158
|
marginTop: 4,
|
|
7159
7159
|
};
|
|
7160
|
-
const actionsStyle$
|
|
7160
|
+
const actionsStyle$c = {
|
|
7161
7161
|
label: 'PageHeaderSubsection-actionsStyle',
|
|
7162
7162
|
gridArea: 'actions',
|
|
7163
7163
|
display: 'flex',
|
|
@@ -7177,7 +7177,7 @@ const PageHeaderSubsection = ({ sectionName, pageName, meta, onBack, backLabel =
|
|
|
7177
7177
|
else
|
|
7178
7178
|
window.history.back();
|
|
7179
7179
|
};
|
|
7180
|
-
return (jsxs("div", { className: cx(sx(headerStyle$
|
|
7180
|
+
return (jsxs("div", { className: cx(sx(headerStyle$K), className), "data-test": "page-header-subsection", children: [jsxs("div", { className: sx(sectionRowStyle), children: [!hideBack && (jsx("button", { type: "button", className: sx(backButtonStyle$1), onClick: handleBack, "aria-label": backLabel, "data-test": "page-header-subsection-back", children: jsx(BackIcon$1, {}) })), jsx("p", { className: sx(sectionStyle$9), children: sectionName })] }), jsx("h1", { className: sx(titleStyle$D), children: pageName }), meta && jsx("div", { className: sx(metaStyle$2), children: meta }), actions && jsx("div", { className: sx(actionsStyle$c), children: actions })] }));
|
|
7181
7181
|
};
|
|
7182
7182
|
PageHeaderSubsection.displayName = 'PageHeaderSubsection';
|
|
7183
7183
|
|
|
@@ -7189,7 +7189,7 @@ const toneColors = {
|
|
|
7189
7189
|
success: { panel: 'var(--color-alert-success-bg)', accent: 'var(--color-success-accent)' },
|
|
7190
7190
|
error: { panel: 'var(--color-alert-error-bg)', accent: 'var(--color-danger-accent)' },
|
|
7191
7191
|
};
|
|
7192
|
-
const rootStyle$
|
|
7192
|
+
const rootStyle$3 = {
|
|
7193
7193
|
label: 'PanelTabs-rootStyle',
|
|
7194
7194
|
display: 'flex',
|
|
7195
7195
|
flexDirection: 'column',
|
|
@@ -7305,7 +7305,7 @@ const PanelTabs = ({ options, value, onChange, 'aria-label': ariaLabel, children
|
|
|
7305
7305
|
choose(event.key === 'Home' ? 0 : options.length - 1);
|
|
7306
7306
|
}
|
|
7307
7307
|
};
|
|
7308
|
-
return (jsxs("div", { className: cx(sx(rootStyle$
|
|
7308
|
+
return (jsxs("div", { className: cx(sx(rootStyle$3), className), children: [jsx("div", { className: cx(sx(tabListStyle), sx(shortenStyle(shortenBelow))), role: "radiogroup", "aria-label": ariaLabel, children: options.map((option, index) => {
|
|
7309
7309
|
const selected = index === chosen;
|
|
7310
7310
|
return (jsxs("button", { ref: (element) => {
|
|
7311
7311
|
tabs.current[index] = element;
|
|
@@ -7408,7 +7408,7 @@ const focusRing = {
|
|
|
7408
7408
|
* current page is matched on `[aria-current="page"]` instead — the component
|
|
7409
7409
|
* sets that attribute from the same expression that sets `currentStyle`.
|
|
7410
7410
|
*/
|
|
7411
|
-
const pageStyle$
|
|
7411
|
+
const pageStyle$v = {
|
|
7412
7412
|
label: 'Pagination-pageStyle',
|
|
7413
7413
|
...buttonBase,
|
|
7414
7414
|
'&:hover:not([aria-current="page"])': {
|
|
@@ -7491,7 +7491,7 @@ const Pagination = ({ page, pageSize, totalItems, siblingCount = 1, pageSizeOpti
|
|
|
7491
7491
|
return;
|
|
7492
7492
|
onPageChange?.(next);
|
|
7493
7493
|
};
|
|
7494
|
-
return (jsxs("nav", { className: cx(sx(paginationStyle$3), className), "aria-label": ariaLabel, "data-test": "pagination", children: [!hideSummary && (jsxs("p", { className: sx(summaryStyle$6), "data-test": "pagination-summary", children: ["Showing ", firstItem, "\u2013", lastItem, " of ", totalItems, " ", itemLabel] })), jsxs("div", { className: sx(controlsStyle), children: [showSizeSelector && (jsxs("label", { className: sx(pageSizeStyle), children: [jsx("span", { children: "Rows per page" }), jsx("select", { value: pageSize, onChange: (event) => onPageSizeChange?.(Number(event.target.value)), "data-test": "pagination-page-size", children: pageSizeOptions.map((option) => (jsx("option", { value: option, children: option }, option))) })] })), jsxs("ul", { className: sx(pagesStyle), children: [jsx("li", { children: jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage - 1), disabled: currentPage <= 1, "aria-label": "Previous page", "data-test": "pagination-previous", children: jsx(ChevronLeftIcon, { size: 16 }) }) }), items.map((item, index) => item === 'ellipsis' ? (jsx("li", { className: sx(ellipsisStyle), "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`)) : (jsx("li", { children: jsx("button", { type: "button", className: cx(sx(pageStyle$
|
|
7494
|
+
return (jsxs("nav", { className: cx(sx(paginationStyle$3), className), "aria-label": ariaLabel, "data-test": "pagination", children: [!hideSummary && (jsxs("p", { className: sx(summaryStyle$6), "data-test": "pagination-summary", children: ["Showing ", firstItem, "\u2013", lastItem, " of ", totalItems, " ", itemLabel] })), jsxs("div", { className: sx(controlsStyle), children: [showSizeSelector && (jsxs("label", { className: sx(pageSizeStyle), children: [jsx("span", { children: "Rows per page" }), jsx("select", { value: pageSize, onChange: (event) => onPageSizeChange?.(Number(event.target.value)), "data-test": "pagination-page-size", children: pageSizeOptions.map((option) => (jsx("option", { value: option, children: option }, option))) })] })), jsxs("ul", { className: sx(pagesStyle), children: [jsx("li", { children: jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage - 1), disabled: currentPage <= 1, "aria-label": "Previous page", "data-test": "pagination-previous", children: jsx(ChevronLeftIcon, { size: 16 }) }) }), items.map((item, index) => item === 'ellipsis' ? (jsx("li", { className: sx(ellipsisStyle), "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`)) : (jsx("li", { children: jsx("button", { type: "button", className: cx(sx(pageStyle$v), item === currentPage && sx(currentStyle)), onClick: () => goTo(item), "aria-label": `Page ${item}`, "aria-current": item === currentPage ? 'page' : undefined, "data-test": `pagination-page-${item}`, children: item }) }, item))), jsx("li", { children: jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage + 1), disabled: currentPage >= pageCount, "aria-label": "Next page", "data-test": "pagination-next", children: jsx(ChevronRightIcon$1, { size: 16 }) }) })] })] })] }));
|
|
7495
7495
|
};
|
|
7496
7496
|
|
|
7497
7497
|
/* Progress Bar */
|
|
@@ -7958,7 +7958,7 @@ const SearchField = forwardRef(({ placeholder = 'Search...', value, defaultValue
|
|
|
7958
7958
|
SearchField.displayName = 'SearchField';
|
|
7959
7959
|
|
|
7960
7960
|
/** The form's own vertical rhythm. */
|
|
7961
|
-
const formStyle$
|
|
7961
|
+
const formStyle$6 = {
|
|
7962
7962
|
label: 'SchoolContactForm-formStyle',
|
|
7963
7963
|
display: 'grid',
|
|
7964
7964
|
gap: 16,
|
|
@@ -8017,7 +8017,7 @@ const phoneFieldsStyle = {
|
|
|
8017
8017
|
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
8018
8018
|
* consuming applications retain their form state, validation, and masking.
|
|
8019
8019
|
*/
|
|
8020
|
-
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxs("div", { className: cx(sx(formStyle$
|
|
8020
|
+
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxs("div", { className: cx(sx(formStyle$6), className), children: [mode === 'Add' && (jsxs(Fragment, { children: [jsxs("div", { children: [jsx("label", { className: sx(portalLabelStyle), children: "Create From Portal User" }), createFromPortalUser] }), jsx("div", { className: sx(dividerStyle$2), children: jsx("strong", { children: "OR" }) }), jsx("p", { className: sx(newContactLabelStyle), children: "Create New Contact Without Portal Access" })] })), jsxs("div", { className: sx(nameFieldsStyle), children: [firstNameField, middleInitialField, lastNameField] }), jsxs("div", { className: sx(phoneFieldsStyle), children: [businessPhoneField, cellPhoneField] }), jsx("div", { children: emailField })] }));
|
|
8021
8021
|
|
|
8022
8022
|
const segmentStyle$2 = {
|
|
8023
8023
|
label: 'Segment-segmentStyle',
|
|
@@ -8151,7 +8151,7 @@ SportCodeBadge.displayName = 'SportCodeBadge';
|
|
|
8151
8151
|
* the job this component exists for (tabbed dropdowns jumped as each tab's
|
|
8152
8152
|
* longest option changed).
|
|
8153
8153
|
*/
|
|
8154
|
-
const stackStyle$
|
|
8154
|
+
const stackStyle$5 = {
|
|
8155
8155
|
label: 'TabPanelStack-stackStyle',
|
|
8156
8156
|
display: 'grid',
|
|
8157
8157
|
};
|
|
@@ -8180,7 +8180,7 @@ const hiddenPanelStyle = {
|
|
|
8180
8180
|
* focus order and the accessibility tree (`aria-hidden` says so explicitly),
|
|
8181
8181
|
* so only the visible one can be read or tabbed to.
|
|
8182
8182
|
*/
|
|
8183
|
-
const TabPanelStack = ({ panels, activeId, idPrefix, className = '' }) => (jsx("div", { className: [sx(stackStyle$
|
|
8183
|
+
const TabPanelStack = ({ panels, activeId, idPrefix, className = '' }) => (jsx("div", { className: [sx(stackStyle$5), className].filter(Boolean).join(' '), children: panels.map(({ id, content, labelledBy }) => {
|
|
8184
8184
|
const active = id === activeId;
|
|
8185
8185
|
return (jsx("div", { id: idPrefix ? `${idPrefix}-${id}` : undefined, role: "tabpanel", "aria-labelledby": labelledBy, "aria-hidden": active ? undefined : true, className: [sx(panelStyle$9), !active && sx(hiddenPanelStyle)].filter(Boolean).join(' '), children: content }, id));
|
|
8186
8186
|
}) }));
|
|
@@ -8400,7 +8400,7 @@ TabStrip.displayName = 'TabStrip';
|
|
|
8400
8400
|
* inherit the title's display font and size. `&&` (0,2,0) so a host's descendant
|
|
8401
8401
|
* rule (e.g. `.title span`, 0,1,1) can't restyle it either.
|
|
8402
8402
|
*/
|
|
8403
|
-
const rootStyle$
|
|
8403
|
+
const rootStyle$2 = {
|
|
8404
8404
|
label: 'TeamPicker-rootStyle',
|
|
8405
8405
|
'&&': {
|
|
8406
8406
|
fontFamily: 'var(--font-family-base, Inter, system-ui, sans-serif)',
|
|
@@ -8520,7 +8520,7 @@ const TeamPicker = ({ groups, groupOrder, activeGroup, onGroupChange, mode = 'si
|
|
|
8520
8520
|
onOnly(value);
|
|
8521
8521
|
}, children: "Only" }))] }, value));
|
|
8522
8522
|
};
|
|
8523
|
-
return (jsxs("div", { className: sx(rootStyle$
|
|
8523
|
+
return (jsxs("div", { className: sx(rootStyle$2), children: [jsx("div", { className: sx(tabRowStyle), children: jsx(TabStrip, { idPrefix: uid, accent: "teal", "aria-label": ariaLabel, activeTab: current, onTabChange: changeGroup, tabs: ids.map((id) => {
|
|
8524
8524
|
const values = (groups[id] ?? []).map(teamValue);
|
|
8525
8525
|
const count = values.filter((value) => selected.includes(value)).length;
|
|
8526
8526
|
const all = values.length > 0 && count === values.length;
|
|
@@ -8548,7 +8548,7 @@ TeamPicker.displayName = 'TeamPicker';
|
|
|
8548
8548
|
*/
|
|
8549
8549
|
/** Shrink-wrapped, as before: inline content stays beside it, and the icon
|
|
8550
8550
|
* trigger's right-aligned panel hangs from the icon, not the container. */
|
|
8551
|
-
const rootStyle = {
|
|
8551
|
+
const rootStyle$1 = {
|
|
8552
8552
|
label: 'SelectFilter-rootStyle',
|
|
8553
8553
|
position: 'relative',
|
|
8554
8554
|
display: 'inline-block',
|
|
@@ -8758,7 +8758,7 @@ const choicesStyle = {
|
|
|
8758
8758
|
overflowY: 'auto',
|
|
8759
8759
|
};
|
|
8760
8760
|
/** Extra content above the title, ruled off from the choices. */
|
|
8761
|
-
const headerStyle$
|
|
8761
|
+
const headerStyle$J = {
|
|
8762
8762
|
label: 'SelectFilter-headerStyle',
|
|
8763
8763
|
padding: '6px 12px 10px',
|
|
8764
8764
|
marginBottom: 'var(--space-1)',
|
|
@@ -8873,7 +8873,7 @@ const optionBodyStyle = {
|
|
|
8873
8873
|
};
|
|
8874
8874
|
const optionLabelStyle = { label: 'SelectFilter-optionLabelStyle', flex: 1 };
|
|
8875
8875
|
/** Text for assistive technology only (a trigger's state the eye reads from colour). */
|
|
8876
|
-
const srOnlyStyle$
|
|
8876
|
+
const srOnlyStyle$4 = { label: 'SelectFilter-srOnlyStyle', ...srOnly };
|
|
8877
8877
|
|
|
8878
8878
|
/**
|
|
8879
8879
|
* One flat option. A single pick is a button. A multi-select row is its
|
|
@@ -9106,7 +9106,7 @@ const SelectFilter = forwardRef(({ label, options = [], groupedOptions = {}, gro
|
|
|
9106
9106
|
else if (trigger === 'filter') {
|
|
9107
9107
|
triggerElement = (
|
|
9108
9108
|
// An outlined pill, blue while open or while a filter is in effect.
|
|
9109
|
-
jsxs("button", { "aria-expanded": isOpen, className: cx(sx(filterPillStyle), isOpen || active ? sx(filterPillActiveStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsx(Icon, { name: "Filter", size: 16 }), triggerLabel, active && !(activeCount > 0) && jsx("span", { className: sx(srOnlyStyle$
|
|
9109
|
+
jsxs("button", { "aria-expanded": isOpen, className: cx(sx(filterPillStyle), isOpen || active ? sx(filterPillActiveStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsx(Icon, { name: "Filter", size: 16 }), triggerLabel, active && !(activeCount > 0) && jsx("span", { className: sx(srOnlyStyle$4), children: " (filter on)" }), activeCount > 0 && (jsx("span", { "aria-label": `${activeCount} on`, className: sx(filterCountStyle), children: activeCount }))] }));
|
|
9110
9110
|
}
|
|
9111
9111
|
else if (trigger === 'link') {
|
|
9112
9112
|
triggerElement = (jsxs("button", { "aria-expanded": isOpen, "aria-label": `Filter by ${label}: ${triggerText}`, className: sx(linkTriggerStyle), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [singleTeam ? (jsxs("span", { className: sx(teamValueStyle), children: [jsx(SportCodeBadge, { code: codeOf(singleTeam), group: singleTeamTab && isSportCodeGroup(singleTeamTab) ? singleTeamTab : undefined }), jsx("span", { children: singleTeam.name ?? singleTeam.label })] })) : (jsx("span", { children: triggerText })), chevron] }));
|
|
@@ -9114,13 +9114,13 @@ const SelectFilter = forwardRef(({ label, options = [], groupedOptions = {}, gro
|
|
|
9114
9114
|
else {
|
|
9115
9115
|
triggerElement = (jsxs("button", { "aria-expanded": isOpen, "aria-label": `${label}: ${triggerText}`, className: cx(sx(fieldTriggerStyle), fullWidth ? sx(fieldTriggerFullStyle) : '', disabled ? sx(fieldTriggerDisabledStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsx("span", { className: sx(tagsStyle$1), children: isAll ? (jsxs("span", { className: sx(tagStyle), "data-testid": `${label}-option-all`, children: ["All ", label, "s"] })) : !chosen.length ? (jsx("span", { className: sx(placeholderStyle), children: placeholderText })) : (jsxs(Fragment, { children: [chosen.slice(0, tagLimit).map(renderTag), remaining > 0 && (jsxs("span", { className: sx(tagStyle), "data-testid": `${label}-option-remaining`, children: ["+", remaining] }))] })) }), jsx("span", { className: sx(chevronButtonStyle), children: chevron })] }));
|
|
9116
9116
|
}
|
|
9117
|
-
return (jsxs("div", { className: cx(sx(rootStyle), fullWidth ? sx(fullWidthStyle) : '', className ?? ''), ref: (element) => {
|
|
9117
|
+
return (jsxs("div", { className: cx(sx(rootStyle$1), fullWidth ? sx(fullWidthStyle) : '', className ?? ''), ref: (element) => {
|
|
9118
9118
|
rootRef.current = element;
|
|
9119
9119
|
if (typeof ref === 'function')
|
|
9120
9120
|
ref(element);
|
|
9121
9121
|
else if (ref)
|
|
9122
9122
|
ref.current = element;
|
|
9123
|
-
}, children: [triggerElement, isOpen && (jsxs("div", { className: cx(sx(panelStyle$8), sx(trigger === 'icon' || trigger === 'filter' ? panelRightStyle : panelLeftStyle)), style: width ? { minWidth: width } : undefined, children: [header && jsx("div", { className: sx(headerStyle$
|
|
9123
|
+
}, children: [triggerElement, isOpen && (jsxs("div", { className: cx(sx(panelStyle$8), sx(trigger === 'icon' || trigger === 'filter' ? panelRightStyle : panelLeftStyle)), style: width ? { minWidth: width } : undefined, children: [header && jsx("div", { className: sx(headerStyle$J), children: header }), (title || showAllLink) && (jsxs("div", { className: sx(titleRowStyle$5), children: [title && jsx("span", { className: sx(titleStyle$C), children: title }), showAllLink && (jsx("button", { className: sx(allLinkStyle), onClick: selectAll, type: "button", children: "All" }))] })), jsx("div", { className: sx(choicesStyle), ref: choicesRef, children: grouped ? (
|
|
9124
9124
|
// Multi-select stages here (with a select-all per tab and "Only");
|
|
9125
9125
|
// Apply below commits it. A single pick commits at once.
|
|
9126
9126
|
jsx(TeamPicker, { activeGroup: activeTab, "aria-label": `${label} groups`, emptyMessage: "No options found", groupOrder: tabs, groups: teamGroups, mode: multiselect ? 'multiple' : 'single', onGroupChange: setActiveTab, onOnly: (key) => only(byKey(key)), onSelect: (key) => select(byKey(key)), onToggle: (key) => select(byKey(key)), onToggleGroup: (_, keys) => toggleGroup(keys.map(byKey)), selected: staged.map(keyOf) })) : currentOptions.length === 0 ? (jsx("div", { className: sx(emptyStyle$l), children: "No options found" })) : (jsxs(Fragment, { children: [multiselect && !hideCheckAll && (
|
|
@@ -9291,7 +9291,7 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
9291
9291
|
};
|
|
9292
9292
|
|
|
9293
9293
|
/** Sticks to the top of the calendar column as the schedule scrolls past. */
|
|
9294
|
-
const headerStyle$
|
|
9294
|
+
const headerStyle$I = {
|
|
9295
9295
|
label: 'TeamCalendarHeader-headerStyle',
|
|
9296
9296
|
position: 'sticky',
|
|
9297
9297
|
top: 0,
|
|
@@ -9303,7 +9303,7 @@ const headerStyle$H = {
|
|
|
9303
9303
|
justifyContent: 'space-between',
|
|
9304
9304
|
},
|
|
9305
9305
|
};
|
|
9306
|
-
const rowStyle$
|
|
9306
|
+
const rowStyle$8 = {
|
|
9307
9307
|
label: 'TeamCalendarHeader-rowStyle',
|
|
9308
9308
|
display: 'flex',
|
|
9309
9309
|
justifyContent: 'space-between',
|
|
@@ -9357,7 +9357,7 @@ const contentStyle$8 = {
|
|
|
9357
9357
|
* It sticks to the top of its column so the team stays identifiable while the
|
|
9358
9358
|
* schedule scrolls.
|
|
9359
9359
|
*/
|
|
9360
|
-
const TeamCalendarHeader = ({ teamCode, teamFullName, children, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$
|
|
9360
|
+
const TeamCalendarHeader = ({ teamCode, teamFullName, children, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$I), className), children: [jsx("div", { className: sx(rowStyle$8), children: jsxs("div", { className: sx(identityStyle$1), children: [jsx("div", { className: sx(codeStyle$3), children: teamCode }), teamFullName && jsx("span", { className: sx(nameStyle$4), children: teamFullName })] }) }), jsx("div", { className: sx(contentStyle$8), children: children })] }));
|
|
9361
9361
|
TeamCalendarHeader.displayName = 'TeamCalendarHeader';
|
|
9362
9362
|
|
|
9363
9363
|
/**
|
|
@@ -9374,7 +9374,7 @@ const subMenuStyle = {
|
|
|
9374
9374
|
label: 'TeamHeader-subMenuStyle',
|
|
9375
9375
|
marginBottom: 24,
|
|
9376
9376
|
};
|
|
9377
|
-
const headerStyle$
|
|
9377
|
+
const headerStyle$H = {
|
|
9378
9378
|
label: 'TeamHeader-headerStyle',
|
|
9379
9379
|
display: 'flex',
|
|
9380
9380
|
alignItems: 'flex-start',
|
|
@@ -9440,7 +9440,7 @@ const titleStyle$B = {
|
|
|
9440
9440
|
lineHeight: '52px',
|
|
9441
9441
|
},
|
|
9442
9442
|
};
|
|
9443
|
-
const actionsStyle$
|
|
9443
|
+
const actionsStyle$b = {
|
|
9444
9444
|
label: 'TeamHeader-actionsStyle',
|
|
9445
9445
|
display: 'flex',
|
|
9446
9446
|
alignItems: 'center',
|
|
@@ -9455,7 +9455,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
9455
9455
|
const title = suppliedTitle ?? (teamCode && teamName
|
|
9456
9456
|
? `${teamCode} - ${teamName}`
|
|
9457
9457
|
: teamName || teamCode || '');
|
|
9458
|
-
const headerClasses = cx(sx(headerStyle$
|
|
9458
|
+
const headerClasses = cx(sx(headerStyle$H), !title && sx(emptyStyle$k), className);
|
|
9459
9459
|
const handleBack = () => {
|
|
9460
9460
|
if (onBack) {
|
|
9461
9461
|
onBack();
|
|
@@ -9465,7 +9465,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
9465
9465
|
window.location.href = backHref;
|
|
9466
9466
|
}
|
|
9467
9467
|
};
|
|
9468
|
-
return (jsxs("div", { className: headerClasses, "data-test": "team-header", children: [jsxs("div", { className: sx(leftStyle$1), children: [(backHref || onBack) && (jsx("button", { type: "button", className: sx(backButtonStyle), onClick: handleBack, "aria-label": "Go back", "data-test": "team-header-back", children: jsx(BackIcon, {}) })), jsxs("div", { className: sx(titlesStyle), children: [pretitle && jsx("span", { className: sx(pretitleStyle), children: pretitle }), jsxs("h1", { className: sx(titleStyle$B), children: [title, "\u00A0"] })] })] }), actions && (jsx("div", { className: sx(actionsStyle$
|
|
9468
|
+
return (jsxs("div", { className: headerClasses, "data-test": "team-header", children: [jsxs("div", { className: sx(leftStyle$1), children: [(backHref || onBack) && (jsx("button", { type: "button", className: sx(backButtonStyle), onClick: handleBack, "aria-label": "Go back", "data-test": "team-header-back", children: jsx(BackIcon, {}) })), jsxs("div", { className: sx(titlesStyle), children: [pretitle && jsx("span", { className: sx(pretitleStyle), children: pretitle }), jsxs("h1", { className: sx(titleStyle$B), children: [title, "\u00A0"] })] })] }), actions && (jsx("div", { className: sx(actionsStyle$b), children: actions }))] }));
|
|
9469
9469
|
};
|
|
9470
9470
|
const DEFAULT_TABS$1 = [
|
|
9471
9471
|
{ id: 'profile', label: 'Profile' },
|
|
@@ -9609,7 +9609,7 @@ const locationStyle = {
|
|
|
9609
9609
|
fontWeight: 'var(--font-semibold)',
|
|
9610
9610
|
color: 'var(--color-gray-900)',
|
|
9611
9611
|
};
|
|
9612
|
-
const routeStyle$
|
|
9612
|
+
const routeStyle$4 = {
|
|
9613
9613
|
label: 'TripSegment-routeStyle',
|
|
9614
9614
|
display: 'flex',
|
|
9615
9615
|
alignItems: 'center',
|
|
@@ -9691,7 +9691,7 @@ const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
|
9691
9691
|
if (!flights || flights.length === 0) {
|
|
9692
9692
|
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsx("span", { className: sx(emptyStyle$j), children: "No flights" }) }));
|
|
9693
9693
|
}
|
|
9694
|
-
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(PlaneIcon$2, {}), jsx("span", { className: sx(itemTypeStyle), children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxs("div", { className: sx(routeStyle$
|
|
9694
|
+
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(PlaneIcon$2, {}), jsx("span", { className: sx(itemTypeStyle), children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxs("div", { className: sx(routeStyle$4), children: [jsx("span", { className: sx(locationStyle), children: flight.departure }), jsx(ArrowIcon, {}), jsx("span", { className: sx(locationStyle), children: flight.arrival })] }), jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: flight.departureDate }), flight.departureTime && jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: flight.airline }), flight.flightNumber && jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
9695
9695
|
};
|
|
9696
9696
|
/**
|
|
9697
9697
|
* GroundSegment component for displaying ground transportation
|
|
@@ -9700,7 +9700,7 @@ const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
|
9700
9700
|
if (!segments || segments.length === 0) {
|
|
9701
9701
|
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsx("span", { className: sx(emptyStyle$j), children: "No ground transportation" }) }));
|
|
9702
9702
|
}
|
|
9703
|
-
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(BusIcon$1, {}), jsx("span", { className: sx(itemTypeStyle), children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxs("div", { className: sx(routeStyle$
|
|
9703
|
+
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(BusIcon$1, {}), jsx("span", { className: sx(itemTypeStyle), children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxs("div", { className: sx(routeStyle$4), children: [jsx("span", { className: sx(locationStyle), children: segment.pickupLocation }), jsx(ArrowIcon, {}), jsx("span", { className: sx(locationStyle), children: segment.dropoffLocation })] }), jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: segment.company }), segment.vehicleCount && jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
9704
9704
|
};
|
|
9705
9705
|
/**
|
|
9706
9706
|
* HotelSegment component for displaying hotel information
|
|
@@ -9747,7 +9747,7 @@ const panelStyle$7 = {
|
|
|
9747
9747
|
borderRadius: 'var(--radius-xl)',
|
|
9748
9748
|
backgroundColor: 'var(--bg-surface)',
|
|
9749
9749
|
};
|
|
9750
|
-
const panelTitleStyle = {
|
|
9750
|
+
const panelTitleStyle$1 = {
|
|
9751
9751
|
label: 'AcmiQuoteCalculator-panelTitleStyle',
|
|
9752
9752
|
margin: 0,
|
|
9753
9753
|
color: 'var(--fg-1)',
|
|
@@ -9818,7 +9818,7 @@ const legErrorStyle = {
|
|
|
9818
9818
|
color: 'var(--color-error)',
|
|
9819
9819
|
fontSize: 'var(--fs-sm)',
|
|
9820
9820
|
};
|
|
9821
|
-
const actionsStyle$
|
|
9821
|
+
const actionsStyle$a = {
|
|
9822
9822
|
label: 'AcmiQuoteCalculator-actionsStyle',
|
|
9823
9823
|
display: 'flex',
|
|
9824
9824
|
flexWrap: 'wrap',
|
|
@@ -10056,10 +10056,10 @@ const AcmiQuoteCalculator = ({ carrierOptions = ACMI_CARRIER_OPTIONS, aircraftOp
|
|
|
10056
10056
|
const seatHint = specs
|
|
10057
10057
|
? `Maximum ${specs.seats} passengers for this aircraft`
|
|
10058
10058
|
: 'Select an aircraft to see seat capacity';
|
|
10059
|
-
return (jsxs("div", { className: cx(sx(calculatorStyle$1), className), "data-test": "acmi-quote-calculator", children: [showErrors && errorList.length > 0 && (jsx(Alert, { variant: "error", title: "Fix these before calculating", children: jsx("ul", { className: sx(errorSummaryStyle$1), "data-test": "acmi-error-summary", children: errorList.map(([field, message]) => (jsx("li", { children: message }, field))) }) })), calculationError && (jsx(Alert, { variant: "error", title: "Quote could not be calculated", children: jsx("p", { className: sx(alertMessageStyle), "data-test": "acmi-calculation-error", children: calculationError }) })), jsxs("div", { className: sx(columnsStyle), children: [jsxs("section", { className: sx(panelStyle$7), "aria-label": "Quote configuration", children: [jsx("h3", { className: sx(panelTitleStyle), children: "Quote Configuration" }), jsx(Select, { id: "acmi-carrier", label: "Carrier", placeholder: "Select Carrier\u2026", options: carrierOptions, value: inputs.carrier, error: showErrors ? errors.carrier : undefined, onChange: (event) => updateCarrier(event.target.value), "data-test": "acmi-carrier" }), jsx(Select, { id: "acmi-aircraft", label: "Aircraft Type", placeholder: "Select Aircraft\u2026", options: availableAircraftOptions, value: inputs.aircraft, disabled: !inputs.carrier, error: showErrors ? errors.aircraft : undefined, onChange: (event) => update('aircraft', event.target.value), "data-test": "acmi-aircraft" }), jsx(Input, { id: "acmi-passengers", type: "number", label: "Number of Passengers", placeholder: "Enter passenger count", helperText: seatHint, value: inputs.passengers, error: showErrors ? errors.passengers : undefined, onChange: (event) => update('passengers', event.target.value), "data-test": "acmi-passengers" }), jsx(Input, { id: "acmi-fuel-price", type: "number", step: "0.01", label: "Fuel Price ($/gallon)", placeholder: "e.g. 5.50", value: inputs.fuelPrice, error: showErrors ? errors.fuelPrice : undefined, onChange: (event) => update('fuelPrice', event.target.value), "data-test": "acmi-fuel-price" }), jsx(Input, { id: "acmi-markup", type: "number", step: "0.1", label: "Markup %", helperText: "Standard is 7% \u2014 adjustable as needed", value: inputs.markupPercent, onChange: (event) => update('markupPercent', event.target.value), "data-test": "acmi-markup" }), jsx(Input, { id: "acmi-insurance", label: "Insurance (Flat Fee)", helperText: `${currency.format(insuranceFlat)} per trip (locked)`, value: currency.format(insuranceFlat), readOnly: true, disabled: true, "data-test": "acmi-insurance" }), jsx(Input, { id: "acmi-crew-nights", type: "number", label: "Crew Nights (RON)", helperText: "Number of nights crew stays away from base", value: inputs.crewNights, onChange: (event) => update('crewNights', event.target.value), "data-test": "acmi-crew-nights" }), showTripMonth && (jsx(Select, { id: "acmi-trip-month", label: "Trip Month (for Historic Winds)", options: TRIP_MONTH_OPTIONS, helperText: "Use this only when the configured pricing service applies a historic winds profile.", value: inputs.tripMonth, onChange: (event) => update('tripMonth', event.target.value), "data-test": "acmi-trip-month" }))] }), jsxs("section", { className: sx(panelStyle$7), "aria-label": "Flight itinerary", children: [jsx("h3", { className: sx(panelTitleStyle), children: "Flight Itinerary" }), jsx(Alert, { variant: "primary", children: positioningMode === 'automatic' ? (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "live legs only" }), ", in trip order. The host pricing engine adds positioning ferry legs automatically. Leave flight time blank to use its route estimate; an entered time is treated as an explicit contractual input."] })) : (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "every flown leg in order" }), ", including positioning. Mark each leg as live or ferry. Leave flight time blank to use the pricing engine\u2019s route estimate; an entered time is treated as an explicit contractual input."] })) }), showErrors && errors.legs && (jsx("p", { className: sx(legErrorStyle), role: "alert", "data-test": "acmi-legs-error", children: errors.legs })), jsx("ol", { className: sx(legsStyle$3), children: inputs.legs.map((leg, index) => (jsxs("li", { className: cx(sx(legStyle$2), positioningMode === 'automatic' && sx(automaticLegStyle)), "data-test": "acmi-leg", children: [jsxs("span", { className: sx(legIndexStyle$1), children: ["Leg ", index + 1] }), positioningMode === 'explicit' && (jsx(Select, { id: `${leg.id}-type`, size: "sm", label: "Leg type", options: [
|
|
10059
|
+
return (jsxs("div", { className: cx(sx(calculatorStyle$1), className), "data-test": "acmi-quote-calculator", children: [showErrors && errorList.length > 0 && (jsx(Alert, { variant: "error", title: "Fix these before calculating", children: jsx("ul", { className: sx(errorSummaryStyle$1), "data-test": "acmi-error-summary", children: errorList.map(([field, message]) => (jsx("li", { children: message }, field))) }) })), calculationError && (jsx(Alert, { variant: "error", title: "Quote could not be calculated", children: jsx("p", { className: sx(alertMessageStyle), "data-test": "acmi-calculation-error", children: calculationError }) })), jsxs("div", { className: sx(columnsStyle), children: [jsxs("section", { className: sx(panelStyle$7), "aria-label": "Quote configuration", children: [jsx("h3", { className: sx(panelTitleStyle$1), children: "Quote Configuration" }), jsx(Select, { id: "acmi-carrier", label: "Carrier", placeholder: "Select Carrier\u2026", options: carrierOptions, value: inputs.carrier, error: showErrors ? errors.carrier : undefined, onChange: (event) => updateCarrier(event.target.value), "data-test": "acmi-carrier" }), jsx(Select, { id: "acmi-aircraft", label: "Aircraft Type", placeholder: "Select Aircraft\u2026", options: availableAircraftOptions, value: inputs.aircraft, disabled: !inputs.carrier, error: showErrors ? errors.aircraft : undefined, onChange: (event) => update('aircraft', event.target.value), "data-test": "acmi-aircraft" }), jsx(Input, { id: "acmi-passengers", type: "number", label: "Number of Passengers", placeholder: "Enter passenger count", helperText: seatHint, value: inputs.passengers, error: showErrors ? errors.passengers : undefined, onChange: (event) => update('passengers', event.target.value), "data-test": "acmi-passengers" }), jsx(Input, { id: "acmi-fuel-price", type: "number", step: "0.01", label: "Fuel Price ($/gallon)", placeholder: "e.g. 5.50", value: inputs.fuelPrice, error: showErrors ? errors.fuelPrice : undefined, onChange: (event) => update('fuelPrice', event.target.value), "data-test": "acmi-fuel-price" }), jsx(Input, { id: "acmi-markup", type: "number", step: "0.1", label: "Markup %", helperText: "Standard is 7% \u2014 adjustable as needed", value: inputs.markupPercent, onChange: (event) => update('markupPercent', event.target.value), "data-test": "acmi-markup" }), jsx(Input, { id: "acmi-insurance", label: "Insurance (Flat Fee)", helperText: `${currency.format(insuranceFlat)} per trip (locked)`, value: currency.format(insuranceFlat), readOnly: true, disabled: true, "data-test": "acmi-insurance" }), jsx(Input, { id: "acmi-crew-nights", type: "number", label: "Crew Nights (RON)", helperText: "Number of nights crew stays away from base", value: inputs.crewNights, onChange: (event) => update('crewNights', event.target.value), "data-test": "acmi-crew-nights" }), showTripMonth && (jsx(Select, { id: "acmi-trip-month", label: "Trip Month (for Historic Winds)", options: TRIP_MONTH_OPTIONS, helperText: "Use this only when the configured pricing service applies a historic winds profile.", value: inputs.tripMonth, onChange: (event) => update('tripMonth', event.target.value), "data-test": "acmi-trip-month" }))] }), jsxs("section", { className: sx(panelStyle$7), "aria-label": "Flight itinerary", children: [jsx("h3", { className: sx(panelTitleStyle$1), children: "Flight Itinerary" }), jsx(Alert, { variant: "primary", children: positioningMode === 'automatic' ? (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "live legs only" }), ", in trip order. The host pricing engine adds positioning ferry legs automatically. Leave flight time blank to use its route estimate; an entered time is treated as an explicit contractual input."] })) : (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "every flown leg in order" }), ", including positioning. Mark each leg as live or ferry. Leave flight time blank to use the pricing engine\u2019s route estimate; an entered time is treated as an explicit contractual input."] })) }), showErrors && errors.legs && (jsx("p", { className: sx(legErrorStyle), role: "alert", "data-test": "acmi-legs-error", children: errors.legs })), jsx("ol", { className: sx(legsStyle$3), children: inputs.legs.map((leg, index) => (jsxs("li", { className: cx(sx(legStyle$2), positioningMode === 'automatic' && sx(automaticLegStyle)), "data-test": "acmi-leg", children: [jsxs("span", { className: sx(legIndexStyle$1), children: ["Leg ", index + 1] }), positioningMode === 'explicit' && (jsx(Select, { id: `${leg.id}-type`, size: "sm", label: "Leg type", options: [
|
|
10060
10060
|
{ value: 'live', label: 'Live' },
|
|
10061
10061
|
{ value: 'ferry', label: 'Ferry' },
|
|
10062
|
-
], value: leg.type ?? 'live', onChange: (event) => updateLeg(leg.id, { type: event.target.value }), "data-test": "acmi-leg-type" })), jsx(Input, { id: `${leg.id}-origin`, size: "sm", label: "From", maxLength: 4, value: leg.origin, onChange: (event) => updateLeg(leg.id, { origin: event.target.value.toUpperCase() }), "data-test": "acmi-leg-origin" }), jsx(Input, { id: `${leg.id}-destination`, size: "sm", label: "To", maxLength: 4, value: leg.destination, onChange: (event) => updateLeg(leg.id, { destination: event.target.value.toUpperCase() }), "data-test": "acmi-leg-destination" }), jsx(Input, { id: `${leg.id}-flight-time`, size: "sm", type: "number", step: "0.1", label: "Flight time (h, optional)", value: leg.flightTime, onChange: (event) => updateLeg(leg.id, { flightTime: event.target.value }), "data-test": "acmi-leg-flight-time" }), jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Remove leg ${index + 1}`, disabled: inputs.legs.length === 1, onClick: () => removeLeg(leg.id), "data-test": "acmi-remove-leg", children: jsx(TrashIcon$2, { size: 16 }) })] }, leg.id))) }), jsxs("div", { className: sx(actionsStyle$
|
|
10062
|
+
], value: leg.type ?? 'live', onChange: (event) => updateLeg(leg.id, { type: event.target.value }), "data-test": "acmi-leg-type" })), jsx(Input, { id: `${leg.id}-origin`, size: "sm", label: "From", maxLength: 4, value: leg.origin, onChange: (event) => updateLeg(leg.id, { origin: event.target.value.toUpperCase() }), "data-test": "acmi-leg-origin" }), jsx(Input, { id: `${leg.id}-destination`, size: "sm", label: "To", maxLength: 4, value: leg.destination, onChange: (event) => updateLeg(leg.id, { destination: event.target.value.toUpperCase() }), "data-test": "acmi-leg-destination" }), jsx(Input, { id: `${leg.id}-flight-time`, size: "sm", type: "number", step: "0.1", label: "Flight time (h, optional)", value: leg.flightTime, onChange: (event) => updateLeg(leg.id, { flightTime: event.target.value }), "data-test": "acmi-leg-flight-time" }), jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Remove leg ${index + 1}`, disabled: inputs.legs.length === 1, onClick: () => removeLeg(leg.id), "data-test": "acmi-remove-leg", children: jsx(TrashIcon$2, { size: 16 }) })] }, leg.id))) }), jsxs("div", { className: sx(actionsStyle$a), children: [jsx(Button, { variant: "outline", size: "sm", leftIcon: jsx(PlusIcon$2, { size: 16 }), onClick: addLeg, "data-test": "acmi-add-leg", children: "Add Flight Leg" }), jsx(Button, { size: "sm", loading: calculating, onClick: calculate, "data-test": "acmi-calculate", children: calculating ? 'Calculating' : 'Calculate Quote' }), result && onSubmitForApproval && (jsx(Button, { variant: "secondary", size: "sm", onClick: () => onSubmitForApproval(inputs), "data-test": "acmi-submit-approval", children: "Use This Total" }))] })] })] }), result && (jsxs("section", { className: sx(resultsStyle), "aria-label": "Quote summary", "data-test": "acmi-results", children: [jsx("h3", { className: sx(panelTitleStyle$1), children: "Quote Summary" }), jsxs("dl", { className: sx(resultGridStyle), children: [jsxs("div", { children: [jsx("dt", { children: "Operating Subtotal" }), jsx("dd", { children: currency.format(result.operatingSubtotal) })] }), jsxs("div", { children: [jsx("dt", { children: "Markup Applied" }), jsx("dd", { children: currency.format(result.markupAmount) })] }), jsxs("div", { children: [jsx("dt", { children: "Insurance (Flat Fee)" }), jsx("dd", { children: currency.format(result.insuranceAmount) })] }), jsxs("div", { children: [jsx("dt", { children: "Pre-Tax Total" }), jsx("dd", { children: currency.format(result.preTaxTotal) })] }), jsxs("div", { children: [jsx("dt", { children: "Federal Excise Tax" }), jsx("dd", { children: currency.format(result.fet) })] }), jsxs("div", { children: [jsx("dt", { children: "Segment Fees" }), jsx("dd", { children: currency.format(result.segmentFees) })] })] }), jsxs("p", { className: sx(finalPriceStyle), "data-test": "acmi-final-price", children: [jsx("span", { children: "Total Quoted Price" }), jsx("strong", { children: currency.format(result.finalPrice) })] }), result.pricingDetails && (jsxs("dl", { className: sx(contractFactsStyle), "data-test": "acmi-pricing-details", children: [jsxs("div", { "data-test": "acmi-ferry-floor", children: [jsx("dt", { children: "Ferry block time" }), jsxs("dd", { children: [result.pricingDetails.ferryBlockHours.toFixed(2), " h", result.pricingDetails.ferryMinimumHours
|
|
10063
10063
|
? ` · ${result.pricingDetails.ferryMinimumHours.toFixed(2)} h minimum per estimated SkyWest ferry leg`
|
|
10064
10064
|
: ''] })] }), jsxs("div", { "data-test": "acmi-fuel-buffer", children: [jsx("dt", { children: "Fuel buffer" }), jsxs("dd", { children: [(result.pricingDetails.fuelBufferPercent * 100).toFixed(0), "% \u00B7 ", currency.format(result.pricingDetails.fuelBufferAmount)] })] }), jsxs("div", { "data-test": "acmi-screening", children: [jsx("dt", { children: "Security screening" }), jsx("dd", { children: currency.format(result.pricingDetails.screeningAmount) })] })] })), result.legs && result.legs.length > 0 && (jsxs("div", { className: sx(pricedLegsStyle), "data-test": "acmi-priced-legs", children: [jsx("h4", { children: "Backend-priced itinerary" }), jsxs("div", { className: sx(pricedLegHeaderStyle), "aria-hidden": "true", children: [jsx("span", { children: "Leg" }), jsx("span", { children: "Type" }), jsx("span", { children: "Block" }), jsx("span", { children: "Total" })] }), result.legs.map((leg) => (jsxs("div", { className: sx(pricedLegStyle), "data-test": "acmi-priced-leg", children: [jsxs("span", { children: [leg.origin, " \u2192 ", leg.destination] }), jsx("span", { "data-test": "acmi-priced-leg-type", children: leg.type === 'ferry' ? 'Ferry' : 'Live' }), jsxs("span", { "data-test": "acmi-priced-leg-block", children: [leg.blockHours.toFixed(2), " h"] }), jsx("span", { children: currency.format(leg.total) })] }, leg.id)))] }))] }))] }));
|
|
10065
10065
|
};
|
|
@@ -10104,7 +10104,7 @@ const showHideAllStyle = {
|
|
|
10104
10104
|
opacity: 0.5,
|
|
10105
10105
|
},
|
|
10106
10106
|
};
|
|
10107
|
-
const filtersStyle$
|
|
10107
|
+
const filtersStyle$6 = {
|
|
10108
10108
|
label: 'AgentGroupTravelRequestsTable-filtersStyle',
|
|
10109
10109
|
display: 'flex',
|
|
10110
10110
|
flexWrap: 'wrap',
|
|
@@ -10221,7 +10221,7 @@ const iconButtonStyle$1 = {
|
|
|
10221
10221
|
cursor: 'pointer',
|
|
10222
10222
|
'&:hover': { background: 'var(--color-primary-light)' },
|
|
10223
10223
|
};
|
|
10224
|
-
const mutedStyle$
|
|
10224
|
+
const mutedStyle$3 = {
|
|
10225
10225
|
label: 'AgentGroupTravelRequestsTable-mutedStyle', color: 'var(--fg-4, var(--color-stone))'
|
|
10226
10226
|
};
|
|
10227
10227
|
const idLinkStyle = {
|
|
@@ -10334,7 +10334,7 @@ const subPnrPanelStyle = {
|
|
|
10334
10334
|
gap: 'var(--space-2)',
|
|
10335
10335
|
padding: 'var(--space-2) 0',
|
|
10336
10336
|
};
|
|
10337
|
-
const legendStyle$
|
|
10337
|
+
const legendStyle$4 = {
|
|
10338
10338
|
label: 'AgentGroupTravelRequestsTable-legendStyle',
|
|
10339
10339
|
margin: 0,
|
|
10340
10340
|
color: 'var(--fg-3, var(--color-slate))',
|
|
@@ -10461,12 +10461,12 @@ const AgentGroupTravelRequestsTable = ({ requests, sports = [], views = [], toda
|
|
|
10461
10461
|
setDateEdits((current) => ({ ...current, [id]: { ...current[id], submittedDate: value } }));
|
|
10462
10462
|
onSubmittedDateChange?.(id, value);
|
|
10463
10463
|
};
|
|
10464
|
-
return (jsxs("div", { className: cx(sx(wrapperStyle$2), className), "data-test": "agent-gtr-table", children: [jsxs("div", { className: sx(toolbarStyle$3), children: [jsxs("button", { type: "button", className: sx(showHideAllStyle), title: "Show/Hide all PNRs", onClick: toggleExpandAll, disabled: multiPnrIds.length === 0, "data-test": "agent-gtr-toggle-all", children: [allExpanded ? jsx(ChevronUpIcon, { size: 16 }) : jsx(ChevronDownIcon$1, { size: 16 }), jsx("span", { children: allExpanded ? 'Collapse all PNRs' : 'Expand all PNRs' })] }), jsxs("div", { className: sx(filtersStyle$
|
|
10464
|
+
return (jsxs("div", { className: cx(sx(wrapperStyle$2), className), "data-test": "agent-gtr-table", children: [jsxs("div", { className: sx(toolbarStyle$3), children: [jsxs("button", { type: "button", className: sx(showHideAllStyle), title: "Show/Hide all PNRs", onClick: toggleExpandAll, disabled: multiPnrIds.length === 0, "data-test": "agent-gtr-toggle-all", children: [allExpanded ? jsx(ChevronUpIcon, { size: 16 }) : jsx(ChevronDownIcon$1, { size: 16 }), jsx("span", { children: allExpanded ? 'Collapse all PNRs' : 'Expand all PNRs' })] }), jsxs("div", { className: sx(filtersStyle$6), children: [jsxs("label", { className: sx(filterFieldStyle$1), children: [jsx("span", { children: "Filter by sport" }), jsxs("select", { value: sportFilter, onChange: (event) => setSportFilter(event.target.value), "data-test": "agent-gtr-sport-filter", children: [jsx("option", { value: "", children: "All Sports" }), sports.map((sport) => (jsx("option", { value: sport.code, children: sport.label }, sport.code)))] })] }), views.length > 0 && (jsxs("label", { className: sx(filterFieldStyle$1), children: [jsx("span", { children: "Filter by view" }), jsxs("select", { value: viewFilter, onChange: (event) => setViewFilter(event.target.value), "data-test": "agent-gtr-view-filter", children: [jsx("option", { value: "", children: "All Accounts" }), views.map((view) => (jsx("option", { value: view.id, children: view.label }, view.id)))] })] }))] })] }), jsx("div", { className: sx(tableScrollStyle$2), children: jsxs("table", { className: sx(tableStyle$b), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: sx(colExpandStyle), children: jsx("span", { className: "sr-only", children: "Expand" }) }), jsx("th", { children: "Source" }), jsx("th", { children: "Master Trip" }), jsx("th", { children: "ID" }), jsx("th", { children: "Start Date" }), jsx("th", { children: "Name" }), jsx("th", { children: "Sport" }), jsxs("th", { children: [jsx(PlaneIcon$3, { size: 16 }), jsx("span", { className: "sr-only", children: "Carrier" })] }), jsx("th", { children: "Routing" }), jsx("th", { children: "Submitted" }), jsx("th", { children: "Type" }), jsx("th", { children: "Quote Sent" }), jsx("th", { children: "Confirmation" }), jsx("th", { children: "Deposit" }), jsx("th", { children: "Utilization" }), jsx("th", { children: "Names" }), jsx("th", { children: "Ticketing" }), jsx("th", { children: "PNR" }), jsx("th", { className: sx(colDeleteStyle), children: jsx("span", { className: "sr-only", children: "Delete" }) })] }) }), jsxs("tbody", { children: [!groups.length && (jsx("tr", { children: jsx("td", { colSpan: COLUMN_COUNT, className: sx(emptyStyle$i), "data-test": "agent-gtr-empty", children: "No open group travel requests match these filters." }) })), groups.map((group) => (jsxs(Fragment$1, { children: [jsx("tr", { className: sx(accountRowStyle), children: jsx("td", { colSpan: COLUMN_COUNT, children: group.accountName }) }), group.items.map((request) => {
|
|
10465
10465
|
const isMulti = request.pnrs.length > 1;
|
|
10466
10466
|
const isExpanded = expandedIds.has(request.id);
|
|
10467
10467
|
const startSoon = daysUntil(request.startDate, today) < 8;
|
|
10468
|
-
return (jsxs(Fragment$1, { children: [jsxs("tr", { className: sx(requestRowStyle), "data-test": "agent-gtr-row", children: [jsx("td", { className: sx(colExpandStyle), children: isMulti && (jsx("button", { type: "button", className: sx(expanderStyle$1), "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} PNRs for ${request.name}`, onClick: () => toggleExpanded(request.id), "data-test": "agent-gtr-expand-row", children: isExpanded ? jsx(ChevronDownIcon$1, { size: 16 }) : jsx(ChevronRightIcon$1, { size: 16 }) })) }), jsx("td", { children: request.source === 'client' ? 'C' : 'A' }), jsx("td", { children: request.masterTripId ? (jsx("button", { type: "button", className: sx(iconButtonStyle$1), "aria-label": `View master trip ${request.masterTripId}`, title: `View Master Trip ${request.masterTripId}`, onClick: () => onViewMasterTrip?.(request.masterTripId), children: jsx(SearchIcon$1, { size: 16 }) })) : (jsx("span", { className: sx(mutedStyle$
|
|
10469
|
-
})] }, `account-${group.accountName}`)))] })] }) }), jsx("p", { className: sx(legendStyle$
|
|
10468
|
+
return (jsxs(Fragment$1, { children: [jsxs("tr", { className: sx(requestRowStyle), "data-test": "agent-gtr-row", children: [jsx("td", { className: sx(colExpandStyle), children: isMulti && (jsx("button", { type: "button", className: sx(expanderStyle$1), "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} PNRs for ${request.name}`, onClick: () => toggleExpanded(request.id), "data-test": "agent-gtr-expand-row", children: isExpanded ? jsx(ChevronDownIcon$1, { size: 16 }) : jsx(ChevronRightIcon$1, { size: 16 }) })) }), jsx("td", { children: request.source === 'client' ? 'C' : 'A' }), jsx("td", { children: request.masterTripId ? (jsx("button", { type: "button", className: sx(iconButtonStyle$1), "aria-label": `View master trip ${request.masterTripId}`, title: `View Master Trip ${request.masterTripId}`, onClick: () => onViewMasterTrip?.(request.masterTripId), children: jsx(SearchIcon$1, { size: 16 }) })) : (jsx("span", { className: sx(mutedStyle$3), children: "\u2014" })) }), jsx("td", { children: jsx("button", { type: "button", className: cx(sx(idLinkStyle), request.notes && sx(hasNotesStyle)), title: request.notes || undefined, onClick: () => onOpenRequest?.(request.id), "data-test": "agent-gtr-open-request", children: request.id }) }), jsx("td", { className: cx(startSoon && sx(startSoonStyle)), children: formatShortDate$1(request.startDate) }), jsx("td", { children: truncate(request.name) }), jsx("td", { children: truncate(request.sport) }), jsx("td", { children: isMulti ? 'Multi' : request.carrier || '' }), jsx("td", { children: isMulti ? 'Multi' : request.routing }), jsx("td", { className: sx(colDateStyle), children: jsx(Datepicker, { "aria-label": `Submitted date for request ${request.id}`, size: "sm", value: dateEdits[request.id]?.submittedDate ?? request.submittedDate ?? '', onChange: (event) => handleSubmittedDateChange(request.id, event.target.value), "data-test": "agent-gtr-submitted-date" }) }), jsx("td", { children: computeTravelTypeCodes(request).join(', ') }), jsx("td", { className: sx(colDateStyle), children: jsx(Datepicker, { "aria-label": `Quote sent date for request ${request.id}`, size: "sm", value: dateEdits[request.id]?.quoteSentDate ?? request.quoteSentDate ?? '', onChange: (event) => handleQuoteSentDateChange(request.id, event.target.value), "data-test": "agent-gtr-quote-sent-date" }) }), DUE_FIELDS.map(({ field }) => (jsx("td", { children: jsx(DueStatusCell, { status: request[field], today: today, onToggle: onToggleDueStatus ? () => onToggleDueStatus(request.id, field) : undefined }) }, field))), jsx("td", { children: isMulti ? (jsx(PnrButton, { label: "Multi", tone: groupPnrTone(request.pnrs), onClick: () => toggleExpanded(request.id), dataTest: "agent-gtr-pnr-multi" })) : (jsx(PnrButton, { label: request.pnrs[0].recordLocator.toUpperCase(), tone: pnrTone(request.pnrs[0]), onClick: () => handleCopyPnr(request.pnrs[0].recordLocator), dataTest: "agent-gtr-pnr" })) }), jsx("td", { className: sx(colDeleteStyle), children: !isMulti && onDeleteRequest && (jsx("button", { type: "button", className: sx(deleteButtonStyle), "aria-label": `Delete request ${request.id}`, title: "Click to delete this trip", onClick: () => onDeleteRequest(request.id), "data-test": "agent-gtr-delete", children: jsx(TrashIcon$2, { size: 16 }) })) })] }), isMulti && isExpanded && (jsx("tr", { className: sx(subPnrRowStyle), children: jsx("td", { colSpan: COLUMN_COUNT, children: jsx("div", { className: sx(subPnrPanelStyle), "data-test": "agent-gtr-sub-pnrs", children: request.pnrs.map((pnr) => (jsx(PnrButton, { label: pnr.recordLocator.toUpperCase(), tone: pnrTone(pnr), onClick: () => handleCopyPnr(pnr.recordLocator), dataTest: "agent-gtr-sub-pnr" }, pnr.id))) }) }) }))] }, request.id));
|
|
10469
|
+
})] }, `account-${group.accountName}`)))] })] }) }), jsx("p", { className: sx(legendStyle$4), children: "Types: A - Airline C - Car, H - Hotel" })] }));
|
|
10470
10470
|
};
|
|
10471
10471
|
|
|
10472
10472
|
/**
|
|
@@ -10500,7 +10500,7 @@ const tableStyle$a = {
|
|
|
10500
10500
|
};
|
|
10501
10501
|
/* Header — navy brand ground with the side rail's foreground ink, matching the
|
|
10502
10502
|
widget card headers. */
|
|
10503
|
-
const headerStyle$
|
|
10503
|
+
const headerStyle$G = {
|
|
10504
10504
|
label: 'Table-headerStyle',
|
|
10505
10505
|
backgroundColor: 'var(--color-primary, #19345f)',
|
|
10506
10506
|
borderBottom: '1px solid var(--nav-rail-border, rgb(255 255 255 / 8%))',
|
|
@@ -10537,11 +10537,11 @@ const sortableStyle$1 = {
|
|
|
10537
10537
|
[`&:hover .${sx(sortIconStyle$2)}`]: { opacity: 1 },
|
|
10538
10538
|
};
|
|
10539
10539
|
/* Body */
|
|
10540
|
-
const bodyStyle$
|
|
10540
|
+
const bodyStyle$b = {
|
|
10541
10541
|
label: 'Table-bodyStyle',
|
|
10542
10542
|
backgroundColor: 'white',
|
|
10543
10543
|
};
|
|
10544
|
-
const rowStyle$
|
|
10544
|
+
const rowStyle$7 = {
|
|
10545
10545
|
label: 'Table-rowStyle',
|
|
10546
10546
|
borderBottom: '1px solid var(--color-neutral-100)',
|
|
10547
10547
|
'&:last-child': { borderBottom: 'none' },
|
|
@@ -10603,23 +10603,23 @@ const stripedStyle = {
|
|
|
10603
10603
|
* object they are emitted in this order every time rather than depending on
|
|
10604
10604
|
* which style was injected first.
|
|
10605
10605
|
*/
|
|
10606
|
-
[`& .${sx(rowStyle$
|
|
10606
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}`]: {
|
|
10607
10607
|
backgroundColor: 'var(--color-primary-light)',
|
|
10608
10608
|
},
|
|
10609
|
-
[`& .${sx(rowStyle$
|
|
10609
|
+
[`& .${sx(rowStyle$7)}:nth-child(even)`]: {
|
|
10610
10610
|
backgroundColor: 'var(--color-neutral-50)',
|
|
10611
10611
|
},
|
|
10612
10612
|
};
|
|
10613
10613
|
const hoverableStyle = {
|
|
10614
10614
|
label: 'Table-hoverableStyle',
|
|
10615
|
-
[`& .${sx(rowStyle$
|
|
10615
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}`]: {
|
|
10616
10616
|
backgroundColor: 'var(--color-primary-light)',
|
|
10617
10617
|
},
|
|
10618
|
-
[`& .${sx(rowStyle$
|
|
10618
|
+
[`& .${sx(rowStyle$7)}:hover`]: {
|
|
10619
10619
|
backgroundColor: 'var(--color-neutral-50)',
|
|
10620
10620
|
},
|
|
10621
10621
|
/* Outweighs both of the above, exactly as `.hoverable .row.selected:hover` did. */
|
|
10622
|
-
[`& .${sx(rowStyle$
|
|
10622
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}:hover`]: {
|
|
10623
10623
|
backgroundColor: 'var(--color-primary-light-hover)',
|
|
10624
10624
|
},
|
|
10625
10625
|
};
|
|
@@ -10741,11 +10741,11 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
10741
10741
|
commitSelection(Array.from(merged));
|
|
10742
10742
|
};
|
|
10743
10743
|
const messageColSpan = columns.length + (selectable ? 1 : 0);
|
|
10744
|
-
return (jsx("div", { className: cx(sx(wrapperStyle$1), className), children: jsxs("table", { className: cx(sx(tableStyle$a), bordered && sx(borderedStyle$1), striped && sx(stripedStyle), hoverable && sx(hoverableStyle), compact && sx(compactStyle$1)), children: [jsx("thead", { className: sx(headerStyle$
|
|
10744
|
+
return (jsx("div", { className: cx(sx(wrapperStyle$1), className), children: jsxs("table", { className: cx(sx(tableStyle$a), bordered && sx(borderedStyle$1), striped && sx(stripedStyle), hoverable && sx(hoverableStyle), compact && sx(compactStyle$1)), children: [jsx("thead", { className: sx(headerStyle$G), children: jsxs("tr", { children: [selectable && (jsx("th", { scope: "col", className: cx(sx(headerCellStyle), sx(selectCellStyle$1)), children: jsx(Checkbox, { size: "sm", "aria-label": selectAllLabel, checked: allSelected, indeterminate: someSelected, disabled: selectableRows.length === 0, onChange: toggleAll, "data-test": "table-select-all" }) })), columns.map((column) => (jsx("th", { className: cx(sx(headerCellStyle), column.sortable && sx(sortableStyle$1), sx(alignStyles[column.align || 'left'])), style: column.width ? { width: column.width } : undefined, onClick: () => handleSort(column), children: jsxs("span", { className: sx(headerContentStyle$2), children: [column.label, column.sortable && (jsx("span", { className: sx(sortIconStyle$2), children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key)))] }) }), jsx("tbody", { className: sx(bodyStyle$b), children: loading ? (jsx("tr", { children: jsx("td", { colSpan: messageColSpan, className: sx(loadingStyle$5), children: "Loading..." }) })) : sortedData.length === 0 ? (jsx("tr", { children: jsx("td", { colSpan: messageColSpan, className: sx(emptyStyle$h), children: emptyContent ?? emptyMessage }) })) : (sortedData.map((row, rowIndex) => {
|
|
10745
10745
|
const key = getRowKey(row, rowIndex);
|
|
10746
10746
|
const rowSelectable = isRowSelectable ? isRowSelectable(row, rowIndex) : true;
|
|
10747
10747
|
const isSelected = selectable && selectionSet.has(key);
|
|
10748
|
-
return (jsxs("tr", { className: cx(sx(rowStyle$
|
|
10748
|
+
return (jsxs("tr", { className: cx(sx(rowStyle$7), onRowClick && sx(clickableStyle), isSelected && sx(selectedRowStyle), rowClassName?.(row, rowIndex)), "data-selected": selectable ? isSelected : undefined, onClick: () => onRowClick?.(row, rowIndex), children: [selectable && (jsx("td", { className: cx(sx(cellStyle$3), sx(selectCellStyle$1)), onClick: (event) => event.stopPropagation(), children: jsx(Checkbox, { size: "sm", "aria-label": rowSelectionLabel ? rowSelectionLabel(row, rowIndex) : `Select row ${key}`, checked: isSelected, disabled: !rowSelectable, onChange: () => toggleRow(key), "data-test": "table-select-row" }) })), columns.map((column) => (jsx("td", { className: cx(sx(cellStyle$3), sx(alignStyles[column.align || 'left'])), children: column.render
|
|
10749
10749
|
? column.render(row[column.key], row, rowIndex)
|
|
10750
10750
|
: row[column.key] }, column.key)))] }, key));
|
|
10751
10751
|
})) }), footer && jsx("tfoot", { children: footer })] }) }));
|
|
@@ -10757,7 +10757,7 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
10757
10757
|
* A bordered card: a header band with the title and Version control, then the
|
|
10758
10758
|
* invoice table with its total row and legend.
|
|
10759
10759
|
*/
|
|
10760
|
-
const cardStyle$
|
|
10760
|
+
const cardStyle$g = {
|
|
10761
10761
|
label: 'AirInvoiceCard-cardStyle',
|
|
10762
10762
|
overflow: 'hidden',
|
|
10763
10763
|
backgroundColor: 'var(--bg-surface, #fff)',
|
|
@@ -10770,7 +10770,7 @@ const cardStyle$f = {
|
|
|
10770
10770
|
lineHeight: '22px',
|
|
10771
10771
|
};
|
|
10772
10772
|
/* ---------- Card header ---------- */
|
|
10773
|
-
const headerStyle$
|
|
10773
|
+
const headerStyle$F = {
|
|
10774
10774
|
label: 'AirInvoiceCard-headerStyle',
|
|
10775
10775
|
boxSizing: 'border-box',
|
|
10776
10776
|
/* Fixed to the height of the Version control's row so the two cards' headers match. */
|
|
@@ -10901,7 +10901,7 @@ const totalCellStyle$1 = {
|
|
|
10901
10901
|
gap: '4px 24px',
|
|
10902
10902
|
};
|
|
10903
10903
|
/* The legend reads as a footnote: regular weight, small, muted — even inside the bold total row. */
|
|
10904
|
-
const legendStyle$
|
|
10904
|
+
const legendStyle$3 = {
|
|
10905
10905
|
label: 'AirInvoiceCard-legendStyle',
|
|
10906
10906
|
display: 'inline-flex',
|
|
10907
10907
|
alignItems: 'center',
|
|
@@ -10937,10 +10937,10 @@ const versionControlShown = (versions) => versions.length > 1;
|
|
|
10937
10937
|
*/
|
|
10938
10938
|
const AirInvoiceCard = ({ title, lines, paymentStatus, total, versions = [], selectedVersionId, onVersionChange, className = '', }) => {
|
|
10939
10939
|
const showLegend = lines.some((line) => line.knownTraveler);
|
|
10940
|
-
const legend = (jsxs("span", { className: sx(legendStyle$
|
|
10940
|
+
const legend = (jsxs("span", { className: sx(legendStyle$3), "data-test": "air-invoice-legend", children: [jsx("span", { className: sx(knownTravelerStyle), children: jsx(CheckIcon$1, { size: 16 }) }), "= Known Traveler Number Loaded"] }));
|
|
10941
10941
|
const hasHeader = Boolean(title || versionControlShown(versions));
|
|
10942
10942
|
const versionControl = versionControlShown(versions) && (jsx(Dropdown, { label: "Version", alignment: "right", trigger: ({ isOpen, toggle }) => (jsxs("button", { type: "button", className: sx(versionButtonStyle), onClick: toggle, "aria-expanded": isOpen, "aria-haspopup": "menu", "data-test": "air-invoice-version", children: [jsx(LayersIcon, {}), "Version", jsx("span", { className: sx(versionCountStyle), children: versions.length }), jsx(ChevronDownIcon$1, { size: 16 })] })), children: versions.map((version) => (jsx(Dropdown.Item, { icon: version.id === selectedVersionId ? jsx(CheckIcon$1, { size: 14 }) : undefined, onClick: () => onVersionChange?.(version.id), children: version.label }, version.id))) }));
|
|
10943
|
-
return (jsxs("section", { className: cx(sx(cardStyle$
|
|
10943
|
+
return (jsxs("section", { className: cx(sx(cardStyle$g), className), "aria-label": "Air invoice", "data-test": "air-invoice-card", children: [hasHeader && (jsxs("div", { className: sx(headerStyle$F), children: [title && jsx("h2", { className: sx(titleStyle$A), children: title }), jsx("div", { className: sx(headerEndStyle), children: versionControl })] })), jsx(Table, { className: sx(tableStyle$9), columns: columns, data: lines, hoverable: false, rowClassName: (line) => cx(line.isVoid && sx(voidRowStyle), line.struckThrough && sx(struckRowStyle)) || undefined, footer: total && (jsxs("tr", { children: [jsx("td", { colSpan: 6, children: jsxs("span", { className: sx(totalCellStyle$1), children: ["Total", showLegend && legend] }) }), jsx("td", { className: sx(upperStyle), children: paymentStatus }), jsx("td", { "data-test": "air-invoice-total", children: total })] })) }), showLegend && !total && (jsx("p", { className: sx(legendBlockStyle), children: legend }))] }));
|
|
10944
10944
|
};
|
|
10945
10945
|
AirInvoiceCard.displayName = 'AirInvoiceCard';
|
|
10946
10946
|
|
|
@@ -11091,7 +11091,7 @@ const labelStyle$5 = {
|
|
|
11091
11091
|
textOverflow: 'ellipsis',
|
|
11092
11092
|
};
|
|
11093
11093
|
/* Footer */
|
|
11094
|
-
const footerStyle$
|
|
11094
|
+
const footerStyle$e = {
|
|
11095
11095
|
label: 'Sidenav-footerStyle',
|
|
11096
11096
|
padding: 'var(--space-5) var(--space-6)',
|
|
11097
11097
|
marginTop: 'auto',
|
|
@@ -11122,7 +11122,7 @@ const collapsedStyle$1 = {
|
|
|
11122
11122
|
padding: 0,
|
|
11123
11123
|
justifyContent: 'center',
|
|
11124
11124
|
},
|
|
11125
|
-
[`& .${sx(footerStyle$
|
|
11125
|
+
[`& .${sx(footerStyle$e)}`]: {
|
|
11126
11126
|
padding: 'var(--space-5) var(--space-4)',
|
|
11127
11127
|
display: 'flex',
|
|
11128
11128
|
justifyContent: 'center',
|
|
@@ -11148,7 +11148,7 @@ const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultEx
|
|
|
11148
11148
|
const isActive = item.key === activeKey;
|
|
11149
11149
|
const itemClasses = cx(sx(navItemStyle$1), isActive && sx(activeNavItemStyle));
|
|
11150
11150
|
return (jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsx("span", { className: sx(iconStyle$3), children: item.icon }), expanded && jsx("span", { className: sx(labelStyle$5), children: item.label })] }, item.key));
|
|
11151
|
-
}) }), footer && jsx("div", { className: sx(footerStyle$
|
|
11151
|
+
}) }), footer && jsx("div", { className: sx(footerStyle$e), children: footer })] }));
|
|
11152
11152
|
};
|
|
11153
11153
|
Sidenav.displayName = 'Sidenav';
|
|
11154
11154
|
|
|
@@ -11393,7 +11393,7 @@ const noResultsStyle = {
|
|
|
11393
11393
|
fontSize: 14,
|
|
11394
11394
|
};
|
|
11395
11395
|
/* Actions */
|
|
11396
|
-
const actionsStyle$
|
|
11396
|
+
const actionsStyle$9 = {
|
|
11397
11397
|
label: 'Topbar-actionsStyle',
|
|
11398
11398
|
display: 'flex',
|
|
11399
11399
|
gap: 'var(--space-2, 8px)',
|
|
@@ -11458,7 +11458,7 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
11458
11458
|
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
11459
11459
|
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
11460
11460
|
const hasDropdown = accounts && accounts.length > 0;
|
|
11461
|
-
return (jsxs("header", { className: classNames, ...props, children: [jsxs("div", { className: sx(leftStyle), children: [leftContent, account && (jsxs("div", { className: sx(accountWrapperStyle), ref: dropdownRef, children: [jsxs("button", { className: cx(sx(accountSelectorStyle), isOpen && sx(openStyle$1)), onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsx("span", { className: sx(accountCodeStyle), children: account.code }), jsx("span", { className: sx(accountNameStyle), children: account.name }), hasDropdown && (jsx(ChevronDownIcon$1, { size: 16, className: cx(sx(chevronStyle$2), isOpen && sx(chevronOpenStyle)) }))] }), isOpen && hasDropdown && (jsxs("div", { className: sx(dropdownStyle), role: "listbox", children: [jsxs("div", { className: sx(dropdownSearchStyle), children: [jsxs("svg", { className: sx(searchIconStyle$1), 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: sx(searchInputStyle$1) })] }), jsx("div", { className: sx(dropdownListStyle), children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxs("button", { className: cx(sx(dropdownItemStyle), acc.code === account.code && sx(selectedStyle$2)), onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsx("span", { className: sx(dropdownItemCodeStyle), children: acc.code }), jsx("span", { className: sx(dropdownItemNameStyle), children: acc.name })] }, acc.code)))) : (jsx("div", { className: sx(noResultsStyle), children: "No accounts found" })) })] }))] }))] }), actions && jsx("div", { className: sx(actionsStyle$
|
|
11461
|
+
return (jsxs("header", { className: classNames, ...props, children: [jsxs("div", { className: sx(leftStyle), children: [leftContent, account && (jsxs("div", { className: sx(accountWrapperStyle), ref: dropdownRef, children: [jsxs("button", { className: cx(sx(accountSelectorStyle), isOpen && sx(openStyle$1)), onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsx("span", { className: sx(accountCodeStyle), children: account.code }), jsx("span", { className: sx(accountNameStyle), children: account.name }), hasDropdown && (jsx(ChevronDownIcon$1, { size: 16, className: cx(sx(chevronStyle$2), isOpen && sx(chevronOpenStyle)) }))] }), isOpen && hasDropdown && (jsxs("div", { className: sx(dropdownStyle), role: "listbox", children: [jsxs("div", { className: sx(dropdownSearchStyle), children: [jsxs("svg", { className: sx(searchIconStyle$1), 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: sx(searchInputStyle$1) })] }), jsx("div", { className: sx(dropdownListStyle), children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxs("button", { className: cx(sx(dropdownItemStyle), acc.code === account.code && sx(selectedStyle$2)), onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsx("span", { className: sx(dropdownItemCodeStyle), children: acc.code }), jsx("span", { className: sx(dropdownItemNameStyle), children: acc.name })] }, acc.code)))) : (jsx("div", { className: sx(noResultsStyle), children: "No accounts found" })) })] }))] }))] }), actions && jsx("div", { className: sx(actionsStyle$9), children: actions })] }));
|
|
11462
11462
|
};
|
|
11463
11463
|
Topbar.displayName = 'Topbar';
|
|
11464
11464
|
|
|
@@ -11511,7 +11511,7 @@ const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account,
|
|
|
11511
11511
|
* Shares the AirInvoiceCard's shell — bordered card, header band with a small
|
|
11512
11512
|
* uppercase title — so the two read as a set when stacked on a page.
|
|
11513
11513
|
*/
|
|
11514
|
-
const cardStyle$
|
|
11514
|
+
const cardStyle$f = {
|
|
11515
11515
|
label: 'BookingDetailsCard-cardStyle',
|
|
11516
11516
|
overflow: 'hidden',
|
|
11517
11517
|
backgroundColor: 'var(--bg-surface, #fff)',
|
|
@@ -11523,7 +11523,7 @@ const cardStyle$e = {
|
|
|
11523
11523
|
fontSize: 15,
|
|
11524
11524
|
lineHeight: '22px',
|
|
11525
11525
|
};
|
|
11526
|
-
const headerStyle$
|
|
11526
|
+
const headerStyle$E = {
|
|
11527
11527
|
label: 'BookingDetailsCard-headerStyle',
|
|
11528
11528
|
boxSizing: 'border-box',
|
|
11529
11529
|
/* Fixed to the height of the Version control's row so the two cards' headers match. */
|
|
@@ -11612,12 +11612,12 @@ const BookingDetailsCard = ({ details, title = 'Booking Details', refId, childre
|
|
|
11612
11612
|
if (details.length === 0 && !children)
|
|
11613
11613
|
return null;
|
|
11614
11614
|
const rows = Math.ceil(details.length / 2);
|
|
11615
|
-
return (jsxs("section", { className: cx(sx(cardStyle$
|
|
11615
|
+
return (jsxs("section", { className: cx(sx(cardStyle$f), className), "aria-label": "Booking details", "data-test": "booking-details-card", children: [jsxs("div", { className: sx(headerStyle$E), children: [jsx("h2", { className: sx(titleStyle$z), children: title }), refId && (jsxs("p", { className: sx(refStyle), "data-test": "booking-details-ref", children: ["Short\u2019s ID: ", jsx("span", { className: sx(refValueStyle), children: refId })] }))] }), details.length > 0 && (jsx("dl", { className: sx(detailsStyle$2), style: { gridTemplateRows: `repeat(${rows}, auto)` }, children: details.map((detail) => (jsxs("div", { className: sx(detailStyle$2), children: [jsx("dt", { className: sx(detailLabelStyle$1), children: detail.label }), jsx("dd", { className: sx(detailValueStyle$1), children: detail.value })] }, detail.label))) })), children && jsx("div", { className: cx(sx(sectionStyle$8), details.length > 0 && sx(sectionRuleStyle)), "data-test": "booking-details-section", children: children })] }));
|
|
11616
11616
|
};
|
|
11617
11617
|
BookingDetailsCard.displayName = 'BookingDetailsCard';
|
|
11618
11618
|
|
|
11619
11619
|
/* Card Component Styles */
|
|
11620
|
-
const cardStyle$
|
|
11620
|
+
const cardStyle$e = {
|
|
11621
11621
|
label: 'Card-cardStyle',
|
|
11622
11622
|
background: 'var(--bg-surface)',
|
|
11623
11623
|
borderRadius: 'var(--radius-2xl)',
|
|
@@ -11665,7 +11665,7 @@ const paddingStyles = {
|
|
|
11665
11665
|
},
|
|
11666
11666
|
};
|
|
11667
11667
|
/* Card Header */
|
|
11668
|
-
const headerStyle$
|
|
11668
|
+
const headerStyle$D = {
|
|
11669
11669
|
label: 'Card-headerStyle',
|
|
11670
11670
|
display: 'flex',
|
|
11671
11671
|
alignItems: 'flex-start',
|
|
@@ -11693,19 +11693,19 @@ const subtitleStyle$7 = {
|
|
|
11693
11693
|
fontSize: 'var(--fs-sm)',
|
|
11694
11694
|
color: 'var(--fg-3)',
|
|
11695
11695
|
};
|
|
11696
|
-
const actionsStyle$
|
|
11696
|
+
const actionsStyle$8 = {
|
|
11697
11697
|
label: 'Card-actionsStyle',
|
|
11698
11698
|
display: 'flex',
|
|
11699
11699
|
gap: 'var(--space-2)',
|
|
11700
11700
|
flexShrink: 0,
|
|
11701
11701
|
};
|
|
11702
11702
|
/* Card Body */
|
|
11703
|
-
const bodyStyle$
|
|
11703
|
+
const bodyStyle$a = {
|
|
11704
11704
|
label: 'Card-bodyStyle',
|
|
11705
11705
|
padding: 'var(--space-4)',
|
|
11706
11706
|
};
|
|
11707
11707
|
/* Card Footer */
|
|
11708
|
-
const footerStyle$
|
|
11708
|
+
const footerStyle$d = {
|
|
11709
11709
|
label: 'Card-footerStyle',
|
|
11710
11710
|
display: 'flex',
|
|
11711
11711
|
alignItems: 'center',
|
|
@@ -11728,7 +11728,7 @@ const footerStyle$b = {
|
|
|
11728
11728
|
* Card component for grouping related content.
|
|
11729
11729
|
*/
|
|
11730
11730
|
const Card = forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
11731
|
-
const classNames = cx(sx(cardStyle$
|
|
11731
|
+
const classNames = cx(sx(cardStyle$e), sx(variantStyles[variant]), sx(paddingStyles[padding]), interactive && sx(interactiveStyle), className);
|
|
11732
11732
|
return (jsx("div", { ref: ref, className: classNames, ...props, children: children }));
|
|
11733
11733
|
});
|
|
11734
11734
|
Card.displayName = 'Card';
|
|
@@ -11736,15 +11736,15 @@ Card.displayName = 'Card';
|
|
|
11736
11736
|
* Top of a Card: title, subtitle, and any header actions.
|
|
11737
11737
|
*/
|
|
11738
11738
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
11739
|
-
const classNames = cx(sx(headerStyle$
|
|
11740
|
-
return (jsxs("div", { className: classNames, ...props, children: [jsxs("div", { className: sx(headerContentStyle$1), children: [title && jsx("h3", { className: sx(titleStyle$y), children: title }), subtitle && jsx("p", { className: sx(subtitleStyle$7), children: subtitle }), children] }), actions && jsx("div", { className: sx(actionsStyle$
|
|
11739
|
+
const classNames = cx(sx(headerStyle$D), className);
|
|
11740
|
+
return (jsxs("div", { className: classNames, ...props, children: [jsxs("div", { className: sx(headerContentStyle$1), children: [title && jsx("h3", { className: sx(titleStyle$y), children: title }), subtitle && jsx("p", { className: sx(subtitleStyle$7), children: subtitle }), children] }), actions && jsx("div", { className: sx(actionsStyle$8), children: actions })] }));
|
|
11741
11741
|
};
|
|
11742
11742
|
CardHeader.displayName = 'CardHeader';
|
|
11743
11743
|
/**
|
|
11744
11744
|
* Main content region of a Card, carrying the card padding.
|
|
11745
11745
|
*/
|
|
11746
11746
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
11747
|
-
const classNames = cx(sx(bodyStyle$
|
|
11747
|
+
const classNames = cx(sx(bodyStyle$a), className);
|
|
11748
11748
|
return (jsx("div", { className: classNames, ...props, children: children }));
|
|
11749
11749
|
};
|
|
11750
11750
|
CardBody.displayName = 'CardBody';
|
|
@@ -11752,7 +11752,7 @@ CardBody.displayName = 'CardBody';
|
|
|
11752
11752
|
* Bottom of a Card, for actions and summary detail.
|
|
11753
11753
|
*/
|
|
11754
11754
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
11755
|
-
const classNames = cx(sx(footerStyle$
|
|
11755
|
+
const classNames = cx(sx(footerStyle$d), className);
|
|
11756
11756
|
return (jsx("div", { className: classNames, ...props, children: children }));
|
|
11757
11757
|
};
|
|
11758
11758
|
CardFooter.displayName = 'CardFooter';
|
|
@@ -12440,7 +12440,7 @@ const alertStyle$4 = {
|
|
|
12440
12440
|
label: 'ContactList-alertStyle', width: '100%'
|
|
12441
12441
|
};
|
|
12442
12442
|
/* Card */
|
|
12443
|
-
const cardStyle$
|
|
12443
|
+
const cardStyle$d = {
|
|
12444
12444
|
label: 'ContactList-cardStyle',
|
|
12445
12445
|
backgroundColor: 'var(--color-white)',
|
|
12446
12446
|
border: '1px solid var(--color-gray-200)',
|
|
@@ -12448,7 +12448,7 @@ const cardStyle$c = {
|
|
|
12448
12448
|
overflow: 'hidden',
|
|
12449
12449
|
};
|
|
12450
12450
|
/* Header */
|
|
12451
|
-
const headerStyle$
|
|
12451
|
+
const headerStyle$C = {
|
|
12452
12452
|
label: 'ContactList-headerStyle',
|
|
12453
12453
|
padding: 'var(--space-4)',
|
|
12454
12454
|
borderBottom: '1px solid var(--color-gray-100)',
|
|
@@ -12609,7 +12609,7 @@ const emptyStyle$f = {
|
|
|
12609
12609
|
fontSize: 'var(--text-sm)',
|
|
12610
12610
|
};
|
|
12611
12611
|
/* Footer */
|
|
12612
|
-
const footerStyle$
|
|
12612
|
+
const footerStyle$c = {
|
|
12613
12613
|
label: 'ContactList-footerStyle',
|
|
12614
12614
|
padding: 'var(--space-3) var(--space-4)',
|
|
12615
12615
|
borderTop: '1px solid var(--color-gray-100)',
|
|
@@ -12645,7 +12645,7 @@ const PlusIcon$1 = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0
|
|
|
12645
12645
|
*/
|
|
12646
12646
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
12647
12647
|
const listClasses = cx(sx(containerStyle$3), className);
|
|
12648
|
-
return (jsxs("div", { className: listClasses, children: [alert && (jsx("div", { className: sx(alertStyle$4), children: alert })), jsxs("div", { className: sx(cardStyle$
|
|
12648
|
+
return (jsxs("div", { className: listClasses, children: [alert && (jsx("div", { className: sx(alertStyle$4), children: alert })), jsxs("div", { className: sx(cardStyle$d), children: [jsx("div", { className: sx(headerStyle$C), children: jsxs("div", { className: sx(titleRowStyle$4), children: [jsx("h3", { className: sx(titleStyle$x), children: title }), tooltip && (jsx("span", { className: sx(tooltipStyle), children: jsx(InfoIcon, {}) }))] }) }), jsxs("div", { className: sx(listStyle$4), children: [contacts.map((contact) => (jsxs("div", { className: sx(contactItemStyle), children: [jsxs("div", { className: sx(contactInfoStyle), children: [jsxs("div", { className: sx(contactNameStyle$1), children: [contact.name, contact.isPrimary && (jsx("span", { className: sx(badgeStyle$2), children: "Primary" })), contact.isSecondary && (jsx("span", { className: cx(sx(badgeStyle$2), sx(badgeSecondaryStyle)), children: "Secondary" }))] }), contact.role && (jsx("div", { className: sx(contactRoleStyle$1), children: contact.role })), jsxs("div", { className: sx(contactDetailsStyle$1), children: [contact.email && (jsx("a", { href: `mailto:${contact.email}`, className: sx(contactLinkStyle$2), children: contact.email })), contact.phone && (jsx("span", { className: sx(contactPhoneStyle), children: contact.phone }))] })] }), jsxs("div", { className: sx(contactActionsStyle), children: [onEdit && (jsx("button", { type: "button", className: sx(actionButtonStyle$1), onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsx(EditIcon$1, {}) })), onRemove && (jsx("button", { type: "button", className: cx(sx(actionButtonStyle$1), sx(actionButtonDangerStyle)), onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsx("div", { className: sx(emptyStyle$f), children: "No contacts added" }))] }), showAdd && onAdd && (jsx("div", { className: sx(footerStyle$c), children: jsxs("button", { type: "button", className: sx(addButtonStyle$1), onClick: onAdd, children: [jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
12649
12649
|
};
|
|
12650
12650
|
ContactList.displayName = 'ContactList';
|
|
12651
12651
|
|
|
@@ -12771,7 +12771,7 @@ const sizeStyles$2 = {
|
|
|
12771
12771
|
top: blockSizeStyles,
|
|
12772
12772
|
bottom: blockSizeStyles,
|
|
12773
12773
|
};
|
|
12774
|
-
const headerStyle$
|
|
12774
|
+
const headerStyle$B = {
|
|
12775
12775
|
label: 'Drawer-headerStyle',
|
|
12776
12776
|
display: 'flex',
|
|
12777
12777
|
alignItems: 'center',
|
|
@@ -12813,13 +12813,13 @@ const closeButtonStyle$2 = {
|
|
|
12813
12813
|
outlineOffset: 2,
|
|
12814
12814
|
},
|
|
12815
12815
|
};
|
|
12816
|
-
const bodyStyle$
|
|
12816
|
+
const bodyStyle$9 = {
|
|
12817
12817
|
label: 'Drawer-bodyStyle',
|
|
12818
12818
|
flex: 1,
|
|
12819
12819
|
padding: 'var(--space-4)',
|
|
12820
12820
|
overflowY: 'auto',
|
|
12821
12821
|
};
|
|
12822
|
-
const footerStyle$
|
|
12822
|
+
const footerStyle$b = {
|
|
12823
12823
|
label: 'Drawer-footerStyle',
|
|
12824
12824
|
padding: 'var(--space-4)',
|
|
12825
12825
|
borderTop: '1px solid var(--color-neutral-200)',
|
|
@@ -12830,15 +12830,15 @@ const footerStyle$9 = {
|
|
|
12830
12830
|
/**
|
|
12831
12831
|
* Top of a Drawer: title and the close affordance.
|
|
12832
12832
|
*/
|
|
12833
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$
|
|
12833
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$B), className), children: [jsxs("div", { className: sx(headerContentStyle), children: [title && jsx("h2", { className: sx(titleStyle$w), children: title }), children] }), showClose && (jsx("button", { type: "button", className: sx(closeButtonStyle$2), 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" }) }) }))] }));
|
|
12834
12834
|
/**
|
|
12835
12835
|
* Scrollable content region of a Drawer.
|
|
12836
12836
|
*/
|
|
12837
|
-
const DrawerBody = ({ children, className = '' }) => (jsx("div", { className: cx(sx(bodyStyle$
|
|
12837
|
+
const DrawerBody = ({ children, className = '' }) => (jsx("div", { className: cx(sx(bodyStyle$9), className), children: children }));
|
|
12838
12838
|
/**
|
|
12839
12839
|
* Bottom of a Drawer, for actions that stay visible while the body scrolls.
|
|
12840
12840
|
*/
|
|
12841
|
-
const DrawerFooter = ({ children, className = '' }) => (jsx("div", { className: cx(sx(footerStyle$
|
|
12841
|
+
const DrawerFooter = ({ children, className = '' }) => (jsx("div", { className: cx(sx(footerStyle$b), className), children: children }));
|
|
12842
12842
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), ' +
|
|
12843
12843
|
'textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
12844
12844
|
/**
|
|
@@ -12996,7 +12996,7 @@ const openStyle = {
|
|
|
12996
12996
|
},
|
|
12997
12997
|
},
|
|
12998
12998
|
};
|
|
12999
|
-
const bodyStyle$
|
|
12999
|
+
const bodyStyle$8 = {
|
|
13000
13000
|
label: 'DueDatesDrawer-bodyStyle',
|
|
13001
13001
|
minHeight: 0,
|
|
13002
13002
|
flex: 1,
|
|
@@ -13044,7 +13044,7 @@ const emptyStyle$e = {
|
|
|
13044
13044
|
padding: '16px 8px 0',
|
|
13045
13045
|
color: 'var(--color-stone, #787878)',
|
|
13046
13046
|
};
|
|
13047
|
-
const cardStyle$
|
|
13047
|
+
const cardStyle$c = {
|
|
13048
13048
|
label: 'DueDatesDrawer-cardStyle',
|
|
13049
13049
|
display: 'flex',
|
|
13050
13050
|
flexDirection: 'column',
|
|
@@ -13168,7 +13168,7 @@ const DueDateCard$1 = ({ item, onToggle, onTaskClick }) => {
|
|
|
13168
13168
|
const completed = isTravelDueDateCompleted(item);
|
|
13169
13169
|
const dueDate = parseLocalDate$1(item.duedate);
|
|
13170
13170
|
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
13171
|
-
return (jsxs("article", { className: sx(cardStyle$
|
|
13171
|
+
return (jsxs("article", { className: sx(cardStyle$c), children: [jsxs("div", { className: sx(cardTitleStyle$3), children: [onToggle ? (jsx("button", { type: "button", "aria-label": `${completed ? 'Reopen' : 'Complete'} ${item.tasktitle}`, className: cx(sx(statusStyle$5), completed ? sx(completedStyle) : pastDue ? sx(pastDueStyle) : ''), onClick: () => onToggle(item), "data-test": `due-date-toggle-${item.taskid}`, children: completed ? jsx(CheckIcon$1, { size: 12 }) : null })) : (jsx("span", { "aria-label": `${completed ? 'Completed' : pastDue ? 'Past due' : 'Incomplete'}: ${item.tasktitle}`, className: cx(sx(statusStyle$5), sx(readOnlyStatusStyle), completed ? sx(completedStyle) : pastDue ? sx(pastDueStyle) : ''), "data-test": `due-date-status-${item.taskid}`, children: completed ? jsx(CheckIcon$1, { size: 12 }) : null })), jsx("h5", { children: item.tasktitle })] }), item.description && jsx("p", { children: item.description }), jsxs("div", { className: sx(tagsStyle), children: [jsx("span", { style: { backgroundColor: sportColor$1(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: sx(completionStyle), children: [jsx(CheckIcon$1, { size: 14 }), jsxs("span", { children: [jsx("em", { children: "on" }), " ", formatDate$8(item.completeddatetime, { month: 'numeric', day: 'numeric', year: '2-digit' }), " ", jsx("em", { children: "by" }), " ", item.completedby] })] })] }));
|
|
13172
13172
|
};
|
|
13173
13173
|
/** Hub's searchable, status-aware due-dates drawer. */
|
|
13174
13174
|
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, overdueOnly, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
@@ -13180,7 +13180,7 @@ const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, overdueO
|
|
|
13180
13180
|
const matches = items.filter((item) => (!selectedTrip || item.masterTripGUID === String(selectedTrip)) && (!overdueOnly || isTravelDueDateOverdue(item)) && (!normalized || item.tasktitle.toLowerCase().includes(normalized) || item.sportCode.toLowerCase().includes(normalized) || item.description.toLowerCase().includes(normalized)));
|
|
13181
13181
|
return matches.length ? [[date, matches]] : [];
|
|
13182
13182
|
})), [dueDates, search, selectedDate, selectedTrip, overdueOnly]);
|
|
13183
|
-
return (jsxs("aside", { className: cx(sx(drawerStyle), isOpen && sx(openStyle), className), "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: sx(bodyStyle$
|
|
13183
|
+
return (jsxs("aside", { className: cx(sx(drawerStyle), isOpen && sx(openStyle), className), "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: sx(bodyStyle$8), children: [jsxs("label", { className: sx(searchStyle$1), 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: sx(emptyStyle$e), children: "No due dates found." }) : Object.entries(filtered).map(([date, items]) => (jsxs("section", { children: [jsx("h4", { children: formatDate$8(date, { month: 'long', day: 'numeric', year: 'numeric' }) }), jsx("div", { className: sx(cardsStyle$2), children: items.map((item) => jsx(DueDateCard$1, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
13184
13184
|
};
|
|
13185
13185
|
|
|
13186
13186
|
/**
|
|
@@ -13192,7 +13192,7 @@ const panelStyle$5 = {
|
|
|
13192
13192
|
label: 'Flyout-panelStyle',
|
|
13193
13193
|
background: 'var(--color-white)',
|
|
13194
13194
|
};
|
|
13195
|
-
const headerStyle$
|
|
13195
|
+
const headerStyle$A = {
|
|
13196
13196
|
label: 'Flyout-headerStyle',
|
|
13197
13197
|
'&&': { padding: 'var(--space-5) var(--space-6)' },
|
|
13198
13198
|
};
|
|
@@ -13210,7 +13210,7 @@ const titleStyle$v = {
|
|
|
13210
13210
|
fontWeight: 'var(--font-weight-bold)',
|
|
13211
13211
|
color: 'var(--color-ink)',
|
|
13212
13212
|
};
|
|
13213
|
-
const bodyStyle$
|
|
13213
|
+
const bodyStyle$7 = {
|
|
13214
13214
|
label: 'Flyout-bodyStyle',
|
|
13215
13215
|
'&&': { padding: 'var(--space-6)' },
|
|
13216
13216
|
};
|
|
@@ -13228,7 +13228,7 @@ const Flyout = ({ isOpen, onClose, title, icon, children, footer, width = 'min(4
|
|
|
13228
13228
|
const titleId = useId();
|
|
13229
13229
|
if (!isOpen || typeof document === 'undefined')
|
|
13230
13230
|
return null;
|
|
13231
|
-
return createPortal(jsxs(Drawer, { "aria-labelledby": titleId, className: sx(panelStyle$5), isOpen: isOpen, onClose: onClose, position: "right", size: width, children: [jsx(DrawerHeader, { className: sx(headerStyle$
|
|
13231
|
+
return createPortal(jsxs(Drawer, { "aria-labelledby": titleId, className: sx(panelStyle$5), isOpen: isOpen, onClose: onClose, position: "right", size: width, children: [jsx(DrawerHeader, { className: sx(headerStyle$A), children: jsxs("div", { className: sx(titleRowStyle$3), children: [icon, jsx("h2", { className: sx(titleStyle$v), id: titleId, children: title })] }) }), jsx(DrawerBody, { className: sx(bodyStyle$7), children: children }), footer && jsx(DrawerFooter, { children: footer })] }), document.body);
|
|
13232
13232
|
};
|
|
13233
13233
|
|
|
13234
13234
|
/**
|
|
@@ -13240,7 +13240,7 @@ const Flyout = ({ isOpen, onClose, title, icon, children, footer, width = 'min(4
|
|
|
13240
13240
|
* No specificity work was needed — the media query is the only override, and
|
|
13241
13241
|
* an at-rule always outranks the base declaration it sits beside.
|
|
13242
13242
|
*/
|
|
13243
|
-
const headerStyle$
|
|
13243
|
+
const headerStyle$z = {
|
|
13244
13244
|
label: 'GridHeaderRow-headerStyle',
|
|
13245
13245
|
display: 'none',
|
|
13246
13246
|
width: '100%',
|
|
@@ -13287,7 +13287,7 @@ const headingStyle$3 = {
|
|
|
13287
13287
|
* carrying its own labels, so a detached heading strip would caption nothing.
|
|
13288
13288
|
*/
|
|
13289
13289
|
function GridHeaderRow({ columns, gridTemplateColumns, above, below, className = '', style, }) {
|
|
13290
|
-
return (jsxs("div", { className: cx(sx(headerStyle$
|
|
13290
|
+
return (jsxs("div", { className: cx(sx(headerStyle$z), className), style: style, "data-testid": "grid-header-row", children: [above, jsx("div", { className: sx(gridStyle$8), style: { gridTemplateColumns }, role: "row", children: columns.map((column, i) => (jsxs("div", { role: "columnheader", className: cx(sx(headingStyle$3), column.labelClassName), children: [column.icon, column.label, column.labelAs?.({ name: column.name })] }, column.name ?? i))) }), below] }));
|
|
13291
13291
|
}
|
|
13292
13292
|
GridHeaderRow.displayName = 'GridHeaderRow';
|
|
13293
13293
|
|
|
@@ -13341,7 +13341,7 @@ const bannerStyle$2 = {
|
|
|
13341
13341
|
* The heading row only makes sense while the grid is a grid. Below 768px each
|
|
13342
13342
|
* row becomes a card and every cell carries its own label instead.
|
|
13343
13343
|
*/
|
|
13344
|
-
const headerStyle$
|
|
13344
|
+
const headerStyle$y = {
|
|
13345
13345
|
label: 'GridTable-headerStyle',
|
|
13346
13346
|
display: 'none',
|
|
13347
13347
|
width: '100%',
|
|
@@ -13391,7 +13391,7 @@ const sortIconStyle$1 = {
|
|
|
13391
13391
|
flexShrink: 0,
|
|
13392
13392
|
display: 'inline-flex',
|
|
13393
13393
|
};
|
|
13394
|
-
const bodyStyle$
|
|
13394
|
+
const bodyStyle$6 = {
|
|
13395
13395
|
label: 'GridTable-bodyStyle',
|
|
13396
13396
|
display: 'flex',
|
|
13397
13397
|
flexDirection: 'column',
|
|
@@ -13400,7 +13400,7 @@ const bodyStyle$5 = {
|
|
|
13400
13400
|
gap: 0,
|
|
13401
13401
|
},
|
|
13402
13402
|
};
|
|
13403
|
-
const rowStyle$
|
|
13403
|
+
const rowStyle$6 = {
|
|
13404
13404
|
label: 'GridTable-rowStyle',
|
|
13405
13405
|
padding: 8,
|
|
13406
13406
|
fontSize: 14,
|
|
@@ -13605,7 +13605,7 @@ const totalValueStyle = {
|
|
|
13605
13605
|
* `.footer .totalCell:first-child` is written against the generated class, so
|
|
13606
13606
|
* it keeps its (0,3,0) rank over the plain `.totalCell` rule without doubling.
|
|
13607
13607
|
*/
|
|
13608
|
-
const footerStyle$
|
|
13608
|
+
const footerStyle$a = {
|
|
13609
13609
|
label: 'GridTable-footerStyle',
|
|
13610
13610
|
display: 'none',
|
|
13611
13611
|
width: '100%',
|
|
@@ -13957,7 +13957,7 @@ function GridTable({ columns, data, gridTemplateColumns = `repeat(${columns.leng
|
|
|
13957
13957
|
// membership rather than truthiness so a legitimate empty-string key still
|
|
13958
13958
|
// counts as a match.
|
|
13959
13959
|
const markerBeforeMatches = rowMarker?.beforeKey != null && allKeys.includes(rowMarker.beforeKey);
|
|
13960
|
-
return (jsxs("div", { className: cx(sx(tableStyle$8), sharedColumns ? sx(sharedRootStyle) : '', className), style: rootStyle, children: [banner && jsx("div", { className: cx(sx(bannerStyle$2), span), children: banner }), !hideHeader && (jsxs("div", { className: cx(sx(headerStyle$
|
|
13960
|
+
return (jsxs("div", { className: cx(sx(tableStyle$8), sharedColumns ? sx(sharedRootStyle) : '', className), style: rootStyle, children: [banner && jsx("div", { className: cx(sx(bannerStyle$2), span), children: banner }), !hideHeader && (jsxs("div", { className: cx(sx(headerStyle$y), subgrid), children: [sharedColumns && header.above != null ? jsx("div", { className: span, children: header.above }) : header.above, jsxs("div", { className: cx(sx(gridStyle$7), subgrid), style: trackStyle, children: [expandable && jsx("div", { className: sx(headingStyle$2), "aria-hidden": "true" }), columns.map((column, i) => (jsx(React.Fragment, { children: heading(column, { interactive: true }) }, i)))] }), sharedColumns && header.below != null ? jsx("div", { className: span, children: header.below }) : header.below] })), !sorted.length && !draftRow ? (jsx("div", { className: cx(sx(emptyStyle$d), span), children: emptyMessage })) : (jsxs("div", { className: cx(sx(bodyStyle$6), subgrid), children: [draftRow && jsx("div", { className: cx(sx(draftRowStyle), span), children: draftRow }), sorted.map((row, rowIndex) => {
|
|
13961
13961
|
const record = row;
|
|
13962
13962
|
const key = allKeys[rowIndex];
|
|
13963
13963
|
// Only an expandable table exposes expansion; without it, a lingering
|
|
@@ -13965,12 +13965,12 @@ function GridTable({ columns, data, gridTemplateColumns = `repeat(${columns.leng
|
|
|
13965
13965
|
// after expandable was turned off) must not leak `expanded: true` to
|
|
13966
13966
|
// renderers that have no toggle to collapse it.
|
|
13967
13967
|
const expanded = expandable && expandedKeys.has(key);
|
|
13968
|
-
return (jsxs(React.Fragment, { children: [marker && rowMarker?.beforeKey === key && marker, editRow?.key === key ? (jsx("div", { className: cx(sx(editRowStyle), bordered ? sx(borderedStyle) : '', span), "data-rowid": key, "data-testid": `row-${key}`, "data-editing": "true", children: editRow.content })) : (jsxs("div", { className: cx(sx(rowStyle$
|
|
13968
|
+
return (jsxs(React.Fragment, { children: [marker && rowMarker?.beforeKey === key && marker, editRow?.key === key ? (jsx("div", { className: cx(sx(editRowStyle), bordered ? sx(borderedStyle) : '', span), "data-rowid": key, "data-testid": `row-${key}`, "data-editing": "true", children: editRow.content })) : (jsxs("div", { className: cx(sx(rowStyle$6), bordered ? sx(borderedStyle) : '', rowPainted ? sx(rowPaintedStyle) : '', flashRowKey === key ? sx(rowPainted ? flashRowPaintedStyle : flashRowStyle) : '', subgrid), style: trackStyle, "data-rowid": key, "data-testid": `row-${key}`, "data-flash": flashRowKey === key ? 'true' : undefined, children: [expandable && (jsx("div", { className: sx(expandCellStyle), children: jsx("button", { type: "button", className: sx(expandButtonStyle$1), onClick: () => toggleRow(key), "aria-expanded": expanded, "aria-label": `${expanded ? 'Collapse' : 'Expand'} ${typeof expandLabel === 'function' ? expandLabel(row, rowIndex) : expandLabel}`, children: expanded ? jsx(ChevronDown, {}) : jsx(ChevronRight$3, {}) }) })), columns.map((column, colIndex) => {
|
|
13969
13969
|
const value = column.name ? record[column.name] : undefined;
|
|
13970
13970
|
const formatted = column.format ? column.format(value, row) : value;
|
|
13971
13971
|
return (jsxs("div", { className: cx(sx(cellWrapStyle), rowPainted ? sx(cellClearStyle) : ''), ...(column.name ? { 'data-colname': column.name } : {}), children: [column.label && jsx("div", { className: sx(stackedLabelStyle), children: heading(column, { interactive: false }) }), jsx("div", { className: cx(sx(cellStyle$2), alignTop ? sx(cellTopStyle) : '', column.className ?? ''), children: column.as ? (column.as({ row, rowIndex, name: column.name, expanded })) : column.name ? (jsx("span", { className: sx(valueStyle$2), children: formatted || jsx(Fragment, { children: "\u2013" }) })) : null })] }, colIndex));
|
|
13972
13972
|
})] }, key))] }, key));
|
|
13973
|
-
}), marker && rowMarker?.atEnd && !markerBeforeMatches && sorted.length > 0 && marker] })), totalRow && (jsx("div", { className: cx(sx(footerStyle$
|
|
13973
|
+
}), marker && rowMarker?.atEnd && !markerBeforeMatches && sorted.length > 0 && marker] })), totalRow && (jsx("div", { className: cx(sx(footerStyle$a), subgrid), children: jsxs("div", { className: cx(sx(gridStyle$7), subgrid), style: trackStyle, children: [expandable && jsx("div", { className: sx(totalCellStyle), "aria-hidden": "true" }), columns.map((_, i) => (jsx("div", { className: i === totalIndex ? sx(totalValueStyle) : sx(totalCellStyle), children: i === 0 ? totalRow.label : i === totalIndex ? total.toLocaleString() : null }, i)))] }) }))] }));
|
|
13974
13974
|
}
|
|
13975
13975
|
GridTable.displayName = 'GridTable';
|
|
13976
13976
|
|
|
@@ -14756,6 +14756,618 @@ const HubAppShell = ({ children, navItems, individualTravelItem, agentsItem, sou
|
|
|
14756
14756
|
return (jsxs("div", { className: cx(sx(shellStyle), expanded && sx(shellExpandedStyle), className), children: [loading && jsx("div", { className: sx(loadingStyle$4), role: "status", "aria-label": "Loading", "data-testid": "loading-overlay", children: jsx("span", {}) }), bannerLabel && jsx("div", { className: sx(qaBannerStyle), children: bannerLabel }), jsxs("aside", { className: sx(sidebarStyle$3), "data-expanded": expanded, children: [jsx("button", { type: "button", className: sx(expandButtonStyle), "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', onClick: () => setExpanded((value) => !value), children: expanded ? jsx(ChevronLeftIcon, { size: 14 }) : jsx(ChevronRightIcon$1, { size: 14 }) }), jsx("button", { type: "button", className: sx(logoStyle), "aria-label": "Go to Home", onClick: onLogoClick, children: logo ? (expanded ? logo : (collapsedLogo ?? logo)) : jsx(DefaultLogo, { expanded: expanded }) }), jsxs("nav", { className: sx(desktopNavStyle), "aria-label": "Hub navigation", children: [homeNavItem && jsx("div", { className: navigationDisabled ? sx(disabledNavStyle) : '', children: renderNavItem(homeNavItem) }), onLegacyPortal && jsxs("button", { type: "button", className: sx(navItemStyle), "aria-label": "Old Portal", title: "Old Portal", onClick: onLegacyPortal, "data-test": "hub-nav-legacy-portal", children: [jsx("span", { className: sx(navIconStyle), children: jsx(ArrowUpRightIcon, { size: 24 }) }), expanded && jsx("span", { children: "Old Portal" })] }), resolvedIndividualTravelItem && renderNavItem(resolvedIndividualTravelItem), jsx("div", { className: navigationDisabled ? sx(disabledNavStyle) : '', children: primaryNavItems.map((item) => renderNavItem(item)) })] }), jsxs("div", { className: sx(sidebarFooterStyle), children: [resolvedFooterNavItems.map((item) => renderNavItem(item)), jsxs("div", { className: sx(profileStyle), ref: profileRef, children: [jsxs("button", { type: "button", className: sx(avatarStyle$1), "aria-label": "User Information", onClick: () => setIsProfileOpen(!isProfileOpen), children: [jsx(Avatar, { initials: userInitials, size: expanded ? 28 : 'md' }), expanded && userName && jsx("span", { className: sx(userNameStyle), children: userName })] }), isProfileOpen && (renderProfileMenu || profileMenu) && (jsx("div", { className: sx(profileMenuStyle), children: renderProfileMenu ? renderProfileMenu(() => setIsProfileOpen(false)) : profileMenu }))] })] })] }), jsxs("div", { className: sx(mainStyle$4), children: [jsxs("header", { className: sx(topbarStyle), children: [jsx("div", { children: accountSelector ?? jsx(DefaultAccount, {}) }), renderTopbarActions ? renderTopbarActions(actions) : jsx(DefaultNavigationToggle, { ...actions })] }), isMobileNavOpen && jsxs("div", { className: sx(mobileNavStyle), children: [jsx("nav", { "aria-label": "Mobile Hub navigation", children: mobileNavItems.map((item) => renderNavItem(item, true)) }), (mobileExtras || onLegacyPortal) && jsxs("div", { className: sx(mobileExtrasStyle), role: "group", "aria-label": "Mobile navigation actions", children: [mobileExtras, onLegacyPortal && jsxs("button", { type: "button", className: sx(mobilePrimaryStyle), onClick: () => { onLegacyPortal(); closeMobileNav(); }, "data-test": "hub-mobile-legacy-portal", children: [jsx(ArrowUpRightIcon, { size: 20 }), jsx("span", { children: "Legacy Portal" })] })] }), mobileFooter && jsx("div", { className: sx(mobileFooterStyle), children: mobileFooter })] }), showContent && jsx("main", { className: cx(sx(contentStyle$6), contentDisabled && sx(contentDisabledStyle)), children: children })] })] }));
|
|
14757
14757
|
};
|
|
14758
14758
|
|
|
14759
|
+
/**
|
|
14760
|
+
* The After Hours Resolution Center's domain: Incidents, the four Divisions
|
|
14761
|
+
* that act on them, and the Routes that carry an Incident to each Division.
|
|
14762
|
+
* Shared by the intake form, the incident card, the resolve dialog, the
|
|
14763
|
+
* archive table and the page, so every surface uses the same words.
|
|
14764
|
+
*/
|
|
14765
|
+
/** The four Divisions in display order. */
|
|
14766
|
+
const DIVISIONS = [
|
|
14767
|
+
{ value: 'agency', label: 'Agency', services: 'air, hotel, car, limo' },
|
|
14768
|
+
{ value: 'charters', label: 'Charters', services: 'charter air' },
|
|
14769
|
+
{ value: 'stay', label: 'Stay', services: 'group hotels' },
|
|
14770
|
+
{ value: 'driven', label: 'Driven', services: 'bus, ground' },
|
|
14771
|
+
];
|
|
14772
|
+
/** Division key → display name. */
|
|
14773
|
+
const DIVISION_LABELS = {
|
|
14774
|
+
agency: 'Agency',
|
|
14775
|
+
charters: 'Charters',
|
|
14776
|
+
stay: 'Stay',
|
|
14777
|
+
driven: 'Driven',
|
|
14778
|
+
};
|
|
14779
|
+
/** Escalation tier → chip text. `none` is never shown. */
|
|
14780
|
+
const ESCALATION_LABELS = {
|
|
14781
|
+
none: 'None',
|
|
14782
|
+
'teams-5m': '5m Teams',
|
|
14783
|
+
'dispatch-10m': '10m Dispatch',
|
|
14784
|
+
'individual-20m': '20m Individual',
|
|
14785
|
+
};
|
|
14786
|
+
/** Resolution → display text. */
|
|
14787
|
+
const RESOLUTION_LABELS = {
|
|
14788
|
+
resolved: 'Resolved',
|
|
14789
|
+
'logged-in-error': 'Logged in error',
|
|
14790
|
+
};
|
|
14791
|
+
/** Priority → display text. */
|
|
14792
|
+
const PRIORITY_LABELS = {
|
|
14793
|
+
routine: 'Routine',
|
|
14794
|
+
urgent: 'Urgent',
|
|
14795
|
+
};
|
|
14796
|
+
/** Central time — STM's operations clock — unless a caller says otherwise. */
|
|
14797
|
+
const DEFAULT_INCIDENT_TIME_ZONE = 'America/Chicago';
|
|
14798
|
+
/** "12m", "1h 05m", "2d 3h" since `from`, measured at `now`; "Just now" under a minute. */
|
|
14799
|
+
const formatElapsed = (from, now) => {
|
|
14800
|
+
const minutes = Math.max(0, Math.floor((Date.parse(now) - Date.parse(from)) / 60000));
|
|
14801
|
+
if (minutes < 1)
|
|
14802
|
+
return 'Just now';
|
|
14803
|
+
if (minutes < 60)
|
|
14804
|
+
return `${minutes}m`;
|
|
14805
|
+
const hours = Math.floor(minutes / 60);
|
|
14806
|
+
if (hours < 24)
|
|
14807
|
+
return `${hours}h ${String(minutes % 60).padStart(2, '0')}m`;
|
|
14808
|
+
return `${Math.floor(hours / 24)}d ${hours % 24}h`;
|
|
14809
|
+
};
|
|
14810
|
+
/** "10:42 PM" in the given time zone. */
|
|
14811
|
+
const formatClockTime = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-US', { hour: 'numeric', minute: '2-digit', timeZone }).format(new Date(iso));
|
|
14812
|
+
/** "Oct 14, 2026" in the given time zone. */
|
|
14813
|
+
const formatIncidentDate = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone }).format(new Date(iso));
|
|
14814
|
+
/** "2026-10-14" in the given time zone — the shape a date filter compares against. */
|
|
14815
|
+
const toIncidentDateKey = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-CA', { year: 'numeric', month: '2-digit', day: '2-digit', timeZone }).format(new Date(iso));
|
|
14816
|
+
/** Acknowledged and total Route counts. */
|
|
14817
|
+
const countAcknowledged = (routes) => ({
|
|
14818
|
+
acknowledged: routes.filter((route) => Boolean(route.acknowledgedAt)).length,
|
|
14819
|
+
total: routes.length,
|
|
14820
|
+
});
|
|
14821
|
+
|
|
14822
|
+
/** IncidentArchiveTable's compiled rules. */
|
|
14823
|
+
const rootStyle = {
|
|
14824
|
+
label: 'IncidentArchiveTable-rootStyle',
|
|
14825
|
+
display: 'flex',
|
|
14826
|
+
flexDirection: 'column',
|
|
14827
|
+
gap: 'var(--space-4)',
|
|
14828
|
+
minWidth: 0,
|
|
14829
|
+
};
|
|
14830
|
+
const filtersStyle$5 = {
|
|
14831
|
+
label: 'IncidentArchiveTable-filtersStyle',
|
|
14832
|
+
display: 'grid',
|
|
14833
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(11rem, 1fr))',
|
|
14834
|
+
alignItems: 'end',
|
|
14835
|
+
gap: 'var(--space-3)',
|
|
14836
|
+
};
|
|
14837
|
+
const numberStyle$1 = {
|
|
14838
|
+
label: 'IncidentArchiveTable-numberStyle',
|
|
14839
|
+
color: 'var(--fg-1)',
|
|
14840
|
+
fontFamily: 'var(--font-family-mono)',
|
|
14841
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14842
|
+
whiteSpace: 'nowrap',
|
|
14843
|
+
};
|
|
14844
|
+
const stackStyle$4 = {
|
|
14845
|
+
label: 'IncidentArchiveTable-stackStyle',
|
|
14846
|
+
display: 'flex',
|
|
14847
|
+
flexDirection: 'column',
|
|
14848
|
+
gap: 'var(--space-0-5)',
|
|
14849
|
+
};
|
|
14850
|
+
const secondaryStyle = {
|
|
14851
|
+
label: 'IncidentArchiveTable-secondaryStyle',
|
|
14852
|
+
color: 'var(--fg-3)',
|
|
14853
|
+
fontSize: 'var(--fs-xs)',
|
|
14854
|
+
lineHeight: 'var(--lh-xs)',
|
|
14855
|
+
};
|
|
14856
|
+
const rootCauseStyle = {
|
|
14857
|
+
label: 'IncidentArchiveTable-rootCauseStyle',
|
|
14858
|
+
display: 'block',
|
|
14859
|
+
maxWidth: '40ch',
|
|
14860
|
+
color: 'var(--fg-1)',
|
|
14861
|
+
whiteSpace: 'normal',
|
|
14862
|
+
overflowWrap: 'anywhere',
|
|
14863
|
+
};
|
|
14864
|
+
/* Positioned so the sr-only text inside stays within the table's scroll box, not the page's. */
|
|
14865
|
+
const mutedStyle$2 = {
|
|
14866
|
+
label: 'IncidentArchiveTable-mutedStyle',
|
|
14867
|
+
position: 'relative',
|
|
14868
|
+
color: 'var(--fg-3)',
|
|
14869
|
+
};
|
|
14870
|
+
const srOnlyStyle$3 = { label: 'IncidentArchiveTable-srOnlyStyle', ...srOnly };
|
|
14871
|
+
/* The scroll box is ours, not Table's, so it can take focus and a name for keyboard scrolling. */
|
|
14872
|
+
const scrollRegionStyle = {
|
|
14873
|
+
label: 'IncidentArchiveTable-scrollRegionStyle',
|
|
14874
|
+
overflowX: 'auto',
|
|
14875
|
+
borderRadius: 'var(--radius-lg)',
|
|
14876
|
+
'&:focus-visible': {
|
|
14877
|
+
outline: '2px solid var(--color-primary)',
|
|
14878
|
+
outlineOffset: 2,
|
|
14879
|
+
},
|
|
14880
|
+
};
|
|
14881
|
+
const tableNoScrollStyle = {
|
|
14882
|
+
label: 'IncidentArchiveTable-tableNoScrollStyle',
|
|
14883
|
+
'&&': { overflowX: 'visible' },
|
|
14884
|
+
};
|
|
14885
|
+
|
|
14886
|
+
/** The Archive shows 50 resolved Incidents a page. */
|
|
14887
|
+
const ARCHIVE_PAGE_SIZE = 50;
|
|
14888
|
+
/**
|
|
14889
|
+
* The read-only Archive of resolved Incidents: newest first, 50 a page,
|
|
14890
|
+
* filterable by date range and account. Nothing here can be reopened.
|
|
14891
|
+
*/
|
|
14892
|
+
const IncidentArchiveTable = ({ incidents, totalItems, page, pageSize = ARCHIVE_PAGE_SIZE, accounts, filters, onFiltersChange, onPageChange, loading = false, timeZone = DEFAULT_INCIDENT_TIME_ZONE, className = '', }) => {
|
|
14893
|
+
const id = useId();
|
|
14894
|
+
const filtered = Boolean(filters.from || filters.to || filters.accountId);
|
|
14895
|
+
const update = (patch) => onFiltersChange?.({ ...filters, ...patch });
|
|
14896
|
+
const columns = [
|
|
14897
|
+
{
|
|
14898
|
+
key: 'number',
|
|
14899
|
+
label: 'Incident',
|
|
14900
|
+
render: (_value, row) => jsx("span", { className: sx(numberStyle$1), children: row.number }),
|
|
14901
|
+
},
|
|
14902
|
+
{
|
|
14903
|
+
key: 'createdAt',
|
|
14904
|
+
label: 'Logged',
|
|
14905
|
+
render: (_value, row) => (jsxs("span", { className: sx(stackStyle$4), children: [jsx("time", { dateTime: row.createdAt, children: formatIncidentDate(row.createdAt, timeZone) }), jsx("span", { className: sx(secondaryStyle), children: formatClockTime(row.createdAt, timeZone) })] })),
|
|
14906
|
+
},
|
|
14907
|
+
{
|
|
14908
|
+
key: 'accountName',
|
|
14909
|
+
label: 'Account',
|
|
14910
|
+
render: (_value, row) => (jsxs("span", { className: sx(stackStyle$4), children: [jsx("span", { children: row.accountName }), row.teamName && jsx("span", { className: sx(secondaryStyle), children: row.teamName })] })),
|
|
14911
|
+
},
|
|
14912
|
+
{
|
|
14913
|
+
key: 'leadDivision',
|
|
14914
|
+
label: 'Lead Division',
|
|
14915
|
+
render: (_value, row) => DIVISION_LABELS[row.leadDivision],
|
|
14916
|
+
},
|
|
14917
|
+
{
|
|
14918
|
+
key: 'priority',
|
|
14919
|
+
label: 'Priority',
|
|
14920
|
+
render: (_value, row) => (jsx(Badge, { variant: row.priority === 'urgent' ? 'error' : 'default', size: "sm", children: PRIORITY_LABELS[row.priority] })),
|
|
14921
|
+
},
|
|
14922
|
+
{
|
|
14923
|
+
key: 'resolution',
|
|
14924
|
+
label: 'Resolution',
|
|
14925
|
+
render: (_value, row) => (jsx(Badge, { variant: row.resolution === 'resolved' ? 'success' : 'warning', size: "sm", children: RESOLUTION_LABELS[row.resolution] })),
|
|
14926
|
+
},
|
|
14927
|
+
{
|
|
14928
|
+
key: 'rootCause',
|
|
14929
|
+
label: 'Root cause',
|
|
14930
|
+
render: (_value, row) => row.rootCause ? (jsx("span", { className: sx(rootCauseStyle), children: row.rootCause })) : (jsxs("span", { className: sx(mutedStyle$2), children: [jsx("span", { "aria-hidden": "true", children: "\u2014" }), jsx("span", { className: sx(srOnlyStyle$3), children: "No root cause" })] })),
|
|
14931
|
+
},
|
|
14932
|
+
{
|
|
14933
|
+
key: 'resolvedBy',
|
|
14934
|
+
label: 'Resolved by',
|
|
14935
|
+
render: (_value, row) => (jsxs("span", { className: sx(stackStyle$4), children: [jsx("span", { children: row.resolvedBy }), jsxs("time", { className: sx(secondaryStyle), dateTime: row.resolvedAt, children: [formatIncidentDate(row.resolvedAt, timeZone), " ", formatClockTime(row.resolvedAt, timeZone)] })] })),
|
|
14936
|
+
},
|
|
14937
|
+
];
|
|
14938
|
+
return (jsxs("div", { className: cx(sx(rootStyle), className), "data-test": "incident-archive", children: [jsxs("div", { className: sx(filtersStyle$5), role: "group", "aria-label": "Archive filters", children: [jsx(Datepicker, { id: `${id}-from`, label: "From", size: "sm", value: filters.from ?? '', max: filters.to, onChange: (event) => update({ from: event.target.value || undefined }), fullWidth: true, "data-test": "incident-archive-from" }), jsx(Datepicker, { id: `${id}-to`, label: "To", size: "sm", value: filters.to ?? '', min: filters.from, onChange: (event) => update({ to: event.target.value || undefined }), fullWidth: true, "data-test": "incident-archive-to" }), jsx(Select, { id: `${id}-account`, label: "Account", size: "sm", options: [{ value: '', label: 'All accounts' }, ...accounts.map((a) => ({ value: a.id, label: a.name }))], value: filters.accountId ?? '', onChange: (event) => update({ accountId: event.target.value || undefined }), fullWidth: true, "data-test": "incident-archive-account" }), filtered && (jsx(Button, { variant: "ghost", size: "sm", onClick: () => onFiltersChange?.({}), "data-test": "incident-archive-clear", children: "Clear filters" }))] }), jsx("div", { className: sx(scrollRegionStyle), role: "region", "aria-label": "Resolved incidents", tabIndex: 0, "data-test": "incident-archive-scroll", children: jsx(Table, { className: sx(tableNoScrollStyle), columns: columns, data: incidents, rowKey: "id", loading: loading, emptyContent: jsx(EmptyState$1, { size: "sm", title: filtered ? 'No resolved incidents match' : 'No resolved incidents yet', description: filtered
|
|
14939
|
+
? 'Try a wider date range or a different account.'
|
|
14940
|
+
: 'Incidents land here once they are resolved or closed as logged in error.' }) }) }), totalItems > 0 && (jsx(Pagination, { page: page, pageSize: pageSize, totalItems: totalItems, itemLabel: "incidents", ariaLabel: "Archive pages", onPageChange: onPageChange }))] }));
|
|
14941
|
+
};
|
|
14942
|
+
IncidentArchiveTable.displayName = 'IncidentArchiveTable';
|
|
14943
|
+
|
|
14944
|
+
/** IncidentCard's compiled rules. One rule per element; every value is a token. */
|
|
14945
|
+
const cardStyle$b = {
|
|
14946
|
+
label: 'IncidentCard-cardStyle',
|
|
14947
|
+
display: 'flex',
|
|
14948
|
+
flexDirection: 'column',
|
|
14949
|
+
gap: 'var(--space-3)',
|
|
14950
|
+
minWidth: 0,
|
|
14951
|
+
};
|
|
14952
|
+
/* Doubled so it outranks Card's own border rule, which is injected after this one. */
|
|
14953
|
+
const urgentStyle = {
|
|
14954
|
+
label: 'IncidentCard-urgentStyle',
|
|
14955
|
+
'&&': {
|
|
14956
|
+
borderColor: 'var(--color-alert-error-border)',
|
|
14957
|
+
borderLeft: '4px solid var(--color-error)',
|
|
14958
|
+
background: 'var(--alert-error-bg)',
|
|
14959
|
+
},
|
|
14960
|
+
};
|
|
14961
|
+
const headerStyle$x = {
|
|
14962
|
+
label: 'IncidentCard-headerStyle',
|
|
14963
|
+
display: 'flex',
|
|
14964
|
+
flexWrap: 'wrap',
|
|
14965
|
+
alignItems: 'center',
|
|
14966
|
+
gap: 'var(--space-2)',
|
|
14967
|
+
};
|
|
14968
|
+
const numberStyle = {
|
|
14969
|
+
label: 'IncidentCard-numberStyle',
|
|
14970
|
+
margin: 0,
|
|
14971
|
+
color: 'var(--fg-1)',
|
|
14972
|
+
fontFamily: 'var(--font-family-mono)',
|
|
14973
|
+
fontSize: 'var(--fs-base)',
|
|
14974
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14975
|
+
lineHeight: 'var(--lh-base)',
|
|
14976
|
+
};
|
|
14977
|
+
const syncingStyle = {
|
|
14978
|
+
label: 'IncidentCard-syncingStyle',
|
|
14979
|
+
color: 'var(--fg-3)',
|
|
14980
|
+
fontFamily: 'var(--font-family-base)',
|
|
14981
|
+
fontStyle: 'italic',
|
|
14982
|
+
fontWeight: 'var(--fw-medium)',
|
|
14983
|
+
};
|
|
14984
|
+
const elapsedStyle = {
|
|
14985
|
+
label: 'IncidentCard-elapsedStyle',
|
|
14986
|
+
marginLeft: 'auto',
|
|
14987
|
+
color: 'var(--fg-3)',
|
|
14988
|
+
fontSize: 'var(--fs-sm)',
|
|
14989
|
+
lineHeight: 'var(--lh-sm)',
|
|
14990
|
+
whiteSpace: 'nowrap',
|
|
14991
|
+
};
|
|
14992
|
+
const accountStyle = {
|
|
14993
|
+
label: 'IncidentCard-accountStyle',
|
|
14994
|
+
margin: 0,
|
|
14995
|
+
color: 'var(--fg-1)',
|
|
14996
|
+
fontSize: 'var(--fs-sm)',
|
|
14997
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14998
|
+
lineHeight: 'var(--lh-sm)',
|
|
14999
|
+
overflowWrap: 'anywhere',
|
|
15000
|
+
};
|
|
15001
|
+
const metaStyle$1 = {
|
|
15002
|
+
label: 'IncidentCard-metaStyle',
|
|
15003
|
+
display: 'grid',
|
|
15004
|
+
gridTemplateColumns: 'max-content minmax(0, 1fr)',
|
|
15005
|
+
columnGap: 'var(--space-3)',
|
|
15006
|
+
rowGap: 'var(--space-1)',
|
|
15007
|
+
margin: 0,
|
|
15008
|
+
fontSize: 'var(--fs-sm)',
|
|
15009
|
+
lineHeight: 'var(--lh-sm)',
|
|
15010
|
+
};
|
|
15011
|
+
const metaTermStyle = {
|
|
15012
|
+
label: 'IncidentCard-metaTermStyle',
|
|
15013
|
+
color: 'var(--fg-3)',
|
|
15014
|
+
};
|
|
15015
|
+
const metaValueStyle = {
|
|
15016
|
+
label: 'IncidentCard-metaValueStyle',
|
|
15017
|
+
margin: 0,
|
|
15018
|
+
color: 'var(--fg-1)',
|
|
15019
|
+
overflowWrap: 'anywhere',
|
|
15020
|
+
};
|
|
15021
|
+
const telLinkStyle = {
|
|
15022
|
+
label: 'IncidentCard-telLinkStyle',
|
|
15023
|
+
color: 'var(--fg-link)',
|
|
15024
|
+
fontWeight: 'var(--fw-medium)',
|
|
15025
|
+
whiteSpace: 'nowrap',
|
|
15026
|
+
'&:hover': { color: 'var(--fg-link-hover)' },
|
|
15027
|
+
'&:focus-visible': {
|
|
15028
|
+
outline: '2px solid var(--color-primary)',
|
|
15029
|
+
outlineOffset: 2,
|
|
15030
|
+
},
|
|
15031
|
+
};
|
|
15032
|
+
const narrativeStyle = {
|
|
15033
|
+
label: 'IncidentCard-narrativeStyle',
|
|
15034
|
+
margin: 0,
|
|
15035
|
+
color: 'var(--fg-1)',
|
|
15036
|
+
fontSize: 'var(--fs-sm)',
|
|
15037
|
+
lineHeight: 'var(--lh-sm)',
|
|
15038
|
+
whiteSpace: 'pre-wrap',
|
|
15039
|
+
overflowWrap: 'anywhere',
|
|
15040
|
+
};
|
|
15041
|
+
const loggedByStyle = {
|
|
15042
|
+
label: 'IncidentCard-loggedByStyle',
|
|
15043
|
+
margin: 0,
|
|
15044
|
+
color: 'var(--fg-3)',
|
|
15045
|
+
fontSize: 'var(--fs-xs)',
|
|
15046
|
+
lineHeight: 'var(--lh-xs)',
|
|
15047
|
+
};
|
|
15048
|
+
const routesStyle = {
|
|
15049
|
+
label: 'IncidentCard-routesStyle',
|
|
15050
|
+
display: 'flex',
|
|
15051
|
+
flexDirection: 'column',
|
|
15052
|
+
gap: 'var(--space-2)',
|
|
15053
|
+
paddingTop: 'var(--space-3)',
|
|
15054
|
+
borderTop: '1px solid var(--border-color)',
|
|
15055
|
+
};
|
|
15056
|
+
const routesHeaderStyle = {
|
|
15057
|
+
label: 'IncidentCard-routesHeaderStyle',
|
|
15058
|
+
display: 'flex',
|
|
15059
|
+
flexWrap: 'wrap',
|
|
15060
|
+
alignItems: 'baseline',
|
|
15061
|
+
justifyContent: 'space-between',
|
|
15062
|
+
gap: 'var(--space-2)',
|
|
15063
|
+
};
|
|
15064
|
+
const routesTitleStyle = {
|
|
15065
|
+
label: 'IncidentCard-routesTitleStyle',
|
|
15066
|
+
margin: 0,
|
|
15067
|
+
color: 'var(--fg-2)',
|
|
15068
|
+
fontSize: 'var(--fs-xs)',
|
|
15069
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15070
|
+
lineHeight: 'var(--lh-xs)',
|
|
15071
|
+
textTransform: 'uppercase',
|
|
15072
|
+
letterSpacing: '0.04em',
|
|
15073
|
+
};
|
|
15074
|
+
const progressStyle = {
|
|
15075
|
+
label: 'IncidentCard-progressStyle',
|
|
15076
|
+
color: 'var(--fg-2)',
|
|
15077
|
+
fontSize: 'var(--fs-xs)',
|
|
15078
|
+
fontWeight: 'var(--fw-medium)',
|
|
15079
|
+
lineHeight: 'var(--lh-xs)',
|
|
15080
|
+
};
|
|
15081
|
+
const routeListStyle = {
|
|
15082
|
+
label: 'IncidentCard-routeListStyle',
|
|
15083
|
+
display: 'flex',
|
|
15084
|
+
flexDirection: 'column',
|
|
15085
|
+
gap: 'var(--space-2)',
|
|
15086
|
+
margin: 0,
|
|
15087
|
+
padding: 0,
|
|
15088
|
+
listStyle: 'none',
|
|
15089
|
+
};
|
|
15090
|
+
const routeStyle$3 = {
|
|
15091
|
+
label: 'IncidentCard-routeStyle',
|
|
15092
|
+
display: 'flex',
|
|
15093
|
+
flexWrap: 'wrap',
|
|
15094
|
+
alignItems: 'center',
|
|
15095
|
+
gap: 'var(--space-2)',
|
|
15096
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
15097
|
+
borderRadius: 'var(--radius-lg)',
|
|
15098
|
+
background: 'var(--bg-subtle)',
|
|
15099
|
+
};
|
|
15100
|
+
const routeDivisionStyle = {
|
|
15101
|
+
label: 'IncidentCard-routeDivisionStyle',
|
|
15102
|
+
minWidth: '9ch',
|
|
15103
|
+
color: 'var(--fg-1)',
|
|
15104
|
+
fontSize: 'var(--fs-sm)',
|
|
15105
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15106
|
+
lineHeight: 'var(--lh-sm)',
|
|
15107
|
+
};
|
|
15108
|
+
const routeStatusStyle = {
|
|
15109
|
+
label: 'IncidentCard-routeStatusStyle',
|
|
15110
|
+
flex: '1 1 12ch',
|
|
15111
|
+
color: 'var(--fg-2)',
|
|
15112
|
+
fontSize: 'var(--fs-xs)',
|
|
15113
|
+
lineHeight: 'var(--lh-xs)',
|
|
15114
|
+
};
|
|
15115
|
+
const routeAckedStyle = {
|
|
15116
|
+
label: 'IncidentCard-routeAckedStyle',
|
|
15117
|
+
color: 'var(--color-success-ink)',
|
|
15118
|
+
fontWeight: 'var(--fw-medium)',
|
|
15119
|
+
};
|
|
15120
|
+
const footerStyle$9 = {
|
|
15121
|
+
label: 'IncidentCard-footerStyle',
|
|
15122
|
+
display: 'flex',
|
|
15123
|
+
justifyContent: 'flex-end',
|
|
15124
|
+
};
|
|
15125
|
+
|
|
15126
|
+
const ESCALATION_BADGES = {
|
|
15127
|
+
'teams-5m': 'warning',
|
|
15128
|
+
'dispatch-10m': 'error',
|
|
15129
|
+
'individual-20m': 'error',
|
|
15130
|
+
};
|
|
15131
|
+
/** `tel:` href from a display number; US 10-digit numbers get +1. */
|
|
15132
|
+
const toTelHref = (phone) => {
|
|
15133
|
+
const digits = phone.replace(/[^\d+]/g, '');
|
|
15134
|
+
return `tel:${/^\d{10}$/.test(digits) ? `+1${digits}` : digits}`;
|
|
15135
|
+
};
|
|
15136
|
+
/**
|
|
15137
|
+
* One Open Incident in the Alert Log: who called, what happened, and which
|
|
15138
|
+
* Divisions have acknowledged it. Unacknowledged Routes do not block Resolve.
|
|
15139
|
+
*/
|
|
15140
|
+
const IncidentCard = ({ incident, now, timeZone = DEFAULT_INCIDENT_TIME_ZONE, onMarkReceived, onResolve, headingLevel = 3, className = '', }) => {
|
|
15141
|
+
const titleId = useId();
|
|
15142
|
+
const Heading = `h${headingLevel}`;
|
|
15143
|
+
const urgent = incident.priority === 'urgent';
|
|
15144
|
+
const { acknowledged, total } = countAcknowledged(incident.routes);
|
|
15145
|
+
const elapsed = formatElapsed(incident.createdAt, now);
|
|
15146
|
+
const label = incident.number ?? 'syncing incident';
|
|
15147
|
+
return (jsxs(Card, { variant: "default", padding: "md", role: "article", "aria-labelledby": titleId, className: cx(sx(cardStyle$b), urgent && sx(urgentStyle), className), "data-test": "incident-card", "data-priority": incident.priority, children: [jsxs("div", { className: sx(headerStyle$x), children: [jsx(Heading, { id: titleId, className: sx(numberStyle), children: incident.number ?? (jsx("span", { className: sx(syncingStyle), "data-test": "incident-syncing", children: "Syncing\u2026" })) }), jsx(Badge, { variant: urgent ? 'error' : 'default', dot: urgent, children: PRIORITY_LABELS[incident.priority] }), jsx("time", { className: sx(elapsedStyle), dateTime: incident.createdAt, title: `Logged ${formatClockTime(incident.createdAt, timeZone)}`, children: elapsed === 'Just now' ? elapsed : `${elapsed} ago` })] }), jsxs("p", { className: sx(accountStyle), children: [incident.accountName, incident.teamName && ` · ${incident.teamName}`] }), jsxs("dl", { className: sx(metaStyle$1), children: [jsx("dt", { className: sx(metaTermStyle), children: "Lead Division" }), jsx("dd", { className: sx(metaValueStyle), children: DIVISION_LABELS[incident.leadDivision] }), jsx("dt", { className: sx(metaTermStyle), children: "Caller" }), jsxs("dd", { className: sx(metaValueStyle), children: [incident.callerName && `${incident.callerName} · `, jsx("a", { className: sx(telLinkStyle), href: toTelHref(incident.callbackNumber), "data-test": "incident-callback", children: incident.callbackNumber })] }), incident.incidentType && (jsxs(Fragment, { children: [jsx("dt", { className: sx(metaTermStyle), children: "Type" }), jsx("dd", { className: sx(metaValueStyle), children: incident.incidentType })] }))] }), jsx("p", { className: sx(narrativeStyle), "data-test": "incident-narrative", children: incident.narrative }), jsxs("p", { className: sx(loggedByStyle), children: ["Logged by ", incident.loggedBy, " (", DIVISION_LABELS[incident.loggingDivision], ") at", ' ', formatClockTime(incident.createdAt, timeZone)] }), jsxs("section", { className: sx(routesStyle), "aria-label": `Routes for ${label}`, children: [jsxs("div", { className: sx(routesHeaderStyle), children: [jsx("p", { className: sx(routesTitleStyle), children: "Routes" }), jsxs("span", { className: sx(progressStyle), "data-test": "incident-ack-progress", children: ["Acknowledged ", acknowledged, "/", total, " ", total === 1 ? 'division' : 'divisions'] })] }), jsx("ul", { className: sx(routeListStyle), children: incident.routes.map((route) => {
|
|
15148
|
+
const name = DIVISION_LABELS[route.division];
|
|
15149
|
+
return (jsxs("li", { className: sx(routeStyle$3), "data-test": `incident-route-${route.division}`, children: [jsx("span", { className: sx(routeDivisionStyle), children: name }), route.acknowledgedAt ? (jsxs("span", { className: cx(sx(routeStatusStyle), sx(routeAckedStyle)), children: ["Received by ", route.acknowledgedBy, " at ", formatClockTime(route.acknowledgedAt, timeZone)] })) : (jsxs(Fragment, { children: [jsx("span", { className: sx(routeStatusStyle), children: "Not acknowledged" }), route.escalation !== 'none' && (jsxs(Badge, { variant: ESCALATION_BADGES[route.escalation], size: "sm", "data-test": "incident-route-escalation", children: ["Escalated \u00B7 ", ESCALATION_LABELS[route.escalation]] })), jsx(Button, { size: "sm", variant: "outline", onClick: () => onMarkReceived?.(incident.id, route.division), "aria-label": `Mark received for ${name}`, "data-test": "incident-mark-received", children: "Mark received" })] }))] }, route.division));
|
|
15150
|
+
}) })] }), jsx("div", { className: sx(footerStyle$9), children: jsx(Button, { size: "sm", variant: "primary", onClick: () => onResolve?.(incident.id), "aria-label": `Resolve ${label}`, "data-test": "incident-resolve", children: "Resolve" }) })] }));
|
|
15151
|
+
};
|
|
15152
|
+
IncidentCard.displayName = 'IncidentCard';
|
|
15153
|
+
|
|
15154
|
+
/** IncidentIntakeForm's compiled rules. Compact by design: the target is intake in under a minute. */
|
|
15155
|
+
const formStyle$5 = {
|
|
15156
|
+
label: 'IncidentIntakeForm-formStyle',
|
|
15157
|
+
display: 'flex',
|
|
15158
|
+
flexDirection: 'column',
|
|
15159
|
+
gap: 'var(--space-3)',
|
|
15160
|
+
minWidth: 0,
|
|
15161
|
+
};
|
|
15162
|
+
const rowStyle$5 = {
|
|
15163
|
+
label: 'IncidentIntakeForm-rowStyle',
|
|
15164
|
+
display: 'grid',
|
|
15165
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(13rem, 1fr))',
|
|
15166
|
+
gap: 'var(--space-3)',
|
|
15167
|
+
};
|
|
15168
|
+
const fieldsetStyle$1 = {
|
|
15169
|
+
label: 'IncidentIntakeForm-fieldsetStyle',
|
|
15170
|
+
display: 'flex',
|
|
15171
|
+
flexDirection: 'column',
|
|
15172
|
+
gap: 'var(--space-1-5)',
|
|
15173
|
+
minWidth: 0,
|
|
15174
|
+
margin: 0,
|
|
15175
|
+
padding: 0,
|
|
15176
|
+
border: 0,
|
|
15177
|
+
};
|
|
15178
|
+
const legendStyle$2 = {
|
|
15179
|
+
label: 'IncidentIntakeForm-legendStyle',
|
|
15180
|
+
marginBottom: 'var(--space-1-5)',
|
|
15181
|
+
padding: 0,
|
|
15182
|
+
color: 'var(--fg-1)',
|
|
15183
|
+
fontSize: 'var(--fs-sm)',
|
|
15184
|
+
fontWeight: 'var(--fw-medium)',
|
|
15185
|
+
};
|
|
15186
|
+
const divisionGridStyle = {
|
|
15187
|
+
label: 'IncidentIntakeForm-divisionGridStyle',
|
|
15188
|
+
display: 'grid',
|
|
15189
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(13rem, 1fr))',
|
|
15190
|
+
gap: 'var(--space-2) var(--space-3)',
|
|
15191
|
+
};
|
|
15192
|
+
const errorTextStyle = {
|
|
15193
|
+
label: 'IncidentIntakeForm-errorTextStyle',
|
|
15194
|
+
margin: 0,
|
|
15195
|
+
color: 'var(--color-error)',
|
|
15196
|
+
fontSize: 'var(--fs-xs)',
|
|
15197
|
+
};
|
|
15198
|
+
const helperTextStyle = {
|
|
15199
|
+
label: 'IncidentIntakeForm-helperTextStyle',
|
|
15200
|
+
margin: 0,
|
|
15201
|
+
color: 'var(--fg-3)',
|
|
15202
|
+
fontSize: 'var(--fs-xs)',
|
|
15203
|
+
};
|
|
15204
|
+
const footerStyle$8 = {
|
|
15205
|
+
label: 'IncidentIntakeForm-footerStyle',
|
|
15206
|
+
display: 'flex',
|
|
15207
|
+
flexWrap: 'wrap',
|
|
15208
|
+
alignItems: 'flex-end',
|
|
15209
|
+
justifyContent: 'space-between',
|
|
15210
|
+
gap: 'var(--space-3)',
|
|
15211
|
+
paddingTop: 'var(--space-1)',
|
|
15212
|
+
};
|
|
15213
|
+
const priorityStyle = {
|
|
15214
|
+
label: 'IncidentIntakeForm-priorityStyle',
|
|
15215
|
+
display: 'flex',
|
|
15216
|
+
flexDirection: 'column',
|
|
15217
|
+
gap: 'var(--space-1-5)',
|
|
15218
|
+
};
|
|
15219
|
+
const priorityLabelStyle = {
|
|
15220
|
+
label: 'IncidentIntakeForm-priorityLabelStyle',
|
|
15221
|
+
color: 'var(--fg-1)',
|
|
15222
|
+
fontSize: 'var(--fs-sm)',
|
|
15223
|
+
fontWeight: 'var(--fw-medium)',
|
|
15224
|
+
};
|
|
15225
|
+
/* Urgent's selected segment turns red, so the choice is unmistakable before submitting. */
|
|
15226
|
+
const urgentSegmentStyle = {
|
|
15227
|
+
label: 'IncidentIntakeForm-urgentSegmentStyle',
|
|
15228
|
+
'& [role="radio"][aria-checked="true"]': {
|
|
15229
|
+
background: 'var(--color-error)',
|
|
15230
|
+
color: 'var(--color-white)',
|
|
15231
|
+
},
|
|
15232
|
+
};
|
|
15233
|
+
const actionsStyle$7 = {
|
|
15234
|
+
label: 'IncidentIntakeForm-actionsStyle',
|
|
15235
|
+
display: 'flex',
|
|
15236
|
+
gap: 'var(--space-2)',
|
|
15237
|
+
marginLeft: 'auto',
|
|
15238
|
+
};
|
|
15239
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
15240
|
+
const textareaRowsStyle$1 = {
|
|
15241
|
+
label: 'IncidentIntakeForm-textareaRowsStyle',
|
|
15242
|
+
'& textarea': { height: 'auto' },
|
|
15243
|
+
};
|
|
15244
|
+
/* Select's own error text uses an off-token red that fails contrast; restate Input's error token. */
|
|
15245
|
+
const selectErrorTokenStyle = {
|
|
15246
|
+
label: 'IncidentIntakeForm-selectErrorTokenStyle',
|
|
15247
|
+
'& [id$="-error"]': { color: 'var(--color-error)' },
|
|
15248
|
+
};
|
|
15249
|
+
|
|
15250
|
+
const DIVISION_OPTIONS = DIVISIONS.map((division) => ({ value: division.value, label: division.label }));
|
|
15251
|
+
const PRIORITY_OPTIONS = [
|
|
15252
|
+
{ value: 'routine', label: 'Routine' },
|
|
15253
|
+
{ value: 'urgent', label: 'Urgent' },
|
|
15254
|
+
];
|
|
15255
|
+
const FIELD_ORDER = ['account', 'callbackNumber', 'loggingDivision', 'divisions', 'narrative'];
|
|
15256
|
+
const emptyValues = (loggingDivision) => ({
|
|
15257
|
+
accountName: '',
|
|
15258
|
+
teamId: '',
|
|
15259
|
+
callbackNumber: '',
|
|
15260
|
+
callerName: '',
|
|
15261
|
+
loggingDivision,
|
|
15262
|
+
divisions: [],
|
|
15263
|
+
leadDivision: loggingDivision,
|
|
15264
|
+
incidentType: '',
|
|
15265
|
+
narrative: '',
|
|
15266
|
+
priority: 'routine',
|
|
15267
|
+
});
|
|
15268
|
+
/** Adds a Division, keeping the list in display order. */
|
|
15269
|
+
const withDivision = (list, division) => DIVISIONS.map((d) => d.value).filter((d) => d === division || list.includes(d));
|
|
15270
|
+
const findAccount = (accounts, name) => accounts.find((account) => account.name.toLowerCase() === name.trim().toLowerCase());
|
|
15271
|
+
/** The validation message per field, or nothing when the field is fine. */
|
|
15272
|
+
const validateIncidentIntake = (values, accounts) => {
|
|
15273
|
+
const errors = {};
|
|
15274
|
+
if (!values.accountName.trim())
|
|
15275
|
+
errors.account = 'Enter the client or account.';
|
|
15276
|
+
else if (!findAccount(accounts, values.accountName))
|
|
15277
|
+
errors.account = 'Choose an account from the list.';
|
|
15278
|
+
const digits = values.callbackNumber.replace(/\D/g, '');
|
|
15279
|
+
if (!digits)
|
|
15280
|
+
errors.callbackNumber = 'Enter a callback number.';
|
|
15281
|
+
else if (digits.length < 7)
|
|
15282
|
+
errors.callbackNumber = 'Callback number needs at least 7 digits.';
|
|
15283
|
+
if (!values.loggingDivision)
|
|
15284
|
+
errors.loggingDivision = 'Choose the Division you are logging as.';
|
|
15285
|
+
if (values.divisions.length === 0)
|
|
15286
|
+
errors.divisions = 'Tick at least one Division.';
|
|
15287
|
+
if (!values.narrative.trim())
|
|
15288
|
+
errors.narrative = 'Describe the issue.';
|
|
15289
|
+
return errors;
|
|
15290
|
+
};
|
|
15291
|
+
/**
|
|
15292
|
+
* The "New incident" intake form. Lead Division follows Logging as until it is
|
|
15293
|
+
* changed by hand; choosing an unticked Lead Division ticks it. Team is hidden
|
|
15294
|
+
* when Agency leads, since Agency work is not tied to a team.
|
|
15295
|
+
*/
|
|
15296
|
+
const IncidentIntakeForm = ({ accounts, defaultLoggingDivision, onSubmit, onLoggingDivisionChange, onCancel, submitting = false, ariaLabel = 'New incident', className = '', }) => {
|
|
15297
|
+
const id = useId();
|
|
15298
|
+
const [values, setValues] = useState(() => emptyValues(defaultLoggingDivision ?? ''));
|
|
15299
|
+
const [leadTouched, setLeadTouched] = useState(false);
|
|
15300
|
+
const [attempted, setAttempted] = useState(false);
|
|
15301
|
+
const fieldRefs = useRef({});
|
|
15302
|
+
const account = findAccount(accounts, values.accountName);
|
|
15303
|
+
const teamOptions = useMemo(() => (account?.teams ?? []).map((team) => ({ value: team.id, label: team.name })), [account]);
|
|
15304
|
+
const showTeam = values.leadDivision !== 'agency';
|
|
15305
|
+
const errors = attempted ? validateIncidentIntake(values, accounts) : {};
|
|
15306
|
+
const set = (key, value) => setValues((current) => ({ ...current, [key]: value }));
|
|
15307
|
+
const changeLogging = (division) => {
|
|
15308
|
+
setValues((current) => ({
|
|
15309
|
+
...current,
|
|
15310
|
+
loggingDivision: division,
|
|
15311
|
+
leadDivision: leadTouched ? current.leadDivision : division,
|
|
15312
|
+
}));
|
|
15313
|
+
onLoggingDivisionChange?.(division);
|
|
15314
|
+
};
|
|
15315
|
+
const changeLead = (division) => {
|
|
15316
|
+
setLeadTouched(true);
|
|
15317
|
+
setValues((current) => ({
|
|
15318
|
+
...current,
|
|
15319
|
+
leadDivision: division,
|
|
15320
|
+
divisions: withDivision(current.divisions, division),
|
|
15321
|
+
}));
|
|
15322
|
+
};
|
|
15323
|
+
const toggleDivision = (division, checked) => setValues((current) => ({
|
|
15324
|
+
...current,
|
|
15325
|
+
divisions: checked
|
|
15326
|
+
? withDivision(current.divisions, division)
|
|
15327
|
+
: current.divisions.filter((d) => d !== division),
|
|
15328
|
+
}));
|
|
15329
|
+
const handleSubmit = (event) => {
|
|
15330
|
+
event.preventDefault();
|
|
15331
|
+
setAttempted(true);
|
|
15332
|
+
const found = validateIncidentIntake(values, accounts);
|
|
15333
|
+
const firstInvalid = FIELD_ORDER.find((key) => found[key]);
|
|
15334
|
+
if (firstInvalid) {
|
|
15335
|
+
fieldRefs.current[firstInvalid]?.focus();
|
|
15336
|
+
return;
|
|
15337
|
+
}
|
|
15338
|
+
const loggingDivision = values.loggingDivision;
|
|
15339
|
+
onSubmit({
|
|
15340
|
+
accountId: account.id,
|
|
15341
|
+
teamId: showTeam && values.teamId ? values.teamId : undefined,
|
|
15342
|
+
callbackNumber: values.callbackNumber.trim(),
|
|
15343
|
+
callerName: values.callerName.trim() || undefined,
|
|
15344
|
+
loggingDivision,
|
|
15345
|
+
divisions: values.divisions,
|
|
15346
|
+
leadDivision: (values.leadDivision || loggingDivision),
|
|
15347
|
+
incidentType: values.incidentType.trim() || undefined,
|
|
15348
|
+
narrative: values.narrative.trim(),
|
|
15349
|
+
priority: values.priority,
|
|
15350
|
+
});
|
|
15351
|
+
setValues(emptyValues(loggingDivision));
|
|
15352
|
+
setLeadTouched(false);
|
|
15353
|
+
setAttempted(false);
|
|
15354
|
+
};
|
|
15355
|
+
return (jsxs("form", { className: cx(sx(formStyle$5), className), "aria-label": ariaLabel, noValidate: true, onSubmit: handleSubmit, "data-test": "incident-intake-form", children: [jsxs("div", { className: sx(rowStyle$5), children: [jsx(Input, { id: `${id}-account`, ref: (node) => {
|
|
15356
|
+
fieldRefs.current.account = node;
|
|
15357
|
+
}, label: "Client / Account", placeholder: "Start typing a school\u2026", list: `${id}-accounts`, autoComplete: "off", value: values.accountName, onChange: (event) => setValues((current) => ({ ...current, accountName: event.target.value, teamId: '' })), error: errors.account, required: true, fullWidth: true, size: "sm", "data-test": "incident-intake-account" }), jsx("datalist", { id: `${id}-accounts`, children: accounts.map((option) => (jsx("option", { value: option.name }, option.id))) }), showTeam && (jsx(Select, { id: `${id}-team`, label: "Team (optional)", placeholder: account ? (teamOptions.length ? 'Select a team' : 'No teams on this account') : 'Choose an account first', options: teamOptions, value: values.teamId, onChange: (event) => set('teamId', event.target.value), disabled: !account || teamOptions.length === 0, fullWidth: true, size: "sm", "data-test": "incident-intake-team" }))] }), jsxs("div", { className: sx(rowStyle$5), children: [jsx(Input, { id: `${id}-callback`, ref: (node) => {
|
|
15358
|
+
fieldRefs.current.callbackNumber = node;
|
|
15359
|
+
}, label: "Callback number", type: "tel", inputMode: "tel", autoComplete: "off", value: values.callbackNumber, onChange: (event) => set('callbackNumber', event.target.value), error: errors.callbackNumber, required: true, fullWidth: true, size: "sm", "data-test": "incident-intake-callback" }), jsx(Input, { id: `${id}-caller`, label: "Caller name (optional)", autoComplete: "off", value: values.callerName, onChange: (event) => set('callerName', event.target.value), fullWidth: true, size: "sm", "data-test": "incident-intake-caller" })] }), jsxs("div", { className: sx(rowStyle$5), children: [jsx(Select, { id: `${id}-logging`, ref: (node) => {
|
|
15360
|
+
fieldRefs.current.loggingDivision = node;
|
|
15361
|
+
}, label: "Logging as", placeholder: "Select your Division", options: DIVISION_OPTIONS, value: values.loggingDivision, onChange: (event) => changeLogging(event.target.value), helperText: "Remembered for your next incident.", error: errors.loggingDivision, "aria-required": "true", className: sx(selectErrorTokenStyle), fullWidth: true, size: "sm", "data-test": "incident-intake-logging-division" }), jsx(Select, { id: `${id}-lead`, label: "Lead Division", placeholder: "Defaults to Logging as", options: DIVISION_OPTIONS, value: values.leadDivision, onChange: (event) => changeLead(event.target.value), helperText: "Picking an unticked Division ticks it below.", fullWidth: true, size: "sm", "data-test": "incident-intake-lead-division" })] }), jsxs("fieldset", { className: sx(fieldsetStyle$1), "aria-describedby": errors.divisions ? `${id}-divisions-error` : undefined, "data-test": "incident-intake-divisions", children: [jsx("legend", { className: sx(legendStyle$2), children: "Divisions involved" }), jsx("div", { className: sx(divisionGridStyle), children: DIVISIONS.map((division, index) => (jsx(Checkbox, { ref: index === 0
|
|
15362
|
+
? (node) => {
|
|
15363
|
+
fieldRefs.current.divisions = node;
|
|
15364
|
+
}
|
|
15365
|
+
: undefined, size: "sm", label: `${division.label} — ${division.services}`, checked: values.divisions.includes(division.value), onChange: (event) => toggleDivision(division.value, event.target.checked), "data-test": `incident-intake-division-${division.value}` }, division.value))) }), errors.divisions && (jsx("p", { id: `${id}-divisions-error`, className: sx(errorTextStyle), children: errors.divisions }))] }), jsx(Input, { id: `${id}-type`, label: "Incident type (optional)", placeholder: "e.g. Charter delay, bus no-show", autoComplete: "off", value: values.incidentType, onChange: (event) => set('incidentType', event.target.value), fullWidth: true, size: "sm", "data-test": "incident-intake-type" }), jsx(Textarea, { id: `${id}-narrative`, ref: (node) => {
|
|
15366
|
+
fieldRefs.current.narrative = node;
|
|
15367
|
+
}, label: "Issue narrative", rows: 4, value: values.narrative, onChange: (event) => set('narrative', event.target.value), error: errors.narrative, required: true, fullWidth: true, size: "sm", "data-test": "incident-intake-narrative", className: sx(textareaRowsStyle$1) }), jsxs("div", { className: sx(footerStyle$8), children: [jsxs("div", { className: sx(priorityStyle), "data-test": "incident-intake-priority", children: [jsx("span", { className: sx(priorityLabelStyle), "aria-hidden": "true", children: "Priority" }), jsx(Segment, { "aria-label": "Priority", size: "sm", options: PRIORITY_OPTIONS, value: values.priority, onChange: (value) => set('priority', value), className: cx(values.priority === 'urgent' && sx(urgentSegmentStyle)) }), jsx("p", { className: sx(helperTextStyle), children: values.priority === 'urgent' ? 'Urgent posts to Teams and sends SMS.' : 'Routine posts a Teams card only.' })] }), jsxs("div", { className: sx(actionsStyle$7), children: [onCancel && (jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, "data-test": "incident-intake-cancel", children: "Cancel" })), jsx(Button, { type: "submit", variant: values.priority === 'urgent' ? 'danger' : 'primary', loading: submitting, "data-test": "incident-intake-submit", children: "Log incident" })] })] })] }));
|
|
15368
|
+
};
|
|
15369
|
+
IncidentIntakeForm.displayName = 'IncidentIntakeForm';
|
|
15370
|
+
|
|
14759
15371
|
/**
|
|
14760
15372
|
* Explicit specificity keeps service and cancellation border colors stable
|
|
14761
15373
|
* regardless of style injection order: base < type (`&&`) < cancelled (`&&&`).
|
|
@@ -16221,7 +16833,7 @@ const scrollBodyStyle = {
|
|
|
16221
16833
|
minHeight: 0,
|
|
16222
16834
|
overflowY: 'auto',
|
|
16223
16835
|
};
|
|
16224
|
-
const bodyStyle$
|
|
16836
|
+
const bodyStyle$5 = {
|
|
16225
16837
|
label: 'Module-bodyStyle',
|
|
16226
16838
|
flex: 1,
|
|
16227
16839
|
fontSize: 14,
|
|
@@ -16294,7 +16906,7 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
16294
16906
|
setOpen(!open);
|
|
16295
16907
|
}
|
|
16296
16908
|
};
|
|
16297
|
-
return (jsxs("div", { className: cx(sx(moduleStyle), className), children: [title && (jsx("div", { className: cx(sx(headerStyle$u), sx(headerSizeStyles[size]), !open && sx(closedStyle), headerClassName), children: jsxs("div", { className: cx(sx(titleRowStyle$1), sx(titleRowSizeStyles[size]), titleClassName), children: [icon && (jsx("span", { className: cx(sx(iconStyle$1), size !== 'sm' && sx(iconSpacedStyle), iconClassName), children: icon })), jsx("div", { className: sx(titleStyle$r), children: title }), badge && jsx("span", { className: sx(badgeStyle$1), children: badge }), jsxs("div", { className: sx(toolsStyle), children: [tools, useToggle && (jsx("button", { type: "button", className: sx(toggleBtnStyle), onClick: handleToggle, "aria-expanded": open, children: jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxs("div", { className: cx(sx(bodyWrapperStyle), scrollBody && sx(scrollBodyStyle)), children: [before, jsx("div", { className: cx(sx(bodyStyle$
|
|
16909
|
+
return (jsxs("div", { className: cx(sx(moduleStyle), className), children: [title && (jsx("div", { className: cx(sx(headerStyle$u), sx(headerSizeStyles[size]), !open && sx(closedStyle), headerClassName), children: jsxs("div", { className: cx(sx(titleRowStyle$1), sx(titleRowSizeStyles[size]), titleClassName), children: [icon && (jsx("span", { className: cx(sx(iconStyle$1), size !== 'sm' && sx(iconSpacedStyle), iconClassName), children: icon })), jsx("div", { className: sx(titleStyle$r), children: title }), badge && jsx("span", { className: sx(badgeStyle$1), children: badge }), jsxs("div", { className: sx(toolsStyle), children: [tools, useToggle && (jsx("button", { type: "button", className: sx(toggleBtnStyle), onClick: handleToggle, "aria-expanded": open, children: jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxs("div", { className: cx(sx(bodyWrapperStyle), scrollBody && sx(scrollBodyStyle)), children: [before, jsx("div", { className: cx(sx(bodyStyle$5), sx(bodySizeStyles[size]), !open && sx(hiddenStyle), bodyClassName), children: children }), after] }), footer && (jsx("div", { className: cx(sx(footerStyle$6), !open && sx(hiddenStyle)), children: footer }))] }));
|
|
16298
16910
|
};
|
|
16299
16911
|
/**
|
|
16300
16912
|
* Horizontal divider for Module content
|
|
@@ -18282,6 +18894,82 @@ const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo
|
|
|
18282
18894
|
};
|
|
18283
18895
|
RequestSummary.displayName = 'RequestSummary';
|
|
18284
18896
|
|
|
18897
|
+
/** ResolveIncidentDialog's compiled rules. */
|
|
18898
|
+
const bodyStyle$4 = {
|
|
18899
|
+
label: 'ResolveIncidentDialog-bodyStyle',
|
|
18900
|
+
display: 'flex',
|
|
18901
|
+
flexDirection: 'column',
|
|
18902
|
+
gap: 'var(--space-4)',
|
|
18903
|
+
};
|
|
18904
|
+
const fieldsetStyle = {
|
|
18905
|
+
label: 'ResolveIncidentDialog-fieldsetStyle',
|
|
18906
|
+
display: 'flex',
|
|
18907
|
+
flexDirection: 'column',
|
|
18908
|
+
gap: 'var(--space-2)',
|
|
18909
|
+
margin: 0,
|
|
18910
|
+
padding: 0,
|
|
18911
|
+
border: 0,
|
|
18912
|
+
};
|
|
18913
|
+
const legendStyle$1 = {
|
|
18914
|
+
label: 'ResolveIncidentDialog-legendStyle',
|
|
18915
|
+
marginBottom: 'var(--space-2)',
|
|
18916
|
+
padding: 0,
|
|
18917
|
+
color: 'var(--fg-1)',
|
|
18918
|
+
fontSize: 'var(--fs-sm)',
|
|
18919
|
+
fontWeight: 'var(--fw-medium)',
|
|
18920
|
+
};
|
|
18921
|
+
const noteStyle$2 = {
|
|
18922
|
+
label: 'ResolveIncidentDialog-noteStyle',
|
|
18923
|
+
margin: 0,
|
|
18924
|
+
color: 'var(--fg-2)',
|
|
18925
|
+
fontSize: 'var(--fs-sm)',
|
|
18926
|
+
lineHeight: 'var(--lh-sm)',
|
|
18927
|
+
};
|
|
18928
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
18929
|
+
const textareaRowsStyle = {
|
|
18930
|
+
label: 'ResolveIncidentDialog-textareaRowsStyle',
|
|
18931
|
+
'& textarea': { height: 'auto' },
|
|
18932
|
+
};
|
|
18933
|
+
|
|
18934
|
+
/**
|
|
18935
|
+
* Closes an Open Incident, taking it off the Alert Log and into the Archive.
|
|
18936
|
+
* "Resolved" requires a root cause; "Logged in error" needs none. There is no
|
|
18937
|
+
* reopening, so the confirm button says exactly what it does.
|
|
18938
|
+
*/
|
|
18939
|
+
const ResolveIncidentDialog = ({ isOpen, incidentNumber, accountName, unacknowledgedCount = 0, defaultResolution = 'resolved', onConfirm, onClose, submitting = false, }) => {
|
|
18940
|
+
const id = useId();
|
|
18941
|
+
const formId = `${id}-form`;
|
|
18942
|
+
const [resolution, setResolution] = useState(defaultResolution);
|
|
18943
|
+
const [rootCause, setRootCause] = useState('');
|
|
18944
|
+
const [attempted, setAttempted] = useState(false);
|
|
18945
|
+
const firstRadioRef = useRef(null);
|
|
18946
|
+
const rootCauseRef = useRef(null);
|
|
18947
|
+
useEffect(() => {
|
|
18948
|
+
if (!isOpen)
|
|
18949
|
+
return;
|
|
18950
|
+
setResolution(defaultResolution);
|
|
18951
|
+
setRootCause('');
|
|
18952
|
+
setAttempted(false);
|
|
18953
|
+
firstRadioRef.current?.focus();
|
|
18954
|
+
}, [isOpen, defaultResolution]);
|
|
18955
|
+
const rootCauseError = attempted && resolution === 'resolved' && !rootCause.trim() ? 'Enter the root cause.' : undefined;
|
|
18956
|
+
const handleSubmit = (event) => {
|
|
18957
|
+
event.preventDefault();
|
|
18958
|
+
setAttempted(true);
|
|
18959
|
+
if (resolution === 'resolved') {
|
|
18960
|
+
if (!rootCause.trim()) {
|
|
18961
|
+
rootCauseRef.current?.focus();
|
|
18962
|
+
return;
|
|
18963
|
+
}
|
|
18964
|
+
onConfirm({ resolution, rootCause: rootCause.trim() });
|
|
18965
|
+
return;
|
|
18966
|
+
}
|
|
18967
|
+
onConfirm({ resolution });
|
|
18968
|
+
};
|
|
18969
|
+
return (jsx(Modal, { isOpen: isOpen, onClose: onClose, size: "sm", title: incidentNumber ? `Resolve ${incidentNumber}` : 'Resolve incident', subtitle: accountName, footer: jsxs(ModalFooter, { children: [jsx(Button, { type: "button", variant: "secondary", onClick: onClose, "data-test": "resolve-incident-cancel", children: "Cancel" }), jsx(Button, { type: "submit", form: formId, loading: submitting, "data-test": "resolve-incident-confirm", children: resolution === 'resolved' ? 'Resolve incident' : 'Close as logged in error' })] }), children: jsxs("form", { id: formId, className: sx(bodyStyle$4), noValidate: true, onSubmit: handleSubmit, children: [jsxs("fieldset", { className: sx(fieldsetStyle), children: [jsx("legend", { className: sx(legendStyle$1), children: "Outcome" }), jsx(Checkbox, { ref: firstRadioRef, type: "radio", name: `${id}-outcome`, value: "resolved", label: "Resolved", helperText: "The issue was handled. Record the root cause.", checked: resolution === 'resolved', onChange: () => setResolution('resolved'), "data-test": "resolve-incident-resolved" }), jsx(Checkbox, { type: "radio", name: `${id}-outcome`, value: "logged-in-error", label: "Logged in error", helperText: "Duplicate, test or not a real incident. No root cause needed.", checked: resolution === 'logged-in-error', onChange: () => setResolution('logged-in-error'), "data-test": "resolve-incident-logged-in-error" })] }), resolution === 'resolved' && (jsx(Textarea, { id: `${id}-root-cause`, ref: rootCauseRef, label: "Root cause", rows: 3, value: rootCause, onChange: (event) => setRootCause(event.target.value), error: rootCauseError, required: true, fullWidth: true, size: "sm", "data-test": "resolve-incident-root-cause", className: sx(textareaRowsStyle) })), unacknowledgedCount > 0 && (jsxs("p", { className: sx(noteStyle$2), "data-test": "resolve-incident-unacknowledged", children: [unacknowledgedCount === 1 ? '1 Division has' : `${unacknowledgedCount} Divisions have`, " not acknowledged yet. You can still resolve."] }))] }) }));
|
|
18970
|
+
};
|
|
18971
|
+
ResolveIncidentDialog.displayName = 'ResolveIncidentDialog';
|
|
18972
|
+
|
|
18285
18973
|
/* RequestFormLayout's compiled rules.
|
|
18286
18974
|
*
|
|
18287
18975
|
* The chrome shared by every Hub travel request form. The offsets here are
|
|
@@ -29885,7 +30573,7 @@ const TripTable = ({ trips, variant = 'current', density = 'comfortable', vendor
|
|
|
29885
30573
|
* `.card:hover .chevron`), so the icon and the chevron are declared first and
|
|
29886
30574
|
* their generated class names resolved into `cardStyle` as computed keys.
|
|
29887
30575
|
*/
|
|
29888
|
-
const pageStyle$
|
|
30576
|
+
const pageStyle$u = {
|
|
29889
30577
|
label: 'AdministrationPage-pageStyle',
|
|
29890
30578
|
color: 'var(--color-ink)',
|
|
29891
30579
|
};
|
|
@@ -30022,8 +30710,109 @@ const AdministrationPage = ({ activeTab = 'system', enabledTabs = ADMINISTRATION
|
|
|
30022
30710
|
const resolvedActiveTab = visibleTabs.some((tab) => tab.key === activeTab)
|
|
30023
30711
|
? activeTab
|
|
30024
30712
|
: visibleTabs[0]?.key;
|
|
30025
|
-
return jsxs("div", { className: cx(sx(pageStyle$
|
|
30713
|
+
return jsxs("div", { className: cx(sx(pageStyle$u), className), children: [jsx("header", { className: sx(headerStyle$n), children: jsx("h1", { children: "Administration\u00A0" }) }), visibleTabs.length > 0 && (jsx(TabStrip, { className: sx(tabsStyle$5), tabs: visibleTabs.map((tab) => ({ id: tab.key, label: tab.label })), activeTab: resolvedActiveTab, onTabChange: (id) => onTabChange?.(id), "aria-label": "Administration sections" })), children ?? (resolvedActiveTab === 'system' ? (jsx("div", { className: sx(cardsStyle$1), children: resolvedCards.map((card) => (jsxs("button", { type: "button", className: sx(cardStyle$5), onClick: () => onCardClick?.(card), children: [jsx("span", { className: sx(cardIconStyle$1), children: card.icon }), jsxs("span", { className: sx(cardCopyStyle), children: [jsx("span", { className: sx(cardTitleStyle$2), children: card.title }), jsx("span", { className: sx(cardDescriptionStyle$1), children: card.description })] }), jsx(ChevronRightIcon$1, { className: sx(chevronStyle), size: 14 })] }, card.key))) })) : resolvedActiveTab === 'client' ? (jsx("p", { className: sx(comingSoonStyle), children: "Client administration settings coming soon." })) : (jsx("p", { className: sx(comingSoonStyle), "data-test": "administration-empty-tabs", children: "No administration sections are available." })))] });
|
|
30714
|
+
};
|
|
30715
|
+
|
|
30716
|
+
/** AfterHoursResolutionCenterPage's compiled rules. Two panels on desktop; one column under 768px. */
|
|
30717
|
+
const pageStyle$t = {
|
|
30718
|
+
label: 'AfterHoursResolutionCenterPage-pageStyle',
|
|
30719
|
+
display: 'flex',
|
|
30720
|
+
flexDirection: 'column',
|
|
30721
|
+
gap: 'var(--space-4)',
|
|
30722
|
+
minHeight: '100%',
|
|
30723
|
+
padding: 'var(--space-5) var(--space-6)',
|
|
30724
|
+
background: 'var(--bg-page)',
|
|
30725
|
+
'@media (max-width: 767px)': {
|
|
30726
|
+
padding: 'var(--space-4)',
|
|
30727
|
+
},
|
|
30728
|
+
};
|
|
30729
|
+
const descriptionStyle$9 = {
|
|
30730
|
+
label: 'AfterHoursResolutionCenterPage-descriptionStyle',
|
|
30731
|
+
maxWidth: '80ch',
|
|
30732
|
+
margin: 0,
|
|
30733
|
+
color: 'var(--fg-3)',
|
|
30734
|
+
fontSize: 'var(--fs-sm)',
|
|
30735
|
+
lineHeight: 'var(--lh-sm)',
|
|
30736
|
+
};
|
|
30737
|
+
const panelsStyle = {
|
|
30738
|
+
label: 'AfterHoursResolutionCenterPage-panelsStyle',
|
|
30739
|
+
display: 'grid',
|
|
30740
|
+
gridTemplateColumns: 'minmax(22rem, 2fr) minmax(0, 3fr)',
|
|
30741
|
+
alignItems: 'start',
|
|
30742
|
+
gap: 'var(--space-4)',
|
|
30743
|
+
'@media (max-width: 767px)': {
|
|
30744
|
+
gridTemplateColumns: 'minmax(0, 1fr)',
|
|
30745
|
+
},
|
|
30746
|
+
};
|
|
30747
|
+
/* The intake panel leaves the flow on mobile; the New incident button opens it full-screen instead. */
|
|
30748
|
+
const intakePanelStyle = {
|
|
30749
|
+
label: 'AfterHoursResolutionCenterPage-intakePanelStyle',
|
|
30750
|
+
minWidth: 0,
|
|
30751
|
+
'@media (max-width: 767px)': {
|
|
30752
|
+
display: 'none',
|
|
30753
|
+
},
|
|
30754
|
+
};
|
|
30755
|
+
const mobileOnlyStyle = {
|
|
30756
|
+
label: 'AfterHoursResolutionCenterPage-mobileOnlyStyle',
|
|
30757
|
+
display: 'none',
|
|
30758
|
+
'@media (max-width: 767px)': {
|
|
30759
|
+
display: 'block',
|
|
30760
|
+
},
|
|
30761
|
+
};
|
|
30762
|
+
const logPanelStyle = {
|
|
30763
|
+
label: 'AfterHoursResolutionCenterPage-logPanelStyle',
|
|
30764
|
+
minWidth: 0,
|
|
30765
|
+
};
|
|
30766
|
+
const panelTitleStyle = {
|
|
30767
|
+
label: 'AfterHoursResolutionCenterPage-panelTitleStyle',
|
|
30768
|
+
margin: 0,
|
|
30769
|
+
color: 'var(--fg-1)',
|
|
30770
|
+
fontSize: 'var(--fs-lg)',
|
|
30771
|
+
fontWeight: 'var(--fw-semibold)',
|
|
30772
|
+
lineHeight: 'var(--lh-lg)',
|
|
30773
|
+
};
|
|
30774
|
+
const feedStyle = {
|
|
30775
|
+
label: 'AfterHoursResolutionCenterPage-feedStyle',
|
|
30776
|
+
display: 'flex',
|
|
30777
|
+
flexDirection: 'column',
|
|
30778
|
+
gap: 'var(--space-3)',
|
|
30779
|
+
margin: 0,
|
|
30780
|
+
padding: 0,
|
|
30781
|
+
listStyle: 'none',
|
|
30782
|
+
};
|
|
30783
|
+
const archiveSurfaceStyle = {
|
|
30784
|
+
label: 'AfterHoursResolutionCenterPage-archiveSurfaceStyle',
|
|
30785
|
+
minWidth: 0,
|
|
30786
|
+
};
|
|
30787
|
+
|
|
30788
|
+
const PAGE_TITLE = 'After Hours Resolution Center';
|
|
30789
|
+
const EMPTY_ARCHIVE = { incidents: [], totalItems: 0, page: 1, filters: {} };
|
|
30790
|
+
/**
|
|
30791
|
+
* The After Hours Resolution Center: log an Incident on one side, watch the
|
|
30792
|
+
* live Alert Log of Open Incidents on the other. Built for a Microsoft Teams
|
|
30793
|
+
* tab, so it carries its own heading and no Hub chrome; one column on mobile.
|
|
30794
|
+
*/
|
|
30795
|
+
const AfterHoursResolutionCenterPage = ({ view = 'log', incidents, archive = EMPTY_ARCHIVE, accounts, now, timeZone = DEFAULT_INCIDENT_TIME_ZONE, defaultLoggingDivision, onCreateIncident, onLoggingDivisionChange, onMarkReceived, onResolve, onSeeAll, onBack, onArchiveFiltersChange, onArchivePageChange, className = '', }) => {
|
|
30796
|
+
const drawerTitleId = useId();
|
|
30797
|
+
const [intakeOpen, setIntakeOpen] = useState(false);
|
|
30798
|
+
const [resolvingId, setResolvingId] = useState(null);
|
|
30799
|
+
const ordered = useMemo(() => [...incidents].sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt)), [incidents]);
|
|
30800
|
+
const resolving = incidents.find((incident) => incident.id === resolvingId);
|
|
30801
|
+
if (view === 'archive') {
|
|
30802
|
+
return (jsxs("div", { className: cx(sx(pageStyle$t), className), "data-test": "after-hours-page", "data-view": "archive", children: [jsx(PageHeaderSubsection, { sectionName: PAGE_TITLE, pageName: "Archive", meta: jsx("p", { className: sx(descriptionStyle$9), children: "Resolved incidents, newest first. Read-only." }), onBack: onBack, backLabel: "Back to Alert Log" }), jsx(Card, { padding: "md", className: sx(archiveSurfaceStyle), children: jsx(IncidentArchiveTable, { incidents: archive.incidents, totalItems: archive.totalItems, page: archive.page, filters: archive.filters, loading: archive.loading, accounts: accounts, timeZone: timeZone, onFiltersChange: onArchiveFiltersChange, onPageChange: onArchivePageChange }) })] }));
|
|
30803
|
+
}
|
|
30804
|
+
const intakeForm = (inDrawer) => (jsx(IncidentIntakeForm, { accounts: accounts, defaultLoggingDivision: defaultLoggingDivision, onLoggingDivisionChange: onLoggingDivisionChange, onCancel: inDrawer ? () => setIntakeOpen(false) : undefined, onSubmit: (draft) => {
|
|
30805
|
+
onCreateIncident?.(draft);
|
|
30806
|
+
if (inDrawer)
|
|
30807
|
+
setIntakeOpen(false);
|
|
30808
|
+
} }));
|
|
30809
|
+
return (jsxs("div", { className: cx(sx(pageStyle$t), className), "data-test": "after-hours-page", "data-view": "log", children: [jsx(PageHeader, { title: PAGE_TITLE, after: jsx("p", { className: sx(descriptionStyle$9), children: "Log after-hours incidents, route them to the Divisions that must act, and resolve them." }) }), jsx("div", { className: sx(mobileOnlyStyle), children: jsx(Button, { size: "lg", fullWidth: true, leftIcon: jsx(PlusIcon$2, { size: 20 }), onClick: () => setIntakeOpen(true), "data-test": "after-hours-new-incident", children: "New incident" }) }), jsxs("div", { className: sx(panelsStyle), children: [jsx("section", { className: sx(intakePanelStyle), "aria-label": "New incident panel", children: jsx(Module, { title: jsx("h2", { className: sx(panelTitleStyle), children: "New incident" }), useToggle: false, children: intakeForm(false) }) }), jsx("section", { className: sx(logPanelStyle), "aria-label": "Alert Log panel", children: jsx(Module, { title: jsx("h2", { className: sx(panelTitleStyle), children: "Alert Log" }), badge: ordered.length || undefined, useToggle: false, footer: jsx(Button, { variant: "secondary", fullWidth: true, onClick: onSeeAll, "data-test": "after-hours-see-all", children: "See All" }), children: ordered.length === 0 ? (jsx(EmptyState$1, { size: "sm", title: "No open incidents", description: "New incidents appear here as soon as they are logged. Resolved ones move to the Archive." })) : (jsx("ul", { className: sx(feedStyle), "aria-label": "Open incidents", "data-test": "after-hours-feed", children: ordered.map((incident) => (jsx("li", { children: jsx(IncidentCard, { incident: incident, now: now, timeZone: timeZone, onMarkReceived: onMarkReceived, onResolve: setResolvingId }) }, incident.id))) })) }) })] }), jsxs(Drawer, { isOpen: intakeOpen, onClose: () => setIntakeOpen(false), position: "right", size: "full", "aria-labelledby": drawerTitleId, children: [jsx(Drawer.Header, { children: jsx("h2", { id: drawerTitleId, className: sx(panelTitleStyle), children: "New incident" }) }), jsx(Drawer.Body, { children: intakeForm(true) })] }), jsx(ResolveIncidentDialog, { isOpen: Boolean(resolving), incidentNumber: resolving?.number, accountName: resolving?.accountName, unacknowledgedCount: resolving?.routes.filter((route) => !route.acknowledgedAt).length ?? 0, onClose: () => setResolvingId(null), onConfirm: (input) => {
|
|
30810
|
+
if (resolving)
|
|
30811
|
+
onResolve?.(resolving.id, input);
|
|
30812
|
+
setResolvingId(null);
|
|
30813
|
+
} })] }));
|
|
30026
30814
|
};
|
|
30815
|
+
AfterHoursResolutionCenterPage.displayName = 'AfterHoursResolutionCenterPage';
|
|
30027
30816
|
|
|
30028
30817
|
const pageStyle$s = {
|
|
30029
30818
|
label: 'AgentGroupTravelRequestsPage-pageStyle',
|
|
@@ -39774,5 +40563,5 @@ const TripDetailPage = ({ header, airSegment, groundSegment, hotelSegment, files
|
|
|
39774
40563
|
};
|
|
39775
40564
|
TripDetailPage.displayName = 'TripDetailPage';
|
|
39776
40565
|
|
|
39777
|
-
export { ACMI_AIRCRAFT_OPTIONS, ACMI_CARRIER_OPTIONS, ACMI_INSURANCE_FLAT, AccentCard, Accordion, AcmiQuoteCalculator, AdministrationPage, AgentGroupTravelRequestsPage, AgentGroupTravelRequestsTable, AirInvoiceCard, AirSegment, Alert, AppLayout, ArrowDownLeftIcon, ArrowUpRightIcon, Avatar, AvatarGroup, BID_TYPE_HEADINGS, BackLink, Badge, BookingDetailsCard, BuildingIcon, BusIcon$2 as BusIcon, Button, ButtonStyled, CARRIER_CATERING_OPTIONS, CARRIER_CONTACT_TYPES, CHAMPIONSHIP_BID_TYPES, CHAMPIONSHIP_HEADINGS, CHARTER_CONTACT_GROUPS, CHARTER_SECTIONS, CalendarIcon$1 as CalendarIcon, CalendarTypeSelector, CalendarViewSelector, CarIcon$1 as CarIcon, Card, CardBody, CardFooter, CardHeader, CarrierProfilePage, ChampionshipBidDetailPage, ChampionshipBidsPage, CharterBidResponsePage, CharterBidViewPage, CharterManifestPage, CharterSourcingEmailPreview, ChartersAccessManagementPage, ChartersHomePage, CheckIcon$1 as CheckIcon, Checkbox, ChevronDownIcon$1 as ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon$1 as ChevronRightIcon, ChevronUpIcon, ClientSelector, CloseIcon, ConfirmModal, ContactCard$1 as ContactCard, ContactList, ContactUsPage, CubeIcon, DOCUMENT_FILE_EXTENSIONS, DashboardIcon, DashboardPage, Datepicker, DetailList, DocumentIcon, DownloadIcon, Drawer, DrawerBody, DrawerFooter, DrawerHeader, Dropdown, DueDatesDrawer, EditIcon$2 as EditIcon, EmptyState$1 as EmptyState, EyeIcon, FeatureFlagManagementPage, FieldLayout, FileUploadButton, FilterChip, FilterIcon$1 as FilterIcon, Flyout, FormField, FormRow, FormSection, FormStack, GridHeaderRow, GridIcon, GridTable, GroundSegment, GroupTravelRequestPage, HUB_ADMIN_ITEM, HUB_AGENTS_ITEM, HUB_INDIVIDUAL_TRAVEL_ITEM, HUB_NAV_ITEMS, HUB_OFF_FLEET_ITEM, HUB_SOURCING_ITEM, HUB_STM_CHARTERS_ITEM, HandIcon, HeadsetIcon, HomeIcon, HotelIcon$3 as HotelIcon, HotelSegment, HubAppShell, Icon, IconRevealLink, Icons, IndividualTravelPage, IndividualTravelRequestDetailPage, IndividualTravelRequestFormPage, InfoCenterPage, InfoIcon$1 as InfoIcon, InfoTile, Input, ItineraryPage, ItinerarySegmentCard, ItineraryTimeline, LightbulbIcon, LimoIcon, ListboxSelect, LockIcon$1 as LockIcon, LogoIcon, LogoutIcon, MailIcon, ManifestCapacityStats, ManifestViewToggle, MegaphoneIcon, MembershipPrograms, MenuIcon, Metric, MinusIcon, Modal, ModalFooter, Module, ModuleDivider, ModuleVerticalDivider, MultiUserSearch, NavCard, NavItem, NextTripCard, NotFoundPage, OFF_FLEET_LEARNED_DESCRIPTION, OFF_FLEET_LEARNED_EMPTY_COPY, OFF_FLEET_QUEUE_DESCRIPTION, OffFleetLearnedExamplesPage, OffFleetReviewQueuePage, OffFleetSubmissionDetailPage, PageBanners, PageHeader, PageHeaderSubsection, Pagination, PanelTabs, PhoneIcon, PlaneIcon$3 as PlaneIcon, PlusIcon$2 as PlusIcon, PreferencesPanel, PrinterIcon, ProfileMenu, Progress, ProgressBar, ProgressCircle, QuoteCostBreakdown, QuoteReviewActions, REGULAR_SEASON_BID_TYPES, RailIcon, RefreshIcon, RegularSeasonBidsPage, RegularSeasonBidsTable, ReportIcon, RequestFormFooter, RequestFormHeader, RequestFormLayout, RequestServiceLink, RequestSummary, ResultCount, RosterProgramNumbersPage, RosterReportsPage, RosterToolbar, SOURCING_COST_CATEGORIES, SOURCING_COST_CATEGORY_LABELS, SUPPLIER_TYPE_OPTIONS, SchoolContactForm, SearchField, SearchIcon$1 as SearchIcon, Segment, SegmentedSelector, Select, SelectFilter, ServiceToggle, ServiceToggleList, SettingsIcon, Sidenav, SingleTeamPanelSelector, SourcingQuoteDetailPage, SourcingReviewQueuePage, SourcingReviewQueueTable, Spinner, SportCodeBadge, StatusBadge, SummarySection, SupplierTypeToggle, TRIP_MONTH_OPTIONS, TabPanelStack, TabStrip, Table, TableCell, Tag, TeamCalendarHeader, TeamCard, TeamContactsPanel, TeamEquipmentForm, TeamHeader, TeamImportForm, TeamManagementPage, TeamPicker, TeamProgramForm, TeamRosterMemberForm, TeamScheduleActions, TeamScheduleCompactTable, TeamScheduleEditor, TeamScheduleExpandedTable, TeamSchedulePage, TeamSubMenu, TeamTravelCalendarCardView, TeamTravelCalendarListView, TeamTravelCalendarPage, TeamTravelCalendarToolbar, TeamTravelCalendarView, TeamUserAccessForm, Textarea, ThemeProvider, Timepicker, Title, Toggle, Tooltip, Topbar, TrashIcon$2 as TrashIcon, TravelBoard, TravelDateRange, TravelServiceIcon, TravelSummaryMetrics, TravelerForm, TrendDownIcon, TrendUpIcon, TripDetailPage, TripSegment, TripTable, TypeIcon, UploadIcon, UserIcon, UsersIcon$1 as UsersIcon, WarningIcon$1 as WarningIcon, XIcon, absoluteFill, accentColors, alertBandTokens, alertTokens, boxShadow, brandColors, breakpoints, buildPaginationItems, buttonReset, computeLineItemTotal, computeQuoteTotals, computeTravelTypeCodes, css, cx, darkTheme, lightTheme as defaultTheme, deriveProgramBidStatus, flexCenter, flexCol, flexRow, font, fontFamily, fontSize, fontWeight, formatCompactTripCost, formatItineraryDate, formatItineraryDateRange, formatItineraryMoney, formatTeamScheduleDueDate, formatTeamScheduleTravelDates, getCharterSourcingEmailRoute, getCharterSourcingEmailSubject, getPageCount, getSegmentDate, getSegmentStartMinutes, getSegmentTitle, getTeamTravelCalendarPeriodLabel, groupSegmentsByDay, iconNames, iconRegistry, injectGlobal, isExpiringSoon, isProgramBiddable, isQuoteActionable, isSportCodeGroup, isTravelDueDateCompleted, isTravelDueDateOverdue, itineraryPageName, leading, lightTheme, lineClamp, lineHeight, matchesQuoteSearch, merge, moveTeamTravelCalendarPeriod, navyColors, neutralColors, ordinalDay, parseClockTime, parseItineraryDate, primaryColors, radius, rounded, semanticColors, shadow, sharedColumnWidth, size, space, spacing, sportCodeVariant, srOnly, statusColors, styled, sx, tabStripTabId, teamColors, textColors, tintColors, toInlineStyle, trans, transition, truncate$1 as truncate, useSharedColumnWidth, useTheme, weight };
|
|
40566
|
+
export { ACMI_AIRCRAFT_OPTIONS, ACMI_CARRIER_OPTIONS, ACMI_INSURANCE_FLAT, ARCHIVE_PAGE_SIZE, AccentCard, Accordion, AcmiQuoteCalculator, AdministrationPage, AfterHoursResolutionCenterPage, AgentGroupTravelRequestsPage, AgentGroupTravelRequestsTable, AirInvoiceCard, AirSegment, Alert, AppLayout, ArrowDownLeftIcon, ArrowUpRightIcon, Avatar, AvatarGroup, BID_TYPE_HEADINGS, BackLink, Badge, BookingDetailsCard, BuildingIcon, BusIcon$2 as BusIcon, Button, ButtonStyled, CARRIER_CATERING_OPTIONS, CARRIER_CONTACT_TYPES, CHAMPIONSHIP_BID_TYPES, CHAMPIONSHIP_HEADINGS, CHARTER_CONTACT_GROUPS, CHARTER_SECTIONS, CalendarIcon$1 as CalendarIcon, CalendarTypeSelector, CalendarViewSelector, CarIcon$1 as CarIcon, Card, CardBody, CardFooter, CardHeader, CarrierProfilePage, ChampionshipBidDetailPage, ChampionshipBidsPage, CharterBidResponsePage, CharterBidViewPage, CharterManifestPage, CharterSourcingEmailPreview, ChartersAccessManagementPage, ChartersHomePage, CheckIcon$1 as CheckIcon, Checkbox, ChevronDownIcon$1 as ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon$1 as ChevronRightIcon, ChevronUpIcon, ClientSelector, CloseIcon, ConfirmModal, ContactCard$1 as ContactCard, ContactList, ContactUsPage, CubeIcon, DEFAULT_INCIDENT_TIME_ZONE, DIVISIONS, DIVISION_LABELS, DOCUMENT_FILE_EXTENSIONS, DashboardIcon, DashboardPage, Datepicker, DetailList, DocumentIcon, DownloadIcon, Drawer, DrawerBody, DrawerFooter, DrawerHeader, Dropdown, DueDatesDrawer, ESCALATION_LABELS, EditIcon$2 as EditIcon, EmptyState$1 as EmptyState, EyeIcon, FeatureFlagManagementPage, FieldLayout, FileUploadButton, FilterChip, FilterIcon$1 as FilterIcon, Flyout, FormField, FormRow, FormSection, FormStack, GridHeaderRow, GridIcon, GridTable, GroundSegment, GroupTravelRequestPage, HUB_ADMIN_ITEM, HUB_AGENTS_ITEM, HUB_INDIVIDUAL_TRAVEL_ITEM, HUB_NAV_ITEMS, HUB_OFF_FLEET_ITEM, HUB_SOURCING_ITEM, HUB_STM_CHARTERS_ITEM, HandIcon, HeadsetIcon, HomeIcon, HotelIcon$3 as HotelIcon, HotelSegment, HubAppShell, Icon, IconRevealLink, Icons, IncidentArchiveTable, IncidentCard, IncidentIntakeForm, IndividualTravelPage, IndividualTravelRequestDetailPage, IndividualTravelRequestFormPage, InfoCenterPage, InfoIcon$1 as InfoIcon, InfoTile, Input, ItineraryPage, ItinerarySegmentCard, ItineraryTimeline, LightbulbIcon, LimoIcon, ListboxSelect, LockIcon$1 as LockIcon, LogoIcon, LogoutIcon, MailIcon, ManifestCapacityStats, ManifestViewToggle, MegaphoneIcon, MembershipPrograms, MenuIcon, Metric, MinusIcon, Modal, ModalFooter, Module, ModuleDivider, ModuleVerticalDivider, MultiUserSearch, NavCard, NavItem, NextTripCard, NotFoundPage, OFF_FLEET_LEARNED_DESCRIPTION, OFF_FLEET_LEARNED_EMPTY_COPY, OFF_FLEET_QUEUE_DESCRIPTION, OffFleetLearnedExamplesPage, OffFleetReviewQueuePage, OffFleetSubmissionDetailPage, PRIORITY_LABELS, PageBanners, PageHeader, PageHeaderSubsection, Pagination, PanelTabs, PhoneIcon, PlaneIcon$3 as PlaneIcon, PlusIcon$2 as PlusIcon, PreferencesPanel, PrinterIcon, ProfileMenu, Progress, ProgressBar, ProgressCircle, QuoteCostBreakdown, QuoteReviewActions, REGULAR_SEASON_BID_TYPES, RESOLUTION_LABELS, RailIcon, RefreshIcon, RegularSeasonBidsPage, RegularSeasonBidsTable, ReportIcon, RequestFormFooter, RequestFormHeader, RequestFormLayout, RequestServiceLink, RequestSummary, ResolveIncidentDialog, ResultCount, RosterProgramNumbersPage, RosterReportsPage, RosterToolbar, SOURCING_COST_CATEGORIES, SOURCING_COST_CATEGORY_LABELS, SUPPLIER_TYPE_OPTIONS, SchoolContactForm, SearchField, SearchIcon$1 as SearchIcon, Segment, SegmentedSelector, Select, SelectFilter, ServiceToggle, ServiceToggleList, SettingsIcon, Sidenav, SingleTeamPanelSelector, SourcingQuoteDetailPage, SourcingReviewQueuePage, SourcingReviewQueueTable, Spinner, SportCodeBadge, StatusBadge, SummarySection, SupplierTypeToggle, TRIP_MONTH_OPTIONS, TabPanelStack, TabStrip, Table, TableCell, Tag, TeamCalendarHeader, TeamCard, TeamContactsPanel, TeamEquipmentForm, TeamHeader, TeamImportForm, TeamManagementPage, TeamPicker, TeamProgramForm, TeamRosterMemberForm, TeamScheduleActions, TeamScheduleCompactTable, TeamScheduleEditor, TeamScheduleExpandedTable, TeamSchedulePage, TeamSubMenu, TeamTravelCalendarCardView, TeamTravelCalendarListView, TeamTravelCalendarPage, TeamTravelCalendarToolbar, TeamTravelCalendarView, TeamUserAccessForm, Textarea, ThemeProvider, Timepicker, Title, Toggle, Tooltip, Topbar, TrashIcon$2 as TrashIcon, TravelBoard, TravelDateRange, TravelServiceIcon, TravelSummaryMetrics, TravelerForm, TrendDownIcon, TrendUpIcon, TripDetailPage, TripSegment, TripTable, TypeIcon, UploadIcon, UserIcon, UsersIcon$1 as UsersIcon, WarningIcon$1 as WarningIcon, XIcon, absoluteFill, accentColors, alertBandTokens, alertTokens, boxShadow, brandColors, breakpoints, buildPaginationItems, buttonReset, computeLineItemTotal, computeQuoteTotals, computeTravelTypeCodes, countAcknowledged, css, cx, darkTheme, lightTheme as defaultTheme, deriveProgramBidStatus, flexCenter, flexCol, flexRow, font, fontFamily, fontSize, fontWeight, formatClockTime, formatCompactTripCost, formatElapsed, formatIncidentDate, formatItineraryDate, formatItineraryDateRange, formatItineraryMoney, formatTeamScheduleDueDate, formatTeamScheduleTravelDates, getCharterSourcingEmailRoute, getCharterSourcingEmailSubject, getPageCount, getSegmentDate, getSegmentStartMinutes, getSegmentTitle, getTeamTravelCalendarPeriodLabel, groupSegmentsByDay, iconNames, iconRegistry, injectGlobal, isExpiringSoon, isProgramBiddable, isQuoteActionable, isSportCodeGroup, isTravelDueDateCompleted, isTravelDueDateOverdue, itineraryPageName, leading, lightTheme, lineClamp, lineHeight, matchesQuoteSearch, merge, moveTeamTravelCalendarPeriod, navyColors, neutralColors, ordinalDay, parseClockTime, parseItineraryDate, primaryColors, radius, rounded, semanticColors, shadow, sharedColumnWidth, size, space, spacing, sportCodeVariant, srOnly, statusColors, styled, sx, tabStripTabId, teamColors, textColors, tintColors, toIncidentDateKey, toInlineStyle, toTelHref, trans, transition, truncate$1 as truncate, useSharedColumnWidth, useTheme, validateIncidentIntake, weight };
|
|
39778
40567
|
//# sourceMappingURL=index.esm.js.map
|