@carto/ps-react-ui 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),E=require("@mui/material");var te={exports:{}},B={};/**
|
2
2
|
* @license React
|
3
3
|
* react-jsx-runtime.production.min.js
|
4
4
|
*
|
@@ -6,7 +6,7 @@
|
|
6
6
|
*
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/var we;function lr(){if(we)return B;we=1;var n=P,o=Symbol.for("react.element"),f=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,
|
9
|
+
*/var we;function lr(){if(we)return B;we=1;var n=P,o=Symbol.for("react.element"),f=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function C(R,d,m){var g,w={},h=null,T=null;m!==void 0&&(h=""+m),d.key!==void 0&&(h=""+d.key),d.ref!==void 0&&(T=d.ref);for(g in d)u.call(d,g)&&!S.hasOwnProperty(g)&&(w[g]=d[g]);if(R&&R.defaultProps)for(g in d=R.defaultProps,d)w[g]===void 0&&(w[g]=d[g]);return{$$typeof:o,type:R,key:h,ref:T,props:w,_owner:b.current}}return B.Fragment=f,B.jsx=C,B.jsxs=C,B}var Y={};/**
|
10
10
|
* @license React
|
11
11
|
* react-jsx-runtime.development.js
|
12
12
|
*
|
@@ -14,14 +14,14 @@
|
|
14
14
|
*
|
15
15
|
* This source code is licensed under the MIT license found in the
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
17
|
-
*/var je;function cr(){return je||(je=1,process.env.NODE_ENV!=="production"&&function(){var n=P,o=Symbol.for("react.element"),f=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),
|
17
|
+
*/var je;function cr(){return je||(je=1,process.env.NODE_ENV!=="production"&&function(){var n=P,o=Symbol.for("react.element"),f=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),R=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),k=Symbol.iterator,j="@@iterator";function J(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[j];return typeof r=="function"?r:null}var I=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];Pe("error",e,t)}}function Pe(e,r,t){{var a=I.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var c=t.map(function(s){return String(s)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var ke=!1,Fe=!1,Ae=!1,De=!1,Ie=!1,ne;ne=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===S||Ie||e===b||e===m||e===g||De||e===T||ke||Fe||Ae||typeof e=="object"&&e!==null&&(e.$$typeof===h||e.$$typeof===w||e.$$typeof===C||e.$$typeof===R||e.$$typeof===d||e.$$typeof===ne||e.getModuleId!==void 0))}function We(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function ae(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case f:return"Portal";case S:return"Profiler";case b:return"StrictMode";case m:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return ae(r)+".Consumer";case C:var t=e;return ae(t._context)+".Provider";case d:return We(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:F(e.type)||"Memo";case h:{var l=e,c=l._payload,s=l._init;try{return F(s(c))}catch{return null}}}return null}var D=Object.assign,M=0,oe,ie,se,ue,le,ce,fe;function de(){}de.__reactDisabledLog=!0;function Me(){{if(M===0){oe=console.log,ie=console.info,se=console.warn,ue=console.error,le=console.group,ce=console.groupCollapsed,fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:de,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function Le(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:oe}),info:D({},e,{value:ie}),warn:D({},e,{value:se}),error:D({},e,{value:ue}),group:D({},e,{value:le}),groupCollapsed:D({},e,{value:ce}),groupEnd:D({},e,{value:fe})})}M<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=I.ReactCurrentDispatcher,K;function V(e,r,t){{if(K===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);K=a&&a[1]||""}return`
|
18
18
|
`+K+e}}var X=!1,N;{var Be=typeof WeakMap=="function"?WeakMap:Map;N=new Be}function ve(e,r){if(!e||X)return"";{var t=N.get(e);if(t!==void 0)return t}var a;X=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=G.current,G.current=null,Me();try{if(r){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(A){a=A}Reflect.construct(e,[],s)}else{try{s.call()}catch(A){a=A}e.call(s.prototype)}}else{try{throw Error()}catch(A){a=A}e()}}catch(A){if(A&&a&&typeof A.stack=="string"){for(var i=A.stack.split(`
|
19
|
-
`),
|
20
|
-
`),v=i.length-1,p=
|
21
|
-
`+i[v].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&N.set(e,O),O}while(v>=1&&p>=0);break}}}finally{X=!1,G.current=c,Le(),Error.prepareStackTrace=l}var W=e?e.displayName||e.name:"",Ce=W?V(W):"";return typeof e=="function"&&N.set(e,Ce),Ce}function Ye(e,r,t){return ve(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return ve(e,Ve(e));if(typeof e=="string")return V(e);switch(e){case
|
19
|
+
`),x=a.stack.split(`
|
20
|
+
`),v=i.length-1,p=x.length-1;v>=1&&p>=0&&i[v]!==x[p];)p--;for(;v>=1&&p>=0;v--,p--)if(i[v]!==x[p]){if(v!==1||p!==1)do if(v--,p--,p<0||i[v]!==x[p]){var O=`
|
21
|
+
`+i[v].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&N.set(e,O),O}while(v>=1&&p>=0);break}}}finally{X=!1,G.current=c,Le(),Error.prepareStackTrace=l}var W=e?e.displayName||e.name:"",Ce=W?V(W):"";return typeof e=="function"&&N.set(e,Ce),Ce}function Ye(e,r,t){return ve(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return ve(e,Ve(e));if(typeof e=="string")return V(e);switch(e){case m:return V("Suspense");case g:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ye(e.render);case w:return U(e.type,r,t);case h:{var a=e,l=a._payload,c=a._init;try{return U(c(l),r,t)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,pe={},he=I.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function Ne(e,r,t,a,l){{var c=Function.call.bind(q);for(var s in e)if(c(e,s)){var i=void 0;try{if(typeof e[s]!="function"){var x=Error((a||"React class")+": "+t+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}i=e[s](r,s,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){i=v}i&&!(i instanceof Error)&&(z(l),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,s,typeof i),z(null)),i instanceof Error&&!(i.message in pe)&&(pe[i.message]=!0,z(l),_("Failed %s type: %s",t,i.message),z(null))}}}var Ue=Array.isArray;function H(e){return Ue(e)}function qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ze(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function ye(e){if(ze(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qe(e)),ge(e)}var L=I.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},be,me,Z;Z={};function Ge(e){if(q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ke(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Xe(e,r){if(typeof e.ref=="string"&&L.current&&r&&L.current.stateNode!==r){var t=F(L.current.type);Z[t]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(L.current.type),e.ref),Z[t]=!0)}}function He(e,r){{var t=function(){be||(be=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Ze(e,r){{var t=function(){me||(me=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Qe=function(e,r,t,a,l,c,s){var i={$$typeof:o,type:e,key:r,ref:t,props:s,_owner:c};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function er(e,r,t,a,l){{var c,s={},i=null,x=null;t!==void 0&&(ye(t),i=""+t),Ke(r)&&(ye(r.key),i=""+r.key),Ge(r)&&(x=r.ref,Xe(r,l));for(c in r)q.call(r,c)&&!Je.hasOwnProperty(c)&&(s[c]=r[c]);if(e&&e.defaultProps){var v=e.defaultProps;for(c in v)s[c]===void 0&&(s[c]=v[c])}if(i||x){var p=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&He(s,p),x&&Ze(s,p)}return Qe(e,i,x,l,a,L.current,s)}}var Q=I.ReactCurrentOwner,Ee=I.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Re(){{if(Q.current){var e=F(Q.current.type);if(e)return`
|
22
22
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function rr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
24
24
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var _e={};function tr(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
26
26
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(_e[t])return;_e[t]=!0;var a="";e&&e._owner&&e._owner!==Q.current&&(a=" It was passed a child from "+F(e._owner.type)+"."),$(e),
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(_e[t])return;_e[t]=!0;var a="";e&&e._owner&&e._owner!==Q.current&&(a=" It was passed a child from "+F(e._owner.type)+"."),$(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),$(null)}}function Te(e,r){{if(typeof e!="object")return;if(H(e))for(var t=0;t<e.length;t++){var a=e[t];re(a)&&xe(a,r)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var l=J(e);if(typeof l=="function"&&l!==e.entries)for(var c=l.call(e),s;!(s=c.next()).done;)re(s.value)&&xe(s.value,r)}}}function nr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===w))t=r.propTypes;else return;if(t){var a=F(r);Ne(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!ee){ee=!0;var l=F(r);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){$(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),$(null);break}}e.ref!==null&&($(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}function Se(e,r,t,a,l,c){{var s=$e(e);if(!s){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var x=rr(l);x?i+=x:i+=Re();var v;e===null?v="null":H(e)?v="array":e!==void 0&&e.$$typeof===o?(v="<"+(F(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,i)}var p=er(e,r,t,l,c);if(p==null)return p;if(s){var O=r.children;if(O!==void 0)if(a)if(H(O)){for(var W=0;W<O.length;W++)Te(O[W],e);Object.freeze&&Object.freeze(O)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Te(O,e)}return e===u?ar(p):nr(p),p}}function or(e,r,t){return Se(e,r,t,!0)}function ir(e,r,t){return Se(e,r,t,!1)}var sr=ir,ur=or;Y.Fragment=u,Y.jsx=sr,Y.jsxs=ur}()),Y}process.env.NODE_ENV==="production"?te.exports=lr():te.exports=cr();var y=te.exports;const fr={box:{marginLeft:({spacing:n})=>n(1)}};function dr({items:n,itemsToShow:o=10,label:f,ListProps:u,texts:{showMore:b="View all",showLess:S="Collapse list"}={},unit:C,formatter:R,onRowClick:d}){const[m,g]=P.useState(!0),w=()=>{g(!m)},h=j=>R?R(j):j,T=P.useMemo(()=>{const j=m?o:n.length;return n.slice(0,j)},[n,o,m]),k=n.length>o;return y.jsxs(E.Box,{width:"100%",height:"auto",children:[f&&y.jsx(E.Typography,{variant:"caption",color:"textSecondary",gutterBottom:!0,children:f}),y.jsx(E.List,{...u,component:"ul",children:T.map(j=>y.jsxs(E.ListItemButton,{divider:!0,onClick:J=>d?.(J,j),children:[y.jsx(E.ListItemText,{primary:j.name}),y.jsx(vr,{value:h(j.value),unit:C})]},j.id))}),k&&y.jsx(E.Button,{variant:"text",color:"primary",size:"small",onClick:w,children:m?b:S})]})}function vr({value:n,unit:o}){return y.jsx(E.Box,{sx:fr.box,children:y.jsxs(E.Typography,{variant:"body2",align:"right",noWrap:!0,children:[o," ",n]})})}const pr={contentBox:{paddingBottom:2,paddingX:2}},hr=E.styled(E.Box,{shouldForwardProp:n=>n!=="scrollMarginTop"})(({scrollMarginTop:n})=>({height:"auto",scrollMarginTop:n,width:"100%"})),gr=E.styled(E.Box,{shouldForwardProp:n=>n!=="scrollMarginTop"})(({scrollMarginTop:n,theme:{spacing:o,palette:f}})=>({alignItems:"center",backgroundColor:f.grey[100],display:"flex",height:o(3),justifyContent:"center",position:"sticky",top:n,width:"100%",zIndex:1}));function yr({title:n,id:o,anchor:f=!1,scrollMarginTop:u=0,children:b,BoxProps:S}){return y.jsxs(hr,{scrollMarginTop:u,id:o,"data-anchor":f,...S,children:[y.jsx(gr,{scrollMarginTop:u,children:y.jsx(E.Typography,{variant:"caption",children:n})}),y.jsx(E.Box,{sx:pr.contentBox,children:y.jsx(y.Fragment,{children:b})})]})}const br={tabsWrapper:{backgroundColor:({palette:n})=>n.background.paper,left:0,position:"sticky",top:0,width:"100%",zIndex:2,"& .MuiTab-root:last-of-type":{marginRight:0},"& .MuiTab-textColorPrimary":{color:({palette:n})=>n.text.primary,"&.Mui-selected":{color:({palette:n})=>n.primary.main}},"& .MuiTabs-indicator.colorPrimary":{backgroundColor:({palette:n})=>n.primary.main}}};function mr({children:n,anchor:o,TabsProps:f,variant:u="standard",onChange:b}){const S=(C,R)=>{C.preventDefault(),b?.(R)};return y.jsx(E.Box,{sx:br.tabsWrapper,children:y.jsx(E.Tabs,{indicatorColor:"primary",textColor:"primary","aria-label":"Explore sections",...f,value:o,variant:u,onChange:S,children:n})})}function Oe(n){var o,f,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var b=n.length;for(o=0;o<b;o++)n[o]&&(f=Oe(n[o]))&&(u&&(u+=" "),u+=f)}else for(f in n)n[f]&&(u&&(u+=" "),u+=f);return u}function Er(){for(var n,o,f=0,u="",b=arguments.length;f<b;f++)(n=arguments[f])&&(o=Oe(n))&&(u&&(u+=" "),u+=o);return u}const Rr={box:{borderRadius:({spacing:n})=>`0 0 ${n(.5)} ${n(.5)}`,flex:1,height:"100%",margin:"0 auto",maxWidth:({breakpoints:n})=>n.values.lg,overflow:"auto",position:"relative",width:"100%"}};function _r({children:n,currentAnchor:o,BoxProps:f,className:u,timeout:b=50,onChange:S}){const C=P.useRef(null),R=P.useRef([]),d=P.useRef(0),m=P.useRef(o);P.useEffect(()=>{const h=Array.from(C.current?.querySelectorAll('[data-anchor="true"]')||[]);if(R.current=[...h].reverse(),!R.current.length)throw new Error('initialization of ScrollToAnchor: Missing sections with data-anchor="true" attribute.')},[]),P.useEffect(()=>{const h=T=>{const k=C.current?.querySelector(`#${T}`);if(!k){console.warn(`Warning: navigation of ScrollToAnchor: the section you want to navigate to does not exist. To create it add the #${T} id property to an element.`);return}if(k){k.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});const j=setInterval(()=>{k.offsetTop===d.current&&(m.current=T,clearInterval(j))},b)}};o!==m.current&&h(o)},[o,b]);const g=P.useCallback(()=>{const T=R.current.find(k=>d.current>=k.offsetTop)?.id||"";m.current!==T&&(m.current=T,S(T))},[S]),w=P.useCallback(h=>{h.stopPropagation(),d.current=h.currentTarget.scrollTop,o===m.current&&requestAnimationFrame(()=>g())},[o,g]);return y.jsx(E.Box,{ref:C,sx:Rr.box,...f,className:Er(u),"data-scroller":!0,onScroll:h=>w(h),children:n})}function xr(n){return n.map(o=>{const f=o,u=String(o);return{value:f,label:u}})}exports.ListData=dr;exports.ScrollToAnchor=_r;exports.SectionContainer=yr;exports.TabsToAnchor=mr;exports.createSelectOptionsFromArray=xr;
|
package/dist/index.js
CHANGED
@@ -15,16 +15,16 @@ function Rr() {
|
|
15
15
|
if (Pe)
|
16
16
|
return L;
|
17
17
|
Pe = 1;
|
18
|
-
var n = Fe, o = Symbol.for("react.element"), f = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty,
|
19
|
-
function C(
|
20
|
-
var g, S = {}, h = null,
|
21
|
-
|
18
|
+
var n = Fe, o = Symbol.for("react.element"), f = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, m = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
|
19
|
+
function C(E, d, b) {
|
20
|
+
var g, S = {}, h = null, x = null;
|
21
|
+
b !== void 0 && (h = "" + b), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (x = d.ref);
|
22
22
|
for (g in d)
|
23
23
|
u.call(d, g) && !T.hasOwnProperty(g) && (S[g] = d[g]);
|
24
|
-
if (
|
25
|
-
for (g in d =
|
24
|
+
if (E && E.defaultProps)
|
25
|
+
for (g in d = E.defaultProps, d)
|
26
26
|
S[g] === void 0 && (S[g] = d[g]);
|
27
|
-
return { $$typeof: o, type:
|
27
|
+
return { $$typeof: o, type: E, key: h, ref: x, props: S, _owner: m.current };
|
28
28
|
}
|
29
29
|
return L.Fragment = f, L.jsx = C, L.jsxs = C, L;
|
30
30
|
}
|
@@ -41,7 +41,7 @@ var Y = {};
|
|
41
41
|
var ke;
|
42
42
|
function _r() {
|
43
43
|
return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
|
44
|
-
var n = Fe, o = Symbol.for("react.element"), f = Symbol.for("react.portal"), u = Symbol.for("react.fragment"),
|
44
|
+
var n = Fe, o = Symbol.for("react.element"), f = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), E = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), O = Symbol.iterator, w = "@@iterator";
|
45
45
|
function J(e) {
|
46
46
|
if (e === null || typeof e != "object")
|
47
47
|
return null;
|
@@ -49,7 +49,7 @@ function _r() {
|
|
49
49
|
return typeof r == "function" ? r : null;
|
50
50
|
}
|
51
51
|
var A = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
52
|
-
function
|
52
|
+
function R(e) {
|
53
53
|
{
|
54
54
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
55
55
|
t[a - 1] = arguments[a];
|
@@ -69,7 +69,7 @@ function _r() {
|
|
69
69
|
var $e = !1, We = !1, Me = !1, Le = !1, Ye = !1, ae;
|
70
70
|
ae = Symbol.for("react.module.reference");
|
71
71
|
function Ve(e) {
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e === u || e === T || Ye || e ===
|
72
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === T || Ye || e === m || e === b || e === g || Le || e === x || $e || We || Me || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === S || e.$$typeof === C || e.$$typeof === E || e.$$typeof === d || // This needs to include all possible module reference object
|
73
73
|
// types supported by any Flight configuration anywhere since
|
74
74
|
// we don't know which Flight build this will end up being used
|
75
75
|
// with.
|
@@ -88,7 +88,7 @@ function _r() {
|
|
88
88
|
function P(e) {
|
89
89
|
if (e == null)
|
90
90
|
return null;
|
91
|
-
if (typeof e.tag == "number" &&
|
91
|
+
if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
92
92
|
return e.displayName || e.name || null;
|
93
93
|
if (typeof e == "string")
|
94
94
|
return e;
|
@@ -99,16 +99,16 @@ function _r() {
|
|
99
99
|
return "Portal";
|
100
100
|
case T:
|
101
101
|
return "Profiler";
|
102
|
-
case x:
|
103
|
-
return "StrictMode";
|
104
102
|
case m:
|
103
|
+
return "StrictMode";
|
104
|
+
case b:
|
105
105
|
return "Suspense";
|
106
106
|
case g:
|
107
107
|
return "SuspenseList";
|
108
108
|
}
|
109
109
|
if (typeof e == "object")
|
110
110
|
switch (e.$$typeof) {
|
111
|
-
case
|
111
|
+
case E:
|
112
112
|
var r = e;
|
113
113
|
return oe(r) + ".Consumer";
|
114
114
|
case C:
|
@@ -189,7 +189,7 @@ function _r() {
|
|
189
189
|
})
|
190
190
|
});
|
191
191
|
}
|
192
|
-
W < 0 &&
|
192
|
+
W < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
193
193
|
}
|
194
194
|
}
|
195
195
|
var G = A.ReactCurrentDispatcher, K;
|
@@ -260,14 +260,14 @@ function _r() {
|
|
260
260
|
} catch (k) {
|
261
261
|
if (k && a && typeof k.stack == "string") {
|
262
262
|
for (var i = k.stack.split(`
|
263
|
-
`),
|
264
|
-
`), v = i.length - 1, p =
|
263
|
+
`), _ = a.stack.split(`
|
264
|
+
`), v = i.length - 1, p = _.length - 1; v >= 1 && p >= 0 && i[v] !== _[p]; )
|
265
265
|
p--;
|
266
266
|
for (; v >= 1 && p >= 0; v--, p--)
|
267
|
-
if (i[v] !==
|
267
|
+
if (i[v] !== _[p]) {
|
268
268
|
if (v !== 1 || p !== 1)
|
269
269
|
do
|
270
|
-
if (v--, p--, p < 0 || i[v] !==
|
270
|
+
if (v--, p--, p < 0 || i[v] !== _[p]) {
|
271
271
|
var j = `
|
272
272
|
` + i[v].replace(" at new ", " at ");
|
273
273
|
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, j), j;
|
@@ -297,7 +297,7 @@ function _r() {
|
|
297
297
|
if (typeof e == "string")
|
298
298
|
return V(e);
|
299
299
|
switch (e) {
|
300
|
-
case
|
300
|
+
case b:
|
301
301
|
return V("Suspense");
|
302
302
|
case g:
|
303
303
|
return V("SuspenseList");
|
@@ -334,14 +334,14 @@ function _r() {
|
|
334
334
|
var i = void 0;
|
335
335
|
try {
|
336
336
|
if (typeof e[s] != "function") {
|
337
|
-
var
|
338
|
-
throw
|
337
|
+
var _ = Error((a || "React class") + ": " + t + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
338
|
+
throw _.name = "Invariant Violation", _;
|
339
339
|
}
|
340
340
|
i = e[s](r, s, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
341
341
|
} catch (v) {
|
342
342
|
i = v;
|
343
343
|
}
|
344
|
-
i && !(i instanceof Error) && (q(l),
|
344
|
+
i && !(i instanceof Error) && (q(l), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, s, typeof i), q(null)), i instanceof Error && !(i.message in he) && (he[i.message] = !0, q(l), R("Failed %s type: %s", t, i.message), q(null));
|
345
345
|
}
|
346
346
|
}
|
347
347
|
}
|
@@ -367,7 +367,7 @@ function _r() {
|
|
367
367
|
}
|
368
368
|
function me(e) {
|
369
369
|
if (He(e))
|
370
|
-
return
|
370
|
+
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), ye(e);
|
371
371
|
}
|
372
372
|
var M = A.ReactCurrentOwner, Ze = {
|
373
373
|
key: !0,
|
@@ -395,13 +395,13 @@ function _r() {
|
|
395
395
|
function rr(e, r) {
|
396
396
|
if (typeof e.ref == "string" && M.current && r && M.current.stateNode !== r) {
|
397
397
|
var t = P(M.current.type);
|
398
|
-
Z[t] || (
|
398
|
+
Z[t] || (R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(M.current.type), e.ref), Z[t] = !0);
|
399
399
|
}
|
400
400
|
}
|
401
401
|
function tr(e, r) {
|
402
402
|
{
|
403
403
|
var t = function() {
|
404
|
-
be || (be = !0,
|
404
|
+
be || (be = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
405
405
|
};
|
406
406
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
407
407
|
get: t,
|
@@ -412,7 +412,7 @@ function _r() {
|
|
412
412
|
function nr(e, r) {
|
413
413
|
{
|
414
414
|
var t = function() {
|
415
|
-
Ee || (Ee = !0,
|
415
|
+
Ee || (Ee = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
416
416
|
};
|
417
417
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
418
418
|
get: t,
|
@@ -451,8 +451,8 @@ function _r() {
|
|
451
451
|
};
|
452
452
|
function or(e, r, t, a, l) {
|
453
453
|
{
|
454
|
-
var c, s = {}, i = null,
|
455
|
-
t !== void 0 && (me(t), i = "" + t), er(r) && (me(r.key), i = "" + r.key), Qe(r) && (
|
454
|
+
var c, s = {}, i = null, _ = null;
|
455
|
+
t !== void 0 && (me(t), i = "" + t), er(r) && (me(r.key), i = "" + r.key), Qe(r) && (_ = r.ref, rr(r, l));
|
456
456
|
for (c in r)
|
457
457
|
U.call(r, c) && !Ze.hasOwnProperty(c) && (s[c] = r[c]);
|
458
458
|
if (e && e.defaultProps) {
|
@@ -460,11 +460,11 @@ function _r() {
|
|
460
460
|
for (c in v)
|
461
461
|
s[c] === void 0 && (s[c] = v[c]);
|
462
462
|
}
|
463
|
-
if (i ||
|
463
|
+
if (i || _) {
|
464
464
|
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
465
|
-
i && tr(s, p),
|
465
|
+
i && tr(s, p), _ && nr(s, p);
|
466
466
|
}
|
467
|
-
return ar(e, i,
|
467
|
+
return ar(e, i, _, l, a, M.current, s);
|
468
468
|
}
|
469
469
|
}
|
470
470
|
var Q = A.ReactCurrentOwner, Re = A.ReactDebugCurrentFrame;
|
@@ -526,7 +526,7 @@ Check the top-level render call using <` + t + ">.");
|
|
526
526
|
return;
|
527
527
|
xe[t] = !0;
|
528
528
|
var a = "";
|
529
|
-
e && e._owner && e._owner !== Q.current && (a = " It was passed a child from " + P(e._owner.type) + "."), I(e),
|
529
|
+
e && e._owner && e._owner !== Q.current && (a = " It was passed a child from " + P(e._owner.type) + "."), I(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), I(null);
|
530
530
|
}
|
531
531
|
}
|
532
532
|
function Ce(e, r) {
|
@@ -568,9 +568,9 @@ Check the top-level render call using <` + t + ">.");
|
|
568
568
|
} else if (r.PropTypes !== void 0 && !ee) {
|
569
569
|
ee = !0;
|
570
570
|
var l = P(r);
|
571
|
-
|
571
|
+
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
|
572
572
|
}
|
573
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
573
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
574
574
|
}
|
575
575
|
}
|
576
576
|
function lr(e) {
|
@@ -578,11 +578,11 @@ Check the top-level render call using <` + t + ">.");
|
|
578
578
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
579
579
|
var a = r[t];
|
580
580
|
if (a !== "children" && a !== "key") {
|
581
|
-
I(e),
|
581
|
+
I(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), I(null);
|
582
582
|
break;
|
583
583
|
}
|
584
584
|
}
|
585
|
-
e.ref !== null && (I(e),
|
585
|
+
e.ref !== null && (I(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
|
586
586
|
}
|
587
587
|
}
|
588
588
|
function Se(e, r, t, a, l, c) {
|
@@ -591,10 +591,10 @@ Check the top-level render call using <` + t + ">.");
|
|
591
591
|
if (!s) {
|
592
592
|
var i = "";
|
593
593
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
594
|
-
var
|
595
|
-
|
594
|
+
var _ = ir(l);
|
595
|
+
_ ? i += _ : i += _e();
|
596
596
|
var v;
|
597
|
-
e === null ? v = "null" : H(e) ? v = "array" : e !== void 0 && e.$$typeof === o ? (v = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e,
|
597
|
+
e === null ? v = "null" : H(e) ? v = "array" : e !== void 0 && e.$$typeof === o ? (v = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, i);
|
598
598
|
}
|
599
599
|
var p = or(e, r, t, l, c);
|
600
600
|
if (p == null)
|
@@ -608,7 +608,7 @@ Check the top-level render call using <` + t + ">.");
|
|
608
608
|
Ce(j[$], e);
|
609
609
|
Object.freeze && Object.freeze(j);
|
610
610
|
} else
|
611
|
-
|
611
|
+
R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
612
612
|
else
|
613
613
|
Ce(j, e);
|
614
614
|
}
|
@@ -637,20 +637,20 @@ function Dr({
|
|
637
637
|
itemsToShow: o = 10,
|
638
638
|
label: f,
|
639
639
|
ListProps: u,
|
640
|
-
texts: { showMore:
|
640
|
+
texts: { showMore: m = "View all", showLess: T = "Collapse list" } = {},
|
641
641
|
unit: C,
|
642
|
-
formatter:
|
642
|
+
formatter: E,
|
643
643
|
onRowClick: d
|
644
644
|
}) {
|
645
|
-
const [
|
646
|
-
g(!
|
647
|
-
}, h = (w) =>
|
648
|
-
const w =
|
645
|
+
const [b, g] = pr(!0), S = () => {
|
646
|
+
g(!b);
|
647
|
+
}, h = (w) => E ? E(w) : w, x = hr(() => {
|
648
|
+
const w = b ? o : n.length;
|
649
649
|
return n.slice(0, w);
|
650
|
-
}, [n, o,
|
650
|
+
}, [n, o, b]), O = n.length > o;
|
651
651
|
return /* @__PURE__ */ y.jsxs(D, { width: "100%", height: "auto", children: [
|
652
652
|
f && /* @__PURE__ */ y.jsx(ne, { variant: "caption", color: "textSecondary", gutterBottom: !0, children: f }),
|
653
|
-
/* @__PURE__ */ y.jsx(gr, { ...u, component: "ul", children:
|
653
|
+
/* @__PURE__ */ y.jsx(gr, { ...u, component: "ul", children: x.map((w) => /* @__PURE__ */ y.jsxs(
|
654
654
|
yr,
|
655
655
|
{
|
656
656
|
divider: !0,
|
@@ -669,7 +669,7 @@ function Dr({
|
|
669
669
|
color: "primary",
|
670
670
|
size: "small",
|
671
671
|
onClick: S,
|
672
|
-
children:
|
672
|
+
children: b ? m : T
|
673
673
|
}
|
674
674
|
)
|
675
675
|
] });
|
@@ -713,7 +713,7 @@ function Ar({
|
|
713
713
|
id: o,
|
714
714
|
anchor: f = !1,
|
715
715
|
scrollMarginTop: u = 0,
|
716
|
-
children:
|
716
|
+
children: m,
|
717
717
|
BoxProps: T
|
718
718
|
}) {
|
719
719
|
return /* @__PURE__ */ y.jsxs(
|
@@ -725,7 +725,7 @@ function Ar({
|
|
725
725
|
...T,
|
726
726
|
children: [
|
727
727
|
/* @__PURE__ */ y.jsx(wr, { scrollMarginTop: u, children: /* @__PURE__ */ y.jsx(ne, { variant: "caption", children: n }) }),
|
728
|
-
/* @__PURE__ */ y.jsx(D, { sx: Cr.contentBox, children: /* @__PURE__ */ y.jsx(y.Fragment, { children:
|
728
|
+
/* @__PURE__ */ y.jsx(D, { sx: Cr.contentBox, children: /* @__PURE__ */ y.jsx(y.Fragment, { children: m }) })
|
729
729
|
]
|
730
730
|
}
|
731
731
|
);
|
@@ -757,10 +757,10 @@ function Ir({
|
|
757
757
|
anchor: o,
|
758
758
|
TabsProps: f,
|
759
759
|
variant: u = "standard",
|
760
|
-
onChange:
|
760
|
+
onChange: m
|
761
761
|
}) {
|
762
|
-
const T = (C,
|
763
|
-
C.preventDefault(),
|
762
|
+
const T = (C, E) => {
|
763
|
+
C.preventDefault(), m?.(E);
|
764
764
|
};
|
765
765
|
return /* @__PURE__ */ y.jsx(D, { sx: jr.tabsWrapper, children: /* @__PURE__ */ y.jsx(
|
766
766
|
Er,
|
@@ -781,17 +781,18 @@ function Ae(n) {
|
|
781
781
|
if (typeof n == "string" || typeof n == "number")
|
782
782
|
u += n;
|
783
783
|
else if (typeof n == "object")
|
784
|
-
if (Array.isArray(n))
|
785
|
-
|
784
|
+
if (Array.isArray(n)) {
|
785
|
+
var m = n.length;
|
786
|
+
for (o = 0; o < m; o++)
|
786
787
|
n[o] && (f = Ae(n[o])) && (u && (u += " "), u += f);
|
787
|
-
else
|
788
|
-
for (
|
789
|
-
n[
|
788
|
+
} else
|
789
|
+
for (f in n)
|
790
|
+
n[f] && (u && (u += " "), u += f);
|
790
791
|
return u;
|
791
792
|
}
|
792
793
|
function Or() {
|
793
|
-
for (var n, o, f = 0, u = ""
|
794
|
-
(n = arguments[f
|
794
|
+
for (var n, o, f = 0, u = "", m = arguments.length; f < m; f++)
|
795
|
+
(n = arguments[f]) && (o = Ae(n)) && (u && (u += " "), u += o);
|
795
796
|
return u;
|
796
797
|
}
|
797
798
|
const Pr = {
|
@@ -811,42 +812,46 @@ function $r({
|
|
811
812
|
currentAnchor: o,
|
812
813
|
BoxProps: f,
|
813
814
|
className: u,
|
814
|
-
timeout:
|
815
|
+
timeout: m = 50,
|
815
816
|
onChange: T
|
816
817
|
}) {
|
817
|
-
const C = z(null),
|
818
|
+
const C = z(null), E = z([]), d = z(0), b = z(o);
|
818
819
|
je(() => {
|
819
820
|
const h = Array.from(
|
820
821
|
C.current?.querySelectorAll('[data-anchor="true"]') || []
|
821
822
|
);
|
822
|
-
if (
|
823
|
+
if (E.current = [...h].reverse(), !E.current.length)
|
823
824
|
throw new Error(
|
824
825
|
'initialization of ScrollToAnchor: Missing sections with data-anchor="true" attribute.'
|
825
826
|
);
|
826
827
|
}, []), je(() => {
|
827
|
-
const h = (
|
828
|
-
const O = C.current?.querySelector(`#${
|
828
|
+
const h = (x) => {
|
829
|
+
const O = C.current?.querySelector(`#${x}`);
|
829
830
|
if (!O) {
|
830
831
|
console.warn(
|
831
|
-
`Warning: navigation of ScrollToAnchor: the section you want to navigate to does not exist. To create it add the #${
|
832
|
+
`Warning: navigation of ScrollToAnchor: the section you want to navigate to does not exist. To create it add the #${x} id property to an element.`
|
832
833
|
);
|
833
834
|
return;
|
834
835
|
}
|
835
836
|
if (O) {
|
836
|
-
O.scrollIntoView({
|
837
|
+
O.scrollIntoView({
|
838
|
+
behavior: "smooth",
|
839
|
+
block: "nearest",
|
840
|
+
inline: "start"
|
841
|
+
});
|
837
842
|
const w = setInterval(() => {
|
838
|
-
O.offsetTop === d.current && (
|
839
|
-
},
|
843
|
+
O.offsetTop === d.current && (b.current = x, clearInterval(w));
|
844
|
+
}, m);
|
840
845
|
}
|
841
846
|
};
|
842
|
-
o !==
|
843
|
-
}, [o,
|
847
|
+
o !== b.current && h(o);
|
848
|
+
}, [o, m]);
|
844
849
|
const g = Oe(() => {
|
845
|
-
const
|
846
|
-
|
850
|
+
const x = E.current.find((O) => d.current >= O.offsetTop)?.id || "";
|
851
|
+
b.current !== x && (b.current = x, T(x));
|
847
852
|
}, [T]), S = Oe(
|
848
853
|
(h) => {
|
849
|
-
h.stopPropagation(), d.current = h.currentTarget.scrollTop, o ===
|
854
|
+
h.stopPropagation(), d.current = h.currentTarget.scrollTop, o === b.current && requestAnimationFrame(() => g());
|
850
855
|
},
|
851
856
|
[o, g]
|
852
857
|
);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
2
|
+
import { Theme } from '@mui/material';
|
3
3
|
import { SectionContainerProps } from './types';
|
4
4
|
export declare const styles: {
|
5
5
|
contentBox: {
|
@@ -10,23 +10,13 @@ export declare const styles: {
|
|
10
10
|
type StyledSectionContainerBoxProps = {
|
11
11
|
scrollMarginTop: SectionContainerProps['scrollMarginTop'];
|
12
12
|
};
|
13
|
-
export declare const StyledSectionContainerBox: import("@emotion/styled").StyledComponent<import("@mui/system").
|
14
|
-
children?: import("react").ReactNode;
|
15
|
-
component?: import("react").ElementType<any> | undefined;
|
16
|
-
ref?: import("react").Ref<unknown> | undefined;
|
17
|
-
sx?: SxProps<Theme> | undefined;
|
18
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
13
|
+
export declare const StyledSectionContainerBox: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
19
14
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
20
|
-
},
|
15
|
+
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme> & StyledSectionContainerBoxProps, {}, {}>;
|
21
16
|
type StyledTitleBoxProp = {
|
22
17
|
scrollMarginTop: SectionContainerProps['scrollMarginTop'];
|
23
18
|
};
|
24
|
-
export declare const StyledTitleBox: import("@emotion/styled").StyledComponent<import("@mui/system").
|
25
|
-
children?: import("react").ReactNode;
|
26
|
-
component?: import("react").ElementType<any> | undefined;
|
27
|
-
ref?: import("react").Ref<unknown> | undefined;
|
28
|
-
sx?: SxProps<Theme> | undefined;
|
29
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
19
|
+
export declare const StyledTitleBox: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
30
20
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
31
|
-
},
|
21
|
+
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme> & StyledTitleBoxProp, {}, {}>;
|
32
22
|
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carto/ps-react-ui",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.3",
|
4
4
|
"description": "CARTO's Professional Service React UI library",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -19,8 +19,8 @@
|
|
19
19
|
"scripts": {
|
20
20
|
"start": "npm run storybook:start",
|
21
21
|
"prebuild": "npm exec rimraf dist",
|
22
|
-
"build": "tsc -p tsconfig.
|
23
|
-
"lint": "eslint './**/*.{ts,tsx}' --ignore-path ../../.gitignore
|
22
|
+
"build": "tsc -p tsconfig.build.json && vite build",
|
23
|
+
"lint": "eslint './**/*.{ts,tsx}' --ignore-path ../../.gitignore",
|
24
24
|
"format": "prettier --write . --ignore-path ../../.gitignore",
|
25
25
|
"test:watch": "vitest",
|
26
26
|
"test:related": "vitest --run --passWithNoTests",
|
@@ -29,38 +29,22 @@
|
|
29
29
|
"storybook:build": "storybook build"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@emotion/react": "11.11.
|
32
|
+
"@emotion/react": "11.11.3",
|
33
33
|
"@emotion/styled": "11.11.0",
|
34
|
-
"@mui/icons-material": "5.
|
35
|
-
"@mui/lab": "5.0.0-alpha.
|
36
|
-
"@mui/material": "5.
|
37
|
-
"echarts": "5.4.3",
|
38
|
-
"echarts-for-react": "3.0.2",
|
39
|
-
"react-window": "1.8.9"
|
34
|
+
"@mui/icons-material": "5.15.9",
|
35
|
+
"@mui/lab": "5.0.0-alpha.165",
|
36
|
+
"@mui/material": "5.15.9"
|
40
37
|
},
|
41
38
|
"devDependencies": {
|
42
|
-
"@carto/react-ui": "2.
|
43
|
-
"@storybook/addon-actions": "7.1.1",
|
44
|
-
"@storybook/addon-essentials": "7.1.1",
|
45
|
-
"@storybook/addon-interactions": "7.1.1",
|
46
|
-
"@storybook/addon-links": "7.1.1",
|
47
|
-
"@storybook/blocks": "7.1.1",
|
48
|
-
"@storybook/builder-vite": "7.1.1",
|
49
|
-
"@storybook/react": "7.1.1",
|
50
|
-
"@storybook/react-vite": "7.1.1",
|
51
|
-
"@storybook/testing-library": "0.2.0",
|
52
|
-
"@vitejs/plugin-react-swc": "3.3.2",
|
53
|
-
"storybook": "7.1.1"
|
39
|
+
"@carto/react-ui": "2.3.10"
|
54
40
|
},
|
55
41
|
"peerDependencies": {
|
56
42
|
"@emotion/react": "11.x",
|
43
|
+
"@emotion/styled": "11.x",
|
57
44
|
"@mui/icons-material": "5.x",
|
58
45
|
"@mui/lab": "5.x",
|
59
46
|
"@mui/material": "5.x",
|
60
|
-
"echarts": "5.x",
|
61
|
-
"echarts-for-react": "3.x",
|
62
47
|
"react": "17.x || 18.x",
|
63
|
-
"react-dom": "17.x || 18.x"
|
64
|
-
"react-window": "1.x"
|
48
|
+
"react-dom": "17.x || 18.x"
|
65
49
|
}
|
66
50
|
}
|