@popsure/dirty-swan 0.66.31 → 0.67.0
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/cjs/index.js +355 -344
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/autocompleteAddress/index.d.ts +3 -1
- package/dist/cjs/lib/components/autocompleteAddress/index.stories.d.ts +14 -0
- package/dist/esm/components/autocompleteAddress/index.js +35 -20
- package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
- package/dist/esm/components/autocompleteAddress/index.stories.js +25 -4
- package/dist/esm/components/autocompleteAddress/index.stories.js.map +1 -1
- package/dist/esm/components/autocompleteAddress/index.test.js +85 -4
- package/dist/esm/components/autocompleteAddress/index.test.js.map +1 -1
- package/dist/esm/{index-BYyiyH6K.js → index-DbXDuiSV.js} +2 -2
- package/dist/esm/{index-BYyiyH6K.js.map → index-DbXDuiSV.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/autocompleteAddress/index.d.ts +3 -1
- package/dist/esm/lib/components/autocompleteAddress/index.stories.d.ts +14 -0
- package/dist/esm/util/images/index.stories.js +1 -1
- package/package.json +1 -1
- package/src/lib/components/autocompleteAddress/index.stories.tsx +24 -2
- package/src/lib/components/autocompleteAddress/index.test.tsx +59 -1
- package/src/lib/components/autocompleteAddress/index.tsx +58 -16
package/dist/cjs/index.js
CHANGED
|
@@ -11046,6 +11046,169 @@ function requireLodash_debounce () {
|
|
|
11046
11046
|
var lodash_debounceExports = requireLodash_debounce();
|
|
11047
11047
|
var debounce = /*@__PURE__*/getDefaultExportFromCjs(lodash_debounceExports);
|
|
11048
11048
|
|
|
11049
|
+
var useDropdownAlignment = function (containerRef, dropdownRef, isOpen) {
|
|
11050
|
+
var _a = React.useState('left'), alignX = _a[0], setAlignX = _a[1];
|
|
11051
|
+
var _b = React.useState('bottom'), alignY = _b[0], setAlignY = _b[1];
|
|
11052
|
+
var updateAlignment = React.useCallback(function () {
|
|
11053
|
+
if (containerRef.current && dropdownRef.current) {
|
|
11054
|
+
var containerRect = containerRef.current.getBoundingClientRect();
|
|
11055
|
+
var dropdownWidth = dropdownRef.current.offsetWidth;
|
|
11056
|
+
var dropdownHeight = dropdownRef.current.offsetHeight;
|
|
11057
|
+
var spaceOnRight = window.innerWidth - containerRect.left;
|
|
11058
|
+
var spaceBelow = window.innerHeight - containerRect.bottom;
|
|
11059
|
+
setAlignX(spaceOnRight < dropdownWidth ? 'right' : 'left');
|
|
11060
|
+
setAlignY(spaceBelow < dropdownHeight && containerRect.top > spaceBelow ? 'top' : 'bottom');
|
|
11061
|
+
}
|
|
11062
|
+
}, [containerRef, dropdownRef]);
|
|
11063
|
+
React.useEffect(function () {
|
|
11064
|
+
if (!isOpen)
|
|
11065
|
+
return;
|
|
11066
|
+
updateAlignment();
|
|
11067
|
+
var observer = new ResizeObserver(updateAlignment);
|
|
11068
|
+
observer.observe(document.documentElement);
|
|
11069
|
+
return function () { return observer.disconnect(); };
|
|
11070
|
+
}, [isOpen, updateAlignment]);
|
|
11071
|
+
return { alignX: alignX, alignY: alignY };
|
|
11072
|
+
};
|
|
11073
|
+
|
|
11074
|
+
var useEscapeKey = function (callback) {
|
|
11075
|
+
var handleOnEscape = React.useCallback(function (e) {
|
|
11076
|
+
if (e.key === 'Escape') {
|
|
11077
|
+
callback();
|
|
11078
|
+
}
|
|
11079
|
+
}, [callback]);
|
|
11080
|
+
React.useEffect(function () {
|
|
11081
|
+
window.addEventListener('keydown', handleOnEscape);
|
|
11082
|
+
return function () { return window.removeEventListener('keydown', handleOnEscape); };
|
|
11083
|
+
}, [handleOnEscape]);
|
|
11084
|
+
};
|
|
11085
|
+
|
|
11086
|
+
var css_248z$H = ".style-module_bs-xs__2KEsk {\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03);\n}\n\n.style-module_bs-sm__3u9QM {\n box-shadow: 0 2px 20px 0 rgba(38, 38, 46, 0.04);\n}\n\n.style-module_bs-md__2LfxW {\n box-shadow: 0 2px 28px rgba(38, 38, 46, 0.08);\n}\n\n.style-module_bs-lg__2Qx0R {\n box-shadow: 0 2px 32px rgba(38, 38, 46, 0.1);\n}\n\n.style-module_bs-xl__kaOuM {\n box-shadow: 0 2px 50px rgba(38, 38, 46, 0.18);\n}\n\n.style-module_container__2064q {\n position: relative;\n}\n\n.style-module_selectTrigger__1GiSB {\n padding: 10px 12px;\n border: 1px solid #e7e7ed;\n}\n.style-module_selectTrigger__1GiSB:hover {\n border-color: #b8b8c0;\n}\n.style-module_selectTrigger__1GiSB:focus-visible {\n outline: 1px solid #26262e;\n outline-offset: 1px;\n}\n.style-module_selectTriggerOpen__29Kor {\n border-color: #26262e;\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03);\n}\n\n.style-module_disabled__2BlO- {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.style-module_chevronOpen__Ot3RV {\n transform: rotate(180deg);\n}\n\n.style-module_condensed__GDq0d {\n width: auto;\n padding: 8px 10px;\n gap: 8px;\n}\n\n.style-module_bordered__tRh9H {\n border: 1px solid #e7e7ed;\n}\n.style-module_bordered__tRh9H:hover {\n border-color: #b8b8c0;\n}\n\n.style-module_dropdown__1A-wl {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n min-width: 280px;\n border: 1px solid #e7e7ed;\n box-shadow: 0 2px 28px rgba(38, 38, 46, 0.08);\n z-index: 10;\n}\n\n.style-module_dropdownXRight__2LIci {\n left: auto;\n right: 0;\n}\n\n.style-module_dropdownYTop__Amnit {\n top: auto;\n bottom: calc(100% + 4px);\n}\n.style-module_dropdownYTop__Amnit .style-module_searchContainer__4O1qv {\n order: 2;\n padding-bottom: 0;\n padding-top: 8px;\n}\n.style-module_dropdownYTop__Amnit .style-module_optionList__-2I8l {\n order: 1;\n}\n\n.style-module_optionList__-2I8l {\n max-height: 308px;\n overflow-y: auto;\n scrollbar-width: none;\n}\n.style-module_optionList__-2I8l::-webkit-scrollbar {\n display: none;\n}\n\n.style-module_optionWrapper__3GVCB {\n position: relative;\n}\n\n.style-module_optionRadio__3GBog {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n.style-module_optionRadio__3GBog:focus-visible + label {\n outline: 2px solid #26262e;\n outline-offset: -2px;\n border-radius: 8px;\n}\n\n.style-module_option__1HkKR {\n padding: 10px 12px;\n border: none;\n background-color: transparent;\n}\n.style-module_option__1HkKR:hover {\n background-color: #f7f7fd;\n}\n.style-module_optionSelected__2pPt9 {\n background-color: #F6F6FE;\n}\n.style-module_optionSelected__2pPt9:hover {\n background-color: #F6F6FE;\n}\n\n.style-module_optionIcon__2hBSY {\n flex-shrink: 0;\n}\n\n.style-module_noResults__18exv {\n padding: 10px 12px;\n}";
|
|
11087
|
+
var styles$G = {"container":"style-module_container__2064q","selectTrigger":"style-module_selectTrigger__1GiSB","selectTriggerOpen":"style-module_selectTriggerOpen__29Kor","disabled":"style-module_disabled__2BlO-","chevronOpen":"style-module_chevronOpen__Ot3RV","condensed":"style-module_condensed__GDq0d","bordered":"style-module_bordered__tRh9H","dropdown":"style-module_dropdown__1A-wl","dropdownXRight":"style-module_dropdownXRight__2LIci","dropdownYTop":"style-module_dropdownYTop__Amnit","optionList":"style-module_optionList__-2I8l","optionWrapper":"style-module_optionWrapper__3GVCB","optionRadio":"style-module_optionRadio__3GBog","option":"style-module_option__1HkKR","optionSelected":"style-module_optionSelected__2pPt9","optionIcon":"style-module_optionIcon__2hBSY","noResults":"style-module_noResults__18exv"};
|
|
11088
|
+
styleInject(css_248z$H);
|
|
11089
|
+
|
|
11090
|
+
var SearchableDropdown = function (_a) {
|
|
11091
|
+
var _b, _c, _d;
|
|
11092
|
+
var _e;
|
|
11093
|
+
var options = _a.options, value = _a.value, onChange = _a.onChange, _f = _a.searchable, searchable = _f === void 0 ? false : _f, _g = _a.placeholder, placeholder = _g === void 0 ? 'Search' : _g, triggerPlaceholder = _a.triggerPlaceholder, _h = _a.noResultsText, noResultsText = _h === void 0 ? 'No results found' : _h, groupNameProp = _a.groupName, _j = _a.dropUp, dropUp = _j === void 0 ? false : _j, _k = _a.condensed, condensed = _k === void 0 ? false : _k, _l = _a.bordered, bordered = _l === void 0 ? false : _l, _m = _a.showChevron, showChevron = _m === void 0 ? false : _m, _o = _a.disabled, disabled = _o === void 0 ? false : _o;
|
|
11094
|
+
var _p = React.useState(false), isOpen = _p[0], setIsOpen = _p[1];
|
|
11095
|
+
var _q = React.useState(''), searchTerm = _q[0], setSearchTerm = _q[1];
|
|
11096
|
+
var _r = React.useState(value), localValue = _r[0], setLocalValue = _r[1];
|
|
11097
|
+
var searchInputRef = React.useRef(null);
|
|
11098
|
+
var containerRef = React.useRef(null);
|
|
11099
|
+
var triggerRef = React.useRef(null);
|
|
11100
|
+
var dropdownRef = React.useRef(null);
|
|
11101
|
+
var optionRefs = React.useRef(new Map());
|
|
11102
|
+
var groupName = React.useState(function () { return groupNameProp !== null && groupNameProp !== void 0 ? groupNameProp : "sd-".concat(generateId()); })[0];
|
|
11103
|
+
var dropdownId = "".concat(groupName, "-dropdown");
|
|
11104
|
+
var closeAndRestoreFocus = React.useCallback(function () {
|
|
11105
|
+
var _a;
|
|
11106
|
+
setIsOpen(false);
|
|
11107
|
+
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11108
|
+
}, []);
|
|
11109
|
+
useOnClickOutside(containerRef, function () { return isOpen && closeAndRestoreFocus(); });
|
|
11110
|
+
useEscapeKey(React.useCallback(function () {
|
|
11111
|
+
if (isOpen)
|
|
11112
|
+
closeAndRestoreFocus();
|
|
11113
|
+
}, [isOpen, closeAndRestoreFocus]));
|
|
11114
|
+
var _s = useDropdownAlignment(containerRef, dropdownRef, isOpen), alignX = _s.alignX, alignY = _s.alignY;
|
|
11115
|
+
React.useEffect(function () {
|
|
11116
|
+
if (isOpen && searchable && searchInputRef.current) {
|
|
11117
|
+
searchInputRef.current.focus();
|
|
11118
|
+
}
|
|
11119
|
+
}, [isOpen, searchable]);
|
|
11120
|
+
React.useEffect(function () {
|
|
11121
|
+
if (!isOpen) {
|
|
11122
|
+
setSearchTerm('');
|
|
11123
|
+
setLocalValue(value);
|
|
11124
|
+
}
|
|
11125
|
+
}, [isOpen, value]);
|
|
11126
|
+
var filteredOptions = React.useMemo(function () {
|
|
11127
|
+
if (!searchTerm)
|
|
11128
|
+
return options;
|
|
11129
|
+
return __spreadArray([], options, true).filter(function (option) {
|
|
11130
|
+
return option.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
11131
|
+
})
|
|
11132
|
+
.sort(function (a, b) {
|
|
11133
|
+
var term = searchTerm.toLowerCase();
|
|
11134
|
+
var aStartsWith = a.label.toLowerCase().startsWith(term);
|
|
11135
|
+
var bStartsWith = b.label.toLowerCase().startsWith(term);
|
|
11136
|
+
if (aStartsWith && !bStartsWith)
|
|
11137
|
+
return -1;
|
|
11138
|
+
if (!aStartsWith && bStartsWith)
|
|
11139
|
+
return 1;
|
|
11140
|
+
return 0;
|
|
11141
|
+
});
|
|
11142
|
+
}, [options, searchTerm]);
|
|
11143
|
+
var selectedOption = options.find(function (option) { return option.id === value; });
|
|
11144
|
+
var handleTriggerClick = function () {
|
|
11145
|
+
if (!disabled)
|
|
11146
|
+
setIsOpen(!isOpen);
|
|
11147
|
+
};
|
|
11148
|
+
var handleSearchKeyDown = function (e) {
|
|
11149
|
+
var _a;
|
|
11150
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
11151
|
+
e.preventDefault();
|
|
11152
|
+
var target = e.key === 'ArrowDown'
|
|
11153
|
+
? filteredOptions[0]
|
|
11154
|
+
: filteredOptions[filteredOptions.length - 1];
|
|
11155
|
+
if (target) {
|
|
11156
|
+
setLocalValue(target.id);
|
|
11157
|
+
(_a = optionRefs.current.get(target.id)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11158
|
+
}
|
|
11159
|
+
}
|
|
11160
|
+
else if (e.key === 'Enter') {
|
|
11161
|
+
e.preventDefault();
|
|
11162
|
+
var target = filteredOptions[0];
|
|
11163
|
+
if (target) {
|
|
11164
|
+
onChange(target.id);
|
|
11165
|
+
closeAndRestoreFocus();
|
|
11166
|
+
}
|
|
11167
|
+
}
|
|
11168
|
+
};
|
|
11169
|
+
var handleOptionClick = function (optionId) {
|
|
11170
|
+
onChange(optionId);
|
|
11171
|
+
closeAndRestoreFocus();
|
|
11172
|
+
};
|
|
11173
|
+
var handleOptionRef = function (optionId, el) {
|
|
11174
|
+
if (el)
|
|
11175
|
+
optionRefs.current.set(optionId, el);
|
|
11176
|
+
else
|
|
11177
|
+
optionRefs.current.delete(optionId);
|
|
11178
|
+
};
|
|
11179
|
+
var handleOptionKeyDown = function (e, optionId) {
|
|
11180
|
+
var _a;
|
|
11181
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
11182
|
+
e.preventDefault();
|
|
11183
|
+
var currentIndex = filteredOptions.findIndex(function (o) { return o.id === optionId; });
|
|
11184
|
+
var nextIndex = e.key === 'ArrowDown'
|
|
11185
|
+
? Math.min(currentIndex + 1, filteredOptions.length - 1)
|
|
11186
|
+
: Math.max(currentIndex - 1, 0);
|
|
11187
|
+
var next = filteredOptions[nextIndex];
|
|
11188
|
+
if (next) {
|
|
11189
|
+
setLocalValue(next.id);
|
|
11190
|
+
(_a = optionRefs.current.get(next.id)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11191
|
+
}
|
|
11192
|
+
}
|
|
11193
|
+
else if (e.key === 'Enter' || e.key === ' ') {
|
|
11194
|
+
e.preventDefault();
|
|
11195
|
+
onChange(optionId);
|
|
11196
|
+
closeAndRestoreFocus();
|
|
11197
|
+
}
|
|
11198
|
+
};
|
|
11199
|
+
return (jsxRuntime.jsxs("div", { className: classNames(styles$G.container, { 'd-inline-block': condensed }), ref: containerRef, children: [jsxRuntime.jsxs("button", { ref: triggerRef, type: "button", className: classNames('d-flex ai-center jc-between w100 br8 bg-white c-pointer ta-left tc-neutral-900', styles$G.selectTrigger, (_b = {},
|
|
11200
|
+
_b[styles$G.selectTriggerOpen] = isOpen,
|
|
11201
|
+
_b[styles$G.condensed] = condensed,
|
|
11202
|
+
_b[styles$G.bordered] = bordered,
|
|
11203
|
+
_b[styles$G.disabled] = disabled,
|
|
11204
|
+
_b)), onClick: handleTriggerClick, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-controls": isOpen ? dropdownId : undefined, children: [jsxRuntime.jsxs("span", { className: 'd-flex ai-center gap8', children: [(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.icon) && (jsxRuntime.jsx("span", { className: styles$G.optionIcon, children: selectedOption.icon })), !condensed && (jsxRuntime.jsx("span", { className: "p-p", children: (_e = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) !== null && _e !== void 0 ? _e : triggerPlaceholder }))] }), showChevron && (jsxRuntime.jsx(ChevronDownIcon, { className: classNames('ml8', (_c = {}, _c[styles$G.chevronOpen] = isOpen, _c)), size: 20, noMargin: true, color: "neutral-600" }))] }), isOpen && (jsxRuntime.jsxs("div", { id: dropdownId, ref: dropdownRef, className: classNames(styles$G.dropdown, 'bg-white br8 p8 d-flex fd-column', (_d = {}, _d[styles$G.dropdownYTop] = dropUp || alignY === 'top', _d[styles$G.dropdownXRight] = alignX === 'right', _d)), children: [searchable && (jsxRuntime.jsx("div", { className: "pb8 bg-white", children: jsxRuntime.jsx(Input, { ref: searchInputRef, type: "text", placeholder: placeholder, value: searchTerm, onChange: function (e) { return setSearchTerm(e.target.value); }, label: placeholder, hideLabel: true, onKeyDown: handleSearchKeyDown }) })), jsxRuntime.jsxs("div", { className: styles$G.optionList, role: "radiogroup", "aria-label": groupName, children: [filteredOptions.map(function (option) {
|
|
11205
|
+
var _a;
|
|
11206
|
+
return (jsxRuntime.jsxs("div", { className: styles$G.optionWrapper, children: [jsxRuntime.jsx("input", { type: "radio", id: "".concat(groupName, "-").concat(option.id), name: groupName, value: option.id, checked: option.id === localValue, onChange: function () { return setLocalValue(option.id); }, onClick: function () { return handleOptionClick(option.id); }, tabIndex: option.id === localValue ? 0 : -1, className: styles$G.optionRadio, ref: function (el) { return handleOptionRef(option.id, el); }, onKeyDown: function (e) { return handleOptionKeyDown(e, option.id); } }), jsxRuntime.jsxs("label", { htmlFor: "".concat(groupName, "-").concat(option.id), className: classNames('d-flex ai-center gap8 w100 br8 c-pointer ta-left tc-neutral-900', styles$G.option, (_a = {},
|
|
11207
|
+
_a[styles$G.optionSelected] = option.id === localValue,
|
|
11208
|
+
_a)), children: [option.icon && (jsxRuntime.jsx("span", { className: styles$G.optionIcon, children: option.icon })), jsxRuntime.jsx("span", { className: "p-p", children: option.label })] })] }, option.id));
|
|
11209
|
+
}), filteredOptions.length === 0 && (jsxRuntime.jsx("p", { className: "p-p tc-neutral-500 ".concat(styles$G.noResults), children: noResultsText }))] })] }))] }));
|
|
11210
|
+
};
|
|
11211
|
+
|
|
11049
11212
|
var z7=Object.defineProperty;var V$1=(t,a)=>{for(var z in a)z7(t,z,{get:a[z],enumerable:true});};var s$1=["AF","AL","DZ","AD","AS","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","ME","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","BL","MF","SX","XK","SS"];var r={};V$1(r,{countries:()=>L,default:()=>p7,locale:()=>y});var y="en",L={AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Republic of the Congo",CD:"Democratic Republic of the Congo",CK:"Cook Islands",CR:"Costa Rica",CI:"Cote D'Ivoire",HR:"Croatia",CU:"Cuba",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MK:"North Macedonia",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Reunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Eswatini",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela",VN:"Vietnam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe",AX:"\xC5land Islands",BQ:"Bonaire, Sint Eustatius and Saba",CW:"Cura\xE7ao",GG:"Guernsey",IM:"Isle of Man",JE:"Jersey",ME:"Montenegro",BL:"Saint Barth\xE9lemy",MF:"Saint Martin (French part)",RS:"Serbia",SX:"Sint Maarten (Dutch part)",SS:"South Sudan",XK:"Kosovo"},p7={locale:y,countries:L};var m$1={};V$1(m$1,{countries:()=>S$1,default:()=>M7,locale:()=>B});var B="de",S$1={AF:"Afghanistan",EG:"\xC4gypten",AX:"\xC5land",AL:"Albanien",DZ:"Algerien",AS:"Amerikanisch-Samoa",VI:"Amerikanische Jungferninseln",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarktis",AG:"Antigua und Barbuda",GQ:"\xC4quatorialguinea",AR:"Argentinien",AM:"Armenien",AW:"Aruba",AZ:"Aserbaidschan",ET:"\xC4thiopien",AU:"Australien",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesch",BB:"Barbados",BY:"Belarus",BE:"Belgien",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivien",BQ:"Bonaire",BA:"Bosnien und Herzegowina",BW:"Botswana",BV:"Bouvetinsel",BR:"Brasilien",VG:"Britische Jungferninseln",IO:"Britisches Territorium im Indischen Ozean",BN:"Brunei Darussalam",BG:"Bulgarien",BF:"Burkina Faso",BI:"Burundi",CL:"Chile",CN:"China",CK:"Cookinseln",CR:"Costa Rica",CI:"Elfenbeink\xFCste",CW:"Cura\xE7ao",DK:"D\xE4nemark",DE:"Deutschland",DM:"Dominica",DO:"Dominikanische Republik",DJ:"Dschibuti",EC:"Ecuador",SV:"El Salvador",ER:"Eritrea",EE:"Estland",FK:"Falklandinseln",FO:"F\xE4r\xF6er",FJ:"Fidschi",FI:"Finnland",FR:"Frankreich",GF:"Franz\xF6sisch-Guayana",PF:"Franz\xF6sisch-Polynesien",TF:"Franz\xF6sische S\xFCd- und Antarktisgebiete",GA:"Gabun",GM:"Gambia",GE:"Georgien",GH:"Ghana",GI:"Gibraltar",GD:"Grenada",GR:"Griechenland",GL:"Gr\xF6nland",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard und McDonaldinseln",HN:"Honduras",HK:"Hongkong",IN:"Indien",ID:"Indonesien",IM:"Insel Man",IQ:"Irak",IR:"Iran",IE:"Irland",IS:"Island",IL:"Israel",IT:"Italien",JM:"Jamaika",JP:"Japan",YE:"Jemen",JE:"Jersey",JO:"Jordanien",KY:"Kaimaninseln",KH:"Kambodscha",CM:"Kamerun",CA:"Kanada",CV:"Kap Verde",KZ:"Kasachstan",QA:"Katar",KE:"Kenia",KG:"Kirgisistan",KI:"Kiribati",CC:"Kokosinseln",CO:"Kolumbien",KM:"Komoren",CD:"Kongo",KP:"Nordkorea",KR:"S\xFCdkorea",HR:"Kroatien",CU:"Kuba",KW:"Kuwait",LA:"Laos",LS:"Lesotho",LV:"Lettland",LB:"Libanon",LR:"Liberia",LY:"Libyen",LI:"Liechtenstein",LT:"Litauen",LU:"Luxemburg",MO:"Macao",MG:"Madagaskar",MW:"Malawi",MY:"Malaysia",MV:"Malediven",ML:"Mali",MT:"Malta",MA:"Marokko",MH:"Marshallinseln",MQ:"Martinique",MR:"Mauretanien",MU:"Mauritius",YT:"Mayotte",MX:"Mexiko",FM:"Mikronesien",MD:"Moldawien",MC:"Monaco",MN:"Mongolei",ME:"Montenegro",MS:"Montserrat",MZ:"Mosambik",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NC:"Neukaledonien",NZ:"Neuseeland",NI:"Nicaragua",NL:"Niederlande",NE:"Niger",NG:"Nigeria",NU:"Niue",MK:"Nordmazedonien",MP:"N\xF6rdliche Marianen",NF:"Norfolkinsel",NO:"Norwegen",OM:"Oman",AT:"\xD6sterreich",TL:"Osttimor",PK:"Pakistan",PS:"Staat Pal\xE4stina",PW:"Palau",PA:"Panama",PG:"Papua-Neuguinea",PY:"Paraguay",PE:"Peru",PH:"Philippinen",PN:"Pitcairninseln",PL:"Polen",PT:"Portugal",PR:"Puerto Rico",TW:"Taiwan",CG:"Republik Kongo",RE:"R\xE9union",RW:"Ruanda",RO:"Rum\xE4nien",RU:"Russische F\xF6deration",BL:"Saint-Barth\xE9lemy",MF:"Saint-Martin",SB:"Salomonen",ZM:"Sambia",WS:"Samoa",SM:"San Marino",ST:"S\xE3o Tom\xE9 und Pr\xEDncipe",SA:"Saudi-Arabien",SE:"Schweden",CH:"Schweiz",SN:"Senegal",RS:"Serbien",SC:"Seychellen",SL:"Sierra Leone",ZW:"Simbabwe",SG:"Singapur",SX:"Sint Maarten",SK:"Slowakei",SI:"Slowenien",SO:"Somalia",ES:"Spanien",LK:"Sri Lanka",SH:"St. Helena",KN:"St. Kitts und Nevis",LC:"St. Lucia",PM:"Saint-Pierre und Miquelon",VC:"St. Vincent und die Grenadinen",ZA:"S\xFCdafrika",SD:"Sudan",GS:"S\xFCdgeorgien und die S\xFCdlichen Sandwichinseln",SS:"S\xFCdsudan",SR:"Suriname",SJ:"Svalbard und Jan Mayen",SZ:"Eswatini",SY:"Syrien, Arabische Republik",TJ:"Tadschikistan",TZ:"Tansania, Vereinigte Republik",TH:"Thailand",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad und Tobago",TD:"Tschad",CZ:"Tschechische Republik",TN:"Tunesien",TR:"T\xFCrkei",TM:"Turkmenistan",TC:"Turks- und Caicosinseln",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",HU:"Ungarn",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Usbekistan",VU:"Vanuatu",VA:"Vatikanstadt",VE:"Venezuela",AE:"Vereinigte Arabische Emirate",US:"Vereinigte Staaten",GB:"Vereinigtes K\xF6nigreich",VN:"Vietnam",WF:"Wallis und Futuna",CX:"Weihnachtsinsel",EH:"Westsahara",CF:"Zentralafrikanische Republik",CY:"Zypern",XK:"Kosovo"},M7={locale:B,countries:S$1};var c7={en:r,de:m$1};function $5(t,a="en"){return c7[a].countries[t]}var f7=(t="en")=>s$1.map(a=>({name:c7[t].countries[a],code:a}));f7();
|
|
11050
11213
|
|
|
11051
11214
|
var geocoderAddressComponentToPartialAddress = function (input) {
|
|
@@ -11086,9 +11249,9 @@ var geocoderAddressComponentToPartialAddress = function (input) {
|
|
|
11086
11249
|
return toReturn;
|
|
11087
11250
|
};
|
|
11088
11251
|
|
|
11089
|
-
var css_248z$
|
|
11090
|
-
var styles$
|
|
11091
|
-
styleInject(css_248z$
|
|
11252
|
+
var css_248z$G = "@media (max-width: 34rem) {\n .style-module_input-line__34TKK {\n flex-direction: column;\n }\n .style-module_input-line__34TKK > *:not(:first-child) {\n margin-top: 16px;\n }\n}\n\n@media (max-width: 34rem) {\n .style-module_house-number-input__1sDS5 {\n max-width: none !important;\n }\n}\n\n.style-module_map-container__2rzjU {\n position: relative;\n height: 112px;\n margin-bottom: 16px;\n border-radius: 8px;\n transition: 0.3s height ease-in-out, 0.3s margin-top ease-in-out;\n overflow: hidden;\n}\n.style-module_map-container--hidden__2AnYR {\n height: 0;\n margin: 0;\n}\n\n@keyframes style-module_appear-in__3HZHT {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.style-module_appear-in-animate__1bJyO {\n animation-name: style-module_appear-in__3HZHT;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n}\n\n.style-module_loading-spinner__3-nri {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute !important;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 100;\n animation-name: style-module_appear-in__3HZHT;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n}\n\n.style-module_map__1Vtps {\n width: 100%;\n height: 100%;\n}";
|
|
11253
|
+
var styles$F = {"input-line":"style-module_input-line__34TKK","house-number-input":"style-module_house-number-input__1sDS5","map-container":"style-module_map-container__2rzjU","map-container--hidden":"style-module_map-container--hidden__2AnYR","loading-spinner":"style-module_loading-spinner__3-nri","map":"style-module_map__1Vtps"};
|
|
11254
|
+
styleInject(css_248z$G);
|
|
11092
11255
|
|
|
11093
11256
|
var GERMANY_LAT_LNG = { lat: 51.54317, lng: 10.3181503 };
|
|
11094
11257
|
var GERMANY_ALPHA_CODE = 'DE';
|
|
@@ -11121,20 +11284,29 @@ var loadGoogleMapsApiDynamically = function (callback, apiKey) {
|
|
|
11121
11284
|
};
|
|
11122
11285
|
var AutocompleteAddress = function (_a) {
|
|
11123
11286
|
var _b;
|
|
11124
|
-
var _c;
|
|
11125
|
-
var apiKey = _a.apiKey, initialAddress = _a.address, onAddressChange = _a.onAddressChange, placeholders = _a.placeholders, manualAddressEntryTexts = _a.manualAddressEntryTexts, inputProps = _a.inputProps,
|
|
11126
|
-
var
|
|
11127
|
-
var
|
|
11287
|
+
var _c, _d;
|
|
11288
|
+
var apiKey = _a.apiKey, initialAddress = _a.address, onAddressChange = _a.onAddressChange, placeholders = _a.placeholders, manualAddressEntryTexts = _a.manualAddressEntryTexts, inputProps = _a.inputProps, _e = _a.countryCode, countryCode = _e === void 0 ? GERMANY_ALPHA_CODE : _e;
|
|
11289
|
+
var _f = React.useState(false), manualAddressEntry = _f[0], setManualAddressEntry = _f[1];
|
|
11290
|
+
var _g = React.useState(false), isLoading = _g[0], setIsLoading = _g[1];
|
|
11128
11291
|
var autocomplete = React.useRef(null);
|
|
11129
11292
|
var autocompleteElement = React.useRef(null);
|
|
11130
11293
|
var map = React.useRef(null);
|
|
11131
11294
|
var marker = React.useRef(null);
|
|
11132
|
-
var
|
|
11133
|
-
var
|
|
11295
|
+
var _h = React.useState(initialAddress), address = _h[0], setAddress = _h[1];
|
|
11296
|
+
var _j = React.useState(((_c = window.google) === null || _c === void 0 ? void 0 : _c.maps) !== undefined), hasLoadedGoogleAPI = _j[0], setHasLoadedGoogleAPI = _j[1];
|
|
11134
11297
|
loadGoogleMapsApiDynamically(function () {
|
|
11135
11298
|
setHasLoadedGoogleAPI(true);
|
|
11136
11299
|
}, apiKey);
|
|
11137
|
-
var
|
|
11300
|
+
var _k = React.useState(null), place = _k[0], setPlace = _k[1];
|
|
11301
|
+
var isWorldwide = countryCode === null;
|
|
11302
|
+
var countryOptions = React.useMemo(function () {
|
|
11303
|
+
return isWorldwide
|
|
11304
|
+
? f7().map(function (_a) {
|
|
11305
|
+
var code = _a.code, name = _a.name;
|
|
11306
|
+
return ({ id: code, label: name });
|
|
11307
|
+
})
|
|
11308
|
+
: [];
|
|
11309
|
+
}, [isWorldwide]);
|
|
11138
11310
|
React.useEffect(function () {
|
|
11139
11311
|
if (address) {
|
|
11140
11312
|
if (autocompleteElement.current && address.street) {
|
|
@@ -11148,10 +11320,7 @@ var AutocompleteAddress = function (_a) {
|
|
|
11148
11320
|
return;
|
|
11149
11321
|
}
|
|
11150
11322
|
var reference = document.getElementById('autocomplete');
|
|
11151
|
-
autocomplete.current = new google.maps.places.Autocomplete(reference, {
|
|
11152
|
-
types: ['address'],
|
|
11153
|
-
componentRestrictions: { country: countryCode },
|
|
11154
|
-
});
|
|
11323
|
+
autocomplete.current = new google.maps.places.Autocomplete(reference, __assign({ types: ['address'] }, (countryCode && { componentRestrictions: { country: countryCode } })));
|
|
11155
11324
|
autocomplete.current.addListener('place_changed', onPlaceChanged);
|
|
11156
11325
|
map.current = new google.maps.Map(document.getElementById('map'), MAP_CONFIG_OBJ);
|
|
11157
11326
|
Promise.resolve().then(function () { return require('./mapStyle-Cf8tRlj8.js'); }).then(function (_a) {
|
|
@@ -11210,22 +11379,27 @@ var AutocompleteAddress = function (_a) {
|
|
|
11210
11379
|
var handleEnterAddressManually = function () {
|
|
11211
11380
|
setManualAddressEntry(true);
|
|
11212
11381
|
};
|
|
11382
|
+
var updateManualAddress = function (changes, _a) {
|
|
11383
|
+
var _b;
|
|
11384
|
+
var _c = _a === void 0 ? { updatePlace: true } : _a, updatePlace = _c.updatePlace;
|
|
11385
|
+
var newAddress = __assign(__assign(__assign({}, address), changes), { country: (_b = countryCode !== null && countryCode !== void 0 ? countryCode : changes.country) !== null && _b !== void 0 ? _b : address === null || address === void 0 ? void 0 : address.country });
|
|
11386
|
+
setAddress(newAddress);
|
|
11387
|
+
onAddressChange(newAddress);
|
|
11388
|
+
if (updatePlace) {
|
|
11389
|
+
debouncedSetPlace(newAddress);
|
|
11390
|
+
}
|
|
11391
|
+
};
|
|
11213
11392
|
var onManualAddressChange = function (_a) {
|
|
11214
11393
|
var _b = _a === void 0 ? { updatePlace: true } : _a, updatePlace = _b.updatePlace;
|
|
11215
11394
|
return function (e) {
|
|
11216
11395
|
var _a;
|
|
11217
|
-
|
|
11218
|
-
setAddress(newAddress);
|
|
11219
|
-
onAddressChange(newAddress);
|
|
11220
|
-
if (updatePlace) {
|
|
11221
|
-
debouncedSetPlace(newAddress);
|
|
11222
|
-
}
|
|
11396
|
+
return updateManualAddress((_a = {}, _a[e.target.name] = e.target.value, _a), { updatePlace: updatePlace });
|
|
11223
11397
|
};
|
|
11224
11398
|
};
|
|
11225
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames("wmx8 bg-neutral-600 ".concat(styles$
|
|
11226
|
-
_b[styles$
|
|
11227
|
-
_b)), children: [jsxRuntime.jsx("div", { className: styles$
|
|
11228
|
-
'Additional information (C/O, apartment, etc.)', value: (address === null || address === void 0 ? void 0 : address.additionalInformation) || '', name: "additionalInformation", onChange: onManualAddressChange({ updatePlace: false }) }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.additionalInformation), "autocomplete-additional-info"), jsxRuntime.jsxs("div", { className: "d-flex mt16 c-gap16 ".concat(styles$
|
|
11399
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames("wmx8 bg-neutral-600 ".concat(styles$F['map-container']), (_b = {},
|
|
11400
|
+
_b[styles$F['map-container--hidden']] = place === null,
|
|
11401
|
+
_b)), children: [jsxRuntime.jsx("div", { className: styles$F.map, id: "map", "aria-hidden": "true" }), isLoading && (jsxRuntime.jsx("div", { className: styles$F['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] }), jsxRuntime.jsx("div", { className: "wmx8", children: manualAddressEntry === false ? (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(Input, { className: "w100", id: "autocomplete", "data-testid": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.manualAddressEntry) || 'Search for address', ref: autocompleteElement, disabled: hasLoadedGoogleAPI === false }, "autocomplete-search"), hasLoadedGoogleAPI === false && (jsxRuntime.jsx("div", { "data-testid": "google-api-loader", className: styles$F['loading-spinner'], children: jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m" }) }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "d-flex c-gap16 ".concat(styles$F['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-testid": "autocomplete", type: "text", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.street) || 'Street', value: (address === null || address === void 0 ? void 0 : address.street) || '', onChange: onManualAddressChange(), name: "street" }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.street), "autocomplete-street"), jsxRuntime.jsx(Input, __assign({ className: "wmx2 ".concat(styles$F['house-number-input']), "data-testid": "autocomplete-house-number", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.houseNumber) || 'House number', value: (address === null || address === void 0 ? void 0 : address.houseNumber) || '', name: "houseNumber", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.houseNumber), "autocomplete-house-number")] }), jsxRuntime.jsx(Input, __assign({ className: "mt16", "data-testid": "autocomplete-additional-info", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.additionalInformation) ||
|
|
11402
|
+
'Additional information (C/O, apartment, etc.)', value: (address === null || address === void 0 ? void 0 : address.additionalInformation) || '', name: "additionalInformation", onChange: onManualAddressChange({ updatePlace: false }) }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.additionalInformation), "autocomplete-additional-info"), jsxRuntime.jsxs("div", { className: "d-flex mt16 c-gap16 ".concat(styles$F['input-line']), children: [jsxRuntime.jsx(Input, __assign({ className: "w100", "data-testid": "autocomplete-postcode", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.postcode) || 'Postcode', value: (address === null || address === void 0 ? void 0 : address.postcode) || '', name: "postcode", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.postcode), "autocomplete-postcode"), jsxRuntime.jsx(Input, __assign({ className: "w100", "data-testid": "autocomplete-city", placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.city) || 'City', value: (address === null || address === void 0 ? void 0 : address.city) || '', name: "city", onChange: onManualAddressChange() }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.city), "autocomplete-city")] }), isWorldwide && (jsxRuntime.jsx("div", { className: "mt16", "data-testid": "autocomplete-country", children: jsxRuntime.jsx(SearchableDropdown, { options: countryOptions, value: (_d = address === null || address === void 0 ? void 0 : address.country) !== null && _d !== void 0 ? _d : null, onChange: function (country) { return updateManualAddress({ country: country }); }, searchable: true, bordered: true, showChevron: true, groupName: "autocomplete-country", triggerPlaceholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.country) || 'Country', placeholder: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.countrySearch) || 'Search country' }) }))] })) }), manualAddressEntry === false && (jsxRuntime.jsxs("div", { className: "p-p mt8", children: [(manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.preText) || 'Or ', jsxRuntime.jsx("button", { className: 'p-a p-p fw-bold c-pointer bg-transparent', onClick: handleEnterAddressManually, type: "button", children: (manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.cta) || 'enter address manually' })] }))] }));
|
|
11229
11403
|
};
|
|
11230
11404
|
|
|
11231
11405
|
var propTypes$2 = {exports: {}};
|
|
@@ -14284,14 +14458,14 @@ const AnimateHeight = (_a) => {
|
|
|
14284
14458
|
React.createElement("div", { className: contentClassName, style: contentStyle, ref: contentElement }, children)));
|
|
14285
14459
|
};
|
|
14286
14460
|
|
|
14287
|
-
var css_248z$
|
|
14288
|
-
var styles$
|
|
14289
|
-
styleInject(css_248z$G);
|
|
14290
|
-
|
|
14291
|
-
var css_248z$F = ".style-module_upload-file-cell__3nv5i {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 64px;\n padding: 8px 16px;\n border: 1px solid #d2d2d9;\n border-radius: 8px;\n background-color: white;\n animation: style-module_appear-down__14rCV 0.6s;\n animation-fill-mode: both;\n animation-delay: 0s;\n}\n\n.style-module_upload-file-cell-error__3KcSe {\n border-color: #E55454;\n background-color: #FED7D7;\n}\n\n.style-module_cell-left-section__3Iv8c {\n display: flex;\n align-items: center;\n}\n\n.style-module_main-icon__335_Y {\n margin-right: 16px;\n}\n\n.style-module_upload-display-text__3Rd68 {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.style-module_progress-bar-container__2JCBO {\n position: relative;\n}\n\n.style-module_progress-bar__1Rosf {\n background-color: #e7e7ed;\n border-radius: 10px;\n height: 4px;\n}\n\n.style-module_progress-bar-filler__131fA {\n background-color: #26262e;\n border-radius: 10px;\n height: 4px;\n position: absolute;\n bottom: 0;\n transition: 1s ease;\n}\n\n.style-module_cell-right-section__dVWqJ {\n display: flex;\n}\n\n.style-module_cell-right-section-complete__c0rHc {\n min-width: 64px;\n}\n\n.style-module_button__xo5tR {\n width: 32px;\n}\n.style-module_button__xo5tR div span span {\n min-width: 24px !important;\n height: 24px !important;\n}\n.style-module_button__xo5tR:focus-visible {\n outline: 2px solid #26262e;\n border-radius: 2px;\n outline-offset: 2px;\n}\n\n@keyframes style-module_appear-down__14rCV {\n from {\n transform: translateY(-10px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}";
|
|
14292
|
-
var styles$E = {"upload-file-cell":"style-module_upload-file-cell__3nv5i","upload-file-cell-error":"style-module_upload-file-cell-error__3KcSe","cell-left-section":"style-module_cell-left-section__3Iv8c","main-icon":"style-module_main-icon__335_Y","upload-display-text":"style-module_upload-display-text__3Rd68","progress-bar-container":"style-module_progress-bar-container__2JCBO","progress-bar":"style-module_progress-bar__1Rosf","progress-bar-filler":"style-module_progress-bar-filler__131fA","cell-right-section":"style-module_cell-right-section__dVWqJ","cell-right-section-complete":"style-module_cell-right-section-complete__c0rHc","button":"style-module_button__xo5tR"};
|
|
14461
|
+
var css_248z$F = ".style-module_container__Uyltc {\n background-color: transparent;\n}\n\n.style-module_dropzoneContainer__yZoGP {\n border: 1px dashed var(--ds-neutral-900);\n padding: 32px 0;\n background-color: white;\n}\n.style-module_dropzoneContainerCondensed__3VOlY {\n padding: 16px 0 24px;\n}\n.style-module_dropzoneContainer__yZoGP {\n transition: all 0.6s ease-in-out;\n}\n.style-module_dropzoneContainer__yZoGP:focus-visible {\n outline: 2px solid #26262e;\n border-radius: 2px;\n outline-offset: 2px;\n}\n.style-module_dropzoneContainer__yZoGP:hover {\n background-color: var(--ds-neutral-100);\n transition: 0.5s ease;\n}\n\n.style-module_img__11JI8 {\n vertical-align: middle;\n margin-right: 8px;\n height: 18px;\n}\n\n.style-module_textInline__2F21z {\n display: inline-flex;\n}\n\n.style-module_dropzoneContainerDisabled__1X3gP {\n pointer-events: none;\n opacity: 0.4;\n}";
|
|
14462
|
+
var styles$E = {"container":"style-module_container__Uyltc","dropzoneContainer":"style-module_dropzoneContainer__yZoGP","dropzoneContainerCondensed":"style-module_dropzoneContainerCondensed__3VOlY","img":"style-module_img__11JI8","textInline":"style-module_textInline__2F21z","dropzoneContainerDisabled":"style-module_dropzoneContainerDisabled__1X3gP"};
|
|
14293
14463
|
styleInject(css_248z$F);
|
|
14294
14464
|
|
|
14465
|
+
var css_248z$E = ".style-module_upload-file-cell__3nv5i {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 64px;\n padding: 8px 16px;\n border: 1px solid #d2d2d9;\n border-radius: 8px;\n background-color: white;\n animation: style-module_appear-down__14rCV 0.6s;\n animation-fill-mode: both;\n animation-delay: 0s;\n}\n\n.style-module_upload-file-cell-error__3KcSe {\n border-color: #E55454;\n background-color: #FED7D7;\n}\n\n.style-module_cell-left-section__3Iv8c {\n display: flex;\n align-items: center;\n}\n\n.style-module_main-icon__335_Y {\n margin-right: 16px;\n}\n\n.style-module_upload-display-text__3Rd68 {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.style-module_progress-bar-container__2JCBO {\n position: relative;\n}\n\n.style-module_progress-bar__1Rosf {\n background-color: #e7e7ed;\n border-radius: 10px;\n height: 4px;\n}\n\n.style-module_progress-bar-filler__131fA {\n background-color: #26262e;\n border-radius: 10px;\n height: 4px;\n position: absolute;\n bottom: 0;\n transition: 1s ease;\n}\n\n.style-module_cell-right-section__dVWqJ {\n display: flex;\n}\n\n.style-module_cell-right-section-complete__c0rHc {\n min-width: 64px;\n}\n\n.style-module_button__xo5tR {\n width: 32px;\n}\n.style-module_button__xo5tR div span span {\n min-width: 24px !important;\n height: 24px !important;\n}\n.style-module_button__xo5tR:focus-visible {\n outline: 2px solid #26262e;\n border-radius: 2px;\n outline-offset: 2px;\n}\n\n@keyframes style-module_appear-down__14rCV {\n from {\n transform: translateY(-10px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}";
|
|
14466
|
+
var styles$D = {"upload-file-cell":"style-module_upload-file-cell__3nv5i","upload-file-cell-error":"style-module_upload-file-cell-error__3KcSe","cell-left-section":"style-module_cell-left-section__3Iv8c","main-icon":"style-module_main-icon__335_Y","upload-display-text":"style-module_upload-display-text__3Rd68","progress-bar-container":"style-module_progress-bar-container__2JCBO","progress-bar":"style-module_progress-bar__1Rosf","progress-bar-filler":"style-module_progress-bar-filler__131fA","cell-right-section":"style-module_cell-right-section__dVWqJ","cell-right-section-complete":"style-module_cell-right-section-complete__c0rHc","button":"style-module_button__xo5tR"};
|
|
14467
|
+
styleInject(css_248z$E);
|
|
14468
|
+
|
|
14295
14469
|
var UploadFileCell = function (_a) {
|
|
14296
14470
|
var _b, _c;
|
|
14297
14471
|
var uploadStatus = _a.uploadStatus, file = _a.file, onRemoveFile = _a.onRemoveFile, uploading = _a.uploading;
|
|
@@ -14309,11 +14483,11 @@ var UploadFileCell = function (_a) {
|
|
|
14309
14483
|
COMPLETE: name,
|
|
14310
14484
|
ERROR: error !== null && error !== void 0 ? error : 'Something went wrong. Try uploading again.',
|
|
14311
14485
|
}[uploadStatus];
|
|
14312
|
-
return (jsxRuntime.jsxs("div", { className: classNames("mt8 ".concat(styles$
|
|
14313
|
-
_b[styles$
|
|
14314
|
-
_b)), children: [jsxRuntime.jsxs("div", { className: "w100 ".concat(styles$
|
|
14315
|
-
_c[styles$
|
|
14316
|
-
_c)), children: isUploading ? (jsxRuntime.jsx("div", { className: styles$
|
|
14486
|
+
return (jsxRuntime.jsxs("div", { className: classNames("mt8 ".concat(styles$D['upload-file-cell']), (_b = {},
|
|
14487
|
+
_b[styles$D['upload-file-cell-error']] = hasError,
|
|
14488
|
+
_b)), children: [jsxRuntime.jsxs("div", { className: "w100 ".concat(styles$D['cell-left-section']), children: [jsxRuntime.jsx(FileIcon, { className: classNames("".concat(styles$D['main-icon'], " ").concat(styles$D.icon)), color: mapFileIconColor[uploadStatus], size: 24 }), jsxRuntime.jsxs("div", { className: "w100", children: [jsxRuntime.jsx("div", { className: "p-p ".concat(styles$D['upload-display-text']), title: displayText, children: displayText }), isUploading && showProgressBar && (jsxRuntime.jsxs("div", { className: "mt8 w100 ".concat(styles$D['progress-bar-container']), children: [jsxRuntime.jsx("div", { className: "".concat(styles$D['progress-bar']) }), jsxRuntime.jsx("div", { "data-testid": "ds-filecell-progressbar", className: "".concat(styles$D['progress-bar-filler']), style: { width: "".concat(progress, "%") } })] }))] })] }), jsxRuntime.jsx("div", { className: classNames(styles$D['cell-right-section'], (_c = {},
|
|
14489
|
+
_c[styles$D['cell-right-section-complete']] = isComplete,
|
|
14490
|
+
_c)), children: isUploading ? (jsxRuntime.jsx("div", { className: styles$D.spinner, children: showLoadingSpinner && (jsxRuntime.jsx("div", { className: "ds-spinner ds-spinner__m", "data-testid": "ds-filecell-spinner" })) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isComplete && (jsxRuntime.jsx(Button, { as: "a", href: previewUrl, target: "_blank", rel: "noopener noreferrer", hideLabel: true, variant: "textBlack", className: classNames('mr16', styles$D.button), leftIcon: jsxRuntime.jsx(EyeVisionIcon, { noMargin: true, color: 'neutral-600', size: 24 }), children: "Preview file" })), onRemoveFile && (jsxRuntime.jsx(Button, { onClick: function () { return onRemoveFile(id); }, disabled: uploading, "data-testid": "remove-button", className: styles$D.button, leftIcon: jsxRuntime.jsx(Trash2Icon, { color: hasError ? 'red-500' : 'neutral-600', size: 24, noMargin: true }), hideLabel: true, variant: "textBlack", children: "Delete file" }))] })) })] }));
|
|
14317
14491
|
};
|
|
14318
14492
|
|
|
14319
14493
|
var k = 1024;
|
|
@@ -14547,10 +14721,10 @@ var MultiDropzone = function (_a) {
|
|
|
14547
14721
|
var instructionsText = isNonDesktopDevice
|
|
14548
14722
|
? instructionsTextMobile
|
|
14549
14723
|
: instructionsTextDesktop;
|
|
14550
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
14551
|
-
_b[styles$
|
|
14552
|
-
_b[styles$
|
|
14553
|
-
_b)) }, getRootProps(), { children: [jsxRuntime.jsx("div", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: statusMessage }), jsxRuntime.jsx("input", __assign({ "data-testid": "ds-drop-input" }, getInputProps())), !isCondensed && (jsxRuntime.jsx(UploadCloudIcon, { size: 56, color: 'neutral-900' })), jsxRuntime.jsx("div", { className: "p-h4 mt8 d-block c-pointer ".concat(isCondensed ? styles$
|
|
14724
|
+
return (jsxRuntime.jsxs("div", { className: styles$E.container, children: [jsxRuntime.jsxs("div", __assign({ className: classNames("w100 ta-center br8 c-pointer ".concat(styles$E.dropzoneContainer), (_b = {},
|
|
14725
|
+
_b[styles$E['dropzoneContainerDisabled']] = uploading,
|
|
14726
|
+
_b[styles$E['dropzoneContainerCondensed']] = isCondensed,
|
|
14727
|
+
_b)) }, getRootProps(), { children: [jsxRuntime.jsx("div", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: statusMessage }), jsxRuntime.jsx("input", __assign({ "data-testid": "ds-drop-input" }, getInputProps())), !isCondensed && (jsxRuntime.jsx(UploadCloudIcon, { size: 56, color: 'neutral-900' })), jsxRuntime.jsx("div", { className: "p-h4 mt8 d-block c-pointer ".concat(isCondensed ? styles$E.textInline : ''), children: jsxRuntime.jsxs("div", { className: 'd-flex ai-center jc-center w100', children: [isCondensed && (jsxRuntime.jsx(UploadCloudIcon, { className: classNames('mr16', styles$E.img), size: 20, color: 'neutral-900' })), uploading
|
|
14554
14728
|
? (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.currentlyUploadingText) ||
|
|
14555
14729
|
'Please wait while uploading file...'
|
|
14556
14730
|
: instructionsText] }) }), jsxRuntime.jsx("div", { className: "p-p--small tc-neutral-600", children: (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.supportsText) || placeholder })] })), errors.map(function (_a) {
|
|
@@ -14565,17 +14739,17 @@ var MultiDropzone = function (_a) {
|
|
|
14565
14739
|
"You can upload maximum ".concat(maxFiles, " files.") }) })] }));
|
|
14566
14740
|
};
|
|
14567
14741
|
|
|
14568
|
-
var css_248z$
|
|
14569
|
-
var styles$
|
|
14570
|
-
styleInject(css_248z$
|
|
14742
|
+
var css_248z$D = ".style-module_button__mw9kQ {\n height: 48px;\n}\n\n.style-module_chip-complete__3YkB9 {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n border-radius: 8px;\n padding: 8px 16px;\n height: 48px;\n}";
|
|
14743
|
+
var styles$C = {"button":"style-module_button__mw9kQ","chip-complete":"style-module_chip-complete__3YkB9"};
|
|
14744
|
+
styleInject(css_248z$D);
|
|
14571
14745
|
|
|
14572
14746
|
var InitialButton = function (_a) {
|
|
14573
14747
|
var onDownload = _a.onDownload;
|
|
14574
|
-
return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$
|
|
14748
|
+
return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$C.button), leftIcon: jsxRuntime.jsx(DownloadIcon, {}), onClick: onDownload, "data-testid": "download-documents-button", children: "Download" }));
|
|
14575
14749
|
};
|
|
14576
14750
|
// TODO: Allow setting loading to true to display text
|
|
14577
|
-
var GeneratingButton = function () { return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$
|
|
14578
|
-
var CompletedChip = function () { return (jsxRuntime.jsxs("div", { className: styles$
|
|
14751
|
+
var GeneratingButton = function () { return (jsxRuntime.jsx(Button, { className: "w100 ".concat(styles$C.button), loading: true, children: "Generating" })); };
|
|
14752
|
+
var CompletedChip = function () { return (jsxRuntime.jsxs("div", { className: styles$C['chip-complete'], children: [jsxRuntime.jsx(CheckIcon, { color: 'neutral-600', size: 16 }), jsxRuntime.jsx("div", { className: "p-h4 tc-neutral-600 ml8", children: "Download complete" })] })); };
|
|
14579
14753
|
var DownloadButton = function (_a) {
|
|
14580
14754
|
var downloadStatus = _a.downloadStatus, onDownload = _a.onDownload, _b = _a.className, className = _b === void 0 ? '' : _b, customFail = _a.customFail;
|
|
14581
14755
|
var mapDownloadButton = {
|
|
@@ -14587,9 +14761,9 @@ var DownloadButton = function (_a) {
|
|
|
14587
14761
|
return (jsxRuntime.jsxs("div", { className: "d-flex fd-column ai-center ".concat(className), children: [jsxRuntime.jsx("div", { className: "ws4", children: mapDownloadButton[downloadStatus] }), downloadStatus === 'FAILED' && (jsxRuntime.jsx("div", { className: "p-notice p-notice--danger p-p mt40 wmx5", children: customFail !== null && customFail !== void 0 ? customFail : 'An error occured when generating documents. Please try again or contact us.' }))] }));
|
|
14588
14762
|
};
|
|
14589
14763
|
|
|
14590
|
-
var css_248z$
|
|
14591
|
-
var styles$
|
|
14592
|
-
styleInject(css_248z$
|
|
14764
|
+
var css_248z$C = ".style-module_informationBox__1dzYO {\n border: 1px solid;\n}\n.style-module_informationBox--information__rsyoM {\n background-color: #E5F0FF;\n border-color: #8BB4EA;\n}\n.style-module_informationBox--error__3BqOR {\n background-color: #FEE6E6;\n border-color: #E55454;\n}\n.style-module_informationBox--warning__10V-E {\n background-color: #FEFAEC;\n border-color: #F0D26F;\n}\n.style-module_informationBox--success__d3gTw {\n background-color: #E6FAF1;\n border-color: #85DCB4;\n}\n.style-module_informationBox--neutral__1XsMl {\n background-color: #fff;\n border-color: #fff;\n}";
|
|
14765
|
+
var styles$B = {"informationBox":"style-module_informationBox__1dzYO","informationBox--information":"style-module_informationBox--information__rsyoM","informationBox--error":"style-module_informationBox--error__3BqOR","informationBox--warning":"style-module_informationBox--warning__10V-E","informationBox--success":"style-module_informationBox--success__d3gTw","informationBox--neutral":"style-module_informationBox--neutral__1XsMl"};
|
|
14766
|
+
styleInject(css_248z$C);
|
|
14593
14767
|
|
|
14594
14768
|
var InformationBox = function (_a) {
|
|
14595
14769
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.variant, variant = _c === void 0 ? 'information' : _c, title = _a.title, children = _a.children, showIcon = _a.showIcon, _d = _a.size, size = _d === void 0 ? 'default' : _d;
|
|
@@ -14600,7 +14774,7 @@ var InformationBox = function (_a) {
|
|
|
14600
14774
|
information: 'blue-500',
|
|
14601
14775
|
neutral: 'neutral-900',
|
|
14602
14776
|
};
|
|
14603
|
-
return (jsxRuntime.jsx("div", { className: classNames(className, 'p16 br8 color-black', styles$
|
|
14777
|
+
return (jsxRuntime.jsx("div", { className: classNames(className, 'p16 br8 color-black', styles$B.informationBox, styles$B["informationBox--".concat(variant)]), role: "alert", children: jsxRuntime.jsxs("div", { className: "d-flex", children: [showIcon && (jsxRuntime.jsx("div", { "data-testid": "information-box-icon", className: 'mr8', children: jsxRuntime.jsx(AlertCircleIcon, { className: styles$B.icon, color: mapAlertIconColor[variant], size: size === 'default' ? 24 : 16 }) })), jsxRuntime.jsxs("div", { children: [title && (jsxRuntime.jsx("h4", { "data-testid": "information-box-title", className: classNames(size === 'default' ? 'p-h4' : 'p-h5', 'mb8'), children: title })), jsxRuntime.jsx("p", { className: size === 'default' ? 'p-p' : 'p-p--small', children: children })] })] }) }));
|
|
14604
14778
|
};
|
|
14605
14779
|
|
|
14606
14780
|
var IBAN_CHAR_LIMIT = 4;
|
|
@@ -14684,20 +14858,20 @@ var CurrencyInput = function (_a) {
|
|
|
14684
14858
|
} }, props)));
|
|
14685
14859
|
};
|
|
14686
14860
|
|
|
14687
|
-
var css_248z$
|
|
14688
|
-
var styles$
|
|
14689
|
-
styleInject(css_248z$
|
|
14861
|
+
var css_248z$B = ".style-module_badge__7H1Jt {\n border: 1px solid #fff;\n position: relative;\n gap: 6px;\n}\n.style-module_badge--xsmall__2lIav {\n padding: 4px 10px;\n}\n.style-module_badge--small__cHO6v {\n padding: 6px 12px;\n}\n.style-module_badge--medium__3CekE {\n padding: 6px 16px;\n}\n.style-module_badge--large__3_tWC {\n gap: 8px;\n padding: 8px 16px;\n}\n.style-module_badge--white__QtwA_ {\n background-color: #fff;\n border-color: #f7f7fd;\n}\n.style-module_badge--neutral__7yAYx {\n background-color: #f7f7fd;\n border-color: #f2f2f8;\n}\n.style-module_badge--neutralStrong__1JHph {\n background-color: #e7e7ed;\n border-color: #e7e7ed;\n}\n.style-module_badge--information__1tegJ {\n background-color: #E5F0FF;\n border-color: #DAE8FC;\n}\n.style-module_badge--warning__2UCOz, .style-module_badge--primary__1JGTF {\n background-color: #FEECD3;\n border-color: #FCDAAB;\n}\n.style-module_badge--error__1g5DA {\n background-color: #FEE6E6;\n border-color: #FED7D7;\n}\n.style-module_badge--success__YJJ9N {\n background-color: #E6FAF1;\n border-color: #D5F6E7;\n}\n.style-module_badge--black__sdqec {\n background-color: #26262e;\n border-color: #26262e;\n color: #fff;\n}\n.style-module_badge--secondary__1kblP {\n background-color: #EEEEFE;\n border-color: #E8E7FE;\n}\n.style-module_badge--secondaryStrong__33FDy {\n background-color: #8883D8;\n border-color: #8883D8;\n color: #fff;\n}\n\n.style-module_badgeDot__N2_h5 {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n}\n.style-module_badgeDot--primary__q-_rt, .style-module_badgeDot--warning__1xu_H {\n background-color: #C6824E;\n}\n.style-module_badgeDot--white__2Zi0j {\n background-color: #b8b8c0;\n}\n.style-module_badgeDot--neutral__3Y6Z9 {\n background-color: #919199;\n}\n.style-module_badgeDot--neutralStrong__3KzHS {\n background-color: #696971;\n}\n.style-module_badgeDot--information__1t-rb {\n background-color: #5F7BA0;\n}\n.style-module_badgeDot--error__3Lh5R {\n background-color: #C64848;\n}\n.style-module_badgeDot--success__7tHPA {\n background-color: #599278;\n}\n.style-module_badgeDot--black__2YWa7 {\n background-color: #fff;\n}\n.style-module_badgeDot--secondary__RU2iJ {\n background-color: #6A65AE;\n}\n.style-module_badgeDot--secondaryStrong__3AN6H {\n background-color: #fff;\n}";
|
|
14862
|
+
var styles$A = {"badge":"style-module_badge__7H1Jt","badge--xsmall":"style-module_badge--xsmall__2lIav","badge--small":"style-module_badge--small__cHO6v","badge--medium":"style-module_badge--medium__3CekE","badge--large":"style-module_badge--large__3_tWC","badge--white":"style-module_badge--white__QtwA_","badge--neutral":"style-module_badge--neutral__7yAYx","badge--neutralStrong":"style-module_badge--neutralStrong__1JHph","badge--information":"style-module_badge--information__1tegJ","badge--warning":"style-module_badge--warning__2UCOz","badge--primary":"style-module_badge--primary__1JGTF","badge--error":"style-module_badge--error__1g5DA","badge--success":"style-module_badge--success__YJJ9N","badge--black":"style-module_badge--black__sdqec","badge--secondary":"style-module_badge--secondary__1kblP","badge--secondaryStrong":"style-module_badge--secondaryStrong__33FDy","badgeDot":"style-module_badgeDot__N2_h5","badgeDot--primary":"style-module_badgeDot--primary__q-_rt","badgeDot--warning":"style-module_badgeDot--warning__1xu_H","badgeDot--white":"style-module_badgeDot--white__2Zi0j","badgeDot--neutral":"style-module_badgeDot--neutral__3Y6Z9","badgeDot--neutralStrong":"style-module_badgeDot--neutralStrong__3KzHS","badgeDot--information":"style-module_badgeDot--information__1t-rb","badgeDot--error":"style-module_badgeDot--error__3Lh5R","badgeDot--success":"style-module_badgeDot--success__7tHPA","badgeDot--black":"style-module_badgeDot--black__2YWa7","badgeDot--secondary":"style-module_badgeDot--secondary__RU2iJ","badgeDot--secondaryStrong":"style-module_badgeDot--secondaryStrong__3AN6H"};
|
|
14863
|
+
styleInject(css_248z$B);
|
|
14690
14864
|
|
|
14691
14865
|
var Badge = function (_a) {
|
|
14692
14866
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, _d = _a.variant, variant = _d === void 0 ? 'information' : _d, children = _a.children, _e = _a.showDot, showDot = _e === void 0 ? false : _e;
|
|
14693
|
-
return (jsxRuntime.jsxs("div", { role: "status", className: classNames(className, 'br8 d-inline-flex ai-center fw-bold p-p', styles$
|
|
14867
|
+
return (jsxRuntime.jsxs("div", { role: "status", className: classNames(className, 'br8 d-inline-flex ai-center fw-bold p-p', styles$A.badge, styles$A["badge--".concat(size)], styles$A["badge--".concat(variant)], {
|
|
14694
14868
|
'p-p--small': size === 'small' || size === 'xsmall',
|
|
14695
|
-
}), children: [showDot && (jsxRuntime.jsx("span", { className: classNames(styles$
|
|
14869
|
+
}), children: [showDot && (jsxRuntime.jsx("span", { className: classNames(styles$A.badgeDot, styles$A["badgeDot--".concat(variant)]) })), children] }));
|
|
14696
14870
|
};
|
|
14697
14871
|
|
|
14698
|
-
var css_248z$
|
|
14699
|
-
var styles$
|
|
14700
|
-
styleInject(css_248z$
|
|
14872
|
+
var css_248z$A = ".styles-module_container__3zJJC {\n max-width: 100%;\n}\n\n.styles-module_narrow__2p34b {\n max-width: 424px;\n}";
|
|
14873
|
+
var styles$z = {"container":"styles-module_container__3zJJC","narrow":"styles-module_narrow__2p34b"};
|
|
14874
|
+
styleInject(css_248z$A);
|
|
14701
14875
|
|
|
14702
14876
|
var Checkbox = function (_a) {
|
|
14703
14877
|
var _b;
|
|
@@ -14729,8 +14903,8 @@ var Checkbox = function (_a) {
|
|
|
14729
14903
|
var legend = fieldLegend !== null && fieldLegend !== void 0 ? fieldLegend : (Object.keys(options).length > 1
|
|
14730
14904
|
? 'Select one or more options'
|
|
14731
14905
|
: 'You may select this option');
|
|
14732
|
-
return (jsxRuntime.jsxs("fieldset", { className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$
|
|
14733
|
-
_b[styles$
|
|
14906
|
+
return (jsxRuntime.jsxs("fieldset", { className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$z.container, 'd-flex gap8', (_b = {},
|
|
14907
|
+
_b[styles$z.narrow] = !wide,
|
|
14734
14908
|
_b['fd-row'] = inlineLayout,
|
|
14735
14909
|
_b['f-wrap'] = inlineLayout,
|
|
14736
14910
|
_b['fd-column'] = !inlineLayout,
|
|
@@ -14748,18 +14922,18 @@ var Checkbox = function (_a) {
|
|
|
14748
14922
|
})] }));
|
|
14749
14923
|
};
|
|
14750
14924
|
|
|
14751
|
-
var css_248z$
|
|
14752
|
-
var styles$
|
|
14753
|
-
styleInject(css_248z$
|
|
14925
|
+
var css_248z$z = ".styles-module_container__3M-sc {\n max-width: 100%;\n}\n\n.styles-module_narrow__3VUzp {\n max-width: 424px;\n}\n\n.styles-module_wide__3nLhz {\n max-width: 736px;\n}";
|
|
14926
|
+
var styles$y = {"container":"styles-module_container__3M-sc","narrow":"styles-module_narrow__3VUzp","wide":"styles-module_wide__3nLhz"};
|
|
14927
|
+
styleInject(css_248z$z);
|
|
14754
14928
|
|
|
14755
14929
|
var Radio = function (_a) {
|
|
14756
14930
|
var _b;
|
|
14757
14931
|
var options = _a.options, value = _a.value, onChange = _a.onChange, _c = _a.wide, wide = _c === void 0 ? false : _c, _d = _a.inlineLayout, inlineLayout = _d === void 0 ? false : _d, _e = _a.inlineIcon, inlineIcon = _e === void 0 ? false : _e, classNamesObj = _a.classNames, _f = _a.bordered, bordered = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.fieldLegend, fieldLegend = _h === void 0 ? 'Select an option' : _h, groupName = _a.groupName;
|
|
14758
14932
|
var entries = Object.entries(options);
|
|
14759
14933
|
var name = groupName !== null && groupName !== void 0 ? groupName : generateId();
|
|
14760
|
-
return (jsxRuntime.jsxs("fieldset", { className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$
|
|
14761
|
-
_b[styles$
|
|
14762
|
-
_b[styles$
|
|
14934
|
+
return (jsxRuntime.jsxs("fieldset", { className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$y.container, 'd-flex gap8', (_b = {},
|
|
14935
|
+
_b[styles$y.wide] = wide,
|
|
14936
|
+
_b[styles$y.narrow] = !wide,
|
|
14763
14937
|
_b['fd-row'] = inlineLayout,
|
|
14764
14938
|
_b['f-wrap'] = inlineLayout,
|
|
14765
14939
|
_b['fd-column'] = !inlineLayout,
|
|
@@ -14782,9 +14956,9 @@ var Radio = function (_a) {
|
|
|
14782
14956
|
})] }));
|
|
14783
14957
|
};
|
|
14784
14958
|
|
|
14785
|
-
var css_248z$
|
|
14786
|
-
var styles$
|
|
14787
|
-
styleInject(css_248z$
|
|
14959
|
+
var css_248z$y = "@keyframes style-module_appear-in__3U2lu {\n 0% {\n transform: translateY(100%);\n }\n 80% {\n transform: translateY(-2%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@keyframes style-module_disappear-out__6pOVr {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(100%);\n }\n}\n.style-module_wrapper__200Xu {\n position: relative;\n top: 0;\n overflow: hidden;\n}\n\n.style-module_container__aOENo {\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n overflow: auto;\n max-height: 90vh;\n bottom: 0;\n position: fixed;\n animation-name: style-module_appear-in__3U2lu;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-in;\n}\n.style-module_containerClose__3-nqc {\n animation-name: style-module_disappear-out__6pOVr;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n@media (max-width: 34rem) {\n .style-module_body__3yNly {\n padding-bottom: 48px;\n }\n}";
|
|
14960
|
+
var styles$x = {"wrapper":"style-module_wrapper__200Xu","container":"style-module_container__aOENo","containerClose":"style-module_containerClose__3-nqc","body":"style-module_body__3yNly"};
|
|
14961
|
+
styleInject(css_248z$y);
|
|
14788
14962
|
|
|
14789
14963
|
var useOnClose = function (onClose, isOpen, dismissable) {
|
|
14790
14964
|
var _a = React.useState(false), isVisible = _a[0], setIsVisible = _a[1];
|
|
@@ -14876,9 +15050,9 @@ var useModalTrack = function (isVisible) {
|
|
|
14876
15050
|
}, [isVisible, dirtySwan]);
|
|
14877
15051
|
};
|
|
14878
15052
|
|
|
14879
|
-
var css_248z$
|
|
14880
|
-
var styles$
|
|
14881
|
-
styleInject(css_248z$
|
|
15053
|
+
var css_248z$x = "@keyframes style-module_fade-in__f_VRg {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n visibility: hidden;\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n visibility: visible;\n }\n}\n@keyframes style-module_fade-out__1tEwS {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n visibility: visible;\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n visibility: hidden;\n }\n}\n.style-module_overlay__2f00R {\n z-index: 1000;\n overflow: hidden;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__f_VRg 0.3s both;\n}\n.style-module_overlayClose__1p313 {\n animation-delay: 0.1s;\n animation: style-module_fade-out__1tEwS 0.3s both;\n}\n\n.style-module_header__284Rz {\n position: sticky;\n top: 0;\n}\n\n.style-module_closeButton__1AbX8 {\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.style-module_body__QtlTn {\n flex-grow: 1;\n overflow: auto;\n background: linear-gradient(#fff 30%, #fff), linear-gradient(#fff, #fff 70%), linear-gradient(#e7e7ed 30%, #e7e7ed), linear-gradient(#e7e7ed, #e7e7ed 70%);\n background-repeat: no-repeat;\n background-size: 100% 1px;\n background-attachment: local, local, scroll, scroll;\n}\n\n.style-module_footer__Sh5bv {\n position: sticky;\n bottom: 0;\n border-top: 1px solid #e7e7ed;\n}";
|
|
15054
|
+
var styles$w = {"overlay":"style-module_overlay__2f00R","overlayClose":"style-module_overlayClose__1p313","header":"style-module_header__284Rz","closeButton":"style-module_closeButton__1AbX8","body":"style-module_body__QtlTn","footer":"style-module_footer__Sh5bv"};
|
|
15055
|
+
styleInject(css_248z$x);
|
|
14882
15056
|
|
|
14883
15057
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
14884
15058
|
if (null == r) return {};
|
|
@@ -17699,16 +17873,16 @@ var InnerModal = function (_a) {
|
|
|
17699
17873
|
(_a = modalBodyRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', handleOnScroll);
|
|
17700
17874
|
};
|
|
17701
17875
|
}, []);
|
|
17702
|
-
return (jsxRuntime.jsx("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.overlay, styles$
|
|
17703
|
-
_b[styles$
|
|
17876
|
+
return (jsxRuntime.jsx("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.overlay, styles$w.overlay, (_b = {},
|
|
17877
|
+
_b[styles$w.overlayClose] = isClosing,
|
|
17704
17878
|
_b)), onAnimationEnd: handleOnCloseAnimationEnded, onClick: handleOnOverlayClick, children: jsxRuntime.jsx("div", { className: typeof (classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper) === 'string'
|
|
17705
17879
|
? classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper
|
|
17706
17880
|
: (_c = classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper) === null || _c === void 0 ? void 0 : _c.call(classNames$1, { isClosing: isClosing }), children: jsxRuntime.jsx(FocusLockCombination, { returnFocus: true, className: "m-auto", children: jsxRuntime.jsxs("div", { "aria-modal": "true", role: "dialog", className: typeof (classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container) === 'string'
|
|
17707
17881
|
? classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container
|
|
17708
|
-
: (_d = classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container) === null || _d === void 0 ? void 0 : _d.call(classNames$1, { isClosing: isClosing }), onClick: handleContainerClick, children: [jsxRuntime.jsxs("div", { className: classNames('bg-white d-flex ai-center w100 px24 pt24 pb16', styles$
|
|
17882
|
+
: (_d = classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container) === null || _d === void 0 ? void 0 : _d.call(classNames$1, { isClosing: isClosing }), onClick: handleContainerClick, children: [jsxRuntime.jsxs("div", { className: classNames('bg-white d-flex ai-center w100 px24 pt24 pb16', styles$w.header, {
|
|
17709
17883
|
'jc-between': !!title,
|
|
17710
17884
|
'jc-end': !title,
|
|
17711
|
-
}), children: [title && (jsxRuntime.jsx("div", { className: classNames(styles$
|
|
17885
|
+
}), children: [title && (jsxRuntime.jsx("div", { className: classNames(styles$w.title, titleSize === 'small' ? 'p-h4' : 'p-h2', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.title), children: title })), dismissible && (jsxRuntime.jsx(Button, { hideLabel: true, leftIcon: jsxRuntime.jsx(XIcon, { color: "neutral-800", className: classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.closeButtonIcon }), onClick: handleOnClose, type: "button", variant: "textBlack", className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.closeButton, 'p0', styles$w.closeButton), children: "Close modal" }))] }), jsxRuntime.jsx("div", { className: classNames('w100', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.body, styles$w.body), ref: modalBodyRef, children: children }), footer && (jsxRuntime.jsx("div", { className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.footer, 'w100 bg-white', styles$w.footer), children: jsxRuntime.jsx("div", { className: "p24 pt16 pb32", children: footer }) }))] }) }) }) }));
|
|
17712
17886
|
};
|
|
17713
17887
|
var GenericModal = function (props) {
|
|
17714
17888
|
var isOpen = props.isOpen, onClose = props.onClose, _a = props.dismissible, dismissible = _a === void 0 ? true : _a;
|
|
@@ -17722,33 +17896,33 @@ var GenericModal = function (props) {
|
|
|
17722
17896
|
|
|
17723
17897
|
var BottomModal = function (_a) {
|
|
17724
17898
|
var className = _a.className, classNames$1 = _a.classNames, rest = __rest$1(_a, ["className", "classNames"]);
|
|
17725
|
-
return (jsxRuntime.jsx(GenericModal, __assign({ titleSize: "default", classNames: __assign(__assign({}, classNames$1), { wrapper: classNames('w100', styles$
|
|
17899
|
+
return (jsxRuntime.jsx(GenericModal, __assign({ titleSize: "default", classNames: __assign(__assign({}, classNames$1), { wrapper: classNames('w100', styles$x.wrapper, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper), container: function (_a) {
|
|
17726
17900
|
var _b;
|
|
17727
17901
|
var isClosing = _a.isClosing;
|
|
17728
|
-
return classNames('bg-white d-flex fd-column w100', className, styles$
|
|
17729
|
-
_b[styles$
|
|
17902
|
+
return classNames('bg-white d-flex fd-column w100', className, styles$x.container, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container, (_b = {},
|
|
17903
|
+
_b[styles$x.containerClose] = isClosing,
|
|
17730
17904
|
_b));
|
|
17731
|
-
}, body: classNames(styles$
|
|
17905
|
+
}, body: classNames(styles$x.body, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.body) }) }, rest)));
|
|
17732
17906
|
};
|
|
17733
17907
|
|
|
17734
|
-
var css_248z$
|
|
17735
|
-
var styles$
|
|
17736
|
-
styleInject(css_248z$
|
|
17908
|
+
var css_248z$w = "@keyframes style-module_appear-in__2ZMqz {\n 0% {\n transform: translateY(24px);\n opacity: 0;\n visibility: hidden;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n visibility: visible;\n }\n}\n@keyframes style-module_disappear-out__38TSV {\n 0% {\n transform: translateY(0);\n opacity: 1;\n visibility: visible;\n }\n 100% {\n transform: translateY(24px);\n opacity: 0;\n visibility: hidden;\n }\n}\n.style-module_wrapper__qQirD {\n position: relative;\n min-height: 100%;\n animation-name: style-module_appear-in__2ZMqz;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n.style-module_wrapperClose__2aXSB {\n animation-name: style-module_disappear-out__38TSV;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.style-module_container__1XZj_ {\n max-height: 90vh;\n overflow: hidden;\n}";
|
|
17909
|
+
var styles$v = {"wrapper":"style-module_wrapper__qQirD","wrapperClose":"style-module_wrapperClose__2aXSB","container":"style-module_container__1XZj_"};
|
|
17910
|
+
styleInject(css_248z$w);
|
|
17737
17911
|
|
|
17738
17912
|
var RegularModal = function (_a) {
|
|
17739
17913
|
var _b = _a.className, className = _b === void 0 ? '' : _b, classNames$1 = _a.classNames, size = _a.size, rest = __rest$1(_a, ["className", "classNames", "size"]);
|
|
17740
17914
|
return (jsxRuntime.jsx(GenericModal, __assign({ classNames: __assign(__assign({}, classNames$1), { wrapper: function (_a) {
|
|
17741
17915
|
var _b;
|
|
17742
17916
|
var isClosing = _a.isClosing;
|
|
17743
|
-
return classNames('d-flex ai-center w90 mx-auto my0', className, styles$
|
|
17744
|
-
_b[styles$
|
|
17917
|
+
return classNames('d-flex ai-center w90 mx-auto my0', className, styles$v.wrapper, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper, (_b = {},
|
|
17918
|
+
_b[styles$v.wrapperClose] = isClosing,
|
|
17745
17919
|
_b));
|
|
17746
|
-
}, container: classNames('bg-white br8 d-flex ai-center fd-column mx-auto my0', styles$
|
|
17920
|
+
}, container: classNames('bg-white br8 d-flex ai-center fd-column mx-auto my0', styles$v.container, size === 'large' ? 'wmx10' : 'wmx8', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container) }) }, rest)));
|
|
17747
17921
|
};
|
|
17748
17922
|
|
|
17749
|
-
var css_248z$
|
|
17750
|
-
var styles$
|
|
17751
|
-
styleInject(css_248z$
|
|
17923
|
+
var css_248z$v = "@media (min-width: 34rem) {\n .style-module_mobile__3k175 {\n display: none;\n }\n}\n@media (max-width: 34rem) {\n .style-module_mobile__3k175 {\n display: block !important;\n }\n}\n\n@media (max-width: 34rem) {\n .style-module_desktop__2lclr {\n display: none;\n }\n}";
|
|
17924
|
+
var styles$u = {"mobile":"style-module_mobile__3k175","desktop":"style-module_desktop__2lclr"};
|
|
17925
|
+
styleInject(css_248z$v);
|
|
17752
17926
|
|
|
17753
17927
|
var BottomOrRegularModal = function (_a) {
|
|
17754
17928
|
var isOpen = _a.isOpen, props = __rest$1(_a, ["isOpen"]);
|
|
@@ -17767,27 +17941,27 @@ var BottomOrRegularModal = function (_a) {
|
|
|
17767
17941
|
window.removeEventListener('resize', handleResize);
|
|
17768
17942
|
};
|
|
17769
17943
|
}, []);
|
|
17770
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$
|
|
17944
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$u.mobile, ref: mobileRef, children: visibleSize === 'mobile' && jsxRuntime.jsx(BottomModal, __assign({}, props, { isOpen: isOpen })) }), visibleSize === 'desktop' && (jsxRuntime.jsx("div", { className: styles$u.desktop, children: jsxRuntime.jsx(RegularModal, __assign({}, props, { isOpen: isOpen })) }))] }));
|
|
17771
17945
|
};
|
|
17772
17946
|
|
|
17773
|
-
var css_248z$
|
|
17774
|
-
var styles$
|
|
17775
|
-
styleInject(css_248z$
|
|
17947
|
+
var css_248z$u = "@keyframes style-module_appear-in__5YBuA {\n 0% {\n opacity: 0;\n visibility: hidden;\n }\n 100% {\n opacity: 1;\n visibility: visible;\n }\n}\n@keyframes style-module_disappear-out__33q3c {\n 0% {\n opacity: 1;\n visibility: visible;\n }\n 100% {\n opacity: 0;\n visibility: hidden;\n }\n}\n.style-module_container__dyFzK {\n max-height: 100vh;\n top: 0;\n bottom: 0;\n position: fixed;\n animation-name: style-module_appear-in__5YBuA;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n.style-module_containerClose__39rB7 {\n animation-name: style-module_disappear-out__33q3c;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n@media (max-width: 34rem) {\n .style-module_body__3Fuui {\n padding-bottom: 48px;\n }\n}";
|
|
17948
|
+
var styles$t = {"container":"style-module_container__dyFzK","containerClose":"style-module_containerClose__39rB7","body":"style-module_body__3Fuui"};
|
|
17949
|
+
styleInject(css_248z$u);
|
|
17776
17950
|
|
|
17777
17951
|
var FullScreenModal = function (_a) {
|
|
17778
17952
|
var className = _a.className, classNames$1 = _a.classNames, rest = __rest$1(_a, ["className", "classNames"]);
|
|
17779
17953
|
return (jsxRuntime.jsx(GenericModal, __assign({ titleSize: "small", classNames: __assign(__assign({}, classNames$1), { wrapper: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper, 'w100'), container: function (_a) {
|
|
17780
17954
|
var _b;
|
|
17781
17955
|
var isClosing = _a.isClosing;
|
|
17782
|
-
return classNames('bg-white d-flex fd-column w100', className, styles$
|
|
17783
|
-
_b[styles$
|
|
17956
|
+
return classNames('bg-white d-flex fd-column w100', className, styles$t.container, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.container, (_b = {},
|
|
17957
|
+
_b[styles$t.containerClose] = isClosing,
|
|
17784
17958
|
_b));
|
|
17785
|
-
}, body: classNames(styles$
|
|
17959
|
+
}, body: classNames(styles$t.body, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.body) }) }, rest)));
|
|
17786
17960
|
};
|
|
17787
17961
|
|
|
17788
|
-
var css_248z$
|
|
17789
|
-
var styles$
|
|
17790
|
-
styleInject(css_248z$
|
|
17962
|
+
var css_248z$t = ".style-module_border-strong-default__3_zF3 {\n border: 1px solid #d2d2d9;\n}\n\n.style-module_border-strong-hover__2gkuG {\n border: 1px solid #919199;\n}\n\n.style-module_border-strong-active__3BFbj {\n border: 1px solid #26262e;\n}\n\n.style-module_border-medium-default__21dIE {\n border: 1px solid #e7e7ed;\n}\n\n.style-module_border-medium-hover__Pq6pQ {\n border: 1px solid #b8b8c0;\n}\n\n.style-module_border-medium-active__uLwlN {\n border: 1px solid #3f3f47;\n}\n\n.style-module_border-soft-default__398BS {\n border: 1px solid #f2f2f8;\n}\n\n.style-module_border-soft-hover__30OW0 {\n border: 1px solid #d2d2d9;\n}\n\n.style-module_border-soft-active__eUC5s {\n border: 1px solid #919199;\n}\n\n.style-module_border-focus__28f29 {\n border: 2px solid #26262e;\n}\n\n.style-module_wrapper__35C6V {\n background-color: #fff;\n border: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n}\n.style-module_wrapper--default__NYcwG {\n background-color: #fff;\n}\n.style-module_wrapper--defaultNoShadow__2x-zI {\n border: 1px solid #f2f2f8;\n}\n.style-module_wrapper--transparent__1M1sg {\n background-color: transparent;\n}\n.style-module_wrapper--outline__3fBDi {\n background-color: #fff;\n border: 1px solid #d2d2d9;\n}\n.style-module_wrapper--secondary__1l7bB {\n background-color: #EEEEFE;\n}\n.style-module_wrapper--primary__Sulin {\n background-color: #FEECD3;\n}\n\n.style-module_button__P-UIa {\n background-color: transparent;\n color: #26262e;\n outline: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n text-decoration: none;\n border-radius: 8px;\n border: 1px solid transparent;\n outline: 1px solid transparent;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):hover .style-module_wrapper--default__NYcwG {\n border: 1px solid #d2d2d9;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):hover .style-module_wrapper--transparent__1M1sg {\n background-color: #f9f9fd;\n border-color: transparent;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):hover .style-module_wrapper--outline__3fBDi {\n background-color: #fff;\n border: 1px solid #26262e;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):hover .style-module_wrapper--secondary__1l7bB {\n background-color: #EEEEFE;\n border-color: #B8B4F3;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):hover .style-module_wrapper--primary__Sulin {\n background-color: #FEECD3;\n border-color: #F2B873;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):focus-visible .style-module_wrapper__35C6V {\n border-color: #26262e;\n box-shadow: inset 0 0 0 1px #26262e;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):focus-visible .style-module_wrapper--default__NYcwG {\n border-color: #26262e;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):focus-visible .style-module_wrapper--outline__3fBDi {\n border-color: #26262e;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):focus-visible .style-module_wrapper--transparent__1M1sg {\n background-color: #f2f2f8;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):active .style-module_wrapper__35C6V {\n border-color: #b8b8c0;\n box-shadow: inset 0 0 0 1px #b8b8c0;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):active .style-module_wrapper--outline__3fBDi {\n border-color: #26262e;\n box-shadow: inset 0 0 0 1px #26262e;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):active .style-module_wrapper--transparent__1M1sg {\n background-color: #f2f2f8;\n border-color: transparent;\n box-shadow: none;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):active .style-module_wrapper--primary__Sulin {\n border-color: #F2B873;\n box-shadow: inset 0 0 0 1px #F2B873;\n}\n.style-module_button__P-UIa:not(.style-module_buttonDisabled__3wmX3):active .style-module_wrapper--secondary__1l7bB {\n border-color: #8883D8;\n box-shadow: inset 0 0 0 1px #8883D8;\n}\n.style-module_buttonDisabled__3wmX3 {\n cursor: not-allowed;\n opacity: 0.6;\n}\n@media (pointer: coarse) {\n .style-module_button__P-UIa:hover .style-module_wrapper__35C6V, .style-module_button__P-UIa:active .style-module_wrapper__35C6V {\n background-color: #fff;\n border: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n }\n .style-module_button__P-UIa:hover .style-module_wrapper--default__NYcwG, .style-module_button__P-UIa:active .style-module_wrapper--default__NYcwG {\n background-color: #fff;\n }\n .style-module_button__P-UIa:hover .style-module_wrapper--defaultNoShadow__2x-zI, .style-module_button__P-UIa:active .style-module_wrapper--defaultNoShadow__2x-zI {\n border: 1px solid #f2f2f8;\n }\n .style-module_button__P-UIa:hover .style-module_wrapper--transparent__1M1sg, .style-module_button__P-UIa:active .style-module_wrapper--transparent__1M1sg {\n background-color: transparent;\n }\n .style-module_button__P-UIa:hover .style-module_wrapper--outline__3fBDi, .style-module_button__P-UIa:active .style-module_wrapper--outline__3fBDi {\n background-color: #fff;\n border: 1px solid #d2d2d9;\n }\n .style-module_button__P-UIa:hover .style-module_wrapper--secondary__1l7bB, .style-module_button__P-UIa:active .style-module_wrapper--secondary__1l7bB {\n background-color: #EEEEFE;\n }\n .style-module_button__P-UIa:hover .style-module_wrapper--primary__Sulin, .style-module_button__P-UIa:active .style-module_wrapper--primary__Sulin {\n background-color: #FEECD3;\n }\n}\n\n.style-module_smallPadding__19rsl {\n padding: 20px !important;\n}\n\n.style-module_icon__15X1c {\n margin-right: 12px;\n color: #26262e;\n}\n.style-module_iconDensity--small__3JnzO {\n margin-right: 14px;\n}\n.style-module_iconDensity--medium__2TmAl {\n margin-right: 16px;\n}\n.style-module_iconDensity--large__1YzHv {\n margin-right: 20px;\n}\n\n.style-module_actionIcon__3pnwR {\n color: #26262e;\n margin-left: 12px;\n}\n.style-module_actionIconDensity--small__37jvs {\n margin-right: 14px;\n}\n.style-module_actionIconDensity--medium__3SnW2 {\n margin-right: 16px;\n}\n.style-module_actionIconDensity--large__mZD03 {\n margin-right: 20px;\n}\n\n.style-module_description__ksrnP {\n color: #696971;\n}\n.style-module_description--primary__2h0cB {\n color: #3f3f47;\n}";
|
|
17963
|
+
var styles$s = {"border-strong-default":"style-module_border-strong-default__3_zF3","border-strong-hover":"style-module_border-strong-hover__2gkuG","border-strong-active":"style-module_border-strong-active__3BFbj","border-medium-default":"style-module_border-medium-default__21dIE","border-medium-hover":"style-module_border-medium-hover__Pq6pQ","border-medium-active":"style-module_border-medium-active__uLwlN","border-soft-default":"style-module_border-soft-default__398BS","border-soft-hover":"style-module_border-soft-hover__30OW0","border-soft-active":"style-module_border-soft-active__eUC5s","border-focus":"style-module_border-focus__28f29","wrapper":"style-module_wrapper__35C6V","wrapper--default":"style-module_wrapper--default__NYcwG","wrapper--defaultNoShadow":"style-module_wrapper--defaultNoShadow__2x-zI","wrapper--transparent":"style-module_wrapper--transparent__1M1sg","wrapper--outline":"style-module_wrapper--outline__3fBDi","wrapper--secondary":"style-module_wrapper--secondary__1l7bB","wrapper--primary":"style-module_wrapper--primary__Sulin","button":"style-module_button__P-UIa","buttonDisabled":"style-module_buttonDisabled__3wmX3","smallPadding":"style-module_smallPadding__19rsl","icon":"style-module_icon__15X1c","iconDensity--small":"style-module_iconDensity--small__3JnzO","iconDensity--medium":"style-module_iconDensity--medium__2TmAl","iconDensity--large":"style-module_iconDensity--large__1YzHv","actionIcon":"style-module_actionIcon__3pnwR","actionIconDensity--small":"style-module_actionIconDensity--small__37jvs","actionIconDensity--medium":"style-module_actionIconDensity--medium__3SnW2","actionIconDensity--large":"style-module_actionIconDensity--large__mZD03","description":"style-module_description__ksrnP","description--primary":"style-module_description--primary__2h0cB"};
|
|
17964
|
+
styleInject(css_248z$t);
|
|
17791
17965
|
|
|
17792
17966
|
var cardDefaultAs = 'section';
|
|
17793
17967
|
var Card = function (_a) {
|
|
@@ -17800,23 +17974,23 @@ var Card = function (_a) {
|
|
|
17800
17974
|
return (jsxRuntime.jsx(Tag, __assign({ className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.buttonWrapper, 'd-flex w100 ai-stretch', (_b = {
|
|
17801
17975
|
'c-pointer': propsWithActionIcon && !disabled
|
|
17802
17976
|
},
|
|
17803
|
-
_b[styles$
|
|
17804
|
-
_b[styles$
|
|
17977
|
+
_b[styles$s.button] = propsWithActionIcon,
|
|
17978
|
+
_b[styles$s.buttonDisabled] = propsWithActionIcon && disabled,
|
|
17805
17979
|
_b)) }, onClick && {
|
|
17806
17980
|
onClick: onClick,
|
|
17807
17981
|
type: "button"
|
|
17808
17982
|
}, { disabled: disabled }, rest, { children: jsxRuntime.jsxs("div", { className: classNames('d-flex fd-column jc-center w100 ta-left br8', { 'bs-sm': dropShadow && variant === 'default' }, {
|
|
17809
17983
|
xsmall: 'p16',
|
|
17810
|
-
small: styles$
|
|
17984
|
+
small: styles$s.smallPadding,
|
|
17811
17985
|
medium: 'p24',
|
|
17812
17986
|
large: 'p32',
|
|
17813
17987
|
}[density], {
|
|
17814
17988
|
top: 'jc-start',
|
|
17815
17989
|
center: 'jc-center',
|
|
17816
17990
|
bottom: 'jc-end',
|
|
17817
|
-
}[verticalAlignment], styles$
|
|
17818
|
-
_c[styles$
|
|
17819
|
-
_c), classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper), children: [jsxRuntime.jsxs("div", { className: "d-flex w100", children: [icon && (jsxRuntime.jsx("div", { className: classNames("d-flex", styles$
|
|
17991
|
+
}[verticalAlignment], styles$s === null || styles$s === void 0 ? void 0 : styles$s.wrapper, styles$s === null || styles$s === void 0 ? void 0 : styles$s["wrapper--".concat(variant)], (_c = {},
|
|
17992
|
+
_c[styles$s === null || styles$s === void 0 ? void 0 : styles$s["wrapper--defaultNoShadow"]] = !dropShadow && variant === 'default',
|
|
17993
|
+
_c), classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper), children: [jsxRuntime.jsxs("div", { className: "d-flex w100", children: [icon && (jsxRuntime.jsx("div", { className: classNames("d-flex", styles$s.icon, styles$s["iconDensity--".concat(density)], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon, {
|
|
17820
17994
|
top: 'ai-start',
|
|
17821
17995
|
center: 'ai-center',
|
|
17822
17996
|
bottom: 'ai-end',
|
|
@@ -17824,51 +17998,51 @@ var Card = function (_a) {
|
|
|
17824
17998
|
large: 'p-h3',
|
|
17825
17999
|
medium: 'p-h4',
|
|
17826
18000
|
small: 'p-p',
|
|
17827
|
-
}[titleVariant]), children: title })), description && (jsxRuntime.jsx("div", { className: classNames(styles$
|
|
18001
|
+
}[titleVariant]), children: title })), description && (jsxRuntime.jsx("div", { className: classNames(styles$s.description, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.description, descriptionVariant === 'small' ? 'p-p--small' : 'p-p', styles$s === null || styles$s === void 0 ? void 0 : styles$s["description--".concat(variant)]), children: description }))] }), (showActionIcon || (propsWithActionIcon && !hideActionIcon)) && (jsxRuntime.jsx("div", { className: classNames(styles$s.actionIcon, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.actionIcon, styles$s["actionIconDensity--".concat(density)], 'd-flex ai-center'), children: actionIcon || jsxRuntime.jsx(ChevronRightIcon, { size: 24 }) }))] })] }), children && jsxRuntime.jsx("div", { className: classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.children, children: children })] }) })));
|
|
17828
18002
|
};
|
|
17829
18003
|
|
|
17830
|
-
var css_248z$
|
|
17831
|
-
var styles$
|
|
17832
|
-
styleInject(css_248z$
|
|
18004
|
+
var css_248z$s = ".style-module_bs-xs__2s8AD {\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03);\n}\n\n.style-module_bs-sm__2KgTp {\n box-shadow: 0 2px 20px 0 rgba(38, 38, 46, 0.04);\n}\n\n.style-module_bs-md__3yrN1 {\n box-shadow: 0 2px 28px rgba(38, 38, 46, 0.08);\n}\n\n.style-module_bs-lg__Ydmy8 {\n box-shadow: 0 2px 32px rgba(38, 38, 46, 0.1);\n}\n\n.style-module_bs-xl__9OYoN {\n box-shadow: 0 2px 50px rgba(38, 38, 46, 0.18);\n}\n\n.style-module_bannerWrapper__1m3mn {\n padding-top: 124px;\n}\n\n.style-module_wrapper__rVPyi {\n border-radius: 12px;\n border: 1px solid #e7e7ed;\n}\n\n.style-module_buttonWrapper__-dmFc {\n border-radius: 12px;\n}\n\n.style-module_buttonWrapper__-dmFc:focus .style-module_wrapper__rVPyi {\n border-color: #696971;\n box-shadow: 0 0 0 1px #696971;\n}\n\n.style-module_buttonWrapper__-dmFc:focus-visible .style-module_wrapper__rVPyi {\n overflow: hidden;\n border-color: #26262e;\n box-shadow: 0 0 0 1px #26262e;\n}\n\n.style-module_topIconWrapper__VYKR7 {\n position: absolute;\n width: 80px;\n height: 80px;\n border-radius: 12px;\n left: 50%;\n transform: translateX(-50%) translateY(-80px);\n}\n.style-module_topIconWrapper--muted__2a4Lq {\n opacity: 0.25;\n}\n\n.style-module_topIconImage__3NQMd {\n width: 80px;\n height: 80px;\n border-radius: 12px;\n background-color: #FDF2E2;\n overflow: hidden;\n}\n.style-module_topIconImage__3NQMd img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 12px;\n}\n\n.style-module_topIconBanner__31-Hc {\n position: absolute;\n top: -123px;\n left: -15px;\n right: -15px;\n height: 124px;\n width: calc(100% + 30px);\n overflow: hidden;\n}\n.style-module_topIconBanner__31-Hc img {\n position: absolute;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n min-width: 100%;\n min-height: 100%;\n}\n\n.style-module_title__31OJa {\n margin-top: 20px;\n}\n\n.style-module_contentWrapper__B1Dn1 {\n gap: 0 !important;\n}\n\n.style-module_floatingLabel__1iIBj {\n position: relative;\n}\n\n.style-module_disabled__1u28- {\n opacity: 0.25;\n cursor: not-allowed;\n}";
|
|
18005
|
+
var styles$r = {"bannerWrapper":"style-module_bannerWrapper__1m3mn","wrapper":"style-module_wrapper__rVPyi","buttonWrapper":"style-module_buttonWrapper__-dmFc","topIconWrapper":"style-module_topIconWrapper__VYKR7","topIconImage":"style-module_topIconImage__3NQMd","topIconBanner":"style-module_topIconBanner__31-Hc","title":"style-module_title__31OJa","contentWrapper":"style-module_contentWrapper__B1Dn1","floatingLabel":"style-module_floatingLabel__1iIBj","disabled":"style-module_disabled__1u28-"};
|
|
18006
|
+
styleInject(css_248z$s);
|
|
17833
18007
|
|
|
17834
18008
|
var InfoCard = function (_a) {
|
|
17835
18009
|
var _b, _c, _d, _e;
|
|
17836
18010
|
_a.className; var _f = _a.showIcon, showIcon = _f === void 0 ? true : _f, title = _a.title, children = _a.children, topIcon = _a.topIcon, topIconType = _a.topIconType, _g = _a.disabled, disabled = _g === void 0 ? false : _g, onClick = _a.onClick, cardProps = __rest$1(_a, ["className", "showIcon", "title", "children", "topIcon", "topIconType", "disabled", "onClick"]);
|
|
17837
18011
|
var isIconType = topIconType === 'icon' || topIconType === 'iconWithBackground';
|
|
17838
18012
|
var isFloatingType = isIconType;
|
|
17839
|
-
return (jsxRuntime.jsx(Card, __assign({}, cardProps, { label: topIcon && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isIconType ? (jsxRuntime.jsx("div", { className: classNames('d-flex ai-center jc-center p16 bg-orange-200', styles$
|
|
17840
|
-
_d[styles$
|
|
17841
|
-
_d[styles$
|
|
18013
|
+
return (jsxRuntime.jsx(Card, __assign({}, cardProps, { label: topIcon && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isIconType ? (jsxRuntime.jsx("div", { className: classNames('d-flex ai-center jc-center p16 bg-orange-200', styles$r.topIconWrapper), children: topIcon })) : (jsxRuntime.jsx("div", { className: classNames('d-flex ai-center jc-center', (_b = {}, _b[styles$r.topIconBanner] = topIconType === 'banner', _b), (_c = {}, _c[styles$r.topIconImage] = topIconType === 'image', _c)), children: topIcon })) })), title: title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [title, showIcon && jsxRuntime.jsx(ArrowRight, { size: 20 })] })), titleVariant: 'medium', description: children, descriptionVariant: 'small', dropShadow: false, actionIcon: null, showActionIcon: false, classNames: __assign({ buttonWrapper: styles$r.buttonWrapper, wrapper: classNames((_d = {},
|
|
18014
|
+
_d[styles$r.wrapper] = true,
|
|
18015
|
+
_d[styles$r.disabled] = disabled,
|
|
17842
18016
|
_d['pt40'] = topIcon && isFloatingType,
|
|
17843
18017
|
_d['mt40'] = topIcon && isFloatingType,
|
|
17844
|
-
_d[styles$
|
|
18018
|
+
_d[styles$r.bannerWrapper] = topIcon && topIconType === 'banner',
|
|
17845
18019
|
_d)), label: classNames('d-flex jc-center', (_e = {},
|
|
17846
|
-
_e[styles$
|
|
17847
|
-
_e)), title: classNames({ 'mt16': topIcon && topIconType === 'banner' }, 'd-flex ai-center jc-center ta-center mb8', styles$
|
|
18020
|
+
_e[styles$r.floatingLabel] = topIcon && (isFloatingType || topIconType === 'banner'),
|
|
18021
|
+
_e)), title: classNames({ 'mt16': topIcon && topIconType === 'banner' }, 'd-flex ai-center jc-center ta-center mb8', styles$r.title), description: 'ta-center', contentWrapper: styles$r.contentWrapper }, (cardProps === null || cardProps === void 0 ? void 0 : cardProps.classNames) || {}), variant: 'default', onClick: disabled ? undefined : onClick, density: 'xsmall' })));
|
|
17848
18022
|
};
|
|
17849
18023
|
|
|
17850
|
-
var css_248z$
|
|
17851
|
-
var styles$
|
|
17852
|
-
styleInject(css_248z$
|
|
18024
|
+
var css_248z$r = ".style-module_containerDisabled__2j9_N {\n pointer-events: none;\n opacity: 0.25;\n}\n\n.style-module_contentWrapper__EkTN9 {\n gap: 4px !important;\n}";
|
|
18025
|
+
var styles$q = {"containerDisabled":"style-module_containerDisabled__2j9_N","contentWrapper":"style-module_contentWrapper__EkTN9"};
|
|
18026
|
+
styleInject(css_248z$r);
|
|
17853
18027
|
|
|
17854
18028
|
var CardButton = function (_a) {
|
|
17855
18029
|
var _b;
|
|
17856
18030
|
var title = _a.title, description = _a.description, _c = _a.disabled, disabled = _c === void 0 ? false : _c, className = _a.className, href = _a.href;
|
|
17857
18031
|
return (jsxRuntime.jsx(Card, __assign({ as: href ? 'a' : 'button', classNames: {
|
|
17858
|
-
buttonWrapper: classNames('c-pointer ta-left w100', className, (_b = {}, _b[styles$
|
|
18032
|
+
buttonWrapper: classNames('c-pointer ta-left w100', className, (_b = {}, _b[styles$q.containerDisabled] = disabled, _b)),
|
|
17859
18033
|
label: 'tc-neutral-900',
|
|
17860
18034
|
description: 'tc-neutral-700 p-p',
|
|
17861
|
-
contentWrapper: styles$
|
|
17862
|
-
}, density: 'xsmall', label: title, description: typeof description === 'string' ? description : null, actionIcon: jsxRuntime.jsx(ChevronRightIcon, { size: 20, color: 'neutral-900', className: styles$
|
|
18035
|
+
contentWrapper: styles$q.contentWrapper
|
|
18036
|
+
}, density: 'xsmall', label: title, description: typeof description === 'string' ? description : null, actionIcon: jsxRuntime.jsx(ChevronRightIcon, { size: 20, color: 'neutral-900', className: styles$q.chevronRight }), showActionIcon: true }, href ? { href: href } : {}, { children: typeof description !== 'string' ? description : null })));
|
|
17863
18037
|
};
|
|
17864
18038
|
|
|
17865
|
-
var css_248z$
|
|
17866
|
-
var styles$
|
|
17867
|
-
styleInject(css_248z$
|
|
18039
|
+
var css_248z$q = ".style-module_chip__3LMgV {\n background: var(--ds-purple-300);\n border: 2px solid var(--ds-purple-300);\n border-radius: 8px;\n padding: 4px 8px;\n width: fit-content;\n width: -moz-fit-content;\n display: flex;\n align-items: center;\n animation-name: style-module_appearInAnimation__33Ebn;\n animation-duration: 0.5s;\n animation-fill-mode: both;\n}\n\n.style-module_chip__3LMgV:hover {\n transition: 0.2s ease-in;\n border: 2px solid var(--ds-purple-600);\n}\n\n.style-module_chip-image__2vVqF {\n width: 24px;\n height: 14px;\n}\n\n.style-module_chip-button-container__3gSRY {\n color: #B8B4F3;\n position: relative;\n width: 16px;\n height: 16px;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n text-align: inherit;\n outline: none;\n box-shadow: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n cursor: pointer;\n}\n.style-module_chip-button-container__3gSRY:hover {\n color: #8883D8;\n}\n.style-module_chip-button-container__3gSRY:focus-visible {\n outline: 2px solid var(--ds-purple-600);\n border-radius: 2px;\n}\n\n.style-module_chip-remove-button__3LK7e {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.style-module_chip-remove-button__3LK7e svg {\n vertical-align: top;\n}\n\n@keyframes style-module_appearInAnimation__33Ebn {\n from {\n opacity: 0;\n transform: translateX(16px);\n }\n to {\n opacity: 1;\n }\n}";
|
|
18040
|
+
var styles$p = {"chip":"style-module_chip__3LMgV","chip-image":"style-module_chip-image__2vVqF","chip-button-container":"style-module_chip-button-container__3gSRY","chip-remove-button":"style-module_chip-remove-button__3LK7e"};
|
|
18041
|
+
styleInject(css_248z$q);
|
|
17868
18042
|
|
|
17869
18043
|
var Chip = (function (_a) {
|
|
17870
18044
|
var className = _a.className, value = _a.value, onRemove = _a.onRemove;
|
|
17871
|
-
return (jsxRuntime.jsxs("div", { className: "p-p mr8 mb8 d-flex ".concat(className, " ").concat(styles$
|
|
18045
|
+
return (jsxRuntime.jsxs("div", { className: "p-p mr8 mb8 d-flex ".concat(className, " ").concat(styles$p['chip']), children: [value.leftIcon && (jsxRuntime.jsx("img", { className: "mr8 ".concat(styles$p['chip-image']), src: value.leftIcon, alt: value.value })), jsxRuntime.jsx("div", { className: "mr8", children: value.value }), jsxRuntime.jsx("button", { className: "c-pointer ".concat(styles$p['chip-button-container']), type: "button", onClick: function () { return onRemove(value); }, "aria-label": "Remove ".concat(value.value, " option"), children: jsxRuntime.jsx(XIcon, { className: styles$p['chip-remove-button'] }) })] }));
|
|
17872
18046
|
});
|
|
17873
18047
|
|
|
17874
18048
|
var Autosuggest$1 = {};
|
|
@@ -20087,21 +20261,21 @@ function requireDist$1 () {
|
|
|
20087
20261
|
var distExports$1 = requireDist$1();
|
|
20088
20262
|
var Autosuggest = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
|
|
20089
20263
|
|
|
20090
|
-
var css_248z$
|
|
20091
|
-
var styles$
|
|
20092
|
-
styleInject(css_248z$
|
|
20264
|
+
var css_248z$p = "@keyframes style-module_appearInAnimation__yvH4A {\n from {\n opacity: 0;\n transform: translateY(16px);\n }\n to {\n opacity: 1;\n }\n}\n.style-module_suggestionsContainer__2yVXd {\n position: relative;\n}\n\n.style-module_suggestionsList__11o48 {\n position: absolute;\n z-index: 100;\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--ds-neutral-600);\n width: 100%;\n height: fit-content;\n max-height: 216px;\n overflow-y: scroll;\n background-color: white;\n animation-name: style-module_appearInAnimation__yvH4A;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform: translateY(8px);\n}\n\n.style-module_suggestion-option__z7pqG {\n display: flex;\n align-items: center;\n cursor: pointer;\n position: relative;\n margin: 0;\n padding: 12px 16px;\n color: var(--ds-neutral-900);\n min-height: 48px;\n line-height: 24px;\n}\n\n.style-module_suggestion-img__1TfiA {\n width: 32px;\n height: 24px;\n border-radius: 2px;\n}\n\n.style-module_suggestion-text__7wL31 {\n flex: 1;\n}\n\n.style-module_nowrap__uks9c {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.style-module_suggestionHighlighted__2zu5h {\n background-color: var(--ds-orange-100);\n}";
|
|
20265
|
+
var styles$o = {"suggestionsContainer":"style-module_suggestionsContainer__2yVXd","suggestionsList":"style-module_suggestionsList__11o48","appearInAnimation":"style-module_appearInAnimation__yvH4A","suggestion-option":"style-module_suggestion-option__z7pqG","suggestion-img":"style-module_suggestion-img__1TfiA","suggestion-text":"style-module_suggestion-text__7wL31","nowrap":"style-module_nowrap__uks9c","suggestionHighlighted":"style-module_suggestionHighlighted__2zu5h"};
|
|
20266
|
+
styleInject(css_248z$p);
|
|
20093
20267
|
|
|
20094
20268
|
var AutoSuggestInput = function (_a) {
|
|
20095
20269
|
var currentOption = _a.currentOption, suggestions = _a.suggestions, handleSuggestionSelected = _a.handleSuggestionSelected, onChange = _a.onChange, handleSuggestionFetchRequest = _a.handleSuggestionFetchRequest, handleSuggestionClearRequest = _a.handleSuggestionClearRequest, placeholder = _a.placeholder, className = _a.className, wrapText = _a.wrapText, inputProps = _a.inputProps;
|
|
20096
20270
|
var renderSuggestion = function (suggestion) {
|
|
20097
20271
|
var _a;
|
|
20098
|
-
return (jsxRuntime.jsxs("div", { className: "".concat(styles$
|
|
20099
|
-
_a[styles$
|
|
20272
|
+
return (jsxRuntime.jsxs("div", { className: "".concat(styles$o['suggestion-option']), children: [suggestion.leftIcon && (jsxRuntime.jsx("img", { className: "mr16 ".concat(styles$o['suggestion-img']), src: suggestion.leftIcon, alt: suggestion.value })), jsxRuntime.jsx("div", { className: classNames(styles$o['suggestion-text'], (_a = {},
|
|
20273
|
+
_a[styles$o.nowrap] = !wrapText,
|
|
20100
20274
|
_a)), children: suggestion.value })] }));
|
|
20101
20275
|
};
|
|
20102
20276
|
var getSuggestionValue = function (suggestion) { return suggestion.value; };
|
|
20103
20277
|
var renderInputComponent = function (autoSuggestInputProps) { return (jsxRuntime.jsx(Input, __assign({}, autoSuggestInputProps, { placeholder: placeholder, "data-testid": "suggest-multi-select-input" }))); };
|
|
20104
|
-
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(Autosuggest, { theme: styles$
|
|
20278
|
+
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(Autosuggest, { theme: styles$o, suggestions: suggestions, onSuggestionsFetchRequested: handleSuggestionFetchRequest, onSuggestionsClearRequested: handleSuggestionClearRequest, getSuggestionValue: getSuggestionValue, renderSuggestion: renderSuggestion, highlightFirstSuggestion: true, inputProps: __assign(__assign({}, inputProps), { value: currentOption, onChange: function (_, _a) {
|
|
20105
20279
|
var newValue = _a.newValue;
|
|
20106
20280
|
onChange(newValue);
|
|
20107
20281
|
} }), onSuggestionSelected: function (_, _a) {
|
|
@@ -20110,9 +20284,9 @@ var AutoSuggestInput = function (_a) {
|
|
|
20110
20284
|
}, renderInputComponent: renderInputComponent }) }));
|
|
20111
20285
|
};
|
|
20112
20286
|
|
|
20113
|
-
var css_248z$
|
|
20114
|
-
var styles$
|
|
20115
|
-
styleInject(css_248z$
|
|
20287
|
+
var css_248z$o = ".style-module_chip-container__26s37 {\n display: flex;\n flex-wrap: wrap;\n max-height: 10px;\n transition: 0.7s ease-in;\n}\n\n.style-module_appearIn__3XNel {\n max-height: 300px;\n}";
|
|
20288
|
+
var styles$n = {"chip-container":"style-module_chip-container__26s37","appearIn":"style-module_appearIn__3XNel"};
|
|
20289
|
+
styleInject(css_248z$o);
|
|
20116
20290
|
|
|
20117
20291
|
var AutoSuggestMultiSelect = function (_a) {
|
|
20118
20292
|
var _b;
|
|
@@ -20120,8 +20294,8 @@ var AutoSuggestMultiSelect = function (_a) {
|
|
|
20120
20294
|
var _c = React.useState([]), suggestions = _c[0], setSuggestions = _c[1];
|
|
20121
20295
|
var _d = React.useState(''), currentOption = _d[0], setCurrentOption = _d[1];
|
|
20122
20296
|
var hasChips = Boolean(selectedValues && selectedValues.length > 0);
|
|
20123
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classNames(styles$
|
|
20124
|
-
_b[styles$
|
|
20297
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classNames(styles$n['chip-container'], chipsListClassName, (_b = {},
|
|
20298
|
+
_b[styles$n.appearIn] = hasChips,
|
|
20125
20299
|
_b)), children: selectedValues && hasChips && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: selectedValues.map(function (value, index) { return (jsxRuntime.jsx(Chip, { className: "mb16", value: value, onRemove: function (value) {
|
|
20126
20300
|
var newValues = __spreadArray([], selectedValues, true).filter(function (selectedValue) { return selectedValue.value !== value.value; });
|
|
20127
20301
|
setValues(newValues);
|
|
@@ -21675,9 +21849,9 @@ function requireDist () {
|
|
|
21675
21849
|
|
|
21676
21850
|
var distExports = requireDist();
|
|
21677
21851
|
|
|
21678
|
-
var css_248z$
|
|
21679
|
-
var styles$
|
|
21680
|
-
styleInject(css_248z$
|
|
21852
|
+
var css_248z$n = ".AccordionItem-module_container__29xle {\n width: min-content;\n width: var(--growContent, min-content);\n max-width: 100%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.AccordionItem-module_chevron__1Pdoe {\n transition: filter 0.3s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.AccordionItem-module_chevronClosed__1Sq5g {\n transform: rotate(180deg);\n}\n\n.AccordionItem-module_iconAndTextContainer__1K9NF {\n column-gap: 12px;\n}\n\n.AccordionItem-module_headerButton__1C03u {\n border: none;\n border-bottom: 1px solid #e7e7ed;\n background: white;\n color: #26262e;\n column-gap: 16px;\n cursor: pointer;\n font-family: inherit;\n outline: none;\n padding: 24px 0;\n position: relative;\n text-align: inherit;\n transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;\n}\n.AccordionItem-module_headerButton__1C03u[aria-expanded=true] {\n border-bottom-color: transparent;\n}\n.AccordionItem-module_headerButton__1C03u:hover {\n color: #696971;\n}\n.AccordionItem-module_headerButton__1C03u:hover .p-h3 {\n color: #696971;\n}\n\n.AccordionItem-module_headerButton__1C03u:hover .AccordionItem-module_chevron__1Pdoe {\n filter: brightness(0.425);\n}";
|
|
21853
|
+
var styles$m = {"container":"AccordionItem-module_container__29xle","chevron":"AccordionItem-module_chevron__1Pdoe","chevronClosed":"AccordionItem-module_chevronClosed__1Sq5g","iconAndTextContainer":"AccordionItem-module_iconAndTextContainer__1K9NF","headerButton":"AccordionItem-module_headerButton__1C03u"};
|
|
21854
|
+
styleInject(css_248z$n);
|
|
21681
21855
|
|
|
21682
21856
|
var ChevronSVG = function (_a) {
|
|
21683
21857
|
var className = _a.className;
|
|
@@ -21708,7 +21882,7 @@ var AccordionItem = function (_a) {
|
|
|
21708
21882
|
window.scrollTo({ top: top_1, behavior: 'smooth' });
|
|
21709
21883
|
}
|
|
21710
21884
|
};
|
|
21711
|
-
return (jsxRuntime.jsxs("section", { ref: sectionRef, className: "d-flex fd-column ".concat(styles$
|
|
21885
|
+
return (jsxRuntime.jsxs("section", { ref: sectionRef, className: "d-flex fd-column ".concat(styles$m.container, " ").concat(className), children: [jsxRuntime.jsxs("button", { "aria-expanded": isOpen, className: "d-flex ai-center jc-between ".concat(styles$m.headerButton, " ").concat(headerClassName), onClick: handleClick, type: "button", children: [jsxRuntime.jsx("div", { className: "d-flex ai-center ".concat(styles$m.iconAndTextContainer), children: typeof label === 'string' ? (jsxRuntime.jsx("h4", { className: "p-h3", children: label })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: label })) }), jsxRuntime.jsx(ChevronSVG, { className: "".concat(styles$m.chevron, " ").concat(!isOpen && styles$m.chevronClosed) })] }), jsxRuntime.jsx(AnimateHeight, { duration: 300, height: isOpen ? 'auto' : 0.1, onHeightAnimationEnd: handleAnimationEnd, children: children })] }));
|
|
21712
21886
|
};
|
|
21713
21887
|
|
|
21714
21888
|
var Chevron = function (_a) {
|
|
@@ -21716,19 +21890,19 @@ var Chevron = function (_a) {
|
|
|
21716
21890
|
return (jsxRuntime.jsx("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M15 12.5l-5-5-5 5", stroke: "#26262e", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
21717
21891
|
};
|
|
21718
21892
|
|
|
21719
|
-
var css_248z$
|
|
21720
|
-
var styles$
|
|
21721
|
-
styleInject(css_248z$
|
|
21893
|
+
var css_248z$m = ".style-module_row__3IzmA {\n border-bottom: 1px solid #e7e7ed;\n}\n.style-module_row__3IzmA:last-child {\n border-bottom: none;\n}\n\n.style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- .style-module_cell__1NoZ6 {\n align-items: flex-start;\n justify-content: center;\n text-align: center;\n}\n@media (min-width: 34rem) {\n .style-module_header__32rw- .style-module_cell__1NoZ6 {\n justify-content: flex-start;\n text-align: left;\n }\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: 100vw;\n}\n.style-module_header__32rw- > div:nth-child(n+3) {\n margin: 0;\n}\n@media (min-width: 34rem) {\n .style-module_header__32rw- > div {\n width: 211px;\n width: var(--cellWidth, 211px);\n max-width: var(--tableWidth);\n scroll-snap-align: unset;\n }\n}\n\n.style-module_cell__1NoZ6 {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n scroll-snap-align: end;\n line-height: 24px;\n padding: 16px 8px;\n}\n.style-module_cell__1NoZ6:first-child {\n padding: 16px 8px 16px 0;\n}\n.style-module_cell__1NoZ6 {\n color: #26262e;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\n}\n.style-module_cell__1NoZ6:first-child {\n background-color: white;\n /** Add scroll snap to every column except the first one */\n scroll-snap-align: unset;\n}\n.style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: unset;\n }\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6 {\n flex: 1 0 211px;\n flex: 1 0 var(--cellWidth, 211px);\n width: 211px;\n width: var(--cellWidth, 211px);\n }\n .style-module_cell__1NoZ6:first-child {\n padding: 24px 8px 24px 0;\n }\n .style-module_cell__1NoZ6 {\n padding: 24px 8px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(212px, var(--tableWidth) / 2);\n max-width: min(var(--firstColumnWidth, 212px), var(--tableWidth) / 2);\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n}\n@media (min-width: 34rem) {\n .style-module_title__1xYvu {\n display: flex;\n }\n}\n\n.style-module_sticky__2T5jm {\n position: sticky;\n justify-content: flex-start;\n z-index: 1;\n top: 0;\n left: 0;\n width: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_sticky__2T5jm {\n flex: 1 0 288px;\n }\n}\n\nh4.style-module_addon__CPf60 {\n max-width: calc(100vw - 64px);\n width: 100%;\n}\n@media (min-width: 64rem) {\n h4.style-module_addon__CPf60 {\n max-width: 976px;\n }\n}";
|
|
21894
|
+
var styles$l = {"row":"style-module_row__3IzmA","header":"style-module_header__32rw-","cell":"style-module_cell__1NoZ6","title":"style-module_title__1xYvu","sticky":"style-module_sticky__2T5jm","addon":"style-module_addon__CPf60"};
|
|
21895
|
+
styleInject(css_248z$m);
|
|
21722
21896
|
|
|
21723
21897
|
var Row = function (props) {
|
|
21724
21898
|
var _a, _b;
|
|
21725
21899
|
var cell = props.cell, data = props.data, isRowHeader = props.isRowHeader, rowId = props.rowId, cellClassName = props.cellClassName;
|
|
21726
21900
|
return (jsxRuntime.jsxs("div", { className: classNames('d-flex w-100', (_a = {},
|
|
21727
|
-
_a[styles$
|
|
21728
|
-
_a[styles$
|
|
21729
|
-
_a)), children: [jsxRuntime.jsx("h4", { className: classNames(styles$
|
|
21730
|
-
_b["p-h2 p--serif ".concat(styles$
|
|
21731
|
-
_b[styles$
|
|
21901
|
+
_a[styles$l.header] = isRowHeader,
|
|
21902
|
+
_a[styles$l.row] = !isRowHeader,
|
|
21903
|
+
_a)), children: [jsxRuntime.jsx("h4", { className: classNames(styles$l.cell, styles$l.sticky, (_b = {},
|
|
21904
|
+
_b["p-h2 p--serif ".concat(styles$l.title)] = isRowHeader,
|
|
21905
|
+
_b[styles$l.addon] = typeof cell.key === 'undefined',
|
|
21732
21906
|
_b), cellClassName), children: cell.label }), Array.isArray(data) &&
|
|
21733
21907
|
data.map(function (item) {
|
|
21734
21908
|
/**
|
|
@@ -21739,7 +21913,7 @@ var Row = function (props) {
|
|
|
21739
21913
|
return null;
|
|
21740
21914
|
if (typeof item[cell.key] === 'undefined')
|
|
21741
21915
|
return null;
|
|
21742
|
-
return (jsxRuntime.jsx("div", { className: classNames('ta-left', styles$
|
|
21916
|
+
return (jsxRuntime.jsx("div", { className: classNames('ta-left', styles$l.cell, cellClassName), children:
|
|
21743
21917
|
/**
|
|
21744
21918
|
* Return a function if `render` option is present
|
|
21745
21919
|
* else print the current data source value
|
|
@@ -21756,39 +21930,39 @@ var ArrowIcon = function (_a) {
|
|
|
21756
21930
|
return (jsxRuntime.jsx("svg", { width: "14", height: "8", viewBox: "0 0 14 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M1 1.00003L7 7.00003L13 1.00003", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
21757
21931
|
};
|
|
21758
21932
|
|
|
21759
|
-
var css_248z$
|
|
21760
|
-
var styles$
|
|
21761
|
-
styleInject(css_248z$
|
|
21933
|
+
var css_248z$l = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 0 8px;\n justify-content: space-between;\n align-items: stretch;\n display: flex;\n}\n@media (min-width: 34rem) {\n .style-module_container__3BxOi {\n display: none;\n }\n}\n\n.style-module_next__3yJsi {\n transform: rotate(-90deg);\n}\n\n.style-module_prev__3rIR_ {\n transform: rotate(90deg);\n}\n\n.style-module_arrow__1tlbD {\n width: 32px;\n height: 56px;\n z-index: 3;\n padding: 0;\n border-radius: 8px;\n background-color: #f7f7fd;\n justify-content: center;\n align-items: center;\n stroke: #b8b8c0;\n}\n.style-module_arrow__1tlbD:hover, .style-module_arrow__1tlbD:focus {\n background-color: #f7f7fd;\n cursor: not-allowed;\n}\n\n.style-module_active__2kklB {\n stroke: #26262e;\n}\n.style-module_active__2kklB:hover, .style-module_active__2kklB:focus {\n background-color: #f7f7fd;\n cursor: pointer;\n}\n\n.style-module_noPointerEvents__21KuB {\n visibility: hidden;\n pointer-events: none;\n}";
|
|
21934
|
+
var styles$k = {"container":"style-module_container__3BxOi","next":"style-module_next__3yJsi","prev":"style-module_prev__3rIR_","arrow":"style-module_arrow__1tlbD","active":"style-module_active__2kklB","noPointerEvents":"style-module_noPointerEvents__21KuB"};
|
|
21935
|
+
styleInject(css_248z$l);
|
|
21762
21936
|
|
|
21763
21937
|
var TableArrows = function (props) {
|
|
21764
21938
|
var _a, _b;
|
|
21765
21939
|
var active = props.active, onClick = props.onClick;
|
|
21766
21940
|
var handleButtonClick = function (value) { return function () { return onClick(value); }; };
|
|
21767
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
21768
|
-
_a[styles$
|
|
21769
|
-
_a[styles$
|
|
21770
|
-
_a)), children: jsxRuntime.jsx(ArrowIcon, {}) }), jsxRuntime.jsx("button", { onClick: handleButtonClick('next'), className: classNames("p-btn--secondary d-flex", styles$
|
|
21771
|
-
_b[styles$
|
|
21772
|
-
_b[styles$
|
|
21941
|
+
return (jsxRuntime.jsxs("div", { className: styles$k.container, children: [jsxRuntime.jsx("button", { onClick: handleButtonClick('prev'), className: classNames("p-btn--secondary d-flex", styles$k.prev, styles$k.arrow, (_a = {},
|
|
21942
|
+
_a[styles$k.active] = active.left,
|
|
21943
|
+
_a[styles$k.noPointerEvents] = !active.left,
|
|
21944
|
+
_a)), children: jsxRuntime.jsx(ArrowIcon, {}) }), jsxRuntime.jsx("button", { onClick: handleButtonClick('next'), className: classNames("p-btn--secondary d-flex", styles$k.next, styles$k.arrow, (_b = {},
|
|
21945
|
+
_b[styles$k.active] = active.right,
|
|
21946
|
+
_b[styles$k.noPointerEvents] = !active.right,
|
|
21773
21947
|
_b)), children: jsxRuntime.jsx(ArrowIcon, {}) })] }));
|
|
21774
21948
|
};
|
|
21775
21949
|
|
|
21776
|
-
var css_248z$
|
|
21777
|
-
var styles$
|
|
21778
|
-
styleInject(css_248z$l);
|
|
21779
|
-
|
|
21780
|
-
var css_248z$k = ".style-module_button__3TkNT {\n padding: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: bottom;\n border-radius: 12px;\n width: 24px;\n height: 24px;\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:hover, .style-module_button__3TkNT:focus {\n background-color: transparent;\n}\n.style-module_button__3TkNT:hover svg path, .style-module_button__3TkNT:focus svg path {\n fill: #919199;\n}\n.style-module_button__3TkNT svg path {\n fill: #d2d2d9;\n}\n.style-module_button__3TkNT svg {\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:focus-visible {\n box-shadow: 0 0 0 2px #26262e;\n}";
|
|
21781
|
-
var styles$j = {"button":"style-module_button__3TkNT"};
|
|
21950
|
+
var css_248z$k = ".style-module_wrapper__1s115 {\n position: relative;\n}\n\n.style-module_infoButton__1nIU2 {\n position: absolute;\n right: -32px;\n top: 0;\n}";
|
|
21951
|
+
var styles$j = {"wrapper":"style-module_wrapper__1s115","infoButton":"style-module_infoButton__1nIU2"};
|
|
21782
21952
|
styleInject(css_248z$k);
|
|
21783
21953
|
|
|
21954
|
+
var css_248z$j = ".style-module_button__3TkNT {\n padding: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: bottom;\n border-radius: 12px;\n width: 24px;\n height: 24px;\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:hover, .style-module_button__3TkNT:focus {\n background-color: transparent;\n}\n.style-module_button__3TkNT:hover svg path, .style-module_button__3TkNT:focus svg path {\n fill: #919199;\n}\n.style-module_button__3TkNT svg path {\n fill: #d2d2d9;\n}\n.style-module_button__3TkNT svg {\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:focus-visible {\n box-shadow: 0 0 0 2px #26262e;\n}";
|
|
21955
|
+
var styles$i = {"button":"style-module_button__3TkNT"};
|
|
21956
|
+
styleInject(css_248z$j);
|
|
21957
|
+
|
|
21784
21958
|
var TableInfoButton = function (_a) {
|
|
21785
21959
|
var onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
21786
|
-
return (jsxRuntime.jsx("button", { className: "p-btn--secondary ".concat(styles$
|
|
21960
|
+
return (jsxRuntime.jsx("button", { className: "p-btn--secondary ".concat(styles$i.button, " ").concat(className), type: "button", "data-testid": "ds-table-info-button", onClick: onClick, "aria-label": "View more information", title: "View more information", children: jsxRuntime.jsx(InfoIcon, { size: 20 }) }));
|
|
21787
21961
|
};
|
|
21788
21962
|
|
|
21789
21963
|
var TableButton = function (_a) {
|
|
21790
21964
|
var children = _a.children, onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
21791
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
21965
|
+
return (jsxRuntime.jsxs("div", { className: styles$j.wrapper, children: [children, jsxRuntime.jsx(TableInfoButton, { className: "".concat(styles$j.infoButton, " ").concat(className), "data-testid": "ds-table-button", onClick: onClick })] }));
|
|
21792
21966
|
};
|
|
21793
21967
|
|
|
21794
21968
|
var StarIcon = function (_a) {
|
|
@@ -21801,9 +21975,9 @@ var ZapIcon = function (_a) {
|
|
|
21801
21975
|
return (jsxRuntime.jsx("svg", { width: "12", height: "12", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.492 1.124A1 1 0 005.732.36l-5 6A1 1 0 001.5 8h3.367l-.36 2.876a1 1 0 001.761.764l5-6A1 1 0 0010.5 4H7.133l.36-2.876z" }) }));
|
|
21802
21976
|
};
|
|
21803
21977
|
|
|
21804
|
-
var css_248z$
|
|
21805
|
-
var styles$
|
|
21806
|
-
styleInject(css_248z$
|
|
21978
|
+
var css_248z$i = ".style-module_icon__1ep7- {\n margin-right: 4px;\n}\n\n.style-module_filled__3l-v0 {\n fill: #26262e;\n}\n\n.style-module_empty__Ikg_s {\n fill: #d2d2d9;\n}";
|
|
21979
|
+
var styles$h = {"icon":"style-module_icon__1ep7-","filled":"style-module_filled__3l-v0","empty":"style-module_empty__Ikg_s"};
|
|
21980
|
+
styleInject(css_248z$i);
|
|
21807
21981
|
|
|
21808
21982
|
var getRatingIcon = function (type) {
|
|
21809
21983
|
var iconDictionary = {
|
|
@@ -21816,16 +21990,16 @@ var VALID_VALUES = [1, 2, 3];
|
|
|
21816
21990
|
var TableRating = function (props) {
|
|
21817
21991
|
var rating = props.rating, type = props.type;
|
|
21818
21992
|
var SelectedIcon = getRatingIcon(type);
|
|
21819
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: VALID_VALUES.map(function (value) { return (jsxRuntime.jsx(SelectedIcon, { className: classNames(styles$
|
|
21993
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: VALID_VALUES.map(function (value) { return (jsxRuntime.jsx(SelectedIcon, { className: classNames(styles$h.icon, value <= rating ? styles$h.filled : styles$h.empty) }, value)); }) }));
|
|
21820
21994
|
};
|
|
21821
21995
|
|
|
21822
|
-
var css_248z$
|
|
21823
|
-
var styles$
|
|
21824
|
-
styleInject(css_248z$
|
|
21996
|
+
var css_248z$h = ".style-module_icon__30Nor {\n min-width: 20px;\n}";
|
|
21997
|
+
var styles$g = {"icon":"style-module_icon__30Nor"};
|
|
21998
|
+
styleInject(css_248z$h);
|
|
21825
21999
|
|
|
21826
22000
|
var TableRowHeader = function (_a) {
|
|
21827
22001
|
var icon = _a.icon, label = _a.label, subtitle = _a.subtitle, onClickInfo = _a.onClickInfo;
|
|
21828
|
-
return (jsxRuntime.jsxs("div", { className: "d-flex", children: [icon && jsxRuntime.jsx("span", { className: "mr8 ".concat(styles$
|
|
22002
|
+
return (jsxRuntime.jsxs("div", { className: "d-flex", children: [icon && jsxRuntime.jsx("span", { className: "mr8 ".concat(styles$g.icon), children: icon }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("p", { className: "p-p d-inline", children: [jsxRuntime.jsx("span", { className: classNames({
|
|
21829
22003
|
mr8: onClickInfo,
|
|
21830
22004
|
}), children: label }), onClickInfo && jsxRuntime.jsx(TableInfoButton, { onClick: onClickInfo })] }), subtitle && jsxRuntime.jsx("p", { className: "p-p--small tc-neutral-600", children: subtitle })] })] }));
|
|
21831
22005
|
};
|
|
@@ -21950,9 +22124,9 @@ var useComparisonTable = function (_a) {
|
|
|
21950
22124
|
};
|
|
21951
22125
|
};
|
|
21952
22126
|
|
|
21953
|
-
var css_248z$
|
|
22127
|
+
var css_248z$g = ".style-module_card__2KGDn {\n border: 1px solid #f2f2f8;\n border-radius: 12px;\n padding: 24px;\n}\n.style-module_card__2KGDn section:last-of-type > button {\n border-bottom: none;\n}\n\n.style-module_container__xHPlk {\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n}\n@media (min-width: 34rem) {\n .style-module_container__xHPlk {\n scroll-snap-type: unset;\n }\n}\n\n.style-module_noScrollBars__1ri_E {\n scrollbar-width: none; /* Firefox */\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n}\n.style-module_noScrollBars__1ri_E::-webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n}\n\n@media (max-width: 34rem) {\n .style-module_noScrollBarsMobile__1txeg * {\n scrollbar-width: none; /* Firefox */\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n }\n .style-module_noScrollBarsMobile__1txeg * -webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n display: none;\n }\n}\n\n.style-module_section__1bf_0 + .style-module_section__1bf_0 {\n margin-top: 48px;\n}\n@media (min-width: 34rem) {\n .style-module_section__1bf_0 + .style-module_section__1bf_0 {\n margin-top: 72px;\n }\n}\n\n.style-module_overflow-container__oBPQw {\n width: max-content;\n min-width: 100%;\n}\n\n.style-module_group-container__2G6Ix {\n display: flex;\n flex-flow: column;\n width: max-content;\n width: var(--growContent, max-content);\n margin: auto;\n}\n\n.style-module_group-title__2vvRm {\n width: 100%;\n background-color: #FAF8F5;\n border-radius: 8px;\n}\n.style-module_group-title__2vvRm > h4 {\n padding: 24px;\n display: inline-block;\n}\n\n.style-module_sticky__2Xmbl {\n position: sticky;\n justify-content: flex-start;\n z-index: 1;\n top: 0;\n left: 0;\n}\n\n.style-module_header__23SZy {\n position: sticky;\n top: 0;\n top: var(--stickyHeaderTopOffset, 0);\n z-index: 2;\n background-color: white;\n}\n.style-module_header__23SZy .style-module_container__xHPlk {\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.style-module_header__23SZy .style-module_container__xHPlk::-webkit-scrollbar {\n display: none;\n}\n\n.style-module_show-details-container__1smn4 {\n width: 100%;\n border: none;\n}\n\n.style-module_show-details-button__3HR-p {\n font-family: inherit;\n background-color: #FAF8F5;\n border: none;\n border-radius: 8px;\n height: 64px;\n justify-content: center;\n align-items: center;\n}\n.style-module_show-details-button__3HR-p svg {\n margin-left: 8px;\n}\n.style-module_show-details-button__3HR-p:hover {\n background-color: #FCF7EF;\n}\n\n.style-module_icon-inverted__1SnO1 {\n transform: rotate(180deg);\n transition: all 0.25s ease;\n}";
|
|
21954
22128
|
var baseStyles = {"card":"style-module_card__2KGDn","container":"style-module_container__xHPlk","noScrollBars":"style-module_noScrollBars__1ri_E","noScrollBarsMobile":"style-module_noScrollBarsMobile__1txeg","section":"style-module_section__1bf_0","overflow-container":"style-module_overflow-container__oBPQw","group-container":"style-module_group-container__2G6Ix","group-title":"style-module_group-title__2vvRm","sticky":"style-module_sticky__2Xmbl","header":"style-module_header__23SZy","show-details-container":"style-module_show-details-container__1smn4","show-details-button":"style-module_show-details-button__3HR-p","icon-inverted":"style-module_icon-inverted__1SnO1"};
|
|
21955
|
-
styleInject(css_248z$
|
|
22129
|
+
styleInject(css_248z$g);
|
|
21956
22130
|
|
|
21957
22131
|
var ComparisonTable = function (props) {
|
|
21958
22132
|
var _a;
|
|
@@ -22003,9 +22177,9 @@ var ComparisonTable = function (props) {
|
|
|
22003
22177
|
}), hideDetails && (jsxRuntime.jsx("div", { className: classNames(baseStyles['show-details-container'], baseStyles.sticky, 'mt48'), children: jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("button", { className: classNames('w100 d-flex p-h4 c-pointer', baseStyles['show-details-button'], classNameOverrides === null || classNameOverrides === void 0 ? void 0 : classNameOverrides.hideDetailsButton), onClick: toggleMoreRows, type: "button", children: [showMore ? hideDetailsCaption : showDetailsCaption, jsxRuntime.jsx(Chevron, { className: showMore ? '' : baseStyles['icon-inverted'] })] }) }) }))] })] }) }));
|
|
22004
22178
|
};
|
|
22005
22179
|
|
|
22006
|
-
var css_248z$
|
|
22007
|
-
var styles$
|
|
22008
|
-
styleInject(css_248z$
|
|
22180
|
+
var css_248z$f = ".style-module_background-container__2Gjka {\n position: relative;\n display: inline-block;\n background-color: var(--ds-orange-50);\n border-radius: 8px;\n padding: 0 8px;\n}\n\n.style-module_chip-container__7XeKn {\n display: flex;\n align-items: center;\n}\n\n.style-module_chip__3rgLT {\n cursor: pointer;\n z-index: 2;\n padding-left: 16px;\n padding-right: 16px;\n}\n.style-module_chip__3rgLT:focus {\n outline-color: var(--ds-primary-900);\n outline-offset: 2px;\n}\n\n.style-module_select-chip-background__YCAyw {\n position: absolute;\n background-color: var(--ds-neutral-900);\n border-radius: 8px;\n top: 8px;\n z-index: 1;\n transition: width 0.3s, left 0.3s;\n}\n\n.style-module_text-color__6bLC9 {\n transition: color 0.15s ease-in;\n}";
|
|
22181
|
+
var styles$f = {"background-container":"style-module_background-container__2Gjka","chip-container":"style-module_chip-container__7XeKn","chip":"style-module_chip__3rgLT","select-chip-background":"style-module_select-chip-background__YCAyw","text-color":"style-module_text-color__6bLC9"};
|
|
22182
|
+
styleInject(css_248z$f);
|
|
22009
22183
|
|
|
22010
22184
|
var SegmentedControl = function (_a) {
|
|
22011
22185
|
var _b = _a.className, className = _b === void 0 ? '' : _b, values = _a.values, selectedIndex = _a.selectedIndex, onChange = _a.onChange;
|
|
@@ -22019,7 +22193,7 @@ var SegmentedControl = function (_a) {
|
|
|
22019
22193
|
var width = selectedChip.offsetWidth;
|
|
22020
22194
|
setSelectedChipBackgroundWidthLeft({ left: left, width: width });
|
|
22021
22195
|
}, [selectedIndex]);
|
|
22022
|
-
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsxs("div", { className: styles$
|
|
22196
|
+
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsxs("div", { className: styles$f['background-container'], children: [jsxRuntime.jsx("div", { ref: chipContainer, className: styles$f['chip-container'], style: { height: "".concat(height, "px") }, children: values.map(function (value, index) {
|
|
22023
22197
|
var selectedColor = selectedIndex === index ? 'tc-white' : 'tc-neutral-900';
|
|
22024
22198
|
return (jsxRuntime.jsx("div", { role: "button", tabIndex: 0, onKeyDown: function (e) {
|
|
22025
22199
|
if (e.key === 'Enter' || e.code === 'Space') {
|
|
@@ -22027,177 +22201,14 @@ var SegmentedControl = function (_a) {
|
|
|
22027
22201
|
}
|
|
22028
22202
|
}, onClick: function () {
|
|
22029
22203
|
onChange(index);
|
|
22030
|
-
}, className: styles$
|
|
22031
|
-
}) }), jsxRuntime.jsx("div", { className: styles$
|
|
22204
|
+
}, className: styles$f.chip, children: typeof value === 'string' ? (jsxRuntime.jsx("div", { className: "p-h4 ta-center ".concat(selectedColor, " ").concat(styles$f['text-color']), children: value })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "p-h4 ta-center ".concat(selectedColor, " ").concat(styles$f['text-color']), children: value.title }), jsxRuntime.jsx("div", { className: "p-p--small ta-center ".concat(selectedColor, " ").concat(styles$f['text-color']), children: value.subtitle })] })) }, typeof value === 'string' ? value : value.title));
|
|
22205
|
+
}) }), jsxRuntime.jsx("div", { className: styles$f['select-chip-background'], style: {
|
|
22032
22206
|
width: "".concat(selectedChipBackgroundWidthLeft.width, "px"),
|
|
22033
22207
|
height: "".concat(height - 16, "px"),
|
|
22034
22208
|
left: "".concat(selectedChipBackgroundWidthLeft.left, "px"),
|
|
22035
22209
|
} })] }) }));
|
|
22036
22210
|
};
|
|
22037
22211
|
|
|
22038
|
-
var useDropdownAlignment = function (containerRef, dropdownRef, isOpen) {
|
|
22039
|
-
var _a = React.useState('left'), alignX = _a[0], setAlignX = _a[1];
|
|
22040
|
-
var _b = React.useState('bottom'), alignY = _b[0], setAlignY = _b[1];
|
|
22041
|
-
var updateAlignment = React.useCallback(function () {
|
|
22042
|
-
if (containerRef.current && dropdownRef.current) {
|
|
22043
|
-
var containerRect = containerRef.current.getBoundingClientRect();
|
|
22044
|
-
var dropdownWidth = dropdownRef.current.offsetWidth;
|
|
22045
|
-
var dropdownHeight = dropdownRef.current.offsetHeight;
|
|
22046
|
-
var spaceOnRight = window.innerWidth - containerRect.left;
|
|
22047
|
-
var spaceBelow = window.innerHeight - containerRect.bottom;
|
|
22048
|
-
setAlignX(spaceOnRight < dropdownWidth ? 'right' : 'left');
|
|
22049
|
-
setAlignY(spaceBelow < dropdownHeight && containerRect.top > spaceBelow ? 'top' : 'bottom');
|
|
22050
|
-
}
|
|
22051
|
-
}, [containerRef, dropdownRef]);
|
|
22052
|
-
React.useEffect(function () {
|
|
22053
|
-
if (!isOpen)
|
|
22054
|
-
return;
|
|
22055
|
-
updateAlignment();
|
|
22056
|
-
var observer = new ResizeObserver(updateAlignment);
|
|
22057
|
-
observer.observe(document.documentElement);
|
|
22058
|
-
return function () { return observer.disconnect(); };
|
|
22059
|
-
}, [isOpen, updateAlignment]);
|
|
22060
|
-
return { alignX: alignX, alignY: alignY };
|
|
22061
|
-
};
|
|
22062
|
-
|
|
22063
|
-
var useEscapeKey = function (callback) {
|
|
22064
|
-
var handleOnEscape = React.useCallback(function (e) {
|
|
22065
|
-
if (e.key === 'Escape') {
|
|
22066
|
-
callback();
|
|
22067
|
-
}
|
|
22068
|
-
}, [callback]);
|
|
22069
|
-
React.useEffect(function () {
|
|
22070
|
-
window.addEventListener('keydown', handleOnEscape);
|
|
22071
|
-
return function () { return window.removeEventListener('keydown', handleOnEscape); };
|
|
22072
|
-
}, [handleOnEscape]);
|
|
22073
|
-
};
|
|
22074
|
-
|
|
22075
|
-
var css_248z$f = ".style-module_bs-xs__2KEsk {\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03);\n}\n\n.style-module_bs-sm__3u9QM {\n box-shadow: 0 2px 20px 0 rgba(38, 38, 46, 0.04);\n}\n\n.style-module_bs-md__2LfxW {\n box-shadow: 0 2px 28px rgba(38, 38, 46, 0.08);\n}\n\n.style-module_bs-lg__2Qx0R {\n box-shadow: 0 2px 32px rgba(38, 38, 46, 0.1);\n}\n\n.style-module_bs-xl__kaOuM {\n box-shadow: 0 2px 50px rgba(38, 38, 46, 0.18);\n}\n\n.style-module_container__2064q {\n position: relative;\n}\n\n.style-module_selectTrigger__1GiSB {\n padding: 10px 12px;\n border: 1px solid #e7e7ed;\n}\n.style-module_selectTrigger__1GiSB:hover {\n border-color: #b8b8c0;\n}\n.style-module_selectTrigger__1GiSB:focus-visible {\n outline: 1px solid #26262e;\n outline-offset: 1px;\n}\n.style-module_selectTriggerOpen__29Kor {\n border-color: #26262e;\n box-shadow: 0 2px 12px rgba(38, 38, 46, 0.03);\n}\n\n.style-module_disabled__2BlO- {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.style-module_chevronOpen__Ot3RV {\n transform: rotate(180deg);\n}\n\n.style-module_condensed__GDq0d {\n width: auto;\n padding: 8px 10px;\n gap: 8px;\n}\n\n.style-module_bordered__tRh9H {\n border: 1px solid #e7e7ed;\n}\n.style-module_bordered__tRh9H:hover {\n border-color: #b8b8c0;\n}\n\n.style-module_dropdown__1A-wl {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n min-width: 280px;\n border: 1px solid #e7e7ed;\n box-shadow: 0 2px 28px rgba(38, 38, 46, 0.08);\n z-index: 10;\n}\n\n.style-module_dropdownXRight__2LIci {\n left: auto;\n right: 0;\n}\n\n.style-module_dropdownYTop__Amnit {\n top: auto;\n bottom: calc(100% + 4px);\n}\n.style-module_dropdownYTop__Amnit .style-module_searchContainer__4O1qv {\n order: 2;\n padding-bottom: 0;\n padding-top: 8px;\n}\n.style-module_dropdownYTop__Amnit .style-module_optionList__-2I8l {\n order: 1;\n}\n\n.style-module_optionList__-2I8l {\n max-height: 308px;\n overflow-y: auto;\n scrollbar-width: none;\n}\n.style-module_optionList__-2I8l::-webkit-scrollbar {\n display: none;\n}\n\n.style-module_optionWrapper__3GVCB {\n position: relative;\n}\n\n.style-module_optionRadio__3GBog {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n.style-module_optionRadio__3GBog:focus-visible + label {\n outline: 2px solid #26262e;\n outline-offset: -2px;\n border-radius: 8px;\n}\n\n.style-module_option__1HkKR {\n padding: 10px 12px;\n border: none;\n background-color: transparent;\n}\n.style-module_option__1HkKR:hover {\n background-color: #f7f7fd;\n}\n.style-module_optionSelected__2pPt9 {\n background-color: #F6F6FE;\n}\n.style-module_optionSelected__2pPt9:hover {\n background-color: #F6F6FE;\n}\n\n.style-module_optionIcon__2hBSY {\n flex-shrink: 0;\n}\n\n.style-module_noResults__18exv {\n padding: 10px 12px;\n}";
|
|
22076
|
-
var styles$f = {"container":"style-module_container__2064q","selectTrigger":"style-module_selectTrigger__1GiSB","selectTriggerOpen":"style-module_selectTriggerOpen__29Kor","disabled":"style-module_disabled__2BlO-","chevronOpen":"style-module_chevronOpen__Ot3RV","condensed":"style-module_condensed__GDq0d","bordered":"style-module_bordered__tRh9H","dropdown":"style-module_dropdown__1A-wl","dropdownXRight":"style-module_dropdownXRight__2LIci","dropdownYTop":"style-module_dropdownYTop__Amnit","optionList":"style-module_optionList__-2I8l","optionWrapper":"style-module_optionWrapper__3GVCB","optionRadio":"style-module_optionRadio__3GBog","option":"style-module_option__1HkKR","optionSelected":"style-module_optionSelected__2pPt9","optionIcon":"style-module_optionIcon__2hBSY","noResults":"style-module_noResults__18exv"};
|
|
22077
|
-
styleInject(css_248z$f);
|
|
22078
|
-
|
|
22079
|
-
var SearchableDropdown = function (_a) {
|
|
22080
|
-
var _b, _c, _d;
|
|
22081
|
-
var _e;
|
|
22082
|
-
var options = _a.options, value = _a.value, onChange = _a.onChange, _f = _a.searchable, searchable = _f === void 0 ? false : _f, _g = _a.placeholder, placeholder = _g === void 0 ? 'Search' : _g, triggerPlaceholder = _a.triggerPlaceholder, _h = _a.noResultsText, noResultsText = _h === void 0 ? 'No results found' : _h, groupNameProp = _a.groupName, _j = _a.dropUp, dropUp = _j === void 0 ? false : _j, _k = _a.condensed, condensed = _k === void 0 ? false : _k, _l = _a.bordered, bordered = _l === void 0 ? false : _l, _m = _a.showChevron, showChevron = _m === void 0 ? false : _m, _o = _a.disabled, disabled = _o === void 0 ? false : _o;
|
|
22083
|
-
var _p = React.useState(false), isOpen = _p[0], setIsOpen = _p[1];
|
|
22084
|
-
var _q = React.useState(''), searchTerm = _q[0], setSearchTerm = _q[1];
|
|
22085
|
-
var _r = React.useState(value), localValue = _r[0], setLocalValue = _r[1];
|
|
22086
|
-
var searchInputRef = React.useRef(null);
|
|
22087
|
-
var containerRef = React.useRef(null);
|
|
22088
|
-
var triggerRef = React.useRef(null);
|
|
22089
|
-
var dropdownRef = React.useRef(null);
|
|
22090
|
-
var optionRefs = React.useRef(new Map());
|
|
22091
|
-
var groupName = React.useState(function () { return groupNameProp !== null && groupNameProp !== void 0 ? groupNameProp : "sd-".concat(generateId()); })[0];
|
|
22092
|
-
var dropdownId = "".concat(groupName, "-dropdown");
|
|
22093
|
-
var closeAndRestoreFocus = React.useCallback(function () {
|
|
22094
|
-
var _a;
|
|
22095
|
-
setIsOpen(false);
|
|
22096
|
-
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
22097
|
-
}, []);
|
|
22098
|
-
useOnClickOutside(containerRef, function () { return isOpen && closeAndRestoreFocus(); });
|
|
22099
|
-
useEscapeKey(React.useCallback(function () {
|
|
22100
|
-
if (isOpen)
|
|
22101
|
-
closeAndRestoreFocus();
|
|
22102
|
-
}, [isOpen, closeAndRestoreFocus]));
|
|
22103
|
-
var _s = useDropdownAlignment(containerRef, dropdownRef, isOpen), alignX = _s.alignX, alignY = _s.alignY;
|
|
22104
|
-
React.useEffect(function () {
|
|
22105
|
-
if (isOpen && searchable && searchInputRef.current) {
|
|
22106
|
-
searchInputRef.current.focus();
|
|
22107
|
-
}
|
|
22108
|
-
}, [isOpen, searchable]);
|
|
22109
|
-
React.useEffect(function () {
|
|
22110
|
-
if (!isOpen) {
|
|
22111
|
-
setSearchTerm('');
|
|
22112
|
-
setLocalValue(value);
|
|
22113
|
-
}
|
|
22114
|
-
}, [isOpen, value]);
|
|
22115
|
-
var filteredOptions = React.useMemo(function () {
|
|
22116
|
-
if (!searchTerm)
|
|
22117
|
-
return options;
|
|
22118
|
-
return __spreadArray([], options, true).filter(function (option) {
|
|
22119
|
-
return option.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
22120
|
-
})
|
|
22121
|
-
.sort(function (a, b) {
|
|
22122
|
-
var term = searchTerm.toLowerCase();
|
|
22123
|
-
var aStartsWith = a.label.toLowerCase().startsWith(term);
|
|
22124
|
-
var bStartsWith = b.label.toLowerCase().startsWith(term);
|
|
22125
|
-
if (aStartsWith && !bStartsWith)
|
|
22126
|
-
return -1;
|
|
22127
|
-
if (!aStartsWith && bStartsWith)
|
|
22128
|
-
return 1;
|
|
22129
|
-
return 0;
|
|
22130
|
-
});
|
|
22131
|
-
}, [options, searchTerm]);
|
|
22132
|
-
var selectedOption = options.find(function (option) { return option.id === value; });
|
|
22133
|
-
var handleTriggerClick = function () {
|
|
22134
|
-
if (!disabled)
|
|
22135
|
-
setIsOpen(!isOpen);
|
|
22136
|
-
};
|
|
22137
|
-
var handleSearchKeyDown = function (e) {
|
|
22138
|
-
var _a;
|
|
22139
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
22140
|
-
e.preventDefault();
|
|
22141
|
-
var target = e.key === 'ArrowDown'
|
|
22142
|
-
? filteredOptions[0]
|
|
22143
|
-
: filteredOptions[filteredOptions.length - 1];
|
|
22144
|
-
if (target) {
|
|
22145
|
-
setLocalValue(target.id);
|
|
22146
|
-
(_a = optionRefs.current.get(target.id)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
22147
|
-
}
|
|
22148
|
-
}
|
|
22149
|
-
else if (e.key === 'Enter') {
|
|
22150
|
-
e.preventDefault();
|
|
22151
|
-
var target = filteredOptions[0];
|
|
22152
|
-
if (target) {
|
|
22153
|
-
onChange(target.id);
|
|
22154
|
-
closeAndRestoreFocus();
|
|
22155
|
-
}
|
|
22156
|
-
}
|
|
22157
|
-
};
|
|
22158
|
-
var handleOptionClick = function (optionId) {
|
|
22159
|
-
onChange(optionId);
|
|
22160
|
-
closeAndRestoreFocus();
|
|
22161
|
-
};
|
|
22162
|
-
var handleOptionRef = function (optionId, el) {
|
|
22163
|
-
if (el)
|
|
22164
|
-
optionRefs.current.set(optionId, el);
|
|
22165
|
-
else
|
|
22166
|
-
optionRefs.current.delete(optionId);
|
|
22167
|
-
};
|
|
22168
|
-
var handleOptionKeyDown = function (e, optionId) {
|
|
22169
|
-
var _a;
|
|
22170
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
22171
|
-
e.preventDefault();
|
|
22172
|
-
var currentIndex = filteredOptions.findIndex(function (o) { return o.id === optionId; });
|
|
22173
|
-
var nextIndex = e.key === 'ArrowDown'
|
|
22174
|
-
? Math.min(currentIndex + 1, filteredOptions.length - 1)
|
|
22175
|
-
: Math.max(currentIndex - 1, 0);
|
|
22176
|
-
var next = filteredOptions[nextIndex];
|
|
22177
|
-
if (next) {
|
|
22178
|
-
setLocalValue(next.id);
|
|
22179
|
-
(_a = optionRefs.current.get(next.id)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
22180
|
-
}
|
|
22181
|
-
}
|
|
22182
|
-
else if (e.key === 'Enter' || e.key === ' ') {
|
|
22183
|
-
e.preventDefault();
|
|
22184
|
-
onChange(optionId);
|
|
22185
|
-
closeAndRestoreFocus();
|
|
22186
|
-
}
|
|
22187
|
-
};
|
|
22188
|
-
return (jsxRuntime.jsxs("div", { className: classNames(styles$f.container, { 'd-inline-block': condensed }), ref: containerRef, children: [jsxRuntime.jsxs("button", { ref: triggerRef, type: "button", className: classNames('d-flex ai-center jc-between w100 br8 bg-white c-pointer ta-left tc-neutral-900', styles$f.selectTrigger, (_b = {},
|
|
22189
|
-
_b[styles$f.selectTriggerOpen] = isOpen,
|
|
22190
|
-
_b[styles$f.condensed] = condensed,
|
|
22191
|
-
_b[styles$f.bordered] = bordered,
|
|
22192
|
-
_b[styles$f.disabled] = disabled,
|
|
22193
|
-
_b)), onClick: handleTriggerClick, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-controls": isOpen ? dropdownId : undefined, children: [jsxRuntime.jsxs("span", { className: 'd-flex ai-center gap8', children: [(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.icon) && (jsxRuntime.jsx("span", { className: styles$f.optionIcon, children: selectedOption.icon })), !condensed && (jsxRuntime.jsx("span", { className: "p-p", children: (_e = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) !== null && _e !== void 0 ? _e : triggerPlaceholder }))] }), showChevron && (jsxRuntime.jsx(ChevronDownIcon, { className: classNames('ml8', (_c = {}, _c[styles$f.chevronOpen] = isOpen, _c)), size: 20, noMargin: true, color: "neutral-600" }))] }), isOpen && (jsxRuntime.jsxs("div", { id: dropdownId, ref: dropdownRef, className: classNames(styles$f.dropdown, 'bg-white br8 p8 d-flex fd-column', (_d = {}, _d[styles$f.dropdownYTop] = dropUp || alignY === 'top', _d[styles$f.dropdownXRight] = alignX === 'right', _d)), children: [searchable && (jsxRuntime.jsx("div", { className: "pb8 bg-white", children: jsxRuntime.jsx(Input, { ref: searchInputRef, type: "text", placeholder: placeholder, value: searchTerm, onChange: function (e) { return setSearchTerm(e.target.value); }, label: placeholder, hideLabel: true, onKeyDown: handleSearchKeyDown }) })), jsxRuntime.jsxs("div", { className: styles$f.optionList, role: "radiogroup", "aria-label": groupName, children: [filteredOptions.map(function (option) {
|
|
22194
|
-
var _a;
|
|
22195
|
-
return (jsxRuntime.jsxs("div", { className: styles$f.optionWrapper, children: [jsxRuntime.jsx("input", { type: "radio", id: "".concat(groupName, "-").concat(option.id), name: groupName, value: option.id, checked: option.id === localValue, onChange: function () { return setLocalValue(option.id); }, onClick: function () { return handleOptionClick(option.id); }, tabIndex: option.id === localValue ? 0 : -1, className: styles$f.optionRadio, ref: function (el) { return handleOptionRef(option.id, el); }, onKeyDown: function (e) { return handleOptionKeyDown(e, option.id); } }), jsxRuntime.jsxs("label", { htmlFor: "".concat(groupName, "-").concat(option.id), className: classNames('d-flex ai-center gap8 w100 br8 c-pointer ta-left tc-neutral-900', styles$f.option, (_a = {},
|
|
22196
|
-
_a[styles$f.optionSelected] = option.id === localValue,
|
|
22197
|
-
_a)), children: [option.icon && (jsxRuntime.jsx("span", { className: styles$f.optionIcon, children: option.icon })), jsxRuntime.jsx("span", { className: "p-p", children: option.label })] })] }, option.id));
|
|
22198
|
-
}), filteredOptions.length === 0 && (jsxRuntime.jsx("p", { className: "p-p tc-neutral-500 ".concat(styles$f.noResults), children: noResultsText }))] })] }))] }));
|
|
22199
|
-
};
|
|
22200
|
-
|
|
22201
22212
|
var Link = function (_a) {
|
|
22202
22213
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
22203
22214
|
return (jsxRuntime.jsx("a", __assign({ className: classNames(className, 'p-a c-pointer') }, rest, { children: children })));
|