mytek-components 1.0.6 → 1.0.8
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/{main.js → main.es.js} +1215 -1250
- package/dist/main.es.js.map +1 -0
- package/dist/{main.umd.cjs → main.umd.js} +1214 -1249
- package/dist/main.umd.js.map +1 -0
- package/package.json +1 -1
- package/dist/main.js.map +0 -1
- package/dist/main.umd.cjs.map +0 -1
- /package/dist/{main.css → mytek-components.css} +0 -0
|
@@ -10545,6 +10545,187 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
10545
10545
|
}
|
|
10546
10546
|
);
|
|
10547
10547
|
};
|
|
10548
|
+
function FaCheck(props) {
|
|
10549
|
+
return GenIcon({ "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" }, "child": [] }] })(props);
|
|
10550
|
+
}
|
|
10551
|
+
function FaChevronDown(props) {
|
|
10552
|
+
return GenIcon({ "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z" }, "child": [] }] })(props);
|
|
10553
|
+
}
|
|
10554
|
+
function FaChevronUp(props) {
|
|
10555
|
+
return GenIcon({ "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z" }, "child": [] }] })(props);
|
|
10556
|
+
}
|
|
10557
|
+
const ComboDropdown = ({
|
|
10558
|
+
label,
|
|
10559
|
+
options: options2 = [],
|
|
10560
|
+
placeholder = "",
|
|
10561
|
+
onChange,
|
|
10562
|
+
name,
|
|
10563
|
+
value,
|
|
10564
|
+
error,
|
|
10565
|
+
disabled,
|
|
10566
|
+
height: height2 = "40px",
|
|
10567
|
+
isPassword = false,
|
|
10568
|
+
mode = "both",
|
|
10569
|
+
isRequired = false,
|
|
10570
|
+
optionLabelKey = "label",
|
|
10571
|
+
optionValueKey = "value"
|
|
10572
|
+
}) => {
|
|
10573
|
+
const [inputValue, setInputValue] = React.useState("");
|
|
10574
|
+
const [filteredOptions, setFilteredOptions] = React.useState([]);
|
|
10575
|
+
const [showDropdown, setShowDropdown] = React.useState(false);
|
|
10576
|
+
const [highlightIndex, setHighlightIndex] = React.useState(-1);
|
|
10577
|
+
const inputRef = React.useRef();
|
|
10578
|
+
const wrapperRef = React.useRef();
|
|
10579
|
+
React.useEffect(() => {
|
|
10580
|
+
const selected = options2.find(
|
|
10581
|
+
(opt) => (typeof opt === "object" ? opt[optionValueKey] : opt) === value
|
|
10582
|
+
);
|
|
10583
|
+
if (selected) {
|
|
10584
|
+
const label2 = typeof selected === "object" ? selected[optionLabelKey] : selected;
|
|
10585
|
+
setInputValue(label2);
|
|
10586
|
+
} else {
|
|
10587
|
+
setInputValue("");
|
|
10588
|
+
}
|
|
10589
|
+
}, [value, options2, optionLabelKey, optionValueKey]);
|
|
10590
|
+
React.useEffect(() => {
|
|
10591
|
+
const handleClickOutside = (event) => {
|
|
10592
|
+
if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
10593
|
+
setShowDropdown(false);
|
|
10594
|
+
}
|
|
10595
|
+
};
|
|
10596
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
10597
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
10598
|
+
}, []);
|
|
10599
|
+
const normalizeOptions = (opts) => opts.map((opt) => {
|
|
10600
|
+
if (typeof opt === "string") return { label: opt, value: opt };
|
|
10601
|
+
return {
|
|
10602
|
+
label: opt[optionLabelKey],
|
|
10603
|
+
value: opt[optionValueKey]
|
|
10604
|
+
};
|
|
10605
|
+
});
|
|
10606
|
+
const handleInputChange = (e) => {
|
|
10607
|
+
const val = e.target.value;
|
|
10608
|
+
setInputValue(val);
|
|
10609
|
+
if (mode !== "select" && onChange) {
|
|
10610
|
+
onChange(name, val);
|
|
10611
|
+
}
|
|
10612
|
+
if (mode !== "type") {
|
|
10613
|
+
const normalized = normalizeOptions(options2);
|
|
10614
|
+
const filtered = normalized.filter(
|
|
10615
|
+
(opt) => {
|
|
10616
|
+
var _a;
|
|
10617
|
+
return (_a = opt.label) == null ? void 0 : _a.toLowerCase().includes(val.toLowerCase());
|
|
10618
|
+
}
|
|
10619
|
+
);
|
|
10620
|
+
setFilteredOptions(filtered);
|
|
10621
|
+
setShowDropdown(true);
|
|
10622
|
+
setHighlightIndex(-1);
|
|
10623
|
+
}
|
|
10624
|
+
};
|
|
10625
|
+
const handleSelect = (val, label2) => {
|
|
10626
|
+
setInputValue(label2);
|
|
10627
|
+
if (onChange) {
|
|
10628
|
+
onChange(name, val);
|
|
10629
|
+
}
|
|
10630
|
+
setShowDropdown(false);
|
|
10631
|
+
setHighlightIndex(-1);
|
|
10632
|
+
};
|
|
10633
|
+
const handleKeyDown = (e) => {
|
|
10634
|
+
if (!showDropdown || filteredOptions.length === 0) return;
|
|
10635
|
+
if (e.key === "ArrowDown") {
|
|
10636
|
+
e.preventDefault();
|
|
10637
|
+
setHighlightIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : 0);
|
|
10638
|
+
}
|
|
10639
|
+
if (e.key === "ArrowUp") {
|
|
10640
|
+
e.preventDefault();
|
|
10641
|
+
setHighlightIndex((prev) => prev > 0 ? prev - 1 : filteredOptions.length - 1);
|
|
10642
|
+
}
|
|
10643
|
+
if (e.key === "Enter" && highlightIndex >= 0) {
|
|
10644
|
+
e.preventDefault();
|
|
10645
|
+
const selected = filteredOptions[highlightIndex];
|
|
10646
|
+
handleSelect(selected.value, selected.label);
|
|
10647
|
+
}
|
|
10648
|
+
};
|
|
10649
|
+
const getPlaceholder = () => {
|
|
10650
|
+
if (placeholder) return placeholder;
|
|
10651
|
+
if (mode === "select") return "Select an option...";
|
|
10652
|
+
if (mode === "type") return "Type a value...";
|
|
10653
|
+
return "Select or type...";
|
|
10654
|
+
};
|
|
10655
|
+
const toggleDropdown = () => {
|
|
10656
|
+
if (disabled) return;
|
|
10657
|
+
if (!showDropdown && mode !== "type") {
|
|
10658
|
+
setFilteredOptions(normalizeOptions(options2));
|
|
10659
|
+
}
|
|
10660
|
+
setShowDropdown((prev) => {
|
|
10661
|
+
var _a;
|
|
10662
|
+
if (!prev) (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
10663
|
+
return !prev;
|
|
10664
|
+
});
|
|
10665
|
+
};
|
|
10666
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: wrapperRef, className: "mb-4 w-full relative", children: [
|
|
10667
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: [
|
|
10668
|
+
label,
|
|
10669
|
+
" ",
|
|
10670
|
+
isRequired && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
|
|
10671
|
+
] }),
|
|
10672
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex items-center", children: [
|
|
10673
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10674
|
+
"input",
|
|
10675
|
+
{
|
|
10676
|
+
ref: inputRef,
|
|
10677
|
+
type: isPassword ? "password" : "text",
|
|
10678
|
+
placeholder: getPlaceholder(),
|
|
10679
|
+
className: `w-full border rounded-sm px-3 pr-8 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-green-200 ${error ? "border-red-500" : "border-green-500"} ${disabled ? "bg-gray-100 cursor-not-allowed" : ""}`,
|
|
10680
|
+
name,
|
|
10681
|
+
value: inputValue,
|
|
10682
|
+
onChange: handleInputChange,
|
|
10683
|
+
onFocus: () => {
|
|
10684
|
+
if (mode !== "type") {
|
|
10685
|
+
setFilteredOptions(normalizeOptions(options2));
|
|
10686
|
+
setShowDropdown(true);
|
|
10687
|
+
}
|
|
10688
|
+
},
|
|
10689
|
+
onClick: () => {
|
|
10690
|
+
if (mode !== "type") {
|
|
10691
|
+
setFilteredOptions(normalizeOptions(options2));
|
|
10692
|
+
setShowDropdown(true);
|
|
10693
|
+
}
|
|
10694
|
+
},
|
|
10695
|
+
onKeyDown: handleKeyDown,
|
|
10696
|
+
disabled,
|
|
10697
|
+
readOnly: mode === "select",
|
|
10698
|
+
autoComplete: "off",
|
|
10699
|
+
style: { height: height2 }
|
|
10700
|
+
}
|
|
10701
|
+
),
|
|
10702
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10703
|
+
"div",
|
|
10704
|
+
{
|
|
10705
|
+
onClick: toggleDropdown,
|
|
10706
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
10707
|
+
className: "absolute right-2 top-1/2 transform -translate-y-1/2 cursor-pointer text-gray-600",
|
|
10708
|
+
children: showDropdown ? /* @__PURE__ */ jsxRuntimeExports.jsx(FaChevronUp, { size: 12 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FaChevronDown, { size: 12 })
|
|
10709
|
+
}
|
|
10710
|
+
)
|
|
10711
|
+
] }),
|
|
10712
|
+
showDropdown && filteredOptions.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-md max-h-52 overflow-y-auto shadow-md", children: filteredOptions.map((opt, index) => {
|
|
10713
|
+
const isSelected = opt.value === value;
|
|
10714
|
+
const isHighlighted = index === highlightIndex;
|
|
10715
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10716
|
+
"li",
|
|
10717
|
+
{
|
|
10718
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
10719
|
+
onClick: () => handleSelect(opt.value, opt.label),
|
|
10720
|
+
className: `px-3 py-2 text-sm cursor-pointer ${isHighlighted ? "bg-gray-200" : isSelected ? "" : "bg-white"} ${isSelected ? "bg-[#dee2e6] text-black" : ""}`,
|
|
10721
|
+
children: opt.label
|
|
10722
|
+
},
|
|
10723
|
+
index
|
|
10724
|
+
);
|
|
10725
|
+
}) }),
|
|
10726
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-red-500 text-sm mt-1", children: error })
|
|
10727
|
+
] });
|
|
10728
|
+
};
|
|
10548
10729
|
var classnames = { exports: {} };
|
|
10549
10730
|
/*!
|
|
10550
10731
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -10610,34 +10791,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
10610
10791
|
}
|
|
10611
10792
|
var classnamesExports = requireClassnames();
|
|
10612
10793
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
tooltip = false,
|
|
10631
|
-
...props
|
|
10632
|
-
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
10633
|
-
...props,
|
|
10634
|
-
ref,
|
|
10635
|
-
className: classNames(className, `${type}-${tooltip ? "tooltip" : "feedback"}`)
|
|
10636
|
-
})
|
|
10637
|
-
);
|
|
10638
|
-
Feedback.displayName = "Feedback";
|
|
10639
|
-
Feedback.propTypes = propTypes$1;
|
|
10640
|
-
const FormContext = /* @__PURE__ */ React__namespace.createContext({});
|
|
10794
|
+
function useUncontrolledProp(propValue, defaultValue, handler) {
|
|
10795
|
+
var wasPropRef = React.useRef(propValue !== void 0);
|
|
10796
|
+
var _useState = React.useState(defaultValue), stateValue = _useState[0], setState = _useState[1];
|
|
10797
|
+
var isProp = propValue !== void 0;
|
|
10798
|
+
var wasProp = wasPropRef.current;
|
|
10799
|
+
wasPropRef.current = isProp;
|
|
10800
|
+
if (!isProp && wasProp && stateValue !== defaultValue) {
|
|
10801
|
+
setState(defaultValue);
|
|
10802
|
+
}
|
|
10803
|
+
return [isProp ? propValue : stateValue, React.useCallback(function(value) {
|
|
10804
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
10805
|
+
args[_key - 1] = arguments[_key];
|
|
10806
|
+
}
|
|
10807
|
+
if (handler) handler.apply(void 0, [value].concat(args));
|
|
10808
|
+
setState(value);
|
|
10809
|
+
}, [handler])];
|
|
10810
|
+
}
|
|
10641
10811
|
const DEFAULT_BREAKPOINTS = ["xxl", "xl", "lg", "md", "sm", "xs"];
|
|
10642
10812
|
const DEFAULT_MIN_BREAKPOINT = "xs";
|
|
10643
10813
|
const ThemeContext = /* @__PURE__ */ React__namespace.createContext({
|
|
@@ -10673,1286 +10843,715 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
10673
10843
|
} = React.useContext(ThemeContext);
|
|
10674
10844
|
return dir === "rtl";
|
|
10675
10845
|
}
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
bsPrefix,
|
|
10679
|
-
className,
|
|
10680
|
-
type = "checkbox",
|
|
10681
|
-
isValid = false,
|
|
10682
|
-
isInvalid = false,
|
|
10683
|
-
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
10684
|
-
as: Component = "input",
|
|
10685
|
-
...props
|
|
10686
|
-
}, ref) => {
|
|
10687
|
-
const {
|
|
10688
|
-
controlId
|
|
10689
|
-
} = React.useContext(FormContext);
|
|
10690
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, "form-check-input");
|
|
10691
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
10692
|
-
...props,
|
|
10693
|
-
ref,
|
|
10694
|
-
type,
|
|
10695
|
-
id: id || controlId,
|
|
10696
|
-
className: classNames(className, bsPrefix, isValid && "is-valid", isInvalid && "is-invalid")
|
|
10697
|
-
});
|
|
10698
|
-
});
|
|
10699
|
-
FormCheckInput.displayName = "FormCheckInput";
|
|
10700
|
-
const FormCheckLabel = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
10701
|
-
bsPrefix,
|
|
10702
|
-
className,
|
|
10703
|
-
htmlFor,
|
|
10704
|
-
...props
|
|
10705
|
-
}, ref) => {
|
|
10706
|
-
const {
|
|
10707
|
-
controlId
|
|
10708
|
-
} = React.useContext(FormContext);
|
|
10709
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, "form-check-label");
|
|
10710
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("label", {
|
|
10711
|
-
...props,
|
|
10712
|
-
ref,
|
|
10713
|
-
htmlFor: htmlFor || controlId,
|
|
10714
|
-
className: classNames(className, bsPrefix)
|
|
10715
|
-
});
|
|
10716
|
-
});
|
|
10717
|
-
FormCheckLabel.displayName = "FormCheckLabel";
|
|
10718
|
-
function hasChildOfType(children, type) {
|
|
10719
|
-
return React__namespace.Children.toArray(children).some((child) => /* @__PURE__ */ React__namespace.isValidElement(child) && child.type === type);
|
|
10846
|
+
function ownerDocument(node) {
|
|
10847
|
+
return node && node.ownerDocument || document;
|
|
10720
10848
|
}
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
bsSwitchPrefix,
|
|
10725
|
-
inline = false,
|
|
10726
|
-
reverse = false,
|
|
10727
|
-
disabled = false,
|
|
10728
|
-
isValid = false,
|
|
10729
|
-
isInvalid = false,
|
|
10730
|
-
feedbackTooltip = false,
|
|
10731
|
-
feedback,
|
|
10732
|
-
feedbackType,
|
|
10733
|
-
className,
|
|
10734
|
-
style: style2,
|
|
10735
|
-
title = "",
|
|
10736
|
-
type = "checkbox",
|
|
10737
|
-
label,
|
|
10738
|
-
children,
|
|
10739
|
-
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
10740
|
-
as = "input",
|
|
10741
|
-
...props
|
|
10742
|
-
}, ref) => {
|
|
10743
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, "form-check");
|
|
10744
|
-
bsSwitchPrefix = useBootstrapPrefix(bsSwitchPrefix, "form-switch");
|
|
10745
|
-
const {
|
|
10746
|
-
controlId
|
|
10747
|
-
} = React.useContext(FormContext);
|
|
10748
|
-
const innerFormContext = React.useMemo(() => ({
|
|
10749
|
-
controlId: id || controlId
|
|
10750
|
-
}), [controlId, id]);
|
|
10751
|
-
const hasLabel = !children && label != null && label !== false || hasChildOfType(children, FormCheckLabel);
|
|
10752
|
-
const input = /* @__PURE__ */ jsxRuntimeExports.jsx(FormCheckInput, {
|
|
10753
|
-
...props,
|
|
10754
|
-
type: type === "switch" ? "checkbox" : type,
|
|
10755
|
-
ref,
|
|
10756
|
-
isValid,
|
|
10757
|
-
isInvalid,
|
|
10758
|
-
disabled,
|
|
10759
|
-
as
|
|
10760
|
-
});
|
|
10761
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormContext.Provider, {
|
|
10762
|
-
value: innerFormContext,
|
|
10763
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
10764
|
-
style: style2,
|
|
10765
|
-
className: classNames(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === "switch" && bsSwitchPrefix),
|
|
10766
|
-
children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
10767
|
-
children: [input, hasLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(FormCheckLabel, {
|
|
10768
|
-
title,
|
|
10769
|
-
children: label
|
|
10770
|
-
}), feedback && /* @__PURE__ */ jsxRuntimeExports.jsx(Feedback, {
|
|
10771
|
-
type: feedbackType,
|
|
10772
|
-
tooltip: feedbackTooltip,
|
|
10773
|
-
children: feedback
|
|
10774
|
-
})]
|
|
10775
|
-
})
|
|
10776
|
-
})
|
|
10777
|
-
});
|
|
10778
|
-
});
|
|
10779
|
-
FormCheck.displayName = "FormCheck";
|
|
10780
|
-
const FormCheck$1 = Object.assign(FormCheck, {
|
|
10781
|
-
Input: FormCheckInput,
|
|
10782
|
-
Label: FormCheckLabel
|
|
10783
|
-
});
|
|
10784
|
-
var warning_1;
|
|
10785
|
-
var hasRequiredWarning;
|
|
10786
|
-
function requireWarning() {
|
|
10787
|
-
if (hasRequiredWarning) return warning_1;
|
|
10788
|
-
hasRequiredWarning = 1;
|
|
10789
|
-
var __DEV__ = process.env.NODE_ENV !== "production";
|
|
10790
|
-
var warning2 = function() {
|
|
10791
|
-
};
|
|
10792
|
-
if (__DEV__) {
|
|
10793
|
-
var printWarning = function printWarning2(format, args) {
|
|
10794
|
-
var len = arguments.length;
|
|
10795
|
-
args = new Array(len > 1 ? len - 1 : 0);
|
|
10796
|
-
for (var key = 1; key < len; key++) {
|
|
10797
|
-
args[key - 1] = arguments[key];
|
|
10798
|
-
}
|
|
10799
|
-
var argIndex = 0;
|
|
10800
|
-
var message = "Warning: " + format.replace(/%s/g, function() {
|
|
10801
|
-
return args[argIndex++];
|
|
10802
|
-
});
|
|
10803
|
-
if (typeof console !== "undefined") {
|
|
10804
|
-
console.error(message);
|
|
10805
|
-
}
|
|
10806
|
-
try {
|
|
10807
|
-
throw new Error(message);
|
|
10808
|
-
} catch (x) {
|
|
10809
|
-
}
|
|
10810
|
-
};
|
|
10811
|
-
warning2 = function(condition, format, args) {
|
|
10812
|
-
var len = arguments.length;
|
|
10813
|
-
args = new Array(len > 2 ? len - 2 : 0);
|
|
10814
|
-
for (var key = 2; key < len; key++) {
|
|
10815
|
-
args[key - 2] = arguments[key];
|
|
10816
|
-
}
|
|
10817
|
-
if (format === void 0) {
|
|
10818
|
-
throw new Error(
|
|
10819
|
-
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
10820
|
-
);
|
|
10821
|
-
}
|
|
10822
|
-
if (!condition) {
|
|
10823
|
-
printWarning.apply(null, [format].concat(args));
|
|
10824
|
-
}
|
|
10825
|
-
};
|
|
10826
|
-
}
|
|
10827
|
-
warning_1 = warning2;
|
|
10828
|
-
return warning_1;
|
|
10849
|
+
function ownerWindow(node) {
|
|
10850
|
+
var doc = ownerDocument(node);
|
|
10851
|
+
return doc && doc.defaultView || window;
|
|
10829
10852
|
}
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
readOnly,
|
|
10858
|
-
id: id || controlId,
|
|
10859
|
-
className: classNames(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === "color" && `${bsPrefix}-color`, isValid && "is-valid", isInvalid && "is-invalid")
|
|
10860
|
-
});
|
|
10861
|
-
});
|
|
10862
|
-
FormControl.displayName = "FormControl";
|
|
10863
|
-
const FormControl$1 = Object.assign(FormControl, {
|
|
10864
|
-
Feedback
|
|
10865
|
-
});
|
|
10866
|
-
const FormFloating = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
10867
|
-
className,
|
|
10868
|
-
bsPrefix,
|
|
10869
|
-
as: Component = "div",
|
|
10870
|
-
...props
|
|
10871
|
-
}, ref) => {
|
|
10872
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, "form-floating");
|
|
10873
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
10874
|
-
ref,
|
|
10875
|
-
className: classNames(className, bsPrefix),
|
|
10876
|
-
...props
|
|
10877
|
-
});
|
|
10878
|
-
});
|
|
10879
|
-
FormFloating.displayName = "FormFloating";
|
|
10880
|
-
const FormGroup = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
10881
|
-
controlId,
|
|
10882
|
-
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
10883
|
-
as: Component = "div",
|
|
10884
|
-
...props
|
|
10885
|
-
}, ref) => {
|
|
10886
|
-
const context2 = React.useMemo(() => ({
|
|
10887
|
-
controlId
|
|
10888
|
-
}), [controlId]);
|
|
10889
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormContext.Provider, {
|
|
10890
|
-
value: context2,
|
|
10891
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
10892
|
-
...props,
|
|
10893
|
-
ref
|
|
10894
|
-
})
|
|
10895
|
-
});
|
|
10896
|
-
});
|
|
10897
|
-
FormGroup.displayName = "FormGroup";
|
|
10898
|
-
function useCol({
|
|
10899
|
-
as,
|
|
10900
|
-
bsPrefix,
|
|
10901
|
-
className,
|
|
10902
|
-
...props
|
|
10903
|
-
}) {
|
|
10904
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, "col");
|
|
10905
|
-
const breakpoints = useBootstrapBreakpoints();
|
|
10906
|
-
const minBreakpoint = useBootstrapMinBreakpoint();
|
|
10907
|
-
const spans = [];
|
|
10908
|
-
const classes = [];
|
|
10909
|
-
breakpoints.forEach((brkPoint) => {
|
|
10910
|
-
const propValue = props[brkPoint];
|
|
10911
|
-
delete props[brkPoint];
|
|
10912
|
-
let span;
|
|
10913
|
-
let offset2;
|
|
10914
|
-
let order2;
|
|
10915
|
-
if (typeof propValue === "object" && propValue != null) {
|
|
10916
|
-
({
|
|
10917
|
-
span,
|
|
10918
|
-
offset: offset2,
|
|
10919
|
-
order: order2
|
|
10920
|
-
} = propValue);
|
|
10853
|
+
function getComputedStyle(node, psuedoElement) {
|
|
10854
|
+
return ownerWindow(node).getComputedStyle(node, psuedoElement);
|
|
10855
|
+
}
|
|
10856
|
+
var rUpper = /([A-Z])/g;
|
|
10857
|
+
function hyphenate(string) {
|
|
10858
|
+
return string.replace(rUpper, "-$1").toLowerCase();
|
|
10859
|
+
}
|
|
10860
|
+
var msPattern = /^ms-/;
|
|
10861
|
+
function hyphenateStyleName(string) {
|
|
10862
|
+
return hyphenate(string).replace(msPattern, "-ms-");
|
|
10863
|
+
}
|
|
10864
|
+
var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
|
|
10865
|
+
function isTransform(value) {
|
|
10866
|
+
return !!(value && supportedTransforms.test(value));
|
|
10867
|
+
}
|
|
10868
|
+
function style(node, property) {
|
|
10869
|
+
var css = "";
|
|
10870
|
+
var transforms = "";
|
|
10871
|
+
if (typeof property === "string") {
|
|
10872
|
+
return node.style.getPropertyValue(hyphenateStyleName(property)) || getComputedStyle(node).getPropertyValue(hyphenateStyleName(property));
|
|
10873
|
+
}
|
|
10874
|
+
Object.keys(property).forEach(function(key) {
|
|
10875
|
+
var value = property[key];
|
|
10876
|
+
if (!value && value !== 0) {
|
|
10877
|
+
node.style.removeProperty(hyphenateStyleName(key));
|
|
10878
|
+
} else if (isTransform(key)) {
|
|
10879
|
+
transforms += key + "(" + value + ") ";
|
|
10921
10880
|
} else {
|
|
10922
|
-
|
|
10881
|
+
css += hyphenateStyleName(key) + ": " + value + ";";
|
|
10923
10882
|
}
|
|
10924
|
-
const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : "";
|
|
10925
|
-
if (span) spans.push(span === true ? `${bsPrefix}${infix}` : `${bsPrefix}${infix}-${span}`);
|
|
10926
|
-
if (order2 != null) classes.push(`order${infix}-${order2}`);
|
|
10927
|
-
if (offset2 != null) classes.push(`offset${infix}-${offset2}`);
|
|
10928
10883
|
});
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
as,
|
|
10934
|
-
bsPrefix,
|
|
10935
|
-
spans
|
|
10936
|
-
}];
|
|
10884
|
+
if (transforms) {
|
|
10885
|
+
css += "transform: " + transforms + ";";
|
|
10886
|
+
}
|
|
10887
|
+
node.style.cssText += ";" + css;
|
|
10937
10888
|
}
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
className: classNames(className, !spans.length && bsPrefix)
|
|
10953
|
-
});
|
|
10889
|
+
function isEscKey(e) {
|
|
10890
|
+
return e.code === "Escape" || e.keyCode === 27;
|
|
10891
|
+
}
|
|
10892
|
+
function getReactVersion() {
|
|
10893
|
+
const parts = React__namespace.version.split(".");
|
|
10894
|
+
return {
|
|
10895
|
+
major: +parts[0],
|
|
10896
|
+
minor: +parts[1],
|
|
10897
|
+
patch: +parts[2]
|
|
10898
|
+
};
|
|
10899
|
+
}
|
|
10900
|
+
function getChildRef(element) {
|
|
10901
|
+
if (!element || typeof element === "function") {
|
|
10902
|
+
return null;
|
|
10954
10903
|
}
|
|
10955
|
-
);
|
|
10956
|
-
Col.displayName = "Col";
|
|
10957
|
-
const FormLabel = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
10958
|
-
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
10959
|
-
as: Component = "label",
|
|
10960
|
-
bsPrefix,
|
|
10961
|
-
column = false,
|
|
10962
|
-
visuallyHidden = false,
|
|
10963
|
-
className,
|
|
10964
|
-
htmlFor,
|
|
10965
|
-
...props
|
|
10966
|
-
}, ref) => {
|
|
10967
10904
|
const {
|
|
10968
|
-
|
|
10969
|
-
} =
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10905
|
+
major
|
|
10906
|
+
} = getReactVersion();
|
|
10907
|
+
const childRef = major >= 19 ? element.props.ref : element.ref;
|
|
10908
|
+
return childRef;
|
|
10909
|
+
}
|
|
10910
|
+
const canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
10911
|
+
var optionsSupported = false;
|
|
10912
|
+
var onceSupported = false;
|
|
10913
|
+
try {
|
|
10914
|
+
var options = {
|
|
10915
|
+
get passive() {
|
|
10916
|
+
return optionsSupported = true;
|
|
10917
|
+
},
|
|
10918
|
+
get once() {
|
|
10919
|
+
return onceSupported = optionsSupported = true;
|
|
10920
|
+
}
|
|
10921
|
+
};
|
|
10922
|
+
if (canUseDOM) {
|
|
10923
|
+
window.addEventListener("test", options, options);
|
|
10924
|
+
window.removeEventListener("test", options, true);
|
|
10925
|
+
}
|
|
10926
|
+
} catch (e) {
|
|
10927
|
+
}
|
|
10928
|
+
function addEventListener(node, eventName, handler, options2) {
|
|
10929
|
+
if (options2 && typeof options2 !== "boolean" && !onceSupported) {
|
|
10930
|
+
var once = options2.once, capture = options2.capture;
|
|
10931
|
+
var wrappedHandler = handler;
|
|
10932
|
+
if (!onceSupported && once) {
|
|
10933
|
+
wrappedHandler = handler.__once || function onceHandler(event) {
|
|
10934
|
+
this.removeEventListener(eventName, onceHandler, capture);
|
|
10935
|
+
handler.call(this, event);
|
|
10936
|
+
};
|
|
10937
|
+
handler.__once = wrappedHandler;
|
|
10938
|
+
}
|
|
10939
|
+
node.addEventListener(eventName, wrappedHandler, optionsSupported ? options2 : capture);
|
|
10940
|
+
}
|
|
10941
|
+
node.addEventListener(eventName, handler, options2);
|
|
10942
|
+
}
|
|
10943
|
+
function removeEventListener(node, eventName, handler, options2) {
|
|
10944
|
+
var capture = options2 && typeof options2 !== "boolean" ? options2.capture : options2;
|
|
10945
|
+
node.removeEventListener(eventName, handler, capture);
|
|
10946
|
+
if (handler.__once) {
|
|
10947
|
+
node.removeEventListener(eventName, handler.__once, capture);
|
|
10948
|
+
}
|
|
10949
|
+
}
|
|
10950
|
+
function listen(node, eventName, handler, options2) {
|
|
10951
|
+
addEventListener(node, eventName, handler, options2);
|
|
10952
|
+
return function() {
|
|
10953
|
+
removeEventListener(node, eventName, handler, options2);
|
|
10954
|
+
};
|
|
10955
|
+
}
|
|
10956
|
+
function triggerEvent(node, eventName, bubbles, cancelable) {
|
|
10957
|
+
if (cancelable === void 0) {
|
|
10958
|
+
cancelable = true;
|
|
10959
|
+
}
|
|
10960
|
+
if (node) {
|
|
10961
|
+
var event = document.createEvent("HTMLEvents");
|
|
10962
|
+
event.initEvent(eventName, bubbles, cancelable);
|
|
10963
|
+
node.dispatchEvent(event);
|
|
10964
|
+
}
|
|
10965
|
+
}
|
|
10966
|
+
function parseDuration$1(node) {
|
|
10967
|
+
var str = style(node, "transitionDuration") || "";
|
|
10968
|
+
var mult = str.indexOf("ms") === -1 ? 1e3 : 1;
|
|
10969
|
+
return parseFloat(str) * mult;
|
|
10970
|
+
}
|
|
10971
|
+
function emulateTransitionEnd(element, duration2, padding2) {
|
|
10972
|
+
if (padding2 === void 0) {
|
|
10973
|
+
padding2 = 5;
|
|
10974
|
+
}
|
|
10975
|
+
var called = false;
|
|
10976
|
+
var handle = setTimeout(function() {
|
|
10977
|
+
if (!called) triggerEvent(element, "transitionend", true);
|
|
10978
|
+
}, duration2 + padding2);
|
|
10979
|
+
var remove = listen(element, "transitionend", function() {
|
|
10980
|
+
called = true;
|
|
10981
|
+
}, {
|
|
10982
|
+
once: true
|
|
10988
10983
|
});
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10984
|
+
return function() {
|
|
10985
|
+
clearTimeout(handle);
|
|
10986
|
+
remove();
|
|
10987
|
+
};
|
|
10988
|
+
}
|
|
10989
|
+
function transitionEnd(element, handler, duration2, padding2) {
|
|
10990
|
+
if (duration2 == null) duration2 = parseDuration$1(element) || 0;
|
|
10991
|
+
var removeEmulate = emulateTransitionEnd(element, duration2, padding2);
|
|
10992
|
+
var remove = listen(element, "transitionend", handler);
|
|
10993
|
+
return function() {
|
|
10994
|
+
removeEmulate();
|
|
10995
|
+
remove();
|
|
10996
|
+
};
|
|
10997
|
+
}
|
|
10998
|
+
function parseDuration(node, property) {
|
|
10999
|
+
const str = style(node, property) || "";
|
|
11000
|
+
const mult = str.indexOf("ms") === -1 ? 1e3 : 1;
|
|
11001
|
+
return parseFloat(str) * mult;
|
|
11002
|
+
}
|
|
11003
|
+
function transitionEndListener(element, handler) {
|
|
11004
|
+
const duration2 = parseDuration(element, "transitionDuration");
|
|
11005
|
+
const delay = parseDuration(element, "transitionDelay");
|
|
11006
|
+
const remove = transitionEnd(element, (e) => {
|
|
11007
|
+
if (e.target === element) {
|
|
11008
|
+
remove();
|
|
11009
|
+
handler(e);
|
|
11010
|
+
}
|
|
11011
|
+
}, duration2 + delay);
|
|
11012
|
+
}
|
|
11013
|
+
function triggerBrowserReflow(node) {
|
|
11014
|
+
node.offsetHeight;
|
|
11015
|
+
}
|
|
11016
|
+
const toFnRef$1 = (ref) => !ref || typeof ref === "function" ? ref : (value) => {
|
|
11017
|
+
ref.current = value;
|
|
11018
|
+
};
|
|
11019
|
+
function mergeRefs$1(refA, refB) {
|
|
11020
|
+
const a = toFnRef$1(refA);
|
|
11021
|
+
const b = toFnRef$1(refB);
|
|
11022
|
+
return (value) => {
|
|
11023
|
+
if (a) a(value);
|
|
11024
|
+
if (b) b(value);
|
|
11025
|
+
};
|
|
11026
|
+
}
|
|
11027
|
+
function useMergedRefs$1(refA, refB) {
|
|
11028
|
+
return React.useMemo(() => mergeRefs$1(refA, refB), [refA, refB]);
|
|
11029
|
+
}
|
|
11030
|
+
function safeFindDOMNode(componentOrElement) {
|
|
11031
|
+
if (componentOrElement && "setState" in componentOrElement) {
|
|
11032
|
+
return ReactDOM.findDOMNode(componentOrElement);
|
|
11033
|
+
}
|
|
11034
|
+
return componentOrElement != null ? componentOrElement : null;
|
|
11035
|
+
}
|
|
11036
|
+
const TransitionWrapper = /* @__PURE__ */ React.forwardRef(({
|
|
11037
|
+
onEnter,
|
|
11038
|
+
onEntering,
|
|
11039
|
+
onEntered,
|
|
11040
|
+
onExit,
|
|
11041
|
+
onExiting,
|
|
11042
|
+
onExited,
|
|
11043
|
+
addEndListener,
|
|
11044
|
+
children,
|
|
11045
|
+
childRef,
|
|
10995
11046
|
...props
|
|
10996
11047
|
}, ref) => {
|
|
10997
|
-
const
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11048
|
+
const nodeRef = React.useRef(null);
|
|
11049
|
+
const mergedRef = useMergedRefs$1(nodeRef, childRef);
|
|
11050
|
+
const attachRef = (r2) => {
|
|
11051
|
+
mergedRef(safeFindDOMNode(r2));
|
|
11052
|
+
};
|
|
11053
|
+
const normalize = (callback) => (param) => {
|
|
11054
|
+
if (callback && nodeRef.current) {
|
|
11055
|
+
callback(nodeRef.current, param);
|
|
11056
|
+
}
|
|
11057
|
+
};
|
|
11058
|
+
const handleEnter = React.useCallback(normalize(onEnter), [onEnter]);
|
|
11059
|
+
const handleEntering = React.useCallback(normalize(onEntering), [onEntering]);
|
|
11060
|
+
const handleEntered = React.useCallback(normalize(onEntered), [onEntered]);
|
|
11061
|
+
const handleExit = React.useCallback(normalize(onExit), [onExit]);
|
|
11062
|
+
const handleExiting = React.useCallback(normalize(onExiting), [onExiting]);
|
|
11063
|
+
const handleExited = React.useCallback(normalize(onExited), [onExited]);
|
|
11064
|
+
const handleAddEndListener = React.useCallback(normalize(addEndListener), [addEndListener]);
|
|
11065
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Transition, {
|
|
11004
11066
|
ref,
|
|
11005
|
-
className: classNames(className, bsPrefix),
|
|
11006
|
-
id: id || controlId
|
|
11007
|
-
});
|
|
11008
|
-
});
|
|
11009
|
-
FormRange.displayName = "FormRange";
|
|
11010
|
-
const FormSelect = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11011
|
-
bsPrefix,
|
|
11012
|
-
size,
|
|
11013
|
-
htmlSize,
|
|
11014
|
-
className,
|
|
11015
|
-
isValid = false,
|
|
11016
|
-
isInvalid = false,
|
|
11017
|
-
id,
|
|
11018
|
-
...props
|
|
11019
|
-
}, ref) => {
|
|
11020
|
-
const {
|
|
11021
|
-
controlId
|
|
11022
|
-
} = React.useContext(FormContext);
|
|
11023
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, "form-select");
|
|
11024
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("select", {
|
|
11025
11067
|
...props,
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11068
|
+
onEnter: handleEnter,
|
|
11069
|
+
onEntered: handleEntered,
|
|
11070
|
+
onEntering: handleEntering,
|
|
11071
|
+
onExit: handleExit,
|
|
11072
|
+
onExited: handleExited,
|
|
11073
|
+
onExiting: handleExiting,
|
|
11074
|
+
addEndListener: handleAddEndListener,
|
|
11075
|
+
nodeRef,
|
|
11076
|
+
children: typeof children === "function" ? (status, innerProps) => (
|
|
11077
|
+
// TODO: Types for RTG missing innerProps, so need to cast.
|
|
11078
|
+
children(status, {
|
|
11079
|
+
...innerProps,
|
|
11080
|
+
ref: attachRef
|
|
11081
|
+
})
|
|
11082
|
+
) : /* @__PURE__ */ React.cloneElement(children, {
|
|
11083
|
+
ref: attachRef
|
|
11084
|
+
})
|
|
11030
11085
|
});
|
|
11031
11086
|
});
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
({
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
return
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
)
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
}
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11087
|
+
TransitionWrapper.displayName = "TransitionWrapper";
|
|
11088
|
+
function useCommittedRef$1(value) {
|
|
11089
|
+
const ref = React.useRef(value);
|
|
11090
|
+
React.useEffect(() => {
|
|
11091
|
+
ref.current = value;
|
|
11092
|
+
}, [value]);
|
|
11093
|
+
return ref;
|
|
11094
|
+
}
|
|
11095
|
+
function useEventCallback$1(fn) {
|
|
11096
|
+
const ref = useCommittedRef$1(fn);
|
|
11097
|
+
return React.useCallback(function(...args) {
|
|
11098
|
+
return ref.current && ref.current(...args);
|
|
11099
|
+
}, [ref]);
|
|
11100
|
+
}
|
|
11101
|
+
function useCallbackRef() {
|
|
11102
|
+
return React.useState(null);
|
|
11103
|
+
}
|
|
11104
|
+
function useCommittedRef(value) {
|
|
11105
|
+
const ref = React.useRef(value);
|
|
11106
|
+
React.useEffect(() => {
|
|
11107
|
+
ref.current = value;
|
|
11108
|
+
}, [value]);
|
|
11109
|
+
return ref;
|
|
11110
|
+
}
|
|
11111
|
+
function useEventCallback(fn) {
|
|
11112
|
+
const ref = useCommittedRef(fn);
|
|
11113
|
+
return React.useCallback(function(...args) {
|
|
11114
|
+
return ref.current && ref.current(...args);
|
|
11115
|
+
}, [ref]);
|
|
11116
|
+
}
|
|
11117
|
+
function useMounted$1() {
|
|
11118
|
+
const mounted = React.useRef(true);
|
|
11119
|
+
const isMounted = React.useRef(() => mounted.current);
|
|
11120
|
+
React.useEffect(() => {
|
|
11121
|
+
mounted.current = true;
|
|
11122
|
+
return () => {
|
|
11123
|
+
mounted.current = false;
|
|
11124
|
+
};
|
|
11125
|
+
}, []);
|
|
11126
|
+
return isMounted.current;
|
|
11127
|
+
}
|
|
11128
|
+
const isReactNative$1 = typeof global !== "undefined" && // @ts-ignore
|
|
11129
|
+
global.navigator && // @ts-ignore
|
|
11130
|
+
global.navigator.product === "ReactNative";
|
|
11131
|
+
const isDOM$1 = typeof document !== "undefined";
|
|
11132
|
+
const useIsomorphicEffect$1 = isDOM$1 || isReactNative$1 ? React.useLayoutEffect : React.useEffect;
|
|
11133
|
+
const fadeStyles = {
|
|
11134
|
+
[ENTERING]: "show",
|
|
11135
|
+
[ENTERED]: "show"
|
|
11136
|
+
};
|
|
11137
|
+
const Fade = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11063
11138
|
className,
|
|
11064
11139
|
children,
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
...
|
|
11140
|
+
transitionClasses = {},
|
|
11141
|
+
onEnter,
|
|
11142
|
+
...rest
|
|
11068
11143
|
}, ref) => {
|
|
11069
|
-
|
|
11070
|
-
|
|
11144
|
+
const props = {
|
|
11145
|
+
in: false,
|
|
11146
|
+
timeout: 300,
|
|
11147
|
+
mountOnEnter: false,
|
|
11148
|
+
unmountOnExit: false,
|
|
11149
|
+
appear: false,
|
|
11150
|
+
...rest
|
|
11151
|
+
};
|
|
11152
|
+
const handleEnter = React.useCallback((node, isAppearing) => {
|
|
11153
|
+
triggerBrowserReflow(node);
|
|
11154
|
+
onEnter == null || onEnter(node, isAppearing);
|
|
11155
|
+
}, [onEnter]);
|
|
11156
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionWrapper, {
|
|
11071
11157
|
ref,
|
|
11072
|
-
|
|
11073
|
-
controlId,
|
|
11158
|
+
addEndListener: transitionEndListener,
|
|
11074
11159
|
...props,
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11160
|
+
onEnter: handleEnter,
|
|
11161
|
+
childRef: getChildRef(children),
|
|
11162
|
+
children: (status, innerProps) => /* @__PURE__ */ React__namespace.cloneElement(children, {
|
|
11163
|
+
...innerProps,
|
|
11164
|
+
className: classNames("fade", className, children.props.className, fadeStyles[status], transitionClasses[status])
|
|
11165
|
+
})
|
|
11079
11166
|
});
|
|
11080
11167
|
});
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
/**
|
|
11093
|
-
* Mark a form as having been validated. Setting it to `true` will
|
|
11094
|
-
* toggle any validation styles on the forms elements.
|
|
11095
|
-
*/
|
|
11096
|
-
validated: PropTypes.bool,
|
|
11097
|
-
as: PropTypes.elementType
|
|
11098
|
-
};
|
|
11099
|
-
const Form = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11100
|
-
className,
|
|
11101
|
-
validated,
|
|
11102
|
-
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11103
|
-
as: Component = "form",
|
|
11104
|
-
...props
|
|
11105
|
-
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11106
|
-
...props,
|
|
11107
|
-
ref,
|
|
11108
|
-
className: classNames(className, validated && "was-validated")
|
|
11109
|
-
}));
|
|
11110
|
-
Form.displayName = "Form";
|
|
11111
|
-
Form.propTypes = propTypes;
|
|
11112
|
-
const Form$1 = Object.assign(Form, {
|
|
11113
|
-
Group: FormGroup,
|
|
11114
|
-
Control: FormControl$1,
|
|
11115
|
-
Floating: FormFloating,
|
|
11116
|
-
Check: FormCheck$1,
|
|
11117
|
-
Switch: Switch$1,
|
|
11118
|
-
Label: FormLabel,
|
|
11119
|
-
Text: FormText,
|
|
11120
|
-
Range: FormRange,
|
|
11121
|
-
Select: FormSelect,
|
|
11122
|
-
FloatingLabel
|
|
11123
|
-
});
|
|
11124
|
-
function FaCheck(props) {
|
|
11125
|
-
return GenIcon({ "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" }, "child": [] }] })(props);
|
|
11168
|
+
Fade.displayName = "Fade";
|
|
11169
|
+
function useMounted() {
|
|
11170
|
+
const mounted = React.useRef(true);
|
|
11171
|
+
const isMounted = React.useRef(() => mounted.current);
|
|
11172
|
+
React.useEffect(() => {
|
|
11173
|
+
mounted.current = true;
|
|
11174
|
+
return () => {
|
|
11175
|
+
mounted.current = false;
|
|
11176
|
+
};
|
|
11177
|
+
}, []);
|
|
11178
|
+
return isMounted.current;
|
|
11126
11179
|
}
|
|
11127
|
-
function
|
|
11128
|
-
|
|
11180
|
+
function useUpdatedRef(value) {
|
|
11181
|
+
const valueRef = React.useRef(value);
|
|
11182
|
+
valueRef.current = value;
|
|
11183
|
+
return valueRef;
|
|
11129
11184
|
}
|
|
11130
|
-
function
|
|
11131
|
-
|
|
11185
|
+
function useWillUnmount(fn) {
|
|
11186
|
+
const onUnmount = useUpdatedRef(fn);
|
|
11187
|
+
React.useEffect(() => () => onUnmount.current(), []);
|
|
11132
11188
|
}
|
|
11133
|
-
const
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
}) => {
|
|
11152
|
-
const [inputValue, setInputValue] = React.useState("");
|
|
11153
|
-
const [filteredOptions, setFilteredOptions] = React.useState([]);
|
|
11154
|
-
const [showDropdown, setShowDropdown] = React.useState(false);
|
|
11155
|
-
const [highlightIndex, setHighlightIndex] = React.useState(-1);
|
|
11156
|
-
const inputRef = React.useRef();
|
|
11157
|
-
const wrapperRef = React.useRef();
|
|
11158
|
-
React.useEffect(() => {
|
|
11159
|
-
const matchedOption = options2.find(
|
|
11160
|
-
(opt) => typeof opt === "string" ? opt === value : opt[optionValueKey] === value
|
|
11161
|
-
);
|
|
11162
|
-
const label2 = typeof matchedOption === "string" ? matchedOption : (matchedOption == null ? void 0 : matchedOption[optionLabelKey]) || "";
|
|
11163
|
-
setInputValue(label2);
|
|
11164
|
-
if (mode !== "type") {
|
|
11165
|
-
setFilteredOptions(normalizeOptions(options2));
|
|
11166
|
-
}
|
|
11167
|
-
}, [value, options2]);
|
|
11168
|
-
const normalizeOptions = (opts) => {
|
|
11169
|
-
return opts.map((opt) => {
|
|
11170
|
-
if (typeof opt === "string") {
|
|
11171
|
-
return { label: opt, value: opt };
|
|
11172
|
-
}
|
|
11173
|
-
return {
|
|
11174
|
-
label: opt[optionLabelKey],
|
|
11175
|
-
value: opt[optionValueKey]
|
|
11176
|
-
};
|
|
11177
|
-
});
|
|
11178
|
-
};
|
|
11179
|
-
const handleInputChange = (e) => {
|
|
11180
|
-
const val = e.target.value;
|
|
11181
|
-
setInputValue(val);
|
|
11182
|
-
if (mode !== "select") {
|
|
11183
|
-
if (name) onChange(name, val);
|
|
11184
|
-
else onChange(val);
|
|
11185
|
-
}
|
|
11186
|
-
if (mode !== "type") {
|
|
11187
|
-
const normalized = normalizeOptions(options2);
|
|
11188
|
-
const filtered = normalized.filter(
|
|
11189
|
-
(opt) => {
|
|
11190
|
-
var _a;
|
|
11191
|
-
return (_a = opt.label) == null ? void 0 : _a.toLowerCase().includes(val.toLowerCase());
|
|
11192
|
-
}
|
|
11193
|
-
);
|
|
11194
|
-
setFilteredOptions(filtered);
|
|
11195
|
-
setShowDropdown(true);
|
|
11196
|
-
setHighlightIndex(-1);
|
|
11197
|
-
}
|
|
11198
|
-
};
|
|
11199
|
-
const handleSelect = (val, label2) => {
|
|
11200
|
-
setInputValue(label2);
|
|
11201
|
-
if (name) {
|
|
11202
|
-
onChange(name, val);
|
|
11203
|
-
} else {
|
|
11204
|
-
onChange(val);
|
|
11205
|
-
}
|
|
11206
|
-
setShowDropdown(false);
|
|
11207
|
-
setHighlightIndex(-1);
|
|
11208
|
-
};
|
|
11209
|
-
const handleKeyDown = (e) => {
|
|
11210
|
-
if (!showDropdown || filteredOptions.length === 0) return;
|
|
11211
|
-
if (e.key === "ArrowDown") {
|
|
11212
|
-
e.preventDefault();
|
|
11213
|
-
setHighlightIndex(
|
|
11214
|
-
(prev) => prev < filteredOptions.length - 1 ? prev + 1 : 0
|
|
11215
|
-
);
|
|
11216
|
-
}
|
|
11217
|
-
if (e.key === "ArrowUp") {
|
|
11218
|
-
e.preventDefault();
|
|
11219
|
-
setHighlightIndex(
|
|
11220
|
-
(prev) => prev > 0 ? prev - 1 : filteredOptions.length - 1
|
|
11221
|
-
);
|
|
11222
|
-
}
|
|
11223
|
-
if (e.key === "Enter") {
|
|
11224
|
-
e.preventDefault();
|
|
11225
|
-
if (highlightIndex >= 0) {
|
|
11226
|
-
const selected = filteredOptions[highlightIndex];
|
|
11227
|
-
handleSelect(selected.value, selected.label);
|
|
11189
|
+
const MAX_DELAY_MS = 2 ** 31 - 1;
|
|
11190
|
+
function setChainedTimeout(handleRef, fn, timeoutAtMs) {
|
|
11191
|
+
const delayMs = timeoutAtMs - Date.now();
|
|
11192
|
+
handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(() => setChainedTimeout(handleRef, fn, timeoutAtMs), MAX_DELAY_MS);
|
|
11193
|
+
}
|
|
11194
|
+
function useTimeout() {
|
|
11195
|
+
const isMounted = useMounted();
|
|
11196
|
+
const handleRef = React.useRef();
|
|
11197
|
+
useWillUnmount(() => clearTimeout(handleRef.current));
|
|
11198
|
+
return React.useMemo(() => {
|
|
11199
|
+
const clear = () => clearTimeout(handleRef.current);
|
|
11200
|
+
function set(fn, delayMs = 0) {
|
|
11201
|
+
if (!isMounted()) return;
|
|
11202
|
+
clear();
|
|
11203
|
+
if (delayMs <= MAX_DELAY_MS) {
|
|
11204
|
+
handleRef.current = setTimeout(fn, delayMs);
|
|
11205
|
+
} else {
|
|
11206
|
+
setChainedTimeout(handleRef, fn, Date.now() + delayMs);
|
|
11228
11207
|
}
|
|
11229
11208
|
}
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
};
|
|
11237
|
-
const toggleDropdown = () => {
|
|
11238
|
-
if (disabled) return;
|
|
11239
|
-
if (!showDropdown && mode !== "type") {
|
|
11240
|
-
setFilteredOptions(normalizeOptions(options2));
|
|
11241
|
-
}
|
|
11242
|
-
setShowDropdown((prev) => {
|
|
11243
|
-
var _a;
|
|
11244
|
-
const willShow = !prev;
|
|
11245
|
-
if (willShow) (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
11246
|
-
return willShow;
|
|
11247
|
-
});
|
|
11248
|
-
};
|
|
11249
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Form$1.Group, { ref: wrapperRef, className: "mb-3 position-relative", children: [
|
|
11250
|
-
label && /* @__PURE__ */ jsxRuntimeExports.jsxs(Form$1.Label, { style: { display: "flex", fontWeight: "500", fontSize: "14px", lineHeight: "20px", color: "#212529", textTransform: "capitalize", marginBottom: "0.5rem" }, children: [
|
|
11251
|
-
label,
|
|
11252
|
-
isRequired && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "red" }, children: "*" })
|
|
11253
|
-
] }),
|
|
11254
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "d-flex position-relative", children: [
|
|
11255
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11256
|
-
Form$1.Control,
|
|
11257
|
-
{
|
|
11258
|
-
ref: inputRef,
|
|
11259
|
-
type: isPassword ? "password" : "text",
|
|
11260
|
-
placeholder: getPlaceholder(),
|
|
11261
|
-
style: {
|
|
11262
|
-
borderColor: "#12AB5B",
|
|
11263
|
-
height: height2,
|
|
11264
|
-
paddingRight: "2rem"
|
|
11265
|
-
},
|
|
11266
|
-
name,
|
|
11267
|
-
value: inputValue,
|
|
11268
|
-
onChange: handleInputChange,
|
|
11269
|
-
onFocus: () => {
|
|
11270
|
-
if (mode !== "type") {
|
|
11271
|
-
setFilteredOptions(normalizeOptions(options2));
|
|
11272
|
-
setShowDropdown(true);
|
|
11273
|
-
}
|
|
11274
|
-
},
|
|
11275
|
-
onClick: () => {
|
|
11276
|
-
if (mode !== "type") {
|
|
11277
|
-
setFilteredOptions(normalizeOptions(options2));
|
|
11278
|
-
setShowDropdown(true);
|
|
11279
|
-
}
|
|
11280
|
-
},
|
|
11281
|
-
onKeyDown: handleKeyDown,
|
|
11282
|
-
isInvalid: !!error,
|
|
11283
|
-
disabled,
|
|
11284
|
-
readOnly: mode === "select",
|
|
11285
|
-
autoComplete: "off"
|
|
11286
|
-
}
|
|
11287
|
-
),
|
|
11288
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11289
|
-
"div",
|
|
11290
|
-
{
|
|
11291
|
-
className: "position-absolute end-0 top-0 d-flex align-items-center justify-content-center",
|
|
11292
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
11293
|
-
onClick: toggleDropdown,
|
|
11294
|
-
style: {
|
|
11295
|
-
width: "2rem",
|
|
11296
|
-
height: height2,
|
|
11297
|
-
cursor: "pointer",
|
|
11298
|
-
border: "1px solid #12AB5B",
|
|
11299
|
-
borderLeft: "none",
|
|
11300
|
-
borderTopRightRadius: "0.375rem",
|
|
11301
|
-
borderBottomRightRadius: "0.375rem",
|
|
11302
|
-
background: "#fff"
|
|
11303
|
-
},
|
|
11304
|
-
children: showDropdown ? /* @__PURE__ */ jsxRuntimeExports.jsx(FaChevronUp, { size: 12 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FaChevronDown, { size: 12 })
|
|
11305
|
-
}
|
|
11306
|
-
)
|
|
11307
|
-
] }),
|
|
11308
|
-
showDropdown && filteredOptions.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11309
|
-
"ul",
|
|
11310
|
-
{
|
|
11311
|
-
className: "list-group position-absolute w-100 z-3",
|
|
11312
|
-
style: { maxHeight: "200px", overflowY: "auto", boxShadow: "5px 5px 15px lightgray" },
|
|
11313
|
-
children: filteredOptions.map((opt, index) => {
|
|
11314
|
-
const isSelected = opt.value === value;
|
|
11315
|
-
const isHighlighted = index === highlightIndex;
|
|
11316
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11317
|
-
"li",
|
|
11318
|
-
{
|
|
11319
|
-
className: "list-group-item list-group-item-action",
|
|
11320
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
11321
|
-
onClick: () => handleSelect(opt.value, opt.label),
|
|
11322
|
-
style: {
|
|
11323
|
-
cursor: "pointer",
|
|
11324
|
-
fontSize: "12px",
|
|
11325
|
-
textAlign: "left",
|
|
11326
|
-
backgroundColor: isHighlighted ? "#e9ecef" : isSelected ? selectedBgColor : "white",
|
|
11327
|
-
color: isSelected ? selectedTextColor : "black",
|
|
11328
|
-
padding: "8px 12px"
|
|
11329
|
-
},
|
|
11330
|
-
children: opt.label
|
|
11331
|
-
},
|
|
11332
|
-
index
|
|
11333
|
-
);
|
|
11334
|
-
})
|
|
11335
|
-
}
|
|
11336
|
-
),
|
|
11337
|
-
error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "invalid-feedback d-block", children: error })
|
|
11338
|
-
] });
|
|
11339
|
-
};
|
|
11340
|
-
function useUncontrolledProp(propValue, defaultValue, handler) {
|
|
11341
|
-
var wasPropRef = React.useRef(propValue !== void 0);
|
|
11342
|
-
var _useState = React.useState(defaultValue), stateValue = _useState[0], setState = _useState[1];
|
|
11343
|
-
var isProp = propValue !== void 0;
|
|
11344
|
-
var wasProp = wasPropRef.current;
|
|
11345
|
-
wasPropRef.current = isProp;
|
|
11346
|
-
if (!isProp && wasProp && stateValue !== defaultValue) {
|
|
11347
|
-
setState(defaultValue);
|
|
11348
|
-
}
|
|
11349
|
-
return [isProp ? propValue : stateValue, React.useCallback(function(value) {
|
|
11350
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11351
|
-
args[_key - 1] = arguments[_key];
|
|
11352
|
-
}
|
|
11353
|
-
if (handler) handler.apply(void 0, [value].concat(args));
|
|
11354
|
-
setState(value);
|
|
11355
|
-
}, [handler])];
|
|
11356
|
-
}
|
|
11357
|
-
function ownerDocument(node) {
|
|
11358
|
-
return node && node.ownerDocument || document;
|
|
11359
|
-
}
|
|
11360
|
-
function ownerWindow(node) {
|
|
11361
|
-
var doc = ownerDocument(node);
|
|
11362
|
-
return doc && doc.defaultView || window;
|
|
11363
|
-
}
|
|
11364
|
-
function getComputedStyle(node, psuedoElement) {
|
|
11365
|
-
return ownerWindow(node).getComputedStyle(node, psuedoElement);
|
|
11366
|
-
}
|
|
11367
|
-
var rUpper = /([A-Z])/g;
|
|
11368
|
-
function hyphenate(string) {
|
|
11369
|
-
return string.replace(rUpper, "-$1").toLowerCase();
|
|
11370
|
-
}
|
|
11371
|
-
var msPattern = /^ms-/;
|
|
11372
|
-
function hyphenateStyleName(string) {
|
|
11373
|
-
return hyphenate(string).replace(msPattern, "-ms-");
|
|
11209
|
+
return {
|
|
11210
|
+
set,
|
|
11211
|
+
clear,
|
|
11212
|
+
handleRef
|
|
11213
|
+
};
|
|
11214
|
+
}, []);
|
|
11374
11215
|
}
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
return !!(value && supportedTransforms.test(value));
|
|
11216
|
+
function hasChildOfType(children, type) {
|
|
11217
|
+
return React__namespace.Children.toArray(children).some((child) => /* @__PURE__ */ React__namespace.isValidElement(child) && child.type === type);
|
|
11378
11218
|
}
|
|
11379
|
-
function
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11219
|
+
function useCol({
|
|
11220
|
+
as,
|
|
11221
|
+
bsPrefix,
|
|
11222
|
+
className,
|
|
11223
|
+
...props
|
|
11224
|
+
}) {
|
|
11225
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "col");
|
|
11226
|
+
const breakpoints = useBootstrapBreakpoints();
|
|
11227
|
+
const minBreakpoint = useBootstrapMinBreakpoint();
|
|
11228
|
+
const spans = [];
|
|
11229
|
+
const classes = [];
|
|
11230
|
+
breakpoints.forEach((brkPoint) => {
|
|
11231
|
+
const propValue = props[brkPoint];
|
|
11232
|
+
delete props[brkPoint];
|
|
11233
|
+
let span;
|
|
11234
|
+
let offset2;
|
|
11235
|
+
let order2;
|
|
11236
|
+
if (typeof propValue === "object" && propValue != null) {
|
|
11237
|
+
({
|
|
11238
|
+
span,
|
|
11239
|
+
offset: offset2,
|
|
11240
|
+
order: order2
|
|
11241
|
+
} = propValue);
|
|
11391
11242
|
} else {
|
|
11392
|
-
|
|
11243
|
+
span = propValue;
|
|
11393
11244
|
}
|
|
11245
|
+
const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : "";
|
|
11246
|
+
if (span) spans.push(span === true ? `${bsPrefix}${infix}` : `${bsPrefix}${infix}-${span}`);
|
|
11247
|
+
if (order2 != null) classes.push(`order${infix}-${order2}`);
|
|
11248
|
+
if (offset2 != null) classes.push(`offset${infix}-${offset2}`);
|
|
11394
11249
|
});
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
function getReactVersion() {
|
|
11404
|
-
const parts = React__namespace.version.split(".");
|
|
11405
|
-
return {
|
|
11406
|
-
major: +parts[0],
|
|
11407
|
-
minor: +parts[1],
|
|
11408
|
-
patch: +parts[2]
|
|
11409
|
-
};
|
|
11250
|
+
return [{
|
|
11251
|
+
...props,
|
|
11252
|
+
className: classNames(className, ...spans, ...classes)
|
|
11253
|
+
}, {
|
|
11254
|
+
as,
|
|
11255
|
+
bsPrefix,
|
|
11256
|
+
spans
|
|
11257
|
+
}];
|
|
11410
11258
|
}
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11259
|
+
const Col = /* @__PURE__ */ React__namespace.forwardRef(
|
|
11260
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11261
|
+
(props, ref) => {
|
|
11262
|
+
const [{
|
|
11263
|
+
className,
|
|
11264
|
+
...colProps
|
|
11265
|
+
}, {
|
|
11266
|
+
as: Component = "div",
|
|
11267
|
+
bsPrefix,
|
|
11268
|
+
spans
|
|
11269
|
+
}] = useCol(props);
|
|
11270
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11271
|
+
...colProps,
|
|
11272
|
+
ref,
|
|
11273
|
+
className: classNames(className, !spans.length && bsPrefix)
|
|
11274
|
+
});
|
|
11414
11275
|
}
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
const canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
11422
|
-
var optionsSupported = false;
|
|
11423
|
-
var onceSupported = false;
|
|
11424
|
-
try {
|
|
11425
|
-
var options = {
|
|
11426
|
-
get passive() {
|
|
11427
|
-
return optionsSupported = true;
|
|
11428
|
-
},
|
|
11429
|
-
get once() {
|
|
11430
|
-
return onceSupported = optionsSupported = true;
|
|
11431
|
-
}
|
|
11432
|
-
};
|
|
11433
|
-
if (canUseDOM) {
|
|
11434
|
-
window.addEventListener("test", options, options);
|
|
11435
|
-
window.removeEventListener("test", options, true);
|
|
11276
|
+
);
|
|
11277
|
+
Col.displayName = "Col";
|
|
11278
|
+
var has = Object.prototype.hasOwnProperty;
|
|
11279
|
+
function find(iter, tar, key) {
|
|
11280
|
+
for (key of iter.keys()) {
|
|
11281
|
+
if (dequal(key, tar)) return key;
|
|
11436
11282
|
}
|
|
11437
|
-
} catch (e) {
|
|
11438
11283
|
}
|
|
11439
|
-
function
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
if (
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11284
|
+
function dequal(foo, bar) {
|
|
11285
|
+
var ctor, len, tmp;
|
|
11286
|
+
if (foo === bar) return true;
|
|
11287
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
11288
|
+
if (ctor === Date) return foo.getTime() === bar.getTime();
|
|
11289
|
+
if (ctor === RegExp) return foo.toString() === bar.toString();
|
|
11290
|
+
if (ctor === Array) {
|
|
11291
|
+
if ((len = foo.length) === bar.length) {
|
|
11292
|
+
while (len-- && dequal(foo[len], bar[len])) ;
|
|
11293
|
+
}
|
|
11294
|
+
return len === -1;
|
|
11295
|
+
}
|
|
11296
|
+
if (ctor === Set) {
|
|
11297
|
+
if (foo.size !== bar.size) {
|
|
11298
|
+
return false;
|
|
11299
|
+
}
|
|
11300
|
+
for (len of foo) {
|
|
11301
|
+
tmp = len;
|
|
11302
|
+
if (tmp && typeof tmp === "object") {
|
|
11303
|
+
tmp = find(bar, tmp);
|
|
11304
|
+
if (!tmp) return false;
|
|
11305
|
+
}
|
|
11306
|
+
if (!bar.has(tmp)) return false;
|
|
11307
|
+
}
|
|
11308
|
+
return true;
|
|
11309
|
+
}
|
|
11310
|
+
if (ctor === Map) {
|
|
11311
|
+
if (foo.size !== bar.size) {
|
|
11312
|
+
return false;
|
|
11313
|
+
}
|
|
11314
|
+
for (len of foo) {
|
|
11315
|
+
tmp = len[0];
|
|
11316
|
+
if (tmp && typeof tmp === "object") {
|
|
11317
|
+
tmp = find(bar, tmp);
|
|
11318
|
+
if (!tmp) return false;
|
|
11319
|
+
}
|
|
11320
|
+
if (!dequal(len[1], bar.get(tmp))) {
|
|
11321
|
+
return false;
|
|
11322
|
+
}
|
|
11323
|
+
}
|
|
11324
|
+
return true;
|
|
11325
|
+
}
|
|
11326
|
+
if (ctor === ArrayBuffer) {
|
|
11327
|
+
foo = new Uint8Array(foo);
|
|
11328
|
+
bar = new Uint8Array(bar);
|
|
11329
|
+
} else if (ctor === DataView) {
|
|
11330
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
11331
|
+
while (len-- && foo.getInt8(len) === bar.getInt8(len)) ;
|
|
11332
|
+
}
|
|
11333
|
+
return len === -1;
|
|
11334
|
+
}
|
|
11335
|
+
if (ArrayBuffer.isView(foo)) {
|
|
11336
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
11337
|
+
while (len-- && foo[len] === bar[len]) ;
|
|
11338
|
+
}
|
|
11339
|
+
return len === -1;
|
|
11340
|
+
}
|
|
11341
|
+
if (!ctor || typeof foo === "object") {
|
|
11342
|
+
len = 0;
|
|
11343
|
+
for (ctor in foo) {
|
|
11344
|
+
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
|
11345
|
+
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
|
11346
|
+
}
|
|
11347
|
+
return Object.keys(bar).length === len;
|
|
11449
11348
|
}
|
|
11450
|
-
node.addEventListener(eventName, wrappedHandler, optionsSupported ? options2 : capture);
|
|
11451
|
-
}
|
|
11452
|
-
node.addEventListener(eventName, handler, options2);
|
|
11453
|
-
}
|
|
11454
|
-
function removeEventListener(node, eventName, handler, options2) {
|
|
11455
|
-
var capture = options2 && typeof options2 !== "boolean" ? options2.capture : options2;
|
|
11456
|
-
node.removeEventListener(eventName, handler, capture);
|
|
11457
|
-
if (handler.__once) {
|
|
11458
|
-
node.removeEventListener(eventName, handler.__once, capture);
|
|
11459
|
-
}
|
|
11460
|
-
}
|
|
11461
|
-
function listen(node, eventName, handler, options2) {
|
|
11462
|
-
addEventListener(node, eventName, handler, options2);
|
|
11463
|
-
return function() {
|
|
11464
|
-
removeEventListener(node, eventName, handler, options2);
|
|
11465
|
-
};
|
|
11466
|
-
}
|
|
11467
|
-
function triggerEvent(node, eventName, bubbles, cancelable) {
|
|
11468
|
-
if (cancelable === void 0) {
|
|
11469
|
-
cancelable = true;
|
|
11470
|
-
}
|
|
11471
|
-
if (node) {
|
|
11472
|
-
var event = document.createEvent("HTMLEvents");
|
|
11473
|
-
event.initEvent(eventName, bubbles, cancelable);
|
|
11474
|
-
node.dispatchEvent(event);
|
|
11475
11349
|
}
|
|
11350
|
+
return foo !== foo && bar !== bar;
|
|
11476
11351
|
}
|
|
11477
|
-
function
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11352
|
+
function useSafeState(state) {
|
|
11353
|
+
const isMounted = useMounted$1();
|
|
11354
|
+
return [state[0], React.useCallback((nextState) => {
|
|
11355
|
+
if (!isMounted()) return;
|
|
11356
|
+
return state[1](nextState);
|
|
11357
|
+
}, [isMounted, state[1]])];
|
|
11481
11358
|
}
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11359
|
+
const createPopper = popperGenerator({
|
|
11360
|
+
defaultModifiers: [hide$1, popperOffsets$1, computeStyles$1, eventListeners, offset$1, flip$1, preventOverflow$1, arrow$1]
|
|
11361
|
+
});
|
|
11362
|
+
const _excluded$2 = ["enabled", "placement", "strategy", "modifiers"];
|
|
11363
|
+
function _objectWithoutPropertiesLoose$2(r2, e) {
|
|
11364
|
+
if (null == r2) return {};
|
|
11365
|
+
var t = {};
|
|
11366
|
+
for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
|
|
11367
|
+
if (e.indexOf(n) >= 0) continue;
|
|
11368
|
+
t[n] = r2[n];
|
|
11485
11369
|
}
|
|
11486
|
-
|
|
11487
|
-
var handle = setTimeout(function() {
|
|
11488
|
-
if (!called) triggerEvent(element, "transitionend", true);
|
|
11489
|
-
}, duration2 + padding2);
|
|
11490
|
-
var remove = listen(element, "transitionend", function() {
|
|
11491
|
-
called = true;
|
|
11492
|
-
}, {
|
|
11493
|
-
once: true
|
|
11494
|
-
});
|
|
11495
|
-
return function() {
|
|
11496
|
-
clearTimeout(handle);
|
|
11497
|
-
remove();
|
|
11498
|
-
};
|
|
11499
|
-
}
|
|
11500
|
-
function transitionEnd(element, handler, duration2, padding2) {
|
|
11501
|
-
if (duration2 == null) duration2 = parseDuration$1(element) || 0;
|
|
11502
|
-
var removeEmulate = emulateTransitionEnd(element, duration2, padding2);
|
|
11503
|
-
var remove = listen(element, "transitionend", handler);
|
|
11504
|
-
return function() {
|
|
11505
|
-
removeEmulate();
|
|
11506
|
-
remove();
|
|
11507
|
-
};
|
|
11508
|
-
}
|
|
11509
|
-
function parseDuration(node, property) {
|
|
11510
|
-
const str = style(node, property) || "";
|
|
11511
|
-
const mult = str.indexOf("ms") === -1 ? 1e3 : 1;
|
|
11512
|
-
return parseFloat(str) * mult;
|
|
11513
|
-
}
|
|
11514
|
-
function transitionEndListener(element, handler) {
|
|
11515
|
-
const duration2 = parseDuration(element, "transitionDuration");
|
|
11516
|
-
const delay = parseDuration(element, "transitionDelay");
|
|
11517
|
-
const remove = transitionEnd(element, (e) => {
|
|
11518
|
-
if (e.target === element) {
|
|
11519
|
-
remove();
|
|
11520
|
-
handler(e);
|
|
11521
|
-
}
|
|
11522
|
-
}, duration2 + delay);
|
|
11523
|
-
}
|
|
11524
|
-
function triggerBrowserReflow(node) {
|
|
11525
|
-
node.offsetHeight;
|
|
11370
|
+
return t;
|
|
11526
11371
|
}
|
|
11527
|
-
const
|
|
11528
|
-
|
|
11372
|
+
const disabledApplyStylesModifier = {
|
|
11373
|
+
name: "applyStyles",
|
|
11374
|
+
enabled: false,
|
|
11375
|
+
phase: "afterWrite",
|
|
11376
|
+
fn: () => void 0
|
|
11529
11377
|
};
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
}
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11378
|
+
const ariaDescribedByModifier = {
|
|
11379
|
+
name: "ariaDescribedBy",
|
|
11380
|
+
enabled: true,
|
|
11381
|
+
phase: "afterWrite",
|
|
11382
|
+
effect: ({
|
|
11383
|
+
state
|
|
11384
|
+
}) => () => {
|
|
11385
|
+
const {
|
|
11386
|
+
reference: reference2,
|
|
11387
|
+
popper: popper2
|
|
11388
|
+
} = state.elements;
|
|
11389
|
+
if ("removeAttribute" in reference2) {
|
|
11390
|
+
const ids = (reference2.getAttribute("aria-describedby") || "").split(",").filter((id) => id.trim() !== popper2.id);
|
|
11391
|
+
if (!ids.length) reference2.removeAttribute("aria-describedby");
|
|
11392
|
+
else reference2.setAttribute("aria-describedby", ids.join(","));
|
|
11393
|
+
}
|
|
11394
|
+
},
|
|
11395
|
+
fn: ({
|
|
11396
|
+
state
|
|
11397
|
+
}) => {
|
|
11398
|
+
var _popper$getAttribute;
|
|
11399
|
+
const {
|
|
11400
|
+
popper: popper2,
|
|
11401
|
+
reference: reference2
|
|
11402
|
+
} = state.elements;
|
|
11403
|
+
const role = (_popper$getAttribute = popper2.getAttribute("role")) == null ? void 0 : _popper$getAttribute.toLowerCase();
|
|
11404
|
+
if (popper2.id && role === "tooltip" && "setAttribute" in reference2) {
|
|
11405
|
+
const ids = reference2.getAttribute("aria-describedby");
|
|
11406
|
+
if (ids && ids.split(",").indexOf(popper2.id) !== -1) {
|
|
11407
|
+
return;
|
|
11408
|
+
}
|
|
11409
|
+
reference2.setAttribute("aria-describedby", ids ? `${ids},${popper2.id}` : popper2.id);
|
|
11410
|
+
}
|
|
11544
11411
|
}
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
const
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
};
|
|
11564
|
-
const
|
|
11565
|
-
|
|
11566
|
-
|
|
11412
|
+
};
|
|
11413
|
+
const EMPTY_MODIFIERS = [];
|
|
11414
|
+
function usePopper(referenceElement, popperElement, _ref = {}) {
|
|
11415
|
+
let {
|
|
11416
|
+
enabled = true,
|
|
11417
|
+
placement = "bottom",
|
|
11418
|
+
strategy = "absolute",
|
|
11419
|
+
modifiers = EMPTY_MODIFIERS
|
|
11420
|
+
} = _ref, config2 = _objectWithoutPropertiesLoose$2(_ref, _excluded$2);
|
|
11421
|
+
const prevModifiers = React.useRef(modifiers);
|
|
11422
|
+
const popperInstanceRef = React.useRef();
|
|
11423
|
+
const update = React.useCallback(() => {
|
|
11424
|
+
var _popperInstanceRef$cu;
|
|
11425
|
+
(_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();
|
|
11426
|
+
}, []);
|
|
11427
|
+
const forceUpdate = React.useCallback(() => {
|
|
11428
|
+
var _popperInstanceRef$cu2;
|
|
11429
|
+
(_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();
|
|
11430
|
+
}, []);
|
|
11431
|
+
const [popperState, setState] = useSafeState(React.useState({
|
|
11432
|
+
placement,
|
|
11433
|
+
update,
|
|
11434
|
+
forceUpdate,
|
|
11435
|
+
attributes: {},
|
|
11436
|
+
styles: {
|
|
11437
|
+
popper: {},
|
|
11438
|
+
arrow: {}
|
|
11567
11439
|
}
|
|
11568
|
-
};
|
|
11569
|
-
const
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
function useCommittedRef$1(value) {
|
|
11600
|
-
const ref = React.useRef(value);
|
|
11601
|
-
React.useEffect(() => {
|
|
11602
|
-
ref.current = value;
|
|
11603
|
-
}, [value]);
|
|
11604
|
-
return ref;
|
|
11605
|
-
}
|
|
11606
|
-
function useEventCallback$1(fn) {
|
|
11607
|
-
const ref = useCommittedRef$1(fn);
|
|
11608
|
-
return React.useCallback(function(...args) {
|
|
11609
|
-
return ref.current && ref.current(...args);
|
|
11610
|
-
}, [ref]);
|
|
11611
|
-
}
|
|
11612
|
-
function useCallbackRef() {
|
|
11613
|
-
return React.useState(null);
|
|
11614
|
-
}
|
|
11615
|
-
function useCommittedRef(value) {
|
|
11616
|
-
const ref = React.useRef(value);
|
|
11617
|
-
React.useEffect(() => {
|
|
11618
|
-
ref.current = value;
|
|
11619
|
-
}, [value]);
|
|
11620
|
-
return ref;
|
|
11621
|
-
}
|
|
11622
|
-
function useEventCallback(fn) {
|
|
11623
|
-
const ref = useCommittedRef(fn);
|
|
11624
|
-
return React.useCallback(function(...args) {
|
|
11625
|
-
return ref.current && ref.current(...args);
|
|
11626
|
-
}, [ref]);
|
|
11627
|
-
}
|
|
11628
|
-
function useMounted$1() {
|
|
11629
|
-
const mounted = React.useRef(true);
|
|
11630
|
-
const isMounted = React.useRef(() => mounted.current);
|
|
11440
|
+
}));
|
|
11441
|
+
const updateModifier = React.useMemo(() => ({
|
|
11442
|
+
name: "updateStateModifier",
|
|
11443
|
+
enabled: true,
|
|
11444
|
+
phase: "write",
|
|
11445
|
+
requires: ["computeStyles"],
|
|
11446
|
+
fn: ({
|
|
11447
|
+
state
|
|
11448
|
+
}) => {
|
|
11449
|
+
const styles = {};
|
|
11450
|
+
const attributes = {};
|
|
11451
|
+
Object.keys(state.elements).forEach((element) => {
|
|
11452
|
+
styles[element] = state.styles[element];
|
|
11453
|
+
attributes[element] = state.attributes[element];
|
|
11454
|
+
});
|
|
11455
|
+
setState({
|
|
11456
|
+
state,
|
|
11457
|
+
styles,
|
|
11458
|
+
attributes,
|
|
11459
|
+
update,
|
|
11460
|
+
forceUpdate,
|
|
11461
|
+
placement: state.placement
|
|
11462
|
+
});
|
|
11463
|
+
}
|
|
11464
|
+
}), [update, forceUpdate, setState]);
|
|
11465
|
+
const nextModifiers = React.useMemo(() => {
|
|
11466
|
+
if (!dequal(prevModifiers.current, modifiers)) {
|
|
11467
|
+
prevModifiers.current = modifiers;
|
|
11468
|
+
}
|
|
11469
|
+
return prevModifiers.current;
|
|
11470
|
+
}, [modifiers]);
|
|
11631
11471
|
React.useEffect(() => {
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
const isReactNative$1 = typeof global !== "undefined" && // @ts-ignore
|
|
11640
|
-
global.navigator && // @ts-ignore
|
|
11641
|
-
global.navigator.product === "ReactNative";
|
|
11642
|
-
const isDOM$1 = typeof document !== "undefined";
|
|
11643
|
-
const useIsomorphicEffect$1 = isDOM$1 || isReactNative$1 ? React.useLayoutEffect : React.useEffect;
|
|
11644
|
-
const fadeStyles = {
|
|
11645
|
-
[ENTERING]: "show",
|
|
11646
|
-
[ENTERED]: "show"
|
|
11647
|
-
};
|
|
11648
|
-
const Fade = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11649
|
-
className,
|
|
11650
|
-
children,
|
|
11651
|
-
transitionClasses = {},
|
|
11652
|
-
onEnter,
|
|
11653
|
-
...rest
|
|
11654
|
-
}, ref) => {
|
|
11655
|
-
const props = {
|
|
11656
|
-
in: false,
|
|
11657
|
-
timeout: 300,
|
|
11658
|
-
mountOnEnter: false,
|
|
11659
|
-
unmountOnExit: false,
|
|
11660
|
-
appear: false,
|
|
11661
|
-
...rest
|
|
11662
|
-
};
|
|
11663
|
-
const handleEnter = React.useCallback((node, isAppearing) => {
|
|
11664
|
-
triggerBrowserReflow(node);
|
|
11665
|
-
onEnter == null || onEnter(node, isAppearing);
|
|
11666
|
-
}, [onEnter]);
|
|
11667
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionWrapper, {
|
|
11668
|
-
ref,
|
|
11669
|
-
addEndListener: transitionEndListener,
|
|
11670
|
-
...props,
|
|
11671
|
-
onEnter: handleEnter,
|
|
11672
|
-
childRef: getChildRef(children),
|
|
11673
|
-
children: (status, innerProps) => /* @__PURE__ */ React__namespace.cloneElement(children, {
|
|
11674
|
-
...innerProps,
|
|
11675
|
-
className: classNames("fade", className, children.props.className, fadeStyles[status], transitionClasses[status])
|
|
11676
|
-
})
|
|
11677
|
-
});
|
|
11678
|
-
});
|
|
11679
|
-
Fade.displayName = "Fade";
|
|
11680
|
-
function useMounted() {
|
|
11681
|
-
const mounted = React.useRef(true);
|
|
11682
|
-
const isMounted = React.useRef(() => mounted.current);
|
|
11472
|
+
if (!popperInstanceRef.current || !enabled) return;
|
|
11473
|
+
popperInstanceRef.current.setOptions({
|
|
11474
|
+
placement,
|
|
11475
|
+
strategy,
|
|
11476
|
+
modifiers: [...nextModifiers, updateModifier, disabledApplyStylesModifier]
|
|
11477
|
+
});
|
|
11478
|
+
}, [strategy, placement, updateModifier, enabled, nextModifiers]);
|
|
11683
11479
|
React.useEffect(() => {
|
|
11684
|
-
|
|
11480
|
+
if (!enabled || referenceElement == null || popperElement == null) {
|
|
11481
|
+
return void 0;
|
|
11482
|
+
}
|
|
11483
|
+
popperInstanceRef.current = createPopper(referenceElement, popperElement, Object.assign({}, config2, {
|
|
11484
|
+
placement,
|
|
11485
|
+
strategy,
|
|
11486
|
+
modifiers: [...nextModifiers, ariaDescribedByModifier, updateModifier]
|
|
11487
|
+
}));
|
|
11685
11488
|
return () => {
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
}
|
|
11696
|
-
function useWillUnmount(fn) {
|
|
11697
|
-
const onUnmount = useUpdatedRef(fn);
|
|
11698
|
-
React.useEffect(() => () => onUnmount.current(), []);
|
|
11699
|
-
}
|
|
11700
|
-
const MAX_DELAY_MS = 2 ** 31 - 1;
|
|
11701
|
-
function setChainedTimeout(handleRef, fn, timeoutAtMs) {
|
|
11702
|
-
const delayMs = timeoutAtMs - Date.now();
|
|
11703
|
-
handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(() => setChainedTimeout(handleRef, fn, timeoutAtMs), MAX_DELAY_MS);
|
|
11704
|
-
}
|
|
11705
|
-
function useTimeout() {
|
|
11706
|
-
const isMounted = useMounted();
|
|
11707
|
-
const handleRef = React.useRef();
|
|
11708
|
-
useWillUnmount(() => clearTimeout(handleRef.current));
|
|
11709
|
-
return React.useMemo(() => {
|
|
11710
|
-
const clear = () => clearTimeout(handleRef.current);
|
|
11711
|
-
function set(fn, delayMs = 0) {
|
|
11712
|
-
if (!isMounted()) return;
|
|
11713
|
-
clear();
|
|
11714
|
-
if (delayMs <= MAX_DELAY_MS) {
|
|
11715
|
-
handleRef.current = setTimeout(fn, delayMs);
|
|
11716
|
-
} else {
|
|
11717
|
-
setChainedTimeout(handleRef, fn, Date.now() + delayMs);
|
|
11489
|
+
if (popperInstanceRef.current != null) {
|
|
11490
|
+
popperInstanceRef.current.destroy();
|
|
11491
|
+
popperInstanceRef.current = void 0;
|
|
11492
|
+
setState((s) => Object.assign({}, s, {
|
|
11493
|
+
attributes: {},
|
|
11494
|
+
styles: {
|
|
11495
|
+
popper: {}
|
|
11496
|
+
}
|
|
11497
|
+
}));
|
|
11718
11498
|
}
|
|
11719
|
-
}
|
|
11720
|
-
return {
|
|
11721
|
-
set,
|
|
11722
|
-
clear,
|
|
11723
|
-
handleRef
|
|
11724
11499
|
};
|
|
11725
|
-
}, []);
|
|
11500
|
+
}, [enabled, referenceElement, popperElement]);
|
|
11501
|
+
return popperState;
|
|
11726
11502
|
}
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
if (dequal(key, tar)) return key;
|
|
11731
|
-
}
|
|
11503
|
+
function contains(context2, node) {
|
|
11504
|
+
if (context2.contains) return context2.contains(node);
|
|
11505
|
+
if (context2.compareDocumentPosition) return context2 === node || !!(context2.compareDocumentPosition(node) & 16);
|
|
11732
11506
|
}
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
if (
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11507
|
+
var warning_1;
|
|
11508
|
+
var hasRequiredWarning;
|
|
11509
|
+
function requireWarning() {
|
|
11510
|
+
if (hasRequiredWarning) return warning_1;
|
|
11511
|
+
hasRequiredWarning = 1;
|
|
11512
|
+
var __DEV__ = process.env.NODE_ENV !== "production";
|
|
11513
|
+
var warning2 = function() {
|
|
11514
|
+
};
|
|
11515
|
+
if (__DEV__) {
|
|
11516
|
+
var printWarning = function printWarning2(format, args) {
|
|
11517
|
+
var len = arguments.length;
|
|
11518
|
+
args = new Array(len > 1 ? len - 1 : 0);
|
|
11519
|
+
for (var key = 1; key < len; key++) {
|
|
11520
|
+
args[key - 1] = arguments[key];
|
|
11742
11521
|
}
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11522
|
+
var argIndex = 0;
|
|
11523
|
+
var message = "Warning: " + format.replace(/%s/g, function() {
|
|
11524
|
+
return args[argIndex++];
|
|
11525
|
+
});
|
|
11526
|
+
if (typeof console !== "undefined") {
|
|
11527
|
+
console.error(message);
|
|
11748
11528
|
}
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
tmp = find(bar, tmp);
|
|
11753
|
-
if (!tmp) return false;
|
|
11754
|
-
}
|
|
11755
|
-
if (!bar.has(tmp)) return false;
|
|
11529
|
+
try {
|
|
11530
|
+
throw new Error(message);
|
|
11531
|
+
} catch (x) {
|
|
11756
11532
|
}
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11533
|
+
};
|
|
11534
|
+
warning2 = function(condition, format, args) {
|
|
11535
|
+
var len = arguments.length;
|
|
11536
|
+
args = new Array(len > 2 ? len - 2 : 0);
|
|
11537
|
+
for (var key = 2; key < len; key++) {
|
|
11538
|
+
args[key - 2] = arguments[key];
|
|
11762
11539
|
}
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
if (!tmp) return false;
|
|
11768
|
-
}
|
|
11769
|
-
if (!dequal(len[1], bar.get(tmp))) {
|
|
11770
|
-
return false;
|
|
11771
|
-
}
|
|
11540
|
+
if (format === void 0) {
|
|
11541
|
+
throw new Error(
|
|
11542
|
+
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
11543
|
+
);
|
|
11772
11544
|
}
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
if (ctor === ArrayBuffer) {
|
|
11776
|
-
foo = new Uint8Array(foo);
|
|
11777
|
-
bar = new Uint8Array(bar);
|
|
11778
|
-
} else if (ctor === DataView) {
|
|
11779
|
-
if ((len = foo.byteLength) === bar.byteLength) {
|
|
11780
|
-
while (len-- && foo.getInt8(len) === bar.getInt8(len)) ;
|
|
11781
|
-
}
|
|
11782
|
-
return len === -1;
|
|
11783
|
-
}
|
|
11784
|
-
if (ArrayBuffer.isView(foo)) {
|
|
11785
|
-
if ((len = foo.byteLength) === bar.byteLength) {
|
|
11786
|
-
while (len-- && foo[len] === bar[len]) ;
|
|
11787
|
-
}
|
|
11788
|
-
return len === -1;
|
|
11789
|
-
}
|
|
11790
|
-
if (!ctor || typeof foo === "object") {
|
|
11791
|
-
len = 0;
|
|
11792
|
-
for (ctor in foo) {
|
|
11793
|
-
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
|
11794
|
-
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
|
11795
|
-
}
|
|
11796
|
-
return Object.keys(bar).length === len;
|
|
11797
|
-
}
|
|
11798
|
-
}
|
|
11799
|
-
return foo !== foo && bar !== bar;
|
|
11800
|
-
}
|
|
11801
|
-
function useSafeState(state) {
|
|
11802
|
-
const isMounted = useMounted$1();
|
|
11803
|
-
return [state[0], React.useCallback((nextState) => {
|
|
11804
|
-
if (!isMounted()) return;
|
|
11805
|
-
return state[1](nextState);
|
|
11806
|
-
}, [isMounted, state[1]])];
|
|
11807
|
-
}
|
|
11808
|
-
const createPopper = popperGenerator({
|
|
11809
|
-
defaultModifiers: [hide$1, popperOffsets$1, computeStyles$1, eventListeners, offset$1, flip$1, preventOverflow$1, arrow$1]
|
|
11810
|
-
});
|
|
11811
|
-
const _excluded$2 = ["enabled", "placement", "strategy", "modifiers"];
|
|
11812
|
-
function _objectWithoutPropertiesLoose$2(r2, e) {
|
|
11813
|
-
if (null == r2) return {};
|
|
11814
|
-
var t = {};
|
|
11815
|
-
for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
|
|
11816
|
-
if (e.indexOf(n) >= 0) continue;
|
|
11817
|
-
t[n] = r2[n];
|
|
11818
|
-
}
|
|
11819
|
-
return t;
|
|
11820
|
-
}
|
|
11821
|
-
const disabledApplyStylesModifier = {
|
|
11822
|
-
name: "applyStyles",
|
|
11823
|
-
enabled: false,
|
|
11824
|
-
phase: "afterWrite",
|
|
11825
|
-
fn: () => void 0
|
|
11826
|
-
};
|
|
11827
|
-
const ariaDescribedByModifier = {
|
|
11828
|
-
name: "ariaDescribedBy",
|
|
11829
|
-
enabled: true,
|
|
11830
|
-
phase: "afterWrite",
|
|
11831
|
-
effect: ({
|
|
11832
|
-
state
|
|
11833
|
-
}) => () => {
|
|
11834
|
-
const {
|
|
11835
|
-
reference: reference2,
|
|
11836
|
-
popper: popper2
|
|
11837
|
-
} = state.elements;
|
|
11838
|
-
if ("removeAttribute" in reference2) {
|
|
11839
|
-
const ids = (reference2.getAttribute("aria-describedby") || "").split(",").filter((id) => id.trim() !== popper2.id);
|
|
11840
|
-
if (!ids.length) reference2.removeAttribute("aria-describedby");
|
|
11841
|
-
else reference2.setAttribute("aria-describedby", ids.join(","));
|
|
11842
|
-
}
|
|
11843
|
-
},
|
|
11844
|
-
fn: ({
|
|
11845
|
-
state
|
|
11846
|
-
}) => {
|
|
11847
|
-
var _popper$getAttribute;
|
|
11848
|
-
const {
|
|
11849
|
-
popper: popper2,
|
|
11850
|
-
reference: reference2
|
|
11851
|
-
} = state.elements;
|
|
11852
|
-
const role = (_popper$getAttribute = popper2.getAttribute("role")) == null ? void 0 : _popper$getAttribute.toLowerCase();
|
|
11853
|
-
if (popper2.id && role === "tooltip" && "setAttribute" in reference2) {
|
|
11854
|
-
const ids = reference2.getAttribute("aria-describedby");
|
|
11855
|
-
if (ids && ids.split(",").indexOf(popper2.id) !== -1) {
|
|
11856
|
-
return;
|
|
11857
|
-
}
|
|
11858
|
-
reference2.setAttribute("aria-describedby", ids ? `${ids},${popper2.id}` : popper2.id);
|
|
11859
|
-
}
|
|
11860
|
-
}
|
|
11861
|
-
};
|
|
11862
|
-
const EMPTY_MODIFIERS = [];
|
|
11863
|
-
function usePopper(referenceElement, popperElement, _ref = {}) {
|
|
11864
|
-
let {
|
|
11865
|
-
enabled = true,
|
|
11866
|
-
placement = "bottom",
|
|
11867
|
-
strategy = "absolute",
|
|
11868
|
-
modifiers = EMPTY_MODIFIERS
|
|
11869
|
-
} = _ref, config2 = _objectWithoutPropertiesLoose$2(_ref, _excluded$2);
|
|
11870
|
-
const prevModifiers = React.useRef(modifiers);
|
|
11871
|
-
const popperInstanceRef = React.useRef();
|
|
11872
|
-
const update = React.useCallback(() => {
|
|
11873
|
-
var _popperInstanceRef$cu;
|
|
11874
|
-
(_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();
|
|
11875
|
-
}, []);
|
|
11876
|
-
const forceUpdate = React.useCallback(() => {
|
|
11877
|
-
var _popperInstanceRef$cu2;
|
|
11878
|
-
(_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();
|
|
11879
|
-
}, []);
|
|
11880
|
-
const [popperState, setState] = useSafeState(React.useState({
|
|
11881
|
-
placement,
|
|
11882
|
-
update,
|
|
11883
|
-
forceUpdate,
|
|
11884
|
-
attributes: {},
|
|
11885
|
-
styles: {
|
|
11886
|
-
popper: {},
|
|
11887
|
-
arrow: {}
|
|
11888
|
-
}
|
|
11889
|
-
}));
|
|
11890
|
-
const updateModifier = React.useMemo(() => ({
|
|
11891
|
-
name: "updateStateModifier",
|
|
11892
|
-
enabled: true,
|
|
11893
|
-
phase: "write",
|
|
11894
|
-
requires: ["computeStyles"],
|
|
11895
|
-
fn: ({
|
|
11896
|
-
state
|
|
11897
|
-
}) => {
|
|
11898
|
-
const styles = {};
|
|
11899
|
-
const attributes = {};
|
|
11900
|
-
Object.keys(state.elements).forEach((element) => {
|
|
11901
|
-
styles[element] = state.styles[element];
|
|
11902
|
-
attributes[element] = state.attributes[element];
|
|
11903
|
-
});
|
|
11904
|
-
setState({
|
|
11905
|
-
state,
|
|
11906
|
-
styles,
|
|
11907
|
-
attributes,
|
|
11908
|
-
update,
|
|
11909
|
-
forceUpdate,
|
|
11910
|
-
placement: state.placement
|
|
11911
|
-
});
|
|
11912
|
-
}
|
|
11913
|
-
}), [update, forceUpdate, setState]);
|
|
11914
|
-
const nextModifiers = React.useMemo(() => {
|
|
11915
|
-
if (!dequal(prevModifiers.current, modifiers)) {
|
|
11916
|
-
prevModifiers.current = modifiers;
|
|
11917
|
-
}
|
|
11918
|
-
return prevModifiers.current;
|
|
11919
|
-
}, [modifiers]);
|
|
11920
|
-
React.useEffect(() => {
|
|
11921
|
-
if (!popperInstanceRef.current || !enabled) return;
|
|
11922
|
-
popperInstanceRef.current.setOptions({
|
|
11923
|
-
placement,
|
|
11924
|
-
strategy,
|
|
11925
|
-
modifiers: [...nextModifiers, updateModifier, disabledApplyStylesModifier]
|
|
11926
|
-
});
|
|
11927
|
-
}, [strategy, placement, updateModifier, enabled, nextModifiers]);
|
|
11928
|
-
React.useEffect(() => {
|
|
11929
|
-
if (!enabled || referenceElement == null || popperElement == null) {
|
|
11930
|
-
return void 0;
|
|
11931
|
-
}
|
|
11932
|
-
popperInstanceRef.current = createPopper(referenceElement, popperElement, Object.assign({}, config2, {
|
|
11933
|
-
placement,
|
|
11934
|
-
strategy,
|
|
11935
|
-
modifiers: [...nextModifiers, ariaDescribedByModifier, updateModifier]
|
|
11936
|
-
}));
|
|
11937
|
-
return () => {
|
|
11938
|
-
if (popperInstanceRef.current != null) {
|
|
11939
|
-
popperInstanceRef.current.destroy();
|
|
11940
|
-
popperInstanceRef.current = void 0;
|
|
11941
|
-
setState((s) => Object.assign({}, s, {
|
|
11942
|
-
attributes: {},
|
|
11943
|
-
styles: {
|
|
11944
|
-
popper: {}
|
|
11945
|
-
}
|
|
11946
|
-
}));
|
|
11545
|
+
if (!condition) {
|
|
11546
|
+
printWarning.apply(null, [format].concat(args));
|
|
11947
11547
|
}
|
|
11948
11548
|
};
|
|
11949
|
-
}
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
function contains(context2, node) {
|
|
11953
|
-
if (context2.contains) return context2.contains(node);
|
|
11954
|
-
if (context2.compareDocumentPosition) return context2 === node || !!(context2.compareDocumentPosition(node) & 16);
|
|
11549
|
+
}
|
|
11550
|
+
warning_1 = warning2;
|
|
11551
|
+
return warning_1;
|
|
11955
11552
|
}
|
|
11553
|
+
var warningExports = requireWarning();
|
|
11554
|
+
const warning = /* @__PURE__ */ getDefaultExportFromCjs(warningExports);
|
|
11956
11555
|
const noop$1 = () => {
|
|
11957
11556
|
};
|
|
11958
11557
|
function isLeftClickEvent(event) {
|
|
@@ -12095,6 +11694,372 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
12095
11694
|
const useIsomorphicEffect = isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
|
|
12096
11695
|
const context = /* @__PURE__ */ React__namespace.createContext(null);
|
|
12097
11696
|
context.displayName = "InputGroupContext";
|
|
11697
|
+
const propTypes$1 = {
|
|
11698
|
+
/**
|
|
11699
|
+
* Specify whether the feedback is for valid or invalid fields
|
|
11700
|
+
*
|
|
11701
|
+
* @type {('valid'|'invalid')}
|
|
11702
|
+
*/
|
|
11703
|
+
type: PropTypes.string,
|
|
11704
|
+
/** Display feedback as a tooltip. */
|
|
11705
|
+
tooltip: PropTypes.bool,
|
|
11706
|
+
as: PropTypes.elementType
|
|
11707
|
+
};
|
|
11708
|
+
const Feedback = /* @__PURE__ */ React__namespace.forwardRef(
|
|
11709
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11710
|
+
({
|
|
11711
|
+
as: Component = "div",
|
|
11712
|
+
className,
|
|
11713
|
+
type = "valid",
|
|
11714
|
+
tooltip = false,
|
|
11715
|
+
...props
|
|
11716
|
+
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11717
|
+
...props,
|
|
11718
|
+
ref,
|
|
11719
|
+
className: classNames(className, `${type}-${tooltip ? "tooltip" : "feedback"}`)
|
|
11720
|
+
})
|
|
11721
|
+
);
|
|
11722
|
+
Feedback.displayName = "Feedback";
|
|
11723
|
+
Feedback.propTypes = propTypes$1;
|
|
11724
|
+
const FormContext = /* @__PURE__ */ React__namespace.createContext({});
|
|
11725
|
+
const FormCheckInput = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11726
|
+
id,
|
|
11727
|
+
bsPrefix,
|
|
11728
|
+
className,
|
|
11729
|
+
type = "checkbox",
|
|
11730
|
+
isValid = false,
|
|
11731
|
+
isInvalid = false,
|
|
11732
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11733
|
+
as: Component = "input",
|
|
11734
|
+
...props
|
|
11735
|
+
}, ref) => {
|
|
11736
|
+
const {
|
|
11737
|
+
controlId
|
|
11738
|
+
} = React.useContext(FormContext);
|
|
11739
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-check-input");
|
|
11740
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11741
|
+
...props,
|
|
11742
|
+
ref,
|
|
11743
|
+
type,
|
|
11744
|
+
id: id || controlId,
|
|
11745
|
+
className: classNames(className, bsPrefix, isValid && "is-valid", isInvalid && "is-invalid")
|
|
11746
|
+
});
|
|
11747
|
+
});
|
|
11748
|
+
FormCheckInput.displayName = "FormCheckInput";
|
|
11749
|
+
const FormCheckLabel = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11750
|
+
bsPrefix,
|
|
11751
|
+
className,
|
|
11752
|
+
htmlFor,
|
|
11753
|
+
...props
|
|
11754
|
+
}, ref) => {
|
|
11755
|
+
const {
|
|
11756
|
+
controlId
|
|
11757
|
+
} = React.useContext(FormContext);
|
|
11758
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-check-label");
|
|
11759
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("label", {
|
|
11760
|
+
...props,
|
|
11761
|
+
ref,
|
|
11762
|
+
htmlFor: htmlFor || controlId,
|
|
11763
|
+
className: classNames(className, bsPrefix)
|
|
11764
|
+
});
|
|
11765
|
+
});
|
|
11766
|
+
FormCheckLabel.displayName = "FormCheckLabel";
|
|
11767
|
+
const FormCheck = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11768
|
+
id,
|
|
11769
|
+
bsPrefix,
|
|
11770
|
+
bsSwitchPrefix,
|
|
11771
|
+
inline = false,
|
|
11772
|
+
reverse = false,
|
|
11773
|
+
disabled = false,
|
|
11774
|
+
isValid = false,
|
|
11775
|
+
isInvalid = false,
|
|
11776
|
+
feedbackTooltip = false,
|
|
11777
|
+
feedback,
|
|
11778
|
+
feedbackType,
|
|
11779
|
+
className,
|
|
11780
|
+
style: style2,
|
|
11781
|
+
title = "",
|
|
11782
|
+
type = "checkbox",
|
|
11783
|
+
label,
|
|
11784
|
+
children,
|
|
11785
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11786
|
+
as = "input",
|
|
11787
|
+
...props
|
|
11788
|
+
}, ref) => {
|
|
11789
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-check");
|
|
11790
|
+
bsSwitchPrefix = useBootstrapPrefix(bsSwitchPrefix, "form-switch");
|
|
11791
|
+
const {
|
|
11792
|
+
controlId
|
|
11793
|
+
} = React.useContext(FormContext);
|
|
11794
|
+
const innerFormContext = React.useMemo(() => ({
|
|
11795
|
+
controlId: id || controlId
|
|
11796
|
+
}), [controlId, id]);
|
|
11797
|
+
const hasLabel = !children && label != null && label !== false || hasChildOfType(children, FormCheckLabel);
|
|
11798
|
+
const input = /* @__PURE__ */ jsxRuntimeExports.jsx(FormCheckInput, {
|
|
11799
|
+
...props,
|
|
11800
|
+
type: type === "switch" ? "checkbox" : type,
|
|
11801
|
+
ref,
|
|
11802
|
+
isValid,
|
|
11803
|
+
isInvalid,
|
|
11804
|
+
disabled,
|
|
11805
|
+
as
|
|
11806
|
+
});
|
|
11807
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormContext.Provider, {
|
|
11808
|
+
value: innerFormContext,
|
|
11809
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11810
|
+
style: style2,
|
|
11811
|
+
className: classNames(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === "switch" && bsSwitchPrefix),
|
|
11812
|
+
children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
11813
|
+
children: [input, hasLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(FormCheckLabel, {
|
|
11814
|
+
title,
|
|
11815
|
+
children: label
|
|
11816
|
+
}), feedback && /* @__PURE__ */ jsxRuntimeExports.jsx(Feedback, {
|
|
11817
|
+
type: feedbackType,
|
|
11818
|
+
tooltip: feedbackTooltip,
|
|
11819
|
+
children: feedback
|
|
11820
|
+
})]
|
|
11821
|
+
})
|
|
11822
|
+
})
|
|
11823
|
+
});
|
|
11824
|
+
});
|
|
11825
|
+
FormCheck.displayName = "FormCheck";
|
|
11826
|
+
const FormCheck$1 = Object.assign(FormCheck, {
|
|
11827
|
+
Input: FormCheckInput,
|
|
11828
|
+
Label: FormCheckLabel
|
|
11829
|
+
});
|
|
11830
|
+
const FormControl = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11831
|
+
bsPrefix,
|
|
11832
|
+
type,
|
|
11833
|
+
size,
|
|
11834
|
+
htmlSize,
|
|
11835
|
+
id,
|
|
11836
|
+
className,
|
|
11837
|
+
isValid = false,
|
|
11838
|
+
isInvalid = false,
|
|
11839
|
+
plaintext,
|
|
11840
|
+
readOnly,
|
|
11841
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11842
|
+
as: Component = "input",
|
|
11843
|
+
...props
|
|
11844
|
+
}, ref) => {
|
|
11845
|
+
const {
|
|
11846
|
+
controlId
|
|
11847
|
+
} = React.useContext(FormContext);
|
|
11848
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-control");
|
|
11849
|
+
process.env.NODE_ENV !== "production" ? warning(controlId == null || !id, "`controlId` is ignored on `<FormControl>` when `id` is specified.") : void 0;
|
|
11850
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11851
|
+
...props,
|
|
11852
|
+
type,
|
|
11853
|
+
size: htmlSize,
|
|
11854
|
+
ref,
|
|
11855
|
+
readOnly,
|
|
11856
|
+
id: id || controlId,
|
|
11857
|
+
className: classNames(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === "color" && `${bsPrefix}-color`, isValid && "is-valid", isInvalid && "is-invalid")
|
|
11858
|
+
});
|
|
11859
|
+
});
|
|
11860
|
+
FormControl.displayName = "FormControl";
|
|
11861
|
+
const FormControl$1 = Object.assign(FormControl, {
|
|
11862
|
+
Feedback
|
|
11863
|
+
});
|
|
11864
|
+
const FormFloating = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11865
|
+
className,
|
|
11866
|
+
bsPrefix,
|
|
11867
|
+
as: Component = "div",
|
|
11868
|
+
...props
|
|
11869
|
+
}, ref) => {
|
|
11870
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-floating");
|
|
11871
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11872
|
+
ref,
|
|
11873
|
+
className: classNames(className, bsPrefix),
|
|
11874
|
+
...props
|
|
11875
|
+
});
|
|
11876
|
+
});
|
|
11877
|
+
FormFloating.displayName = "FormFloating";
|
|
11878
|
+
const FormGroup = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11879
|
+
controlId,
|
|
11880
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11881
|
+
as: Component = "div",
|
|
11882
|
+
...props
|
|
11883
|
+
}, ref) => {
|
|
11884
|
+
const context2 = React.useMemo(() => ({
|
|
11885
|
+
controlId
|
|
11886
|
+
}), [controlId]);
|
|
11887
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormContext.Provider, {
|
|
11888
|
+
value: context2,
|
|
11889
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11890
|
+
...props,
|
|
11891
|
+
ref
|
|
11892
|
+
})
|
|
11893
|
+
});
|
|
11894
|
+
});
|
|
11895
|
+
FormGroup.displayName = "FormGroup";
|
|
11896
|
+
const FormLabel = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11897
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11898
|
+
as: Component = "label",
|
|
11899
|
+
bsPrefix,
|
|
11900
|
+
column = false,
|
|
11901
|
+
visuallyHidden = false,
|
|
11902
|
+
className,
|
|
11903
|
+
htmlFor,
|
|
11904
|
+
...props
|
|
11905
|
+
}, ref) => {
|
|
11906
|
+
const {
|
|
11907
|
+
controlId
|
|
11908
|
+
} = React.useContext(FormContext);
|
|
11909
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-label");
|
|
11910
|
+
let columnClass = "col-form-label";
|
|
11911
|
+
if (typeof column === "string") columnClass = `${columnClass} ${columnClass}-${column}`;
|
|
11912
|
+
const classes = classNames(className, bsPrefix, visuallyHidden && "visually-hidden", column && columnClass);
|
|
11913
|
+
process.env.NODE_ENV !== "production" ? warning(controlId == null || !htmlFor, "`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified.") : void 0;
|
|
11914
|
+
htmlFor = htmlFor || controlId;
|
|
11915
|
+
if (column) return /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
|
|
11916
|
+
ref,
|
|
11917
|
+
as: "label",
|
|
11918
|
+
className: classes,
|
|
11919
|
+
htmlFor,
|
|
11920
|
+
...props
|
|
11921
|
+
});
|
|
11922
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11923
|
+
ref,
|
|
11924
|
+
className: classes,
|
|
11925
|
+
htmlFor,
|
|
11926
|
+
...props
|
|
11927
|
+
});
|
|
11928
|
+
});
|
|
11929
|
+
FormLabel.displayName = "FormLabel";
|
|
11930
|
+
const FormRange = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11931
|
+
bsPrefix,
|
|
11932
|
+
className,
|
|
11933
|
+
id,
|
|
11934
|
+
...props
|
|
11935
|
+
}, ref) => {
|
|
11936
|
+
const {
|
|
11937
|
+
controlId
|
|
11938
|
+
} = React.useContext(FormContext);
|
|
11939
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-range");
|
|
11940
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("input", {
|
|
11941
|
+
...props,
|
|
11942
|
+
type: "range",
|
|
11943
|
+
ref,
|
|
11944
|
+
className: classNames(className, bsPrefix),
|
|
11945
|
+
id: id || controlId
|
|
11946
|
+
});
|
|
11947
|
+
});
|
|
11948
|
+
FormRange.displayName = "FormRange";
|
|
11949
|
+
const FormSelect = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
11950
|
+
bsPrefix,
|
|
11951
|
+
size,
|
|
11952
|
+
htmlSize,
|
|
11953
|
+
className,
|
|
11954
|
+
isValid = false,
|
|
11955
|
+
isInvalid = false,
|
|
11956
|
+
id,
|
|
11957
|
+
...props
|
|
11958
|
+
}, ref) => {
|
|
11959
|
+
const {
|
|
11960
|
+
controlId
|
|
11961
|
+
} = React.useContext(FormContext);
|
|
11962
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-select");
|
|
11963
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("select", {
|
|
11964
|
+
...props,
|
|
11965
|
+
size: htmlSize,
|
|
11966
|
+
ref,
|
|
11967
|
+
className: classNames(className, bsPrefix, size && `${bsPrefix}-${size}`, isValid && `is-valid`, isInvalid && `is-invalid`),
|
|
11968
|
+
id: id || controlId
|
|
11969
|
+
});
|
|
11970
|
+
});
|
|
11971
|
+
FormSelect.displayName = "FormSelect";
|
|
11972
|
+
const FormText = /* @__PURE__ */ React__namespace.forwardRef(
|
|
11973
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11974
|
+
({
|
|
11975
|
+
bsPrefix,
|
|
11976
|
+
className,
|
|
11977
|
+
as: Component = "small",
|
|
11978
|
+
muted,
|
|
11979
|
+
...props
|
|
11980
|
+
}, ref) => {
|
|
11981
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-text");
|
|
11982
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
11983
|
+
...props,
|
|
11984
|
+
ref,
|
|
11985
|
+
className: classNames(className, bsPrefix, muted && "text-muted")
|
|
11986
|
+
});
|
|
11987
|
+
}
|
|
11988
|
+
);
|
|
11989
|
+
FormText.displayName = "FormText";
|
|
11990
|
+
const Switch = /* @__PURE__ */ React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(FormCheck$1, {
|
|
11991
|
+
...props,
|
|
11992
|
+
ref,
|
|
11993
|
+
type: "switch"
|
|
11994
|
+
}));
|
|
11995
|
+
Switch.displayName = "Switch";
|
|
11996
|
+
const Switch$1 = Object.assign(Switch, {
|
|
11997
|
+
Input: FormCheck$1.Input,
|
|
11998
|
+
Label: FormCheck$1.Label
|
|
11999
|
+
});
|
|
12000
|
+
const FloatingLabel = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
12001
|
+
bsPrefix,
|
|
12002
|
+
className,
|
|
12003
|
+
children,
|
|
12004
|
+
controlId,
|
|
12005
|
+
label,
|
|
12006
|
+
...props
|
|
12007
|
+
}, ref) => {
|
|
12008
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, "form-floating");
|
|
12009
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FormGroup, {
|
|
12010
|
+
ref,
|
|
12011
|
+
className: classNames(className, bsPrefix),
|
|
12012
|
+
controlId,
|
|
12013
|
+
...props,
|
|
12014
|
+
children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx("label", {
|
|
12015
|
+
htmlFor: controlId,
|
|
12016
|
+
children: label
|
|
12017
|
+
})]
|
|
12018
|
+
});
|
|
12019
|
+
});
|
|
12020
|
+
FloatingLabel.displayName = "FloatingLabel";
|
|
12021
|
+
const propTypes = {
|
|
12022
|
+
/**
|
|
12023
|
+
* The Form `ref` will be forwarded to the underlying element,
|
|
12024
|
+
* which means, unless it's rendered `as` a composite component,
|
|
12025
|
+
* it will be a DOM node, when resolved.
|
|
12026
|
+
*
|
|
12027
|
+
* @type {ReactRef}
|
|
12028
|
+
* @alias ref
|
|
12029
|
+
*/
|
|
12030
|
+
_ref: PropTypes.any,
|
|
12031
|
+
/**
|
|
12032
|
+
* Mark a form as having been validated. Setting it to `true` will
|
|
12033
|
+
* toggle any validation styles on the forms elements.
|
|
12034
|
+
*/
|
|
12035
|
+
validated: PropTypes.bool,
|
|
12036
|
+
as: PropTypes.elementType
|
|
12037
|
+
};
|
|
12038
|
+
const Form = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
12039
|
+
className,
|
|
12040
|
+
validated,
|
|
12041
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
12042
|
+
as: Component = "form",
|
|
12043
|
+
...props
|
|
12044
|
+
}, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
|
|
12045
|
+
...props,
|
|
12046
|
+
ref,
|
|
12047
|
+
className: classNames(className, validated && "was-validated")
|
|
12048
|
+
}));
|
|
12049
|
+
Form.displayName = "Form";
|
|
12050
|
+
Form.propTypes = propTypes;
|
|
12051
|
+
const Form$1 = Object.assign(Form, {
|
|
12052
|
+
Group: FormGroup,
|
|
12053
|
+
Control: FormControl$1,
|
|
12054
|
+
Floating: FormFloating,
|
|
12055
|
+
Check: FormCheck$1,
|
|
12056
|
+
Switch: Switch$1,
|
|
12057
|
+
Label: FormLabel,
|
|
12058
|
+
Text: FormText,
|
|
12059
|
+
Range: FormRange,
|
|
12060
|
+
Select: FormSelect,
|
|
12061
|
+
FloatingLabel
|
|
12062
|
+
});
|
|
12098
12063
|
const InputGroupText = /* @__PURE__ */ React__namespace.forwardRef(({
|
|
12099
12064
|
className,
|
|
12100
12065
|
bsPrefix,
|
|
@@ -17216,4 +17181,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
17216
17181
|
exports2.Mytekbutton = Mytekbutton;
|
|
17217
17182
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
17218
17183
|
});
|
|
17219
|
-
//# sourceMappingURL=main.umd.
|
|
17184
|
+
//# sourceMappingURL=main.umd.js.map
|