@raspberrypifoundation/design-system-react 2.6.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- (function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["RPF Design System React"]={},A.jsxRuntime,A.React))})(this,function(A,t,V){"use strict";function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee={exports:{}};/*!
1
+ (function(A,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],r):(A=typeof globalThis<"u"?globalThis:A||self,r(A["RPF Design System React"]={},A.jsxRuntime,A.React))})(this,function(A,r,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 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
5
+ */var ve;function Fe(){return ve||(ve=1,function(e){(function(){var l={}.hasOwnProperty;function i(){for(var t="",d=0;d<arguments.length;d++){var c=arguments[d];c&&(t=n(t,o(c)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return i.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var d="";for(var c in t)l.call(t,c)&&t[c]&&(d=n(d,c));return d}function n(t,d){return d?t?t+" "+d:t+d:t}e.exports?(i.default=i,e.exports=i):window.classNames=i})()}(ee)),ee.exports}var Le=Fe();const Y=be(Le);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 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
12
+ */var me;function Re(){if(me)return P;me=1;var e=typeof Symbol=="function"&&Symbol.for,l=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,t=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,T=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,F=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(f){if(typeof f=="object"&&f!==null){var L=f.$$typeof;switch(L){case l:switch(f=f.type,f){case h:case T:case o:case t:case n: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 L}}case i:return L}}}function q(f){return M(f)===T}return P.AsyncMode=h,P.ConcurrentMode=T,P.ContextConsumer=c,P.ContextProvider=d,P.Element=l,P.ForwardRef=b,P.Fragment=o,P.Lazy=k,P.Memo=I,P.Portal=i,P.Profiler=t,P.StrictMode=n,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===l},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)===i},P.isProfiler=function(f){return M(f)===t},P.isStrictMode=function(f){return M(f)===n},P.isSuspense=function(f){return M(f)===m},P.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===o||f===T||f===t||f===n||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===F||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 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}/*
19
+ */var ge;function De(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,l=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,t=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,T=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,F=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===T||u===t||u===n||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===F||u.$$typeof===z||u.$$typeof===N)}function q(u){if(typeof u=="object"&&u!==null){var W=u.$$typeof;switch(W){case l:var Q=u.type;switch(Q){case h:case T:case o:case t:case n:case m:return Q;default:var Ye=Q&&Q.$$typeof;switch(Ye){case c:case b:case k:case I:case d:return Ye;default:return W}}case i:return W}}}var f=h,L=T,le=c,ce=d,fe=l,ue=b,K=o,de=k,pe=I,H=i,ye=t,D=n,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)===T}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===l}function y(u){return q(u)===b}function S(u){return q(u)===o}function v(u){return q(u)===k}function _(u){return q(u)===I}function O(u){return q(u)===i}function x(u){return q(u)===t}function C(u){return q(u)===n}function R(u){return q(u)===m}w.AsyncMode=f,w.ConcurrentMode=L,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=D,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=_,w.isPortal=O,w.isProfiler=x,w.isStrictMode=C,w.isSuspense=R,w.isValidElementType=M,w.typeOf=q}()),w}var _e;function Te(){return _e||(_e=1,process.env.NODE_ENV==="production"?G.exports=Re():G.exports=De()),G.exports}/*
20
20
  object-assign
21
21
  (c) Sindre Sorhus
22
22
  @license MIT
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"})});
23
+ */var re,Ee;function We(){if(Ee)return re;Ee=1;var e=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[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 T={};return"abcdefghijklmnopqrst".split("").forEach(function(b){T[b]=b}),Object.keys(Object.assign({},T)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=n()?Object.assign:function(t,d){for(var c,h=o(t),T,b=1;b<arguments.length;b++){c=Object(arguments[b]);for(var m in c)l.call(c,m)&&(h[m]=c[m]);if(e){T=e(c);for(var j=0;j<T.length;j++)i.call(c,T[j])&&(h[T[j]]=c[T[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 ze(){if(Pe)return se;Pe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var l=ne(),i={},o=Ce();e=function(t){var d="Warning: "+t;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}}}function n(t,d,c,h,T){if(process.env.NODE_ENV!=="production"){for(var b in t)if(o(t,b)){var m;try{if(typeof t[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 t[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw j.name="Invariant Violation",j}m=t[b](d,b,h,c,null,l)}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 i)){i[m.message]=!0;var I=T?T():"";e("Failed "+c+" type: "+m.message+(I??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},se=n,se}var oe,we;function Ue(){if(we)return oe;we=1;var e=Te(),l=We(),i=ne(),o=Ce(),n=ze(),t=function(){};process.env.NODE_ENV!=="production"&&(t=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 T=typeof Symbol=="function"&&Symbol.iterator,b="@@iterator";function m(a){var p=a&&(T&&a[T]||a[b]);if(typeof p=="function")return p}var j="<<anonymous>>",I={array:F("array"),bigint:F("bigint"),bool:F("boolean"),func:F("function"),number:F("number"),object:F("object"),string:F("string"),symbol:F("symbol"),any:z(),arrayOf:M,element:q(),elementType:f(),instanceOf:L,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,_,O,x,C,R){if(O=O||j,C=C||_,R!==i){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+":"+_;!p[W]&&E<3&&(t("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[_]==null?S?v[_]===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,_,O,x,C)}var y=g.bind(null,!1);return y.isRequired=g.bind(null,!0),y}function F(a){function p(E,g,y,S,v,_){var O=E[g],x=D(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 _=E[g];if(!Array.isArray(_)){var O=D(_);return new N("Invalid "+S+" `"+v+"` of type "+("`"+O+"` supplied to `"+y+"`, expected an array."))}for(var x=0;x<_.length;x++){var C=a(_,x,y,S,v+"["+x+"]",i);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 _=D(v);return new N("Invalid "+y+" `"+S+"` of type "+("`"+_+"` 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 _=D(v);return new N("Invalid "+y+" `"+S+"` of type "+("`"+_+"` supplied to `"+g+"`, expected a single ReactElement type."))}return null}return $(a)}function L(a){function p(E,g,y,S,v){if(!(E[g]instanceof a)){var _=a.name||j,O=he(E[g]);return new N("Invalid "+S+" `"+v+"` of type "+("`"+O+"` supplied to `"+y+"`, expected ")+("instance of `"+_+"`."))}return null}return $(p)}function le(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&(arguments.length>1?t("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])."):t("Invalid argument supplied to oneOf, expected an array.")),d;function p(E,g,y,S,v){for(var _=E[g],O=0;O<a.length;O++)if(k(_,a[O]))return null;var x=JSON.stringify(a,function(R,u){var W=B(u);return W==="symbol"?String(u):u});return new N("Invalid "+S+" `"+v+"` of value `"+String(_)+"` "+("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 _=E[g],O=D(_);if(O!=="object")return new N("Invalid "+S+" `"+v+"` of type "+("`"+O+"` supplied to `"+y+"`, expected an object."));for(var x in _)if(o(_,x)){var C=a(_,x,y,S,v+"."+x,i);if(C instanceof Error)return C}return null}return $(p)}function fe(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&t("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 t("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(E)+" at index "+p+"."),d}function g(y,S,v,_,O){for(var x=[],C=0;C<a.length;C++){var R=a[C],u=R(y,S,v,_,O,i);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 "+_+" `"+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 _=E[g],O=D(_);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 R=C(_,x,y,S,v+"."+x,i);if(R)return R}return null}return $(p)}function pe(a){function p(E,g,y,S,v){var _=E[g],O=D(_);if(O!=="object")return new N("Invalid "+S+" `"+v+"` of type `"+O+"` "+("supplied to `"+y+"`, expected `object`."));var x=l({},E[g],a);for(var C in x){var R=a[C];if(o(a,C)&&typeof R!="function")return K(y,S,v,C,B(R));if(!R)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=R(_,C,y,S,v+"."+C,i);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 D(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=D(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=n,I.resetWarningCache=n.resetWarningCache,I.PropTypes=I,I},oe}var ie,xe;function Be(){if(xe)return ie;xe=1;var e=ne();function l(){}function i(){}return i.resetWarningCache=l,ie=function(){function o(d,c,h,T,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 n(){return o}var t={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:n,element:o,elementType:o,instanceOf:n,node:o,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:l};return t.PropTypes=t,t},ie}var Ne;function Ve(){if(Ne)return X.exports;if(Ne=1,process.env.NODE_ENV!=="production"){var e=Te(),l=!0;X.exports=Ue()(e.isElement,l)}else X.exports=Be()();return X.exports}var He=Ve();const s=be(He),Ae=({content:e,title:l,className:i,id:o="accordion"})=>{const n=Y("rpf-accordion",i);return r.jsxs("details",{className:n,id:`${o}`,children:[r.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[l,r.jsx("span",{className:"rpf-accordion__icon"})]}),r.jsx("p",{className:"rpf-accordion__text",children:e})]})};Ae.propTypes={content:s.string.isRequired,title:s.string.isRequired,id:s.string,className:s.string};const U=({text:e,href:l,title:i,className:o,type:n="primary",variant:t="",size:d="default",icon:c="",iconOnly:h=!1,iconPosition:T="left",fullWidth:b=!1,disabled:m=!1,onClick:j=()=>{},"aria-label":I="",linkComponent:k})=>{const N=c&&h,$=Y("rpf-button",{[`rpf-button--${n}`]:n,"rpf-button--danger":t==="danger","rpf-button--sm":d==="small","rpf-button--icon-only":N,"rpf-button--full-width":b,disabled:m},o);let F="rpf-button__icon";V.isValidElement(c)?(F+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):F+=" material-symbols-sharp";const z=(f,L)=>!L||T!==f?null:typeof L=="string"?r.jsx("span",{className:F,children:L}):L,M=()=>e&&!N&&r.jsx("span",{className:"text",children:e}),q=r.jsxs(r.Fragment,{children:[z("left",c),M(),z("right",c)]});if(l){const f=k||"a",L=k?{to:l}:{href:l,role:"button"};return r.jsx(f,{className:$,...L,onClick:j,"aria-label":I,children:q})}return r.jsx("button",{className:$,title:i,onClick:j,disabled:m,"aria-label":I,children:q})},Je=({title:e,text:l,titleChildren:i,children:o,type:n,actions:t,onClose:d})=>r.jsxs("div",{className:`rpf-alert rpf-alert--${n}`,children:[r.jsxs("div",{className:"rpf-alert__header",children:[r.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),i?r.jsx("div",{className:"rpf-alert__title",children:i}):e?r.jsx("p",{className:"rpf-alert__title",children:e}):null,!!d&&r.jsx("div",{className:"rpf-alert__close",children:r.jsx(U,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:d})})]}),(l||o||t)&&r.jsxs("div",{className:"rpf-alert__body",children:[l?r.jsx("p",{children:l}):o?r.jsx("div",{children:o}):null,t&&t.length>0&&r.jsx("div",{className:"rpf-alert__actions",children:t.map((c,h)=>r.jsx(U,{text:c.label,size:"small",type:"tertiary",href:c.href,onClick:c.onClick},h))})]})]}),Xe=({id:e,label:l,name:i,checked:o=!1,disabled:n=!1,error:t="",onChange:d=()=>{},value:c="",className:h=""})=>r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:Y("rpf-input-checkbox",{"rpf-input-checkbox--error":t,className:h}),children:[r.jsx("input",{checked:!!o,disabled:n,id:e,name:i,onChange:d,type:"checkbox",value:c}),l]}),t&&r.jsxs("div",{className:"rpf-error-message",children:[r.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]})]}),je=({disabled:e=!1,errorText:l="",fullWidth:i=!1,legendText:o,legendHintText:n="",children:t})=>r.jsxs("fieldset",{className:Y("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":i,"rpf-fieldset--error":l}),disabled:e,children:[r.jsxs("legend",{className:"rpf-label",children:[o,n.length>0?r.jsx("small",{className:"rpf-label__hint",children:n}):null]}),r.jsx("div",{className:"rpf-fieldset__inputs",children:t}),l.length>0?r.jsxs("div",{className:"rpf-error-message",children:[r.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),l]}):null]});je.propTypes={disabled:s.bool,errorText:s.string,fullWidth:s.bool,legendText:s.string.isRequired,legendHintText:s.string,children:s.node};const J=({id:e,label:l,children:i,disabled:o=!1,error:n="",hint:t=""})=>r.jsxs("div",{className:"rpf-input-field",children:[(l||t)&&r.jsxs("label",{htmlFor:e,className:Y("rpf-label",{"rpf-label--disabled":o}),children:[l,r.jsx("small",{className:"rpf-label__hint",children:t})]}),i,n&&r.jsxs("div",{className:"rpf-error-message",children:[r.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]})]});J.propTypes={disabled:s.bool,error:s.string,hint:s.oneOfType([s.string,s.object]),label:s.oneOfType([s.string,s.object]).isRequired,id:s.string.isRequired,children:s.node};const Ie=({label:e,inputFieldId:l,disabled:i=!1,hint:o=""})=>r.jsx("div",{className:"rpf-label",children:r.jsxs("label",{htmlFor:l,className:Y("rpf-label",{"rpf-label--disabled":i}),children:[e,o&&r.jsx("div",{className:"rpf-label__hint",children:o})]})});Ie.propTypes={disabled:s.bool,hint:s.oneOfType([s.string,s.object]),label:s.oneOfType([s.string,s.object]).isRequired,inputFieldId:s.string.isRequired};const qe=({id:e,label:l,name:i,checked:o=!1,disabled:n=!1,fullWidth:t=!1,onChange:d=()=>{},value:c=""})=>r.jsx(r.Fragment,{children:r.jsxs("label",{className:Y("rpf-input-radio",{"rpf-input-radio--disabled":n,"rpf-input--full-width":t}),children:[r.jsx("input",{checked:!!o,disabled:n,id:e,name:i,onChange:d,type:"radio",value:c}),l]})});qe.propTypes={checked:s.bool,disabled:s.bool,fullWidth:s.bool,id:s.string.isRequired,label:s.oneOfType([s.string,s.object]).isRequired,name:s.string.isRequired,onChange:s.func,value:s.string};const Ge=({label:e,inputFieldId:l,disabled:i=!1,error:o="",hint:n="",placeholder:t="",defaultValue:d="",onClick:c=()=>{},onChange:h=()=>{}})=>r.jsx("search",{children:r.jsxs("form",{className:"rpf-input-field",onSubmit:c,children:[r.jsxs("label",{htmlFor:l,className:Y("rpf-label",{"rpf-label--disabled":i}),children:[e,n&&r.jsx("small",{className:"rpf-label__hint",children:n})]}),r.jsxs("div",{className:"rpf-input-search-container",children:[r.jsx("input",{className:Y("rpf-input rpf-input-search",{"rpf-input--disabled":i,"rpf-input--error":o}),disabled:i,id:l,name:"search",type:"search","aria-label":"Search",defaultValue:d,placeholder:t,onChange:h}),r.jsx("button",{type:"submit",className:Y("rpf-button rpf-button-search",{"rpf-button--disabled":i,"rpf-button--error":o}),disabled:i,onClick:c,children:r.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),o&&r.jsxs("div",{className:"rpf-error-message",children:[r.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),o]})]})}),$e=({id:e,label:l,name:i,options:o,disabled:n=!1,error:t="",fullWidth:d=!1,hint:c="",onChange:h=()=>{},placeholder:T="",value:b=""})=>r.jsx(J,{id:e,disabled:n,error:t,hint:c,label:l,children:r.jsxs("select",{className:Y("rpf-input rpf-input-select",{"rpf-input--error":t,"rpf-input--full-width":d}),disabled:n,id:e,name:i,onChange:h,type:"text",value:b,children:[!b&&!!T&&r.jsx("option",{value:"",disabled:!0,children:T}),o.map(m=>r.jsx("option",{value:m.key,children:m.value},m.key))]})});$e.propTypes={disabled:s.bool,error:s.string,fullWidth:s.bool,hint:s.oneOfType([s.string,s.object]),label:s.oneOfType([s.string,s.object]).isRequired,id:s.string.isRequired,name:s.string.isRequired,onChange:s.func,options:s.array.isRequired,placeholder:s.string,value:s.string};const Me=({id:e,label:l,name:i,value:o,disabled:n=!1,readOnly:t=!1,error:d="",fullWidth:c=!1,hint:h="",onChange:T=()=>{}})=>r.jsx(J,{id:e,disabled:n,error:d,hint:h,label:l,children:r.jsx("textarea",{className:Y("rpf-input rpf-input-textarea",{"rpf-input--error":d,"rpf-input--full-width":c,"rpf-input--disabled":n}),disabled:n,readOnly:t,id:e,name:i,onChange:T,type:"text",value:o})});Me.propTypes={disabled:s.bool,readOnly:s.bool,error:s.string,fullWidth:s.bool,hint:s.oneOfType([s.string,s.object]),label:s.oneOfType([s.string,s.object]).isRequired,id:s.string.isRequired,name:s.string.isRequired,onChange:s.func,value:s.string.isRequired};const ke=({id:e,label:l,name:i,value:o,disabled:n=!1,error:t="",fullWidth:d=!1,hint:c="",onChange:h=()=>{}})=>r.jsx(J,{id:e,disabled:n,error:t,hint:c,label:l,children:r.jsx("input",{className:Y("rpf-input rpf-input-text",{"rpf-input--error":t,"rpf-input--full-width":d}),disabled:n,id:e,name:i,onChange:h,type:"text",value:o})});ke.propTypes={disabled:s.bool,error:s.string,fullWidth:s.bool,hint:s.oneOfType([s.string,s.object]),label:s.oneOfType([s.string,s.object]).isRequired,id:s.string.isRequired,name:s.string.isRequired,onChange:s.func,value:s.string.isRequired};function Ke(e,l){const i=V.useRef(null),o=V.useRef(null);return V.useEffect(()=>{const n=i.current;n&&(e&&!n.open?n.showModal():!e&&n.open&&n.close())},[e]),V.useEffect(()=>{const n=i.current;if(!n)return;const t=()=>l(!1),d=c=>{c.preventDefault(),l(!1)};return n.addEventListener("close",t),n.addEventListener("cancel",d),()=>{n.removeEventListener("close",t),n.removeEventListener("cancel",d)}},[l]),V.useEffect(()=>{const n=i.current,t=o.current;if(!n||!t)return;const d=c=>{e&&!t.contains(c.target)&&l(!1)};return n.addEventListener("mousedown",d),()=>n.removeEventListener("mousedown",d)},[e,l]),{dialogRef:i,contentRef:o}}const Ze=({isOpen:e,setIsOpen:l,heading:i,children:o,primaryButtonLink:n,primaryButtonText:t,onClickPrimaryButton:d,secondaryButtonText:c,secondaryButtonLink:h,onClickSecondaryButton:T,tertiaryButtonText:b,tertiaryButtonLink:m,onClickTertiaryButton:j,showCloseButton:I=!0})=>{const{dialogRef:k,contentRef:N}=Ke(e,l);return r.jsx("dialog",{ref:k,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:r.jsxs("div",{ref:N,className:"rpf-modal__wrapper",children:[r.jsxs("div",{className:"rpf-modal__header",children:[r.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:i}),I&&r.jsx(U,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>l(!1)})]}),r.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:o}),r.jsxs("div",{className:"rpf-modal__buttons",children:[r.jsx(U,{text:t,href:n,onClick:d,type:"primary"}),c&&r.jsx(U,{text:c,href:h,onClick:T,type:"secondary"}),b&&r.jsx(U,{text:b,href:m,onClick:j,type:"tertiary"})]})]})})},Qe=({text:e="",percent:l,complete:i=!1,className:o})=>r.jsx("div",{className:Y("rpf-progress-bar",{"rpf-progress-bar--complete":i,className:o}),children:r.jsxs("label",{className:"rpf-progress-bar__label",children:[r.jsx("span",{children:e}),r.jsx("progress",{className:"rpf-progress-bar__bar",value:l,max:"100",children:`${l}%`})]})}),er=({children:e})=>r.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:r.jsx("div",{className:"rpf-table-cell__content",children:e})}),rr=({sortDirection:e,children:l,onClick:i})=>{const o=e==="up"?"arrow_drop_up":e==="down"?"arrow_drop_down":null,n=e!==void 0?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return r.jsx("th",{className:`rpf-table-cell ${n}`,"aria-sort":e==="up"?"ascending":e==="down"?"descending":"none",children:r.jsx("div",{className:"rpf-table-cell__content",children:e?r.jsxs("button",{className:"rpf-table-cell__sort-header",onClick:i,children:[l,r.jsx("span",{className:"material-symbols-sharp",children:o})]}):r.jsx(r.Fragment,{children:l})})})},tr=({headerRow:e,bodyRows:l,fullWidth:i})=>r.jsx("div",{"data-testid":"table-container",className:Y("rpf-table",{"rpf-table--full-width":i}),children:r.jsxs("table",{className:Y("rpf-table__table",{"rpf-table__table--full-width":i}),children:[r.jsx("thead",{children:r.jsx("tr",{className:"rpf-table-row",children:e})}),r.jsx("tbody",{children:l.map((o,n)=>r.jsx("tr",{className:"rpf-table-row",children:o},n))})]})}),nr=({text:e,variant:l,secondary:i,icon:o,iconPosition:n})=>{const t=o?r.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:o}):null;o&&!n&&(n="left");const d=l&&l!=="default"?`rpf-tag--${l}`:null;return r.jsxs("span",{className:Y("rpf-tag",d,{"rpf-tag--secondary":i}),children:[n==="left"&&t,e,n==="right"&&t]})};A.Accordion=Ae,A.Alert=Je,A.Button=U,A.CheckboxInput=Xe,A.Fieldset=je,A.InputField=J,A.InputLabel=Ie,A.Modal=Ze,A.ProgressBar=Qe,A.RadioInput=qe,A.SearchInput=Ge,A.SelectInput=$e,A.Table=tr,A.TableBodyCell=er,A.TableHeaderCell=rr,A.Tag=nr,A.TextInput=ke,A.TextareaInput=Me,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
@@ -20,7 +20,9 @@ export { default as ProgressBar } from "../src/components/ProgressBar";
20
20
  export type { ProgressBarProps } from "../src/components/ProgressBar/ProgressBar.types";
21
21
  export { default as TableBodyCell } from "../src/components/Table/BodyCell";
22
22
  export { default as TableHeaderCell } from "../src/components/Table/HeaderCell";
23
+ export type { HeaderCellProps } from "../src/components/Table/HeaderCell/HeaderCell.types";
23
24
  export { default as Table } from "../src/components/Table/Table";
25
+ export type { TableProps } from "../src/components/Table/Table/Table.types";
24
26
  export { default as Tag } from "../src/components/Tag";
25
27
  export type { TagProps } from "../src/components/Tag/Tag.types";
26
28
  //# 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,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"}
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,11 +1,6 @@
1
- export function BodyCell({ children }: {
2
- children: any;
3
- }): import("react/jsx-runtime").JSX.Element;
4
- export namespace BodyCell {
5
- namespace propTypes {
6
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
- }
8
- }
1
+ import "./BodyCell.scss";
2
+ export declare const BodyCell: ({ children }: {
3
+ children?: React.ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
9
5
  export default BodyCell;
10
- import PropTypes from "prop-types";
11
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/BodyCell/index.jsx"],"names":[],"mappings":"AAGO;;4CAIN;;;;;;;sBANqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/BodyCell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAEzB,eAAO,MAAM,QAAQ,GAAI,cAAc;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAIpE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type HeaderCellProps = {
2
+ /** Controls whether the up or down arrow is displayed */
3
+ sortDirection?: "up" | "down";
4
+ /** The content of the table header cell */
5
+ children?: React.ReactNode;
6
+ /** Click handler for header cell */
7
+ onClick?: () => void;
8
+ };
9
+ //# sourceMappingURL=HeaderCell.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderCell.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/HeaderCell/HeaderCell.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,yDAAyD;IACzD,aAAa,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC9B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC"}
@@ -1,13 +1,5 @@
1
- export function HeaderCell({ sortDirection, children }: {
2
- sortDirection: any;
3
- children: any;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- export namespace HeaderCell {
6
- namespace propTypes {
7
- let sortDirection: PropTypes.Requireable<string>;
8
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
- }
10
- }
1
+ import "./HeaderCell.scss";
2
+ import type { HeaderCellProps } from "./HeaderCell.types";
3
+ export declare const HeaderCell: ({ sortDirection, children, onClick, }: HeaderCellProps) => import("react/jsx-runtime").JSX.Element;
11
4
  export default HeaderCell;
12
- import PropTypes from "prop-types";
13
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/HeaderCell/index.jsx"],"names":[],"mappings":"AAIO;;;4CAqBN;;;;;;;;sBAzBqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/HeaderCell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,UAAU,GAAI,uCAIxB,eAAe,4CAoCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type TableProps = {
2
+ /** The header row component */
3
+ headerRow: React.ReactNode;
4
+ /** An array of body row components */
5
+ bodyRows: Array<React.ReactNode>;
6
+ /** Whether or not the table displays full width or not */
7
+ fullWidth?: boolean;
8
+ };
9
+ //# sourceMappingURL=Table.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/Table/Table.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,+BAA+B;IAC/B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACjC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -1,15 +1,5 @@
1
- export function Table({ headerRow, bodyRows, fullWidth }: {
2
- headerRow: any;
3
- bodyRows: any;
4
- fullWidth: any;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- export namespace Table {
7
- namespace propTypes {
8
- let headerRow: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
9
- let bodyRows: PropTypes.Validator<PropTypes.ReactNodeLike[]>;
10
- let fullWidth: PropTypes.Requireable<boolean>;
11
- }
12
- }
1
+ import "./Table.scss";
2
+ import type { TableProps } from "./Table.types";
3
+ export declare const Table: ({ headerRow, bodyRows, fullWidth }: TableProps) => import("react/jsx-runtime").JSX.Element;
13
4
  export default Table;
14
- import PropTypes from "prop-types";
15
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/Table/index.jsx"],"names":[],"mappings":"AAKO;;;;4CAsBN;;;;;;;;;sBA3BqB,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/Table/index.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,KAAK,GAAI,oCAAoC,UAAU,4CAsBnE,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,22 +1,9 @@
1
- export default options;
2
- export namespace Default {
3
- let args: {};
4
- function render(args: any): import("react/jsx-runtime").JSX.Element;
5
- }
6
- export namespace FullWidth {
7
- export namespace args_1 {
8
- let fullWidth: boolean;
9
- }
10
- export { args_1 as args };
11
- }
12
- declare namespace options {
13
- export let title: string;
14
- export { Table as component };
15
- export let tags: string[];
16
- export namespace args_2 {
17
- let fullWidth_1: boolean;
18
- export { fullWidth_1 as fullWidth };
19
- }
20
- export { args_2 as args };
21
- }
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Table } from "../../components/Table/Table";
3
+ declare const meta: Meta<typeof Table>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Table>;
6
+ export declare const Default: Story;
7
+ export declare const FullWidth: Story;
8
+ export declare const ClickableHeaderCell: Story;
22
9
  //# sourceMappingURL=Table.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/table/Table.stories.jsx"],"names":[],"mappings":";;;IAkBU,oEAuCP"}
1
+ {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/stories/table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAO5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAsCpC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA6CjC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raspberrypifoundation/design-system-react",
3
- "version": "2.6.2",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/design-system-react.umd.cjs",
6
6
  "module": "./dist/design-system-react.js",
@@ -83,10 +83,18 @@
83
83
  "vitest": "^3.1.1"
84
84
  },
85
85
  "peerDependencies": {
86
- "react": "^18.3.1",
87
- "react-dom": "^18.3.1",
86
+ "react": ">=18.0.0 <20.0.0",
87
+ "react-dom": ">=18.0.0 <20.0.0",
88
88
  "react-router-dom": "^6.24.0"
89
89
  },
90
+ "peerDependenciesMeta": {
91
+ "react": {
92
+ "optional": false
93
+ },
94
+ "react-dom": {
95
+ "optional": false
96
+ }
97
+ },
90
98
  "packageManager": "yarn@4.5.1",
91
99
  "eslintConfig": {
92
100
  "extends": [