opus-toolkit-components 1.8.8 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/main.js
CHANGED
|
@@ -4300,13 +4300,6 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
4300
4300
|
//# sourceMappingURL=useControlledState.module.js.map
|
|
4301
4301
|
|
|
4302
4302
|
|
|
4303
|
-
/***/ }),
|
|
4304
|
-
|
|
4305
|
-
/***/ 8487:
|
|
4306
|
-
/***/ ((module) => {
|
|
4307
|
-
|
|
4308
|
-
module.exports = require("./opus-light-logo.svg");
|
|
4309
|
-
|
|
4310
4303
|
/***/ }),
|
|
4311
4304
|
|
|
4312
4305
|
/***/ 8494:
|
|
@@ -5257,6 +5250,13 @@ const ForwardRef = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(V
|
|
|
5257
5250
|
|
|
5258
5251
|
/***/ }),
|
|
5259
5252
|
|
|
5253
|
+
/***/ 10463:
|
|
5254
|
+
/***/ ((module) => {
|
|
5255
|
+
|
|
5256
|
+
module.exports = require("opus-toolkit-styles/assets/logos/opus-dark-logo.svg");
|
|
5257
|
+
|
|
5258
|
+
/***/ }),
|
|
5259
|
+
|
|
5260
5260
|
/***/ 10540:
|
|
5261
5261
|
/***/ ((module) => {
|
|
5262
5262
|
|
|
@@ -12166,13 +12166,6 @@ const ForwardRef = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(B
|
|
|
12166
12166
|
|
|
12167
12167
|
/***/ }),
|
|
12168
12168
|
|
|
12169
|
-
/***/ 22457:
|
|
12170
|
-
/***/ ((module) => {
|
|
12171
|
-
|
|
12172
|
-
module.exports = require("./opus-dark-logo.svg");
|
|
12173
|
-
|
|
12174
|
-
/***/ }),
|
|
12175
|
-
|
|
12176
12169
|
/***/ 22466:
|
|
12177
12170
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
12178
12171
|
|
|
@@ -17526,6 +17519,13 @@ const ForwardRef = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(N
|
|
|
17526
17519
|
|
|
17527
17520
|
/***/ }),
|
|
17528
17521
|
|
|
17522
|
+
/***/ 32757:
|
|
17523
|
+
/***/ ((module) => {
|
|
17524
|
+
|
|
17525
|
+
module.exports = require("opus-toolkit-styles/assets/logos/opus-light-logo.svg");
|
|
17526
|
+
|
|
17527
|
+
/***/ }),
|
|
17528
|
+
|
|
17529
17529
|
/***/ 32868:
|
|
17530
17530
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17531
17531
|
|
|
@@ -21104,7 +21104,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21104
21104
|
/* harmony import */ var _utils_getDataCy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67339);
|
|
21105
21105
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94178);
|
|
21106
21106
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
|
21107
|
-
const _excluded = ["label", "placeholder", "type", "tabIndex", "title", "name", "isValid", "errorMessage", "onChange", "className", "value", "Icon", "iconPosition", "isAnimated", "required", "shouldRenderCustomComponent", "customComponent", "customComponentProps", "disabled", "dataCy"];
|
|
21107
|
+
const _excluded = ["label", "placeholder", "type", "tabIndex", "title", "name", "isValid", "errorMessage", "onChange", "className", "value", "Icon", "iconPosition", "isAnimated", "required", "hideLabel", "shouldRenderCustomComponent", "customComponent", "customComponentProps", "disabled", "dataCy"];
|
|
21108
21108
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21109
21109
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21110
21110
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -21116,75 +21116,78 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
21116
21116
|
|
|
21117
21117
|
|
|
21118
21118
|
|
|
21119
|
-
/**
|
|
21120
|
-
* Icon component type — any React component that renders an SVG.
|
|
21121
|
-
* @typedef {(props: React.SVGProps<SVGSVGElement>) => JSX.Element} IconComponent
|
|
21119
|
+
/**
|
|
21120
|
+
* Icon component type — any React component that renders an SVG.
|
|
21121
|
+
* @typedef {(props: React.SVGProps<SVGSVGElement>) => JSX.Element} IconComponent
|
|
21122
21122
|
*/
|
|
21123
21123
|
|
|
21124
|
-
/**
|
|
21125
|
-
* Custom component type for supplementary UI below input.
|
|
21126
|
-
* Must be a React component.
|
|
21127
|
-
* @typedef {(props: any) => JSX.Element} CustomComponent
|
|
21124
|
+
/**
|
|
21125
|
+
* Custom component type for supplementary UI below input.
|
|
21126
|
+
* Must be a React component.
|
|
21127
|
+
* @typedef {(props: any) => JSX.Element} CustomComponent
|
|
21128
21128
|
*/
|
|
21129
21129
|
|
|
21130
|
-
/**
|
|
21131
|
-
* Input component props.
|
|
21132
|
-
*
|
|
21133
|
-
* @typedef {Object} InputProps
|
|
21134
|
-
*
|
|
21135
|
-
* @property {string} label
|
|
21136
|
-
* Label displayed above the input.
|
|
21137
|
-
*
|
|
21138
|
-
* @property {string} [placeholder]
|
|
21139
|
-
*
|
|
21140
|
-
* @property {'text'|'email'|'password'|'number'|'search'|'tel'|'url'|'date'|'datetime-local'|'month'|'time'|'week'|string} [type]
|
|
21141
|
-
* HTML input type.
|
|
21142
|
-
*
|
|
21143
|
-
* @property {string|number} [tabIndex]
|
|
21144
|
-
*
|
|
21145
|
-
* @property {string} [title]
|
|
21146
|
-
*
|
|
21147
|
-
* @property {string} [name]
|
|
21148
|
-
*
|
|
21149
|
-
* @property {boolean} [isValid]
|
|
21150
|
-
* Whether the field is valid — shows error text if false.
|
|
21151
|
-
*
|
|
21152
|
-
* @property {string} [errorMessage]
|
|
21153
|
-
*
|
|
21154
|
-
* @property {(event: React.ChangeEvent<HTMLInputElement>) => void} [onChange]
|
|
21155
|
-
* Change handler using your preferred full event signature.
|
|
21156
|
-
*
|
|
21157
|
-
* @property {string} [className]
|
|
21158
|
-
*
|
|
21159
|
-
* @property {string|number} [value]
|
|
21160
|
-
*
|
|
21161
|
-
* @property {IconComponent} [Icon]
|
|
21162
|
-
*
|
|
21163
|
-
* @property {'left'|'right'} [iconPosition]
|
|
21164
|
-
* Icon placement inside the input.
|
|
21165
|
-
*
|
|
21166
|
-
* @property {boolean} [isAnimated]
|
|
21167
|
-
* Enables focus animation on the icon.
|
|
21168
|
-
*
|
|
21169
|
-
* @property {boolean} [required]
|
|
21170
|
-
*
|
|
21171
|
-
* @property {boolean} [
|
|
21172
|
-
*
|
|
21173
|
-
*
|
|
21174
|
-
*
|
|
21175
|
-
*
|
|
21176
|
-
*
|
|
21177
|
-
*
|
|
21178
|
-
*
|
|
21179
|
-
*
|
|
21180
|
-
*
|
|
21130
|
+
/**
|
|
21131
|
+
* Input component props.
|
|
21132
|
+
*
|
|
21133
|
+
* @typedef {Object} InputProps
|
|
21134
|
+
*
|
|
21135
|
+
* @property {string} label
|
|
21136
|
+
* Label displayed above the input.
|
|
21137
|
+
*
|
|
21138
|
+
* @property {string} [placeholder]
|
|
21139
|
+
*
|
|
21140
|
+
* @property {'text'|'email'|'password'|'number'|'search'|'tel'|'url'|'date'|'datetime-local'|'month'|'time'|'week'|string} [type]
|
|
21141
|
+
* HTML input type.
|
|
21142
|
+
*
|
|
21143
|
+
* @property {string|number} [tabIndex]
|
|
21144
|
+
*
|
|
21145
|
+
* @property {string} [title]
|
|
21146
|
+
*
|
|
21147
|
+
* @property {string} [name]
|
|
21148
|
+
*
|
|
21149
|
+
* @property {boolean} [isValid]
|
|
21150
|
+
* Whether the field is valid — shows error text if false.
|
|
21151
|
+
*
|
|
21152
|
+
* @property {string} [errorMessage]
|
|
21153
|
+
*
|
|
21154
|
+
* @property {(event: React.ChangeEvent<HTMLInputElement>) => void} [onChange]
|
|
21155
|
+
* Change handler using your preferred full event signature.
|
|
21156
|
+
*
|
|
21157
|
+
* @property {string} [className]
|
|
21158
|
+
*
|
|
21159
|
+
* @property {string|number} [value]
|
|
21160
|
+
*
|
|
21161
|
+
* @property {IconComponent} [Icon]
|
|
21162
|
+
*
|
|
21163
|
+
* @property {'left'|'right'} [iconPosition]
|
|
21164
|
+
* Icon placement inside the input.
|
|
21165
|
+
*
|
|
21166
|
+
* @property {boolean} [isAnimated]
|
|
21167
|
+
* Enables focus animation on the icon.
|
|
21168
|
+
*
|
|
21169
|
+
* @property {boolean} [required]
|
|
21170
|
+
*
|
|
21171
|
+
* @property {boolean} [hideLabel]
|
|
21172
|
+
* Hides the visible label while keeping the input accessible.
|
|
21173
|
+
*
|
|
21174
|
+
* @property {boolean} [disabled]
|
|
21175
|
+
*
|
|
21176
|
+
* @property {boolean} [shouldRenderCustomComponent]
|
|
21177
|
+
*
|
|
21178
|
+
* @property {CustomComponent} [customComponent]
|
|
21179
|
+
*
|
|
21180
|
+
* @property {Object<string, any>} [customComponentProps]
|
|
21181
|
+
*
|
|
21182
|
+
* @property {string} [dataCy]
|
|
21183
|
+
* Override for auto-generated test selector.
|
|
21181
21184
|
*/
|
|
21182
21185
|
|
|
21183
|
-
/**
|
|
21184
|
-
* ForwardRef Input component with complete JSDoc typings.
|
|
21185
|
-
*
|
|
21186
|
-
* @param {InputProps & React.InputHTMLAttributes<HTMLInputElement>} props
|
|
21187
|
-
* @param {React.Ref<HTMLInputElement>} ref
|
|
21186
|
+
/**
|
|
21187
|
+
* ForwardRef Input component with complete JSDoc typings.
|
|
21188
|
+
*
|
|
21189
|
+
* @param {InputProps & React.InputHTMLAttributes<HTMLInputElement>} props
|
|
21190
|
+
* @param {React.Ref<HTMLInputElement>} ref
|
|
21188
21191
|
*/
|
|
21189
21192
|
|
|
21190
21193
|
const Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {
|
|
@@ -21208,6 +21211,7 @@ const Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_r
|
|
|
21208
21211
|
// Add animation class when focused
|
|
21209
21212
|
required = false,
|
|
21210
21213
|
// Required field indicator
|
|
21214
|
+
hideLabel = false,
|
|
21211
21215
|
shouldRenderCustomComponent,
|
|
21212
21216
|
// Condition to render custom component
|
|
21213
21217
|
customComponent,
|
|
@@ -21227,7 +21231,7 @@ const Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_r
|
|
|
21227
21231
|
as: "label",
|
|
21228
21232
|
variant: "label",
|
|
21229
21233
|
htmlFor: name,
|
|
21230
|
-
className: "mb-1 flex items-center",
|
|
21234
|
+
className: hideLabel ? "sr-only" : "mb-1 flex items-center",
|
|
21231
21235
|
children: [label, required && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Text_Text__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
21232
21236
|
as: "span",
|
|
21233
21237
|
variant: "small",
|
|
@@ -21258,6 +21262,7 @@ const Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_r
|
|
|
21258
21262
|
name,
|
|
21259
21263
|
dataCy
|
|
21260
21264
|
}),
|
|
21265
|
+
"aria-label": hideLabel ? label : undefined,
|
|
21261
21266
|
"aria-invalid": !isValid,
|
|
21262
21267
|
"aria-describedby": !isValid ? "".concat(name, "-error") : undefined
|
|
21263
21268
|
}, rest)), Icon && iconPosition === "right" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
|
|
@@ -23941,7 +23946,7 @@ function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
|
|
|
23941
23946
|
|
|
23942
23947
|
__webpack_require__.r(__webpack_exports__);
|
|
23943
23948
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23944
|
-
/* harmony export */ "default": () => (
|
|
23949
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23945
23950
|
/* harmony export */ });
|
|
23946
23951
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9206);
|
|
23947
23952
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -23949,7 +23954,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23949
23954
|
/* harmony import */ var _Icon_Icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57739);
|
|
23950
23955
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94178);
|
|
23951
23956
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
|
23952
|
-
const _excluded = ["rank", "size", "title", "iconName", "iconLibrary", "isFullWidth", "className", "name", "dataCy"];
|
|
23957
|
+
const _excluded = ["rank", "size", "title", "iconName", "iconLibrary", "icon", "children", "isFullWidth", "className", "name", "dataCy"];
|
|
23953
23958
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23954
23959
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23955
23960
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -23975,7 +23980,7 @@ const iconSizes = {
|
|
|
23975
23980
|
lg: 24
|
|
23976
23981
|
};
|
|
23977
23982
|
const DEFAULT_ICON = "PlusIcon";
|
|
23978
|
-
|
|
23983
|
+
const IconButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {
|
|
23979
23984
|
let {
|
|
23980
23985
|
rank = "primary",
|
|
23981
23986
|
size = "md",
|
|
@@ -23983,28 +23988,34 @@ function IconButton(_ref) {
|
|
|
23983
23988
|
iconName = DEFAULT_ICON,
|
|
23984
23989
|
iconLibrary = "hero",
|
|
23985
23990
|
// 'hero' or 'c247'
|
|
23991
|
+
icon,
|
|
23992
|
+
children,
|
|
23986
23993
|
isFullWidth = false,
|
|
23987
23994
|
className = "",
|
|
23988
23995
|
name,
|
|
23989
23996
|
dataCy
|
|
23990
23997
|
} = _ref,
|
|
23991
23998
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23992
|
-
const classNames = "\n
|
|
23993
|
-
|
|
23999
|
+
const classNames = "\n ".concat(rankStyles[rank] || rankStyles.primary, "\n flex\n items-center\n justify-center\n p-3\n transition\n ease-in-out\n duration-700\n hover:shadow-lg\n ").concat(isFullWidth ? "w-full" : "", "\n ").concat(className, "\n ");
|
|
24000
|
+
const iconContent = children || icon || iconName && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Icon_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
24001
|
+
name: iconName,
|
|
24002
|
+
library: iconLibrary,
|
|
24003
|
+
size: iconSizes[size] || iconSizes.md
|
|
24004
|
+
});
|
|
24005
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("button", _objectSpread(_objectSpread({
|
|
24006
|
+
ref: ref,
|
|
23994
24007
|
title: title,
|
|
23995
24008
|
name: name,
|
|
23996
|
-
className: classNames
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
})), {}, {
|
|
24001
|
-
children: iconName && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Icon_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
24002
|
-
name: iconName,
|
|
24003
|
-
library: iconLibrary,
|
|
24004
|
-
size: iconSizes[size] || iconSizes.md
|
|
24009
|
+
className: classNames,
|
|
24010
|
+
"data-cy": (0,_utils_getDataCy__WEBPACK_IMPORTED_MODULE_1__.getDataCy)({
|
|
24011
|
+
name,
|
|
24012
|
+
dataCy
|
|
24005
24013
|
})
|
|
24014
|
+
}, rest), {}, {
|
|
24015
|
+
children: iconContent
|
|
24006
24016
|
}));
|
|
24007
|
-
}
|
|
24017
|
+
});
|
|
24018
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconButton);
|
|
24008
24019
|
|
|
24009
24020
|
/***/ }),
|
|
24010
24021
|
|
|
@@ -27895,10 +27906,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27895
27906
|
/* harmony export */ });
|
|
27896
27907
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9206);
|
|
27897
27908
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
27898
|
-
/* harmony import */ var
|
|
27899
|
-
/* harmony import */ var
|
|
27900
|
-
/* harmony import */ var
|
|
27901
|
-
/* harmony import */ var
|
|
27909
|
+
/* harmony import */ var opus_toolkit_styles_assets_logos_opus_light_logo_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32757);
|
|
27910
|
+
/* harmony import */ var opus_toolkit_styles_assets_logos_opus_light_logo_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(opus_toolkit_styles_assets_logos_opus_light_logo_svg__WEBPACK_IMPORTED_MODULE_1__);
|
|
27911
|
+
/* harmony import */ var opus_toolkit_styles_assets_logos_opus_dark_logo_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10463);
|
|
27912
|
+
/* harmony import */ var opus_toolkit_styles_assets_logos_opus_dark_logo_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(opus_toolkit_styles_assets_logos_opus_dark_logo_svg__WEBPACK_IMPORTED_MODULE_2__);
|
|
27902
27913
|
/* harmony import */ var _footer_logo_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41518);
|
|
27903
27914
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94178);
|
|
27904
27915
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
|
|
@@ -27941,11 +27952,11 @@ function FooterLogo(_ref) {
|
|
|
27941
27952
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27942
27953
|
const content = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
|
|
27943
27954
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
|
27944
|
-
src: (
|
|
27955
|
+
src: (opus_toolkit_styles_assets_logos_opus_light_logo_svg__WEBPACK_IMPORTED_MODULE_1___default()),
|
|
27945
27956
|
alt: "Opus logo",
|
|
27946
27957
|
className: "footer-logo-light h-10 w-auto"
|
|
27947
27958
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
|
27948
|
-
src: (
|
|
27959
|
+
src: (opus_toolkit_styles_assets_logos_opus_dark_logo_svg__WEBPACK_IMPORTED_MODULE_2___default()),
|
|
27949
27960
|
alt: "Opus logo",
|
|
27950
27961
|
className: "footer-logo-dark h-10 w-auto"
|
|
27951
27962
|
})]
|
|
@@ -52554,6 +52565,356 @@ const ForwardRef = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(D
|
|
|
52554
52565
|
|
|
52555
52566
|
/***/ }),
|
|
52556
52567
|
|
|
52568
|
+
/***/ 79963:
|
|
52569
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
52570
|
+
|
|
52571
|
+
__webpack_require__.r(__webpack_exports__);
|
|
52572
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
52573
|
+
/* harmony export */ "default": () => (/* binding */ FilterPopover)
|
|
52574
|
+
/* harmony export */ });
|
|
52575
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9206);
|
|
52576
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
52577
|
+
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34164);
|
|
52578
|
+
/* harmony import */ var _heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58964);
|
|
52579
|
+
/* harmony import */ var _Buttons_Button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74670);
|
|
52580
|
+
/* harmony import */ var _Checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56067);
|
|
52581
|
+
/* harmony import */ var _Inputs_Input__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(38014);
|
|
52582
|
+
/* harmony import */ var _IconButton_IconButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43155);
|
|
52583
|
+
/* harmony import */ var _Text_Text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21111);
|
|
52584
|
+
/* harmony import */ var _utils_getDataCy__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67339);
|
|
52585
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(94178);
|
|
52586
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__);
|
|
52587
|
+
const _excluded = ["options", "selectedValues", "onApply", "placeholder", "buttonLabel", "icon", "children", "footer", "panelClassName", "bodyClassName", "className", "dataCy", "name"];
|
|
52588
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
52589
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
52590
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
52591
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
52592
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
52593
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
52594
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
52595
|
+
|
|
52596
|
+
|
|
52597
|
+
|
|
52598
|
+
|
|
52599
|
+
|
|
52600
|
+
|
|
52601
|
+
|
|
52602
|
+
|
|
52603
|
+
|
|
52604
|
+
|
|
52605
|
+
/**
|
|
52606
|
+
* @typedef {Object} FilterPopoverOption
|
|
52607
|
+
* @property {string} label
|
|
52608
|
+
* @property {string} value
|
|
52609
|
+
*/
|
|
52610
|
+
|
|
52611
|
+
/**
|
|
52612
|
+
* @typedef {Object} FilterPopoverProps
|
|
52613
|
+
* @property {FilterPopoverOption[]} options
|
|
52614
|
+
* @property {string[]} [selectedValues]
|
|
52615
|
+
* @property {(values: string[]) => void} [onApply]
|
|
52616
|
+
* @property {string} [placeholder]
|
|
52617
|
+
* @property {React.ReactNode} [buttonLabel]
|
|
52618
|
+
* @property {React.ReactNode} [icon]
|
|
52619
|
+
* @property {React.ReactNode | ((context: FilterPopoverRenderContext) => React.ReactNode)} [children]
|
|
52620
|
+
* @property {React.ReactNode | ((context: FilterPopoverRenderContext) => React.ReactNode)} [footer]
|
|
52621
|
+
* @property {string} [panelClassName]
|
|
52622
|
+
* @property {string} [bodyClassName]
|
|
52623
|
+
* @property {string} [className]
|
|
52624
|
+
* @property {string} [dataCy]
|
|
52625
|
+
* @property {string} [name]
|
|
52626
|
+
*/
|
|
52627
|
+
|
|
52628
|
+
/**
|
|
52629
|
+
* @typedef {Object} FilterPopoverRenderContext
|
|
52630
|
+
* @property {boolean} isOpen
|
|
52631
|
+
* @property {string[]} selectedValues
|
|
52632
|
+
* @property {(values: string[] | ((currentValues: string[]) => string[])) => void} setSelectedValues
|
|
52633
|
+
* @property {(value: string) => void} toggleValue
|
|
52634
|
+
* @property {string} searchTerm
|
|
52635
|
+
* @property {(value: string) => void} setSearchTerm
|
|
52636
|
+
* @property {FilterPopoverOption[]} filteredOptions
|
|
52637
|
+
* @property {() => void} closePopover
|
|
52638
|
+
*/
|
|
52639
|
+
|
|
52640
|
+
/**
|
|
52641
|
+
* @param {FilterPopoverProps & React.HTMLAttributes<HTMLDivElement>} props
|
|
52642
|
+
*/
|
|
52643
|
+
|
|
52644
|
+
function FilterPopover(_ref) {
|
|
52645
|
+
let {
|
|
52646
|
+
options = [],
|
|
52647
|
+
selectedValues = [],
|
|
52648
|
+
onApply,
|
|
52649
|
+
placeholder = "Search",
|
|
52650
|
+
buttonLabel = "Apply filters",
|
|
52651
|
+
icon,
|
|
52652
|
+
children,
|
|
52653
|
+
footer,
|
|
52654
|
+
panelClassName = "",
|
|
52655
|
+
bodyClassName = "",
|
|
52656
|
+
className = "",
|
|
52657
|
+
dataCy,
|
|
52658
|
+
name = "filterPopover"
|
|
52659
|
+
} = _ref,
|
|
52660
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
52661
|
+
const [isOpen, setIsOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
52662
|
+
const [searchTerm, setSearchTerm] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");
|
|
52663
|
+
const [localSelectedValues, setLocalSelectedValues] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(selectedValues);
|
|
52664
|
+
const containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
52665
|
+
const triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
52666
|
+
const searchInputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
52667
|
+
const panelRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
52668
|
+
const optionRefs = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);
|
|
52669
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();
|
|
52670
|
+
const panelId = "".concat(name, "-").concat(generatedId, "-panel");
|
|
52671
|
+
const listboxId = "".concat(name, "-").concat(generatedId, "-listbox");
|
|
52672
|
+
const hasCustomContent = typeof children !== "undefined";
|
|
52673
|
+
const panelClasses = (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])("ring-opacity-1 absolute right-0 top-full z-20 mt-2 overflow-hidden rounded-md bg-[--color-primary-bg] shadow-lg ring-1 ring-[--color-stroke] focus:outline-none", hasCustomContent ? "w-[30rem]" : "w-72", panelClassName);
|
|
52674
|
+
const triggerIcon = icon || /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_2__.FunnelIcon, {
|
|
52675
|
+
className: "h-5 w-5"
|
|
52676
|
+
});
|
|
52677
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
52678
|
+
setLocalSelectedValues(selectedValues);
|
|
52679
|
+
}, [selectedValues]);
|
|
52680
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
52681
|
+
if (!isOpen) {
|
|
52682
|
+
setSearchTerm("");
|
|
52683
|
+
return undefined;
|
|
52684
|
+
}
|
|
52685
|
+
if (!hasCustomContent) {
|
|
52686
|
+
var _searchInputRef$curre;
|
|
52687
|
+
(_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 || _searchInputRef$curre.focus();
|
|
52688
|
+
} else {
|
|
52689
|
+
var _panelRef$current;
|
|
52690
|
+
const firstFocusableElement = (_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
52691
|
+
if (firstFocusableElement && typeof firstFocusableElement.focus === "function") {
|
|
52692
|
+
firstFocusableElement.focus();
|
|
52693
|
+
}
|
|
52694
|
+
}
|
|
52695
|
+
const handlePointerDown = event => {
|
|
52696
|
+
var _containerRef$current;
|
|
52697
|
+
if (!((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(event.target))) {
|
|
52698
|
+
setIsOpen(false);
|
|
52699
|
+
}
|
|
52700
|
+
};
|
|
52701
|
+
const handleEscape = event => {
|
|
52702
|
+
if (event.key === "Escape") {
|
|
52703
|
+
var _triggerRef$current;
|
|
52704
|
+
setIsOpen(false);
|
|
52705
|
+
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
52706
|
+
}
|
|
52707
|
+
};
|
|
52708
|
+
document.addEventListener("mousedown", handlePointerDown);
|
|
52709
|
+
document.addEventListener("keydown", handleEscape);
|
|
52710
|
+
return () => {
|
|
52711
|
+
document.removeEventListener("mousedown", handlePointerDown);
|
|
52712
|
+
document.removeEventListener("keydown", handleEscape);
|
|
52713
|
+
};
|
|
52714
|
+
}, [hasCustomContent, isOpen]);
|
|
52715
|
+
const filteredOptions = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
|
|
52716
|
+
const normalizedSearch = searchTerm.trim().toLowerCase();
|
|
52717
|
+
if (!normalizedSearch) {
|
|
52718
|
+
return options;
|
|
52719
|
+
}
|
|
52720
|
+
return options.filter(option => option.label.toLowerCase().includes(normalizedSearch));
|
|
52721
|
+
}, [options, searchTerm]);
|
|
52722
|
+
const setOptionRef = (index, node) => {
|
|
52723
|
+
optionRefs.current[index] = node;
|
|
52724
|
+
};
|
|
52725
|
+
const focusOption = index => {
|
|
52726
|
+
var _optionRefs$current$i;
|
|
52727
|
+
(_optionRefs$current$i = optionRefs.current[index]) === null || _optionRefs$current$i === void 0 || _optionRefs$current$i.focus();
|
|
52728
|
+
};
|
|
52729
|
+
const togglePopover = () => {
|
|
52730
|
+
setIsOpen(previous => {
|
|
52731
|
+
const nextIsOpen = !previous;
|
|
52732
|
+
if (nextIsOpen) {
|
|
52733
|
+
setLocalSelectedValues(selectedValues);
|
|
52734
|
+
}
|
|
52735
|
+
return nextIsOpen;
|
|
52736
|
+
});
|
|
52737
|
+
};
|
|
52738
|
+
const toggleValue = value => {
|
|
52739
|
+
setLocalSelectedValues(currentValues => currentValues.includes(value) ? currentValues.filter(currentValue => currentValue !== value) : [...currentValues, value]);
|
|
52740
|
+
};
|
|
52741
|
+
const handleTriggerKeyDown = event => {
|
|
52742
|
+
if (event.key === "ArrowDown") {
|
|
52743
|
+
event.preventDefault();
|
|
52744
|
+
if (!isOpen) {
|
|
52745
|
+
setLocalSelectedValues(selectedValues);
|
|
52746
|
+
setIsOpen(true);
|
|
52747
|
+
return;
|
|
52748
|
+
}
|
|
52749
|
+
if (filteredOptions.length > 0) {
|
|
52750
|
+
focusOption(0);
|
|
52751
|
+
}
|
|
52752
|
+
}
|
|
52753
|
+
};
|
|
52754
|
+
const handleSearchKeyDown = event => {
|
|
52755
|
+
if (event.key === "ArrowDown" && filteredOptions.length > 0) {
|
|
52756
|
+
event.preventDefault();
|
|
52757
|
+
focusOption(0);
|
|
52758
|
+
}
|
|
52759
|
+
};
|
|
52760
|
+
const handleOptionKeyDown = (event, index) => {
|
|
52761
|
+
if (event.key === "ArrowDown" && filteredOptions.length > 0) {
|
|
52762
|
+
event.preventDefault();
|
|
52763
|
+
focusOption((index + 1) % filteredOptions.length);
|
|
52764
|
+
}
|
|
52765
|
+
if (event.key === "ArrowUp") {
|
|
52766
|
+
event.preventDefault();
|
|
52767
|
+
if (index === 0) {
|
|
52768
|
+
var _searchInputRef$curre2;
|
|
52769
|
+
(_searchInputRef$curre2 = searchInputRef.current) === null || _searchInputRef$curre2 === void 0 || _searchInputRef$curre2.focus();
|
|
52770
|
+
return;
|
|
52771
|
+
}
|
|
52772
|
+
focusOption(index - 1);
|
|
52773
|
+
}
|
|
52774
|
+
if (event.key === "Home") {
|
|
52775
|
+
event.preventDefault();
|
|
52776
|
+
focusOption(0);
|
|
52777
|
+
}
|
|
52778
|
+
if (event.key === "End") {
|
|
52779
|
+
event.preventDefault();
|
|
52780
|
+
focusOption(filteredOptions.length - 1);
|
|
52781
|
+
}
|
|
52782
|
+
if (event.key === "Escape") {
|
|
52783
|
+
var _triggerRef$current2;
|
|
52784
|
+
event.preventDefault();
|
|
52785
|
+
setIsOpen(false);
|
|
52786
|
+
(_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 || _triggerRef$current2.focus();
|
|
52787
|
+
}
|
|
52788
|
+
};
|
|
52789
|
+
const handleApply = () => {
|
|
52790
|
+
var _triggerRef$current3;
|
|
52791
|
+
if (localSelectedValues.length === 0) {
|
|
52792
|
+
return;
|
|
52793
|
+
}
|
|
52794
|
+
onApply === null || onApply === void 0 || onApply(localSelectedValues);
|
|
52795
|
+
setIsOpen(false);
|
|
52796
|
+
(_triggerRef$current3 = triggerRef.current) === null || _triggerRef$current3 === void 0 || _triggerRef$current3.focus();
|
|
52797
|
+
};
|
|
52798
|
+
const closePopover = () => {
|
|
52799
|
+
var _triggerRef$current4;
|
|
52800
|
+
setIsOpen(false);
|
|
52801
|
+
(_triggerRef$current4 = triggerRef.current) === null || _triggerRef$current4 === void 0 || _triggerRef$current4.focus();
|
|
52802
|
+
};
|
|
52803
|
+
const renderContext = {
|
|
52804
|
+
isOpen,
|
|
52805
|
+
selectedValues: localSelectedValues,
|
|
52806
|
+
setSelectedValues: setLocalSelectedValues,
|
|
52807
|
+
toggleValue,
|
|
52808
|
+
searchTerm,
|
|
52809
|
+
setSearchTerm,
|
|
52810
|
+
filteredOptions,
|
|
52811
|
+
closePopover
|
|
52812
|
+
};
|
|
52813
|
+
const resolvedChildren = typeof children === "function" ? children(renderContext) : children;
|
|
52814
|
+
const resolvedFooter = typeof footer === "function" ? footer(renderContext) : footer;
|
|
52815
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div", _objectSpread(_objectSpread({
|
|
52816
|
+
ref: containerRef,
|
|
52817
|
+
className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])("relative inline-flex", className),
|
|
52818
|
+
"data-cy": (0,_utils_getDataCy__WEBPACK_IMPORTED_MODULE_8__.getDataCy)({
|
|
52819
|
+
name,
|
|
52820
|
+
dataCy
|
|
52821
|
+
})
|
|
52822
|
+
}, rest), {}, {
|
|
52823
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_IconButton_IconButton__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
52824
|
+
ref: triggerRef,
|
|
52825
|
+
type: "button",
|
|
52826
|
+
rank: isOpen ? "primary" : "outline",
|
|
52827
|
+
title: "Open filters",
|
|
52828
|
+
"aria-label": "Open filters",
|
|
52829
|
+
"aria-haspopup": "dialog",
|
|
52830
|
+
"aria-expanded": isOpen,
|
|
52831
|
+
"aria-controls": panelId,
|
|
52832
|
+
name: name,
|
|
52833
|
+
dataCy: dataCy ? "".concat(dataCy, "-trigger") : undefined,
|
|
52834
|
+
icon: triggerIcon,
|
|
52835
|
+
iconName: "",
|
|
52836
|
+
onClick: togglePopover,
|
|
52837
|
+
onKeyDown: handleTriggerKeyDown
|
|
52838
|
+
}), isOpen && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", {
|
|
52839
|
+
ref: panelRef,
|
|
52840
|
+
id: panelId,
|
|
52841
|
+
role: "dialog",
|
|
52842
|
+
"aria-modal": "false",
|
|
52843
|
+
"aria-label": "Filter options",
|
|
52844
|
+
className: panelClasses,
|
|
52845
|
+
children: hasCustomContent ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment, {
|
|
52846
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", {
|
|
52847
|
+
className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])("p-4", bodyClassName),
|
|
52848
|
+
children: resolvedChildren
|
|
52849
|
+
}), resolvedFooter && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", {
|
|
52850
|
+
className: "border-t border-[--color-stroke] p-4",
|
|
52851
|
+
children: resolvedFooter
|
|
52852
|
+
})]
|
|
52853
|
+
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment, {
|
|
52854
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", {
|
|
52855
|
+
className: "border-b border-[--color-stroke] p-4 pb-0",
|
|
52856
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_Inputs_Input__WEBPACK_IMPORTED_MODULE_5__["default"], {
|
|
52857
|
+
ref: searchInputRef,
|
|
52858
|
+
label: "Search",
|
|
52859
|
+
hideLabel: true,
|
|
52860
|
+
type: "search",
|
|
52861
|
+
name: "".concat(name, "-search"),
|
|
52862
|
+
placeholder: placeholder,
|
|
52863
|
+
value: searchTerm,
|
|
52864
|
+
onChange: event => setSearchTerm(event.target.value),
|
|
52865
|
+
dataCy: dataCy ? "".concat(dataCy, "-search") : undefined,
|
|
52866
|
+
className: "mb-0",
|
|
52867
|
+
onKeyDown: handleSearchKeyDown
|
|
52868
|
+
})
|
|
52869
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", {
|
|
52870
|
+
className: "border-b border-[--color-stroke] p-4 pt-4",
|
|
52871
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div", {
|
|
52872
|
+
id: listboxId,
|
|
52873
|
+
role: "listbox",
|
|
52874
|
+
"aria-multiselectable": "true",
|
|
52875
|
+
className: "max-h-60 space-y-1 overflow-y-auto pr-1",
|
|
52876
|
+
children: [filteredOptions.length === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_Text_Text__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
|
52877
|
+
variant: "small",
|
|
52878
|
+
className: "px-3 py-2 text-[--color-text-weak]",
|
|
52879
|
+
children: "No options found."
|
|
52880
|
+
}), filteredOptions.map((option, index) => {
|
|
52881
|
+
const isSelected = localSelectedValues.includes(option.value);
|
|
52882
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("button", {
|
|
52883
|
+
ref: node => setOptionRef(index, node),
|
|
52884
|
+
type: "button",
|
|
52885
|
+
role: "option",
|
|
52886
|
+
"aria-selected": isSelected,
|
|
52887
|
+
className: "flex w-full items-center gap-3 rounded-md px-3 py-2 text-left focus:outline-none",
|
|
52888
|
+
"data-cy": dataCy ? "".concat(dataCy, "-option-").concat(option.value) : undefined,
|
|
52889
|
+
onClick: () => toggleValue(option.value),
|
|
52890
|
+
onKeyDown: event => handleOptionKeyDown(event, index),
|
|
52891
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_Checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
|
52892
|
+
label: option.label,
|
|
52893
|
+
name: "".concat(name, "-").concat(option.value),
|
|
52894
|
+
value: isSelected,
|
|
52895
|
+
className: "pointer-events-none mb-0",
|
|
52896
|
+
dataCy: dataCy ? "".concat(dataCy, "-checkbox-").concat(option.value) : undefined
|
|
52897
|
+
})
|
|
52898
|
+
}, option.value);
|
|
52899
|
+
})]
|
|
52900
|
+
})
|
|
52901
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", {
|
|
52902
|
+
className: "p-4 pt-4",
|
|
52903
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
|
52904
|
+
text: buttonLabel,
|
|
52905
|
+
isFullWidth: true,
|
|
52906
|
+
state: localSelectedValues.length > 0 ? "default" : "disabled",
|
|
52907
|
+
onClick: handleApply,
|
|
52908
|
+
dataCy: dataCy ? "".concat(dataCy, "-apply") : undefined
|
|
52909
|
+
})
|
|
52910
|
+
})]
|
|
52911
|
+
})
|
|
52912
|
+
})]
|
|
52913
|
+
}));
|
|
52914
|
+
}
|
|
52915
|
+
|
|
52916
|
+
/***/ }),
|
|
52917
|
+
|
|
52557
52918
|
/***/ 80184:
|
|
52558
52919
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
52559
52920
|
|
|
@@ -64927,33 +65288,34 @@ var __webpack_exports__ = {};
|
|
|
64927
65288
|
__webpack_require__.r(__webpack_exports__);
|
|
64928
65289
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
64929
65290
|
/* harmony export */ Accordion: () => (/* reexport safe */ _components_Accordions_Accordion__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
64930
|
-
/* harmony export */ BarLayout: () => (/* reexport safe */
|
|
65291
|
+
/* harmony export */ BarLayout: () => (/* reexport safe */ _components_BarLayout_BarLayout__WEBPACK_IMPORTED_MODULE_27__["default"]),
|
|
64931
65292
|
/* harmony export */ Button: () => (/* reexport safe */ _components_Buttons_Button__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
64932
65293
|
/* harmony export */ Callout: () => (/* reexport safe */ _components_Callout_Callout__WEBPACK_IMPORTED_MODULE_5__["default"]),
|
|
64933
65294
|
/* harmony export */ Card: () => (/* reexport safe */ _components_Cards_Card__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
64934
65295
|
/* harmony export */ CardItem: () => (/* reexport safe */ _components_Cards_CardItem__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
64935
65296
|
/* harmony export */ Checkbox: () => (/* reexport safe */ _components_Forms_Checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_10__["default"]),
|
|
64936
|
-
/* harmony export */ CookieBanner: () => (/* reexport safe */
|
|
65297
|
+
/* harmony export */ CookieBanner: () => (/* reexport safe */ _components_Cookie_Cookie__WEBPACK_IMPORTED_MODULE_19__["default"]),
|
|
64937
65298
|
/* harmony export */ DatePicker: () => (/* reexport safe */ _components_Forms_Datepickers_DatePicker__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
64938
|
-
/* harmony export */ Dropdown: () => (/* reexport safe */
|
|
65299
|
+
/* harmony export */ Dropdown: () => (/* reexport safe */ _components_Forms_Dropdowns_Dropdown__WEBPACK_IMPORTED_MODULE_13__["default"]),
|
|
64939
65300
|
/* harmony export */ FileUploadCard: () => (/* reexport safe */ _components_Cards_FileUploadCard__WEBPACK_IMPORTED_MODULE_4__["default"]),
|
|
64940
|
-
/* harmony export */
|
|
64941
|
-
/* harmony export */
|
|
64942
|
-
/* harmony export */
|
|
64943
|
-
/* harmony export */
|
|
64944
|
-
/* harmony export */
|
|
65301
|
+
/* harmony export */ FilterPopover: () => (/* reexport safe */ _components_Forms_FilterPopover_FilterPopover__WEBPACK_IMPORTED_MODULE_11__["default"]),
|
|
65302
|
+
/* harmony export */ Footer: () => (/* reexport safe */ _components_Footer_Footer__WEBPACK_IMPORTED_MODULE_24__["default"]),
|
|
65303
|
+
/* harmony export */ FooterLogo: () => (/* reexport safe */ _components_FooterLogo_FooterLogo__WEBPACK_IMPORTED_MODULE_25__["default"]),
|
|
65304
|
+
/* harmony export */ Header: () => (/* reexport safe */ _components_Header_Header__WEBPACK_IMPORTED_MODULE_22__["default"]),
|
|
65305
|
+
/* harmony export */ Icon: () => (/* reexport safe */ _components_Icon_Icon__WEBPACK_IMPORTED_MODULE_23__["default"]),
|
|
65306
|
+
/* harmony export */ IconButton: () => (/* reexport safe */ _components_IconButton_IconButton__WEBPACK_IMPORTED_MODULE_29__["default"]),
|
|
64945
65307
|
/* harmony export */ Input: () => (/* reexport safe */ _components_Forms_Inputs_Input__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
64946
|
-
/* harmony export */ Loader: () => (/* reexport safe */
|
|
64947
|
-
/* harmony export */ Modal: () => (/* reexport safe */
|
|
64948
|
-
/* harmony export */ Navbar: () => (/* reexport safe */
|
|
64949
|
-
/* harmony export */ PageTemplate: () => (/* reexport safe */
|
|
64950
|
-
/* harmony export */ Pill: () => (/* reexport safe */
|
|
64951
|
-
/* harmony export */ PillButton: () => (/* reexport safe */
|
|
64952
|
-
/* harmony export */ ProfileCard: () => (/* reexport safe */
|
|
65308
|
+
/* harmony export */ Loader: () => (/* reexport safe */ _components_Loader_Loader__WEBPACK_IMPORTED_MODULE_16__["default"]),
|
|
65309
|
+
/* harmony export */ Modal: () => (/* reexport safe */ _components_Modals_Modal__WEBPACK_IMPORTED_MODULE_15__["default"]),
|
|
65310
|
+
/* harmony export */ Navbar: () => (/* reexport safe */ _components_Navbar_Navbar__WEBPACK_IMPORTED_MODULE_14__["default"]),
|
|
65311
|
+
/* harmony export */ PageTemplate: () => (/* reexport safe */ _components_PageTemplate_PageTemplate__WEBPACK_IMPORTED_MODULE_26__["default"]),
|
|
65312
|
+
/* harmony export */ Pill: () => (/* reexport safe */ _components_Pills_Pill__WEBPACK_IMPORTED_MODULE_17__["default"]),
|
|
65313
|
+
/* harmony export */ PillButton: () => (/* reexport safe */ _components_Pills_PillButton__WEBPACK_IMPORTED_MODULE_18__["default"]),
|
|
65314
|
+
/* harmony export */ ProfileCard: () => (/* reexport safe */ _components_Profile_ProfileCard_ProfileCard__WEBPACK_IMPORTED_MODULE_28__["default"]),
|
|
64953
65315
|
/* harmony export */ RadioButton: () => (/* reexport safe */ _components_Forms_Radios_RadioButton__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
64954
|
-
/* harmony export */ Sidebar: () => (/* reexport safe */
|
|
64955
|
-
/* harmony export */ Table: () => (/* reexport safe */
|
|
64956
|
-
/* harmony export */ Text: () => (/* reexport safe */
|
|
65316
|
+
/* harmony export */ Sidebar: () => (/* reexport safe */ _components_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_21__["default"]),
|
|
65317
|
+
/* harmony export */ Table: () => (/* reexport safe */ _components_Tables_Table__WEBPACK_IMPORTED_MODULE_12__["default"]),
|
|
65318
|
+
/* harmony export */ Text: () => (/* reexport safe */ _components_Text_Text__WEBPACK_IMPORTED_MODULE_20__["default"]),
|
|
64957
65319
|
/* harmony export */ ToggleSwitch: () => (/* reexport safe */ _components_Forms_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__["default"])
|
|
64958
65320
|
/* harmony export */ });
|
|
64959
65321
|
/* harmony import */ var _components_Accordions_Accordion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43614);
|
|
@@ -64967,24 +65329,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64967
65329
|
/* harmony import */ var _components_Forms_ToggleSwitch_ToggleSwitch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1181);
|
|
64968
65330
|
/* harmony import */ var _components_Forms_Radios_RadioButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(16720);
|
|
64969
65331
|
/* harmony import */ var _components_Forms_Checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(56067);
|
|
64970
|
-
/* harmony import */ var
|
|
64971
|
-
/* harmony import */ var
|
|
64972
|
-
/* harmony import */ var
|
|
64973
|
-
/* harmony import */ var
|
|
64974
|
-
/* harmony import */ var
|
|
64975
|
-
/* harmony import */ var
|
|
64976
|
-
/* harmony import */ var
|
|
64977
|
-
/* harmony import */ var
|
|
64978
|
-
/* harmony import */ var
|
|
64979
|
-
/* harmony import */ var
|
|
64980
|
-
/* harmony import */ var
|
|
64981
|
-
/* harmony import */ var
|
|
64982
|
-
/* harmony import */ var
|
|
64983
|
-
/* harmony import */ var
|
|
64984
|
-
/* harmony import */ var
|
|
64985
|
-
/* harmony import */ var
|
|
64986
|
-
/* harmony import */ var
|
|
64987
|
-
/* harmony import */ var
|
|
65332
|
+
/* harmony import */ var _components_Forms_FilterPopover_FilterPopover__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(79963);
|
|
65333
|
+
/* harmony import */ var _components_Tables_Table__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28966);
|
|
65334
|
+
/* harmony import */ var _components_Forms_Dropdowns_Dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(85894);
|
|
65335
|
+
/* harmony import */ var _components_Navbar_Navbar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(21097);
|
|
65336
|
+
/* harmony import */ var _components_Modals_Modal__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(50548);
|
|
65337
|
+
/* harmony import */ var _components_Loader_Loader__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(77695);
|
|
65338
|
+
/* harmony import */ var _components_Pills_Pill__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(89714);
|
|
65339
|
+
/* harmony import */ var _components_Pills_PillButton__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(97670);
|
|
65340
|
+
/* harmony import */ var _components_Cookie_Cookie__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(44609);
|
|
65341
|
+
/* harmony import */ var _components_Text_Text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(21111);
|
|
65342
|
+
/* harmony import */ var _components_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(11775);
|
|
65343
|
+
/* harmony import */ var _components_Header_Header__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(38195);
|
|
65344
|
+
/* harmony import */ var _components_Icon_Icon__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(57739);
|
|
65345
|
+
/* harmony import */ var _components_Footer_Footer__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(3047);
|
|
65346
|
+
/* harmony import */ var _components_FooterLogo_FooterLogo__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(49465);
|
|
65347
|
+
/* harmony import */ var _components_PageTemplate_PageTemplate__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3179);
|
|
65348
|
+
/* harmony import */ var _components_BarLayout_BarLayout__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(7779);
|
|
65349
|
+
/* harmony import */ var _components_Profile_ProfileCard_ProfileCard__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(64977);
|
|
65350
|
+
/* harmony import */ var _components_IconButton_IconButton__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(43155);
|
|
65351
|
+
|
|
64988
65352
|
|
|
64989
65353
|
|
|
64990
65354
|
|