enerdot-front-system 0.0.7 → 0.0.8
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.js +139 -25
- package/dist/index.es.js +595 -394
- package/dist/lib/components/CheckBox/index.d.ts +9 -0
- package/dist/lib/components/Radio/RadioButton.d.ts +9 -0
- package/dist/lib/components/Radio/RadioButtons.d.ts +9 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/types/option.d.ts +5 -0
- package/package.json +6 -4
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const yr=require("react"),mr=require("styled-components"),$r=r=>r&&typeof r=="object"&&"default"in r?r:{default:r};function wr(r){if(r&&typeof r=="object"&&"default"in r)return r;const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const l in r)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(i,l,c.get?c:{enumerable:!0,get:()=>r[l]})}}return i.default=r,Object.freeze(i)}const Er=wr(yr),j=$r(mr);function Rr(r){if(r.__esModule)return r;var i=r.default;if(typeof i=="function"){var l=function c(){return this instanceof c?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};l.prototype=i.prototype}else l={};return Object.defineProperty(l,"__esModule",{value:!0}),Object.keys(r).forEach(function(c){var v=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(l,c,v.get?v:{enumerable:!0,get:function(){return r[c]}})}),l}var q={exports:{}},Y={};const Pe=Rr(Er);/**
|
|
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
|
|
9
|
+
*/var ke;function xr(){if(ke)return Y;ke=1;var r=Pe,i=Symbol.for("react.element"),l=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,v=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function y(g,d,E){var m,R={},x=null,k=null;E!==void 0&&(x=""+E),d.key!==void 0&&(x=""+d.key),d.ref!==void 0&&(k=d.ref);for(m in d)c.call(d,m)&&!h.hasOwnProperty(m)&&(R[m]=d[m]);if(g&&g.defaultProps)for(m in d=g.defaultProps,d)R[m]===void 0&&(R[m]=d[m]);return{$$typeof:i,type:g,key:x,ref:k,props:R,_owner:v.current}}return Y.Fragment=l,Y.jsx=y,Y.jsxs=y,Y}var L={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
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
|
|
18
|
-
`+H+e}}var Z=!1,
|
|
19
|
-
`),
|
|
20
|
-
`)
|
|
21
|
-
`+
|
|
17
|
+
*/var Se;function _r(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&function(){var r=Pe,i=Symbol.for("react.element"),l=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),g=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),D=Symbol.iterator,Ae="@@iterator";function Be(e){if(e===null||typeof e!="object")return null;var t=D&&e[D]||e[Ae];return typeof t=="function"?t:null}var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){{for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];We("error",e,n)}}function We(e,t,n){{var a=A.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(t+="%s",n=n.concat([f]));var p=n.map(function(u){return String(u)});p.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,p)}}var Ie=!1,ze=!1,Ye=!1,Le=!1,Me=!1,oe;oe=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===h||Me||e===v||e===E||e===m||Le||e===k||Ie||ze||Ye||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===R||e.$$typeof===y||e.$$typeof===g||e.$$typeof===d||e.$$typeof===oe||e.getModuleId!==void 0))}function Ue(e,t,n){var a=e.displayName;if(a)return a;var f=t.displayName||t.name||"";return f!==""?n+"("+f+")":n}function ae(e){return e.displayName||"Context"}function O(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 c:return"Fragment";case l:return"Portal";case h:return"Profiler";case v:return"StrictMode";case E:return"Suspense";case m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var t=e;return ae(t)+".Consumer";case y:var n=e;return ae(n._context)+".Provider";case d:return Ue(e,e.render,"ForwardRef");case R:var a=e.displayName||null;return a!==null?a:O(e.type)||"Memo";case x:{var f=e,p=f._payload,u=f._init;try{return O(u(p))}catch{return null}}}return null}var T=Object.assign,I=0,ie,le,se,ue,ce,fe,de;function pe(){}pe.__reactDisabledLog=!0;function Ne(){{if(I===0){ie=console.log,le=console.info,se=console.warn,ue=console.error,ce=console.group,fe=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}}function qe(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:ie}),info:T({},e,{value:le}),warn:T({},e,{value:se}),error:T({},e,{value:ue}),group:T({},e,{value:ce}),groupCollapsed:T({},e,{value:fe}),groupEnd:T({},e,{value:de})})}I<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=A.ReactCurrentDispatcher,H;function M(e,t,n){{if(H===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);H=a&&a[1]||""}return`
|
|
18
|
+
`+H+e}}var Z=!1,V;{var Je=typeof WeakMap=="function"?WeakMap:Map;V=new Je}function he(e,t){if(!e||Z)return"";{var n=V.get(e);if(n!==void 0)return n}var a;Z=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=X.current,X.current=null,Ne();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(F){a=F}Reflect.construct(e,[],u)}else{try{u.call()}catch(F){a=F}e.call(u.prototype)}}else{try{throw Error()}catch(F){a=F}e()}}catch(F){if(F&&a&&typeof F.stack=="string"){for(var s=F.stack.split(`
|
|
19
|
+
`),C=a.stack.split(`
|
|
20
|
+
`),$=s.length-1,w=C.length-1;$>=1&&w>=0&&s[$]!==C[w];)w--;for(;$>=1&&w>=0;$--,w--)if(s[$]!==C[w]){if($!==1||w!==1)do if($--,w--,w<0||s[$]!==C[w]){var S=`
|
|
21
|
+
`+s[$].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,S),S}while($>=1&&w>=0);break}}}finally{Z=!1,X.current=p,qe(),Error.prepareStackTrace=f}var W=e?e.displayName||e.name:"",P=W?M(W):"";return typeof e=="function"&&V.set(e,P),P}function Ke(e,t,n){return he(e,!1)}function Ge(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function U(e,t,n){if(e==null)return"";if(typeof e=="function")return he(e,Ge(e));if(typeof e=="string")return M(e);switch(e){case E:return M("Suspense");case m:return M("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ke(e.render);case R:return U(e.type,t,n);case x:{var a=e,f=a._payload,p=a._init;try{return U(p(f),t,n)}catch{}}}return""}var z=Object.prototype.hasOwnProperty,ge={},ve=A.ReactDebugCurrentFrame;function N(e){if(e){var t=e._owner,n=U(e.type,e._source,t?t.type:null);ve.setExtraStackFrame(n)}else ve.setExtraStackFrame(null)}function Xe(e,t,n,a,f){{var p=Function.call.bind(z);for(var u in e)if(p(e,u)){var s=void 0;try{if(typeof e[u]!="function"){var C=Error((a||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}s=e[u](t,u,a,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){s=$}s&&!(s instanceof Error)&&(N(f),_("%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",n,u,typeof s),N(null)),s instanceof Error&&!(s.message in ge)&&(ge[s.message]=!0,N(f),_("Failed %s type: %s",n,s.message),N(null))}}}var He=Array.isArray;function Q(e){return He(e)}function Ze(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Qe(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function ye(e){if(Qe(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),be(e)}var me=A.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},$e,we;function rr(e){if(z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function tr(e){if(z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function nr(e,t){typeof e.ref=="string"&&me.current}function or(e,t){{var n=function(){$e||($e=!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)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ar(e,t){{var n=function(){we||(we=!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)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var ir=function(e,t,n,a,f,p,u){var s={$$typeof:i,type:e,key:t,ref:n,props:u,_owner:p};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function lr(e,t,n,a,f){{var p,u={},s=null,C=null;n!==void 0&&(ye(n),s=""+n),tr(t)&&(ye(t.key),s=""+t.key),rr(t)&&(C=t.ref,nr(t,f));for(p in t)z.call(t,p)&&!er.hasOwnProperty(p)&&(u[p]=t[p]);if(e&&e.defaultProps){var $=e.defaultProps;for(p in $)u[p]===void 0&&(u[p]=$[p])}if(s||C){var w=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&or(u,w),C&&ar(u,w)}return ir(e,s,C,f,a,me.current,u)}}var ee=A.ReactCurrentOwner,Ee=A.ReactDebugCurrentFrame;function B(e){if(e){var t=e._owner,n=U(e.type,e._source,t?t.type:null);Ee.setExtraStackFrame(n)}else Ee.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function Re(){{if(ee.current){var e=O(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function sr(e){return""}var xe={};function ur(e){{var t=Re();if(!t){var n=typeof e=="string"?e:e.displayName||e.name;n&&(t=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+n+">.")}return t}}function
|
|
25
|
+
Check the top-level render call using <`+n+">.")}return t}}function _e(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=ur(t);if(xe[n])return;xe[n]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),B(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,a),B(null)}}function Ce(e,t){{if(typeof e!="object")return;if(Q(e))for(var n=0;n<e.length;n++){var a=e[n];te(a)&&_e(a,t)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var f=Be(e);if(typeof f=="function"&&f!==e.entries)for(var p=f.call(e),u;!(u=p.next()).done;)te(u.value)&&_e(u.value,t)}}}function cr(e){{var t=e.type;if(t==null||typeof t=="string")return;var n;if(typeof t=="function")n=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===d||t.$$typeof===R))n=t.propTypes;else return;if(n){var a=O(t);Xe(n,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!re){re=!0;var f=O(t);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fr(e){{for(var t=Object.keys(e.props),n=0;n<t.length;n++){var a=t[n];if(a!=="children"&&a!=="key"){B(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),B(null);break}}e.ref!==null&&(B(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}var Fe={};function je(e,t,n,a,f,p){{var u=Ve(e);if(!u){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" 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 C=sr();C?s+=C:s+=Re();var $;e===null?$="null":Q(e)?$="array":e!==void 0&&e.$$typeof===i?($="<"+(O(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):$=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",$,s)}var w=lr(e,t,n,f,p);if(w==null)return w;if(u){var S=t.children;if(S!==void 0)if(a)if(Q(S)){for(var W=0;W<S.length;W++)Ce(S[W],e);Object.freeze&&Object.freeze(S)}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 Ce(S,e)}if(z.call(t,"key")){var P=O(e),F=Object.keys(t).filter(function(br){return br!=="key"}),ne=F.length>0?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}";if(!Fe[P+ne]){var vr=F.length>0?"{"+F.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ne,P,
|
|
30
|
+
<%s key={someKey} {...props} />`,ne,P,vr,P),Fe[P+ne]=!0}}return e===c?fr(w):cr(w),w}}function dr(e,t,n){return je(e,t,n,!0)}function pr(e,t,n){return je(e,t,n,!1)}var hr=pr,gr=dr;L.Fragment=c,L.jsx=hr,L.jsxs=gr}()),L}var Oe;function Cr(){return Oe||(Oe=1,process.env.NODE_ENV==="production"?q.exports=xr():q.exports=_r()),q.exports}var b=Cr();const o={white:"#FFFFFF",black:"#222222",gray50:"#FBFBFB",gray100:"#F7F8F9",gray200:"#EBEDF2",gray300:"#DADEE5",gray400:"#C6CBD3",gray500:"#BABFC9",gray600:"#A3A8B4",gray700:"#8A8F9D",gray800:"#6D717D",gray900:"#4A515D",blue100:"#F1F5FE",blue200:"#CEDBFF",blue300:"#A7BFFF",blue400:"#7EA1FF",blue500:"#5884FF",blue600:"#3369FF",blue700:"#2B59D9",blue800:"#244BB5",blue900:"#1D3C91",red50:"#FFF1EF",red100:"#FFACAD",red200:"#FF8182",red300:"#FA4549",red400:"#CF222E",red500:"#82071E",orange50:"#FFF1E5",orange100:"#FFD0AA",orange200:"#FFB37D",orange300:"#FF8E40",orange400:"#E16F24",orange500:"#953800",green50:"#EFFDEE",green100:"#8AE3A1",green200:"#4DD470",green300:"#1CB854",green400:"#149E53",green500:"#086A49",yellow50:"#FEF9E6",yellow100:"#FADD78",yellow200:"#F7CC33",yellow300:"#F7B200",yellow400:"#CB9D26",yellow500:"#956B00"},J={small:{height:32,fontSize:1.6,fontWeights:["400","500","700"]},medium:{height:40,fontSize:1.8,fontWeights:["500","500","700"]},large:{height:48,fontSize:2,fontWeights:["700","700","700"]}},K={full:5,round:.8,no:0},G={primary:{$mainColor:o.blue600,$hoverColor:o.blue700,$activeColor:o.white,$disabledColor:o.blue200},green:{$mainColor:o.green300,$hoverColor:o.green400,$activeColor:o.white,$disabledColor:o.green50},red:{$mainColor:o.red300,$hoverColor:o.red400,$activeColor:o.white,$disabledColor:o.red50},orange:{$mainColor:o.orange300,$hoverColor:o.orange400,$activeColor:o.white,$disabledColor:o.orange50},yellow:{$mainColor:o.yellow300,$hoverColor:o.yellow400,$activeColor:o.white,$disabledColor:o.yellow50},gray:{$mainColor:o.gray900,$hoverColor:o.black,$activeColor:o.black,$disabledColor:o.gray300}},Te=r=>{const{children:i,baseColor:l="primary",level:c="small",borderRadius:v="round",pl:h=2,pr:y=2,width:g="fit-content",...d}=r,{height:E,fontSize:m,fontWeights:R}=J[c],x=K[v],k=G[l];return b.jsx(Fr,{$borderRadius:x,$height:E,$fontSize:m,$fontWeights:R,$pl:h,$pr:y,$width:g,...k,...d,children:i})},Fr=j.default.button`
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
justify-content: center;
|
|
@@ -36,7 +36,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
36
36
|
cursor: pointer;
|
|
37
37
|
width: ${({$width:r})=>r};
|
|
38
38
|
|
|
39
|
-
color: ${
|
|
39
|
+
color: ${o.white};
|
|
40
40
|
font-size: ${({$fontSize:r})=>r}rem;
|
|
41
41
|
font-weight: ${({$fontWeights:r})=>r[0]};
|
|
42
42
|
border-radius: ${({$borderRadius:r})=>r}rem;
|
|
@@ -53,7 +53,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
53
53
|
&:disabled {
|
|
54
54
|
background-color: ${({$disabledColor:r})=>r};
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,jr=r=>{const{children:i,baseColor:l="primary",level:c="small",borderRadius:v="round",pl:h=2,pr:y=2,width:g="fit-content",isSelected:d,...E}=r,{height:m,fontSize:R,fontWeights:x}=J[c],k=K[v],D=G[l];return b.jsx(kr,{$borderRadius:k,$height:m,$fontSize:R,$fontWeights:x,$pl:h,$pr:y,$width:g,$isSelected:d,...D,...E,children:i})},kr=j.default.button`
|
|
57
57
|
display: flex;
|
|
58
58
|
align-items: center;
|
|
59
59
|
justify-content: center;
|
|
@@ -62,8 +62,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
62
62
|
cursor: pointer;
|
|
63
63
|
width: ${({$width:r})=>r};
|
|
64
64
|
|
|
65
|
-
background-color: ${({$isSelected:r,$mainColor:
|
|
66
|
-
color: ${({$mainColor:r,$isSelected:
|
|
65
|
+
background-color: ${({$isSelected:r,$mainColor:i})=>r?i:o.white};
|
|
66
|
+
color: ${({$mainColor:r,$isSelected:i})=>i?o.white:r};
|
|
67
67
|
|
|
68
68
|
border: 1px solid ${({$mainColor:r})=>r};
|
|
69
69
|
font-size: ${({$fontSize:r})=>r}rem;
|
|
@@ -77,14 +77,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
77
77
|
color: ${({$hoverColor:r})=>r};
|
|
78
78
|
border: 1px solid ${({$hoverColor:r})=>r};
|
|
79
79
|
font-weight: ${({$fontWeights:r})=>r[1]};
|
|
80
|
-
background-color: ${
|
|
80
|
+
background-color: ${o.white};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&:disabled {
|
|
84
84
|
color: ${({$disabledColor:r})=>r};
|
|
85
|
+
background-color: ${o.white};
|
|
85
86
|
border: 1px solid ${({$disabledColor:r})=>r};
|
|
86
87
|
}
|
|
87
|
-
`,
|
|
88
|
+
`,Sr=r=>{const{children:i,baseColor:l="gray",level:c="small",borderRadius:v="round",pl:h=2,pr:y=2,width:g="fit-content",...d}=r,{height:E,fontSize:m,fontWeights:R}=J[c],x=K[v],k=G[l];return b.jsx(Or,{$borderRadius:x,$height:E,$fontSize:m,$fontWeights:R,$pl:h,$pr:y,$width:g,...k,...d,children:i})},Or=j.default.button`
|
|
88
89
|
display: flex;
|
|
89
90
|
align-items: center;
|
|
90
91
|
justify-content: center;
|
|
@@ -93,9 +94,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
93
94
|
cursor: pointer;
|
|
94
95
|
width: ${({$width:r})=>r};
|
|
95
96
|
|
|
96
|
-
background-color: ${
|
|
97
|
+
background-color: ${o.white};
|
|
97
98
|
color: ${({$mainColor:r})=>r};
|
|
98
|
-
border: 1px solid ${
|
|
99
|
+
border: 1px solid ${o.gray400};
|
|
99
100
|
font-size: ${({$fontSize:r})=>r}rem;
|
|
100
101
|
font-weight: ${({$fontWeights:r})=>r[0]};
|
|
101
102
|
border-radius: ${({$borderRadius:r})=>r}rem;
|
|
@@ -105,15 +106,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
105
106
|
|
|
106
107
|
&:hover:not([disabled]) {
|
|
107
108
|
color: ${({$hoverColor:r})=>r};
|
|
108
|
-
border: 1px solid ${
|
|
109
|
+
border: 1px solid ${o.gray600};
|
|
109
110
|
font-weight: ${({$fontWeights:r})=>r[1]};
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
&:disabled {
|
|
113
114
|
color: ${({$disabledColor:r})=>r};
|
|
114
|
-
border: 1px solid ${
|
|
115
|
+
border: 1px solid ${o.gray300};
|
|
115
116
|
}
|
|
116
|
-
`,Tr=r=>{const{children:
|
|
117
|
+
`,Tr=r=>{const{children:i,baseColor:l="gray",level:c="small",borderRadius:v="round",pl:h=2,pr:y=2,width:g="fit-content",isSelected:d,...E}=r,{height:m,fontSize:R,fontWeights:x}=J[c],k=K[v],D=G[l];return b.jsx(Pr,{$borderRadius:k,$height:m,$fontSize:R,$fontWeights:x,$pl:h,$pr:y,$width:g,$isSelected:d,...D,...E,children:i})},Pr=j.default.button`
|
|
117
118
|
display: flex;
|
|
118
119
|
align-items: center;
|
|
119
120
|
justify-content: center;
|
|
@@ -122,8 +123,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
122
123
|
cursor: pointer;
|
|
123
124
|
width: ${({$width:r})=>r};
|
|
124
125
|
|
|
125
|
-
background-color: ${
|
|
126
|
-
color: ${
|
|
126
|
+
background-color: ${o.white};
|
|
127
|
+
color: ${o.black};
|
|
127
128
|
border: none;
|
|
128
129
|
font-size: ${({$fontSize:r})=>r}rem;
|
|
129
130
|
font-weight: ${({$fontWeights:r})=>r[0]};
|
|
@@ -133,11 +134,124 @@ React keys must be passed directly to JSX without using spread:
|
|
|
133
134
|
height: ${({$height:r})=>r}px;
|
|
134
135
|
|
|
135
136
|
&:hover:not([disabled]) {
|
|
136
|
-
color: ${({$hoverColor:r})=>r};
|
|
137
137
|
font-weight: ${({$fontWeights:r})=>r[1]};
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
&:disabled {
|
|
141
141
|
color: ${({$disabledColor:r})=>r};
|
|
142
142
|
}
|
|
143
|
-
`,Dr=r=>{const{theme:
|
|
143
|
+
`,Dr=r=>{const{theme:i="primary",...l}=r;switch(i){case"primary":return b.jsx(Te,{...l});case"secondary":return b.jsx(jr,{...l});case"tertiary":return b.jsx(Sr,{...l});case"text":return b.jsx(Tr,{...l});default:return b.jsx(Te,{...l})}},Ar=({id:r,checked:i,name:l,required:c,children:v,disabled:h,onClickBox:y,...g})=>{const d=()=>y==null?void 0:y({name:l,checked:!i}),E=h?!1:i;return b.jsxs(Br,{$disabled:h,children:[b.jsx("input",{id:r,type:"checkbox",name:l,checked:E,required:c,disabled:h,readOnly:!0,...g}),b.jsx(Ir,{onClick:d,htmlFor:r,disabled:h,children:E&&b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",children:b.jsx("path",{d:"M1.5 5.30252L5.16667 9L12.5 1",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),v&&b.jsx(Wr,{onClick:d,htmlFor:r,$disabled:h,children:v})]})},Br=j.default.div`
|
|
144
|
+
/* 드래그 방지 */
|
|
145
|
+
-webkit-user-select: none;
|
|
146
|
+
-moz-user-select: none;
|
|
147
|
+
-ms-user-select: none;
|
|
148
|
+
user-select: none;
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 0.8rem;
|
|
152
|
+
flex: 1;
|
|
153
|
+
input[type="checkbox"] {
|
|
154
|
+
display: none;
|
|
155
|
+
padding: 0;
|
|
156
|
+
margin: -1px;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
clip: rect(0, 0, 0, 0);
|
|
159
|
+
border: 0;
|
|
160
|
+
}
|
|
161
|
+
input[type="checkbox"] + label {
|
|
162
|
+
display: flex;
|
|
163
|
+
cursor: ${r=>!r.$disabled&&"pointer"};
|
|
164
|
+
position: relative;
|
|
165
|
+
width: 18px;
|
|
166
|
+
height: 18px;
|
|
167
|
+
border: 1.5px solid ${o.gray300};
|
|
168
|
+
border-radius: 0.4rem;
|
|
169
|
+
background-color: ${o.white};
|
|
170
|
+
margin-left: 0.3rem;
|
|
171
|
+
margin-right: 0.3rem;
|
|
172
|
+
}
|
|
173
|
+
input[type="checkbox"]:checked + label {
|
|
174
|
+
border: 1.5px solid ${o.blue600};
|
|
175
|
+
background-color: ${o.blue600};
|
|
176
|
+
}
|
|
177
|
+
`,Wr=j.default.label`
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
cursor: ${({$disabled:r})=>!r&&"pointer"};
|
|
182
|
+
font-size: 1.8rem;
|
|
183
|
+
font-weight: 500;
|
|
184
|
+
line-height: 135%;
|
|
185
|
+
font-style: normal;
|
|
186
|
+
color: ${({$disabled:r})=>r?o.gray500:o.gray900};
|
|
187
|
+
`,Ir=j.default.label`
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
cursor: ${r=>!r.disabled&&"pointer"};
|
|
192
|
+
`,De=r=>{const{onClick:i,disabled:l,label:c,name:v,checked:h}=r,y=d=>i==null?void 0:i(d.target.checked,v),g=l?!1:h;return b.jsxs(zr,{children:[b.jsx(Yr,{type:"radio",name:v,checked:g,onChange:y,disabled:l}),b.jsx(Lr,{$checked:g,$disabled:l,children:g&&b.jsx(Mr,{})}),c&&b.jsx(Vr,{$checked:g,$disabled:l,children:c})]})},zr=j.default.label`
|
|
193
|
+
/* 드래그 방지 */
|
|
194
|
+
-webkit-user-select: none;
|
|
195
|
+
-moz-user-select: none;
|
|
196
|
+
-ms-user-select: none;
|
|
197
|
+
user-select: none;
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
flex: 1;
|
|
201
|
+
width: auto;
|
|
202
|
+
gap: 0.8rem;
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
`,Yr=j.default.input`
|
|
205
|
+
display: none;
|
|
206
|
+
`,Lr=j.default.div`
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
width: 11px;
|
|
211
|
+
height: 11px;
|
|
212
|
+
padding: 3px;
|
|
213
|
+
border: 2px solid ${o.blue600};
|
|
214
|
+
border-radius: 100%;
|
|
215
|
+
background-color: ${o.white};
|
|
216
|
+
|
|
217
|
+
${({$checked:r})=>!r&&`
|
|
218
|
+
border: 1px solid ${o.gray400};
|
|
219
|
+
width: 13px;
|
|
220
|
+
height: 13px;
|
|
221
|
+
`}
|
|
222
|
+
|
|
223
|
+
${({$disabled:r,$checked:i})=>r&&!i&&`
|
|
224
|
+
border: 1px solid ${o.gray300};
|
|
225
|
+
background-color: ${o.gray100};
|
|
226
|
+
width: 13px;
|
|
227
|
+
height: 13px;
|
|
228
|
+
`}
|
|
229
|
+
`,Mr=j.default.div`
|
|
230
|
+
background-color: ${o.blue600};
|
|
231
|
+
border-radius: 100%;
|
|
232
|
+
width: 100%;
|
|
233
|
+
height: 100%;
|
|
234
|
+
|
|
235
|
+
animation-duration: 0.2s;
|
|
236
|
+
animation-name: twinkle;
|
|
237
|
+
animation-direction: alternate;
|
|
238
|
+
|
|
239
|
+
@keyframes twinkle {
|
|
240
|
+
100% {
|
|
241
|
+
transform: scale(1);
|
|
242
|
+
}
|
|
243
|
+
0% {
|
|
244
|
+
transform: scale(0);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
`,Vr=j.default.div`
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
font-size: 1.8rem;
|
|
250
|
+
font-weight: 500;
|
|
251
|
+
line-height: 135%;
|
|
252
|
+
color: ${({$disabled:r,$checked:i})=>r&&!i?o.gray400:o.gray800};
|
|
253
|
+
transition: color 150ms;
|
|
254
|
+
`,Ur=({options:r,value:i,onClick:l,disabled:c})=>{const v=r.map(h=>{const y=h.value===i.value,g=()=>l(h);return b.jsx(De,{checked:y,label:h.label,name:h.value,onClick:g,disabled:c},h.value)});return b.jsx(Nr,{gap:2,children:v})},Nr=j.default.div`
|
|
255
|
+
display: flex;
|
|
256
|
+
gap: ${r=>r.gap}rem;
|
|
257
|
+
`;exports.Button=Dr;exports.Checkbox=Ar;exports.RadioButton=De;exports.RadioButtons=Ur;exports.themeColors=o;
|