@raspberrypifoundation/design-system-react 2.7.2 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -7
- package/dist/design-system-react.css +1 -1
- package/dist/design-system-react.js +3313 -889
- package/dist/design-system-react.umd.cjs +16 -13
- package/dist/scss/components/switch.scss +179 -0
- package/dist/scss/design-system-core.scss +3 -2
- package/dist/scss/properties/colors/_greys.scss +1 -0
- package/dist/scss/utility/_visually-hidden.scss +11 -0
- package/dist/types/lib/main.d.ts +10 -0
- package/dist/types/lib/main.d.ts.map +1 -1
- package/dist/types/src/components/Button/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts +1 -11
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts.map +1 -1
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts +1 -1
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts +3 -11
- package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts.map +1 -1
- package/dist/types/src/components/Form/RadioInput/index.d.ts +1 -1
- package/dist/types/src/components/Form/RadioInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts +1 -7
- package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts.map +1 -1
- package/dist/types/src/components/Form/SelectInput/index.d.ts +1 -1
- package/dist/types/src/components/Form/SelectInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/Switch/Switch.spec.d.ts +2 -0
- package/dist/types/src/components/Form/Switch/Switch.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/Switch/Switch.types.d.ts +24 -0
- package/dist/types/src/components/Form/Switch/Switch.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/Switch/index.d.ts +16 -0
- package/dist/types/src/components/Form/Switch/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts +1 -7
- package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts.map +1 -1
- package/dist/types/src/components/Form/TextInput/index.d.ts +1 -1
- package/dist/types/src/components/Form/TextInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Menu/Menu.types.d.ts +6 -0
- package/dist/types/src/components/Menu/Menu.types.d.ts.map +1 -0
- package/dist/types/src/components/Menu/MenuButton/MenuButton.types.d.ts +7 -0
- package/dist/types/src/components/Menu/MenuButton/MenuButton.types.d.ts.map +1 -0
- package/dist/types/src/components/Menu/MenuButton/index.d.ts +4 -0
- package/dist/types/src/components/Menu/MenuButton/index.d.ts.map +1 -0
- package/dist/types/src/components/Menu/MenuItem/MenuItem.types.d.ts +11 -0
- package/dist/types/src/components/Menu/MenuItem/MenuItem.types.d.ts.map +1 -0
- package/dist/types/src/components/Menu/MenuItem/index.d.ts +6 -0
- package/dist/types/src/components/Menu/MenuItem/index.d.ts.map +1 -0
- package/dist/types/src/components/Menu/MenuTitle/MenuTitle.types.d.ts +4 -0
- package/dist/types/src/components/Menu/MenuTitle/MenuTitle.types.d.ts.map +1 -0
- package/dist/types/src/components/Menu/MenuTitle/index.d.ts +5 -0
- package/dist/types/src/components/Menu/MenuTitle/index.d.ts.map +1 -0
- package/dist/types/src/components/Menu/index.d.ts +5 -0
- package/dist/types/src/components/Menu/index.d.ts.map +1 -0
- package/dist/types/src/stories/Menu/Menu.stories.d.ts +8 -0
- package/dist/types/src/stories/Menu/Menu.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Menu/MenuButton.stories.d.ts +7 -0
- package/dist/types/src/stories/Menu/MenuButton.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Menu/MenuItem.stories.d.ts +9 -0
- package/dist/types/src/stories/Menu/MenuItem.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Menu/MenuTitle.stories.d.ts +7 -0
- package/dist/types/src/stories/Menu/MenuTitle.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/RadioInput.stories.d.ts +4 -0
- package/dist/types/src/stories/forms/RadioInput.stories.d.ts.map +1 -1
- package/dist/types/src/stories/forms/Switch.stories.d.ts +54 -0
- package/dist/types/src/stories/forms/Switch.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/TextInput.stories.d.ts +4 -0
- package/dist/types/src/stories/forms/TextInput.stories.d.ts.map +1 -1
- package/package.json +18 -13
- package/CHANGELOG.md +0 -328
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(V,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],p):(V=typeof globalThis<"u"?globalThis:V||self,p(V["RPF Design System React"]={},V.jsxRuntime,V.React,V.ReactDOM))})(this,(function(V,p,te,nr){"use strict";function $t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const x=$t(te),rr=$t(nr);function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var
|
|
5
|
+
*/var Wt;function or(){return Wt||(Wt=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(i=o(i,n(a)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var a in i)t.call(i,a)&&i[a]&&(s=o(s,a));return s}function o(i,s){return s?i?i+" "+s:i+s:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(st)),st.exports}var ir=or();const J=jt(ir);var ke={exports:{}},De={exports:{}},Y={};/** @license React v16.13.1
|
|
6
6
|
* react-is.production.min.js
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var
|
|
12
|
+
*/var Bt;function sr(){if(Bt)return Y;Bt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function y(g){if(typeof g=="object"&&g!==null){var I=g.$$typeof;switch(I){case t:switch(g=g.type,g){case l:case c:case n:case i:case o:case d:return g;default:switch(g=g&&g.$$typeof,g){case a:case f:case b:case u:case s:return g;default:return I}}case r:return I}}}function S(g){return y(g)===c}return Y.AsyncMode=l,Y.ConcurrentMode=c,Y.ContextConsumer=a,Y.ContextProvider=s,Y.Element=t,Y.ForwardRef=f,Y.Fragment=n,Y.Lazy=b,Y.Memo=u,Y.Portal=r,Y.Profiler=i,Y.StrictMode=o,Y.Suspense=d,Y.isAsyncMode=function(g){return S(g)||y(g)===l},Y.isConcurrentMode=S,Y.isContextConsumer=function(g){return y(g)===a},Y.isContextProvider=function(g){return y(g)===s},Y.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Y.isForwardRef=function(g){return y(g)===f},Y.isFragment=function(g){return y(g)===n},Y.isLazy=function(g){return y(g)===b},Y.isMemo=function(g){return y(g)===u},Y.isPortal=function(g){return y(g)===r},Y.isProfiler=function(g){return y(g)===i},Y.isStrictMode=function(g){return y(g)===o},Y.isSuspense=function(g){return y(g)===d},Y.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===c||g===i||g===o||g===d||g===v||typeof g=="object"&&g!==null&&(g.$$typeof===b||g.$$typeof===u||g.$$typeof===s||g.$$typeof===a||g.$$typeof===f||g.$$typeof===A||g.$$typeof===R||g.$$typeof===M||g.$$typeof===h)},Y.typeOf=y,Y}var U={};/** @license React v16.13.1
|
|
13
13
|
* react-is.development.js
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var
|
|
19
|
+
*/var qt;function ar(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function y(_){return typeof _=="string"||typeof _=="function"||_===n||_===c||_===i||_===o||_===d||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===b||_.$$typeof===u||_.$$typeof===s||_.$$typeof===a||_.$$typeof===f||_.$$typeof===A||_.$$typeof===R||_.$$typeof===M||_.$$typeof===h)}function S(_){if(typeof _=="object"&&_!==null){var oe=_.$$typeof;switch(oe){case t:var he=_.type;switch(he){case l:case c:case n:case i:case o:case d:return he;default:var le=he&&he.$$typeof;switch(le){case a:case f:case b:case u:case s:return le;default:return oe}}case r:return oe}}}var g=l,I=c,H=a,K=s,ee=t,Z=f,G=n,B=b,ne=u,z=r,L=i,j=o,q=d,k=!1;function T(_){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(_)||S(_)===l}function m(_){return S(_)===c}function E(_){return S(_)===a}function F(_){return S(_)===s}function W(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function C(_){return S(_)===f}function P(_){return S(_)===n}function w(_){return S(_)===b}function O(_){return S(_)===u}function N(_){return S(_)===r}function $(_){return S(_)===i}function D(_){return S(_)===o}function X(_){return S(_)===d}U.AsyncMode=g,U.ConcurrentMode=I,U.ContextConsumer=H,U.ContextProvider=K,U.Element=ee,U.ForwardRef=Z,U.Fragment=G,U.Lazy=B,U.Memo=ne,U.Portal=z,U.Profiler=L,U.StrictMode=j,U.Suspense=q,U.isAsyncMode=T,U.isConcurrentMode=m,U.isContextConsumer=E,U.isContextProvider=F,U.isElement=W,U.isForwardRef=C,U.isFragment=P,U.isLazy=w,U.isMemo=O,U.isPortal=N,U.isProfiler=$,U.isStrictMode=D,U.isSuspense=X,U.isValidElementType=y,U.typeOf=S})()),U}var Vt;function Yt(){return Vt||(Vt=1,process.env.NODE_ENV==="production"?De.exports=sr():De.exports=ar()),De.exports}/*
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/var
|
|
24
|
-
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var u=Y(g,S,h,T,b+"."+S,c);if(u)return u}return null}return $(d)}function H(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(H);if(s===null||i(s))return!0;var d=m(s);if(d){var E=d.call(s),_;if(d!==s.entries){for(;!(_=E.next()).done;)if(!H(_.value))return!1}else for(;!(_=E.next()).done;){var h=_.value;if(h&&!H(h[1]))return!1}}else return!1;return!0;default:return!1}}function he(s,d){return s==="symbol"?!0:d?d["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&d instanceof Symbol:!1}function W(s){var d=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":he(d,s)?"symbol":d}function V(s){if(typeof s>"u"||s===null)return""+s;var d=W(s);if(d==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return d}function G(s){var d=V(s);switch(d){case"array":case"object":return"an "+d;case"boolean":case"date":case"regexp":return"a "+d;default:return d}}function ve(s){return!s.constructor||!s.constructor.name?A:s.constructor.name}return I.checkPropTypes=o,I.resetWarningCache=o.resetWarningCache,I.PropTypes=I,I},se}var ce,xe;function Ue(){if(xe)return ce;xe=1;var e=ne();function n(){}function c(){}return c.resetWarningCache=n,ce=function(){function a(l,i,p,v,y,m){if(m!==e){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}}a.isRequired=a;function o(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:c,resetWarningCache:n};return r.PropTypes=r,r},ce}var Ae;function ze(){if(Ae)return J.exports;if(Ae=1,process.env.NODE_ENV!=="production"){var e=Te(),n=!0;J.exports=We()(e.isElement,n)}else J.exports=Ue()();return J.exports}var Be=ze();const Z=be(Be),Ie=({content:e,title:n,className:c,id:a="accordion"})=>{const o=q("rpf-accordion",c);return t.jsxs("details",{className:o,id:`${a}`,children:[t.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[n,t.jsx("span",{className:"rpf-accordion__icon"})]}),t.jsx("p",{className:"rpf-accordion__text",children:e})]})};Ie.propTypes={content:Z.string.isRequired,title:Z.string.isRequired,id:Z.string,className:Z.string};const B=({text:e,href:n,title:c,className:a,type:o="primary",variant:r="",size:l="default",icon:i="",iconOnly:p=!1,iconPosition:v="left",fullWidth:y=!1,disabled:m=!1,onClick:A=()=>{},"aria-label":I="",linkComponent:M})=>{const N=i&&p,$=q("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":r==="danger","rpf-button--sm":l==="small","rpf-button--icon-only":N,"rpf-button--full-width":y,disabled:m},a);let L="rpf-button__icon";F.isValidElement(i)?(L+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):L+=" material-symbols-sharp";const z=(f,D)=>!D||v!==f?null:typeof D=="string"?t.jsx("span",{className:L,children:D}):D,k=()=>e&&!N&&t.jsx("span",{className:"text",children:e}),j=t.jsxs(t.Fragment,{children:[z("left",i),k(),z("right",i)]});if(n){const f=M||"a",D=M?{to:n}:{href:n,role:"button"};return t.jsx(f,{className:$,...D,onClick:A,"aria-label":I,children:j})}return t.jsx("button",{className:$,title:c,onClick:A,disabled:m,"aria-label":I,children:j})},Ve=({title:e,text:n,titleChildren:c,children:a,type:o,actions:r,onClose:l})=>t.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[t.jsxs("div",{className:"rpf-alert__header",children:[t.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),c?t.jsx("div",{className:"rpf-alert__title",children:c}):e?t.jsx("p",{className:"rpf-alert__title",children:e}):null,!!l&&t.jsx("div",{className:"rpf-alert__close",children:t.jsx(B,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:l})})]}),(n||a||r)&&t.jsxs("div",{className:"rpf-alert__body",children:[n?t.jsx("p",{children:n}):a?t.jsx("div",{children:a}):null,r&&r.length>0&&t.jsx("div",{className:"rpf-alert__actions",children:r.map((i,p)=>t.jsx(B,{text:i.label,size:"small",type:"tertiary",href:i.href,onClick:i.onClick},p))})]})]}),He=({id:e,label:n,name:c,checked:a=!1,disabled:o=!1,error:r="",onChange:l=()=>{},value:i="",className:p=""})=>t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:q("rpf-input-checkbox",{"rpf-input-checkbox--error":r,className:p}),children:[t.jsx("input",{checked:!!a,disabled:o,id:e,name:c,onChange:l,type:"checkbox",value:i}),n]}),r&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),r]})]}),Je=({disabled:e=!1,errorText:n="",fullWidth:c=!1,legendText:a,legendHintText:o="",children:r})=>t.jsxs("fieldset",{className:q("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":c,"rpf-fieldset--error":n}),disabled:e,children:[t.jsxs("legend",{className:"rpf-label",children:[a,o.length>0?t.jsx("small",{className:"rpf-label__hint",children:o}):null]}),t.jsx("div",{className:"rpf-fieldset__inputs",children:r}),n.length>0?t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]}):null]}),K=({id:e,label:n,children:c,disabled:a=!1,error:o="",hint:r=""})=>t.jsxs("div",{className:"rpf-input-field",children:[(n||r)&&t.jsxs("label",{htmlFor:e,className:q("rpf-label",{"rpf-label--disabled":a}),children:[n,t.jsx("small",{className:"rpf-label__hint",children:r})]}),c,o&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]}),Re=({label:e,inputFieldId:n,disabled:c=!1,hint:a=""})=>t.jsx("div",{className:"rpf-label",children:t.jsxs("label",{htmlFor:n,className:q("rpf-label",{"rpf-label--disabled":c}),children:[e,a&&t.jsx("div",{className:"rpf-label__hint",children:a})]})}),Ze=({id:e,label:n,name:c,checked:a=!1,disabled:o=!1,fullWidth:r=!1,onChange:l=()=>{},value:i=""})=>t.jsxs("label",{className:q("rpf-input-radio",{"rpf-input-radio--disabled":o,"rpf-input--full-width":r}),children:[t.jsx("input",{checked:!!a,disabled:o,id:e,name:c,onChange:l,type:"radio",value:i}),n]}),Ke=({label:e,inputFieldId:n,disabled:c=!1,error:a="",hint:o="",placeholder:r="",defaultValue:l="",onClick:i=()=>{},onChange:p=()=>{}})=>t.jsx("search",{children:t.jsxs("form",{className:"rpf-input-field",onSubmit:i,children:[t.jsxs("label",{htmlFor:n,className:q("rpf-label",{"rpf-label--disabled":c}),children:[e,o&&t.jsx("small",{className:"rpf-label__hint",children:o})]}),t.jsxs("div",{className:"rpf-input-search-container",children:[t.jsx("input",{className:q("rpf-input rpf-input-search",{"rpf-input--disabled":c,"rpf-input--error":a}),disabled:c,id:n,name:"search",type:"search","aria-label":"Search",defaultValue:l,placeholder:r,onChange:p}),t.jsx("button",{type:"submit",className:q("rpf-button rpf-button-search",{"rpf-button--disabled":c,"rpf-button--error":a}),disabled:c,onClick:i,children:t.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),a&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),a]})]})}),Xe=({id:e,label:n,name:c,options:a,disabled:o=!1,error:r="",fullWidth:l=!1,hint:i="",onChange:p=()=>{},placeholder:v="",value:y=""})=>t.jsx(K,{id:e,disabled:o,error:r,hint:i,label:n,children:t.jsxs("select",{className:q("rpf-input rpf-input-select",{"rpf-input--error":r,"rpf-input--full-width":l}),disabled:o,id:e,name:c,onChange:p,value:y,children:[!y&&!!v&&t.jsx("option",{value:"",disabled:!0,children:v}),a.map(m=>t.jsx("option",{value:m.key,children:m.value},m.key))]})}),Ge=({id:e,label:n,name:c,value:a,disabled:o=!1,readOnly:r=!1,error:l="",fullWidth:i=!1,hint:p="",onChange:v=()=>{}})=>t.jsx(K,{id:e,disabled:o,error:l,hint:p,label:n,children:t.jsx("textarea",{className:q("rpf-input rpf-input-textarea",{"rpf-input--error":l,"rpf-input--full-width":i,"rpf-input--disabled":o}),disabled:o,readOnly:r,id:e,name:c,onChange:v,value:a})}),Qe=({id:e,label:n,name:c,value:a,disabled:o=!1,error:r="",fullWidth:l=!1,hint:i="",onChange:p=()=>{}})=>t.jsx(K,{id:e,disabled:o,error:r,hint:i,label:n,children:t.jsx("input",{className:q("rpf-input rpf-input-text",{"rpf-input--error":r,"rpf-input--full-width":l}),disabled:o,id:e,name:c,onChange:p,type:"text",value:a})});function er(e,n){const c=F.useRef(null),a=F.useRef(null);return F.useEffect(()=>{const o=c.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),F.useEffect(()=>{const o=c.current;if(!o)return;const r=()=>n(!1),l=i=>{i.preventDefault(),n(!1)};return o.addEventListener("close",r),o.addEventListener("cancel",l),()=>{o.removeEventListener("close",r),o.removeEventListener("cancel",l)}},[n]),F.useEffect(()=>{const o=c.current,r=a.current;if(!o||!r)return;const l=i=>{e&&!r.contains(i.target)&&n(!1)};return o.addEventListener("mousedown",l),()=>o.removeEventListener("mousedown",l)},[e,n]),{dialogRef:c,contentRef:a}}const rr=({isOpen:e,setIsOpen:n,heading:c,children:a,primaryButtonLink:o,primaryButtonText:r,onClickPrimaryButton:l,secondaryButtonText:i,secondaryButtonLink:p,onClickSecondaryButton:v,tertiaryButtonText:y,tertiaryButtonLink:m,onClickTertiaryButton:A,showCloseButton:I=!0})=>{const{dialogRef:M,contentRef:N}=er(e,n);return t.jsx("dialog",{ref:M,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:t.jsxs("div",{ref:N,className:"rpf-modal__wrapper",children:[t.jsxs("div",{className:"rpf-modal__header",children:[t.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:c}),I&&t.jsx(B,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>n(!1)})]}),t.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:a}),t.jsxs("div",{className:"rpf-modal__buttons",children:[t.jsx(B,{text:r,href:o,onClick:l,type:"primary"}),i&&t.jsx(B,{text:i,href:p,onClick:v,type:"secondary"}),y&&t.jsx(B,{text:y,href:m,onClick:A,type:"tertiary"})]})]})})},tr=({text:e="",percent:n,complete:c=!1,className:a})=>t.jsx("div",{className:q("rpf-progress-bar",{"rpf-progress-bar--complete":c,className:a}),children:t.jsxs("label",{className:"rpf-progress-bar__label",children:[t.jsx("span",{children:e}),t.jsx("progress",{className:"rpf-progress-bar__bar",value:n,max:"100",children:`${n}%`})]})}),nr=({children:e})=>t.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:t.jsx("div",{className:"rpf-table-cell__content",children:e})});/**
|
|
23
|
+
*/var at,Ut;function cr(){if(Ut)return at;Ut=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=o()?Object.assign:function(i,s){for(var a,l=n(i),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var v=0;v<c.length;v++)r.call(a,c[v])&&(l[c[v]]=a[c[v]])}}return l},at}var ct,Ht;function lt(){if(Ht)return ct;Ht=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ct=e,ct}var ut,Kt;function zt(){return Kt||(Kt=1,ut=Function.call.bind(Object.prototype.hasOwnProperty)),ut}var ft,Xt;function lr(){if(Xt)return ft;Xt=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=lt(),r={},n=zt();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var f in i)if(n(i,f)){var d;try{if(typeof i[f]!="function"){var v=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}d=i[f](s,f,l,a,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var u=c?c():"";e("Failed "+a+" type: "+d.message+(u??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ft=o,ft}var dt,Gt;function ur(){if(Gt)return dt;Gt=1;var e=Yt(),t=cr(),r=lt(),n=zt(),o=lr(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return dt=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(m){var E=m&&(c&&m[c]||m[f]);if(typeof E=="function")return E}var v="<<anonymous>>",u={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:M(),arrayOf:y,element:S(),elementType:g(),instanceOf:I,node:Z(),objectOf:K,oneOf:H,oneOfType:ee,shape:B,exact:ne};function b(m,E){return m===E?m!==0||1/m===1/E:m!==m&&E!==E}function h(m,E){this.message=m,this.data=E&&typeof E=="object"?E:{},this.stack=""}h.prototype=Error.prototype;function A(m){if(process.env.NODE_ENV!=="production")var E={},F=0;function W(P,w,O,N,$,D,X){if(N=N||v,D=D||O,X!==r){if(l){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=N+":"+O;!E[oe]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+N+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),E[oe]=!0,F++)}}return w[O]==null?P?w[O]===null?new h("The "+$+" `"+D+"` is marked as required "+("in `"+N+"`, but its value is `null`.")):new h("The "+$+" `"+D+"` is marked as required in "+("`"+N+"`, but its value is `undefined`.")):null:m(w,O,N,$,D)}var C=W.bind(null,!1);return C.isRequired=W.bind(null,!0),C}function R(m){function E(F,W,C,P,w,O){var N=F[W],$=j(N);if($!==m){var D=q(N);return new h("Invalid "+P+" `"+w+"` of type "+("`"+D+"` supplied to `"+C+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return A(E)}function M(){return A(s)}function y(m){function E(F,W,C,P,w){if(typeof m!="function")return new h("Property `"+w+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var O=F[W];if(!Array.isArray(O)){var N=j(O);return new h("Invalid "+P+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected an array."))}for(var $=0;$<O.length;$++){var D=m(O,$,C,P,w+"["+$+"]",r);if(D instanceof Error)return D}return null}return A(E)}function S(){function m(E,F,W,C,P){var w=E[F];if(!a(w)){var O=j(w);return new h("Invalid "+C+" `"+P+"` of type "+("`"+O+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return A(m)}function g(){function m(E,F,W,C,P){var w=E[F];if(!e.isValidElementType(w)){var O=j(w);return new h("Invalid "+C+" `"+P+"` of type "+("`"+O+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return A(m)}function I(m){function E(F,W,C,P,w){if(!(F[W]instanceof m)){var O=m.name||v,N=T(F[W]);return new h("Invalid "+P+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected ")+("instance of `"+O+"`."))}return null}return A(E)}function H(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function E(F,W,C,P,w){for(var O=F[W],N=0;N<m.length;N++)if(b(O,m[N]))return null;var $=JSON.stringify(m,function(X,_){var oe=q(_);return oe==="symbol"?String(_):_});return new h("Invalid "+P+" `"+w+"` of value `"+String(O)+"` "+("supplied to `"+C+"`, expected one of "+$+"."))}return A(E)}function K(m){function E(F,W,C,P,w){if(typeof m!="function")return new h("Property `"+w+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var O=F[W],N=j(O);if(N!=="object")return new h("Invalid "+P+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected an object."));for(var $ in O)if(n(O,$)){var D=m(O,$,C,P,w+"."+$,r);if(D instanceof Error)return D}return null}return A(E)}function ee(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var E=0;E<m.length;E++){var F=m[E];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(F)+" at index "+E+"."),s}function W(C,P,w,O,N){for(var $=[],D=0;D<m.length;D++){var X=m[D],_=X(C,P,w,O,N,r);if(_==null)return null;_.data&&n(_.data,"expectedType")&&$.push(_.data.expectedType)}var oe=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new h("Invalid "+O+" `"+N+"` supplied to "+("`"+w+"`"+oe+"."))}return A(W)}function Z(){function m(E,F,W,C,P){return z(E[F])?null:new h("Invalid "+C+" `"+P+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return A(m)}function G(m,E,F,W,C){return new h((m||"React class")+": "+E+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function B(m){function E(F,W,C,P,w){var O=F[W],N=j(O);if(N!=="object")return new h("Invalid "+P+" `"+w+"` of type `"+N+"` "+("supplied to `"+C+"`, expected `object`."));for(var $ in m){var D=m[$];if(typeof D!="function")return G(C,P,w,$,q(D));var X=D(O,$,C,P,w+"."+$,r);if(X)return X}return null}return A(E)}function ne(m){function E(F,W,C,P,w){var O=F[W],N=j(O);if(N!=="object")return new h("Invalid "+P+" `"+w+"` of type `"+N+"` "+("supplied to `"+C+"`, expected `object`."));var $=t({},F[W],m);for(var D in $){var X=m[D];if(n(m,D)&&typeof X!="function")return G(C,P,w,D,q(X));if(!X)return new h("Invalid "+P+" `"+w+"` key `"+D+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
|
|
24
|
+
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=X(O,D,C,P,w+"."+D,r);if(_)return _}return null}return A(E)}function z(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(z);if(m===null||a(m))return!0;var E=d(m);if(E){var F=E.call(m),W;if(E!==m.entries){for(;!(W=F.next()).done;)if(!z(W.value))return!1}else for(;!(W=F.next()).done;){var C=W.value;if(C&&!z(C[1]))return!1}}else return!1;return!0;default:return!1}}function L(m,E){return m==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function j(m){var E=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":L(E,m)?"symbol":E}function q(m){if(typeof m>"u"||m===null)return""+m;var E=j(m);if(E==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return E}function k(m){var E=q(m);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function T(m){return!m.constructor||!m.constructor.name?v:m.constructor.name}return u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},dt}var pt,Zt;function fr(){if(Zt)return pt;Zt=1;var e=lt();function t(){}function r(){}return r.resetWarningCache=t,pt=function(){function n(s,a,l,c,f,d){if(d!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},pt}var Jt;function dr(){if(Jt)return ke.exports;if(Jt=1,process.env.NODE_ENV!=="production"){var e=Yt(),t=!0;ke.exports=ur()(e.isElement,t)}else ke.exports=fr()();return ke.exports}var pr=dr();const Le=jt(pr),Qt=({content:e,title:t,className:r,id:n="accordion"})=>{const o=J("rpf-accordion",r);return p.jsxs("details",{className:o,id:`${n}`,children:[p.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[t,p.jsx("span",{className:"rpf-accordion__icon"})]}),p.jsx("p",{className:"rpf-accordion__text",children:e})]})};Qt.propTypes={content:Le.string.isRequired,title:Le.string.isRequired,id:Le.string,className:Le.string};const me=({text:e,href:t,title:r,className:n,type:o="primary",variant:i="",size:s="default",icon:a="",iconOnly:l=!1,iconPosition:c="left",fullWidth:f=!1,disabled:d=!1,onClick:v=()=>{},"aria-label":u="",linkComponent:b})=>{const h=a&&l,A=J("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":i==="danger","rpf-button--sm":s==="small","rpf-button--icon-only":h,"rpf-button--full-width":f,disabled:d},n);let R="rpf-button__icon";te.isValidElement(a)?R+=" icon":R+=" material-symbols-sharp";const M=(g,I)=>!I||c!==g?null:typeof I=="string"?p.jsx("span",{className:R,children:I}):I,y=()=>e&&!h&&p.jsx("span",{className:"text",children:e}),S=p.jsxs(p.Fragment,{children:[M("left",a),y(),M("right",a)]});if(t){const g=b||"a",I=b?{to:t}:{href:t,role:"button"};return p.jsx(g,{className:A,...I,onClick:v,"aria-label":u,children:S})}return p.jsx("button",{className:A,title:r,onClick:v,disabled:d,"aria-label":u,children:S})},hr=({title:e,text:t,titleChildren:r,children:n,type:o,actions:i,onClose:s})=>p.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[p.jsxs("div",{className:"rpf-alert__header",children:[p.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),r?p.jsx("div",{className:"rpf-alert__title",children:r}):e?p.jsx("p",{className:"rpf-alert__title",children:e}):null,!!s&&p.jsx("div",{className:"rpf-alert__close",children:p.jsx(me,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:s})})]}),(t||n||i)&&p.jsxs("div",{className:"rpf-alert__body",children:[t?p.jsx("p",{children:t}):n?p.jsx("div",{children:n}):null,i&&i.length>0&&p.jsx("div",{className:"rpf-alert__actions",children:i.map((a,l)=>p.jsx(me,{text:a.label,size:"small",type:"tertiary",href:a.href,onClick:a.onClick},l))})]})]}),mr=({label:e,id:t,name:r,error:n="",...o})=>{const{className:i,...s}=o;return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:J("rpf-input-checkbox",{"rpf-input-checkbox--error":n,className:i}),children:[p.jsx("input",{id:t,name:r,type:"checkbox",...s}),e]}),n&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]})]})},vr=({disabled:e=!1,errorText:t="",fullWidth:r=!1,legendText:n,legendHintText:o="",children:i})=>p.jsxs("fieldset",{className:J("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":r,"rpf-fieldset--error":t}),disabled:e,children:[p.jsxs("legend",{className:"rpf-label",children:[n,o.length>0?p.jsx("small",{className:"rpf-label__hint",children:o}):null]}),p.jsx("div",{className:"rpf-fieldset__inputs",children:i}),t.length>0?p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]}):null]}),Fe=({id:e,label:t,children:r,disabled:n=!1,error:o="",hint:i=""})=>p.jsxs("div",{className:"rpf-input-field",children:[(t||i)&&p.jsxs("label",{htmlFor:e,className:J("rpf-label",{"rpf-label--disabled":n}),children:[t,p.jsx("small",{className:"rpf-label__hint",children:i})]}),r,o&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]}),br=({label:e,inputFieldId:t,disabled:r=!1,hint:n=""})=>p.jsx("div",{className:"rpf-label",children:p.jsxs("label",{htmlFor:t,className:J("rpf-label",{"rpf-label--disabled":r}),children:[e,n&&p.jsx("div",{className:"rpf-label__hint",children:n})]})}),gr=({label:e,id:t,name:r,fullWidth:n=!1,...o})=>p.jsxs("label",{className:J("rpf-input-radio",{"rpf-input-radio--disabled":o.disabled,"rpf-input--full-width":n}),children:[p.jsx("input",{type:"radio",id:t,name:r,...o}),e]}),yr=({label:e,inputFieldId:t,disabled:r=!1,error:n="",hint:o="",placeholder:i="",defaultValue:s="",onClick:a=()=>{},onChange:l=()=>{}})=>p.jsx("search",{children:p.jsxs("form",{className:"rpf-input-field",onSubmit:a,children:[p.jsxs("label",{htmlFor:t,className:J("rpf-label",{"rpf-label--disabled":r}),children:[e,o&&p.jsx("small",{className:"rpf-label__hint",children:o})]}),p.jsxs("div",{className:"rpf-input-search-container",children:[p.jsx("input",{className:J("rpf-input rpf-input-search",{"rpf-input--disabled":r,"rpf-input--error":n}),disabled:r,id:t,name:"search",type:"search","aria-label":"Search",defaultValue:s,placeholder:i,onChange:l}),p.jsx("button",{type:"submit",className:J("rpf-button rpf-button-search",{"rpf-button--disabled":r,"rpf-button--error":n}),disabled:r,onClick:a,children:p.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),n&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),n]})]})}),wr=({id:e,label:t,name:r,options:n,disabled:o=!1,error:i="",fullWidth:s=!1,hint:a="",onChange:l=()=>{},placeholder:c="",value:f="",...d})=>p.jsx(Fe,{id:e,disabled:o,error:i,hint:a,label:t,children:p.jsxs("select",{className:J("rpf-input rpf-input-select",{"rpf-input--error":i,"rpf-input--full-width":s}),disabled:o,id:e,name:r,onChange:l,value:f,...d,children:[!f&&!!c&&p.jsx("option",{value:"",disabled:!0,children:c}),n.map(v=>p.jsx("option",{value:v.key,children:v.value},v.key))]})}),en=te.forwardRef(({label:e,id:t,name:r,error:n="",fullWidth:o=!1,reverse:i=!1,hint:s="",alignStart:a=!1,hideLabel:l=!1,icon:c=!1,className:f,disabled:d=!1,"aria-describedby":v,...u},b)=>{const h=n?`${t}-error`:void 0,A=[v,h].filter(Boolean).join(" ")||void 0;return p.jsxs("div",{className:"rpf-input-field",children:[p.jsxs("label",{className:J("rpf-switch",{"rpf-switch--full-width":o,"rpf-switch--reverse":i,"rpf-switch--align-start":a,"rpf-switch--icon":c,"rpf-switch--disabled":d,"rpf-switch--error":n},f),children:[p.jsxs("span",{className:"rpf-switch__track",children:[p.jsx("input",{ref:b,id:t,name:r,type:"checkbox",role:"switch",className:"rpf-switch__checkbox",disabled:d,"aria-invalid":n?!0:void 0,"aria-describedby":A,...u}),p.jsx("span",{className:"rpf-switch__handle",children:c?p.jsx("span",{className:"rpf-switch__icon","aria-hidden":"true"}):null})]}),p.jsxs("span",{className:J("rpf-label","rpf-switch__label",{"rpf-label--disabled":d,"rpf-visually-hidden":l}),children:[p.jsx("span",{children:e}),s?p.jsx("span",{className:"rpf-label__hint",children:s}):null]})]}),n?p.jsxs("div",{id:h,className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]}):null]})});en.displayName="Switch";const Er=({id:e,label:t,name:r,value:n,disabled:o=!1,readOnly:i=!1,error:s="",fullWidth:a=!1,hint:l="",onChange:c=()=>{}})=>p.jsx(Fe,{id:e,disabled:o,error:s,hint:l,label:t,children:p.jsx("textarea",{className:J("rpf-input rpf-input-textarea",{"rpf-input--error":s,"rpf-input--full-width":a,"rpf-input--disabled":o}),disabled:o,readOnly:i,id:e,name:r,onChange:c,value:n})}),xr=({id:e,name:t,label:r,error:n="",fullWidth:o=!1,hint:i="",type:s="text",...a})=>p.jsx(Fe,{id:e,disabled:a.disabled,error:n,hint:i,label:r,children:p.jsx("input",{className:J("rpf-input rpf-input-text",{"rpf-input--error":n,"rpf-input--full-width":o}),id:e,name:t,type:s,...a})});function Tr(e,t){const r=te.useRef(null),n=te.useRef(null);return te.useEffect(()=>{const o=r.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),te.useEffect(()=>{const o=r.current;if(!o)return;const i=()=>t(!1),s=a=>{a.preventDefault(),t(!1)};return o.addEventListener("close",i),o.addEventListener("cancel",s),()=>{o.removeEventListener("close",i),o.removeEventListener("cancel",s)}},[t]),te.useEffect(()=>{const o=r.current,i=n.current;if(!o||!i)return;const s=a=>{e&&!i.contains(a.target)&&t(!1)};return o.addEventListener("mousedown",s),()=>o.removeEventListener("mousedown",s)},[e,t]),{dialogRef:r,contentRef:n}}const Sr=({isOpen:e,setIsOpen:t,heading:r,children:n,primaryButtonLink:o,primaryButtonText:i,onClickPrimaryButton:s,secondaryButtonText:a,secondaryButtonLink:l,onClickSecondaryButton:c,tertiaryButtonText:f,tertiaryButtonLink:d,onClickTertiaryButton:v,showCloseButton:u=!0})=>{const{dialogRef:b,contentRef:h}=Tr(e,t);return p.jsx("dialog",{ref:b,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:p.jsxs("div",{ref:h,className:"rpf-modal__wrapper",children:[p.jsxs("div",{className:"rpf-modal__header",children:[p.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:r}),u&&p.jsx(me,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>t(!1)})]}),p.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:n}),p.jsxs("div",{className:"rpf-modal__buttons",children:[p.jsx(me,{text:i,href:o,onClick:s,type:"primary"}),a&&p.jsx(me,{text:a,href:l,onClick:c,type:"secondary"}),f&&p.jsx(me,{text:f,href:d,onClick:v,type:"tertiary"})]})]})})},tn=({className:e,children:t})=>{const r=J("rpf-menu",e);return p.jsx("ul",{className:r,children:t})};function $e(){return typeof window<"u"}function ve(e){return nn(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ue(e){var t;return(t=(nn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nn(e){return $e()?e instanceof Node||e instanceof ie(e).Node:!1}function Q(e){return $e()?e instanceof Element||e instanceof ie(e).Element:!1}function re(e){return $e()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function ht(e){return!$e()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function Ie(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function Cr(e){return/^(table|td|th)$/.test(ve(e))}function je(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _r=/transform|translate|scale|rotate|perspective|filter/,Or=/paint|layout|strict|content/,Ee=e=>!!e&&e!=="none";let mt;function vt(e){const t=Q(e)?ae(e):e;return Ee(t.transform)||Ee(t.translate)||Ee(t.scale)||Ee(t.rotate)||Ee(t.perspective)||!We()&&(Ee(t.backdropFilter)||Ee(t.filter))||_r.test(t.willChange||"")||Or.test(t.contain||"")}function Ar(e){let t=de(e);for(;re(t)&&!be(t);){if(vt(t))return t;if(je(t))return null;t=de(t)}return null}function We(){return mt==null&&(mt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mt}function be(e){return/^(html|body|#document)$/.test(ve(e))}function ae(e){return ie(e).getComputedStyle(e)}function Be(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function de(e){if(ve(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||ue(e);return ht(t)?t.host:t}function rn(e){const t=de(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Ie(t)?t:rn(t)}function ge(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=rn(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=ie(o);if(i){const a=bt(s);return t.concat(s,s.visualViewport||[],Ie(o)?o:[],a&&r?ge(a):[])}else return t.concat(o,ge(o,[],r))}function bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function se(e,t){if(!e||!t)return!1;const r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ht(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Rr(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function on(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function Pr(e){return e.mozInputSource===0&&e.isTrusted?!0:gt()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nr(e){return Mr()?!1:!gt()&&e.width===0&&e.height===0||gt()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ir(){return/apple/i.test(navigator.vendor)}function gt(){const e=/android/i;return e.test(Rr())||e.test(on())}function Mr(){return on().includes("jsdom/")}function sn(e,t){return["mouse","pen"].includes(e)}function kr(e){return"nativeEvent"in e}function Dr(e){return e.matches("html,body")}function ce(e){return(e==null?void 0:e.ownerDocument)||document}function yt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Te(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Lr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function an(e){return re(e)&&e.matches(Lr)}function wt(e){e.preventDefault(),e.stopPropagation()}function Fr(e){return e?e.getAttribute("role")==="combobox"&&an(e):!1}const qe=Math.min,Se=Math.max,Ve=Math.round,Ye=Math.floor,fe=e=>({x:e,y:e}),$r={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(e,t,r){return Se(e,qe(t,r))}function Ue(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function ln(e){return e==="x"?"y":"x"}function un(e){return e==="y"?"height":"width"}function ye(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fn(e){return ln(ye(e))}function jr(e,t,r){r===void 0&&(r=!1);const n=He(e),o=fn(e),i=un(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ke(s)),[s,Ke(s)]}function Wr(e){const t=Ke(e);return[Et(e),t,Et(t)]}function Et(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const dn=["left","right"],pn=["right","left"],Br=["top","bottom"],qr=["bottom","top"];function Vr(e,t,r){switch(e){case"top":case"bottom":return r?t?pn:dn:t?dn:pn;case"left":case"right":return t?Br:qr;default:return[]}}function Yr(e,t,r,n){const o=He(e);let i=Vr(Ce(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Et)))),i}function Ke(e){const t=Ce(e);return $r[t]+e.slice(t.length)}function Ur(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hr(e){return typeof e!="number"?Ur(e):{top:e,right:e,bottom:e,left:e}}function ze(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}/*!
|
|
25
|
+
* tabbable 6.4.0
|
|
26
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
27
|
+
*/var Kr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Xe=Kr.join(","),hn=typeof Element>"u",Ae=hn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ge=!hn&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ze=function(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=o===""||o==="true",s=i||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ze(t.parentNode));return s},zr=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Xr=function(t,r,n){if(Ze(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Xe));return r&&Ae.call(t,Xe)&&o.unshift(t),o=o.filter(n),o},xt=function(t,r,n){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ze(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=xt(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var f=Ae.call(s,Xe);f&&n.filter(s)&&(r||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),v=!Ze(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(d&&v){var u=xt(d===!0?s.children:d.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},mn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zr(t))&&!mn(t)?0:t.tabIndex},Gr=function(t,r){var n=vn(t);return n<0&&r&&!mn(t)?0:n},Zr=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},bn=function(t){return t.tagName==="INPUT"},Jr=function(t){return bn(t)&&t.type==="hidden"},Qr=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},eo=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},to=function(t){if(!t.name)return!0;var r=t.form||Ge(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=eo(o,t.form);return!i||i===t},no=function(t){return bn(t)&&t.type==="radio"},ro=function(t){return no(t)&&!to(t)},oo=function(t){var r,n=t&&Ge(t),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,f,d;n=Ge(o),o=(c=n)===null||c===void 0?void 0:c.host,i=!!((f=o)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},gn=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},io=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ae.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ae.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,f=Ge(t);if(c&&!c.shadowRoot&&o(c)===!0)return gn(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=l}if(oo(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return gn(t);return!1},so=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Ae.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},ao=function(t,r){return!(r.disabled||Jr(r)||io(r,t)||Qr(r)||so(r))},Tt=function(t,r){return!(ro(r)||vn(r)<0||!ao(t,r))},co=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},yn=function(t){var r=[],n=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Gr(a,s),c=s?yn(o.candidates):a;l===0?s?r.push.apply(r,c):r.push(a):n.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),n.sort(Zr).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},St=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xt([t],r.includeContainer,{filter:Tt.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:co}):n=Xr(t,r.includeContainer,Tt.bind(null,r)),yn(n)},lo=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Ae.call(t,Xe)===!1?!1:Tt(r,t)};function wn(e,t,r){let{reference:n,floating:o}=e;const i=ye(t),s=fn(t),a=un(s),l=Ce(t),c=i==="y",f=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,v=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:f,y:n.y-o.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-o.width,y:d};break;default:u={x:n.x,y:n.y}}switch(He(t)){case"start":u[s]-=v*(r&&c?-1:1);break;case"end":u[s]+=v*(r&&c?-1:1);break}return u}async function uo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:v=!1,padding:u=0}=Ue(t,e),b=Hr(u),A=a[v?d==="floating"?"reference":"floating":d],R=ze(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(A)))==null||r?A:A.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),M=d==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},g=ze(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:y,strategy:l}):M);return{top:(R.top-g.top+b.top)/S.y,bottom:(g.bottom-R.bottom+b.bottom)/S.y,left:(R.left-g.left+b.left)/S.x,right:(g.right-R.right+b.right)/S.x}}const fo=50,po=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:uo},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=wn(c,n,l),v=n,u=0;const b={};for(let h=0;h<i.length;h++){const A=i[h];if(!A)continue;const{name:R,fn:M}=A,{x:y,y:S,data:g,reset:I}=await M({x:f,y:d,initialPlacement:n,placement:v,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:e,floating:t}});f=y??f,d=S??d,b[R]={...b[R],...g},I&&u<fo&&(u++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:f,y:d}=wn(c,v,l)),h=-1)}return{x:f,y:d,placement:v,strategy:o,middlewareData:b}},ho=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...A}=Ue(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const R=Ce(o),M=ye(a),y=Ce(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),g=v||(y||!h?[Ke(a)]:Wr(a)),I=b!=="none";!v&&I&&g.push(...Yr(a,h,b,S));const H=[a,...g],K=await l.detectOverflow(t,A),ee=[];let Z=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&ee.push(K[R]),d){const z=jr(o,s,S);ee.push(K[z[0]],K[z[1]])}if(Z=[...Z,{placement:o,overflows:ee}],!ee.every(z=>z<=0)){var G,B;const z=(((G=i.flip)==null?void 0:G.index)||0)+1,L=H[z];if(L&&(!(d==="alignment"?M!==ye(L):!1)||Z.every(k=>ye(k.placement)===M?k.overflows[0]>0:!0)))return{data:{index:z,overflows:Z},reset:{placement:L}};let j=(B=Z.filter(q=>q.overflows[0]<=0).sort((q,k)=>q.overflows[1]-k.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(u){case"bestFit":{var ne;const q=(ne=Z.filter(k=>{if(I){const T=ye(k.placement);return T===M||T==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(T=>T>0).reduce((T,m)=>T+m,0)]).sort((k,T)=>k[1]-T[1])[0])==null?void 0:ne[0];q&&(j=q);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}},mo=new Set(["left","top"]);async function vo(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Ce(r),a=He(r),l=ye(r)==="y",c=mo.has(s)?-1:1,f=i&&l?-1:1,d=Ue(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(u=a==="end"?b*-1:b),l?{x:u*f,y:v*c}:{x:v*c,y:u*f}}const bo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await vo(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},go=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:R=>{let{x:M,y}=R;return{x:M,y}}},...c}=Ue(e,t),f={x:r,y:n},d=await i.detectOverflow(t,c),v=ye(Ce(o)),u=ln(v);let b=f[u],h=f[v];if(s){const R=u==="y"?"top":"left",M=u==="y"?"bottom":"right",y=b+d[R],S=b-d[M];b=cn(y,b,S)}if(a){const R=v==="y"?"top":"left",M=v==="y"?"bottom":"right",y=h+d[R],S=h-d[M];h=cn(y,h,S)}const A=l.fn({...t,[u]:b,[v]:h});return{...A,data:{x:A.x-r,y:A.y-n,enabled:{[u]:s,[v]:a}}}}}};function En(e){const t=ae(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=re(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=Ve(r)!==i||Ve(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ct(e){return Q(e)?e:e.contextElement}function Re(e){const t=Ct(e);if(!re(t))return fe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=En(t);let s=(i?Ve(r.width):r.width)/n,a=(i?Ve(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const yo=fe(0);function xn(e){const t=ie(e);return!We()||!t.visualViewport?yo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wo(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ie(e)?!1:t}function _e(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ct(e);let s=fe(1);t&&(n?Q(n)&&(s=Re(n)):s=Re(e));const a=wo(i,r,n)?xn(i):fe(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const v=ie(i),u=n&&Q(n)?ie(n):n;let b=v,h=bt(b);for(;h&&n&&u!==b;){const A=Re(h),R=h.getBoundingClientRect(),M=ae(h),y=R.left+(h.clientLeft+parseFloat(M.paddingLeft))*A.x,S=R.top+(h.clientTop+parseFloat(M.paddingTop))*A.y;l*=A.x,c*=A.y,f*=A.x,d*=A.y,l+=y,c+=S,b=ie(h),h=bt(b)}}return ze({width:f,height:d,x:l,y:c})}function Je(e,t){const r=Be(e).scrollLeft;return t?t.left+r:_e(ue(e)).left+r}function Tn(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Je(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Eo(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=ue(n),a=t?je(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=fe(1);const f=fe(0),d=re(n);if((d||!d&&!i)&&((ve(n)!=="body"||Ie(s))&&(l=Be(n)),d)){const u=_e(n);c=Re(n),f.x=u.x+n.clientLeft,f.y=u.y+n.clientTop}const v=s&&!d&&!i?Tn(s,l):fe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+v.x,y:r.y*c.y-l.scrollTop*c.y+f.y+v.y}}function xo(e){return Array.from(e.getClientRects())}function To(e){const t=ue(e),r=Be(e),n=e.ownerDocument.body,o=Se(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Se(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Je(e);const a=-r.scrollTop;return ae(n).direction==="rtl"&&(s+=Se(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sn=25;function So(e,t){const r=ie(e),n=ue(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const f=We();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Je(n);if(c<=0){const f=n.ownerDocument,d=f.body,v=getComputedStyle(d),u=f.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(n.clientWidth-d.clientWidth-u);b<=Sn&&(i-=b)}else c<=Sn&&(i+=c);return{width:i,height:s,x:a,y:l}}function Co(e,t){const r=_e(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=re(e)?Re(e):fe(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function Cn(e,t,r){let n;if(t==="viewport")n=So(e,r);else if(t==="document")n=To(ue(e));else if(Q(t))n=Co(t,r);else{const o=xn(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ze(n)}function _n(e,t){const r=de(e);return r===t||!Q(r)||be(r)?!1:ae(r).position==="fixed"||_n(r,t)}function _o(e,t){const r=t.get(e);if(r)return r;let n=ge(e,[],!1).filter(a=>Q(a)&&ve(a)!=="body"),o=null;const i=ae(e).position==="fixed";let s=i?de(e):e;for(;Q(s)&&!be(s);){const a=ae(s),l=vt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ie(s)&&!l&&_n(e,s))?n=n.filter(f=>f!==s):o=a,s=de(s)}return t.set(e,n),n}function Oo(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?je(t)?[]:_o(t,this._c):[].concat(r),n],a=Cn(t,s[0],o);let l=a.top,c=a.right,f=a.bottom,d=a.left;for(let v=1;v<s.length;v++){const u=Cn(t,s[v],o);l=Se(u.top,l),c=qe(u.right,c),f=qe(u.bottom,f),d=Se(u.left,d)}return{width:c-d,height:f-l,x:d,y:l}}function Ao(e){const{width:t,height:r}=En(e);return{width:t,height:r}}function Ro(e,t,r){const n=re(t),o=ue(t),i=r==="fixed",s=_e(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=fe(0);function c(){l.x=Je(o)}if(n||!n&&!i)if((ve(t)!=="body"||Ie(o))&&(a=Be(t)),n){const u=_e(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&c();i&&!n&&o&&c();const f=o&&!n&&!i?Tn(o,a):fe(0),d=s.left+a.scrollLeft-l.x-f.x,v=s.top+a.scrollTop-l.y-f.y;return{x:d,y:v,width:s.width,height:s.height}}function _t(e){return ae(e).position==="static"}function On(e,t){if(!re(e)||ae(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ue(e)===r&&(r=r.ownerDocument.body),r}function An(e,t){const r=ie(e);if(je(e))return r;if(!re(e)){let o=de(e);for(;o&&!be(o);){if(Q(o)&&!_t(o))return o;o=de(o)}return r}let n=On(e,t);for(;n&&Cr(n)&&_t(n);)n=On(n,t);return n&&be(n)&&_t(n)&&!vt(n)?r:n||Ar(e)||r}const Po=async function(e){const t=this.getOffsetParent||An,r=this.getDimensions,n=await r(e.floating);return{reference:Ro(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function No(e){return ae(e).direction==="rtl"}const Io={convertOffsetParentRelativeRectToViewportRelativeRect:Eo,getDocumentElement:ue,getClippingRect:Oo,getOffsetParent:An,getElementRects:Po,getClientRects:xo,getDimensions:Ao,getScale:Re,isElement:Q,isRTL:No};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mo(e,t){let r=null,n;const o=ue(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:f,top:d,width:v,height:u}=c;if(a||t(),!v||!u)return;const b=Ye(d),h=Ye(o.clientWidth-(f+v)),A=Ye(o.clientHeight-(d+u)),R=Ye(f),y={rootMargin:-b+"px "+-h+"px "+-A+"px "+-R+"px",threshold:Se(0,qe(1,l))||1};let S=!0;function g(I){const H=I[0].intersectionRatio;if(H!==l){if(!S)return s();H?s(!1,H):n=setTimeout(()=>{s(!1,1e-7)},1e3)}H===1&&!Rn(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(g,{...y,root:o.ownerDocument})}catch{r=new IntersectionObserver(g,y)}r.observe(e)}return s(!0),i}function ko(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ct(e),f=o||i?[...c?ge(c):[],...t?ge(t):[]]:[];f.forEach(R=>{o&&R.addEventListener("scroll",r,{passive:!0}),i&&R.addEventListener("resize",r)});const d=c&&a?Mo(c,r):null;let v=-1,u=null;s&&(u=new ResizeObserver(R=>{let[M]=R;M&&M.target===c&&u&&t&&(u.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var y;(y=u)==null||y.observe(t)})),r()}),c&&!l&&u.observe(c),t&&u.observe(t));let b,h=l?_e(e):null;l&&A();function A(){const R=_e(e);h&&!Rn(h,R)&&r(),h=R,b=requestAnimationFrame(A)}return r(),()=>{var R;f.forEach(M=>{o&&M.removeEventListener("scroll",r),i&&M.removeEventListener("resize",r)}),d==null||d(),(R=u)==null||R.disconnect(),u=null,l&&cancelAnimationFrame(b)}}const Do=bo,Lo=go,Fo=ho,$o=(e,t,r)=>{const n=new Map,o={platform:Io,...r},i={...o.platform,_c:n};return po(e,t,{...o,platform:i})};var jo=typeof document<"u",Wo=function(){},Qe=jo?te.useLayoutEffect:Wo;function et(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!et(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!et(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nn(e,t){const r=Pn(e);return Math.round(t*r)/r}function Ot(e){const t=x.useRef(e);return Qe(()=>{t.current=e}),t}function Bo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[f,d]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,u]=x.useState(n);et(v,n)||u(n);const[b,h]=x.useState(null),[A,R]=x.useState(null),M=x.useCallback(k=>{k!==I.current&&(I.current=k,h(k))},[]),y=x.useCallback(k=>{k!==H.current&&(H.current=k,R(k))},[]),S=i||b,g=s||A,I=x.useRef(null),H=x.useRef(null),K=x.useRef(f),ee=l!=null,Z=Ot(l),G=Ot(o),B=Ot(c),ne=x.useCallback(()=>{if(!I.current||!H.current)return;const k={placement:t,strategy:r,middleware:v};G.current&&(k.platform=G.current),$o(I.current,H.current,k).then(T=>{const m={...T,isPositioned:B.current!==!1};z.current&&!et(K.current,m)&&(K.current=m,rr.flushSync(()=>{d(m)}))})},[v,t,r,G,B]);Qe(()=>{c===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const z=x.useRef(!1);Qe(()=>(z.current=!0,()=>{z.current=!1}),[]),Qe(()=>{if(S&&(I.current=S),g&&(H.current=g),S&&g){if(Z.current)return Z.current(S,g,ne);ne()}},[S,g,ne,Z,ee]);const L=x.useMemo(()=>({reference:I,floating:H,setReference:M,setFloating:y}),[M,y]),j=x.useMemo(()=>({reference:S,floating:g}),[S,g]),q=x.useMemo(()=>{const k={position:r,left:0,top:0};if(!j.floating)return k;const T=Nn(j.floating,f.x),m=Nn(j.floating,f.y);return a?{...k,transform:"translate("+T+"px, "+m+"px)",...Pn(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:m}},[r,a,j.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:ne,refs:L,elements:j,floatingStyles:q}),[f,ne,L,j,q])}const qo=(e,t)=>{const r=Do(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vo=(e,t)=>{const r=Lo(e);return{name:r.name,fn:r.fn,options:[e,t]}},Yo=(e,t)=>{const r=Fo(e);return{name:r.name,fn:r.fn,options:[e,t]}},In={...x},Uo=In.useInsertionEffect||(e=>e());function we(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Uo(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var pe=typeof document<"u"?te.useLayoutEffect:te.useEffect;function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tt.apply(this,arguments)}let Mn=!1,Ho=0;const kn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ho++;function Ko(){const[e,t]=x.useState(()=>Mn?kn():void 0);return pe(()=>{e==null&&t(kn())},[]),x.useEffect(()=>{Mn=!0},[]),e}const Dn=In.useId||Ko;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function zo(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.error(o)}}function Xo(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const Go=x.createContext(null),Zo=x.createContext(null),Ln=()=>{var e;return((e=x.useContext(Go))==null?void 0:e.id)||null},Rt=()=>x.useContext(Zo);function nt(e){return"data-floating-ui-"+e}function Pt(e){const t=te.useRef(e);return pe(()=>{t.current=e}),t}let Fn=0;function Pe(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(Fn);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():Fn=requestAnimationFrame(i)}function Jo(e,t){var r;let n=[],o=(r=e.find(i=>i.id===t))==null?void 0:r.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function Me(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),r=r.concat(n);return r}let Ne=new WeakMap,rt=new WeakSet,ot={},Nt=0;const Qo=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,$n=e=>e&&(e.host||$n(e.parentNode)),ei=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=$n(r);return e.contains(n)?n:null}).filter(r=>r!=null);function ti(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,s=ei(t,e),a=new Set,l=new Set(s),c=[];ot[o]||(ot[o]=new WeakMap);const f=ot[o];s.forEach(d),v(t),a.clear();function d(u){!u||a.has(u)||(a.add(u),u.parentNode&&d(u.parentNode))}function v(u){!u||l.has(u)||[].forEach.call(u.children,b=>{if(ve(b)!=="script")if(a.has(b))v(b);else{const h=i?b.getAttribute(i):null,A=h!==null&&h!=="false",R=(Ne.get(b)||0)+1,M=(f.get(b)||0)+1;Ne.set(b,R),f.set(b,M),c.push(b),R===1&&A&&rt.add(b),M===1&&b.setAttribute(o,""),!A&&i&&b.setAttribute(i,"true")}})}return Nt++,()=>{c.forEach(u=>{const b=(Ne.get(u)||0)-1,h=(f.get(u)||0)-1;Ne.set(u,b),f.set(u,h),b||(!rt.has(u)&&i&&u.removeAttribute(i),rt.delete(u)),h||u.removeAttribute(o)}),Nt--,Nt||(Ne=new WeakMap,Ne=new WeakMap,rt=new WeakSet,ot={})}}function jn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=ce(e[0]).body;return ti(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const it=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Wn(e,t){const r=St(e,it());t==="prev"&&r.reverse();const n=r.indexOf(xe(ce(e)));return r.slice(n+1)[0]}function ni(){return Wn(document.body,"next")}function ri(){return Wn(document.body,"prev")}function Bn(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!se(r,n)}const It={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let oi;function qn(e){e.key==="Tab"&&(e.target,clearTimeout(oi))}const Vn=x.forwardRef(function(t,r){const[n,o]=x.useState();pe(()=>(Ir()&&o("button"),document.addEventListener("keydown",qn),()=>{document.removeEventListener("keydown",qn)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[nt("focus-guard")]:"",style:It};return x.createElement("span",tt({},t,i))}),ii=x.createContext(null),si=()=>x.useContext(ii),Mt="data-floating-ui-focusable";function ai(e){return e?e.hasAttribute(Mt)?e:e.querySelector("["+Mt+"]")||e:null}const Yn=20;let Oe=[];function kt(e){Oe=Oe.filter(r=>r.isConnected);let t=e;if(!(!t||ve(t)==="body")){if(!lo(t,it())){const r=St(t,it())[0];r&&(t=r)}Oe.push(t),Oe.length>Yn&&(Oe=Oe.slice(-Yn))}}function Un(){return Oe.slice().reverse().find(e=>e.isConnected)}const ci=x.forwardRef(function(t,r){return x.createElement("button",tt({},t,{type:"button",ref:r,tabIndex:-1,style:It}))});function li(e){const{context:t,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=e,{open:v,refs:u,nodeId:b,onOpenChange:h,events:A,dataRef:R,floatingId:M,elements:{domReference:y,floating:S}}=t,g=typeof s=="number"&&s<0,I=Fr(y)&&g,H=Qo()?i:!0,K=Pt(o),ee=Pt(s),Z=Pt(a),G=Rt(),B=si(),ne=x.useRef(null),z=x.useRef(null),L=x.useRef(!1),j=x.useRef(!1),q=x.useRef(-1),k=B!=null,T=ai(S),m=we(function(C){return C===void 0&&(C=T),C?St(C,it()):[]}),E=we(C=>{const P=m(C);return K.current.map(w=>y&&w==="reference"?y:T&&w==="floating"?T:P).filter(Boolean).flat()});x.useEffect(()=>{if(n||!c)return;function C(w){if(w.key==="Tab"){se(T,xe(ce(T)))&&m().length===0&&!I&&wt(w);const O=E(),N=Te(w);K.current[0]==="reference"&&N===y&&(wt(w),w.shiftKey?Pe(O[O.length-1]):Pe(O[1])),K.current[1]==="floating"&&N===T&&w.shiftKey&&(wt(w),Pe(O[0]))}}const P=ce(T);return P.addEventListener("keydown",C),()=>{P.removeEventListener("keydown",C)}},[n,y,T,c,K,I,m,E]),x.useEffect(()=>{if(n||!S)return;function C(P){const w=Te(P),N=m().indexOf(w);N!==-1&&(q.current=N)}return S.addEventListener("focusin",C),()=>{S.removeEventListener("focusin",C)}},[n,S,m]),x.useEffect(()=>{if(n||!d)return;function C(){j.current=!0,setTimeout(()=>{j.current=!1})}function P(w){const O=w.relatedTarget;queueMicrotask(()=>{const N=!(se(y,O)||se(S,O)||se(O,S)||se(B==null?void 0:B.portalNode,O)||O!=null&&O.hasAttribute(nt("focus-guard"))||G&&(Me(G.nodesRef.current,b).find($=>{var D,X;return se((D=$.context)==null?void 0:D.elements.floating,O)||se((X=$.context)==null?void 0:X.elements.domReference,O)})||Jo(G.nodesRef.current,b).find($=>{var D,X;return((D=$.context)==null?void 0:D.elements.floating)===O||((X=$.context)==null?void 0:X.elements.domReference)===O})));if(l&&N&&xe(ce(T))===ce(T).body){re(T)&&T.focus();const $=q.current,D=m(),X=D[$]||D[D.length-1]||T;re(X)&&X.focus()}(I||!c)&&O&&N&&!j.current&&O!==Un()&&(L.current=!0,h(!1,w,"focus-out"))})}if(S&&re(y))return y.addEventListener("focusout",P),y.addEventListener("pointerdown",C),S.addEventListener("focusout",P),()=>{y.removeEventListener("focusout",P),y.removeEventListener("pointerdown",C),S.removeEventListener("focusout",P)}},[n,y,S,T,c,b,G,B,h,d,l,m,I]),x.useEffect(()=>{var C;if(n)return;const P=Array.from((B==null||(C=B.portalNode)==null?void 0:C.querySelectorAll("["+nt("portal")+"]"))||[]);if(S){const w=[S,...P,ne.current,z.current,K.current.includes("reference")||I?y:null].filter(N=>N!=null),O=c||I?jn(w,H,!H):jn(w);return()=>{O()}}},[n,y,S,c,K,B,I,H]),pe(()=>{if(n||!re(T))return;const C=ce(T),P=xe(C);queueMicrotask(()=>{const w=E(T),O=ee.current,N=(typeof O=="number"?w[O]:O.current)||T,$=se(T,P);!g&&!$&&v&&Pe(N,{preventScroll:N===T})})},[n,v,T,g,E,ee]),pe(()=>{if(n||!T)return;let C=!1;const P=ce(T),w=xe(P);let N=R.current.openEvent;kt(w);function $(_){let{open:oe,reason:he,event:le,nested:Ft}=_;oe&&(N=le),he==="escape-key"&&u.domReference.current&&kt(u.domReference.current),he==="hover"&&le.type==="mouseleave"&&(L.current=!0),he==="outside-press"&&(Ft?(L.current=!1,C=!0):L.current=!(Pr(le)||Nr(le)))}A.on("openchange",$);const D=P.createElement("span");D.setAttribute("tabindex","-1"),D.setAttribute("aria-hidden","true"),Object.assign(D.style,It),k&&y&&y.insertAdjacentElement("afterend",D);function X(){return typeof Z.current=="boolean"?Un()||D:Z.current.current||D}return()=>{A.off("openchange",$);const _=xe(P),oe=se(S,_)||G&&Me(G.nodesRef.current,b).some(Ft=>{var tr;return se((tr=Ft.context)==null?void 0:tr.elements.floating,_)});(oe||N&&["click","mousedown"].includes(N.type))&&u.domReference.current&&kt(u.domReference.current);const le=X();queueMicrotask(()=>{Z.current&&!L.current&&re(le)&&(!(le!==_&&_!==P.body)||oe)&&le.focus({preventScroll:C}),D.remove()})}},[n,S,T,Z,R,u,A,G,b,k,y]),x.useEffect(()=>{queueMicrotask(()=>{L.current=!1})},[n]),pe(()=>{if(!n&&B)return B.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:h,refs:u}),()=>{B.setFocusManagerState(null)}},[n,B,c,v,h,u,d]),pe(()=>{if(n||!T||typeof MutationObserver!="function"||g)return;const C=()=>{const w=T.getAttribute("tabindex"),O=m(),N=xe(ce(S)),$=O.indexOf(N);$!==-1&&(q.current=$),K.current.includes("floating")||N!==u.domReference.current&&O.length===0?w!=="0"&&T.setAttribute("tabindex","0"):w!=="-1"&&T.setAttribute("tabindex","-1")};C();const P=new MutationObserver(C);return P.observe(T,{childList:!0,subtree:!0,attributes:!0}),()=>{P.disconnect()}},[n,S,T,u,K,m,g]);function F(C){return n||!f||!c?null:x.createElement(ci,{ref:C==="start"?ne:z,onClick:P=>h(!1,P.nativeEvent)},typeof f=="string"?f:"Dismiss")}const W=!n&&H&&(c?!I:!0)&&(k||c);return x.createElement(x.Fragment,null,W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.beforeInsideRef,onFocus:C=>{if(c){const w=E();Pe(o[0]==="reference"?w[0]:w[w.length-1])}else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(L.current=!1,Bn(C,B.portalNode)){const w=ni()||y;w==null||w.focus()}else{var P;(P=B.beforeOutsideRef.current)==null||P.focus()}}}),!I&&F("start"),r,F("end"),W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.afterInsideRef,onFocus:C=>{if(c)Pe(E()[0]);else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(d&&(L.current=!0),Bn(C,B.portalNode)){const w=ri()||y;w==null||w.focus()}else{var P;(P=B.afterOutsideRef.current)==null||P.focus()}}}))}function Hn(e){return re(e.target)&&e.target.tagName==="BUTTON"}function Kn(e){return an(e)}function ui(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:f=!0,stickIfOpen:d=!0}=t,v=x.useRef(),u=x.useRef(!1),b=x.useMemo(()=>({onPointerDown(h){v.current=h.pointerType},onMouseDown(h){const A=v.current;h.button===0&&a!=="click"&&(sn(A)&&c||(r&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){const A=v.current;if(a==="mousedown"&&v.current){v.current=void 0;return}sn(A)&&c||(r&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){v.current=void 0,!(h.defaultPrevented||!f||Hn(h))&&(h.key===" "&&!Kn(i)&&(h.preventDefault(),u.current=!0),h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!f||Hn(h)||Kn(i)||h.key===" "&&u.current&&(u.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}),[o,i,a,c,f,n,r,d,l]);return x.useMemo(()=>s?{reference:b}:{},[s,b])}const fi={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},di={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zn=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function pi(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:v=!1,bubbles:u,capture:b}=t,h=Rt(),A=we(typeof l=="function"?l:()=>!1),R=typeof l=="function"?A:l,M=x.useRef(!1),y=x.useRef(!1),{escapeKey:S,outsidePress:g}=zn(u),{escapeKey:I,outsidePress:H}=zn(b),K=x.useRef(!1),ee=we(L=>{var j;if(!r||!s||!a||L.key!=="Escape"||K.current)return;const q=(j=i.current.floatingContext)==null?void 0:j.nodeId,k=h?Me(h.nodesRef.current,q):[];if(!S&&(L.stopPropagation(),k.length>0)){let T=!0;if(k.forEach(m=>{var E;if((E=m.context)!=null&&E.open&&!m.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}n(!1,kr(L)?L.nativeEvent:L,"escape-key")}),Z=we(L=>{var j;const q=()=>{var k;ee(L),(k=Te(L))==null||k.removeEventListener("keydown",q)};(j=Te(L))==null||j.addEventListener("keydown",q)}),G=we(L=>{var j;const q=M.current;M.current=!1;const k=y.current;if(y.current=!1,c==="click"&&k||q||typeof R=="function"&&!R(L))return;const T=Te(L),m="["+nt("inert")+"]",E=ce(o.floating).querySelectorAll(m);let F=Q(T)?T:null;for(;F&&!be(F);){const w=de(F);if(be(w)||!Q(w))break;F=w}if(E.length&&Q(T)&&!Dr(T)&&!se(T,o.floating)&&Array.from(E).every(w=>!se(F,w)))return;if(re(T)&&z){const w=T.clientWidth>0&&T.scrollWidth>T.clientWidth,O=T.clientHeight>0&&T.scrollHeight>T.clientHeight;let N=O&&L.offsetX>T.clientWidth;if(O&&ae(T).direction==="rtl"&&(N=L.offsetX<=T.offsetWidth-T.clientWidth),N||w&&L.offsetY>T.clientHeight)return}const W=(j=i.current.floatingContext)==null?void 0:j.nodeId,C=h&&Me(h.nodesRef.current,W).some(w=>{var O;return yt(L,(O=w.context)==null?void 0:O.elements.floating)});if(yt(L,o.floating)||yt(L,o.domReference)||C)return;const P=h?Me(h.nodesRef.current,W):[];if(P.length>0){let w=!0;if(P.forEach(O=>{var N;if((N=O.context)!=null&&N.open&&!O.context.dataRef.current.__outsidePressBubbles){w=!1;return}}),!w)return}n(!1,L,"outside-press")}),B=we(L=>{var j;const q=()=>{var k;G(L),(k=Te(L))==null||k.removeEventListener(c,q)};(j=Te(L))==null||j.addEventListener(c,q)});x.useEffect(()=>{if(!r||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=g;let L=-1;function j(E){n(!1,E,"ancestor-scroll")}function q(){window.clearTimeout(L),K.current=!0}function k(){L=window.setTimeout(()=>{K.current=!1},We()?5:0)}const T=ce(o.floating);a&&(T.addEventListener("keydown",I?Z:ee,I),T.addEventListener("compositionstart",q),T.addEventListener("compositionend",k)),R&&T.addEventListener(c,H?B:G,H);let m=[];return v&&(Q(o.domReference)&&(m=ge(o.domReference)),Q(o.floating)&&(m=m.concat(ge(o.floating))),!Q(o.reference)&&o.reference&&o.reference.contextElement&&(m=m.concat(ge(o.reference.contextElement)))),m=m.filter(E=>{var F;return E!==((F=T.defaultView)==null?void 0:F.visualViewport)}),m.forEach(E=>{E.addEventListener("scroll",j,{passive:!0})}),()=>{a&&(T.removeEventListener("keydown",I?Z:ee,I),T.removeEventListener("compositionstart",q),T.removeEventListener("compositionend",k)),R&&T.removeEventListener(c,H?B:G,H),m.forEach(E=>{E.removeEventListener("scroll",j)}),window.clearTimeout(L)}},[i,o,a,R,c,r,n,v,s,S,g,ee,I,Z,G,H,B]),x.useEffect(()=>{M.current=!1},[R,c]);const ne=x.useMemo(()=>({onKeyDown:ee,[fi[d]]:L=>{f&&n(!1,L.nativeEvent,"reference-press")}}),[ee,n,f,d]),z=x.useMemo(()=>({onKeyDown:ee,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[di[c]]:()=>{M.current=!0}}),[ee,c]);return x.useMemo(()=>s?{reference:ne,floating:z}:{},[s,ne,z])}function hi(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=Dn(),i=x.useRef({}),[s]=x.useState(()=>Xo()),a=Ln()!=null;if(process.env.NODE_ENV!=="production"){const u=n.reference;u&&!Q(u)&&zo("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=x.useState(n.reference),f=we((u,b,h)=>{i.current.openEvent=u?b:void 0,s.emit("openchange",{open:u,event:b,reason:h,nested:a}),r==null||r(u,b,h)}),d=x.useMemo(()=>({setPositionReference:c}),[]),v=x.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return x.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:v,events:s,floatingId:o,refs:d}),[t,f,v,s,o,d])}function mi(e){e===void 0&&(e={});const{nodeId:t}=e,r=hi({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=x.useState(null),[a,l]=x.useState(null),f=(o==null?void 0:o.domReference)||i,d=x.useRef(null),v=Rt();pe(()=>{f&&(d.current=f)},[f]);const u=Bo({...e,elements:{...o,...a&&{reference:a}}}),b=x.useCallback(y=>{const S=Q(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),u.refs.setReference(S)},[u.refs]),h=x.useCallback(y=>{(Q(y)||y===null)&&(d.current=y,s(y)),(Q(u.refs.reference.current)||u.refs.reference.current===null||y!==null&&!Q(y))&&u.refs.setReference(y)},[u.refs]),A=x.useMemo(()=>({...u.refs,setReference:h,setPositionReference:b,domReference:d}),[u.refs,h,b]),R=x.useMemo(()=>({...u.elements,domReference:f}),[u.elements,f]),M=x.useMemo(()=>({...u,...n,refs:A,elements:R,nodeId:t}),[u,A,R,t,n]);return pe(()=>{n.dataRef.current.floatingContext=M;const y=v==null?void 0:v.nodesRef.current.find(S=>S.id===t);y&&(y.context=M)}),x.useMemo(()=>({...u,context:M,refs:A,elements:R}),[u,A,R,M])}const Xn="active",Gn="selected";function Dt(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[Xn]:s,[Gn]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[Mt]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,f]=l;if(!(o&&[Xn,Gn].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof f=="function"){var d;(d=n.get(c))==null||d.push(f),s[c]=function(){for(var v,u=arguments.length,b=new Array(u),h=0;h<u;h++)b[h]=arguments[h];return(v=n.get(c))==null?void 0:v.map(A=>A(...b)).find(A=>A!==void 0)}}}else s[c]=f}),s),{})}}function vi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=x.useCallback(a=>Dt(a,e,"reference"),t),i=x.useCallback(a=>Dt(a,e,"floating"),r),s=x.useCallback(a=>Dt(a,e,"item"),n);return x.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const bi=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gi(e,t){var r;t===void 0&&(t={});const{open:n,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(r=bi.get(s))!=null?r:s,l=Dn(),f=Ln()!=null,d=x.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&f&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,f,n,l,s]),v=x.useMemo(()=>{const b={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?b:{...b,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),u=x.useCallback(b=>{let{active:h,selected:A}=b;const R={role:"option",...h&&{id:o+"-option"}};switch(s){case"select":return{...R,"aria-selected":h&&A};case"combobox":return{...R,...h&&{"aria-selected":!0}}}return{}},[o,s]);return x.useMemo(()=>i?{reference:d,floating:v,item:u}:{},[i,d,v,u])}function yi({className:e,children:t,buttonText:r}){const[n,o]=te.useState(!1),{refs:i,floatingStyles:s,context:a}=mi({open:n,onOpenChange:o,middleware:[qo(16),Yo(),Vo()],whileElementsMounted:ko,placement:"right"}),l=ui(a),c=pi(a),f=gi(a),{getReferenceProps:d,getFloatingProps:v}=vi([l,c,f]);return p.jsxs(p.Fragment,{children:[p.jsx("span",{ref:i.setReference,className:e,...d(),children:p.jsx(me,{text:r})}),n&&p.jsx(li,{context:a,modal:!1,children:p.jsx("div",{ref:i.setFloating,style:s,...v(),children:p.jsx(tn,{children:t})})})]})}const wi=({className:e,children:t,buttonText:r="Menu button"})=>{const n=J("rpf-menu-button",e);return p.jsx(yi,{className:n,buttonText:r,children:t})},Zn=e=>e?p.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:e}):null,Jn=({text:e,iconPosition:t,icon:r})=>p.jsxs(p.Fragment,{children:[t==="left"&&r!==""?Zn(r):null,e,t==="right"&&r!==""?Zn(r):null]}),Ei=({text:e,href:t,icon:r="",iconPosition:n="left",danger:o,className:i,onClick:s})=>{const a=J("rpf-menu__item",{"rpf-menu__item--danger":o},i);return p.jsx("li",{className:a,children:t?p.jsx("a",{href:t,children:p.jsx(Jn,{text:e,iconPosition:n,icon:r})}):p.jsx("button",{type:"button",onClick:s,children:p.jsx(Jn,{text:e,iconPosition:n,icon:r})})})},xi=({text:e})=>p.jsx("li",{className:"rpf-menu__title",children:p.jsx("span",{children:e})}),Ti=({text:e="",percent:t,complete:r=!1,className:n})=>p.jsx("div",{className:J("rpf-progress-bar",{"rpf-progress-bar--complete":r,className:n}),children:p.jsxs("label",{className:"rpf-progress-bar__label",children:[p.jsx("span",{children:e}),p.jsx("progress",{className:"rpf-progress-bar__bar",value:t,max:"100",children:`${t}%`})]})}),Si=({children:e})=>p.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:p.jsx("div",{className:"rpf-table-cell__content",children:e})});/**
|
|
25
28
|
* @license lucide-react v0.553.0 - ISC
|
|
26
29
|
*
|
|
27
30
|
* This source code is licensed under the ISC license.
|
|
28
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/const
|
|
32
|
+
*/const Ci=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Qn=e=>{const t=_i(e);return t.charAt(0).toUpperCase()+t.slice(1)},er=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Oi=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
30
33
|
* @license lucide-react v0.553.0 - ISC
|
|
31
34
|
*
|
|
32
35
|
* This source code is licensed under the ISC license.
|
|
33
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var
|
|
37
|
+
*/var Ai={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
35
38
|
* @license lucide-react v0.553.0 - ISC
|
|
36
39
|
*
|
|
37
40
|
* This source code is licensed under the ISC license.
|
|
38
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const
|
|
42
|
+
*/const Ri=te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...a},l)=>te.createElement("svg",{ref:l,...Ai,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:er("lucide",o),...!i&&!Oi(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,f])=>te.createElement(c,f)),...Array.isArray(i)?i:[i]]));/**
|
|
40
43
|
* @license lucide-react v0.553.0 - ISC
|
|
41
44
|
*
|
|
42
45
|
* This source code is licensed under the ISC license.
|
|
43
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/const
|
|
47
|
+
*/const Lt=(e,t)=>{const r=te.forwardRef(({className:n,...o},i)=>te.createElement(Ri,{ref:i,iconNode:t,className:er(`lucide-${Ci(Qn(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Qn(e),r};/**
|
|
45
48
|
* @license lucide-react v0.553.0 - ISC
|
|
46
49
|
*
|
|
47
50
|
* This source code is licensed under the ISC license.
|
|
48
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/const
|
|
52
|
+
*/const Pi=Lt("arrow-down-up",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
|
|
50
53
|
* @license lucide-react v0.553.0 - ISC
|
|
51
54
|
*
|
|
52
55
|
* This source code is licensed under the ISC license.
|
|
53
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
57
|
+
*/const Ni=Lt("arrow-down-wide-narrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);/**
|
|
55
58
|
* @license lucide-react v0.553.0 - ISC
|
|
56
59
|
*
|
|
57
60
|
* This source code is licensed under the ISC license.
|
|
58
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
62
|
+
*/const Ii=Lt("arrow-up-narrow-wide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]),Mi=(e,t)=>{if(e)return t==="up"?"ascending":t==="down"?"descending":"none"},ki=({sortDirection:e,children:t,onClick:r})=>{const n=!!r,o=e==="up"?Ii:e==="down"?Ni:Pi,i=Mi(n,e),s=n?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return p.jsx("th",{className:`rpf-table-cell ${s}`,"aria-sort":i,children:p.jsx("div",{className:"rpf-table-cell__content",children:n?p.jsxs("button",{className:"rpf-table-cell__sort-header",onClick:r,children:[t,p.jsx(o,{size:20})]}):p.jsx(p.Fragment,{children:t})})})},Di=({headerRow:e,bodyRows:t,fullWidth:r})=>p.jsx("div",{"data-testid":"table-container",className:J("rpf-table",{"rpf-table--full-width":r}),children:p.jsxs("table",{className:J("rpf-table__table",{"rpf-table__table--full-width":r}),children:[p.jsx("thead",{children:p.jsx("tr",{className:"rpf-table-row",children:e})}),p.jsx("tbody",{children:t.map((n,o)=>p.jsx("tr",{className:"rpf-table-row",children:n},o))})]})}),Li=({text:e,variant:t,secondary:r,icon:n,iconPosition:o})=>{const i=n?p.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:n}):null;n&&!o&&(o="left");const s=t&&t!=="default"?`rpf-tag--${t}`:null;return p.jsxs("span",{className:J("rpf-tag",s,{"rpf-tag--secondary":r}),children:[o==="left"&&i,e,o==="right"&&i]})};V.Accordion=Qt,V.Alert=hr,V.Button=me,V.CheckboxInput=mr,V.Fieldset=vr,V.InputField=Fe,V.InputLabel=br,V.Menu=tn,V.MenuButton=wi,V.MenuItem=Ei,V.MenuTitle=xi,V.Modal=Sr,V.ProgressBar=Ti,V.RadioInput=gr,V.SearchInput=yr,V.SelectInput=wr,V.Switch=en,V.Table=Di,V.TableBodyCell=Si,V.TableHeaderCell=ki,V.Tag=Li,V.TextInput=xr,V.TextareaInput=Er,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
@forward '../properties/colors/brand';
|
|
2
|
+
@forward '../properties/colors/decorative';
|
|
3
|
+
@forward '../properties/colors/greys';
|
|
4
|
+
@forward '../properties/colors/alert';
|
|
5
|
+
@forward '../properties/font-size';
|
|
6
|
+
@forward '../properties/font-weight';
|
|
7
|
+
@forward '../properties/border';
|
|
8
|
+
@forward '../properties/spacing';
|
|
9
|
+
@forward '../properties/sizing';
|
|
10
|
+
|
|
11
|
+
.rpf-switch {
|
|
12
|
+
// Visually hide the checkbox but keep it accessible
|
|
13
|
+
|
|
14
|
+
.rpf-label {
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.rpf-switch__checkbox {
|
|
19
|
+
position: absolute;
|
|
20
|
+
opacity: 0;
|
|
21
|
+
inline-size: 1px;
|
|
22
|
+
block-size: 1px;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
clip: rect(0, 0, 0, 0);
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Sizing properties
|
|
29
|
+
--rpf-switch-width: 52px;
|
|
30
|
+
--rpf-switch-height: 32px;
|
|
31
|
+
--rpf-switch-handle-size: calc(var(--rpf-switch-height) * 0.75); // 24px
|
|
32
|
+
--rpf-switch-border-width: 2px;
|
|
33
|
+
--rpf-switch-border-radius: calc(var(--rpf-switch-height) / 2);
|
|
34
|
+
--rpf-switch-handle-border-radius: 50%;
|
|
35
|
+
|
|
36
|
+
// Color properties
|
|
37
|
+
--rpf-switch-off-color: var(--rpf-grey-500);
|
|
38
|
+
--rpf-switch-on-color: var(--rpf-navy-800);
|
|
39
|
+
--rpf-switch-icon-off-color: var(--rpf-white);
|
|
40
|
+
--rpf-switch-icon-on-color: var(--rpf-switch-on-color);
|
|
41
|
+
--rpf-switch-track-off-color: var(--rpf-grey-50);
|
|
42
|
+
--rpf-switch-track-on-color: var(--rpf-switch-on-color);
|
|
43
|
+
--rpf-switch-handle-off-color: var(--rpf-switch-off-color);
|
|
44
|
+
--rpf-switch-handle-on-color: var(--rpf-white);
|
|
45
|
+
|
|
46
|
+
// Base layout
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--space-1-5);
|
|
51
|
+
min-block-size: var(--min-target-size);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
font-weight: var(--font-weight-bold);
|
|
54
|
+
|
|
55
|
+
// Track styles
|
|
56
|
+
.rpf-switch__track {
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
inline-size: var(--rpf-switch-width);
|
|
62
|
+
block-size: var(--rpf-switch-height);
|
|
63
|
+
padding-block: 0.375rem;
|
|
64
|
+
padding-inline: 0.5rem;
|
|
65
|
+
border-radius: var(--rpf-switch-border-radius);
|
|
66
|
+
border: var(--rpf-switch-border-width) solid var(--rpf-switch-off-color);
|
|
67
|
+
background: var(--rpf-switch-track-color);
|
|
68
|
+
transition:
|
|
69
|
+
background-color 0.2s ease-out,
|
|
70
|
+
border-color 0.2s ease-out;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Handle styles
|
|
74
|
+
.rpf-switch__handle {
|
|
75
|
+
block-size: calc(var(--rpf-switch-handle-size) / 1.5);
|
|
76
|
+
aspect-ratio: 1/1;
|
|
77
|
+
margin-inline-start: 0;
|
|
78
|
+
background-color: var(--rpf-switch-off-color);
|
|
79
|
+
border-radius: var(--rpf-switch-handle-border-radius);
|
|
80
|
+
transition:
|
|
81
|
+
margin-inline-start 0.2s ease-out,
|
|
82
|
+
background-color 0.2s ease-out,
|
|
83
|
+
box-shadow 0.2s ease-out,
|
|
84
|
+
block-size 0.2s ease-out;
|
|
85
|
+
transition-behavior: allow-discrete;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Icon modifier
|
|
90
|
+
.rpf-switch--icon {
|
|
91
|
+
.rpf-switch__track {
|
|
92
|
+
padding-inline: 0.125rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.rpf-switch__handle {
|
|
96
|
+
block-size: var(--rpf-switch-handle-size);
|
|
97
|
+
display: grid;
|
|
98
|
+
place-items: center;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.rpf-switch__icon {
|
|
102
|
+
background-color: var(--rpf-switch-icon-off-color);
|
|
103
|
+
inline-size: 1rem;
|
|
104
|
+
block-size: 1rem;
|
|
105
|
+
display: inline-block;
|
|
106
|
+
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="%231f1f1f"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>');
|
|
107
|
+
mask-size: 1rem;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.rpf-switch:has(.rpf-switch__checkbox:disabled),
|
|
112
|
+
.rpf-switch--disabled {
|
|
113
|
+
cursor: default;
|
|
114
|
+
opacity: 50%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Focus state (specificity: 0,2,1)
|
|
118
|
+
.rpf-switch__track:has(.rpf-switch__checkbox:focus-visible) {
|
|
119
|
+
outline: 3px solid var(--rpf-input-outline-color);
|
|
120
|
+
outline-offset: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Base hover states (specificity: 0,1,1)
|
|
124
|
+
.rpf-switch:hover .rpf-switch__handle {
|
|
125
|
+
box-shadow: 0px 0px 0px 14px color-mix(in srgb, var(--rpf-switch-off-color), transparent 90%);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Layout modifiers (specificity: 0,1,0)
|
|
129
|
+
.rpf-switch--full-width {
|
|
130
|
+
inline-size: 100%;
|
|
131
|
+
max-inline-size: none;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.rpf-switch--reverse {
|
|
136
|
+
flex-direction: row-reverse;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.rpf-switch--align-start {
|
|
140
|
+
align-items: start;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Disabled hover states (specificity: 0,2,1)
|
|
144
|
+
.rpf-switch--disabled:hover .rpf-switch__handle {
|
|
145
|
+
box-shadow: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Checked states (specificity: 0,2,1)
|
|
149
|
+
.rpf-switch:has(.rpf-switch__checkbox:checked) {
|
|
150
|
+
.rpf-switch__track {
|
|
151
|
+
background-color: var(--rpf-switch-track-on-color);
|
|
152
|
+
border: 2px solid var(--rpf-switch-track-on-color);
|
|
153
|
+
padding-inline: 0.125rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.rpf-switch__handle {
|
|
157
|
+
block-size: var(--rpf-switch-handle-size);
|
|
158
|
+
margin-inline-start: calc(100% - var(--rpf-switch-handle-size) - calc(var(--rpf-switch-border-width) * 0.5));
|
|
159
|
+
background-color: var(--rpf-switch-handle-on-color);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:hover .rpf-switch__handle {
|
|
163
|
+
box-shadow: 0px 0px 0px 10px color-mix(in srgb, var(--rpf-switch-on-color), transparent 90%);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.rpf-switch__icon {
|
|
167
|
+
background-color: var(--rpf-switch-icon-on-color);
|
|
168
|
+
inline-size: 1rem;
|
|
169
|
+
block-size: 1rem;
|
|
170
|
+
display: inline-block;
|
|
171
|
+
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="%231f1f1f"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>');
|
|
172
|
+
mask-size: 1rem;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Checked disabled hover state (specificity: 0,3,1)
|
|
177
|
+
.rpf-switch:has(.rpf-switch__checkbox:disabled):hover .rpf-switch__handle {
|
|
178
|
+
box-shadow: none;
|
|
179
|
+
}
|