@raspberrypifoundation/design-system-react 2.7.1 → 2.7.3
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 -3
- package/dist/design-system-react.js +676 -782
- package/dist/design-system-react.umd.cjs +9 -9
- package/dist/types/lib/main.d.ts +7 -0
- package/dist/types/lib/main.d.ts.map +1 -1
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts +1 -11
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts.map +1 -1
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts +1 -1
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/Fieldset/FieldSet.types.d.ts +16 -0
- package/dist/types/src/components/Form/Fieldset/FieldSet.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/Fieldset/Fieldset.spec.d.ts.map +1 -1
- package/dist/types/src/components/Form/Fieldset/index.d.ts +3 -19
- package/dist/types/src/components/Form/Fieldset/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/InputField/InputField.types.d.ts +16 -0
- package/dist/types/src/components/Form/InputField/InputField.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/InputField/index.d.ts +3 -19
- package/dist/types/src/components/Form/InputField/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/InputLabel/InputLabel.spec.d.ts.map +1 -1
- package/dist/types/src/components/Form/InputLabel/InputLabel.types.d.ts +11 -0
- package/dist/types/src/components/Form/InputLabel/InputLabel.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/InputLabel/index.d.ts +3 -15
- package/dist/types/src/components/Form/InputLabel/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/RadioInput/RadioInput.spec.d.ts.map +1 -1
- package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts +11 -0
- package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/RadioInput/index.d.ts +3 -23
- package/dist/types/src/components/Form/RadioInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts +1 -1
- package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts.map +1 -1
- package/dist/types/src/components/Form/SelectInput/SelectInput.spec.d.ts.map +1 -1
- package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts +24 -0
- package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/SelectInput/index.d.ts +4 -29
- package/dist/types/src/components/Form/SelectInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/TextInput/TextInput.spec.d.ts.map +1 -1
- package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts +15 -0
- package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextInput/index.d.ts +4 -25
- package/dist/types/src/components/Form/TextInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/TextareaInput/TextareaInput.spec.d.ts.map +1 -1
- package/dist/types/src/components/Form/TextareaInput/TextareaInput.types.d.ts +23 -0
- package/dist/types/src/components/Form/TextareaInput/TextareaInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/TextareaInput/index.d.ts +3 -27
- package/dist/types/src/components/Form/TextareaInput/index.d.ts.map +1 -1
- package/dist/types/src/stories/forms/Fieldset.stories.d.ts +17 -55
- package/dist/types/src/stories/forms/Fieldset.stories.d.ts.map +1 -1
- package/dist/types/src/stories/forms/InputLabel.stories.d.ts +13 -24
- package/dist/types/src/stories/forms/InputLabel.stories.d.ts.map +1 -1
- package/dist/types/src/stories/forms/RadioInput.stories.d.ts +31 -49
- package/dist/types/src/stories/forms/RadioInput.stories.d.ts.map +1 -1
- package/dist/types/src/stories/forms/SelectInput.stories.d.ts +25 -51
- package/dist/types/src/stories/forms/SelectInput.stories.d.ts.map +1 -1
- package/dist/types/src/stories/forms/TextInput.stories.d.ts +21 -36
- package/dist/types/src/stories/forms/TextInput.stories.d.ts.map +1 -1
- package/dist/types/src/stories/forms/TextareaInput.stories.d.ts +25 -51
- package/dist/types/src/stories/forms/TextareaInput.stories.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -2,31 +2,31 @@
|
|
|
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 me;function
|
|
5
|
+
*/var me;function ke(){return me||(me=1,function(e){(function(){var n={}.hasOwnProperty;function i(){for(var r="",u=0;u<arguments.length;u++){var c=arguments[u];c&&(r=o(r,a(c)))}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 u="";for(var c in r)n.call(r,c)&&r[c]&&(u=o(u,c));return u}function o(r,u){return u?r?r+" "+u:r+u:r}e.exports?(i.default=i,e.exports=i):window.classNames=i})()}(ee)),ee.exports}var qe=ke();const q=be(qe);var J={exports:{}},R={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 _e;function Le(){if(_e)return C;_e=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,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,N=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(l){if(typeof l=="object"&&l!==null){var D=l.$$typeof;switch(D){case n:switch(l=l.type,l){case h:case v:case a:case r:case o:case E:return l;default:switch(l=l&&l.$$typeof,l){case c:case p:case k:case I:case u:return l;default:return D}}case i:return D}}}function j(l){return M(l)===v}return C.AsyncMode=h,C.ConcurrentMode=v,C.ContextConsumer=c,C.ContextProvider=u,C.Element=n,C.ForwardRef=p,C.Fragment=a,C.Lazy=k,C.Memo=I,C.Portal=i,C.Profiler=r,C.StrictMode=o,C.Suspense=E,C.isAsyncMode=function(l){return j(l)||M(l)===h},C.isConcurrentMode=j,C.isContextConsumer=function(l){return M(l)===c},C.isContextProvider=function(l){return M(l)===u},C.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===n},C.isForwardRef=function(l){return M(l)===p},C.isFragment=function(l){return M(l)===a},C.isLazy=function(l){return M(l)===k},C.isMemo=function(l){return M(l)===I},C.isPortal=function(l){return M(l)===i},C.isProfiler=function(l){return M(l)===r},C.isStrictMode=function(l){return M(l)===o},C.isSuspense=function(l){return M(l)===E},C.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===a||l===v||l===r||l===o||l===E||l===N||typeof l=="object"&&l!==null&&(l.$$typeof===k||l.$$typeof===I||l.$$typeof===u||l.$$typeof===c||l.$$typeof===p||l.$$typeof===$||l.$$typeof===L||l.$$typeof===z||l.$$typeof===x)},C.typeOf=M,C}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 ge;function De(){return ge||(ge=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,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,N=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(f){return typeof f=="string"||typeof f=="function"||f===a||f===v||f===r||f===o||f===E||f===N||typeof f=="object"&&f!==null&&(f.$$typeof===k||f.$$typeof===I||f.$$typeof===u||f.$$typeof===c||f.$$typeof===p||f.$$typeof===$||f.$$typeof===L||f.$$typeof===z||f.$$typeof===x)}function j(f){if(typeof f=="object"&&f!==null){var U=f.$$typeof;switch(U){case n:var Q=f.type;switch(Q){case h:case v:case a:case r:case o:case E:return Q;default:var Me=Q&&Q.$$typeof;switch(Me){case c:case p:case k:case I:case u:return Me;default:return U}}case i:return U}}}var l=h,D=v,le=c,fe=u,ue=n,de=p,X=a,pe=k,ye=I,H=i,he=r,W=o,V=E,G=!1;function ve(f){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(f)||j(f)===h}function s(f){return j(f)===v}function d(f){return j(f)===c}function g(f){return j(f)===u}function m(f){return typeof f=="object"&&f!==null&&f.$$typeof===n}function y(f){return j(f)===p}function T(f){return j(f)===a}function b(f){return j(f)===k}function _(f){return j(f)===I}function w(f){return j(f)===i}function O(f){return j(f)===r}function S(f){return j(f)===o}function Y(f){return j(f)===E}P.AsyncMode=l,P.ConcurrentMode=D,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=W,P.Suspense=V,P.isAsyncMode=ve,P.isConcurrentMode=s,P.isContextConsumer=d,P.isContextProvider=g,P.isElement=m,P.isForwardRef=y,P.isFragment=T,P.isLazy=b,P.isMemo=_,P.isPortal=w,P.isProfiler=O,P.isStrictMode=S,P.isSuspense=Y,P.isValidElementType=M,P.typeOf=j}()),P}var Ee;function Te(){return Ee||(Ee=1,process.env.NODE_ENV==="production"?R.exports=Le():R.exports=De()),R.exports}/*
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/var re,we;function
|
|
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})});/**
|
|
23
|
+
*/var re,we;function Ye(){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 u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(u).map(function(p){return u[p]});if(h.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(p){v[p]=p}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=o()?Object.assign:function(r,u){for(var c,h=a(r),v,p=1;p<arguments.length;p++){c=Object(arguments[p]);for(var E in c)n.call(c,E)&&(h[E]=c[E]);if(e){v=e(c);for(var N=0;N<v.length;N++)i.call(c,v[N])&&(h[v[N]]=c[v[N]])}}return h},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 Pe(){return Ce||(Ce=1,ae=Function.call.bind(Object.prototype.hasOwnProperty)),ae}var oe,Oe;function Fe(){if(Oe)return oe;Oe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=ne(),i={},a=Pe();e=function(r){var u="Warning: "+r;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function o(r,u,c,h,v){if(process.env.NODE_ENV!=="production"){for(var p in r)if(a(r,p)){var E;try{if(typeof r[p]!="function"){var N=Error((h||"React class")+": "+c+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}E=r[p](u,p,h,c,null,n)}catch(k){E=k}if(E&&!(E instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+p+"` 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 i)){i[E.message]=!0;var I=v?v():"";e("Failed "+c+" type: "+E.message+(I??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},oe=o,oe}var se,Ne;function We(){if(Ne)return se;Ne=1;var e=Te(),n=Ye(),i=ne(),a=Pe(),o=Fe(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function u(){return null}return se=function(c,h){var v=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function E(s){var d=s&&(v&&s[v]||s[p]);if(typeof d=="function")return d}var N="<<anonymous>>",I={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:z(),arrayOf:M,element:j(),elementType:l(),instanceOf:D,node:de(),objectOf:fe,oneOf:le,oneOfType:ue,shape:pe,exact:ye};function k(s,d){return s===d?s!==0||1/s===1/d:s!==s&&d!==d}function x(s,d){this.message=s,this.data=d&&typeof d=="object"?d:{},this.stack=""}x.prototype=Error.prototype;function $(s){if(process.env.NODE_ENV!=="production")var d={},g=0;function m(T,b,_,w,O,S,Y){if(w=w||N,S=S||_,Y!==i){if(h){var f=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 f.name="Invariant Violation",f}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var U=w+":"+_;!d[U]&&g<3&&(r("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+w+"`. 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."),d[U]=!0,g++)}}return b[_]==null?T?b[_]===null?new x("The "+O+" `"+S+"` is marked as required "+("in `"+w+"`, but its value is `null`.")):new x("The "+O+" `"+S+"` is marked as required in "+("`"+w+"`, but its value is `undefined`.")):null:s(b,_,w,O,S)}var y=m.bind(null,!1);return y.isRequired=m.bind(null,!0),y}function L(s){function d(g,m,y,T,b,_){var w=g[m],O=W(w);if(O!==s){var S=V(w);return new x("Invalid "+T+" `"+b+"` of type "+("`"+S+"` supplied to `"+y+"`, expected ")+("`"+s+"`."),{expectedType:s})}return null}return $(d)}function z(){return $(u)}function M(s){function d(g,m,y,T,b){if(typeof s!="function")return new x("Property `"+b+"` of component `"+y+"` has invalid PropType notation inside arrayOf.");var _=g[m];if(!Array.isArray(_)){var w=W(_);return new x("Invalid "+T+" `"+b+"` of type "+("`"+w+"` supplied to `"+y+"`, expected an array."))}for(var O=0;O<_.length;O++){var S=s(_,O,y,T,b+"["+O+"]",i);if(S instanceof Error)return S}return null}return $(d)}function j(){function s(d,g,m,y,T){var b=d[g];if(!c(b)){var _=W(b);return new x("Invalid "+y+" `"+T+"` of type "+("`"+_+"` supplied to `"+m+"`, expected a single ReactElement."))}return null}return $(s)}function l(){function s(d,g,m,y,T){var b=d[g];if(!e.isValidElementType(b)){var _=W(b);return new x("Invalid "+y+" `"+T+"` of type "+("`"+_+"` supplied to `"+m+"`, expected a single ReactElement type."))}return null}return $(s)}function D(s){function d(g,m,y,T,b){if(!(g[m]instanceof s)){var _=s.name||N,w=ve(g[m]);return new x("Invalid "+T+" `"+b+"` of type "+("`"+w+"` supplied to `"+y+"`, expected ")+("instance of `"+_+"`."))}return null}return $(d)}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.")),u;function d(g,m,y,T,b){for(var _=g[m],w=0;w<s.length;w++)if(k(_,s[w]))return null;var O=JSON.stringify(s,function(Y,f){var U=V(f);return U==="symbol"?String(f):f});return new x("Invalid "+T+" `"+b+"` of value `"+String(_)+"` "+("supplied to `"+y+"`, expected one of "+O+"."))}return $(d)}function fe(s){function d(g,m,y,T,b){if(typeof s!="function")return new x("Property `"+b+"` of component `"+y+"` has invalid PropType notation inside objectOf.");var _=g[m],w=W(_);if(w!=="object")return new x("Invalid "+T+" `"+b+"` of type "+("`"+w+"` supplied to `"+y+"`, expected an object."));for(var O in _)if(a(_,O)){var S=s(_,O,y,T,b+"."+O,i);if(S instanceof Error)return S}return null}return $(d)}function ue(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var d=0;d<s.length;d++){var g=s[d];if(typeof g!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(g)+" at index "+d+"."),u}function m(y,T,b,_,w){for(var O=[],S=0;S<s.length;S++){var Y=s[S],f=Y(y,T,b,_,w,i);if(f==null)return null;f.data&&a(f.data,"expectedType")&&O.push(f.data.expectedType)}var U=O.length>0?", expected one of type ["+O.join(", ")+"]":"";return new x("Invalid "+_+" `"+w+"` supplied to "+("`"+b+"`"+U+"."))}return $(m)}function de(){function s(d,g,m,y,T){return H(d[g])?null:new x("Invalid "+y+" `"+T+"` supplied to "+("`"+m+"`, expected a ReactNode."))}return $(s)}function X(s,d,g,m,y){return new x((s||"React class")+": "+d+" type `"+g+"."+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+y+"`.")}function pe(s){function d(g,m,y,T,b){var _=g[m],w=W(_);if(w!=="object")return new x("Invalid "+T+" `"+b+"` of type `"+w+"` "+("supplied to `"+y+"`, expected `object`."));for(var O in s){var S=s[O];if(typeof S!="function")return X(y,T,b,O,V(S));var Y=S(_,O,y,T,b+"."+O,i);if(Y)return Y}return null}return $(d)}function ye(s){function d(g,m,y,T,b){var _=g[m],w=W(_);if(w!=="object")return new x("Invalid "+T+" `"+b+"` of type `"+w+"` "+("supplied to `"+y+"`, expected `object`."));var O=n({},g[m],s);for(var S in O){var Y=s[S];if(a(s,S)&&typeof Y!="function")return X(y,T,b,S,V(Y));if(!Y)return new x("Invalid "+T+" `"+b+"` key `"+S+"` supplied to `"+y+"`.\nBad object: "+JSON.stringify(g[m],null," ")+`
|
|
24
|
+
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var f=Y(_,S,y,T,b+"."+S,i);if(f)return f}return null}return $(d)}function H(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(H);if(s===null||c(s))return!0;var d=E(s);if(d){var g=d.call(s),m;if(d!==s.entries){for(;!(m=g.next()).done;)if(!H(m.value))return!1}else for(;!(m=g.next()).done;){var y=m.value;if(y&&!H(y[1]))return!1}}else return!1;return!0;default:return!1}}function he(s,d){return s==="symbol"?!0:d?d["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&d instanceof Symbol:!1}function W(s){var d=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":he(d,s)?"symbol":d}function V(s){if(typeof s>"u"||s===null)return""+s;var d=W(s);if(d==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return d}function G(s){var d=V(s);switch(d){case"array":case"object":return"an "+d;case"boolean":case"date":case"regexp":return"a "+d;default:return d}}function ve(s){return!s.constructor||!s.constructor.name?N:s.constructor.name}return I.checkPropTypes=o,I.resetWarningCache=o.resetWarningCache,I.PropTypes=I,I},se}var ie,xe;function Ue(){if(xe)return ie;xe=1;var e=ne();function n(){}function i(){}return i.resetWarningCache=n,ie=function(){function a(u,c,h,v,p,E){if(E!==e){var N=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 N.name="Invariant Violation",N}}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 J.exports;if(Ae=1,process.env.NODE_ENV!=="production"){var e=Te(),n=!0;J.exports=We()(e.isElement,n)}else J.exports=Ue()();return J.exports}var Be=ze();const Z=be(Be),Ie=({content:e,title:n,className:i,id:a="accordion"})=>{const o=q("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})]})};Ie.propTypes={content:Z.string.isRequired,title:Z.string.isRequired,id:Z.string,className:Z.string};const B=({text:e,href:n,title:i,className:a,type:o="primary",variant:r="",size:u="default",icon:c="",iconOnly:h=!1,iconPosition:v="left",fullWidth:p=!1,disabled:E=!1,onClick:N=()=>{},"aria-label":I="",linkComponent:k})=>{const x=c&&h,$=q("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":r==="danger","rpf-button--sm":u==="small","rpf-button--icon-only":x,"rpf-button--full-width":p,disabled:E},a);let L="rpf-button__icon";F.isValidElement(c)?(L+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):L+=" material-symbols-sharp";const z=(l,D)=>!D||v!==l?null:typeof D=="string"?t.jsx("span",{className:L,children:D}):D,M=()=>e&&!x&&t.jsx("span",{className:"text",children:e}),j=t.jsxs(t.Fragment,{children:[z("left",c),M(),z("right",c)]});if(n){const l=k||"a",D=k?{to:n}:{href:n,role:"button"};return t.jsx(l,{className:$,...D,onClick:N,"aria-label":I,children:j})}return t.jsx("button",{className:$,title:i,onClick:N,disabled:E,"aria-label":I,children:j})},Ve=({title:e,text:n,titleChildren:i,children:a,type:o,actions:r,onClose:u})=>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,!!u&&t.jsx("div",{className:"rpf-alert__close",children:t.jsx(B,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:u})})]}),(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((c,h)=>t.jsx(B,{text:c.label,size:"small",type:"tertiary",href:c.href,onClick:c.onClick},h))})]})]}),He=({label:e,id:n,name:i,error:a="",...o})=>{const{className:r,...u}=o;return t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:q("rpf-input-checkbox",{"rpf-input-checkbox--error":a,className:r}),children:[t.jsx("input",{id:n,name:i,type:"checkbox",...u}),e]}),a&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),a]})]})},Je=({disabled:e=!1,errorText:n="",fullWidth:i=!1,legendText:a,legendHintText:o="",children:r})=>t.jsxs("fieldset",{className:q("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]}),K=({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:q("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]})]}),Re=({label:e,inputFieldId:n,disabled:i=!1,hint:a=""})=>t.jsx("div",{className:"rpf-label",children:t.jsxs("label",{htmlFor:n,className:q("rpf-label",{"rpf-label--disabled":i}),children:[e,a&&t.jsx("div",{className:"rpf-label__hint",children:a})]})}),Ze=({label:e,id:n,name:i,fullWidth:a=!1,...o})=>t.jsxs("label",{className:q("rpf-input-radio",{"rpf-input-radio--disabled":o.disabled,"rpf-input--full-width":a}),children:[t.jsx("input",{type:"radio",id:n,name:i,...o}),e]}),Ke=({label:e,inputFieldId:n,disabled:i=!1,error:a="",hint:o="",placeholder:r="",defaultValue:u="",onClick:c=()=>{},onChange:h=()=>{}})=>t.jsx("search",{children:t.jsxs("form",{className:"rpf-input-field",onSubmit:c,children:[t.jsxs("label",{htmlFor:n,className:q("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:q("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:u,placeholder:r,onChange:h}),t.jsx("button",{type:"submit",className:q("rpf-button rpf-button-search",{"rpf-button--disabled":i,"rpf-button--error":a}),disabled:i,onClick:c,children:t.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),a&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),a]})]})}),Xe=({id:e,label:n,name:i,options:a,disabled:o=!1,error:r="",fullWidth:u=!1,hint:c="",onChange:h=()=>{},placeholder:v="",value:p="",...E})=>t.jsx(K,{id:e,disabled:o,error:r,hint:c,label:n,children:t.jsxs("select",{className:q("rpf-input rpf-input-select",{"rpf-input--error":r,"rpf-input--full-width":u}),disabled:o,id:e,name:i,onChange:h,value:p,...E,children:[!p&&!!v&&t.jsx("option",{value:"",disabled:!0,children:v}),a.map(N=>t.jsx("option",{value:N.key,children:N.value},N.key))]})}),Ge=({id:e,label:n,name:i,value:a,disabled:o=!1,readOnly:r=!1,error:u="",fullWidth:c=!1,hint:h="",onChange:v=()=>{}})=>t.jsx(K,{id:e,disabled:o,error:u,hint:h,label:n,children:t.jsx("textarea",{className:q("rpf-input rpf-input-textarea",{"rpf-input--error":u,"rpf-input--full-width":c,"rpf-input--disabled":o}),disabled:o,readOnly:r,id:e,name:i,onChange:v,value:a})}),Qe=({id:e,name:n,label:i,error:a="",fullWidth:o=!1,hint:r="",type:u="text",...c})=>t.jsx(K,{id:e,disabled:c.disabled,error:a,hint:r,label:i,children:t.jsx("input",{className:q("rpf-input rpf-input-text",{"rpf-input--error":a,"rpf-input--full-width":o}),id:e,name:n,type:u,...c})});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),u=c=>{c.preventDefault(),n(!1)};return o.addEventListener("close",r),o.addEventListener("cancel",u),()=>{o.removeEventListener("close",r),o.removeEventListener("cancel",u)}},[n]),F.useEffect(()=>{const o=i.current,r=a.current;if(!o||!r)return;const u=c=>{e&&!r.contains(c.target)&&n(!1)};return o.addEventListener("mousedown",u),()=>o.removeEventListener("mousedown",u)},[e,n]),{dialogRef:i,contentRef:a}}const rr=({isOpen:e,setIsOpen:n,heading:i,children:a,primaryButtonLink:o,primaryButtonText:r,onClickPrimaryButton:u,secondaryButtonText:c,secondaryButtonLink:h,onClickSecondaryButton:v,tertiaryButtonText:p,tertiaryButtonLink:E,onClickTertiaryButton:N,showCloseButton:I=!0})=>{const{dialogRef:k,contentRef:x}=er(e,n);return t.jsx("dialog",{ref:k,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:t.jsxs("div",{ref:x,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:u,type:"primary"}),c&&t.jsx(B,{text:c,href:h,onClick:v,type:"secondary"}),p&&t.jsx(B,{text:p,href:E,onClick:N,type:"tertiary"})]})]})})},tr=({text:e="",percent:n,complete:i=!1,className:a})=>t.jsx("div",{className:q("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
25
|
* @license lucide-react v0.553.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
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()),
|
|
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()),je=e=>{const n=or(e);return n.charAt(0).toUpperCase()+n.slice(1)},$e=(...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
30
|
* @license lucide-react v0.553.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
@@ -36,12 +36,12 @@ Valid keys: `+JSON.stringify(Object.keys(s),null," "));var d=Y(T,C,v,w,m+"."+C,
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
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:
|
|
39
|
+
*/const cr=F.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:r,iconNode:u,...c},h)=>F.createElement("svg",{ref:h,...ir,width:n,height:n,stroke:e,strokeWidth:a?Number(i)*24/Number(n):i,className:$e("lucide",o),...!r&&!sr(c)&&{"aria-hidden":"true"},...c},[...u.map(([v,p])=>F.createElement(v,p)),...Array.isArray(r)?r:[r]]));/**
|
|
40
40
|
* @license lucide-react v0.553.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
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
|
|
44
|
+
*/const ce=(e,n)=>{const i=F.forwardRef(({className:a,...o},r)=>F.createElement(cr,{ref:r,iconNode:n,className:$e(`lucide-${ar(je(e))}`,`lucide-${e}`,a),...o}));return i.displayName=je(e),i};/**
|
|
45
45
|
* @license lucide-react v0.553.0 - ISC
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
@@ -56,4 +56,4 @@ Valid keys: `+JSON.stringify(Object.keys(s),null," "));var d=Y(T,C,v,w,m+"."+C,
|
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
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),
|
|
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),u=a?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return t.jsx("th",{className:`rpf-table-cell ${u}`,"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:q("rpf-table",{"rpf-table--full-width":i}),children:t.jsxs("table",{className:q("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 u=n&&n!=="default"?`rpf-tag--${n}`:null;return t.jsxs("span",{className:q("rpf-tag",u,{"rpf-tag--secondary":i}),children:[o==="left"&&r,e,o==="right"&&r]})};A.Accordion=Ie,A.Alert=Ve,A.Button=B,A.CheckboxInput=He,A.Fieldset=Je,A.InputField=K,A.InputLabel=Re,A.Modal=rr,A.ProgressBar=tr,A.RadioInput=Ze,A.SearchInput=Ke,A.SelectInput=Xe,A.Table=yr,A.TableBodyCell=nr,A.TableHeaderCell=pr,A.Tag=hr,A.TextInput=Qe,A.TextareaInput=Ge,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
package/dist/types/lib/main.d.ts
CHANGED
|
@@ -6,14 +6,21 @@ export type { ButtonProps } from "../src/components/Button/Button.types";
|
|
|
6
6
|
export { default as CheckboxInput } from "../src/components/Form/CheckboxInput";
|
|
7
7
|
export type { CheckboxInputProps } from "../src/components/Form/CheckboxInput/CheckboxInput.types";
|
|
8
8
|
export { default as Fieldset } from "../src/components/Form/Fieldset";
|
|
9
|
+
export type { FieldSetProps } from "../src/components/Form/Fieldset/FieldSet.types";
|
|
9
10
|
export { default as InputField } from "../src/components/Form/InputField";
|
|
11
|
+
export type { InputFieldProps } from "../src/components/Form/InputField/InputField.types";
|
|
10
12
|
export { default as InputLabel } from "../src/components/Form/InputLabel";
|
|
13
|
+
export type { InputLabelProps } from "../src/components/Form/InputLabel/InputLabel.types";
|
|
11
14
|
export { default as RadioInput } from "../src/components/Form/RadioInput";
|
|
15
|
+
export type { RadioInputProps } from "../src/components/Form/RadioInput/RadioInput.types";
|
|
12
16
|
export { default as SearchInput } from "../src/components/Form/SearchInput";
|
|
13
17
|
export type { SearchInputProps } from "../src/components/Form/SearchInput/SearchInput.types";
|
|
14
18
|
export { default as SelectInput } from "../src/components/Form/SelectInput";
|
|
19
|
+
export type { SelectInputProps } from "../src/components/Form/SelectInput/SelectInput.types";
|
|
15
20
|
export { default as TextareaInput } from "../src/components/Form/TextareaInput";
|
|
21
|
+
export type { TextareaInputProps } from "../src/components/Form/TextareaInput/TextareaInput.types";
|
|
16
22
|
export { default as TextInput } from "../src/components/Form/TextInput";
|
|
23
|
+
export type { TextInputProps } from "../src/components/Form/TextInput/TextInput.types";
|
|
17
24
|
export { default as Modal } from "../src/components/Modal";
|
|
18
25
|
export type { ModalProps } from "../src/components/Modal/Modal.types";
|
|
19
26
|
export { default as ProgressBar } from "../src/components/ProgressBar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../lib/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAChF,YAAY,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAChF,YAAY,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../lib/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAChF,YAAY,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAChF,YAAY,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAChF,YAAY,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -4,21 +4,11 @@ export type CheckboxInputProps = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
/** Name attribute for the checkbox input */
|
|
6
6
|
name: string;
|
|
7
|
-
/** Whether the checkbox is disabled */
|
|
8
|
-
disabled?: boolean;
|
|
9
7
|
/** Error message to display */
|
|
10
8
|
error?: string;
|
|
11
9
|
/** Label text or `ReactNode` for the checkbox */
|
|
12
10
|
label: string | ReactNode;
|
|
13
11
|
/** Whether the checkbox is checked (controlled) */
|
|
14
12
|
isChecked?: boolean;
|
|
15
|
-
|
|
16
|
-
value?: string;
|
|
17
|
-
/** Additional CSS class name */
|
|
18
|
-
className?: string;
|
|
19
|
-
/** Whether the checkbox is checked (uncontrolled) */
|
|
20
|
-
checked?: boolean;
|
|
21
|
-
/** Callback function when checkbox state changes */
|
|
22
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
-
};
|
|
13
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "id" | "name">;
|
|
24
14
|
//# sourceMappingURL=CheckboxInput.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/CheckboxInput/CheckboxInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb
|
|
1
|
+
{"version":3,"file":"CheckboxInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/CheckboxInput/CheckboxInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@/components/MaterialSymbols";
|
|
2
2
|
import "./CheckboxInput.scss";
|
|
3
3
|
import type { CheckboxInputProps } from "./CheckboxInput.types";
|
|
4
|
-
export declare const CheckboxInput: ({
|
|
4
|
+
export declare const CheckboxInput: ({ label, id, name, error, ...props }: CheckboxInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default CheckboxInput;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/CheckboxInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,aAAa,GAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/CheckboxInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,aAAa,GAAI,sCAM3B,kBAAkB,4CAwBpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type FieldSetProps = {
|
|
3
|
+
/** Whether the fieldset is disabled */
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/** Error message to display */
|
|
6
|
+
errorText?: string;
|
|
7
|
+
/** Whether the component should display at full width */
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
/** Non-optional title text to be displayed in the legend */
|
|
10
|
+
legendText: string;
|
|
11
|
+
/** Hint text to be displayed below the legend title */
|
|
12
|
+
legendHintText?: string;
|
|
13
|
+
/** The main content */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=FieldSet.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldSet.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Fieldset/FieldSet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Fieldset/Fieldset.spec.
|
|
1
|
+
{"version":3,"file":"Fieldset.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Fieldset/Fieldset.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
fullWidth?: boolean | undefined;
|
|
5
|
-
legendText: any;
|
|
6
|
-
legendHintText?: string | undefined;
|
|
7
|
-
children: any;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export namespace Fieldset {
|
|
10
|
-
namespace propTypes {
|
|
11
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
12
|
-
let errorText: PropTypes.Requireable<string>;
|
|
13
|
-
let fullWidth: PropTypes.Requireable<boolean>;
|
|
14
|
-
let legendText: PropTypes.Validator<string>;
|
|
15
|
-
let legendHintText: PropTypes.Requireable<string>;
|
|
16
|
-
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
import "./Fieldset.scss";
|
|
2
|
+
import type { FieldSetProps } from "./FieldSet.types";
|
|
3
|
+
export declare const Fieldset: ({ disabled, errorText, fullWidth, legendText, legendHintText, children, }: FieldSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
4
|
export default Fieldset;
|
|
20
|
-
import PropTypes from "prop-types";
|
|
21
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Fieldset/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Fieldset/index.tsx"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,QAAQ,GAAI,2EAOtB,aAAa,4CA4Bf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type InputFieldProps = {
|
|
3
|
+
/** Whether the input field is disabled */
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/** Error message to display */
|
|
6
|
+
error?: string;
|
|
7
|
+
/** Hint text to be displayed below the title */
|
|
8
|
+
hint?: string;
|
|
9
|
+
/** The label text for the input */
|
|
10
|
+
label: string;
|
|
11
|
+
/** The input field ID */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Any children of the component */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=InputField.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputField.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputField/InputField.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children: any;
|
|
5
|
-
disabled?: boolean | undefined;
|
|
6
|
-
error?: string | undefined;
|
|
7
|
-
hint?: string | undefined;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export namespace InputField {
|
|
10
|
-
namespace propTypes {
|
|
11
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
12
|
-
let error: PropTypes.Requireable<string>;
|
|
13
|
-
let hint: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
14
|
-
let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
|
|
15
|
-
let id: PropTypes.Validator<string>;
|
|
16
|
-
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
import "@/components/MaterialSymbols";
|
|
2
|
+
import type { InputFieldProps } from "./InputField.types";
|
|
3
|
+
export declare const InputField: ({ id, label, children, disabled, error, hint, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
4
|
export default InputField;
|
|
20
|
-
import PropTypes from "prop-types";
|
|
21
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputField/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputField/index.tsx"],"names":[],"mappings":"AAEA,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,UAAU,GAAI,iDAOxB,eAAe,4CAuBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputLabel.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputLabel/InputLabel.spec.
|
|
1
|
+
{"version":3,"file":"InputLabel.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputLabel/InputLabel.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type InputLabelProps = {
|
|
2
|
+
/** Whether the InputLabel should show as disabled */
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
/** Optional hint text to display below main label */
|
|
5
|
+
hint?: string;
|
|
6
|
+
/** Text for main label */
|
|
7
|
+
label: string;
|
|
8
|
+
/** ID for the input field */
|
|
9
|
+
inputFieldId: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=InputLabel.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputLabel.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputLabel/InputLabel.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
disabled?: boolean | undefined;
|
|
5
|
-
hint?: string | undefined;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export namespace InputLabel {
|
|
8
|
-
namespace propTypes {
|
|
9
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
10
|
-
let hint: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
11
|
-
let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
|
|
12
|
-
let inputFieldId: PropTypes.Validator<string>;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
import "./InputLabel.scss";
|
|
2
|
+
import type { InputLabelProps } from "./InputLabel.types";
|
|
3
|
+
export declare const InputLabel: ({ label, inputFieldId, disabled, hint, }: InputLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
4
|
export default InputLabel;
|
|
16
|
-
import PropTypes from "prop-types";
|
|
17
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputLabel/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/InputLabel/index.tsx"],"names":[],"mappings":"AAEA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,UAAU,GAAI,0CAKxB,eAAe,4CAYjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/RadioInput/RadioInput.spec.
|
|
1
|
+
{"version":3,"file":"RadioInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/RadioInput/RadioInput.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type RadioInputProps = {
|
|
2
|
+
/** Whether the radio input is full width */
|
|
3
|
+
fullWidth?: boolean;
|
|
4
|
+
/** The label text for the radio input */
|
|
5
|
+
label: string;
|
|
6
|
+
/** The radio input id */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Name attribute for the radio input */
|
|
9
|
+
name: string;
|
|
10
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "id" | "name">;
|
|
11
|
+
//# sourceMappingURL=RadioInput.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/RadioInput/RadioInput.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC"}
|
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
name: any;
|
|
5
|
-
checked?: boolean | undefined;
|
|
6
|
-
disabled?: boolean | undefined;
|
|
7
|
-
fullWidth?: boolean | undefined;
|
|
8
|
-
onChange?: (() => void) | undefined;
|
|
9
|
-
value?: string | undefined;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export namespace RadioInput {
|
|
12
|
-
namespace propTypes {
|
|
13
|
-
let checked: PropTypes.Requireable<boolean>;
|
|
14
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
15
|
-
let fullWidth: PropTypes.Requireable<boolean>;
|
|
16
|
-
let id: PropTypes.Validator<string>;
|
|
17
|
-
let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
|
|
18
|
-
let name: PropTypes.Validator<string>;
|
|
19
|
-
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
-
let value: PropTypes.Requireable<string>;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
import "./RadioInput.scss";
|
|
2
|
+
import type { RadioInputProps } from "./RadioInput.types";
|
|
3
|
+
export declare const RadioInput: ({ label, id, name, fullWidth, ...props }: RadioInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
4
|
export default RadioInput;
|
|
24
|
-
import PropTypes from "prop-types";
|
|
25
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/RadioInput/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/RadioInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,UAAU,GAAI,0CAMxB,eAAe,4CAUjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -14,7 +14,7 @@ export type SearchInputProps = {
|
|
|
14
14
|
/** The default input value */
|
|
15
15
|
defaultValue?: string;
|
|
16
16
|
/** Click handler */
|
|
17
|
-
onClick: () => void;
|
|
17
|
+
onClick: (event?: React.MouseEvent<HTMLButtonElement> | React.FormEvent<HTMLFormElement>) => void;
|
|
18
18
|
/** On change handler */
|
|
19
19
|
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SearchInput/SearchInput.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SearchInput/SearchInput.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,OAAO,EAAE,CACP,KAAK,CAAC,EACF,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GACnC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KACjC,IAAI,CAAC;IACV,wBAAwB;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SelectInput/SelectInput.spec.
|
|
1
|
+
{"version":3,"file":"SelectInput.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SelectInput/SelectInput.spec.tsx"],"names":[],"mappings":""}
|