@3sc/common-component 0.0.111 → 0.0.112
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.es.js +23 -17
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -26236,19 +26236,19 @@ const P4 = (e, t) => Ed(e) ? new O4(t) : new A4(t, {
|
|
|
26236
26236
|
...y4,
|
|
26237
26237
|
...l4,
|
|
26238
26238
|
...x4
|
|
26239
|
-
}, P4), En = /* @__PURE__ */ bP(N4), ar = ({ styles: e, label: t,
|
|
26240
|
-
const
|
|
26239
|
+
}, P4), En = /* @__PURE__ */ bP(N4), ar = ({ styles: e, label: t, disabled: n, ...o }) => {
|
|
26240
|
+
const r = ot(), s = (t == null ? void 0 : t.length) * ((t == null ? void 0 : t.length) >= 10 ? 6.5 : 7.5) + 38 || 0, [a, c] = Se(!1);
|
|
26241
26241
|
return /* @__PURE__ */ v.jsxs(
|
|
26242
26242
|
En.button,
|
|
26243
26243
|
{
|
|
26244
|
-
onMouseEnter: () => (e == null ? void 0 : e.isAnimate) &&
|
|
26245
|
-
onMouseLeave: () => (e == null ? void 0 : e.isAnimate) &&
|
|
26244
|
+
onMouseEnter: () => (e == null ? void 0 : e.isAnimate) && c(!0),
|
|
26245
|
+
onMouseLeave: () => (e == null ? void 0 : e.isAnimate) && c(!1),
|
|
26246
26246
|
initial: {
|
|
26247
|
-
width: e != null && e.isAnimate || !t ? "3rem" : `${
|
|
26247
|
+
width: e != null && e.isAnimate || !t ? "3rem" : `${s / 10}rem`,
|
|
26248
26248
|
borderRadius: "0.7rem"
|
|
26249
26249
|
},
|
|
26250
26250
|
animate: {
|
|
26251
|
-
width: e != null && e.isAnimate ? `${
|
|
26251
|
+
width: e != null && e.isAnimate ? `${a ? s / 10 : 3}rem` : `${t ? s / 10 : 3}rem`
|
|
26252
26252
|
},
|
|
26253
26253
|
transition: {
|
|
26254
26254
|
duration: 0.2,
|
|
@@ -26258,19 +26258,25 @@ const P4 = (e, t) => Ed(e) ? new O4(t) : new A4(t, {
|
|
|
26258
26258
|
height: "3rem",
|
|
26259
26259
|
outline: "none",
|
|
26260
26260
|
overflow: "hidden",
|
|
26261
|
-
backgroundColor: (e == null ? void 0 : e.variant) !== "outlined" ? (e == null ? void 0 : e.color) === "secondary" ?
|
|
26262
|
-
border: (e == null ? void 0 : e.variant) === "outlined" ? `0.1rem solid ${
|
|
26261
|
+
backgroundColor: (e == null ? void 0 : e.variant) !== "outlined" ? (e == null ? void 0 : e.color) === "secondary" ? r.palette.brandColor.blue : r.palette.brandColor.orange : r.palette.primary.notifyBackground,
|
|
26262
|
+
border: (e == null ? void 0 : e.variant) === "outlined" ? `0.1rem solid ${r.palette.primary.notifyBorderColor}` : "none",
|
|
26263
26263
|
display: "flex",
|
|
26264
26264
|
cursor: "pointer",
|
|
26265
26265
|
alignItems: "center",
|
|
26266
|
-
gap:
|
|
26267
|
-
color: (e == null ? void 0 : e.variant) === "outlined" ?
|
|
26268
|
-
justifyContent:
|
|
26269
|
-
padding:
|
|
26270
|
-
whiteSpace: "nowrap"
|
|
26266
|
+
gap: a || !(e != null && e.isAnimate) ? "0.5rem" : 0,
|
|
26267
|
+
color: (e == null ? void 0 : e.variant) === "outlined" ? r.palette.primary.notifyActiveText : "white",
|
|
26268
|
+
justifyContent: a ? "flex-start" : "center",
|
|
26269
|
+
padding: a || !(e != null && e.isAnimate) ? "1.2rem" : "0.8rem",
|
|
26270
|
+
whiteSpace: "nowrap",
|
|
26271
|
+
...n ? {
|
|
26272
|
+
backgroundColor: r.palette.primary.notifyIconColor,
|
|
26273
|
+
opacity: 0.8,
|
|
26274
|
+
cursor: "auto"
|
|
26275
|
+
} : {}
|
|
26271
26276
|
},
|
|
26272
26277
|
layout: !0,
|
|
26273
|
-
|
|
26278
|
+
disabled: !0,
|
|
26279
|
+
...o,
|
|
26274
26280
|
children: [
|
|
26275
26281
|
(e == null ? void 0 : e.icon) && (!(e != null && e.iconPosition) || (e == null ? void 0 : e.iconPosition) === "start") && /* @__PURE__ */ v.jsx(de, { component: "img", src: e == null ? void 0 : e.icon }),
|
|
26276
26282
|
t && /* @__PURE__ */ v.jsx(
|
|
@@ -26279,13 +26285,13 @@ const P4 = (e, t) => Ed(e) ? new O4(t) : new A4(t, {
|
|
|
26279
26285
|
layout: !0,
|
|
26280
26286
|
initial: { opacity: 0, width: 0 },
|
|
26281
26287
|
animate: {
|
|
26282
|
-
opacity:
|
|
26283
|
-
width:
|
|
26288
|
+
opacity: a || !(e != null && e.isAnimate) ? 1 : 0,
|
|
26289
|
+
width: a || !(e != null && e.isAnimate) ? "auto" : 0
|
|
26284
26290
|
},
|
|
26285
26291
|
transition: {
|
|
26286
26292
|
duration: 0.2,
|
|
26287
26293
|
ease: "easeInOut",
|
|
26288
|
-
delay:
|
|
26294
|
+
delay: a ? 0.1 : 0
|
|
26289
26295
|
},
|
|
26290
26296
|
style: {
|
|
26291
26297
|
overflow: "hidden",
|