@binamik/components 0.1.2 → 0.1.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(C,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("@emotion/react"),require("@emotion/styled"),require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","@emotion/react","@emotion/styled","react","framer-motion"],R):(C=typeof globalThis<"u"?globalThis:C||self,R(C.BinamikCompoents={},C["emotion-react"],C.styled,C.React,C.framerMotion))})(this,function(C,R,O,h,j){"use strict";const ar=R.keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
stroke-dasharray: 1, 200;
|
|
4
4
|
stroke-dashoffset: 0;
|
|
@@ -11,22 +11,22 @@
|
|
|
11
11
|
stroke-dasharray: 89, 200;
|
|
12
12
|
stroke-dashoffset: -124px;
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,nr=R.keyframes`
|
|
15
15
|
100% {
|
|
16
16
|
transform: rotate(360deg);
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,or=O.div`
|
|
19
19
|
position: relative;
|
|
20
20
|
margin: 0 auto;
|
|
21
|
-
width: ${({size:
|
|
21
|
+
width: ${({size:r})=>r||"1.5rem"};
|
|
22
22
|
|
|
23
23
|
&:before {
|
|
24
24
|
content: '';
|
|
25
25
|
display: block;
|
|
26
26
|
padding-top: 100%;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
29
|
-
animation: ${
|
|
28
|
+
`,ir=O.svg`
|
|
29
|
+
animation: ${nr} 2s linear infinite;
|
|
30
30
|
height: 100%;
|
|
31
31
|
transform-origin: center center;
|
|
32
32
|
width: 100%;
|
|
@@ -36,31 +36,48 @@
|
|
|
36
36
|
left: 0;
|
|
37
37
|
right: 0;
|
|
38
38
|
margin: auto;
|
|
39
|
-
`,
|
|
39
|
+
`,lr=O.circle`
|
|
40
40
|
stroke-dasharray: 1, 200;
|
|
41
41
|
stroke-dashoffset: 0;
|
|
42
|
-
animation: ${
|
|
42
|
+
animation: ${ar} 1.5s ease-in-out infinite;
|
|
43
43
|
stroke-linecap: round;
|
|
44
|
-
`;var
|
|
44
|
+
`;var Z={exports:{}},I={};/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
48
|
+
*/var Q,xe;function ge(){if(xe)return Q;xe=1;var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function c(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function f(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var x={},i=0;i<10;i++)x["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(x).map(function(p){return x[p]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(p){u[p]=p}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Q=f()?Object.assign:function(d,x){for(var i,l=c(d),u,p=1;p<arguments.length;p++){i=Object(arguments[p]);for(var b in i)o.call(i,b)&&(l[b]=i[b]);if(r){u=r(i);for(var _=0;_<u.length;_++)n.call(i,u[_])&&(l[u[_]]=i[u[_]])}}return l},Q}/** @license React v17.0.2
|
|
49
49
|
* react-jsx-runtime.production.min.js
|
|
50
50
|
*
|
|
51
51
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the MIT license found in the
|
|
54
54
|
* LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/var
|
|
55
|
+
*/var be;function sr(){if(be)return I;be=1,ge();var r=h,o=60103;if(I.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var n=Symbol.for;o=n("react.element"),I.Fragment=n("react.fragment")}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f=Object.prototype.hasOwnProperty,d={key:!0,ref:!0,__self:!0,__source:!0};function x(i,l,u){var p,b={},_=null,$=null;u!==void 0&&(_=""+u),l.key!==void 0&&(_=""+l.key),l.ref!==void 0&&($=l.ref);for(p in l)f.call(l,p)&&!d.hasOwnProperty(p)&&(b[p]=l[p]);if(i&&i.defaultProps)for(p in l=i.defaultProps,l)b[p]===void 0&&(b[p]=l[p]);return{$$typeof:o,type:i,key:_,ref:$,props:b,_owner:c.current}}return I.jsx=x,I.jsxs=x,I}var ee={};/** @license React v17.0.2
|
|
56
|
+
* react-jsx-runtime.development.js
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the MIT license found in the
|
|
61
|
+
* LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/var me;function cr(){return me||(me=1,function(r){process.env.NODE_ENV!=="production"&&function(){var o=h,n=ge(),c=60103,f=60106;r.Fragment=60107;var d=60108,x=60114,i=60109,l=60110,u=60112,p=60113,b=60120,_=60115,$=60116,z=60121,Ae=60122,je=60117,Se=60129,$e=60131;if(typeof Symbol=="function"&&Symbol.for){var k=Symbol.for;c=k("react.element"),f=k("react.portal"),r.Fragment=k("react.fragment"),d=k("react.strict_mode"),x=k("react.profiler"),i=k("react.provider"),l=k("react.context"),u=k("react.forward_ref"),p=k("react.suspense"),b=k("react.suspense_list"),_=k("react.memo"),$=k("react.lazy"),z=k("react.block"),Ae=k("react.server.block"),je=k("react.fundamental"),k("react.scope"),k("react.opaque.id"),Se=k("react.debug_trace_mode"),k("react.offscreen"),$e=k("react.legacy_hidden")}var Fe=typeof Symbol=="function"&&Symbol.iterator,Kr="@@iterator";function Jr(e){if(e===null||typeof e!="object")return null;var t=Fe&&e[Fe]||e[Kr];return typeof t=="function"?t:null}var M=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(e){{for(var t=arguments.length,a=new Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];Xr("error",e,a)}}function Xr(e,t,a){{var s=M.ReactDebugCurrentFrame,y=s.getStackAddendum();y!==""&&(t+="%s",a=a.concat([y]));var w=a.map(function(m){return""+m});w.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,w)}}var Zr=!1;function Qr(e){return!!(typeof e=="string"||typeof e=="function"||e===r.Fragment||e===x||e===Se||e===d||e===p||e===b||e===$e||Zr||typeof e=="object"&&e!==null&&(e.$$typeof===$||e.$$typeof===_||e.$$typeof===i||e.$$typeof===l||e.$$typeof===u||e.$$typeof===je||e.$$typeof===z||e[0]===Ae))}function et(e,t,a){var s=t.displayName||t.name||"";return e.displayName||(s!==""?a+"("+s+")":a)}function De(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&A("Received an unexpected object in getComponentName(). 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 r.Fragment:return"Fragment";case f:return"Portal";case x:return"Profiler";case d:return"StrictMode";case p:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l:var t=e;return De(t)+".Consumer";case i:var a=e;return De(a._context)+".Provider";case u:return et(e,e.render,"ForwardRef");case _:return F(e.type);case z:return F(e._render);case $:{var s=e,y=s._payload,w=s._init;try{return F(w(y))}catch{return null}}}return null}var q=0,Be,Ne,Ie,ze,Me,We,Le;function Ye(){}Ye.__reactDisabledLog=!0;function rt(){{if(q===0){Be=console.log,Ne=console.info,Ie=console.warn,ze=console.error,Me=console.group,We=console.groupCollapsed,Le=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ye,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function tt(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:n({},e,{value:Be}),info:n({},e,{value:Ne}),warn:n({},e,{value:Ie}),error:n({},e,{value:ze}),group:n({},e,{value:Me}),groupCollapsed:n({},e,{value:We}),groupEnd:n({},e,{value:Le})})}q<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=M.ReactCurrentDispatcher,le;function G(e,t,a){{if(le===void 0)try{throw Error()}catch(y){var s=y.stack.trim().match(/\n( *(at )?)/);le=s&&s[1]||""}return`
|
|
63
|
+
`+le+e}}var se=!1,K;{var at=typeof WeakMap=="function"?WeakMap:Map;K=new at}function qe(e,t){if(!e||se)return"";{var a=K.get(e);if(a!==void 0)return a}var s;se=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=ie.current,ie.current=null,rt();try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(B){s=B}Reflect.construct(e,[],m)}else{try{m.call()}catch(B){s=B}e.call(m.prototype)}}else{try{throw Error()}catch(B){s=B}e()}}catch(B){if(B&&s&&typeof B.stack=="string"){for(var g=B.stack.split(`
|
|
64
|
+
`),P=s.stack.split(`
|
|
65
|
+
`),E=g.length-1,T=P.length-1;E>=1&&T>=0&&g[E]!==P[T];)T--;for(;E>=1&&T>=0;E--,T--)if(g[E]!==P[T]){if(E!==1||T!==1)do if(E--,T--,T<0||g[E]!==P[T]){var D=`
|
|
66
|
+
`+g[E].replace(" at new "," at ");return typeof e=="function"&&K.set(e,D),D}while(E>=1&&T>=0);break}}}finally{se=!1,ie.current=w,tt(),Error.prepareStackTrace=y}var L=e?e.displayName||e.name:"",tr=L?G(L):"";return typeof e=="function"&&K.set(e,tr),tr}function Ue(e,t,a){return qe(e,!1)}function nt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function J(e,t,a){if(e==null)return"";if(typeof e=="function")return qe(e,nt(e));if(typeof e=="string")return G(e);switch(e){case p:return G("Suspense");case b:return G("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return Ue(e.render);case _:return J(e.type,t,a);case z:return Ue(e._render);case $:{var s=e,y=s._payload,w=s._init;try{return J(w(y),t,a)}catch{}}}return""}var Ve={},He=M.ReactDebugCurrentFrame;function X(e){if(e){var t=e._owner,a=J(e.type,e._source,t?t.type:null);He.setExtraStackFrame(a)}else He.setExtraStackFrame(null)}function ot(e,t,a,s,y){{var w=Function.call.bind(Object.prototype.hasOwnProperty);for(var m in e)if(w(e,m)){var g=void 0;try{if(typeof e[m]!="function"){var P=Error((s||"React class")+": "+a+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}g=e[m](t,m,s,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){g=E}g&&!(g instanceof Error)&&(X(y),A("%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).",s||"React class",a,m,typeof g),X(null)),g instanceof Error&&!(g.message in Ve)&&(Ve[g.message]=!0,X(y),A("Failed %s type: %s",a,g.message),X(null))}}}var U=M.ReactCurrentOwner,ce=Object.prototype.hasOwnProperty,it={key:!0,ref:!0,__self:!0,__source:!0},Ge,Ke,ue;ue={};function lt(e){if(ce.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function st(e){if(ce.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function ct(e,t){if(typeof e.ref=="string"&&U.current&&t&&U.current.stateNode!==t){var a=F(U.current.type);ue[a]||(A('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(U.current.type),e.ref),ue[a]=!0)}}function ut(e,t){{var a=function(){Ge||(Ge=!0,A("%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)",t))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function pt(e,t){{var a=function(){Ke||(Ke=!0,A("%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)",t))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var dt=function(e,t,a,s,y,w,m){var g={$$typeof:c,type:e,key:t,ref:a,props:m,_owner:w};return g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(g,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(g,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g};function ft(e,t,a,s,y){{var w,m={},g=null,P=null;a!==void 0&&(g=""+a),st(t)&&(g=""+t.key),lt(t)&&(P=t.ref,ct(t,y));for(w in t)ce.call(t,w)&&!it.hasOwnProperty(w)&&(m[w]=t[w]);if(e&&e.defaultProps){var E=e.defaultProps;for(w in E)m[w]===void 0&&(m[w]=E[w])}if(g||P){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;g&&ut(m,T),P&&pt(m,T)}return dt(e,g,P,y,s,U.current,m)}}var pe=M.ReactCurrentOwner,Je=M.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,a=J(e.type,e._source,t?t.type:null);Je.setExtraStackFrame(a)}else Je.setExtraStackFrame(null)}var de;de=!1;function fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===c}function Xe(){{if(pe.current){var e=F(pe.current.type);if(e)return`
|
|
67
|
+
|
|
68
|
+
Check the render method of \``+e+"`."}return""}}function xt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
|
|
69
|
+
|
|
70
|
+
Check your code at `+t+":"+a+"."}return""}}var Ze={};function gt(e){{var t=Xe();if(!t){var a=typeof e=="string"?e:e.displayName||e.name;a&&(t=`
|
|
71
|
+
|
|
72
|
+
Check the top-level render call using <`+a+">.")}return t}}function Qe(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=gt(t);if(Ze[a])return;Ze[a]=!0;var s="";e&&e._owner&&e._owner!==pe.current&&(s=" It was passed a child from "+F(e._owner.type)+"."),W(e),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,s),W(null)}}function er(e,t){{if(typeof e!="object")return;if(Array.isArray(e))for(var a=0;a<e.length;a++){var s=e[a];fe(s)&&Qe(s,t)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var y=Jr(e);if(typeof y=="function"&&y!==e.entries)for(var w=y.call(e),m;!(m=w.next()).done;)fe(m.value)&&Qe(m.value,t)}}}function bt(e){{var t=e.type;if(t==null||typeof t=="string")return;var a;if(typeof t=="function")a=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===u||t.$$typeof===_))a=t.propTypes;else return;if(a){var s=F(t);ot(a,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!de){de=!0;var y=F(t);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mt(e){{for(var t=Object.keys(e.props),a=0;a<t.length;a++){var s=t[a];if(s!=="children"&&s!=="key"){W(e),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),W(null);break}}e.ref!==null&&(W(e),A("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function rr(e,t,a,s,y,w){{var m=Qr(e);if(!m){var g="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(g+=" 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 P=xt(y);P?g+=P:g+=Xe();var E;e===null?E="null":Array.isArray(e)?E="array":e!==void 0&&e.$$typeof===c?(E="<"+(F(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,g)}var T=ft(e,t,a,y,w);if(T==null)return T;if(m){var D=t.children;if(D!==void 0)if(s)if(Array.isArray(D)){for(var L=0;L<D.length;L++)er(D[L],e);Object.freeze&&Object.freeze(D)}else A("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 er(D,e)}return e===r.Fragment?mt(T):bt(T),T}}function vt(e,t,a){return rr(e,t,a,!0)}function ht(e,t,a){return rr(e,t,a,!1)}var yt=ht,wt=vt;r.jsx=yt,r.jsxs=wt}()}(ee)),ee}process.env.NODE_ENV==="production"?Z.exports=sr():Z.exports=cr();var re=Z.exports;const v=re.jsx,S=re.jsxs,Y=re.Fragment,ve=({size:r,color:o,thickness:n})=>v(or,{size:r,children:v(ir,{viewBox:"25 25 50 50",children:v(lr,{className:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:o||"currentColor",opacity:"0.5",strokeWidth:n||5,strokeMiterlimit:"10"})})}),ur=R.keyframes`
|
|
56
73
|
100% {
|
|
57
74
|
opacity: 0.5;
|
|
58
75
|
}
|
|
59
|
-
`,
|
|
76
|
+
`,pr=O.button`
|
|
60
77
|
--button-hover-brightness: 0.88;
|
|
61
78
|
|
|
62
79
|
position: relative;
|
|
63
|
-
padding: ${({isLoading:
|
|
80
|
+
padding: ${({isLoading:r,hasLoadingText:o})=>r&&o?"0.75em 1.125em 0.75em 2.5em":"0.75em 1.25em"};
|
|
64
81
|
border-radius: 30px;
|
|
65
82
|
border: 0;
|
|
66
83
|
|
|
@@ -74,7 +91,7 @@ object-assign
|
|
|
74
91
|
cursor: pointer;
|
|
75
92
|
|
|
76
93
|
.button__text_wrapper {
|
|
77
|
-
animation: ${({isLoading:
|
|
94
|
+
animation: ${({isLoading:r})=>r?ur:"none"} 0.75s infinite
|
|
78
95
|
alternate;
|
|
79
96
|
}
|
|
80
97
|
|
|
@@ -121,20 +138,20 @@ object-assign
|
|
|
121
138
|
content: '';
|
|
122
139
|
display: block;
|
|
123
140
|
|
|
124
|
-
width: ${({isLoading:
|
|
141
|
+
width: ${({isLoading:r,hasLoadingText:o})=>r&&o?"2em":"0"};
|
|
125
142
|
}
|
|
126
143
|
|
|
127
144
|
.button__spinner_wrapper {
|
|
128
145
|
margin: -0.5em 0;
|
|
129
|
-
display: ${({isLoading:
|
|
130
|
-
${({hasLoadingText:
|
|
146
|
+
display: ${({isLoading:r})=>r?"block":"none"};
|
|
147
|
+
${({hasLoadingText:r})=>r&&R.css`
|
|
131
148
|
top: calc(50% + 0.5em);
|
|
132
149
|
transform: translateY(-50%);
|
|
133
150
|
position: absolute;
|
|
134
151
|
left: 0.5rem;
|
|
135
152
|
`}
|
|
136
153
|
}
|
|
137
|
-
`,
|
|
154
|
+
`,dr=({disabled:r=!1,isLoading:o=!1,loadingText:n="",outlined:c=!1,className:f="",children:d,...x})=>S(pr,{disabled:r||o,isLoading:o,hasLoadingText:!!n,className:`${f} ${c?"button__outline":""}`,type:"button",...x,children:[v("div",{className:"button__spinner_wrapper",children:v(ve,{size:"1.5em"})}),v("span",{className:"button__text_wrapper",children:o?n||"":d})]}),fr=R.css`
|
|
138
155
|
:root {
|
|
139
156
|
--clr-white: #ffffff;
|
|
140
157
|
--clr-black: #000000;
|
|
@@ -234,7 +251,7 @@ object-assign
|
|
|
234
251
|
|
|
235
252
|
--bp-tablet: 64rem; // 1024px
|
|
236
253
|
}
|
|
237
|
-
`,
|
|
254
|
+
`,xr=R.css`
|
|
238
255
|
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
|
|
239
256
|
blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em,
|
|
240
257
|
img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u,
|
|
@@ -320,7 +337,7 @@ object-assign
|
|
|
320
337
|
background-clip: text;
|
|
321
338
|
-webkit-background-clip: text;
|
|
322
339
|
}
|
|
323
|
-
`,
|
|
340
|
+
`,gr=R.css`
|
|
324
341
|
body {
|
|
325
342
|
line-height: 1;
|
|
326
343
|
color: #444;
|
|
@@ -382,15 +399,15 @@ object-assign
|
|
|
382
399
|
.primary_color_txt {
|
|
383
400
|
color: var(--clr-primary);
|
|
384
401
|
}
|
|
385
|
-
`,
|
|
386
|
-
${
|
|
387
|
-
${
|
|
402
|
+
`,br=(r="normal")=>r==="light"?"rgba(0, 0, 0, 0.05)":r==="normal"?"rgba(0, 0, 0, 0.1)":"rgba(0, 0, 0, 0.2)",mr=(r="normal")=>r==="light"?"rgba(0, 0, 0, 0.03)":r==="normal"?"rgba(0, 0, 0, 0.07)":"rgba(0, 0, 0, 0.14)",vr=(r="normal")=>r==="light"?"rgba(0, 0, 0, 0.02)":r==="normal"?"rgba(0, 0, 0, 0.06)":"rgba(0, 0, 0, 0.12)",hr={0:"0px 0px 0px 0px",1:"0px 2px 1px -1px",2:"0px 3px 1px -2px",3:"0px 3px 3px -2px",4:"0px 2px 4px -1px",5:"0px 3px 5px -1px",6:"0px 3px 5px -1px",7:"0px 4px 5px -2px",8:"0px 5px 5px -3px",9:"0px 5px 6px -3px",10:"0px 6px 6px -3px",11:"0px 6px 7px -4px",12:"0px 7px 8px -4px",13:"0px 7px 8px -4px",14:"0px 7px 9px -4px",15:"0px 8px 9px -5px",16:"0px 8px 10px -5px",17:"0px 8px 11px -5px",18:"0px 9px 11px -5px",19:"0px 9px 12px -6px",20:"0px 10px 13px -6px",21:"0px 10px 13px -6px",22:"0px 10px 14px -6px",23:"0px 11px 14px -7px",24:"0px 11px 15px -7px"},yr={0:"0px 0px 0px 0px",1:"0px 1px 1px 0px",2:"0px 2px 2px 0px",3:"0px 3px 4px 0px",4:"0px 4px 5px 0px",5:"0px 5px 8px 0px",6:"0px 6px 10px 0px",7:"0px 7px 10px 1px",8:"0px 8px 10px 1px",9:"0px 9px 12px 1px",10:"0px 10px 14px 1px",11:"0px 11px 15px 1px",12:"0px 12px 17px 2px",13:"0px 13px 19px 2px",14:"0px 14px 21px 2px",15:"0px 15px 22px 2px",16:"0px 16px 24px 2px",17:"0px 17px 26px 2px",18:"0px 18px 28px 2px",19:"0px 19px 29px 2px",20:"0px 20px 31px 3px",21:"0px 21px 33px 3px",22:"0px 22px 35px 3px",23:"0px 23px 36px 3px",24:"0px 24px 38px 3px"},wr={0:"0px 0px 0px 0px",1:"0px 1px 3px 0px",2:"0px 1px 5px 0px",3:"0px 1px 8px 0px",4:"0px 1px 10px 0px",5:"0px 1px 14px 0px",6:"0px 1px 18px 0px",7:"0px 2px 16px 1px",8:"0px 3px 14px 2px",9:"0px 3px 16px 2px",10:"0px 4px 18px 3px",11:"0px 4px 20px 3px",12:"0px 5px 22px 4px",13:"0px 5px 24px 4px",14:"0px 5px 26px 4px",15:"0px 6px 28px 5px",16:"0px 6px 30px 5px",17:"0px 6px 32px 5px",18:"0px 7px 34px 6px",19:"0px 7px 36px 6px",20:"0px 8px 38px 7px",21:"0px 8px 40px 7px",22:"0px 8px 42px 7px",23:"0px 9px 44px 8px",24:"0px 9px 46px 8px"},he=(r,o="light")=>`box-shadow: ${hr[r]} ${br(o)},
|
|
403
|
+
${yr[r]} ${mr(o)},
|
|
404
|
+
${wr[r]} ${vr(o)};`,Er=()=>v(R.Global,{styles:R.css`
|
|
388
405
|
body {
|
|
389
406
|
overflow: hidden;
|
|
390
407
|
}
|
|
391
|
-
`}),
|
|
408
|
+
`}),te=480,_r=r=>Math.max(r.mobileBreakpoint,te),kr={shouldForwardProp(r){return!["columnTemplate","mobileBreakpoint","customCss"].includes(r)}},Tr=O(j.motion.div,kr)`
|
|
392
409
|
--radius: 0.625rem;
|
|
393
|
-
--column-template: ${
|
|
410
|
+
--column-template: ${r=>r.columnTemplate};
|
|
394
411
|
--table-padding: 1.875rem;
|
|
395
412
|
|
|
396
413
|
--header-row-display: grid;
|
|
@@ -433,7 +450,7 @@ object-assign
|
|
|
433
450
|
box-sizing: border-box;
|
|
434
451
|
}
|
|
435
452
|
|
|
436
|
-
@media (max-width: ${
|
|
453
|
+
@media (max-width: ${_r}px) {
|
|
437
454
|
--column-template: 1fr;
|
|
438
455
|
|
|
439
456
|
--header-row-display: none;
|
|
@@ -468,8 +485,8 @@ object-assign
|
|
|
468
485
|
--cell-padding: 0.8rem 0.65rem;
|
|
469
486
|
}
|
|
470
487
|
|
|
471
|
-
${
|
|
472
|
-
`,
|
|
488
|
+
${r=>r.customCss}
|
|
489
|
+
`,Cr=O(j.motion.div)`
|
|
473
490
|
width: auto;
|
|
474
491
|
position: relative;
|
|
475
492
|
border: var(--row-annex-border);
|
|
@@ -478,7 +495,7 @@ object-assign
|
|
|
478
495
|
padding: var(--row-annex-padding);
|
|
479
496
|
background-color: rgba(255, 255, 255, 0.6);
|
|
480
497
|
transition: background-color var(--highlight-transition);
|
|
481
|
-
`,
|
|
498
|
+
`,ye=R.css`
|
|
482
499
|
display: grid;
|
|
483
500
|
width: 100%;
|
|
484
501
|
grid-template-columns: var(--column-template);
|
|
@@ -489,7 +506,7 @@ object-assign
|
|
|
489
506
|
color: var(--clr-gray3);
|
|
490
507
|
min-height: 0;
|
|
491
508
|
min-width: 0;
|
|
492
|
-
`,
|
|
509
|
+
`,Or=O(j.motion.li)`
|
|
493
510
|
margin: var(--row-margin);
|
|
494
511
|
border: var(--row-border);
|
|
495
512
|
border-radius: var(--radius);
|
|
@@ -512,8 +529,8 @@ object-assign
|
|
|
512
529
|
&:not(.empty_row):hover {
|
|
513
530
|
background-color: var(--row-hover-background);
|
|
514
531
|
}
|
|
515
|
-
`,
|
|
516
|
-
${
|
|
532
|
+
`,Rr=O(j.motion.div)`
|
|
533
|
+
${ye}
|
|
517
534
|
|
|
518
535
|
max-width: 100%;
|
|
519
536
|
min-width: 0;
|
|
@@ -524,26 +541,26 @@ object-assign
|
|
|
524
541
|
&:last-of-type .TableCellWrapper:last-of-type .TableCellRef {
|
|
525
542
|
border-radius: 0 0 0 var(--radius);
|
|
526
543
|
}
|
|
527
|
-
`,
|
|
528
|
-
${
|
|
544
|
+
`,Pr=O(j.motion.div)`
|
|
545
|
+
${ye}
|
|
529
546
|
min-height: 4.375rem;
|
|
530
547
|
background-color: var(--label-background);
|
|
531
548
|
font-weight: bold;
|
|
532
549
|
color: var(--clr-gray3);
|
|
533
550
|
border-radius: var(--radius);
|
|
534
551
|
display: var(--header-row-display);
|
|
535
|
-
`,
|
|
552
|
+
`,Ar=O(j.motion.ul)`
|
|
536
553
|
width: 100%;
|
|
537
554
|
list-style: none;
|
|
538
555
|
margin: 0;
|
|
539
556
|
padding: 0;
|
|
540
|
-
`,
|
|
557
|
+
`,ae=R.css`
|
|
541
558
|
padding: var(--cell-padding);
|
|
542
559
|
height: 100%;
|
|
543
560
|
display: flex;
|
|
544
561
|
align-items: center;
|
|
545
562
|
margin: 0;
|
|
546
|
-
`,
|
|
563
|
+
`,jr=R.css`
|
|
547
564
|
position: relative;
|
|
548
565
|
|
|
549
566
|
&::before {
|
|
@@ -571,12 +588,12 @@ object-assign
|
|
|
571
588
|
&:first-of-type::before {
|
|
572
589
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
573
590
|
}
|
|
574
|
-
`,
|
|
575
|
-
${
|
|
591
|
+
`,Sr=O.div`
|
|
592
|
+
${ae}
|
|
576
593
|
|
|
577
594
|
width: 100%;
|
|
578
|
-
|
|
579
|
-
${
|
|
595
|
+
`,$r=O.div`
|
|
596
|
+
${jr}
|
|
580
597
|
|
|
581
598
|
min-width: 0;
|
|
582
599
|
|
|
@@ -596,14 +613,14 @@ object-assign
|
|
|
596
613
|
border-radius: var(--radius) 0 0 0;
|
|
597
614
|
}
|
|
598
615
|
}
|
|
599
|
-
`,
|
|
600
|
-
${
|
|
616
|
+
`,Fr=O.div`
|
|
617
|
+
${ae}
|
|
601
618
|
|
|
602
619
|
display: var(--mobile-ref-display);
|
|
603
620
|
background-color: var(--label-background);
|
|
604
621
|
font-weight: bold;
|
|
605
622
|
color: var(--clr-gray3);
|
|
606
|
-
`,
|
|
623
|
+
`,Dr=R.css`
|
|
607
624
|
&.sortable,
|
|
608
625
|
&.sorted-asc,
|
|
609
626
|
&.sorted-desc {
|
|
@@ -658,8 +675,8 @@ object-assign
|
|
|
658
675
|
margin-top: 0.2ch;
|
|
659
676
|
}
|
|
660
677
|
}
|
|
661
|
-
`,
|
|
662
|
-
${
|
|
678
|
+
`,Br=O.div`
|
|
679
|
+
${ae}
|
|
663
680
|
transition: background-color var(--highlight-transition);
|
|
664
681
|
border-radius: var(--radius);
|
|
665
682
|
|
|
@@ -667,8 +684,8 @@ object-assign
|
|
|
667
684
|
background-color: var(--clr-gray8);
|
|
668
685
|
}
|
|
669
686
|
|
|
670
|
-
${
|
|
671
|
-
`,
|
|
687
|
+
${Dr}
|
|
688
|
+
`,Nr=O(j.motion.button)`
|
|
672
689
|
display: var(--mobile-sorting-display);
|
|
673
690
|
align-items: center;
|
|
674
691
|
color: var(--clr-gray3);
|
|
@@ -703,7 +720,9 @@ object-assign
|
|
|
703
720
|
border-width: 0 1px 1px 0;
|
|
704
721
|
transform: rotate(45deg);
|
|
705
722
|
margin: 0 0.25rem;
|
|
706
|
-
transition:
|
|
723
|
+
transition:
|
|
724
|
+
transform 300ms,
|
|
725
|
+
margin 300ms;
|
|
707
726
|
margin-bottom: 0.25rem;
|
|
708
727
|
}
|
|
709
728
|
|
|
@@ -716,7 +735,7 @@ object-assign
|
|
|
716
735
|
}
|
|
717
736
|
}
|
|
718
737
|
}
|
|
719
|
-
`,
|
|
738
|
+
`,Ir=O(j.motion.div)`
|
|
720
739
|
position: absolute;
|
|
721
740
|
top: 2.5rem;
|
|
722
741
|
right: 0;
|
|
@@ -733,8 +752,8 @@ object-assign
|
|
|
733
752
|
overflow: auto;
|
|
734
753
|
max-height: calc(100vh - 5rem);
|
|
735
754
|
transform-origin: top right;
|
|
736
|
-
${
|
|
737
|
-
`,
|
|
755
|
+
${he(8)}
|
|
756
|
+
`,zr=O.button`
|
|
738
757
|
background-color: var(--clr-white);
|
|
739
758
|
padding: 0.5rem;
|
|
740
759
|
border-radius: var(--radius);
|
|
@@ -756,7 +775,7 @@ object-assign
|
|
|
756
775
|
&:hover {
|
|
757
776
|
background-color: var(--clr-gray8);
|
|
758
777
|
}
|
|
759
|
-
`,
|
|
778
|
+
`,Mr=O(j.motion.button)`
|
|
760
779
|
position: fixed;
|
|
761
780
|
inset: 0;
|
|
762
781
|
z-index: 10;
|
|
@@ -764,6 +783,6 @@ object-assign
|
|
|
764
783
|
height: 100%;
|
|
765
784
|
background-color: transparent;
|
|
766
785
|
cursor: default;
|
|
767
|
-
`,
|
|
786
|
+
`,V=`
|
|
768
787
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
769
|
-
`,
|
|
788
|
+
`,we=(r=[])=>r.map(({width:n})=>(n==null?void 0:n.replace(/\s/g,""))||"1fr").join(" "),Wr=({columns:r=[],children:o=[],mobileBreakpoint:n=900})=>{n<te&&console.warn(`Table: mobileBreakpoint (${n}) is too small. The minimum of ${te} will be used instead.${V}`),we(r).split(" ").map((i,l)=>({value:i,idx:l})).filter(i=>!CSS.supports("grid-template-columns",i.value)).forEach(i=>{const l=i.value.replace(/"/g,'\\"');console.warn(`Table: Invalid width value "${l}" on columnsWidths[${i.idx}].${V}`)});const d=o.map((i,l)=>({value:i,idx:l})).filter(i=>{var l,u,p,b;return h.isValidElement(i.value)&&(((u=(l=i.value)==null?void 0:l.type)==null?void 0:u.displayName)==="TableRow"||((b=(p=i.value)==null?void 0:p.type)==null?void 0:b.displayName)==="EmptyRow")});d.forEach(i=>{var u,p,b,_,$;const l=(b=(p=(u=i.value)==null?void 0:u.props)==null?void 0:p.children)==null?void 0:b.filter(z=>z!==void 0).length;h.isValidElement(i.value)&&(($=(_=i.value)==null?void 0:_.type)==null?void 0:$.displayName)!=="EmptyRow"&&l!==r.length&&console.warn(`Table: children[${i.idx}] length (${l}) should be equal to labels length (${r.length}).${V}`)}),o.map((i,l)=>({value:i,idx:l})).filter(i=>!d.some(l=>l.idx===i.idx)).forEach(i=>{console.warn(`Table: children[${i.idx}] is not a TableRow. See TableRow component.${V}`)})},Ee=r=>r!=="asc"?"asc":"desc",Lr=({column:r,onSort:o})=>{const{sortedColumn:n,sortedOrder:c=""}=H(),f=h.useMemo(()=>n===r.name?c:"",[r.name,n,c]),d=h.useCallback(()=>{r.sortable&&o(Ee(f))},[r.sortable,o,f]);return v(Br,{className:["TableHeader",f?`sorted-${f}`:"",r.sortable?"sortable":""].join(" "),onClick:d,role:r.sortable?"button":void 0,children:r.label})};var _e={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ke=h.createContext&&h.createContext(_e),N=globalThis&&globalThis.__assign||function(){return N=Object.assign||function(r){for(var o,n=1,c=arguments.length;n<c;n++){o=arguments[n];for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&(r[f]=o[f])}return r},N.apply(this,arguments)},Yr=globalThis&&globalThis.__rest||function(r,o){var n={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&o.indexOf(c)<0&&(n[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,c=Object.getOwnPropertySymbols(r);f<c.length;f++)o.indexOf(c[f])<0&&Object.prototype.propertyIsEnumerable.call(r,c[f])&&(n[c[f]]=r[c[f]]);return n};function Te(r){return r&&r.map(function(o,n){return h.createElement(o.tag,N({key:n},o.attr),Te(o.child))})}function ne(r){return function(o){return h.createElement(qr,N({attr:N({},r.attr)},o),Te(r.child))}}function qr(r){var o=function(n){var c=r.attr,f=r.size,d=r.title,x=Yr(r,["attr","size","title"]),i=f||n.size||"1em",l;return n.className&&(l=n.className),r.className&&(l=(l?l+" ":"")+r.className),h.createElement("svg",N({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,c,x,{className:l,style:N(N({color:r.color||n.color},n.style),r.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),d&&h.createElement("title",null,d),r.children)};return ke!==void 0?h.createElement(ke.Consumer,null,function(n){return o(n)}):o(_e)}function Ur(r){return ne({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7 20h2V8h3L8 4 4 8h3zm13-4h-3V4h-2v12h-3l4 4z"}}]})(r)}function Ce(r){return ne({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m6 20 4-4H7V4H5v12H2zm5-12h9v2h-9zm0 4h7v2h-7zm0-8h11v2H11zm0 12h5v2h-5z"}}]})(r)}function Oe(r){return ne({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 9h9v2h-9zm0 4h7v2h-7zm0-8h11v2H11zm0 12h5v2h-5zm-6 3h2V8h3L6 4 2 8h3z"}}]})(r)}const Vr=({onSortingChange:r})=>{const{columns:o=[],sortedOrder:n="",sortedColumn:c=""}=H(),f=h.useMemo(()=>o.filter(({sortable:b})=>b),[o]),d=h.useMemo(()=>{var b;return((b=o.find(({name:_})=>_===c))==null?void 0:b.label)||""},[o,c]),x=h.useMemo(()=>f.length,[f]),[i,l]=h.useState(!1),u=h.useCallback(()=>{x&&l(b=>!b)},[x]);h.useEffect(()=>{x&&l(!1)},[x]);const p=h.useCallback(b=>()=>{l(!1),r(b)(Ee(c===b.name?n:""))},[r,c,n]);return x||d&&n?S(Y,{children:[S(Nr,{className:[x?"sortable":"",i?"open":""].join(" "),onClick:u,disabled:!x,type:"button",layout:!0,children:[x&&(!d||!n)?S(Y,{children:[v(Ur,{}),v("p",{children:"Ordenar"})]}):null,d&&n?S(Y,{children:[n==="asc"?v(Ce,{}):v(Oe,{}),v("p",{children:d})]}):null]}),v(j.AnimatePresence,{children:i?S(Y,{children:[v(Mr,{onClick:u,type:"button"}),v(Ir,{initial:{transform:"scale(0)",opacity:0},animate:{transform:"scale(1)",opacity:1},exit:{transform:"scale(0)",opacity:0},transition:{type:"tween"},children:f.map(b=>S(zr,{onClick:p(b),children:[v("p",{children:b.label}),b.name===c?n==="desc"?v(Ce,{size:"1.25rem"}):v(Oe,{size:"1.25rem"}):null]},b.key))})]}):null})]}):null},Hr=r=>{},Re=h.createContext({}),Gr=({columns:r=[],children:o,customCss:n,sorting:c,onSortingChange:f=Hr,mobileBreakpoint:d=900})=>{const x=h.useCallback(u=>p=>{u!=null&&u.sortable&&f({column:u.name,order:p})},[f]);h.useEffect(()=>{const u=o.flat().filter(Boolean);Wr({columns:r,children:u,mobileBreakpoint:d})},[o,r,d]);const i=h.useMemo(()=>we(r),[r]),l=h.useMemo(()=>r.map((u,p)=>({...u,index:p,key:`${u.name}-${p}`})),[r]);return v(Re.Provider,{value:{columns:l,sortedOrder:c==null?void 0:c.order,sortedColumn:c==null?void 0:c.column},children:S(Tr,{columnTemplate:i,customCss:n,mobileBreakpoint:d,layout:!0,children:[v(Vr,{onSortingChange:x}),v(Pr,{layout:!0,children:l.map(u=>v(Lr,{column:u,onSort:x(u)},u.key))}),v(Ar,{children:o.map((u,p)=>v(h.Fragment,{children:u},p))})]})})};function H(){const r=h.useContext(Re);if(!r)throw new Error("useTable and TableRow must be used within a Table");return r}const oe=({children:r,className:o,annex:n,...c})=>{const{columns:f=[]}=H(),d=h.useMemo(()=>`table-row-${Math.random().toString(16).slice(2)}`,[]);return v(Y,{children:S(Or,{layout:!0,className:o,...c,children:[v(Rr,{id:d,layoutId:d,className:"TableRow",children:f.map(x=>S($r,{className:`TableCellWrapper column-${x.index}`,children:[v(Fr,{className:`TableCellRef column-${x.index}`,children:x.label}),v(Sr,{className:`TableCell column-${x.index}`,children:r[x.index]||null})]},x.key))}),v(j.AnimatePresence,{children:n?v(Cr,{layoutId:`${d}-annex`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,height:0,padding:0,margin:0,overflow:"hidden"},transition:{type:"tween"},"aria-details":d,className:"TableRowAnnex",children:n},"annex"):null})]})})};oe.displayName="TableRow";const Pe=()=>{const{columns:r=[]}=H();return v(oe,{className:"empty_row",children:Array(r.length).fill(null)})};Pe.displayName="EmptyRow",C.Button=dr,C.EmptyRow=Pe,C.PreventScroll=Er,C.Spinner=ve,C.Table=Gr,C.TableRow=oe,C.binamikCssReset=xr,C.binamikGlobalStyles=gr,C.binamikTheme=fr,C.depth=he,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@binamik/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite",
|
|
6
6
|
"build": "tsc && vite build",
|
|
7
7
|
"build:local": "tsc && vite build && node buildLocal.js prebuild && yarn pack && node buildLocal.js postbuild",
|
|
8
8
|
"preview": "vite preview",
|
|
9
|
-
"storybook": "
|
|
10
|
-
"build-storybook": "build
|
|
9
|
+
"storybook": "storybook dev -p 6006",
|
|
10
|
+
"build-storybook": "storybook build",
|
|
11
11
|
"lint": "eslint . --ext .ts,.tsx",
|
|
12
12
|
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
13
13
|
"test": "jest",
|
|
14
14
|
"test:coverage": "jest --coverage"
|
|
15
15
|
},
|
|
16
|
-
"dependencies": {},
|
|
17
16
|
"devDependencies": {
|
|
18
17
|
"@babel/core": "^7.18.2",
|
|
19
18
|
"@babel/preset-env": "^7.18.2",
|
|
20
19
|
"@babel/preset-react": "^7.17.12",
|
|
21
20
|
"@babel/preset-typescript": "^7.17.12",
|
|
21
|
+
"@chromatic-com/storybook": "^1",
|
|
22
22
|
"@emotion/react": "^11.9.0",
|
|
23
23
|
"@emotion/styled": "^11.8.1",
|
|
24
|
-
"@storybook/addon-actions": "^
|
|
25
|
-
"@storybook/addon-essentials": "^
|
|
26
|
-
"@storybook/addon-interactions": "^
|
|
27
|
-
"@storybook/addon-links": "^
|
|
28
|
-
"@storybook/builder-vite": "^0.1.33",
|
|
24
|
+
"@storybook/addon-actions": "^8.2.9",
|
|
25
|
+
"@storybook/addon-essentials": "^8.2.9",
|
|
26
|
+
"@storybook/addon-interactions": "^8.2.9",
|
|
27
|
+
"@storybook/addon-links": "^8.2.9",
|
|
29
28
|
"@storybook/preset-scss": "^1.0.3",
|
|
30
|
-
"@storybook/react": "^
|
|
31
|
-
"@storybook/
|
|
29
|
+
"@storybook/react": "^8.2.9",
|
|
30
|
+
"@storybook/react-vite": "^8.2.9",
|
|
31
|
+
"@storybook/test": "^8.2.9",
|
|
32
32
|
"@testing-library/jest-dom": "^5.16.4",
|
|
33
33
|
"@types/jest": "^28.1.1",
|
|
34
34
|
"@types/node": "^17.0.31",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"eslint-plugin-import": "^2.26.0",
|
|
46
46
|
"eslint-plugin-n": "^15.2.1",
|
|
47
47
|
"eslint-plugin-node": "^11.1.0",
|
|
48
|
-
"eslint-plugin-prettier": "
|
|
48
|
+
"eslint-plugin-prettier": "5.0.0",
|
|
49
49
|
"eslint-plugin-promise": "^6.0.0",
|
|
50
50
|
"eslint-plugin-react": "^7.30.0",
|
|
51
51
|
"eslint-plugin-react-hooks": "^4.5.0",
|
|
@@ -57,9 +57,10 @@
|
|
|
57
57
|
"react": "17.0.2",
|
|
58
58
|
"react-dom": "17.0.2",
|
|
59
59
|
"react-icons": "^4.4.0",
|
|
60
|
+
"storybook": "^8.2.9",
|
|
60
61
|
"ts-jest": "^28.0.4",
|
|
61
62
|
"typescript": "^4.6.3",
|
|
62
|
-
"vite": "^
|
|
63
|
+
"vite": "^4.5.3",
|
|
63
64
|
"vite-plugin-dts": "^1.1.1"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|