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