@seamly/web-ui 21.0.2-beta.3 → 21.0.2-beta.5

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.
Files changed (30) hide show
  1. package/build/dist/lib/components.js +119 -186
  2. package/build/dist/lib/components.min.js +1 -1
  3. package/build/dist/lib/components.min.js.LICENSE.txt +1 -1
  4. package/build/dist/lib/hooks.js +27 -27
  5. package/build/dist/lib/hooks.min.js +1 -1
  6. package/build/dist/lib/index.debug.js +7 -7
  7. package/build/dist/lib/index.debug.min.js +1 -1
  8. package/build/dist/lib/index.js +135 -190
  9. package/build/dist/lib/index.min.js +1 -1
  10. package/build/dist/lib/index.min.js.LICENSE.txt +1 -1
  11. package/build/dist/lib/standalone.js +166 -220
  12. package/build/dist/lib/standalone.min.js +1 -1
  13. package/build/dist/lib/standalone.min.js.LICENSE.txt +1 -1
  14. package/build/dist/lib/style-guide.js +142 -203
  15. package/build/dist/lib/style-guide.min.js +1 -1
  16. package/build/dist/lib/style-guide.min.js.LICENSE.txt +1 -1
  17. package/build/dist/lib/styles-default-implementation.js +1 -1
  18. package/build/dist/lib/styles.js +1 -1
  19. package/build/dist/lib/utils.js +133 -190
  20. package/build/dist/lib/utils.min.js +1 -1
  21. package/build/dist/lib/utils.min.js.LICENSE.txt +1 -1
  22. package/package.json +7 -6
  23. package/src/javascripts/domains/translations/components/options-dialog/translation-option.tsx +20 -19
  24. package/src/javascripts/domains/translations/components/options-dialog/translation-options.tsx +2 -0
  25. package/src/javascripts/index.ts +1 -0
  26. package/src/javascripts/lib/external-api/index.js +17 -4
  27. package/src/javascripts/style-guide/components/static-core.js +8 -11
  28. package/src/javascripts/style-guide/components/view.js +2 -2
  29. package/src/stylesheets/5-components/_translation-options.scss +23 -35
  30. package/src/stylesheets/6-default-implementation/_hover.scss +4 -0
@@ -117,37 +117,37 @@ module.exports = hoistNonReactStatics;
117
117
 
118
118
  __webpack_require__.r(__webpack_exports__);
119
119
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
120
- /* harmony export */ "Children": () => (/* binding */ A),
120
+ /* harmony export */ "Children": () => (/* binding */ O),
121
121
  /* harmony export */ "Component": () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.Component),
122
122
  /* harmony export */ "Fragment": () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.Fragment),
123
- /* harmony export */ "PureComponent": () => (/* binding */ E),
124
- /* harmony export */ "StrictMode": () => (/* binding */ hn),
125
- /* harmony export */ "Suspense": () => (/* binding */ U),
126
- /* harmony export */ "SuspenseList": () => (/* binding */ M),
127
- /* harmony export */ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED": () => (/* binding */ en),
128
- /* harmony export */ "cloneElement": () => (/* binding */ ln),
123
+ /* harmony export */ "PureComponent": () => (/* binding */ w),
124
+ /* harmony export */ "StrictMode": () => (/* binding */ vn),
125
+ /* harmony export */ "Suspense": () => (/* binding */ D),
126
+ /* harmony export */ "SuspenseList": () => (/* binding */ V),
127
+ /* harmony export */ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED": () => (/* binding */ rn),
128
+ /* harmony export */ "cloneElement": () => (/* binding */ cn),
129
129
  /* harmony export */ "createContext": () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.createContext),
130
130
  /* harmony export */ "createElement": () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.createElement),
131
- /* harmony export */ "createFactory": () => (/* binding */ un),
132
- /* harmony export */ "createPortal": () => (/* binding */ $),
131
+ /* harmony export */ "createFactory": () => (/* binding */ on),
132
+ /* harmony export */ "createPortal": () => (/* binding */ j),
133
133
  /* harmony export */ "createRef": () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.createRef),
134
- /* harmony export */ "default": () => (/* binding */ _n),
135
- /* harmony export */ "findDOMNode": () => (/* binding */ fn),
136
- /* harmony export */ "flushSync": () => (/* binding */ sn),
137
- /* harmony export */ "forwardRef": () => (/* binding */ N),
138
- /* harmony export */ "hydrate": () => (/* binding */ Y),
139
- /* harmony export */ "isValidElement": () => (/* binding */ on),
140
- /* harmony export */ "lazy": () => (/* binding */ F),
141
- /* harmony export */ "memo": () => (/* binding */ w),
142
- /* harmony export */ "render": () => (/* binding */ Z),
143
- /* harmony export */ "startTransition": () => (/* binding */ vn),
144
- /* harmony export */ "unmountComponentAtNode": () => (/* binding */ cn),
145
- /* harmony export */ "unstable_batchedUpdates": () => (/* binding */ an),
146
- /* harmony export */ "useDeferredValue": () => (/* binding */ dn),
147
- /* harmony export */ "useInsertionEffect": () => (/* binding */ mn),
148
- /* harmony export */ "useSyncExternalStore": () => (/* binding */ yn),
149
- /* harmony export */ "useTransition": () => (/* binding */ pn),
150
- /* harmony export */ "version": () => (/* binding */ rn)
134
+ /* harmony export */ "default": () => (/* binding */ bn),
135
+ /* harmony export */ "findDOMNode": () => (/* binding */ an),
136
+ /* harmony export */ "flushSync": () => (/* binding */ hn),
137
+ /* harmony export */ "forwardRef": () => (/* binding */ k),
138
+ /* harmony export */ "hydrate": () => (/* binding */ q),
139
+ /* harmony export */ "isValidElement": () => (/* binding */ ln),
140
+ /* harmony export */ "lazy": () => (/* binding */ M),
141
+ /* harmony export */ "memo": () => (/* binding */ R),
142
+ /* harmony export */ "render": () => (/* binding */ Y),
143
+ /* harmony export */ "startTransition": () => (/* binding */ dn),
144
+ /* harmony export */ "unmountComponentAtNode": () => (/* binding */ fn),
145
+ /* harmony export */ "unstable_batchedUpdates": () => (/* binding */ sn),
146
+ /* harmony export */ "useDeferredValue": () => (/* binding */ pn),
147
+ /* harmony export */ "useInsertionEffect": () => (/* binding */ yn),
148
+ /* harmony export */ "useSyncExternalStore": () => (/* binding */ _n),
149
+ /* harmony export */ "useTransition": () => (/* binding */ mn),
150
+ /* harmony export */ "version": () => (/* binding */ un)
151
151
  /* harmony export */ });
152
152
  /* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
153
153
  /* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(preact__WEBPACK_IMPORTED_MODULE_0__);
@@ -156,7 +156,7 @@ __webpack_require__.r(__webpack_exports__);
156
156
  /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
157
157
  /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in preact_hooks__WEBPACK_IMPORTED_MODULE_1__) if(["default","Component","Fragment","createContext","createElement","createRef","Children","PureComponent","StrictMode","Suspense","SuspenseList","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createFactory","createPortal","findDOMNode","flushSync","forwardRef","hydrate","isValidElement","lazy","memo","render","startTransition","unmountComponentAtNode","unstable_batchedUpdates","useDeferredValue","useInsertionEffect","useSyncExternalStore","useTransition","version"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => preact_hooks__WEBPACK_IMPORTED_MODULE_1__[__WEBPACK_IMPORT_KEY__]
158
158
  /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
159
- function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function E(n){this.props=n}function w(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(E.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var R=preact__WEBPACK_IMPORTED_MODULE_0__.options.__b;preact__WEBPACK_IMPORTED_MODULE_0__.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var k=function(n,t){return null==n?null:(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)((0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).map(t))},A={map:k,forEach:k,count:function(n){return n?(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).length:0},only:function(n){var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray},O=preact__WEBPACK_IMPORTED_MODULE_0__.options.__e;preact__WEBPACK_IMPORTED_MODULE_0__.options.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r)};var T=preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount;function I(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return I(n,t,e)})),n}function L(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function U(){this.__u=0,this.t=null,this.__b=null}function D(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function F(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return (0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(r,o)}return o.displayName="Lazy",o.__f=!0,o}function M(){this.u=null,this.o=null}preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),T&&T(n)},(U.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=D(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=L(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},U.prototype.componentWillUnmount=function(){this.t=[]},U.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=I(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,n.fallback);return i&&(i.__h=null),[(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)((0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(W,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function $(n,e){var r=(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(P,{__v:n,i:e});return r.containerInfo=e,r}(M.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__a=function(n){var t=this,e=D(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u()};e?e(o):o()}},M.prototype.render=function(n){this.u=null,this.o=new Map;var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},M.prototype.componentDidUpdate=M.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t)})};var j="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,B="undefined"!=typeof document,H=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function Z(n,t,e){return null==t.__k&&(t.textContent=""),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(n,t),"function"==typeof e&&e(),n?n.__c:null}function Y(n,t,e){return (0,preact__WEBPACK_IMPORTED_MODULE_0__.hydrate)(n,t),"function"==typeof e&&e(),n?n.__c:null}preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var q=preact__WEBPACK_IMPORTED_MODULE_0__.options.event;function G(){}function J(){return this.cancelBubble}function K(){return this.defaultPrevented}preact__WEBPACK_IMPORTED_MODULE_0__.options.event=function(n){return q&&(n=q(n)),n.persist=G,n.isPropagationStopped=J,n.isDefaultPrevented=K,n.nativeEvent=n};var Q,X={configurable:!0,get:function(){return this.class}},nn=preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode;preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];B&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!H(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&z.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l)}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),"select"==t&&null!=u.defaultValue&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),n.props=u,e.class!=e.className&&(X.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",X))}n.$$typeof=j,nn&&nn(n)};var tn=preact__WEBPACK_IMPORTED_MODULE_0__.options.__r;preact__WEBPACK_IMPORTED_MODULE_0__.options.__r=function(n){tn&&tn(n),Q=n.__c};var en={ReactCurrentDispatcher:{current:{readContext:function(n){return Q.__n[n.__c].props.value}}}},rn="17.0.2";function un(n){return preact__WEBPACK_IMPORTED_MODULE_0__.createElement.bind(null,n)}function on(n){return!!n&&n.$$typeof===j}function ln(n){return on(n)?preact__WEBPACK_IMPORTED_MODULE_0__.cloneElement.apply(null,arguments):n}function cn(n){return!!n.__k&&((0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,n),!0)}function fn(n){return n&&(n.base||1===n.nodeType&&n)||null}var an=function(n,t){return n(t)},sn=function(n,t){return n(t)},hn=preact__WEBPACK_IMPORTED_MODULE_0__.Fragment;function vn(n){n()}function dn(n){return n}function pn(){return[!1,vn]}var mn=preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect;function yn(n,t){var e=t(),r=(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState)({h:{__:e,v:t}}),u=r[0].h,o=r[1];return (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(function(){u.__=e,u.v=t,u.__!==t()&&o({h:u})},[n,e,t]),(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function(){return u.__!==u.v()&&o({h:u}),n(function(){u.__!==u.v()&&o({h:u})})},[n]),e}var _n={useState:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState,useId:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useId,useReducer:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useReducer,useEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect,useLayoutEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect,useInsertionEffect:mn,useTransition:pn,useDeferredValue:dn,useSyncExternalStore:yn,startTransition:vn,useRef:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useRef,useImperativeHandle:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle,useMemo:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useMemo,useCallback:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useCallback,useContext:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useContext,useDebugValue:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useDebugValue,version:"17.0.2",Children:A,render:Z,hydrate:Y,unmountComponentAtNode:cn,createPortal:$,createElement:preact__WEBPACK_IMPORTED_MODULE_0__.createElement,createContext:preact__WEBPACK_IMPORTED_MODULE_0__.createContext,createFactory:un,cloneElement:ln,createRef:preact__WEBPACK_IMPORTED_MODULE_0__.createRef,Fragment:preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,isValidElement:on,findDOMNode:fn,Component:preact__WEBPACK_IMPORTED_MODULE_0__.Component,PureComponent:E,memo:w,forwardRef:N,flushSync:sn,unstable_batchedUpdates:an,StrictMode:hn,Suspense:U,SuspenseList:M,lazy:F,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:en};
159
+ function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function E(n,t){return n===t&&(0!==n||1/n==1/t)||n!=n&&t!=t}function w(n){this.props=n}function R(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(w.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var x=preact__WEBPACK_IMPORTED_MODULE_0__.options.__b;preact__WEBPACK_IMPORTED_MODULE_0__.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),x&&x(n)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=N,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var A=function(n,t){return null==n?null:(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)((0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).map(t))},O={map:A,forEach:A,count:function(n){return n?(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).length:0},only:function(n){var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray},T=preact__WEBPACK_IMPORTED_MODULE_0__.options.__e;preact__WEBPACK_IMPORTED_MODULE_0__.options.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r)};var I=preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount;function L(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)})),n}function U(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return U(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function D(){this.__u=0,this.t=null,this.__b=null}function F(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return (0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(r,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null}preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),I&&I(n)},(D.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=F(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=U(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},D.prototype.componentWillUnmount=function(){this.t=[]},D.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=L(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,n.fallback);return i&&(i.__h=null),[(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function P(n){return this.getChildContext=function(){return n.context},n.children}function $(n){var e=this,r=n.i;e.componentWillUnmount=function(){(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)((0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(P,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function j(n,e){var r=(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)($,{__v:n,i:e});return r.containerInfo=e,r}(V.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__a=function(n){var t=this,e=F(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u()};e?e(o):o()}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t)})};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H="undefined"!=typeof document,Z=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function Y(n,t,e){return null==t.__k&&(t.textContent=""),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(n,t),"function"==typeof e&&e(),n?n.__c:null}function q(n,t,e){return (0,preact__WEBPACK_IMPORTED_MODULE_0__.hydrate)(n,t),"function"==typeof e&&e(),n?n.__c:null}preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var G=preact__WEBPACK_IMPORTED_MODULE_0__.options.event;function J(){}function K(){return this.cancelBubble}function Q(){return this.defaultPrevented}preact__WEBPACK_IMPORTED_MODULE_0__.options.event=function(n){return G&&(n=G(n)),n.persist=J,n.isPropagationStopped=K,n.isDefaultPrevented=Q,n.nativeEvent=n};var X,nn={configurable:!0,get:function(){return this.class}},tn=preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode;preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];H&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Z(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&B.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l)}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),"select"==t&&null!=u.defaultValue&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),n.props=u,e.class!=e.className&&(nn.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",nn))}n.$$typeof=z,tn&&tn(n)};var en=preact__WEBPACK_IMPORTED_MODULE_0__.options.__r;preact__WEBPACK_IMPORTED_MODULE_0__.options.__r=function(n){en&&en(n),X=n.__c};var rn={ReactCurrentDispatcher:{current:{readContext:function(n){return X.__n[n.__c].props.value}}}},un="17.0.2";function on(n){return preact__WEBPACK_IMPORTED_MODULE_0__.createElement.bind(null,n)}function ln(n){return!!n&&n.$$typeof===z}function cn(n){return ln(n)?preact__WEBPACK_IMPORTED_MODULE_0__.cloneElement.apply(null,arguments):n}function fn(n){return!!n.__k&&((0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,n),!0)}function an(n){return n&&(n.base||1===n.nodeType&&n)||null}var sn=function(n,t){return n(t)},hn=function(n,t){return n(t)},vn=preact__WEBPACK_IMPORTED_MODULE_0__.Fragment;function dn(n){n()}function pn(n){return n}function mn(){return[!1,dn]}var yn=preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect;function _n(n,t){var e=t(),r=(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState)({h:{__:e,v:t}}),u=r[0].h,o=r[1];return (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(function(){u.__=e,u.v=t,E(u.__,t())||o({h:u})},[n,e,t]),(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function(){return E(u.__,u.v())||o({h:u}),n(function(){E(u.__,u.v())||o({h:u})})},[n]),e}var bn={useState:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState,useId:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useId,useReducer:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useReducer,useEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect,useLayoutEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect,useInsertionEffect:yn,useTransition:mn,useDeferredValue:pn,useSyncExternalStore:_n,startTransition:dn,useRef:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useRef,useImperativeHandle:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle,useMemo:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useMemo,useCallback:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useCallback,useContext:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useContext,useDebugValue:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useDebugValue,version:"17.0.2",Children:O,render:Y,hydrate:q,unmountComponentAtNode:fn,createPortal:j,createElement:preact__WEBPACK_IMPORTED_MODULE_0__.createElement,createContext:preact__WEBPACK_IMPORTED_MODULE_0__.createContext,createFactory:on,cloneElement:cn,createRef:preact__WEBPACK_IMPORTED_MODULE_0__.createRef,Fragment:preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,isValidElement:ln,findDOMNode:an,Component:preact__WEBPACK_IMPORTED_MODULE_0__.Component,PureComponent:w,memo:R,forwardRef:k,flushSync:hn,unstable_batchedUpdates:sn,StrictMode:vn,Suspense:D,SuspenseList:V,lazy:M,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:rn};
160
160
  //# sourceMappingURL=compat.module.js.map
161
161
 
162
162
 
@@ -9847,24 +9847,21 @@ var isFocusable = function isFocusable(node, options) {
9847
9847
 
9848
9848
  ;// CONCATENATED MODULE: ./node_modules/focus-trap/dist/focus-trap.esm.js
9849
9849
  /*!
9850
- * focus-trap 7.0.0
9850
+ * focus-trap 7.1.0
9851
9851
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
9852
9852
  */
9853
9853
 
9854
9854
 
9855
9855
  function focus_trap_esm_ownKeys(object, enumerableOnly) {
9856
9856
  var keys = Object.keys(object);
9857
-
9858
9857
  if (Object.getOwnPropertySymbols) {
9859
9858
  var symbols = Object.getOwnPropertySymbols(object);
9860
9859
  enumerableOnly && (symbols = symbols.filter(function (sym) {
9861
9860
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
9862
9861
  })), keys.push.apply(keys, symbols);
9863
9862
  }
9864
-
9865
9863
  return keys;
9866
9864
  }
9867
-
9868
9865
  function _objectSpread2(target) {
9869
9866
  for (var i = 1; i < arguments.length; i++) {
9870
9867
  var source = null != arguments[i] ? arguments[i] : {};
@@ -9874,10 +9871,8 @@ function _objectSpread2(target) {
9874
9871
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
9875
9872
  });
9876
9873
  }
9877
-
9878
9874
  return target;
9879
9875
  }
9880
-
9881
9876
  function focus_trap_esm_defineProperty(obj, key, value) {
9882
9877
  if (key in obj) {
9883
9878
  Object.defineProperty(obj, key, {
@@ -9889,64 +9884,52 @@ function focus_trap_esm_defineProperty(obj, key, value) {
9889
9884
  } else {
9890
9885
  obj[key] = value;
9891
9886
  }
9892
-
9893
9887
  return obj;
9894
9888
  }
9895
9889
 
9896
- var activeFocusTraps = function () {
9897
- var trapQueue = [];
9898
- return {
9899
- activateTrap: function activateTrap(trap) {
9900
- if (trapQueue.length > 0) {
9901
- var activeTrap = trapQueue[trapQueue.length - 1];
9902
-
9903
- if (activeTrap !== trap) {
9904
- activeTrap.pause();
9905
- }
9906
- }
9907
-
9908
- var trapIndex = trapQueue.indexOf(trap);
9909
-
9910
- if (trapIndex === -1) {
9911
- trapQueue.push(trap);
9912
- } else {
9913
- // move this existing trap to the front of the queue
9914
- trapQueue.splice(trapIndex, 1);
9915
- trapQueue.push(trap);
9916
- }
9917
- },
9918
- deactivateTrap: function deactivateTrap(trap) {
9919
- var trapIndex = trapQueue.indexOf(trap);
9920
-
9921
- if (trapIndex !== -1) {
9922
- trapQueue.splice(trapIndex, 1);
9923
- }
9924
-
9925
- if (trapQueue.length > 0) {
9926
- trapQueue[trapQueue.length - 1].unpause();
9890
+ var rooTrapStack = [];
9891
+ var activeFocusTraps = {
9892
+ activateTrap: function activateTrap(trapStack, trap) {
9893
+ if (trapStack.length > 0) {
9894
+ var activeTrap = trapStack[trapStack.length - 1];
9895
+ if (activeTrap !== trap) {
9896
+ activeTrap.pause();
9927
9897
  }
9928
9898
  }
9929
- };
9930
- }();
9931
-
9899
+ var trapIndex = trapStack.indexOf(trap);
9900
+ if (trapIndex === -1) {
9901
+ trapStack.push(trap);
9902
+ } else {
9903
+ // move this existing trap to the front of the queue
9904
+ trapStack.splice(trapIndex, 1);
9905
+ trapStack.push(trap);
9906
+ }
9907
+ },
9908
+ deactivateTrap: function deactivateTrap(trapStack, trap) {
9909
+ var trapIndex = trapStack.indexOf(trap);
9910
+ if (trapIndex !== -1) {
9911
+ trapStack.splice(trapIndex, 1);
9912
+ }
9913
+ if (trapStack.length > 0) {
9914
+ trapStack[trapStack.length - 1].unpause();
9915
+ }
9916
+ }
9917
+ };
9932
9918
  var isSelectableInput = function isSelectableInput(node) {
9933
9919
  return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
9934
9920
  };
9935
-
9936
9921
  var isEscapeEvent = function isEscapeEvent(e) {
9937
9922
  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
9938
9923
  };
9939
-
9940
9924
  var isTabEvent = function isTabEvent(e) {
9941
9925
  return e.key === 'Tab' || e.keyCode === 9;
9942
9926
  };
9943
-
9944
9927
  var delay = function delay(fn) {
9945
9928
  return setTimeout(fn, 0);
9946
- }; // Array.find/findIndex() are not supported on IE; this replicates enough
9947
- // of Array.findIndex() for our needs
9948
-
9929
+ };
9949
9930
 
9931
+ // Array.find/findIndex() are not supported on IE; this replicates enough
9932
+ // of Array.findIndex() for our needs
9950
9933
  var findIndex = function findIndex(arr, fn) {
9951
9934
  var idx = -1;
9952
9935
  arr.every(function (value, i) {
@@ -9957,8 +9940,10 @@ var findIndex = function findIndex(arr, fn) {
9957
9940
 
9958
9941
  return true; // next
9959
9942
  });
9943
+
9960
9944
  return idx;
9961
9945
  };
9946
+
9962
9947
  /**
9963
9948
  * Get an option's value when it could be a plain value, or a handler that provides
9964
9949
  * the value.
@@ -9966,16 +9951,12 @@ var findIndex = function findIndex(arr, fn) {
9966
9951
  * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
9967
9952
  * @returns {*} The `value`, or the handler's returned value.
9968
9953
  */
9969
-
9970
-
9971
9954
  var valueOrHandler = function valueOrHandler(value) {
9972
9955
  for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
9973
9956
  params[_key - 1] = arguments[_key];
9974
9957
  }
9975
-
9976
9958
  return typeof value === 'function' ? value.apply(void 0, params) : value;
9977
9959
  };
9978
-
9979
9960
  var getActualTarget = function getActualTarget(event) {
9980
9961
  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
9981
9962
  // shadow host. However, event.target.composedPath() will be an array of
@@ -9986,18 +9967,16 @@ var getActualTarget = function getActualTarget(event) {
9986
9967
  // composedPath()[0] === event.target always).
9987
9968
  return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
9988
9969
  };
9989
-
9990
9970
  var createFocusTrap = function createFocusTrap(elements, userOptions) {
9991
9971
  // SSR: a live trap shouldn't be created in this type of environment so this
9992
9972
  // should be safe code to execute if the `document` option isn't specified
9993
9973
  var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
9994
-
9974
+ var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || rooTrapStack;
9995
9975
  var config = _objectSpread2({
9996
9976
  returnFocusOnDeactivate: true,
9997
9977
  escapeDeactivates: true,
9998
9978
  delayInitialFocus: true
9999
9979
  }, userOptions);
10000
-
10001
9980
  var state = {
10002
9981
  // containers given to createFocusTrap()
10003
9982
  // @type {Array<HTMLElement>}
@@ -10017,6 +9996,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10017
9996
  // }>}
10018
9997
  containerGroups: [],
10019
9998
  // same order/length as `containers` list
9999
+
10020
10000
  // references to objects in `containerGroups`, but only those that actually have
10021
10001
  // tabbable nodes in them
10022
10002
  // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
@@ -10040,10 +10020,10 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10040
10020
  * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
10041
10021
  * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
10042
10022
  */
10043
-
10044
10023
  var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
10045
10024
  return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
10046
10025
  };
10026
+
10047
10027
  /**
10048
10028
  * Finds the index of the container that contains the element.
10049
10029
  * @param {HTMLElement} element
@@ -10051,16 +10031,15 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10051
10031
  * `state.containerGroups` (the order/length of these lists are the same); -1
10052
10032
  * if the element isn't found.
10053
10033
  */
10054
-
10055
-
10056
10034
  var findContainerIndex = function findContainerIndex(element) {
10057
10035
  // NOTE: search `containerGroups` because it's possible a group contains no tabbable
10058
10036
  // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
10059
10037
  // and we still need to find the element in there
10060
10038
  return state.containerGroups.findIndex(function (_ref) {
10061
10039
  var container = _ref.container,
10062
- tabbableNodes = _ref.tabbableNodes;
10063
- return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any
10040
+ tabbableNodes = _ref.tabbableNodes;
10041
+ return container.contains(element) ||
10042
+ // fall back to explicit tabbable search which will take into consideration any
10064
10043
  // web components if the `tabbableOptions.getShadowRoot` option was used for
10065
10044
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
10066
10045
  // look inside web components even if open)
@@ -10069,6 +10048,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10069
10048
  });
10070
10049
  });
10071
10050
  };
10051
+
10072
10052
  /**
10073
10053
  * Gets the node for the given option, which is expected to be an option that
10074
10054
  * can be either a DOM node, a string that is a selector to get a node, `false`
@@ -10082,19 +10062,14 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10082
10062
  * @throws {Error} If the option is set, not `false`, and is not, or does not
10083
10063
  * resolve to a node.
10084
10064
  */
10085
-
10086
-
10087
10065
  var getNodeForOption = function getNodeForOption(optionName) {
10088
10066
  var optionValue = config[optionName];
10089
-
10090
10067
  if (typeof optionValue === 'function') {
10091
10068
  for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
10092
10069
  params[_key2 - 1] = arguments[_key2];
10093
10070
  }
10094
-
10095
10071
  optionValue = optionValue.apply(void 0, params);
10096
10072
  }
10097
-
10098
10073
  if (optionValue === true) {
10099
10074
  optionValue = undefined; // use default value
10100
10075
  }
@@ -10102,56 +10077,51 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10102
10077
  if (!optionValue) {
10103
10078
  if (optionValue === undefined || optionValue === false) {
10104
10079
  return optionValue;
10105
- } // else, empty string (invalid), null (invalid), 0 (invalid)
10106
-
10080
+ }
10081
+ // else, empty string (invalid), null (invalid), 0 (invalid)
10107
10082
 
10108
10083
  throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
10109
10084
  }
10110
-
10111
10085
  var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
10112
10086
 
10113
10087
  if (typeof optionValue === 'string') {
10114
10088
  node = doc.querySelector(optionValue); // resolve to node, or null if fails
10115
-
10116
10089
  if (!node) {
10117
10090
  throw new Error("`".concat(optionName, "` as selector refers to no known node"));
10118
10091
  }
10119
10092
  }
10120
-
10121
10093
  return node;
10122
10094
  };
10123
-
10124
10095
  var getInitialFocusNode = function getInitialFocusNode() {
10125
- var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
10096
+ var node = getNodeForOption('initialFocus');
10126
10097
 
10098
+ // false explicitly indicates we want no initialFocus at all
10127
10099
  if (node === false) {
10128
10100
  return false;
10129
10101
  }
10130
-
10131
10102
  if (node === undefined) {
10132
10103
  // option not specified: use fallback options
10133
10104
  if (findContainerIndex(doc.activeElement) >= 0) {
10134
10105
  node = doc.activeElement;
10135
10106
  } else {
10136
10107
  var firstTabbableGroup = state.tabbableGroups[0];
10137
- var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
10108
+ var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
10138
10109
 
10110
+ // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
10139
10111
  node = firstTabbableNode || getNodeForOption('fallbackFocus');
10140
10112
  }
10141
10113
  }
10142
-
10143
10114
  if (!node) {
10144
10115
  throw new Error('Your focus-trap needs to have at least one focusable element');
10145
10116
  }
10146
-
10147
10117
  return node;
10148
10118
  };
10149
-
10150
10119
  var updateTabbableNodes = function updateTabbableNodes() {
10151
10120
  state.containerGroups = state.containers.map(function (container) {
10152
- var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
10153
- // are a superset of tabbable nodes
10121
+ var tabbableNodes = tabbable(container, config.tabbableOptions);
10154
10122
 
10123
+ // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
10124
+ // are a superset of tabbable nodes
10155
10125
  var focusableNodes = focusable(container, config.tabbableOptions);
10156
10126
  return {
10157
10127
  container: container,
@@ -10159,7 +10129,6 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10159
10129
  focusableNodes: focusableNodes,
10160
10130
  firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
10161
10131
  lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
10162
-
10163
10132
  /**
10164
10133
  * Finds the __tabbable__ node that follows the given node in the specified direction,
10165
10134
  * in this container, if any.
@@ -10183,17 +10152,14 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10183
10152
  var nodeIdx = focusableNodes.findIndex(function (n) {
10184
10153
  return n === node;
10185
10154
  });
10186
-
10187
10155
  if (nodeIdx < 0) {
10188
10156
  return undefined;
10189
10157
  }
10190
-
10191
10158
  if (forward) {
10192
10159
  return focusableNodes.slice(nodeIdx + 1).find(function (n) {
10193
10160
  return isTabbable(n, config.tabbableOptions);
10194
10161
  });
10195
10162
  }
10196
-
10197
10163
  return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
10198
10164
  return isTabbable(n, config.tabbableOptions);
10199
10165
  });
@@ -10202,53 +10168,46 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10202
10168
  });
10203
10169
  state.tabbableGroups = state.containerGroups.filter(function (group) {
10204
10170
  return group.tabbableNodes.length > 0;
10205
- }); // throw if no groups have tabbable nodes and we don't have a fallback focus node either
10171
+ });
10206
10172
 
10173
+ // throw if no groups have tabbable nodes and we don't have a fallback focus node either
10207
10174
  if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
10208
10175
  ) {
10209
10176
  throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
10210
10177
  }
10211
10178
  };
10212
-
10213
10179
  var tryFocus = function tryFocus(node) {
10214
10180
  if (node === false) {
10215
10181
  return;
10216
10182
  }
10217
-
10218
10183
  if (node === doc.activeElement) {
10219
10184
  return;
10220
10185
  }
10221
-
10222
10186
  if (!node || !node.focus) {
10223
10187
  tryFocus(getInitialFocusNode());
10224
10188
  return;
10225
10189
  }
10226
-
10227
10190
  node.focus({
10228
10191
  preventScroll: !!config.preventScroll
10229
10192
  });
10230
10193
  state.mostRecentlyFocusedNode = node;
10231
-
10232
10194
  if (isSelectableInput(node)) {
10233
10195
  node.select();
10234
10196
  }
10235
10197
  };
10236
-
10237
10198
  var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
10238
10199
  var node = getNodeForOption('setReturnFocus', previousActiveElement);
10239
10200
  return node ? node : node === false ? false : previousActiveElement;
10240
- }; // This needs to be done on mousedown and touchstart instead of click
10241
- // so that it precedes the focus event.
10242
-
10201
+ };
10243
10202
 
10203
+ // This needs to be done on mousedown and touchstart instead of click
10204
+ // so that it precedes the focus event.
10244
10205
  var checkPointerDown = function checkPointerDown(e) {
10245
10206
  var target = getActualTarget(e);
10246
-
10247
10207
  if (findContainerIndex(target) >= 0) {
10248
10208
  // allow the click since it ocurred inside the trap
10249
10209
  return;
10250
10210
  }
10251
-
10252
10211
  if (valueOrHandler(config.clickOutsideDeactivates, e)) {
10253
10212
  // immediately deactivate the trap
10254
10213
  trap.deactivate({
@@ -10266,25 +10225,26 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10266
10225
  returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
10267
10226
  });
10268
10227
  return;
10269
- } // This is needed for mobile devices.
10228
+ }
10229
+
10230
+ // This is needed for mobile devices.
10270
10231
  // (If we'll only let `click` events through,
10271
10232
  // then on mobile they will be blocked anyways if `touchstart` is blocked.)
10272
-
10273
-
10274
10233
  if (valueOrHandler(config.allowOutsideClick, e)) {
10275
10234
  // allow the click outside the trap to take place
10276
10235
  return;
10277
- } // otherwise, prevent the click
10278
-
10236
+ }
10279
10237
 
10238
+ // otherwise, prevent the click
10280
10239
  e.preventDefault();
10281
- }; // In case focus escapes the trap for some strange reason, pull it back in.
10282
-
10240
+ };
10283
10241
 
10242
+ // In case focus escapes the trap for some strange reason, pull it back in.
10284
10243
  var checkFocusIn = function checkFocusIn(e) {
10285
10244
  var target = getActualTarget(e);
10286
- var targetContained = findContainerIndex(target) >= 0; // In Firefox when you Tab out of an iframe the Document is briefly focused.
10245
+ var targetContained = findContainerIndex(target) >= 0;
10287
10246
 
10247
+ // In Firefox when you Tab out of an iframe the Document is briefly focused.
10288
10248
  if (targetContained || target instanceof Document) {
10289
10249
  if (targetContained) {
10290
10250
  state.mostRecentlyFocusedNode = target;
@@ -10294,24 +10254,22 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10294
10254
  e.stopImmediatePropagation();
10295
10255
  tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
10296
10256
  }
10297
- }; // Hijack Tab events on the first and last focusable nodes of the trap,
10257
+ };
10258
+
10259
+ // Hijack Tab events on the first and last focusable nodes of the trap,
10298
10260
  // in order to prevent focus from escaping. If it escapes for even a
10299
10261
  // moment it can end up scrolling the page and causing confusion so we
10300
10262
  // kind of need to capture the action at the keydown phase.
10301
-
10302
-
10303
10263
  var checkTab = function checkTab(e) {
10304
10264
  var target = getActualTarget(e);
10305
10265
  updateTabbableNodes();
10306
10266
  var destinationNode = null;
10307
-
10308
10267
  if (state.tabbableGroups.length > 0) {
10309
10268
  // make sure the target is actually contained in a group
10310
10269
  // NOTE: the target may also be the container itself if it's focusable
10311
10270
  // with tabIndex='-1' and was given initial focus
10312
10271
  var containerIndex = findContainerIndex(target);
10313
10272
  var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
10314
-
10315
10273
  if (containerIndex < 0) {
10316
10274
  // target not found in any group: quite possible focus has escaped the trap,
10317
10275
  // so bring it back in to...
@@ -10324,12 +10282,12 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10324
10282
  }
10325
10283
  } else if (e.shiftKey) {
10326
10284
  // REVERSE
10285
+
10327
10286
  // is the target the first tabbable node in a group?
10328
10287
  var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
10329
10288
  var firstTabbableNode = _ref2.firstTabbableNode;
10330
10289
  return target === firstTabbableNode;
10331
10290
  });
10332
-
10333
10291
  if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
10334
10292
  // an exception case where the target is either the container itself, or
10335
10293
  // a non-tabbable node that was given focus (i.e. tabindex is negative
@@ -10339,7 +10297,6 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10339
10297
  // first tabbable node, and go to the last tabbable node of the LAST group
10340
10298
  startOfGroupIndex = containerIndex;
10341
10299
  }
10342
-
10343
10300
  if (startOfGroupIndex >= 0) {
10344
10301
  // YES: then shift+tab should go to the last tabbable node in the
10345
10302
  // previous group (and wrap around to the last tabbable node of
@@ -10350,12 +10307,12 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10350
10307
  }
10351
10308
  } else {
10352
10309
  // FORWARD
10310
+
10353
10311
  // is the target the last tabbable node in a group?
10354
10312
  var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
10355
10313
  var lastTabbableNode = _ref3.lastTabbableNode;
10356
10314
  return target === lastTabbableNode;
10357
10315
  });
10358
-
10359
10316
  if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
10360
10317
  // an exception case where the target is the container itself, or
10361
10318
  // a non-tabbable node that was given focus (i.e. tabindex is negative
@@ -10365,13 +10322,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10365
10322
  // last tabbable node, and go to the first tabbable node of the FIRST group
10366
10323
  lastOfGroupIndex = containerIndex;
10367
10324
  }
10368
-
10369
10325
  if (lastOfGroupIndex >= 0) {
10370
10326
  // YES: then tab should go to the first tabbable node in the next
10371
10327
  // group (and wrap around to the first tabbable node of the FIRST
10372
10328
  // group if it's the last tabbable node of the LAST group)
10373
10329
  var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
10374
-
10375
10330
  var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
10376
10331
  destinationNode = _destinationGroup.firstTabbableNode;
10377
10332
  }
@@ -10380,12 +10335,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10380
10335
  // NOTE: the fallbackFocus option does not support returning false to opt-out
10381
10336
  destinationNode = getNodeForOption('fallbackFocus');
10382
10337
  }
10383
-
10384
10338
  if (destinationNode) {
10385
10339
  e.preventDefault();
10386
10340
  tryFocus(destinationNode);
10387
- } // else, let the browser take care of [shift+]tab and move the focus
10388
-
10341
+ }
10342
+ // else, let the browser take care of [shift+]tab and move the focus
10389
10343
  };
10390
10344
 
10391
10345
  var checkKey = function checkKey(e) {
@@ -10394,44 +10348,40 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10394
10348
  trap.deactivate();
10395
10349
  return;
10396
10350
  }
10397
-
10398
10351
  if (isTabEvent(e)) {
10399
10352
  checkTab(e);
10400
10353
  return;
10401
10354
  }
10402
10355
  };
10403
-
10404
10356
  var checkClick = function checkClick(e) {
10405
10357
  var target = getActualTarget(e);
10406
-
10407
10358
  if (findContainerIndex(target) >= 0) {
10408
10359
  return;
10409
10360
  }
10410
-
10411
10361
  if (valueOrHandler(config.clickOutsideDeactivates, e)) {
10412
10362
  return;
10413
10363
  }
10414
-
10415
10364
  if (valueOrHandler(config.allowOutsideClick, e)) {
10416
10365
  return;
10417
10366
  }
10418
-
10419
10367
  e.preventDefault();
10420
10368
  e.stopImmediatePropagation();
10421
- }; //
10369
+ };
10370
+
10371
+ //
10422
10372
  // EVENT LISTENERS
10423
10373
  //
10424
10374
 
10425
-
10426
10375
  var addListeners = function addListeners() {
10427
10376
  if (!state.active) {
10428
10377
  return;
10429
- } // There can be only one listening focus trap at a time
10378
+ }
10430
10379
 
10380
+ // There can be only one listening focus trap at a time
10381
+ activeFocusTraps.activateTrap(trapStack, trap);
10431
10382
 
10432
- activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
10383
+ // Delay ensures that the focused element doesn't capture the event
10433
10384
  // that caused the focus trap activation.
10434
-
10435
10385
  state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
10436
10386
  tryFocus(getInitialFocusNode());
10437
10387
  }) : tryFocus(getInitialFocusNode());
@@ -10454,70 +10404,58 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10454
10404
  });
10455
10405
  return trap;
10456
10406
  };
10457
-
10458
10407
  var removeListeners = function removeListeners() {
10459
10408
  if (!state.active) {
10460
10409
  return;
10461
10410
  }
10462
-
10463
10411
  doc.removeEventListener('focusin', checkFocusIn, true);
10464
10412
  doc.removeEventListener('mousedown', checkPointerDown, true);
10465
10413
  doc.removeEventListener('touchstart', checkPointerDown, true);
10466
10414
  doc.removeEventListener('click', checkClick, true);
10467
10415
  doc.removeEventListener('keydown', checkKey, true);
10468
10416
  return trap;
10469
- }; //
10417
+ };
10418
+
10419
+ //
10470
10420
  // TRAP DEFINITION
10471
10421
  //
10472
10422
 
10473
-
10474
10423
  trap = {
10475
10424
  get active() {
10476
10425
  return state.active;
10477
10426
  },
10478
-
10479
10427
  get paused() {
10480
10428
  return state.paused;
10481
10429
  },
10482
-
10483
10430
  activate: function activate(activateOptions) {
10484
10431
  if (state.active) {
10485
10432
  return this;
10486
10433
  }
10487
-
10488
10434
  var onActivate = getOption(activateOptions, 'onActivate');
10489
10435
  var onPostActivate = getOption(activateOptions, 'onPostActivate');
10490
10436
  var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
10491
-
10492
10437
  if (!checkCanFocusTrap) {
10493
10438
  updateTabbableNodes();
10494
10439
  }
10495
-
10496
10440
  state.active = true;
10497
10441
  state.paused = false;
10498
10442
  state.nodeFocusedBeforeActivation = doc.activeElement;
10499
-
10500
10443
  if (onActivate) {
10501
10444
  onActivate();
10502
10445
  }
10503
-
10504
10446
  var finishActivation = function finishActivation() {
10505
10447
  if (checkCanFocusTrap) {
10506
10448
  updateTabbableNodes();
10507
10449
  }
10508
-
10509
10450
  addListeners();
10510
-
10511
10451
  if (onPostActivate) {
10512
10452
  onPostActivate();
10513
10453
  }
10514
10454
  };
10515
-
10516
10455
  if (checkCanFocusTrap) {
10517
10456
  checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
10518
10457
  return this;
10519
10458
  }
10520
-
10521
10459
  finishActivation();
10522
10460
  return this;
10523
10461
  },
@@ -10525,46 +10463,38 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10525
10463
  if (!state.active) {
10526
10464
  return this;
10527
10465
  }
10528
-
10529
10466
  var options = _objectSpread2({
10530
10467
  onDeactivate: config.onDeactivate,
10531
10468
  onPostDeactivate: config.onPostDeactivate,
10532
10469
  checkCanReturnFocus: config.checkCanReturnFocus
10533
10470
  }, deactivateOptions);
10534
-
10535
10471
  clearTimeout(state.delayInitialFocusTimer); // noop if undefined
10536
-
10537
10472
  state.delayInitialFocusTimer = undefined;
10538
10473
  removeListeners();
10539
10474
  state.active = false;
10540
10475
  state.paused = false;
10541
- activeFocusTraps.deactivateTrap(trap);
10476
+ activeFocusTraps.deactivateTrap(trapStack, trap);
10542
10477
  var onDeactivate = getOption(options, 'onDeactivate');
10543
10478
  var onPostDeactivate = getOption(options, 'onPostDeactivate');
10544
10479
  var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
10545
10480
  var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
10546
-
10547
10481
  if (onDeactivate) {
10548
10482
  onDeactivate();
10549
10483
  }
10550
-
10551
10484
  var finishDeactivation = function finishDeactivation() {
10552
10485
  delay(function () {
10553
10486
  if (returnFocus) {
10554
10487
  tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
10555
10488
  }
10556
-
10557
10489
  if (onPostDeactivate) {
10558
10490
  onPostDeactivate();
10559
10491
  }
10560
10492
  });
10561
10493
  };
10562
-
10563
10494
  if (returnFocus && checkCanReturnFocus) {
10564
10495
  checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
10565
10496
  return this;
10566
10497
  }
10567
-
10568
10498
  finishDeactivation();
10569
10499
  return this;
10570
10500
  },
@@ -10572,7 +10502,6 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10572
10502
  if (state.paused || !state.active) {
10573
10503
  return this;
10574
10504
  }
10575
-
10576
10505
  state.paused = true;
10577
10506
  removeListeners();
10578
10507
  return this;
@@ -10581,7 +10510,6 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10581
10510
  if (!state.paused || !state.active) {
10582
10511
  return this;
10583
10512
  }
10584
-
10585
10513
  state.paused = false;
10586
10514
  updateTabbableNodes();
10587
10515
  addListeners();
@@ -10592,15 +10520,14 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
10592
10520
  state.containers = elementsAsArray.map(function (element) {
10593
10521
  return typeof element === 'string' ? doc.querySelector(element) : element;
10594
10522
  });
10595
-
10596
10523
  if (state.active) {
10597
10524
  updateTabbableNodes();
10598
10525
  }
10599
-
10600
10526
  return this;
10601
10527
  }
10602
- }; // initialize container elements
10528
+ };
10603
10529
 
10530
+ // initialize container elements
10604
10531
  trap.updateContainerElements(elements);
10605
10532
  return trap;
10606
10533
  };
@@ -13743,9 +13670,15 @@ const OptionsButton = () => {
13743
13670
 
13744
13671
 
13745
13672
 
13746
- const TranslationOption = ({ label, checked, description, onChange, id, }) => ((0,jsx_runtime_namespaceObject.jsxs)("li", Object.assign({ className: css_className('translation-options__item', {
13747
- 'translation-options__item--checked': checked,
13748
- }) }, { children: [(0,jsx_runtime_namespaceObject.jsx)("input", { id: id, type: "radio", value: label, checked: checked, className: css_className('visually-hidden'), onChange: onChange, name: "language" }), (0,jsx_runtime_namespaceObject.jsxs)("label", Object.assign({ htmlFor: id }, { children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, { alt: "", name: "check", size: "16" }), label, " ", description && (0,jsx_runtime_namespaceObject.jsxs)("span", { children: ["(", description, ")"] })] }))] })));
13673
+ const TranslationOption = ({ label, checked, description, onChange, id, }) => {
13674
+ const onKeyDown = (e) => {
13675
+ if (e.code === 'Space' || e.code === 'Enter') {
13676
+ e.preventDefault();
13677
+ onChange();
13678
+ }
13679
+ };
13680
+ return ((0,jsx_runtime_namespaceObject.jsxs)("li", Object.assign({ className: css_className('translation-options__item'), "aria-selected": checked, role: "option", tabIndex: 0, onClick: onChange, onKeyDown: onKeyDown, id: id }, { children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, { alt: "", name: "check", size: "16" }), label, " ", description && (0,jsx_runtime_namespaceObject.jsxs)("span", { children: ["(", description, ")"] })] })));
13681
+ };
13749
13682
  /* harmony default export */ const translation_option = (TranslationOption);
13750
13683
 
13751
13684
  ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/components/options-dialog/translation-options.tsx
@@ -13782,7 +13715,7 @@ const TranslationOptions = ({ onChange, describedById, }) => {
13782
13715
  });
13783
13716
  });
13784
13717
  }, [languages, defaultLocale]);
13785
- return ((0,jsx_runtime_namespaceObject.jsx)("ul", Object.assign({ "aria-describedby": describedById, className: css_className('translation-options') }, { children: sortedLanguages.map((language, idx) => {
13718
+ return ((0,jsx_runtime_namespaceObject.jsx)("ul", Object.assign({ "aria-describedby": describedById, role: "listbox", tabIndex: -1, className: css_className('translation-options') }, { children: sortedLanguages.map((language, idx) => {
13786
13719
  const isOriginal = idx === 0;
13787
13720
  const checked = currentLocale === language.locale || (!currentLocale && isOriginal);
13788
13721
  return ((0,jsx_runtime_namespaceObject.jsx)(translation_option, { id: language.locale, label: language.nativeName, checked: checked, description: isOriginal && t('translations.settings.original'), onChange: handleChange(language) }, language.locale));