@raspberrypifoundation/design-system-react 2.6.0 → 2.6.2
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 +13 -0
- package/README.md +21 -0
- package/dist/design-system-react.js +675 -739
- package/dist/design-system-react.umd.cjs +6 -6
- package/dist/types/lib/main.d.ts +6 -0
- package/dist/types/lib/main.d.ts.map +1 -1
- package/dist/types/src/components/Alert/Alert.types.d.ts +41 -0
- package/dist/types/src/components/Alert/Alert.types.d.ts.map +1 -0
- package/dist/types/src/components/Alert/index.d.ts +4 -25
- package/dist/types/src/components/Alert/index.d.ts.map +1 -1
- package/dist/types/src/components/Button/Button.types.d.ts +34 -0
- package/dist/types/src/components/Button/Button.types.d.ts.map +1 -0
- package/dist/types/src/components/Button/index.d.ts +4 -37
- package/dist/types/src/components/Button/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts +24 -0
- package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts +4 -25
- package/dist/types/src/components/Form/CheckboxInput/index.d.ts.map +1 -1
- package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts +21 -0
- package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts.map +1 -0
- package/dist/types/src/components/Form/SearchInput/index.d.ts +4 -25
- package/dist/types/src/components/Form/SearchInput/index.d.ts.map +1 -1
- package/dist/types/src/components/ProgressBar/ProgressBar.types.d.ts +11 -0
- package/dist/types/src/components/ProgressBar/ProgressBar.types.d.ts.map +1 -0
- package/dist/types/src/components/ProgressBar/index.d.ts +4 -15
- package/dist/types/src/components/ProgressBar/index.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.types.d.ts +13 -0
- package/dist/types/src/components/Tag/Tag.types.d.ts.map +1 -0
- package/dist/types/src/components/Tag/index.d.ts +3 -17
- package/dist/types/src/components/Tag/index.d.ts.map +1 -1
- package/dist/types/src/stories/Alert.stories.d.ts +40 -91
- package/dist/types/src/stories/Alert.stories.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
(function(A,
|
|
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,V){"use strict";function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var ve;function
|
|
5
|
+
*/var ve;function Le(){return ve||(ve=1,function(e){(function(){var i={}.hasOwnProperty;function l(){for(var r="",d=0;d<arguments.length;d++){var c=arguments[d];c&&(r=s(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return l.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var d="";for(var c in r)i.call(r,c)&&r[c]&&(d=s(d,c));return d}function s(r,d){return d?r?r+" "+d:r+d:r}e.exports?(l.default=l,e.exports=l):window.classNames=l})()}(ee)),ee.exports}var We=Le();const R=be(We);var X={exports:{}},G={exports:{}},P={};/** @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 me;function ze(){if(me)return P;me=1;var e=typeof Symbol=="function"&&Symbol.for,i=e?Symbol.for("react.element"):60103,l=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,_=e?Symbol.for("react.concurrent_mode"):60111,b=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,j=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(f){if(typeof f=="object"&&f!==null){var Y=f.$$typeof;switch(Y){case i:switch(f=f.type,f){case h:case _:case o:case r:case s:case m:return f;default:switch(f=f&&f.$$typeof,f){case c:case b:case k:case I:case d:return f;default:return Y}}case l:return Y}}}function q(f){return M(f)===_}return P.AsyncMode=h,P.ConcurrentMode=_,P.ContextConsumer=c,P.ContextProvider=d,P.Element=i,P.ForwardRef=b,P.Fragment=o,P.Lazy=k,P.Memo=I,P.Portal=l,P.Profiler=r,P.StrictMode=s,P.Suspense=m,P.isAsyncMode=function(f){return q(f)||M(f)===h},P.isConcurrentMode=q,P.isContextConsumer=function(f){return M(f)===c},P.isContextProvider=function(f){return M(f)===d},P.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===i},P.isForwardRef=function(f){return M(f)===b},P.isFragment=function(f){return M(f)===o},P.isLazy=function(f){return M(f)===k},P.isMemo=function(f){return M(f)===I},P.isPortal=function(f){return M(f)===l},P.isProfiler=function(f){return M(f)===r},P.isStrictMode=function(f){return M(f)===s},P.isSuspense=function(f){return M(f)===m},P.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===o||f===_||f===r||f===s||f===m||f===j||typeof f=="object"&&f!==null&&(f.$$typeof===k||f.$$typeof===I||f.$$typeof===d||f.$$typeof===c||f.$$typeof===b||f.$$typeof===$||f.$$typeof===D||f.$$typeof===z||f.$$typeof===N)},P.typeOf=M,P}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
|
|
19
|
+
*/var ge;function Ue(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,i=e?Symbol.for("react.element"):60103,l=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,_=e?Symbol.for("react.concurrent_mode"):60111,b=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,j=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(u){return typeof u=="string"||typeof u=="function"||u===o||u===_||u===r||u===s||u===m||u===j||typeof u=="object"&&u!==null&&(u.$$typeof===k||u.$$typeof===I||u.$$typeof===d||u.$$typeof===c||u.$$typeof===b||u.$$typeof===$||u.$$typeof===D||u.$$typeof===z||u.$$typeof===N)}function q(u){if(typeof u=="object"&&u!==null){var W=u.$$typeof;switch(W){case i:var Q=u.type;switch(Q){case h:case _:case o:case r:case s:case m:return Q;default:var Fe=Q&&Q.$$typeof;switch(Fe){case c:case b:case k:case I:case d:return Fe;default:return W}}case l:return W}}}var f=h,Y=_,le=c,ce=d,fe=i,ue=b,K=o,de=k,pe=I,H=l,ye=r,L=s,B=m,Z=!1;function he(u){return Z||(Z=!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.")),a(u)||q(u)===h}function a(u){return q(u)===_}function p(u){return q(u)===c}function E(u){return q(u)===d}function g(u){return typeof u=="object"&&u!==null&&u.$$typeof===i}function y(u){return q(u)===b}function S(u){return q(u)===o}function v(u){return q(u)===k}function T(u){return q(u)===I}function O(u){return q(u)===l}function x(u){return q(u)===r}function C(u){return q(u)===s}function F(u){return q(u)===m}w.AsyncMode=f,w.ConcurrentMode=Y,w.ContextConsumer=le,w.ContextProvider=ce,w.Element=fe,w.ForwardRef=ue,w.Fragment=K,w.Lazy=de,w.Memo=pe,w.Portal=H,w.Profiler=ye,w.StrictMode=L,w.Suspense=B,w.isAsyncMode=he,w.isConcurrentMode=a,w.isContextConsumer=p,w.isContextProvider=E,w.isElement=g,w.isForwardRef=y,w.isFragment=S,w.isLazy=v,w.isMemo=T,w.isPortal=O,w.isProfiler=x,w.isStrictMode=C,w.isSuspense=F,w.isValidElementType=M,w.typeOf=q}()),w}var Te;function _e(){return Te||(Te=1,process.env.NODE_ENV==="production"?G.exports=ze():G.exports=Ue()),G.exports}/*
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/var re,Ee;function
|
|
24
|
-
Valid keys: `+JSON.stringify(Object.keys(a),null," "));var u=F(_,C,y,O,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),T;if(p!==a.entries){for(;!(T=E.next()).done;)if(!H(T.value))return!1}else for(;!(T=E.next()).done;){var y=T.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 Y(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=Y(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 be(a){return!a.constructor||!a.constructor.name?q:a.constructor.name}return j.checkPropTypes=o,j.resetWarningCache=o.resetWarningCache,j.PropTypes=j,j},oe}var ie,xe;function Qe(){if(xe)return ie;xe=1;var r=te();function i(){}function l(){}return l.resetWarningCache=i,ie=function(){function s(d,c,h,g,b,m){if(m!==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 t={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:l,resetWarningCache:i};return t.PropTypes=t,t},ie}var Ne;function er(){if(Ne)return X.exports;if(Ne=1,process.env.NODE_ENV!=="production"){var r=_e(),i=!0;X.exports=Ze()(r.isElement,i)}else X.exports=Qe()();return X.exports}var rr=er();const e=he(rr),Ae=({content:r,title:i,className:l,id:s="accordion"})=>{const o=R("rpf-accordion",l);return n.jsxs("details",{className:o,id:`${s}`,children:[n.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[i,n.jsx("span",{className:"rpf-accordion__icon"})]}),n.jsx("p",{className:"rpf-accordion__text",children:r})]})};Ae.propTypes={content:e.string.isRequired,title:e.string.isRequired,id:e.string,className:e.string};const z=({text:r,href:i,title:l,className:s,type:o="primary",variant:t="",size:d="default",icon:c="",iconOnly:h=!1,iconPosition:g="left",fullWidth:b=!1,disabled:m=!1,onClick:q=()=>{},"aria-label":j="",linkComponent:k})=>{const N=c&&h,$=R("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":t==="danger","rpf-button--sm":d==="small","rpf-button--icon-only":N,"rpf-button--full-width":b,disabled:m},s);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 U=f=>c&&g===f&&n.jsx("span",{className:D,children:c}),M=()=>r&&!N&&n.jsx("span",{className:"text",children:r}),I=n.jsxs(n.Fragment,{children:[U("left"),M(),U("right")]});if(i){const f=k||"a",W=k?{to:i}:{href:i,role:"button"};return n.jsx(f,{className:$,...W,onClick:q,"aria-label":j,children:I})}return n.jsx("button",{className:$,title:l,onClick:q,disabled:m,"aria-label":j,children:I})};z.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 qe=({title:r,text:i,titleChildren:l,children:s,type:o,actions:t,onClose:d})=>n.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[n.jsxs("div",{className:"rpf-alert__header",children:[n.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),(r||l)&&n.jsxs(n.Fragment,{children:[!l&&r&&n.jsx("p",{className:"rpf-alert__title",children:r}),l&&n.jsx("div",{className:"rpf-alert__title",children:l})]}),!!d&&n.jsx("div",{className:"rpf-alert__close",children:n.jsx(z,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:d})})]}),(i||s||t)&&n.jsxs("div",{className:"rpf-alert__body",children:[!s&&i&&n.jsx("p",{children:i}),s&&n.jsx("div",{children:s}),t&&t.length>0&&n.jsx("div",{className:"rpf-alert__actions",children:t.map(c=>n.jsx(z,{text:c.label,size:"small",type:"tertiary",href:c.href,onClick:c.onClick},c.key||c.label))})]})]});qe.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})),titleChildren:e.node,children:e.node,onClose:e.func};const je=({id:r,label:i,name:l,checked:s=!1,disabled:o=!1,error:t="",onChange:d=()=>{},value:c="",className:h=""})=>n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:R("rpf-input-checkbox",{"rpf-input-checkbox--error":t,className:h}),children:[n.jsx("input",{checked:!!s,disabled:o,id:r,name:l,onChange:d,type:"checkbox",value:c}),i]}),t&&n.jsxs("div",{className:"rpf-error-message",children:[n.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]})]});je.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:i="",fullWidth:l=!1,legendText:s,legendHintText:o="",children:t})=>n.jsxs("fieldset",{className:R("rpf-fieldset",{"rpf-fieldset--disabled":r,"rpf-fieldset--full-width":l,"rpf-fieldset--error":i}),disabled:r,children:[n.jsxs("legend",{className:"rpf-label",children:[s,o.length>0?n.jsx("small",{className:"rpf-label__hint",children:o}):null]}),n.jsx("div",{className:"rpf-fieldset__inputs",children:t}),i.length>0?n.jsxs("div",{className:"rpf-error-message",children:[n.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),i]}):null]});Ie.propTypes={disabled:e.bool,errorText:e.string,fullWidth:e.bool,legendText:e.string.isRequired,legendHintText:e.string,children:e.node};const J=({id:r,label:i,children:l,disabled:s=!1,error:o="",hint:t=""})=>n.jsxs("div",{className:"rpf-input-field",children:[(i||t)&&n.jsxs("label",{htmlFor:r,className:R("rpf-label",{"rpf-label--disabled":s}),children:[i,n.jsx("small",{className:"rpf-label__hint",children:t})]}),l,o&&n.jsxs("div",{className:"rpf-error-message",children:[n.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]});J.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 $e=({label:r,inputFieldId:i,disabled:l=!1,hint:s=""})=>n.jsx("div",{className:"rpf-label",children:n.jsxs("label",{htmlFor:i,className:R("rpf-label",{"rpf-label--disabled":l}),children:[r,s&&n.jsx("div",{className:"rpf-label__hint",children:s})]})});$e.propTypes={disabled:e.bool,hint:e.oneOfType([e.string,e.object]),label:e.oneOfType([e.string,e.object]).isRequired,inputFieldId:e.string.isRequired};const Me=({id:r,label:i,name:l,checked:s=!1,disabled:o=!1,fullWidth:t=!1,onChange:d=()=>{},value:c=""})=>n.jsx(n.Fragment,{children:n.jsxs("label",{className:R("rpf-input-radio",{"rpf-input-radio--disabled":o,"rpf-input--full-width":t}),children:[n.jsx("input",{checked:!!s,disabled:o,id:r,name:l,onChange:d,type:"radio",value:c}),i]})});Me.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:i,disabled:l=!1,error:s="",hint:o="",placeholder:t="",defaultValue:d="",onClick:c=()=>{},onChange:h=g=>{}})=>n.jsx("search",{children:n.jsxs("form",{className:"rpf-input-field",onSubmit:c,children:[n.jsxs("label",{htmlFor:i,className:R("rpf-label",{"rpf-label--disabled":l}),children:[r,o&&n.jsx("small",{className:"rpf-label__hint",children:o})]}),n.jsxs("div",{className:"rpf-input-search-container",children:[n.jsx("input",{className:R("rpf-input rpf-input-search",{"rpf-input--disabled":l,"rpf-input--error":s}),disabled:l,id:i,name:"search",type:"search","aria-label":"Search",defaultValue:d,placeholder:t,onChange:h}),n.jsx("button",{type:"submit",className:R("rpf-button rpf-button-search",{"rpf-button--disabled":l,"rpf-button--error":s}),disabled:l,onClick:c,children:n.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),s&&n.jsxs("div",{className:"rpf-error-message",children:[n.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 Re=({id:r,label:i,name:l,options:s,disabled:o=!1,error:t="",fullWidth:d=!1,hint:c="",onChange:h=()=>{},placeholder:g="",value:b=""})=>n.jsx(J,{id:r,disabled:o,error:t,hint:c,label:i,children:n.jsxs("select",{className:R("rpf-input rpf-input-select",{"rpf-input--error":t,"rpf-input--full-width":d}),disabled:o,id:r,name:l,onChange:h,type:"text",value:b,children:[!b&&!!g&&n.jsx("option",{value:"",disabled:!0,children:g}),s.map(m=>n.jsx("option",{value:m.key,children:m.value},m.key))]})});Re.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 De=({id:r,label:i,name:l,value:s,disabled:o=!1,readOnly:t=!1,error:d="",fullWidth:c=!1,hint:h="",onChange:g=()=>{}})=>n.jsx(J,{id:r,disabled:o,error:d,hint:h,label:i,children:n.jsx("textarea",{className:R("rpf-input rpf-input-textarea",{"rpf-input--error":d,"rpf-input--full-width":c,"rpf-input--disabled":o}),disabled:o,readOnly:t,id:r,name:l,onChange:g,type:"text",value:s})});De.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 Fe=({id:r,label:i,name:l,value:s,disabled:o=!1,error:t="",fullWidth:d=!1,hint:c="",onChange:h=()=>{}})=>n.jsx(J,{id:r,disabled:o,error:t,hint:c,label:i,children:n.jsx("input",{className:R("rpf-input rpf-input-text",{"rpf-input--error":t,"rpf-input--full-width":d}),disabled:o,id:r,name:l,onChange:h,type:"text",value:s})});Fe.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};function nr(r,i){const l=V.useRef(null),s=V.useRef(null);return V.useEffect(()=>{const o=l.current;o&&(r&&!o.open?o.showModal():!r&&o.open&&o.close())},[r]),V.useEffect(()=>{const o=l.current;if(!o)return;const t=()=>i(!1),d=c=>{c.preventDefault(),i(!1)};return o.addEventListener("close",t),o.addEventListener("cancel",d),()=>{o.removeEventListener("close",t),o.removeEventListener("cancel",d)}},[i]),V.useEffect(()=>{const o=l.current,t=s.current;if(!o||!t)return;const d=c=>{r&&!t.contains(c.target)&&i(!1)};return o.addEventListener("mousedown",d),()=>o.removeEventListener("mousedown",d)},[r,i]),{dialogRef:l,contentRef:s}}const tr=({isOpen:r,setIsOpen:i,heading:l,children:s,primaryButtonLink:o,primaryButtonText:t,onClickPrimaryButton:d,secondaryButtonText:c,secondaryButtonLink:h,onClickSecondaryButton:g,tertiaryButtonText:b,tertiaryButtonLink:m,onClickTertiaryButton:q,showCloseButton:j=!0})=>{const{dialogRef:k,contentRef:N}=nr(r,i);return n.jsx("dialog",{ref:k,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:n.jsxs("div",{ref:N,className:"rpf-modal__wrapper",children:[n.jsxs("div",{className:"rpf-modal__header",children:[n.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:l}),j&&n.jsx(z,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>i(!1)})]}),n.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:s}),n.jsxs("div",{className:"rpf-modal__buttons",children:[n.jsx(z,{text:t,href:o,onClick:d,type:"primary"}),c&&n.jsx(z,{text:c,href:h,onClick:g,type:"secondary"}),b&&n.jsx(z,{text:b,href:m,onClick:q,type:"tertiary"})]})]})})},Ye=({text:r="",percent:i,complete:l=!1,className:s})=>n.jsx("div",{className:R("rpf-progress-bar",{"rpf-progress-bar--complete":l,className:s}),children:n.jsxs("label",{className:"rpf-progress-bar__label",children:[n.jsx("span",{children:r}),n.jsx("progress",{className:"rpf-progress-bar__bar",value:i,max:"100",children:`${i}%`})]})});Ye.propTypes={text:e.string,percent:e.number.isRequired,complete:e.bool,className:e.string};const Le=({children:r})=>n.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:n.jsx("div",{className:"rpf-table-cell__content",children:r})});Le.propTypes={children:e.node};const We=({sortDirection:r,children:i})=>{if(r!==void 0){const s=r==="up"?"arrow_drop_up":"arrow_drop_down";i=n.jsxs("div",{className:"rpf-table-cell__sort-header",children:[i,n.jsx("span",{className:"material-symbols-sharp",children:s})]})}const l=r!==void 0?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return n.jsx("th",{className:`rpf-table-cell ${l}`,children:n.jsx("div",{className:"rpf-table-cell__content",children:i})})};We.propTypes={sortDirection:e.oneOf(["up","down"]),children:e.node};const ze=({headerRow:r,bodyRows:i,fullWidth:l})=>n.jsx("div",{"data-testid":"table-container",className:R("rpf-table",{"rpf-table--full-width":l}),children:n.jsxs("table",{className:R("rpf-table__table",{"rpf-table__table--full-width":l}),children:[n.jsx("thead",{children:n.jsx("tr",{className:"rpf-table-row",children:r})}),n.jsx("tbody",{children:i.map((s,o)=>n.jsx("tr",{className:"rpf-table-row",children:s},o))})]})});ze.propTypes={headerRow:e.node.isRequired,bodyRows:e.arrayOf(e.node).isRequired,fullWidth:e.bool};const Ue=({text:r,variant:i,secondary:l,icon:s,iconPosition:o})=>(s&&(s=n.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:s})),s&&!o&&(o="left"),i&&i!=="default"?i=`rpf-tag--${i}`:i=null,n.jsxs("span",{className:R("rpf-tag",i,{"rpf-tag--secondary":l}),children:[o==="left"&&s,r,o==="right"&&s]}));Ue.propTypes={text:e.string.isRequired,variant:e.oneOf(["default","information","success","warning","error"]),secondary:e.bool,icon:e.string,iconPosition:e.oneOf(["left","right"])},A.Accordion=Ae,A.Alert=qe,A.Button=z,A.CheckboxInput=je,A.Fieldset=Ie,A.InputField=J,A.InputLabel=$e,A.Modal=tr,A.ProgressBar=Ye,A.RadioInput=Me,A.SearchInput=ke,A.SelectInput=Re,A.Table=ze,A.TableBodyCell=Le,A.TableHeaderCell=We,A.Tag=Ue,A.TextInput=Fe,A.TextareaInput=De,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
23
|
+
*/var re,Ee;function Be(){if(Ee)return re;Ee=1;var e=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function o(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function s(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var d={},c=0;c<10;c++)d["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(d).map(function(b){return d[b]});if(h.join("")!=="0123456789")return!1;var _={};return"abcdefghijklmnopqrst".split("").forEach(function(b){_[b]=b}),Object.keys(Object.assign({},_)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=s()?Object.assign:function(r,d){for(var c,h=o(r),_,b=1;b<arguments.length;b++){c=Object(arguments[b]);for(var m in c)i.call(c,m)&&(h[m]=c[m]);if(e){_=e(c);for(var j=0;j<_.length;j++)l.call(c,_[j])&&(h[_[j]]=c[_[j]])}}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,Oe;function Ce(){return Oe||(Oe=1,ae=Function.call.bind(Object.prototype.hasOwnProperty)),ae}var se,Pe;function Ve(){if(Pe)return se;Pe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var i=ne(),l={},o=Ce();e=function(r){var d="Warning: "+r;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}}}function s(r,d,c,h,_){if(process.env.NODE_ENV!=="production"){for(var b in r)if(o(r,b)){var m;try{if(typeof r[b]!="function"){var j=Error((h||"React class")+": "+c+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw j.name="Invariant Violation",j}m=r[b](d,b,h,c,null,i)}catch(k){m=k}if(m&&!(m instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+b+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in l)){l[m.message]=!0;var I=_?_():"";e("Failed "+c+" type: "+m.message+(I??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(l={})},se=s,se}var oe,we;function He(){if(we)return oe;we=1;var e=_e(),i=Be(),l=ne(),o=Ce(),s=Ve(),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 d(){return null}return oe=function(c,h){var _=typeof Symbol=="function"&&Symbol.iterator,b="@@iterator";function m(a){var p=a&&(_&&a[_]||a[b]);if(typeof p=="function")return p}var j="<<anonymous>>",I={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:z(),arrayOf:M,element:q(),elementType:f(),instanceOf:Y,node:ue(),objectOf:ce,oneOf:le,oneOfType:fe,shape:de,exact:pe};function k(a,p){return a===p?a!==0||1/a===1/p:a!==a&&p!==p}function N(a,p){this.message=a,this.data=p&&typeof p=="object"?p:{},this.stack=""}N.prototype=Error.prototype;function $(a){if(process.env.NODE_ENV!=="production")var p={},E=0;function g(S,v,T,O,x,C,F){if(O=O||j,C=C||T,F!==l){if(h){var u=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 u.name="Invariant Violation",u}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var W=O+":"+T;!p[W]&&E<3&&(r("You are manually calling a React.PropTypes validation function for the `"+C+"` prop on `"+O+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),p[W]=!0,E++)}}return v[T]==null?S?v[T]===null?new N("The "+x+" `"+C+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new N("The "+x+" `"+C+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:a(v,T,O,x,C)}var y=g.bind(null,!1);return y.isRequired=g.bind(null,!0),y}function D(a){function p(E,g,y,S,v,T){var O=E[g],x=L(O);if(x!==a){var C=B(O);return new N("Invalid "+S+" `"+v+"` of type "+("`"+C+"` supplied to `"+y+"`, expected ")+("`"+a+"`."),{expectedType:a})}return null}return $(p)}function z(){return $(d)}function M(a){function p(E,g,y,S,v){if(typeof a!="function")return new N("Property `"+v+"` of component `"+y+"` has invalid PropType notation inside arrayOf.");var T=E[g];if(!Array.isArray(T)){var O=L(T);return new N("Invalid "+S+" `"+v+"` of type "+("`"+O+"` supplied to `"+y+"`, expected an array."))}for(var x=0;x<T.length;x++){var C=a(T,x,y,S,v+"["+x+"]",l);if(C instanceof Error)return C}return null}return $(p)}function q(){function a(p,E,g,y,S){var v=p[E];if(!c(v)){var T=L(v);return new N("Invalid "+y+" `"+S+"` of type "+("`"+T+"` supplied to `"+g+"`, expected a single ReactElement."))}return null}return $(a)}function f(){function a(p,E,g,y,S){var v=p[E];if(!e.isValidElementType(v)){var T=L(v);return new N("Invalid "+y+" `"+S+"` of type "+("`"+T+"` supplied to `"+g+"`, expected a single ReactElement type."))}return null}return $(a)}function Y(a){function p(E,g,y,S,v){if(!(E[g]instanceof a)){var T=a.name||j,O=he(E[g]);return new N("Invalid "+S+" `"+v+"` of type "+("`"+O+"` supplied to `"+y+"`, expected ")+("instance of `"+T+"`."))}return null}return $(p)}function le(a){if(!Array.isArray(a))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.")),d;function p(E,g,y,S,v){for(var T=E[g],O=0;O<a.length;O++)if(k(T,a[O]))return null;var x=JSON.stringify(a,function(F,u){var W=B(u);return W==="symbol"?String(u):u});return new N("Invalid "+S+" `"+v+"` of value `"+String(T)+"` "+("supplied to `"+y+"`, expected one of "+x+"."))}return $(p)}function ce(a){function p(E,g,y,S,v){if(typeof a!="function")return new N("Property `"+v+"` of component `"+y+"` has invalid PropType notation inside objectOf.");var T=E[g],O=L(T);if(O!=="object")return new N("Invalid "+S+" `"+v+"` of type "+("`"+O+"` supplied to `"+y+"`, expected an object."));for(var x in T)if(o(T,x)){var C=a(T,x,y,S,v+"."+x,l);if(C instanceof Error)return C}return null}return $(p)}function fe(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var p=0;p<a.length;p++){var E=a[p];if(typeof E!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(E)+" at index "+p+"."),d}function g(y,S,v,T,O){for(var x=[],C=0;C<a.length;C++){var F=a[C],u=F(y,S,v,T,O,l);if(u==null)return null;u.data&&o(u.data,"expectedType")&&x.push(u.data.expectedType)}var W=x.length>0?", expected one of type ["+x.join(", ")+"]":"";return new N("Invalid "+T+" `"+O+"` supplied to "+("`"+v+"`"+W+"."))}return $(g)}function ue(){function a(p,E,g,y,S){return H(p[E])?null:new N("Invalid "+y+" `"+S+"` supplied to "+("`"+g+"`, expected a ReactNode."))}return $(a)}function K(a,p,E,g,y){return new N((a||"React class")+": "+p+" type `"+E+"."+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+y+"`.")}function de(a){function p(E,g,y,S,v){var T=E[g],O=L(T);if(O!=="object")return new N("Invalid "+S+" `"+v+"` of type `"+O+"` "+("supplied to `"+y+"`, expected `object`."));for(var x in a){var C=a[x];if(typeof C!="function")return K(y,S,v,x,B(C));var F=C(T,x,y,S,v+"."+x,l);if(F)return F}return null}return $(p)}function pe(a){function p(E,g,y,S,v){var T=E[g],O=L(T);if(O!=="object")return new N("Invalid "+S+" `"+v+"` of type `"+O+"` "+("supplied to `"+y+"`, expected `object`."));var x=i({},E[g],a);for(var C in x){var F=a[C];if(o(a,C)&&typeof F!="function")return K(y,S,v,C,B(F));if(!F)return new N("Invalid "+S+" `"+v+"` key `"+C+"` supplied to `"+y+"`.\nBad object: "+JSON.stringify(E[g],null," ")+`
|
|
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"})});
|
package/dist/types/lib/main.d.ts
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
export { default as Accordion } from "../src/components/Accordion";
|
|
2
2
|
export { default as Alert } from "../src/components/Alert";
|
|
3
|
+
export type { AlertProps } from "../src/components/Alert/Alert.types";
|
|
3
4
|
export { default as Button } from "../src/components/Button";
|
|
5
|
+
export type { ButtonProps } from "../src/components/Button/Button.types";
|
|
4
6
|
export { default as CheckboxInput } from "../src/components/Form/CheckboxInput";
|
|
7
|
+
export type { CheckboxInputProps } from "../src/components/Form/CheckboxInput/CheckboxInput.types";
|
|
5
8
|
export { default as Fieldset } from "../src/components/Form/Fieldset";
|
|
6
9
|
export { default as InputField } from "../src/components/Form/InputField";
|
|
7
10
|
export { default as InputLabel } from "../src/components/Form/InputLabel";
|
|
8
11
|
export { default as RadioInput } from "../src/components/Form/RadioInput";
|
|
9
12
|
export { default as SearchInput } from "../src/components/Form/SearchInput";
|
|
13
|
+
export type { SearchInputProps } from "../src/components/Form/SearchInput/SearchInput.types";
|
|
10
14
|
export { default as SelectInput } from "../src/components/Form/SelectInput";
|
|
11
15
|
export { default as TextareaInput } from "../src/components/Form/TextareaInput";
|
|
12
16
|
export { default as TextInput } from "../src/components/Form/TextInput";
|
|
13
17
|
export { default as Modal } from "../src/components/Modal";
|
|
14
18
|
export type { ModalProps } from "../src/components/Modal/Modal.types";
|
|
15
19
|
export { default as ProgressBar } from "../src/components/ProgressBar";
|
|
20
|
+
export type { ProgressBarProps } from "../src/components/ProgressBar/ProgressBar.types";
|
|
16
21
|
export { default as TableBodyCell } from "../src/components/Table/BodyCell";
|
|
17
22
|
export { default as TableHeaderCell } from "../src/components/Table/HeaderCell";
|
|
18
23
|
export { default as Table } from "../src/components/Table/Table";
|
|
19
24
|
export { default as Tag } from "../src/components/Tag";
|
|
25
|
+
export type { TagProps } from "../src/components/Tag/Tag.types";
|
|
20
26
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -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,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAChF,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,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,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,uBAAuB,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,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,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type AlertProps = BaseAlertProps & ContentProps & TitleProps;
|
|
3
|
+
type BaseAlertProps = {
|
|
4
|
+
/** The type of alert to display */
|
|
5
|
+
type?: "error" | "warning" | "information" | "success";
|
|
6
|
+
/** Whether the alert can be closed by the user */
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
/** Whether to show action buttons */
|
|
9
|
+
actions?: Array<AlertAction>;
|
|
10
|
+
/** The click handler for when the close button is pressed */
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
};
|
|
13
|
+
type ContentProps = {
|
|
14
|
+
/** The main content of the alert */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
/** The main text content of the alert */
|
|
17
|
+
text?: never;
|
|
18
|
+
} | {
|
|
19
|
+
/** The main content of the alert */
|
|
20
|
+
children?: never;
|
|
21
|
+
/** The main text content of the alert */
|
|
22
|
+
text?: string;
|
|
23
|
+
};
|
|
24
|
+
type TitleProps = {
|
|
25
|
+
/** The title content for the alert */
|
|
26
|
+
titleChildren?: ReactNode;
|
|
27
|
+
/** The title text for the alert */
|
|
28
|
+
title?: never;
|
|
29
|
+
} | {
|
|
30
|
+
/** The title content for the alert */
|
|
31
|
+
titleChildren?: never;
|
|
32
|
+
/** The title text for the alert */
|
|
33
|
+
title?: string;
|
|
34
|
+
};
|
|
35
|
+
type AlertAction = {
|
|
36
|
+
href?: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
onClick?: () => void;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=Alert.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Alert/Alert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpE,KAAK,cAAc,GAAG;IACpB,mCAAmC;IACnC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;IACvD,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAGF,KAAK,YAAY,GACb;IACE,oCAAoC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yCAAyC;IACzC,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,GACD;IACE,oCAAoC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGN,KAAK,UAAU,GACX;IACE,sCAAsC;IACtC,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,mCAAmC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GACD;IACE,sCAAsC;IACtC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC"}
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
children: any;
|
|
6
|
-
type: any;
|
|
7
|
-
actions: any;
|
|
8
|
-
onClose: any;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export namespace Alert {
|
|
11
|
-
namespace propTypes {
|
|
12
|
-
let title: PropTypes.Requireable<string>;
|
|
13
|
-
let text: PropTypes.Requireable<string>;
|
|
14
|
-
let type: PropTypes.Requireable<string>;
|
|
15
|
-
let actions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
16
|
-
href: PropTypes.Requireable<string>;
|
|
17
|
-
label: PropTypes.Requireable<string>;
|
|
18
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
-
}> | null | undefined)[]>;
|
|
20
|
-
let titleChildren: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
21
|
-
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
|
-
let onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import "@/components/MaterialSymbols";
|
|
2
|
+
import "./Alert.scss";
|
|
3
|
+
import type { AlertProps } from "./Alert.types";
|
|
4
|
+
export declare const Alert: ({ title, text, titleChildren, children, type, actions, onClose, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
5
|
export default Alert;
|
|
26
|
-
import PropTypes from "prop-types";
|
|
27
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Alert/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,KAAK,GAAI,mEAQnB,UAAU,4CA4CZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ElementType, type ReactNode } from "react";
|
|
2
|
+
export type ButtonProps = {
|
|
3
|
+
/** The text content of the button */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** The title content of the button */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** The type of the button */
|
|
8
|
+
type?: "primary" | "secondary" | "tertiary";
|
|
9
|
+
/** The variant of the button */
|
|
10
|
+
variant?: "" | "danger";
|
|
11
|
+
/** The size of the button */
|
|
12
|
+
size?: "default" | "small";
|
|
13
|
+
/** Whether the button is disabled */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The href attribute for link buttons */
|
|
16
|
+
href?: string;
|
|
17
|
+
/** The icon name */
|
|
18
|
+
icon?: string | ReactNode;
|
|
19
|
+
/** Whether the button shows only an icon */
|
|
20
|
+
iconOnly?: boolean;
|
|
21
|
+
/** The position of the icon */
|
|
22
|
+
iconPosition?: "left" | "right";
|
|
23
|
+
/** Whether the button takes full width */
|
|
24
|
+
fullWidth?: boolean;
|
|
25
|
+
/** Additional CSS class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Click handler */
|
|
28
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
29
|
+
/** Override for link component */
|
|
30
|
+
linkComponent?: ElementType;
|
|
31
|
+
/** Aria label */
|
|
32
|
+
"aria-label"?: string;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=Button.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG;IACxB,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC5C,gCAAgC;IAChC,OAAO,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC;IACxB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,kCAAkC;IAClC,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -1,39 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
className: any;
|
|
6
|
-
type?: string | undefined;
|
|
7
|
-
variant?: string | undefined;
|
|
8
|
-
size?: string | undefined;
|
|
9
|
-
icon?: string | undefined;
|
|
10
|
-
iconOnly?: boolean | undefined;
|
|
11
|
-
iconPosition?: string | undefined;
|
|
12
|
-
fullWidth?: boolean | undefined;
|
|
13
|
-
disabled?: boolean | undefined;
|
|
14
|
-
onClick?: (() => void) | undefined;
|
|
15
|
-
"aria-label"?: string | undefined;
|
|
16
|
-
linkComponent: any;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export namespace Button {
|
|
19
|
-
let propTypes: {
|
|
20
|
-
type: PropTypes.Requireable<string>;
|
|
21
|
-
className: PropTypes.Requireable<string>;
|
|
22
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
23
|
-
icon: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
24
|
-
href: PropTypes.Requireable<string>;
|
|
25
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
-
text: PropTypes.Requireable<string>;
|
|
27
|
-
iconOnly: PropTypes.Requireable<boolean>;
|
|
28
|
-
title: PropTypes.Requireable<string>;
|
|
29
|
-
iconPosition: PropTypes.Requireable<string>;
|
|
30
|
-
size: PropTypes.Requireable<string>;
|
|
31
|
-
"aria-label": PropTypes.Requireable<string>;
|
|
32
|
-
fullWidth: PropTypes.Requireable<boolean>;
|
|
33
|
-
variant: PropTypes.Requireable<string>;
|
|
34
|
-
linkComponent: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
1
|
+
import "@/components/MaterialSymbols";
|
|
2
|
+
import "./Button.scss";
|
|
3
|
+
import type { ButtonProps } from "./Button.types";
|
|
4
|
+
export declare const Button: ({ text, href, title, className, type, variant, size, icon, iconOnly, iconPosition, fullWidth, disabled, onClick, "aria-label": ariaLabel, linkComponent, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
5
|
export default Button;
|
|
38
|
-
import PropTypes from "prop-types";
|
|
39
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,MAAM,GAAI,4JAgBpB,WAAW,4CAgFb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type CheckboxInputProps = {
|
|
3
|
+
/** Unique identifier for the checkbox input */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Name attribute for the checkbox input */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Whether the checkbox is disabled */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Error message to display */
|
|
10
|
+
error?: string;
|
|
11
|
+
/** Label text or `ReactNode` for the checkbox */
|
|
12
|
+
label: string | ReactNode;
|
|
13
|
+
/** Whether the checkbox is checked (controlled) */
|
|
14
|
+
isChecked?: boolean;
|
|
15
|
+
/** Value attribute for the checkbox */
|
|
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
|
+
};
|
|
24
|
+
//# sourceMappingURL=CheckboxInput.types.d.ts.map
|
|
@@ -0,0 +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,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+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;IACpB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE,CAAC"}
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
checked?: boolean | undefined;
|
|
6
|
-
disabled?: boolean | undefined;
|
|
7
|
-
error?: string | undefined;
|
|
8
|
-
onChange?: (() => void) | undefined;
|
|
9
|
-
value?: string | undefined;
|
|
10
|
-
className?: string | undefined;
|
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export namespace CheckboxInput {
|
|
13
|
-
namespace propTypes {
|
|
14
|
-
let checked: PropTypes.Requireable<boolean>;
|
|
15
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
16
|
-
let error: PropTypes.Requireable<string>;
|
|
17
|
-
let id: PropTypes.Validator<string>;
|
|
18
|
-
let label: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
|
|
19
|
-
let name: PropTypes.Validator<string>;
|
|
20
|
-
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
-
let value: PropTypes.Requireable<string>;
|
|
22
|
-
let className: PropTypes.Requireable<string>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import "@/components/MaterialSymbols";
|
|
2
|
+
import "./CheckboxInput.scss";
|
|
3
|
+
import type { CheckboxInputProps } from "./CheckboxInput.types";
|
|
4
|
+
export declare const CheckboxInput: ({ id, label, name, checked, disabled, error, onChange, value, className, }: CheckboxInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
5
|
export default CheckboxInput;
|
|
26
|
-
import PropTypes from "prop-types";
|
|
27
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/CheckboxInput/index.
|
|
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,4EAU3B,kBAAkB,4CA4BpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type SearchInputProps = {
|
|
2
|
+
/** The input label text content */
|
|
3
|
+
label: string;
|
|
4
|
+
/** The input field id */
|
|
5
|
+
inputFieldId: string;
|
|
6
|
+
/** Whether the input is disabled */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** The text content of the error message */
|
|
9
|
+
error?: string;
|
|
10
|
+
/** The text content of the label hint */
|
|
11
|
+
hint?: string;
|
|
12
|
+
/** The placeholder text content */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/** The default input value */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Click handler */
|
|
17
|
+
onClick: () => void;
|
|
18
|
+
/** On change handler */
|
|
19
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=SearchInput.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SearchInput/SearchInput.types.ts"],"names":[],"mappings":"AAAE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,wBAAwB;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAC/D,CAAA"}
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
error?: string | undefined;
|
|
6
|
-
hint?: string | undefined;
|
|
7
|
-
placeholder?: string | undefined;
|
|
8
|
-
defaultValue?: string | undefined;
|
|
9
|
-
onClick?: (() => void) | undefined;
|
|
10
|
-
onChange?: ((event: any) => void) | undefined;
|
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export namespace SearchInput {
|
|
13
|
-
namespace propTypes {
|
|
14
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
15
|
-
let error: PropTypes.Requireable<string>;
|
|
16
|
-
let hint: PropTypes.Requireable<string>;
|
|
17
|
-
let inputFieldId: PropTypes.Validator<string>;
|
|
18
|
-
let label: PropTypes.Validator<string>;
|
|
19
|
-
let onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
-
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
-
let placeholder: PropTypes.Requireable<string>;
|
|
22
|
-
let defaultValue: PropTypes.Requireable<string>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import "@/components/MaterialSymbols";
|
|
2
|
+
import "./SearchInput.scss";
|
|
3
|
+
import type { SearchInputProps } from "./SearchInput.types";
|
|
4
|
+
export declare const SearchInput: ({ label, inputFieldId, disabled, error, hint, placeholder, defaultValue, onClick, onChange, }: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
5
|
export default SearchInput;
|
|
26
|
-
import PropTypes from "prop-types";
|
|
27
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SearchInput/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/SearchInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,GAAI,+FAUzB,gBAAgB,4CAmDlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ProgressBarProps = {
|
|
2
|
+
/** The text that labels the progress bar */
|
|
3
|
+
text?: string;
|
|
4
|
+
/** Percentage complete */
|
|
5
|
+
percent: number;
|
|
6
|
+
/** Optional visual indicator for when progress bar is complete */
|
|
7
|
+
complete?: boolean;
|
|
8
|
+
/** Additional CSS class name */
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=ProgressBar.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ProgressBar/ProgressBar.types.ts"],"names":[],"mappings":"AAAE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA"}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
className: any;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export namespace ProgressBar {
|
|
8
|
-
namespace propTypes {
|
|
9
|
-
let text: PropTypes.Requireable<string>;
|
|
10
|
-
let percent: PropTypes.Validator<number>;
|
|
11
|
-
let complete: PropTypes.Requireable<boolean>;
|
|
12
|
-
let className: PropTypes.Requireable<string>;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
import "@/components/MaterialSymbols";
|
|
2
|
+
import "./ProgressBar.scss";
|
|
3
|
+
import type { ProgressBarProps } from "./ProgressBar.types";
|
|
4
|
+
export declare const ProgressBar: ({ text, percent, complete, className, }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
5
|
export default ProgressBar;
|
|
16
|
-
import PropTypes from "prop-types";
|
|
17
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ProgressBar/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ProgressBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,GAAI,yCAKzB,gBAAgB,4CAclB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|