@vacano/ui 1.4.0 → 1.4.1
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 +23 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +202 -182
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
box-shadow: ${e=>e.$shadow?`0 2px 8px ${t.alpha(t.COLORS.black,10)}`:"none"};
|
|
220
220
|
`,br=N.newClassNameGetter("card"),gr=({children:e,className:o,ref:r,border:i=!1,shadow:n=!1,...l})=>a.jsx(hr,{...l,ref:r,className:br("container",o),$border:i,$shadow:n,children:e}),Nt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.black,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},label:t.COLORS.black,icon:t.COLORS.white},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.red,focusShadow:t.alpha(t.COLORS.red,30)},label:t.COLORS.red,icon:t.COLORS.white}},ue=e=>Nt[e]??Nt.normal,fr=s.label`
|
|
221
221
|
display: inline-flex;
|
|
222
|
-
align-items:
|
|
222
|
+
align-items: flex-start;
|
|
223
223
|
gap: 8px;
|
|
224
224
|
cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
|
|
225
225
|
opacity: ${e=>e.$disabled?.5:1};
|
|
@@ -266,9 +266,19 @@
|
|
|
266
266
|
`,Sr=s.span`
|
|
267
267
|
font-size: 14px;
|
|
268
268
|
font-weight: 500;
|
|
269
|
-
line-height: 1;
|
|
269
|
+
line-height: 1.4;
|
|
270
270
|
color: ${e=>ue(e.$variant).label};
|
|
271
271
|
user-select: none;
|
|
272
|
+
|
|
273
|
+
a {
|
|
274
|
+
color: inherit;
|
|
275
|
+
text-decoration: underline;
|
|
276
|
+
cursor: pointer;
|
|
277
|
+
|
|
278
|
+
&:hover {
|
|
279
|
+
text-decoration: none;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
272
282
|
`,Re=N.newClassNameGetter("checkbox"),Je=({checked:e,className:o,classnames:r,disabled:i,indeterminate:n=!1,label:l,onChange:c,ref:d,variant:p="normal",...h})=>a.jsxs(fr,{className:Re("container",o),$disabled:!!i,$variant:p,children:[a.jsx(xr,{...h,ref:d,type:"checkbox",className:Re("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:c}),a.jsx(Or,{className:Re("box",r==null?void 0:r.box),$checked:e,$indeterminate:n,$variant:p,children:a.jsx($r,{className:Re("icon",r==null?void 0:r.icon),$visible:n||e,$variant:p,children:n?a.jsx(a.Minus,{}):a.jsx(a.Check,{})})}),l&&a.jsx(Sr,{className:Re("label",r==null?void 0:r.label),$variant:p,children:l})]}),It={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},ce=e=>It[e]??It.normal,yr=s.label`
|
|
273
283
|
display: grid;
|
|
274
284
|
grid-template-columns: auto 1fr;
|
|
@@ -1300,7 +1310,7 @@
|
|
|
1300
1310
|
transition: width 0.2s ease;
|
|
1301
1311
|
`,Jt=N.newClassNameGetter("progress"),$a=({value:e,size:o="default",className:r,classnames:i,ref:n,...l})=>a.jsx(xa,{...l,ref:n,$size:o,className:Jt("track",r,i==null?void 0:i.track),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:a.jsx(Oa,{$size:o,$value:e,className:Jt("bar",i==null?void 0:i.bar)})}),Qt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},dot:t.COLORS.black,label:t.COLORS.black},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS.red,30)},dot:t.COLORS.red,label:t.COLORS.red}},be=e=>Qt[e]??Qt.normal,Sa=s.label`
|
|
1302
1312
|
display: inline-flex;
|
|
1303
|
-
align-items:
|
|
1313
|
+
align-items: flex-start;
|
|
1304
1314
|
gap: 8px;
|
|
1305
1315
|
cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
|
|
1306
1316
|
opacity: ${e=>e.$disabled?.5:1};
|
|
@@ -1345,6 +1355,16 @@
|
|
|
1345
1355
|
line-height: 1.5;
|
|
1346
1356
|
color: ${e=>be(e.$variant).label};
|
|
1347
1357
|
user-select: none;
|
|
1358
|
+
|
|
1359
|
+
a {
|
|
1360
|
+
color: inherit;
|
|
1361
|
+
text-decoration: underline;
|
|
1362
|
+
cursor: pointer;
|
|
1363
|
+
|
|
1364
|
+
&:hover {
|
|
1365
|
+
text-decoration: none;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1348
1368
|
`,ze=N.newClassNameGetter("radio"),mt=({checked:e,className:o,classnames:r,disabled:i,label:n,onChange:l,ref:c,variant:d="normal",...p})=>a.jsxs(Sa,{className:ze("container",o),$disabled:!!i,$variant:d,children:[a.jsx(ya,{...p,ref:c,type:"radio",className:ze("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:l}),a.jsx(va,{className:ze("box",r==null?void 0:r.box),$checked:e,$variant:d,children:a.jsx(ma,{className:ze("dot",r==null?void 0:r.dot),$visible:e,$variant:d})}),n&&a.jsx(wa,{className:ze("label",r==null?void 0:r.label),$variant:d,children:n})]}),eo={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},se=e=>eo[e]??eo.normal,Ca=s.label`
|
|
1349
1369
|
display: grid;
|
|
1350
1370
|
grid-template-columns: auto 1fr;
|