enerdot-front-system 0.0.29-beta.2 → 0.0.29-beta.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.js +2 -2
- package/dist/index.es.js +8 -2
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -48,7 +48,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
48
48
|
${Bt[n]}
|
|
49
49
|
${l&&Bt.selected}
|
|
50
50
|
${i&&Bt.open}
|
|
51
|
-
`,style:{height:f,width:a,borderRadius:_+"px",fontSize:d+"px",paddingLeft:h.default+"px",paddingRight:h.iconSide+"px"},...u,children:t})},Bl={small:{default:16,iconSide:8},medium:{default:20,iconSide:12},large:{default:20,iconSide:16}},Hl="_container_ieere_1",Ul="_tooltip_ieere_6",Vl="_fold_ieere_1",Gl="_itemButton_ieere_30",ql="_itemButtonSelected_ieere_44",We={container:Hl,tooltip:Ul,fold:Vl,itemButton:Gl,itemButtonSelected:ql},zl=({title:e,level:t="medium",type:r="checkbox",options:n=[],values:s=[],onChange:a,isAllChecked:i,allCheckText:l="전체선택"})=>{const u=O.useRef(null),f=O.useRef(null),[d,_]=Yr(u),h=Ct({isOpen:d,containerRef:u,tooltipRef:f}),{height:p}=qe[t],x=s.length===0,k=n==null?void 0:n.map(Y=>{const M=s.some(E=>E.value===Y.value);switch(r){case"checkbox":{const E=()=>{if(M){const P=s.filter(T=>T.value!==Y.value);return a==null?void 0:a(P)}else return a==null?void 0:a([...s,Y])};return o.jsx("div",{className:We.itemButton,onClick:E,children:o.jsx(Zt,{checked:M,children:Y.label})})}case"radio":{const E=()=>{a==null||a([Y])};return o.jsx("div",{className:We.itemButton,onClick:E,children:o.jsx(Or,{checked:M,label:Y.label})})}case"select":{const E=()=>(_(!1)
|
|
51
|
+
`,style:{height:f,width:a,borderRadius:_+"px",fontSize:d+"px",paddingLeft:h.default+"px",paddingRight:h.iconSide+"px"},...u,children:t})},Bl={small:{default:16,iconSide:8},medium:{default:20,iconSide:12},large:{default:20,iconSide:16}},Hl="_container_ieere_1",Ul="_tooltip_ieere_6",Vl="_fold_ieere_1",Gl="_itemButton_ieere_30",ql="_itemButtonSelected_ieere_44",We={container:Hl,tooltip:Ul,fold:Vl,itemButton:Gl,itemButtonSelected:ql},zl=({title:e,level:t="medium",type:r="checkbox",options:n=[],values:s=[],onChange:a,isAllChecked:i,allCheckText:l="전체선택"})=>{const u=O.useRef(null),f=O.useRef(null),[d,_]=Yr(u),h=Ct({isOpen:d,containerRef:u,tooltipRef:f}),{height:p}=qe[t],x=s.length===0,k=n==null?void 0:n.map(Y=>{const M=s.some(E=>E.value===Y.value);switch(r){case"checkbox":{const E=()=>{if(M){const P=s.filter(T=>T.value!==Y.value);return a==null?void 0:a(P)}else return a==null?void 0:a([...s,Y])};return o.jsx("div",{className:We.itemButton,onClick:E,children:o.jsx(Zt,{checked:M,children:Y.label})})}case"radio":{const E=()=>{a==null||a([Y])};return o.jsx("div",{className:We.itemButton,onClick:E,children:o.jsx(Or,{checked:M,label:Y.label})})}case"select":{const E=()=>{if(_(!1),!M)return a==null?void 0:a([Y])};return o.jsx("div",{className:`
|
|
52
52
|
${We.itemButton}
|
|
53
53
|
${M&&We.itemButtonSelected}
|
|
54
54
|
`,onClick:E,children:Y.label})}}});if(i&&r==="checkbox"){const Y=(n==null?void 0:n.length)===(s==null?void 0:s.length),M=()=>Y?a==null?void 0:a([]):a==null?void 0:a(n);k.unshift(o.jsx("div",{className:We.itemButton,onClick:M,children:o.jsx(Zt,{checked:Y,children:l})}))}const j=()=>_(Y=>!Y);return o.jsxs("div",{className:We.container,ref:u,children:[o.jsxs(Ps,{isSelected:!x,onClick:j,borderRadius:"full",isOpen:d,level:t,children:[e,d?o.jsx(bn,{color:!x&&b.white}):o.jsx(xn,{color:!x&&b.white})]}),d&&o.jsx("div",{ref:f,className:We.tooltip,style:{minWidth:"300px",...h.includes("top")?{bottom:p+8+"px"}:{top:p+8+"px"},...h.includes("right")?{right:0}:{left:0}},children:k})]})},Zl=({title:e,isSelected:t,level:r="medium",tooltipWidth:n,children:s,isOpen:a,onOpenFilter:i,onCloseFilter:l})=>{const u=O.useRef(null),f=O.useRef(null),d=Ct({isOpen:a,containerRef:u,tooltipRef:f}),{height:_}=qe[r],h=()=>a?l():i();return o.jsxs("div",{className:We.container,ref:u,children:[o.jsxs(Ps,{isSelected:t,onClick:h,borderRadius:"full",isOpen:a,level:r,children:[e,a?o.jsx(bn,{color:t&&b.white}):o.jsx(xn,{color:t&&b.white})]}),a&&o.jsx("div",{ref:f,className:We.tooltip,style:{minWidth:(n||300)+"px",...d.includes("top")?{bottom:_+8+"px"}:{top:_+8+"px"},...d.includes("right")?{right:0}:{left:0}},children:s})]})},Jl="_chip_1hfe0_1",Ql="_small_1hfe0_10",Kl="_regular_1hfe0_23",Xl="_large_1hfe0_36",ec="_smallFull_1hfe0_49",tc="_regularFull_1hfe0_57",rc="_largeFull_1hfe0_65",nc="_dot_1hfe0_73",fr={chip:Jl,small:Ql,regular:Kl,large:Xl,smallFull:ec,regularFull:tc,largeFull:rc,dot:nc},sc={yellow:{bgColor:b.yellow50,textColor:b.yellow300},orange:{bgColor:b.orange50,textColor:b.orange300},red:{bgColor:b.red50,textColor:b.red300},green:{bgColor:b.green50,textColor:b.green300},primary:{bgColor:b.blue100,textColor:b.blue600},gray:{bgColor:b.gray200,textColor:b.gray800}},ac=({children:e,level:t="regular",borderRadius:r="round",colorTheme:n="primary",isWhiteBg:s=!1,gap:a=4,isDot:i})=>{const l=sc[n],u=r==="full";return o.jsxs("div",{className:`${fr.chip} ${fr[t]} ${u&&fr[t+"Full"]}`,style:{backgroundColor:s?b.white:l.bgColor,color:l.textColor,gap:`${a}px`},children:[i&&o.jsx("div",{className:fr.dot,style:{backgroundColor:l.textColor}}),e]})};//! moment.js
|
|
@@ -70,7 +70,7 @@ m.version="2.30.1";ic(Q);m.fn=g;m.min=zu;m.max=Zu;m.now=Ju;m.utc=Te;m.unix=Mf;m.
|
|
|
70
70
|
${gr[r]}
|
|
71
71
|
${s&&gr.open}
|
|
72
72
|
${a&&gr.buttonDisabled}
|
|
73
|
-
`,style:{height:l,width:n,fontSize:u+"px"},role:"button",...i,children:t})},Ym={small:{height:32,fontSize:16},medium:{height:40,fontSize:16},large:{height:48,fontSize:18}},Om="_container_10u18_1",$m="_tooltip_10u18_7",Rm="_fold_10u18_1",Nm="_input_10u18_31",Tm="_inputLarge_10u18_52",Cm="_inputActivePlaceholder_10u18_56",ut={container:Om,tooltip:$m,fold:Rm,input:Nm,inputLarge:Tm,inputActivePlaceholder:Cm},Wa=({rowHeight:e,overScanCount:t,ref:r})=>{const[n,s]=O.useState(0),[,a]=Ir(r),i=Math.ceil(a/e)+t,l=Math.floor(n/e)-t/2;return O.useEffect(()=>{const u=r==null?void 0:r.current,f=()=>{u&&s(u.scrollTop)};return u==null||u.addEventListener("scroll",f),()=>{u==null||u.removeEventListener("scroll",f)}},[]),{showCount:i,showFirstIndex:l}},Hr={small:40,medium:48,large:56},Em="_itemButton_ecdof_1",Pm="_itemButtonLarge_ecdof_17",Dm="_itemButtonSelected_ecdof_22",Ve={itemButton:Em,itemButtonLarge:Pm,itemButtonSelected:Dm},Fm=({option:e,values:t,onChange:r,level:n,isSelected:s,children:a})=>{const i=n==="large",l=Hr[n],u=()=>{if(s){const f=t.filter(d=>d.value!==e.value);return r==null?void 0:r(f)}else return r==null?void 0:r([...t,e])};return o.jsxs("button",{className:`${Ve.itemButton} ${i&&Ve.itemButtonLarge}`,style:{minHeight:l+"px"},onClick:u,children:[o.jsx(Zt,{checked:s}),e==null?void 0:e.element,a]})},Wm=({option:e,onChange:t,level:r,isSelected:n,children:s})=>{const a=r==="large",i=Hr[r],l=()=>{t==null||t([e])};return o.jsxs("button",{className:`${Ve.itemButton} ${a&&Ve.itemButtonLarge}`,style:{minHeight:i+"px"},onClick:l,children:[o.jsx(Or,{checked:n}),e==null?void 0:e.element,s]})},Lm=({option:e,onChange:t,level:r,isSelected:n,onHideTooltip:s,children:a})=>{const i=r==="large",l=Hr[r],u=()=>(s()
|
|
73
|
+
`,style:{height:l,width:n,fontSize:u+"px"},role:"button",...i,children:t})},Ym={small:{height:32,fontSize:16},medium:{height:40,fontSize:16},large:{height:48,fontSize:18}},Om="_container_10u18_1",$m="_tooltip_10u18_7",Rm="_fold_10u18_1",Nm="_input_10u18_31",Tm="_inputLarge_10u18_52",Cm="_inputActivePlaceholder_10u18_56",ut={container:Om,tooltip:$m,fold:Rm,input:Nm,inputLarge:Tm,inputActivePlaceholder:Cm},Wa=({rowHeight:e,overScanCount:t,ref:r})=>{const[n,s]=O.useState(0),[,a]=Ir(r),i=Math.ceil(a/e)+t,l=Math.floor(n/e)-t/2;return O.useEffect(()=>{const u=r==null?void 0:r.current,f=()=>{u&&s(u.scrollTop)};return u==null||u.addEventListener("scroll",f),()=>{u==null||u.removeEventListener("scroll",f)}},[]),{showCount:i,showFirstIndex:l}},Hr={small:40,medium:48,large:56},Em="_itemButton_ecdof_1",Pm="_itemButtonLarge_ecdof_17",Dm="_itemButtonSelected_ecdof_22",Ve={itemButton:Em,itemButtonLarge:Pm,itemButtonSelected:Dm},Fm=({option:e,values:t,onChange:r,level:n,isSelected:s,children:a})=>{const i=n==="large",l=Hr[n],u=()=>{if(s){const f=t.filter(d=>d.value!==e.value);return r==null?void 0:r(f)}else return r==null?void 0:r([...t,e])};return o.jsxs("button",{className:`${Ve.itemButton} ${i&&Ve.itemButtonLarge}`,style:{minHeight:l+"px"},onClick:u,children:[o.jsx(Zt,{checked:s}),e==null?void 0:e.element,a]})},Wm=({option:e,onChange:t,level:r,isSelected:n,children:s})=>{const a=r==="large",i=Hr[r],l=()=>{t==null||t([e])};return o.jsxs("button",{className:`${Ve.itemButton} ${a&&Ve.itemButtonLarge}`,style:{minHeight:i+"px"},onClick:l,children:[o.jsx(Or,{checked:n}),e==null?void 0:e.element,s]})},Lm=({option:e,onChange:t,level:r,isSelected:n,onHideTooltip:s,children:a})=>{const i=r==="large",l=Hr[r],u=()=>{if(s(),!n)return t==null?void 0:t([e])};return o.jsxs("button",{className:`
|
|
74
74
|
${Ve.itemButton}
|
|
75
75
|
${n&&Ve.itemButtonSelected}
|
|
76
76
|
${i&&Ve.itemButtonLarge}
|
package/dist/index.es.js
CHANGED
|
@@ -1330,7 +1330,10 @@ const Ds = ({
|
|
|
1330
1330
|
return /* @__PURE__ */ o.jsx("div", { className: Le.itemButton, onClick: C, children: /* @__PURE__ */ o.jsx(bn, { checked: M, label: Y.label }) });
|
|
1331
1331
|
}
|
|
1332
1332
|
case "select": {
|
|
1333
|
-
const C = () =>
|
|
1333
|
+
const C = () => {
|
|
1334
|
+
if (_(!1), !M)
|
|
1335
|
+
return a == null ? void 0 : a([Y]);
|
|
1336
|
+
};
|
|
1334
1337
|
return /* @__PURE__ */ o.jsx(
|
|
1335
1338
|
"div",
|
|
1336
1339
|
{
|
|
@@ -6172,7 +6175,10 @@ const Xh = /^\d+$/, e_ = /^-?\d+(\.\d+)?$/, Rs = (e) => Xh.test(e), t_ = (e) =>
|
|
|
6172
6175
|
onHideTooltip: s,
|
|
6173
6176
|
children: a
|
|
6174
6177
|
}) => {
|
|
6175
|
-
const i = r === "large", l = Vr[r], u = () =>
|
|
6178
|
+
const i = r === "large", l = Vr[r], u = () => {
|
|
6179
|
+
if (s(), !n)
|
|
6180
|
+
return t == null ? void 0 : t([e]);
|
|
6181
|
+
};
|
|
6176
6182
|
return /* @__PURE__ */ o.jsxs(
|
|
6177
6183
|
"button",
|
|
6178
6184
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enerdot-front-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.29-beta.
|
|
4
|
+
"version": "0.0.29-beta.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"enerdot-front-system",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"lint": "eslint .",
|
|
28
28
|
"preview": "vite preview",
|
|
29
29
|
"prepare": "rm -rf dist && tsc && vite build",
|
|
30
|
-
"add:package": "yarn add ./enerdot-front-system-v0.0.29-beta.
|
|
31
|
-
"reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.29-beta.
|
|
30
|
+
"add:package": "yarn add ./enerdot-front-system-v0.0.29-beta.3.tgz",
|
|
31
|
+
"reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.29-beta.3.tgz"
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|