@raspberrypifoundation/design-system-react 2.7.0-beta.0 → 2.7.1
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/CHANGELOG.md +15 -2
- package/dist/design-system-react.css +1 -1
- package/dist/design-system-react.js +1125 -952
- package/dist/design-system-react.umd.cjs +41 -6
- package/dist/scss/components/alert.scss +39 -16
- package/dist/scss/components/forms/error-message.scss +1 -0
- package/dist/scss/components/forms/fieldset.scss +13 -17
- package/dist/scss/components/forms/input-checkbox.scss +18 -12
- package/dist/scss/components/forms/input-label.scss +2 -1
- package/dist/scss/components/forms/input-radio.scss +17 -12
- package/dist/scss/components/forms/input-search.scss +8 -2
- package/dist/scss/components/modal.scss +95 -0
- package/dist/scss/components/progress-bar.scss +61 -17
- package/dist/scss/design-system-core.scss +4 -0
- package/dist/scss/properties/colors/_utilities.scss +4 -0
- package/dist/types/lib/main.d.ts +28 -0
- package/dist/types/lib/main.d.ts.map +1 -0
- package/dist/types/src/components/Accordion/Accordion.spec.d.ts +2 -0
- package/dist/types/src/components/Accordion/Accordion.spec.d.ts.map +1 -0
- package/dist/types/src/components/Accordion/index.d.ts +17 -0
- package/dist/types/src/components/Accordion/index.d.ts.map +1 -0
- package/dist/types/src/components/Alert/Alert.spec.d.ts +2 -0
- package/dist/types/src/components/Alert/Alert.spec.d.ts.map +1 -0
- package/dist/types/src/components/Alert/Alert.types.d.ts +41 -0
- package/dist/types/src/components/Alert/Alert.types.d.ts.map +1 -0
- package/dist/types/src/components/Alert/index.d.ts +6 -0
- package/dist/types/src/components/Alert/index.d.ts.map +1 -0
- package/dist/types/src/components/Button/Button.spec.d.ts +2 -0
- package/dist/types/src/components/Button/Button.spec.d.ts.map +1 -0
- package/dist/types/src/components/Button/Button.types.d.ts +34 -0
- package/dist/types/src/components/Button/Button.types.d.ts.map +1 -0
- package/dist/types/src/components/Button/index.d.ts +6 -0
- package/dist/types/src/components/Button/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts +24 -0
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts +6 -0
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/Fieldset/Fieldset.spec.d.ts +2 -0
- package/dist/types/src/components/Form/Fieldset/Fieldset.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/Fieldset/index.d.ts +21 -0
- package/dist/types/src/components/Form/Fieldset/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/InputField/index.d.ts +21 -0
- package/dist/types/src/components/Form/InputField/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/InputLabel/InputLabel.spec.d.ts +2 -0
- package/dist/types/src/components/Form/InputLabel/InputLabel.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/InputLabel/index.d.ts +17 -0
- package/dist/types/src/components/Form/InputLabel/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/RadioInput/RadioInput.spec.d.ts +2 -0
- package/dist/types/src/components/Form/RadioInput/RadioInput.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/RadioInput/index.d.ts +25 -0
- package/dist/types/src/components/Form/RadioInput/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/SearchInput/SearchInput.spec.d.ts +2 -0
- package/dist/types/src/components/Form/SearchInput/SearchInput.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts +21 -0
- package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/SearchInput/index.d.ts +6 -0
- package/dist/types/src/components/Form/SearchInput/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/SelectInput/SelectInput.spec.d.ts +2 -0
- package/dist/types/src/components/Form/SelectInput/SelectInput.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/SelectInput/index.d.ts +31 -0
- package/dist/types/src/components/Form/SelectInput/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextInput/TextInput.spec.d.ts +2 -0
- package/dist/types/src/components/Form/TextInput/TextInput.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextInput/index.d.ts +27 -0
- package/dist/types/src/components/Form/TextInput/index.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextareaInput/TextareaInput.spec.d.ts +2 -0
- package/dist/types/src/components/Form/TextareaInput/TextareaInput.spec.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextareaInput/index.d.ts +29 -0
- package/dist/types/src/components/Form/TextareaInput/index.d.ts.map +1 -0
- package/dist/types/src/components/MaterialSymbols/index.d.ts +2 -0
- package/dist/types/src/components/MaterialSymbols/index.d.ts.map +1 -0
- package/dist/types/src/components/Modal/Modal.types.d.ts +45 -0
- package/dist/types/src/components/Modal/Modal.types.d.ts.map +1 -0
- package/dist/types/src/components/Modal/index.d.ts +6 -0
- package/dist/types/src/components/Modal/index.d.ts.map +1 -0
- package/dist/types/src/components/ProgressBar/ProgressBar.types.d.ts +11 -0
- package/dist/types/src/components/ProgressBar/ProgressBar.types.d.ts.map +1 -0
- package/dist/types/src/components/ProgressBar/index.d.ts +6 -0
- package/dist/types/src/components/ProgressBar/index.d.ts.map +1 -0
- package/dist/types/src/components/Table/BodyCell/BodyCell.spec.d.ts +2 -0
- package/dist/types/src/components/Table/BodyCell/BodyCell.spec.d.ts.map +1 -0
- package/dist/types/src/components/Table/BodyCell/index.d.ts +6 -0
- package/dist/types/src/components/Table/BodyCell/index.d.ts.map +1 -0
- package/dist/types/src/components/Table/HeaderCell/HeaderCell.helpers.d.ts +2 -0
- package/dist/types/src/components/Table/HeaderCell/HeaderCell.helpers.d.ts.map +1 -0
- package/dist/types/src/components/Table/HeaderCell/HeaderCell.spec.d.ts +2 -0
- package/dist/types/src/components/Table/HeaderCell/HeaderCell.spec.d.ts.map +1 -0
- package/dist/types/src/components/Table/HeaderCell/HeaderCell.types.d.ts +9 -0
- package/dist/types/src/components/Table/HeaderCell/HeaderCell.types.d.ts.map +1 -0
- package/dist/types/src/components/Table/HeaderCell/index.d.ts +5 -0
- package/dist/types/src/components/Table/HeaderCell/index.d.ts.map +1 -0
- package/dist/types/src/components/Table/Table/Table.spec.d.ts +2 -0
- package/dist/types/src/components/Table/Table/Table.spec.d.ts.map +1 -0
- package/dist/types/src/components/Table/Table/Table.types.d.ts +9 -0
- package/dist/types/src/components/Table/Table/Table.types.d.ts.map +1 -0
- package/dist/types/src/components/Table/Table/index.d.ts +5 -0
- package/dist/types/src/components/Table/Table/index.d.ts.map +1 -0
- package/dist/types/src/components/Tag/Tag.spec.d.ts +2 -0
- package/dist/types/src/components/Tag/Tag.spec.d.ts.map +1 -0
- package/dist/types/src/components/Tag/Tag.types.d.ts +13 -0
- package/dist/types/src/components/Tag/Tag.types.d.ts.map +1 -0
- package/dist/types/src/components/Tag/index.d.ts +5 -0
- package/dist/types/src/components/Tag/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useDialog.d.ts +5 -0
- package/dist/types/src/hooks/useDialog.d.ts.map +1 -0
- package/dist/types/src/stories/Accordion.stories.d.ts +15 -0
- package/dist/types/src/stories/Accordion.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Alert.stories.d.ts +41 -0
- package/dist/types/src/stories/Alert.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Button.stories.d.ts +132 -0
- package/dist/types/src/stories/Button.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Modal/ExampleModal/ExampleModal.d.ts +2 -0
- package/dist/types/src/stories/Modal/ExampleModal/ExampleModal.d.ts.map +1 -0
- package/dist/types/src/stories/Modal/ExampleModal/ExampleModal.stories.d.ts +7 -0
- package/dist/types/src/stories/Modal/ExampleModal/ExampleModal.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Modal/Modal.stories.d.ts +26 -0
- package/dist/types/src/stories/Modal/Modal.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Modal/Modal.stories.helpers.d.ts +3 -0
- package/dist/types/src/stories/Modal/Modal.stories.helpers.d.ts.map +1 -0
- package/dist/types/src/stories/ProgressBar.stories.d.ts +93 -0
- package/dist/types/src/stories/ProgressBar.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Tag.stories.d.ts +53 -0
- package/dist/types/src/stories/Tag.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/CheckboxInput.stories.d.ts +30 -0
- package/dist/types/src/stories/forms/CheckboxInput.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/Fieldset.stories.d.ts +57 -0
- package/dist/types/src/stories/forms/Fieldset.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/InputLabel.stories.d.ts +25 -0
- package/dist/types/src/stories/forms/InputLabel.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/RadioInput.stories.d.ts +51 -0
- package/dist/types/src/stories/forms/RadioInput.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/SearchInput.stories.d.ts +40 -0
- package/dist/types/src/stories/forms/SearchInput.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/SelectInput.stories.d.ts +52 -0
- package/dist/types/src/stories/forms/SelectInput.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/TextInput.stories.d.ts +37 -0
- package/dist/types/src/stories/forms/TextInput.stories.d.ts.map +1 -0
- package/dist/types/src/stories/forms/TextareaInput.stories.d.ts +52 -0
- package/dist/types/src/stories/forms/TextareaInput.stories.d.ts.map +1 -0
- package/dist/types/src/stories/table/Table.stories.d.ts +9 -0
- package/dist/types/src/stories/table/Table.stories.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -1,24 +1,59 @@
|
|
|
1
|
-
(function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["RPF Design System React"]={},A.jsxRuntime,A.React))})(this,function(A,t,
|
|
1
|
+
(function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["RPF Design System React"]={},A.jsxRuntime,A.React))})(this,function(A,t,F){"use strict";function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee={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 me;function Fe(){return me||(me=1,function(e){(function(){var n={}.hasOwnProperty;function i(){for(var r="",f=0;f<arguments.length;f++){var l=arguments[f];l&&(r=o(r,a(l)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return i.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var f="";for(var l in r)n.call(r,l)&&r[l]&&(f=o(f,l));return f}function o(r,f){return f?r?r+" "+f:r+f:r}e.exports?(i.default=i,e.exports=i):window.classNames=i})()}(ee)),ee.exports}var Re=Fe();const L=be(Re);var Z={exports:{}},K={exports:{}},O={};/** @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 ge;function Ue(){if(ge)return O;ge=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,b=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,j=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function k(u){if(typeof u=="object"&&u!==null){var W=u.$$typeof;switch(W){case n:switch(u=u.type,u){case y:case b:case a:case r:case o:case g:return u;default:switch(u=u&&u.$$typeof,u){case l:case h:case M:case I:case f:return u;default:return W}}case i:return W}}}function q(u){return k(u)===b}return O.AsyncMode=y,O.ConcurrentMode=b,O.ContextConsumer=l,O.ContextProvider=f,O.Element=n,O.ForwardRef=h,O.Fragment=a,O.Lazy=M,O.Memo=I,O.Portal=i,O.Profiler=r,O.StrictMode=o,O.Suspense=g,O.isAsyncMode=function(u){return q(u)||k(u)===y},O.isConcurrentMode=q,O.isContextConsumer=function(u){return k(u)===l},O.isContextProvider=function(u){return k(u)===f},O.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===n},O.isForwardRef=function(u){return k(u)===h},O.isFragment=function(u){return k(u)===a},O.isLazy=function(u){return k(u)===M},O.isMemo=function(u){return k(u)===I},O.isPortal=function(u){return k(u)===i},O.isProfiler=function(u){return k(u)===r},O.isStrictMode=function(u){return k(u)===o},O.isSuspense=function(u){return k(u)===g},O.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===a||u===b||u===r||u===o||u===g||u===j||typeof u=="object"&&u!==null&&(u.$$typeof===M||u.$$typeof===I||u.$$typeof===f||u.$$typeof===l||u.$$typeof===h||u.$$typeof===$||u.$$typeof===D||u.$$typeof===z||u.$$typeof===N)},O.typeOf=k,O}var P={};/** @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 _e;function ze(){return _e||(_e=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,b=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,j=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function k(d){return typeof d=="string"||typeof d=="function"||d===a||d===b||d===r||d===o||d===g||d===j||typeof d=="object"&&d!==null&&(d.$$typeof===M||d.$$typeof===I||d.$$typeof===f||d.$$typeof===l||d.$$typeof===h||d.$$typeof===$||d.$$typeof===D||d.$$typeof===z||d.$$typeof===N)}function q(d){if(typeof d=="object"&&d!==null){var U=d.$$typeof;switch(U){case n:var Q=d.type;switch(Q){case y:case b:case a:case r:case o:case g:return Q;default:var Ye=Q&&Q.$$typeof;switch(Ye){case l:case h:case M:case I:case f:return Ye;default:return U}}case i:return U}}}var u=y,W=b,le=l,fe=f,ue=n,de=h,X=a,pe=M,ye=I,H=i,he=r,R=o,V=g,G=!1;function ve(d){return G||(G=!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.")),s(d)||q(d)===y}function s(d){return q(d)===b}function p(d){return q(d)===l}function E(d){return q(d)===f}function _(d){return typeof d=="object"&&d!==null&&d.$$typeof===n}function v(d){return q(d)===h}function w(d){return q(d)===a}function m(d){return q(d)===M}function T(d){return q(d)===I}function S(d){return q(d)===i}function x(d){return q(d)===r}function C(d){return q(d)===o}function Y(d){return q(d)===g}P.AsyncMode=u,P.ConcurrentMode=W,P.ContextConsumer=le,P.ContextProvider=fe,P.Element=ue,P.ForwardRef=de,P.Fragment=X,P.Lazy=pe,P.Memo=ye,P.Portal=H,P.Profiler=he,P.StrictMode=R,P.Suspense=V,P.isAsyncMode=ve,P.isConcurrentMode=s,P.isContextConsumer=p,P.isContextProvider=E,P.isElement=_,P.isForwardRef=v,P.isFragment=w,P.isLazy=m,P.isMemo=T,P.isPortal=S,P.isProfiler=x,P.isStrictMode=C,P.isSuspense=Y,P.isValidElementType=k,P.typeOf=q}()),P}var Te;function Ee(){return Te||(Te=1,process.env.NODE_ENV==="production"?K.exports=Ue():K.exports=ze()),K.exports}/*
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/var
|
|
24
|
-
Valid keys: `+JSON.stringify(Object.keys(n),null," "));var c=F(v,P,y,O,b+"."+P,f);if(c)return c}return null}return $(u)}function U(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(U);if(n===null||d(n))return!0;var u=E(n);if(u){var T=u.call(n),h;if(u!==n.entries){for(;!(h=T.next()).done;)if(!U(h.value))return!1}else for(;!(h=T.next()).done;){var y=h.value;if(y&&!U(y[1]))return!1}}else return!1;return!0;default:return!1}}function de(n,u){return n==="symbol"?!0:u?u["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&u instanceof Symbol:!1}function D(n){var u=typeof n;return Array.isArray(n)?"array":n instanceof RegExp?"object":de(u,n)?"symbol":u}function B(n){if(typeof n>"u"||n===null)return""+n;var u=D(n);if(u==="object"){if(n instanceof Date)return"date";if(n instanceof RegExp)return"regexp"}return u}function K(n){var u=B(n);switch(u){case"array":case"object":return"an "+u;case"boolean":case"date":case"regexp":return"a "+u;default:return u}}function ye(n){return!n.constructor||!n.constructor.name?q:n.constructor.name}return I.checkPropTypes=o,I.resetWarningCache=o.resetWarningCache,I.PropTypes=I,I},se}var oe,we;function Qe(){if(we)return oe;we=1;var r=te();function l(){}function f(){}return f.resetWarningCache=l,oe=function(){function s(p,d,g,_,m,E){if(E!==r){var q=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 q.name="Invariant Violation",q}}s.isRequired=s;function o(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:o,element:s,elementType:s,instanceOf:o,node:s,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:f,resetWarningCache:l};return a.PropTypes=a,a},oe}var xe;function er(){if(xe)return H.exports;if(xe=1,process.env.NODE_ENV!=="production"){var r=Te(),l=!0;H.exports=Ze()(r.isElement,l)}else H.exports=Qe()();return H.exports}var rr=er();const e=be(rr),Ne=({content:r,title:l,className:f,id:s="accordion"})=>{const o=k("rpf-accordion",f);return t.jsxs("details",{className:o,id:`${s}`,children:[t.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[l,t.jsx("span",{className:"rpf-accordion__icon"})]}),t.jsx("p",{className:"rpf-accordion__text",children:r})]})};Ne.propTypes={content:e.string.isRequired,title:e.string.isRequired,id:e.string,className:e.string};const X=({text:r,href:l,title:f,className:s,type:o="primary",variant:a="",size:p="default",icon:d="",iconOnly:g=!1,iconPosition:_="left",fullWidth:m=!1,disabled:E=!1,onClick:q=()=>{},"aria-label":I="",linkComponent:M})=>{const N=d&&g,$=k("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":a==="danger","rpf-button--sm":p==="small","rpf-button--icon-only":N,"rpf-button--full-width":m,disabled:E},s);let Y="rpf-button__icon";Ue.isValidElement(d)?(Y+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):Y+=" material-symbols-sharp";const z=i=>d&&_===i&&t.jsx("span",{className:Y,children:d}),R=()=>r&&!N&&t.jsx("span",{className:"text",children:r}),j=t.jsxs(t.Fragment,{children:[z("left"),R(),z("right")]});if(l){const i=M||"a",L=M?{to:l}:{href:l,role:"button"};return t.jsx(i,{className:$,...L,onClick:q,"aria-label":I,children:j})}return t.jsx("button",{className:$,title:f,onClick:q,disabled:E,"aria-label":I,children:j})};X.propTypes={type:e.string,className:e.string,disabled:e.bool,icon:e.oneOfType([e.string,e.element]),href:e.string,onClick:e.func,text:e.string,iconOnly:e.bool,title:e.string,iconPosition:e.oneOf(["left","right"]),size:e.oneOf(["default","small"]),"aria-label":e.string,fullWidth:e.bool,variant:e.string,linkComponent:e.elementType};const Ae=({title:r,text:l,children:f,type:s,actions:o,onClose:a})=>t.jsxs("div",{className:`rpf-alert rpf-alert--${s}`,children:[t.jsxs("div",{className:"rpf-alert__header",children:[t.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),t.jsx("p",{className:"rpf-alert__title",children:r}),!!a&&t.jsx("div",{className:"rpf-alert__close",children:t.jsx(X,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:a})})]}),(l||f||o)&&t.jsxs("div",{className:"rpf-alert__body",children:[!f&&l&&t.jsx("p",{children:l}),f&&t.jsx("div",{children:f}),o&&o.length>0&&t.jsx("div",{className:"rpf-alert__actions",children:o.map(p=>t.jsx(X,{text:p.label,size:"small",type:"tertiary",href:p.href,onClick:p.onClick},p.key||p.label))})]})]});Ae.propTypes={title:e.string,text:e.string,type:e.oneOf(["error","warning","information","success"]),actions:e.arrayOf(e.shape({href:e.string,label:e.string,onClick:e.func})),children:e.node,onClose:e.func};const qe=({id:r,label:l,name:f,checked:s=!1,disabled:o=!1,error:a="",onChange:p=()=>{},value:d="",className:g=""})=>t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:k("rpf-input-checkbox",{"rpf-input-checkbox--error":a,className:g}),children:[t.jsx("span",{children:t.jsx("input",{checked:!!s,disabled:o,id:r,name:f,onChange:p,type:"checkbox",value:d})}),t.jsx("span",{className:"checkmark"}),l]}),a&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),a]})]});qe.propTypes={checked:e.bool,disabled:e.bool,error:e.string,id:e.string.isRequired,label:e.oneOfType([e.string,e.object]).isRequired,name:e.string.isRequired,onChange:e.func,value:e.string,className:e.string};const Ie=({disabled:r=!1,errorText:l="",fullWidth:f=!1,legendText:s,legendHintText:o="",children:a})=>t.jsxs("fieldset",{className:k("rpf-fieldset",{"rpf-fieldset--disabled":r,"rpf-fieldset--full-width":f,"rpf-fieldset--error":l}),disabled:r,children:[t.jsxs("legend",{className:"rpf-label",children:[s,o.length>0?t.jsx("small",{className:"rpf-label__hint",children:o}):null]}),t.jsx("div",{className:"rpf-fieldset__inputs",children:a}),l.length>0?t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),l]}):null]});Ie.propTypes={disabled:e.bool,errorText:e.string,fullWidth:e.bool,legendText:e.string.isRequired,legendHintText:e.string,children:e.node};const V=({id:r,label:l,children:f,disabled:s=!1,error:o="",hint:a=""})=>t.jsxs("div",{className:"rpf-input-field",children:[(l||a)&&t.jsxs("label",{htmlFor:r,className:k("rpf-label",{"rpf-label--disabled":s}),children:[l,t.jsx("small",{className:"rpf-label__hint",children:a})]}),f,o&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]});V.propTypes={disabled:e.bool,error:e.string,hint:e.oneOfType([e.string,e.object]),label:e.oneOfType([e.string,e.object]).isRequired,id:e.string.isRequired,children:e.node};const je=({label:r,inputFieldId:l,disabled:f=!1,hint:s=""})=>t.jsx("div",{className:"rpf-label",children:t.jsxs("label",{htmlFor:l,className:k("rpf-label",{"rpf-label--disabled":f}),children:[r,s&&t.jsx("div",{className:"rpf-label__hint",children:s})]})});je.propTypes={disabled:e.bool,hint:e.oneOfType([e.string,e.object]),label:e.oneOfType([e.string,e.object]).isRequired,inputFieldId:e.string.isRequired};const $e=({text:r="",percent:l})=>t.jsx("div",{className:"rpf-progress-bar",children:t.jsxs("label",{className:"rpf-progress-bar__label",children:[t.jsx("span",{children:r}),t.jsx("progress",{className:"rpf-progress-bar__bar",value:l,max:"100",children:`${l}%`})]})});$e.propTypes={text:e.string,percent:e.number.isRequired};const Re=({id:r,label:l,name:f,checked:s=!1,disabled:o=!1,fullWidth:a=!1,onChange:p=()=>{},value:d=""})=>t.jsx(t.Fragment,{children:t.jsxs("label",{className:k("rpf-input-radio",{"rpf-input-radio--disabled":o,"rpf-input--full-width":a}),children:[t.jsx("input",{checked:!!s,disabled:o,id:r,name:f,onChange:p,type:"radio",value:d}),l]})});Re.propTypes={checked:e.bool,disabled:e.bool,fullWidth:e.bool,id:e.string.isRequired,label:e.oneOfType([e.string,e.object]).isRequired,name:e.string.isRequired,onChange:e.func,value:e.string};const ke=({label:r,inputFieldId:l,disabled:f=!1,error:s="",hint:o="",placeholder:a="",defaultValue:p="",onClick:d=()=>{},onChange:g=_=>{}})=>t.jsxs("div",{className:"rpf-input-field",children:[t.jsxs("label",{htmlFor:l,className:k("rpf-label",{"rpf-label--disabled":f}),children:[r,o&&t.jsx("small",{className:"rpf-label__hint",children:o})]}),t.jsxs("div",{className:"rpf-input-search-container",children:[t.jsx("input",{className:k("rpf-input rpf-input-search",{"rpf-input--disabled":f,"rpf-input--error":s}),disabled:f,id:l,name:"search",type:"search","aria-label":"Search",defaultValue:p,placeholder:a,onChange:g}),t.jsx("button",{type:"button",className:k("rpf-button rpf-button-search",{"rpf-button--disabled":f,"rpf-button--error":s}),disabled:f,onClick:d,children:t.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),s&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),s]})]});ke.propTypes={disabled:e.bool,error:e.string,hint:e.string,inputFieldId:e.string.isRequired,label:e.string.isRequired,onClick:e.func,onChange:e.func,placeholder:e.string,defaultValue:e.string};const Me=({id:r,label:l,name:f,options:s,disabled:o=!1,error:a="",fullWidth:p=!1,hint:d="",onChange:g=()=>{},placeholder:_="",value:m=""})=>t.jsx(V,{id:r,disabled:o,error:a,hint:d,label:l,children:t.jsxs("select",{className:k("rpf-input rpf-input-select",{"rpf-input--error":a,"rpf-input--full-width":p}),disabled:o,id:r,name:f,onChange:g,type:"text",value:m,children:[!m&&!!_&&t.jsx("option",{value:"",disabled:!0,children:_}),s.map(E=>t.jsx("option",{value:E.key,children:E.value},E.key))]})});Me.propTypes={disabled:e.bool,error:e.string,fullWidth:e.bool,hint:e.oneOfType([e.string,e.object]),label:e.oneOfType([e.string,e.object]).isRequired,id:e.string.isRequired,name:e.string.isRequired,onChange:e.func,options:e.array.isRequired,placeholder:e.string,value:e.string};const Ye=({headerRow:r,bodyRows:l,fullWidth:f})=>t.jsx("div",{"data-testid":"table-container",className:k("rpf-table",{"rpf-table--full-width":f}),children:t.jsxs("table",{className:k("rpf-table__table",{"rpf-table__table--full-width":f}),children:[t.jsx("thead",{children:t.jsx("tr",{className:"rpf-table-row",children:r})}),t.jsx("tbody",{children:l.map((s,o)=>t.jsx("tr",{className:"rpf-table-row",children:s},o))})]})});Ye.propTypes={headerRow:e.node.isRequired,bodyRows:e.arrayOf(e.node).isRequired,fullWidth:e.bool};const Fe=({children:r})=>t.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:t.jsx("div",{className:"rpf-table-cell__content",children:r})});Fe.propTypes={children:e.node};const De=({sortDirection:r,children:l})=>{if(r!==void 0){const s=r==="up"?"arrow_drop_up":"arrow_drop_down";l=t.jsxs("div",{className:"rpf-table-cell__sort-header",children:[l,t.jsx("span",{className:"material-symbols-sharp",children:s})]})}const f=r!==void 0?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return t.jsx("th",{className:`rpf-table-cell ${f}`,children:t.jsx("div",{className:"rpf-table-cell__content",children:l})})};De.propTypes={sortDirection:e.oneOf(["up","down"]),children:e.node};const We=({text:r,variant:l,secondary:f,icon:s,iconPosition:o})=>(s&&(s=t.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:s})),s&&!o&&(o="left"),l&&l!=="default"?l=`rpf-tag--${l}`:l=null,t.jsxs("span",{className:k("rpf-tag",l,{"rpf-tag--secondary":f}),children:[o==="left"&&s,r,o==="right"&&s]}));We.propTypes={text:e.string.isRequired,variant:e.oneOf(["default","information","success","warning","error"]),secondary:e.bool,icon:e.string,iconPosition:e.oneOf(["left","right"])};const Le=({id:r,label:l,name:f,value:s,disabled:o=!1,readOnly:a=!1,error:p="",fullWidth:d=!1,hint:g="",onChange:_=()=>{}})=>t.jsx(V,{id:r,disabled:o,error:p,hint:g,label:l,children:t.jsx("textarea",{className:k("rpf-input rpf-input-textarea",{"rpf-input--error":p,"rpf-input--full-width":d,"rpf-input--disabled":o}),disabled:o,readOnly:a,id:r,name:f,onChange:_,type:"text",value:s})});Le.propTypes={disabled:e.bool,readOnly:e.bool,error:e.string,fullWidth:e.bool,hint:e.oneOfType([e.string,e.object]),label:e.oneOfType([e.string,e.object]).isRequired,id:e.string.isRequired,name:e.string.isRequired,onChange:e.func,value:e.string.isRequired};const ze=({id:r,label:l,name:f,value:s,disabled:o=!1,error:a="",fullWidth:p=!1,hint:d="",onChange:g=()=>{}})=>t.jsx(V,{id:r,disabled:o,error:a,hint:d,label:l,children:t.jsx("input",{className:k("rpf-input rpf-input-text",{"rpf-input--error":a,"rpf-input--full-width":p}),disabled:o,id:r,name:f,onChange:g,type:"text",value:s})});ze.propTypes={disabled:e.bool,error:e.string,fullWidth:e.bool,hint:e.oneOfType([e.string,e.object]),label:e.oneOfType([e.string,e.object]).isRequired,id:e.string.isRequired,name:e.string.isRequired,onChange:e.func,value:e.string.isRequired},A.Accordion=Ne,A.Alert=Ae,A.Button=X,A.CheckboxInput=qe,A.Fieldset=Ie,A.InputField=V,A.InputLabel=je,A.ProgressBar=$e,A.RadioInput=Re,A.SearchInput=ke,A.SelectInput=Me,A.Table=Ye,A.TableBodyCell=Fe,A.TableHeaderCell=De,A.Tag=We,A.TextInput=ze,A.TextareaInput=Le,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
23
|
+
*/var re,we;function Be(){if(we)return re;we=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function o(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var f={},l=0;l<10;l++)f["_"+String.fromCharCode(l)]=l;var y=Object.getOwnPropertyNames(f).map(function(h){return f[h]});if(y.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(h){b[h]=h}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=o()?Object.assign:function(r,f){for(var l,y=a(r),b,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var g in l)n.call(l,g)&&(y[g]=l[g]);if(e){b=e(l);for(var j=0;j<b.length;j++)i.call(l,b[j])&&(y[b[j]]=l[b[j]])}}return y},re}var te,Se;function ne(){if(Se)return te;Se=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return te=e,te}var ae,Ce;function Oe(){return Ce||(Ce=1,ae=Function.call.bind(Object.prototype.hasOwnProperty)),ae}var oe,Pe;function Ve(){if(Pe)return oe;Pe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=ne(),i={},a=Oe();e=function(r){var f="Warning: "+r;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}}}function o(r,f,l,y,b){if(process.env.NODE_ENV!=="production"){for(var h in r)if(a(r,h)){var g;try{if(typeof r[h]!="function"){var j=Error((y||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw j.name="Invariant Violation",j}g=r[h](f,h,y,l,null,n)}catch(M){g=M}if(g&&!(g instanceof Error)&&e((y||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in i)){i[g.message]=!0;var I=b?b():"";e("Failed "+l+" type: "+g.message+(I??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},oe=o,oe}var se,xe;function He(){if(xe)return se;xe=1;var e=Ee(),n=Be(),i=ne(),a=Oe(),o=Ve(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(l){var y="Warning: "+l;typeof console<"u"&&console.error(y);try{throw new Error(y)}catch{}});function f(){return null}return se=function(l,y){var b=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function g(s){var p=s&&(b&&s[b]||s[h]);if(typeof p=="function")return p}var j="<<anonymous>>",I={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:z(),arrayOf:k,element:q(),elementType:u(),instanceOf:W,node:de(),objectOf:fe,oneOf:le,oneOfType:ue,shape:pe,exact:ye};function M(s,p){return s===p?s!==0||1/s===1/p:s!==s&&p!==p}function N(s,p){this.message=s,this.data=p&&typeof p=="object"?p:{},this.stack=""}N.prototype=Error.prototype;function $(s){if(process.env.NODE_ENV!=="production")var p={},E=0;function _(w,m,T,S,x,C,Y){if(S=S||j,C=C||T,Y!==i){if(y){var d=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 d.name="Invariant Violation",d}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var U=S+":"+T;!p[U]&&E<3&&(r("You are manually calling a React.PropTypes validation function for the `"+C+"` prop on `"+S+"`. 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."),p[U]=!0,E++)}}return m[T]==null?w?m[T]===null?new N("The "+x+" `"+C+"` is marked as required "+("in `"+S+"`, but its value is `null`.")):new N("The "+x+" `"+C+"` is marked as required in "+("`"+S+"`, but its value is `undefined`.")):null:s(m,T,S,x,C)}var v=_.bind(null,!1);return v.isRequired=_.bind(null,!0),v}function D(s){function p(E,_,v,w,m,T){var S=E[_],x=R(S);if(x!==s){var C=V(S);return new N("Invalid "+w+" `"+m+"` of type "+("`"+C+"` supplied to `"+v+"`, expected ")+("`"+s+"`."),{expectedType:s})}return null}return $(p)}function z(){return $(f)}function k(s){function p(E,_,v,w,m){if(typeof s!="function")return new N("Property `"+m+"` of component `"+v+"` has invalid PropType notation inside arrayOf.");var T=E[_];if(!Array.isArray(T)){var S=R(T);return new N("Invalid "+w+" `"+m+"` of type "+("`"+S+"` supplied to `"+v+"`, expected an array."))}for(var x=0;x<T.length;x++){var C=s(T,x,v,w,m+"["+x+"]",i);if(C instanceof Error)return C}return null}return $(p)}function q(){function s(p,E,_,v,w){var m=p[E];if(!l(m)){var T=R(m);return new N("Invalid "+v+" `"+w+"` of type "+("`"+T+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return $(s)}function u(){function s(p,E,_,v,w){var m=p[E];if(!e.isValidElementType(m)){var T=R(m);return new N("Invalid "+v+" `"+w+"` of type "+("`"+T+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return $(s)}function W(s){function p(E,_,v,w,m){if(!(E[_]instanceof s)){var T=s.name||j,S=ve(E[_]);return new N("Invalid "+w+" `"+m+"` of type "+("`"+S+"` supplied to `"+v+"`, expected ")+("instance of `"+T+"`."))}return null}return $(p)}function le(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("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])."):r("Invalid argument supplied to oneOf, expected an array.")),f;function p(E,_,v,w,m){for(var T=E[_],S=0;S<s.length;S++)if(M(T,s[S]))return null;var x=JSON.stringify(s,function(Y,d){var U=V(d);return U==="symbol"?String(d):d});return new N("Invalid "+w+" `"+m+"` of value `"+String(T)+"` "+("supplied to `"+v+"`, expected one of "+x+"."))}return $(p)}function fe(s){function p(E,_,v,w,m){if(typeof s!="function")return new N("Property `"+m+"` of component `"+v+"` has invalid PropType notation inside objectOf.");var T=E[_],S=R(T);if(S!=="object")return new N("Invalid "+w+" `"+m+"` of type "+("`"+S+"` supplied to `"+v+"`, expected an object."));for(var x in T)if(a(T,x)){var C=s(T,x,v,w,m+"."+x,i);if(C instanceof Error)return C}return null}return $(p)}function ue(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),f;for(var p=0;p<s.length;p++){var E=s[p];if(typeof E!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(E)+" at index "+p+"."),f}function _(v,w,m,T,S){for(var x=[],C=0;C<s.length;C++){var Y=s[C],d=Y(v,w,m,T,S,i);if(d==null)return null;d.data&&a(d.data,"expectedType")&&x.push(d.data.expectedType)}var U=x.length>0?", expected one of type ["+x.join(", ")+"]":"";return new N("Invalid "+T+" `"+S+"` supplied to "+("`"+m+"`"+U+"."))}return $(_)}function de(){function s(p,E,_,v,w){return H(p[E])?null:new N("Invalid "+v+" `"+w+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return $(s)}function X(s,p,E,_,v){return new N((s||"React class")+": "+p+" type `"+E+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+v+"`.")}function pe(s){function p(E,_,v,w,m){var T=E[_],S=R(T);if(S!=="object")return new N("Invalid "+w+" `"+m+"` of type `"+S+"` "+("supplied to `"+v+"`, expected `object`."));for(var x in s){var C=s[x];if(typeof C!="function")return X(v,w,m,x,V(C));var Y=C(T,x,v,w,m+"."+x,i);if(Y)return Y}return null}return $(p)}function ye(s){function p(E,_,v,w,m){var T=E[_],S=R(T);if(S!=="object")return new N("Invalid "+w+" `"+m+"` of type `"+S+"` "+("supplied to `"+v+"`, expected `object`."));var x=n({},E[_],s);for(var C in x){var Y=s[C];if(a(s,C)&&typeof Y!="function")return X(v,w,m,C,V(Y));if(!Y)return new N("Invalid "+w+" `"+m+"` key `"+C+"` supplied to `"+v+"`.\nBad object: "+JSON.stringify(E[_],null," ")+`
|
|
24
|
+
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var d=Y(T,C,v,w,m+"."+C,i);if(d)return d}return null}return $(p)}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||l(s))return!0;var p=g(s);if(p){var E=p.call(s),_;if(p!==s.entries){for(;!(_=E.next()).done;)if(!H(_.value))return!1}else for(;!(_=E.next()).done;){var v=_.value;if(v&&!H(v[1]))return!1}}else return!1;return!0;default:return!1}}function he(s,p){return s==="symbol"?!0:p?p["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&p instanceof Symbol:!1}function R(s){var p=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":he(p,s)?"symbol":p}function V(s){if(typeof s>"u"||s===null)return""+s;var p=R(s);if(p==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return p}function G(s){var p=V(s);switch(p){case"array":case"object":return"an "+p;case"boolean":case"date":case"regexp":return"a "+p;default:return p}}function ve(s){return!s.constructor||!s.constructor.name?j:s.constructor.name}return I.checkPropTypes=o,I.resetWarningCache=o.resetWarningCache,I.PropTypes=I,I},se}var ie,Ne;function Je(){if(Ne)return ie;Ne=1;var e=ne();function n(){}function i(){}return i.resetWarningCache=n,ie=function(){function a(f,l,y,b,h,g){if(g!==e){var j=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 j.name="Invariant Violation",j}}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:i,resetWarningCache:n};return r.PropTypes=r,r},ie}var Ae;function Ze(){if(Ae)return Z.exports;if(Ae=1,process.env.NODE_ENV!=="production"){var e=Ee(),n=!0;Z.exports=He()(e.isElement,n)}else Z.exports=Je()();return Z.exports}var Ke=Ze();const c=be(Ke),je=({content:e,title:n,className:i,id:a="accordion"})=>{const o=L("rpf-accordion",i);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})]})};je.propTypes={content:c.string.isRequired,title:c.string.isRequired,id:c.string,className:c.string};const B=({text:e,href:n,title:i,className:a,type:o="primary",variant:r="",size:f="default",icon:l="",iconOnly:y=!1,iconPosition:b="left",fullWidth:h=!1,disabled:g=!1,onClick:j=()=>{},"aria-label":I="",linkComponent:M})=>{const N=l&&y,$=L("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":r==="danger","rpf-button--sm":f==="small","rpf-button--icon-only":N,"rpf-button--full-width":h,disabled:g},a);let D="rpf-button__icon";F.isValidElement(l)?(D+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):D+=" material-symbols-sharp";const z=(u,W)=>!W||b!==u?null:typeof W=="string"?t.jsx("span",{className:D,children:W}):W,k=()=>e&&!N&&t.jsx("span",{className:"text",children:e}),q=t.jsxs(t.Fragment,{children:[z("left",l),k(),z("right",l)]});if(n){const u=M||"a",W=M?{to:n}:{href:n,role:"button"};return t.jsx(u,{className:$,...W,onClick:j,"aria-label":I,children:q})}return t.jsx("button",{className:$,title:i,onClick:j,disabled:g,"aria-label":I,children:q})},Xe=({title:e,text:n,titleChildren:i,children:a,type:o,actions:r,onClose:f})=>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"}),i?t.jsx("div",{className:"rpf-alert__title",children:i}):e?t.jsx("p",{className:"rpf-alert__title",children:e}):null,!!f&&t.jsx("div",{className:"rpf-alert__close",children:t.jsx(B,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:f})})]}),(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((l,y)=>t.jsx(B,{text:l.label,size:"small",type:"tertiary",href:l.href,onClick:l.onClick},y))})]})]}),Ge=({id:e,label:n,name:i,checked:a=!1,disabled:o=!1,error:r="",onChange:f=()=>{},value:l="",className:y=""})=>t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:L("rpf-input-checkbox",{"rpf-input-checkbox--error":r,className:y}),children:[t.jsx("input",{checked:!!a,disabled:o,id:e,name:i,onChange:f,type:"checkbox",value:l}),n]}),r&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),r]})]}),Ie=({disabled:e=!1,errorText:n="",fullWidth:i=!1,legendText:a,legendHintText:o="",children:r})=>t.jsxs("fieldset",{className:L("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":i,"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]});Ie.propTypes={disabled:c.bool,errorText:c.string,fullWidth:c.bool,legendText:c.string.isRequired,legendHintText:c.string,children:c.node};const J=({id:e,label:n,children:i,disabled:a=!1,error:o="",hint:r=""})=>t.jsxs("div",{className:"rpf-input-field",children:[(n||r)&&t.jsxs("label",{htmlFor:e,className:L("rpf-label",{"rpf-label--disabled":a}),children:[n,t.jsx("small",{className:"rpf-label__hint",children:r})]}),i,o&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]});J.propTypes={disabled:c.bool,error:c.string,hint:c.oneOfType([c.string,c.object]),label:c.oneOfType([c.string,c.object]).isRequired,id:c.string.isRequired,children:c.node};const qe=({label:e,inputFieldId:n,disabled:i=!1,hint:a=""})=>t.jsx("div",{className:"rpf-label",children:t.jsxs("label",{htmlFor:n,className:L("rpf-label",{"rpf-label--disabled":i}),children:[e,a&&t.jsx("div",{className:"rpf-label__hint",children:a})]})});qe.propTypes={disabled:c.bool,hint:c.oneOfType([c.string,c.object]),label:c.oneOfType([c.string,c.object]).isRequired,inputFieldId:c.string.isRequired};const $e=({id:e,label:n,name:i,checked:a=!1,disabled:o=!1,fullWidth:r=!1,onChange:f=()=>{},value:l=""})=>t.jsx(t.Fragment,{children:t.jsxs("label",{className:L("rpf-input-radio",{"rpf-input-radio--disabled":o,"rpf-input--full-width":r}),children:[t.jsx("input",{checked:!!a,disabled:o,id:e,name:i,onChange:f,type:"radio",value:l}),n]})});$e.propTypes={checked:c.bool,disabled:c.bool,fullWidth:c.bool,id:c.string.isRequired,label:c.oneOfType([c.string,c.object]).isRequired,name:c.string.isRequired,onChange:c.func,value:c.string};const Qe=({label:e,inputFieldId:n,disabled:i=!1,error:a="",hint:o="",placeholder:r="",defaultValue:f="",onClick:l=()=>{},onChange:y=()=>{}})=>t.jsx("search",{children:t.jsxs("form",{className:"rpf-input-field",onSubmit:l,children:[t.jsxs("label",{htmlFor:n,className:L("rpf-label",{"rpf-label--disabled":i}),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:L("rpf-input rpf-input-search",{"rpf-input--disabled":i,"rpf-input--error":a}),disabled:i,id:n,name:"search",type:"search","aria-label":"Search",defaultValue:f,placeholder:r,onChange:y}),t.jsx("button",{type:"submit",className:L("rpf-button rpf-button-search",{"rpf-button--disabled":i,"rpf-button--error":a}),disabled:i,onClick:l,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]})]})}),ke=({id:e,label:n,name:i,options:a,disabled:o=!1,error:r="",fullWidth:f=!1,hint:l="",onChange:y=()=>{},placeholder:b="",value:h=""})=>t.jsx(J,{id:e,disabled:o,error:r,hint:l,label:n,children:t.jsxs("select",{className:L("rpf-input rpf-input-select",{"rpf-input--error":r,"rpf-input--full-width":f}),disabled:o,id:e,name:i,onChange:y,type:"text",value:h,children:[!h&&!!b&&t.jsx("option",{value:"",disabled:!0,children:b}),a.map(g=>t.jsx("option",{value:g.key,children:g.value},g.key))]})});ke.propTypes={disabled:c.bool,error:c.string,fullWidth:c.bool,hint:c.oneOfType([c.string,c.object]),label:c.oneOfType([c.string,c.object]).isRequired,id:c.string.isRequired,name:c.string.isRequired,onChange:c.func,options:c.array.isRequired,placeholder:c.string,value:c.string};const Me=({id:e,label:n,name:i,value:a,disabled:o=!1,readOnly:r=!1,error:f="",fullWidth:l=!1,hint:y="",onChange:b=()=>{}})=>t.jsx(J,{id:e,disabled:o,error:f,hint:y,label:n,children:t.jsx("textarea",{className:L("rpf-input rpf-input-textarea",{"rpf-input--error":f,"rpf-input--full-width":l,"rpf-input--disabled":o}),disabled:o,readOnly:r,id:e,name:i,onChange:b,type:"text",value:a})});Me.propTypes={disabled:c.bool,readOnly:c.bool,error:c.string,fullWidth:c.bool,hint:c.oneOfType([c.string,c.object]),label:c.oneOfType([c.string,c.object]).isRequired,id:c.string.isRequired,name:c.string.isRequired,onChange:c.func,value:c.string.isRequired};const Le=({id:e,label:n,name:i,value:a,disabled:o=!1,error:r="",fullWidth:f=!1,hint:l="",onChange:y=()=>{}})=>t.jsx(J,{id:e,disabled:o,error:r,hint:l,label:n,children:t.jsx("input",{className:L("rpf-input rpf-input-text",{"rpf-input--error":r,"rpf-input--full-width":f}),disabled:o,id:e,name:i,onChange:y,type:"text",value:a})});Le.propTypes={disabled:c.bool,error:c.string,fullWidth:c.bool,hint:c.oneOfType([c.string,c.object]),label:c.oneOfType([c.string,c.object]).isRequired,id:c.string.isRequired,name:c.string.isRequired,onChange:c.func,value:c.string.isRequired};function er(e,n){const i=F.useRef(null),a=F.useRef(null);return F.useEffect(()=>{const o=i.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),F.useEffect(()=>{const o=i.current;if(!o)return;const r=()=>n(!1),f=l=>{l.preventDefault(),n(!1)};return o.addEventListener("close",r),o.addEventListener("cancel",f),()=>{o.removeEventListener("close",r),o.removeEventListener("cancel",f)}},[n]),F.useEffect(()=>{const o=i.current,r=a.current;if(!o||!r)return;const f=l=>{e&&!r.contains(l.target)&&n(!1)};return o.addEventListener("mousedown",f),()=>o.removeEventListener("mousedown",f)},[e,n]),{dialogRef:i,contentRef:a}}const rr=({isOpen:e,setIsOpen:n,heading:i,children:a,primaryButtonLink:o,primaryButtonText:r,onClickPrimaryButton:f,secondaryButtonText:l,secondaryButtonLink:y,onClickSecondaryButton:b,tertiaryButtonText:h,tertiaryButtonLink:g,onClickTertiaryButton:j,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:i}),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:f,type:"primary"}),l&&t.jsx(B,{text:l,href:y,onClick:b,type:"secondary"}),h&&t.jsx(B,{text:h,href:g,onClick:j,type:"tertiary"})]})]})})},tr=({text:e="",percent:n,complete:i=!1,className:a})=>t.jsx("div",{className:L("rpf-progress-bar",{"rpf-progress-bar--complete":i,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})});/**
|
|
25
|
+
* @license lucide-react v0.553.0 - ISC
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the ISC license.
|
|
28
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/const ar=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),or=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,a)=>a?a.toUpperCase():i.toLowerCase()),De=e=>{const n=or(e);return n.charAt(0).toUpperCase()+n.slice(1)},We=(...e)=>e.filter((n,i,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===i).join(" ").trim(),sr=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
30
|
+
* @license lucide-react v0.553.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var ir={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
|
+
* @license lucide-react v0.553.0 - ISC
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the ISC license.
|
|
38
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/const cr=F.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:r,iconNode:f,...l},y)=>F.createElement("svg",{ref:y,...ir,width:n,height:n,stroke:e,strokeWidth:a?Number(i)*24/Number(n):i,className:We("lucide",o),...!r&&!sr(l)&&{"aria-hidden":"true"},...l},[...f.map(([b,h])=>F.createElement(b,h)),...Array.isArray(r)?r:[r]]));/**
|
|
40
|
+
* @license lucide-react v0.553.0 - ISC
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the ISC license.
|
|
43
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/const ce=(e,n)=>{const i=F.forwardRef(({className:a,...o},r)=>F.createElement(cr,{ref:r,iconNode:n,className:We(`lucide-${ar(De(e))}`,`lucide-${e}`,a),...o}));return i.displayName=De(e),i};/**
|
|
45
|
+
* @license lucide-react v0.553.0 - ISC
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the ISC license.
|
|
48
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/const lr=ce("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
|
+
* @license lucide-react v0.553.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const fr=ce("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
|
+
* @license lucide-react v0.553.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const ur=ce("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"}]]),dr=(e,n)=>{if(e)return n==="up"?"ascending":n==="down"?"descending":"none"},pr=({sortDirection:e,children:n,onClick:i})=>{const a=!!i,o=e==="up"?ur:e==="down"?fr:lr,r=dr(a,e),f=a?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return t.jsx("th",{className:`rpf-table-cell ${f}`,"aria-sort":r,children:t.jsx("div",{className:"rpf-table-cell__content",children:a?t.jsxs("button",{className:"rpf-table-cell__sort-header",onClick:i,children:[n,t.jsx(o,{size:20})]}):t.jsx(t.Fragment,{children:n})})})},yr=({headerRow:e,bodyRows:n,fullWidth:i})=>t.jsx("div",{"data-testid":"table-container",className:L("rpf-table",{"rpf-table--full-width":i}),children:t.jsxs("table",{className:L("rpf-table__table",{"rpf-table__table--full-width":i}),children:[t.jsx("thead",{children:t.jsx("tr",{className:"rpf-table-row",children:e})}),t.jsx("tbody",{children:n.map((a,o)=>t.jsx("tr",{className:"rpf-table-row",children:a},o))})]})}),hr=({text:e,variant:n,secondary:i,icon:a,iconPosition:o})=>{const r=a?t.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:a}):null;a&&!o&&(o="left");const f=n&&n!=="default"?`rpf-tag--${n}`:null;return t.jsxs("span",{className:L("rpf-tag",f,{"rpf-tag--secondary":i}),children:[o==="left"&&r,e,o==="right"&&r]})};A.Accordion=je,A.Alert=Xe,A.Button=B,A.CheckboxInput=Ge,A.Fieldset=Ie,A.InputField=J,A.InputLabel=qe,A.Modal=rr,A.ProgressBar=tr,A.RadioInput=$e,A.SearchInput=Qe,A.SelectInput=ke,A.Table=yr,A.TableBodyCell=nr,A.TableHeaderCell=pr,A.Tag=hr,A.TextInput=Le,A.TextareaInput=Me,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -10,8 +10,26 @@
|
|
|
10
10
|
|
|
11
11
|
:root,
|
|
12
12
|
:host {
|
|
13
|
-
--rpf-alert-
|
|
14
|
-
--rpf-alert-
|
|
13
|
+
--rpf-alert-body-font-size: var(--font-size-1);
|
|
14
|
+
--rpf-alert-body-line-height: var(--font-size-1-5);
|
|
15
|
+
--rpf-alert-title-font-size: var(--font-size-1);
|
|
16
|
+
--rpf-alert-title-line-height: var(--font-size-1-5);
|
|
17
|
+
|
|
18
|
+
--rpf-alert-information-background-color: var(--rpf-alert-information-highlight);
|
|
19
|
+
--rpf-alert-information-accent-color: var(--rpf-alert-information);
|
|
20
|
+
--rpf-alert-information-icon: 'info';
|
|
21
|
+
|
|
22
|
+
--rpf-alert-error-background-color: var(--rpf-alert-error-highlight);
|
|
23
|
+
--rpf-alert-error-accent-color: var(--rpf-alert-error);
|
|
24
|
+
--rpf-alert-error-icon: 'error_outline';
|
|
25
|
+
|
|
26
|
+
--rpf-alert-warning-background-color: var(--rpf-alert-warning-highlight);
|
|
27
|
+
--rpf-alert-warning-accent-color: var(--rpf-alert-warning);
|
|
28
|
+
--rpf-alert-warning-icon: 'warning_amber';
|
|
29
|
+
|
|
30
|
+
--rpf-alert-success-background-color: var(--rpf-alert-success-highlight);
|
|
31
|
+
--rpf-alert-success-accent-color: var(--rpf-alert-success);
|
|
32
|
+
--rpf-alert-success-icon: 'check_circle';
|
|
15
33
|
}
|
|
16
34
|
|
|
17
35
|
.rpf-alert {
|
|
@@ -46,12 +64,13 @@
|
|
|
46
64
|
}
|
|
47
65
|
|
|
48
66
|
&__body {
|
|
49
|
-
@include typography.style-1;
|
|
50
|
-
|
|
51
67
|
align-self: stretch;
|
|
52
68
|
display: flex;
|
|
53
69
|
flex-direction: column;
|
|
70
|
+
font-size: var(--rpf-alert-body-font-size);
|
|
71
|
+
font-weight: var(--font-weight-regular);
|
|
54
72
|
gap: var(--space-2);
|
|
73
|
+
line-height: var(--rpf-alert-body-line-height);
|
|
55
74
|
padding-block-end: var(--space-2);
|
|
56
75
|
padding-inline: var(--space-2);
|
|
57
76
|
text-align: start;
|
|
@@ -63,9 +82,10 @@
|
|
|
63
82
|
}
|
|
64
83
|
|
|
65
84
|
&__title {
|
|
66
|
-
|
|
67
|
-
|
|
85
|
+
font-size: var(--rpf-alert-title-font-size);
|
|
86
|
+
font-weight: var(--font-weight-bold);
|
|
68
87
|
inline-size: 100%;
|
|
88
|
+
line-height: var(--rpf-alert-title-line-height);
|
|
69
89
|
margin-block: var(--space-2);
|
|
70
90
|
margin-inline: 0;
|
|
71
91
|
text-align: start;
|
|
@@ -97,35 +117,38 @@
|
|
|
97
117
|
}
|
|
98
118
|
|
|
99
119
|
&--error {
|
|
100
|
-
--rpf-alert-background-color: var(--rpf-alert-error-
|
|
101
|
-
--rpf-alert-color: var(--rpf-alert-error);
|
|
120
|
+
--rpf-alert-background-color: var(--rpf-alert-error-background-color);
|
|
121
|
+
--rpf-alert-color: var(--rpf-alert-error-accent-color);
|
|
102
122
|
|
|
103
123
|
.rpf-alert__icon::after {
|
|
104
|
-
content:
|
|
124
|
+
content: var(--rpf-alert-error-icon);
|
|
105
125
|
}
|
|
106
126
|
}
|
|
107
127
|
|
|
108
128
|
&--information {
|
|
129
|
+
--rpf-alert-background-color: var(--rpf-alert-information-background-color);
|
|
130
|
+
--rpf-alert-color: var(--rpf-alert-information-accent-color);
|
|
131
|
+
|
|
109
132
|
.rpf-alert__icon::after {
|
|
110
|
-
content:
|
|
133
|
+
content: var(--rpf-alert-information-icon);
|
|
111
134
|
}
|
|
112
135
|
}
|
|
113
136
|
|
|
114
137
|
&--warning {
|
|
115
|
-
--rpf-alert-background-color: var(--rpf-alert-warning-
|
|
116
|
-
--rpf-alert-color: var(--rpf-alert-warning);
|
|
138
|
+
--rpf-alert-background-color: var(--rpf-alert-warning-background-color);
|
|
139
|
+
--rpf-alert-color: var(--rpf-alert-warning-accent-color);
|
|
117
140
|
|
|
118
141
|
.rpf-alert__icon::after {
|
|
119
|
-
content:
|
|
142
|
+
content: var(--rpf-alert-warning-icon);
|
|
120
143
|
}
|
|
121
144
|
}
|
|
122
145
|
|
|
123
146
|
&--success {
|
|
124
|
-
--rpf-alert-background-color: var(--rpf-alert-success-
|
|
125
|
-
--rpf-alert-color: var(--rpf-alert-success);
|
|
147
|
+
--rpf-alert-background-color: var(--rpf-alert-success-background-color);
|
|
148
|
+
--rpf-alert-color: var(--rpf-alert-success-accent-color);
|
|
126
149
|
|
|
127
150
|
.rpf-alert__icon::after {
|
|
128
|
-
content:
|
|
151
|
+
content: var(--rpf-alert-success-icon);
|
|
129
152
|
}
|
|
130
153
|
}
|
|
131
154
|
}
|
|
@@ -11,12 +11,6 @@
|
|
|
11
11
|
margin-block-end: var(--space-3);
|
|
12
12
|
max-inline-size: fit-content;
|
|
13
13
|
|
|
14
|
-
legend {
|
|
15
|
-
background-color: var(--rpf-input-background-color);
|
|
16
|
-
color: var(--rpf-input-color);
|
|
17
|
-
inline-size: 100%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
&--full-width,
|
|
21
15
|
&--full-width &__inputs * {
|
|
22
16
|
max-inline-size: none;
|
|
@@ -26,17 +20,19 @@
|
|
|
26
20
|
margin-block-end: 0;
|
|
27
21
|
}
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
//Adds error style to all checkbox and radio within fieldset
|
|
24
|
+
&--error {
|
|
25
|
+
.rpf-input-checkbox,
|
|
26
|
+
.rpf-input-radio {
|
|
27
|
+
--rpf-input-border-colour: var(--rpf-input-color-error);
|
|
28
|
+
|
|
29
|
+
input[type='checkbox']:checked {
|
|
30
|
+
background-color: var(--rpf-input-color-error);
|
|
31
|
+
}
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color: var(--rpf-input-color);
|
|
33
|
+
input[type='radio']:checked {
|
|
34
|
+
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="12" height="12" rx="6" fill="hsla(0, 88%, 33%, 1)"/></svg>');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
41
37
|
}
|
|
42
38
|
}
|
|
@@ -4,25 +4,24 @@
|
|
|
4
4
|
.rpf-input-checkbox {
|
|
5
5
|
--rpf-input-checkbox-hit-target: var(--min-target-size);
|
|
6
6
|
--rpf-input-checkbox-size: var(--space-3);
|
|
7
|
+
--rpf-input-border-colour: var(--rpf-grey-850);
|
|
7
8
|
|
|
8
9
|
align-items: center;
|
|
9
10
|
border-radius: var(--space-1);
|
|
10
11
|
box-sizing: border-box;
|
|
11
12
|
display: flex;
|
|
12
13
|
gap: var(--space-1-5);
|
|
13
|
-
margin-block-end: var(--space-1);
|
|
14
14
|
max-width: 50ch;
|
|
15
15
|
min-height: var(--rpf-input-checkbox-hit-target);
|
|
16
16
|
min-width: 240px;
|
|
17
17
|
padding-block: calc((var(--rpf-input-checkbox-hit-target) - var(--rpf-input-checkbox-size)) / 2);
|
|
18
|
-
padding-inline: var(--space-1);
|
|
19
18
|
width: 100%;
|
|
20
19
|
|
|
21
20
|
input[type='checkbox'] {
|
|
22
21
|
align-self: flex-start;
|
|
23
22
|
appearance: none;
|
|
24
23
|
background: var(--rpf-white);
|
|
25
|
-
border: var(--space-0-25) solid var(--rpf-
|
|
24
|
+
border: var(--space-0-25) solid var(--rpf-input-border-colour);
|
|
26
25
|
border-radius: var(--space-0-5);
|
|
27
26
|
flex-shrink: 0;
|
|
28
27
|
height: var(--rpf-input-checkbox-size);
|
|
@@ -35,7 +34,8 @@
|
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
&:disabled {
|
|
38
|
-
border-color: var(--rpf-
|
|
37
|
+
border-color: var(--rpf-input-background-color-disabled);
|
|
38
|
+
background-color: var(--rpf-input-background-color-disabled);
|
|
39
39
|
|
|
40
40
|
&:checked {
|
|
41
41
|
background-color: var(--rpf-grey-600);
|
|
@@ -43,20 +43,26 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
&--error {
|
|
47
|
+
input[type='checkbox'] {
|
|
48
|
+
border-color: var(--rpf-input-color-error);
|
|
49
|
+
}
|
|
50
|
+
input[type='checkbox']:checked {
|
|
51
|
+
background-color: var(--rpf-input-color-error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
46
55
|
&.rpf-input--full-width {
|
|
47
56
|
max-width: none;
|
|
48
57
|
}
|
|
49
58
|
|
|
50
|
-
&:has(> input[type='checkbox']:disabled),
|
|
51
|
-
|
|
52
|
-
color: var(--rpf-
|
|
59
|
+
&:has(> input[type='checkbox']:disabled),
|
|
60
|
+
&--disabled {
|
|
61
|
+
color: var(--rpf-label-text-color-disabled);
|
|
53
62
|
}
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
input[type='checkbox']:focus-visible {
|
|
56
65
|
outline: 3px solid var(--rpf-input-outline-color);
|
|
57
|
-
|
|
58
|
-
> input[type='checkbox']:focus-visible {
|
|
59
|
-
outline: none;
|
|
60
|
-
}
|
|
66
|
+
outline-offset: 0;
|
|
61
67
|
}
|
|
62
68
|
}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
@forward '../../properties/spacing';
|
|
5
5
|
@forward '../../properties/line-height';
|
|
6
6
|
|
|
7
|
-
:root,
|
|
7
|
+
:root,
|
|
8
|
+
:host {
|
|
8
9
|
--rpf-label-hint-color: var(--rpf-text-secondary);
|
|
9
10
|
--rpf-label-text-color: var(--rpf-text-primary);
|
|
10
11
|
--rpf-label-text-color-disabled: var(--rpf-grey-500);
|
|
@@ -4,25 +4,24 @@
|
|
|
4
4
|
.rpf-input-radio {
|
|
5
5
|
--rpf-input-radio-hit-target: var(--min-target-size);
|
|
6
6
|
--rpf-input-radio-size: var(--space-3);
|
|
7
|
+
--rpf-input-border-colour: var(--rpf-grey-850);
|
|
7
8
|
|
|
8
9
|
align-items: center;
|
|
9
10
|
border-radius: var(--space-1);
|
|
10
11
|
box-sizing: border-box;
|
|
11
12
|
display: flex;
|
|
12
13
|
gap: var(--space-1-5);
|
|
13
|
-
margin-block-end: var(--space-1);
|
|
14
14
|
max-width: 50ch;
|
|
15
15
|
min-height: var(--rpf-input-radio-hit-target);
|
|
16
16
|
min-width: 240px;
|
|
17
17
|
padding-block: calc((var(--rpf-input-radio-hit-target) - var(--rpf-input-radio-size)) / 2);
|
|
18
|
-
padding-inline: var(--space-1);
|
|
19
18
|
width: 100%;
|
|
20
19
|
|
|
21
20
|
input[type='radio'] {
|
|
22
21
|
align-self: flex-start;
|
|
23
22
|
appearance: none;
|
|
24
23
|
background: var(--rpf-white);
|
|
25
|
-
border: var(--space-0-25) solid var(--rpf-
|
|
24
|
+
border: var(--space-0-25) solid var(--rpf-input-border-colour);
|
|
26
25
|
border-radius: var(--rpf-input-radio-size);
|
|
27
26
|
flex-shrink: 0;
|
|
28
27
|
height: var(--rpf-input-radio-size);
|
|
@@ -36,7 +35,8 @@
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
&:disabled {
|
|
39
|
-
border-color: var(--rpf-
|
|
38
|
+
border-color: var(--rpf-input-background-color-disabled);
|
|
39
|
+
background-color: var(--rpf-input-background-color-disabled);
|
|
40
40
|
|
|
41
41
|
&:checked {
|
|
42
42
|
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="12" height="12" rx="6" fill="hsla(229, 8%, 61%, 1)"/></svg>');
|
|
@@ -44,20 +44,25 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
&--error {
|
|
48
|
+
input[type='radio'] {
|
|
49
|
+
border-color: var(--rpf-input-color-error);
|
|
50
|
+
}
|
|
51
|
+
input[type='radio']:checked {
|
|
52
|
+
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="12" height="12" rx="6" fill="hsla(0, 88%, 33%, 1)"/></svg>');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
47
55
|
&.rpf-input--full-width {
|
|
48
56
|
max-width: none;
|
|
49
57
|
}
|
|
50
58
|
|
|
51
|
-
&:has(> input[type='radio']:disabled),
|
|
52
|
-
|
|
53
|
-
color: var(--rpf-
|
|
59
|
+
&:has(> input[type='radio']:disabled),
|
|
60
|
+
&--disabled {
|
|
61
|
+
color: var(--rpf-label-text-color-disabled);
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
input[type='radio']:focus-visible {
|
|
57
65
|
outline: 3px solid var(--rpf-input-outline-color);
|
|
58
|
-
|
|
59
|
-
> input[type='radio']:focus-visible {
|
|
60
|
-
outline: none;
|
|
61
|
-
}
|
|
66
|
+
outline-offset: 0;
|
|
62
67
|
}
|
|
63
68
|
}
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
.rpf-button {
|
|
24
24
|
flex-shrink: 0;
|
|
25
|
-
border-radius:
|
|
25
|
+
border-end-end-radius: var(--border-radius);
|
|
26
|
+
border-end-start-radius: 0;
|
|
27
|
+
border-start-end-radius: var(--border-radius);
|
|
28
|
+
border-start-start-radius: 0;
|
|
26
29
|
box-sizing: border-box;
|
|
27
30
|
justify-content: center;
|
|
28
31
|
max-width: var(--space-6);
|
|
@@ -30,7 +33,10 @@
|
|
|
30
33
|
// Override default rpf-button border styles
|
|
31
34
|
&::before {
|
|
32
35
|
border: var(--input-border-width) solid var(--rpf-input-color);
|
|
33
|
-
border-radius:
|
|
36
|
+
border-end-end-radius: var(--border-radius);
|
|
37
|
+
border-end-start-radius: 0;
|
|
38
|
+
border-start-end-radius: var(--border-radius);
|
|
39
|
+
border-start-start-radius: 0;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
// Override default rpf-button disabled styles
|