mainstack-design-system 1.16.1 → 1.16.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/assets/styles.css +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/mainstack-design-system16.cjs +1 -1
- package/dist/mainstack-design-system16.js +43 -40
- package/dist/mainstack-design-system18.cjs +1 -1
- package/dist/mainstack-design-system18.js +47 -45
- package/dist/mainstack-design-system20.cjs +1 -1
- package/dist/mainstack-design-system20.js +27 -20
- package/dist/mainstack-design-system27.cjs +1 -1
- package/dist/mainstack-design-system27.js +44 -41
- package/dist/mainstack-design-system34.cjs +1 -1
- package/dist/mainstack-design-system34.js +24 -15
- package/dist/mainstack-design-system403.cjs +1 -1
- package/dist/mainstack-design-system403.js +29 -29
- package/dist/mainstack-design-system404.cjs +1 -1
- package/dist/mainstack-design-system404.js +2 -5
- package/package.json +1 -1
|
@@ -1,73 +1,76 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { FileUploaderContext as
|
|
4
|
-
import { u as
|
|
5
|
-
import { c as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
values:
|
|
9
|
-
onValuesChange:
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { FileUploaderContext as V } from "./mainstack-design-system35.js";
|
|
4
|
+
import { u as A } from "./index-437EL2iq.js";
|
|
5
|
+
import { c as D } from "./utils-Z5JtG_Bc.js";
|
|
6
|
+
import c, { useState as E, useCallback as u } from "react";
|
|
7
|
+
const P = ({
|
|
8
|
+
values: f,
|
|
9
|
+
onValuesChange: C,
|
|
10
10
|
defaultValues: n = [],
|
|
11
11
|
isDisabled: e,
|
|
12
|
-
accept:
|
|
13
|
-
maxFiles:
|
|
14
|
-
maxSize:
|
|
15
|
-
multiple:
|
|
12
|
+
accept: g = { "file/*": [".pdf", ".txt", ".docx"] },
|
|
13
|
+
maxFiles: l = 4,
|
|
14
|
+
maxSize: h,
|
|
15
|
+
multiple: s = !0,
|
|
16
16
|
onError: r,
|
|
17
|
-
children:
|
|
18
|
-
className:
|
|
19
|
-
|
|
17
|
+
children: v,
|
|
18
|
+
className: y,
|
|
19
|
+
isError: d,
|
|
20
|
+
...x
|
|
20
21
|
}) => {
|
|
21
|
-
const [t,
|
|
22
|
-
prop:
|
|
22
|
+
const [t, i] = A({
|
|
23
|
+
prop: f,
|
|
23
24
|
defaultProp: n,
|
|
24
|
-
onChange:
|
|
25
|
-
}), [
|
|
25
|
+
onChange: C
|
|
26
|
+
}), [z, a] = E(null), U = u(
|
|
26
27
|
(o) => {
|
|
27
|
-
a(null),
|
|
28
|
+
a(null), i(o);
|
|
28
29
|
},
|
|
29
|
-
[
|
|
30
|
-
),
|
|
30
|
+
[i]
|
|
31
|
+
), b = u(
|
|
31
32
|
(o) => {
|
|
32
|
-
const
|
|
33
|
-
a(
|
|
33
|
+
const p = o instanceof Error ? o.message : "An error occurred";
|
|
34
|
+
a(p), r && r(o);
|
|
34
35
|
},
|
|
35
36
|
[r]
|
|
36
|
-
),
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
37
|
+
), F = !s || t.length >= l, N = t.length > 0 && F, R = c.Children.map(v, (o) => c.isValidElement(o) && o.type?.displayName === "FileUploaderDropzone" && N ? null : o);
|
|
38
|
+
return /* @__PURE__ */ m(
|
|
39
|
+
V.Provider,
|
|
39
40
|
{
|
|
40
41
|
value: {
|
|
41
42
|
values: t,
|
|
42
43
|
defaultValues: n,
|
|
43
44
|
isDisabled: e,
|
|
44
|
-
accept:
|
|
45
|
-
maxFiles:
|
|
46
|
-
maxSize:
|
|
47
|
-
multiple:
|
|
48
|
-
error:
|
|
45
|
+
accept: g,
|
|
46
|
+
maxFiles: l,
|
|
47
|
+
maxSize: h,
|
|
48
|
+
multiple: s,
|
|
49
|
+
error: z,
|
|
49
50
|
setError: a,
|
|
50
|
-
onValuesChange:
|
|
51
|
-
onError:
|
|
51
|
+
onValuesChange: U,
|
|
52
|
+
onError: b,
|
|
53
|
+
isError: d
|
|
52
54
|
},
|
|
53
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ m(
|
|
54
56
|
"div",
|
|
55
57
|
{
|
|
56
58
|
"data-disabled": e,
|
|
57
59
|
"aria-disabled": e,
|
|
60
|
+
"data-error": d,
|
|
58
61
|
"data-slot": "file-uploader-root",
|
|
59
|
-
className:
|
|
62
|
+
className: D(
|
|
60
63
|
"mds:relative mds:flex mds:flex-col mds:gap-12 mds:body-font-family",
|
|
61
|
-
|
|
64
|
+
y
|
|
62
65
|
),
|
|
63
|
-
...
|
|
64
|
-
children:
|
|
66
|
+
...x,
|
|
67
|
+
children: R
|
|
65
68
|
}
|
|
66
69
|
)
|
|
67
70
|
}
|
|
68
71
|
);
|
|
69
72
|
};
|
|
70
|
-
|
|
73
|
+
P.displayName = "FileUploaderRoot";
|
|
71
74
|
export {
|
|
72
|
-
|
|
75
|
+
P as FileUploaderRoot
|
|
73
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),U=require("react"),f=require("./utils-s-0cOrOT.cjs"),w=require("./mainstack-design-system629.cjs"),C=require("./mainstack-design-system35.cjs");require("./mainstack-design-system366.cjs");const D=require("./mainstack-design-system55.cjs");require("./player-CocaNyQC.cjs");const g=({className:b,children:v,...h})=>{const{values:t,onValuesChange:m,accept:_,maxSize:a,maxFiles:o,onError:e,isError:z}=C.useFileUploaderContext(),x=U.useCallback(async(n,i)=>{const y=t.length,u=(o||0)-y;if(n.length>u||i.length>0){if(e){if(n.length>u||i.some(r=>r.errors.some(s=>s.code==="too-many-files")))return e(new Error(`You can only upload a maximum of ${o} images.`));if(i.some(r=>r.errors.some(s=>s.code==="file-too-large"))){const r=a?(a/1048576).toFixed(0):"0";return e(new Error(`Image size exceeds the ${r}MB limit.`))}return e(new Error("Invalid image type or criteria."))}return}try{const r=(await f.getFileMetadata(n)).filter(l=>!t.some(c=>c.fileName===l.fileName&&c.fileSize===l.fileSize&&c.lastModified===l.lastModified)),q=[...t,...r].slice(0,o);m(q)}catch(d){e&&e(d)}},[m,e,t,o,a]);return p.jsxs(w.DropzoneUploadArea,{"data-slot":"file-uploader-dropzone-content",className:f.cn("mds:relative mds:border mds:border-dashed mds:border-border-interactive-neutral mds:rounded-20 mds:bg-surface-neutral-l1 mds:data-[active-preview=true]:overflow-hidden mds:cursor-pointer mds:hover:bg-interactive-secondary mds:data-dragging:border-border-interactive-neutral mds:active:ring-2 mds:active:ring-border-interactive-neutral-pressed mds:p-24 mds:flex mds:flex-col mds:items-center mds:justify-center mds:h-full",z&&"mds:ring-2 mds:bg-surface-error-l1 mds:ring-border-surface-error-l1",b),onDrop:x,accept:_,maxFiles:o,maxSize:a,asChild:!0,...h,children:[p.jsx(D,{variant:"filled"}),v]})};g.displayName="FileUploaderDropzone";exports.FileUploaderDropzone=g;
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { a as
|
|
1
|
+
import { jsxs as y, jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as C } from "react";
|
|
3
|
+
import { a as E, c as M } from "./utils-Z5JtG_Bc.js";
|
|
4
4
|
import { DropzoneUploadArea as N } from "./mainstack-design-system629.js";
|
|
5
5
|
import { useFileUploaderContext as D } from "./mainstack-design-system35.js";
|
|
6
6
|
import "./mainstack-design-system366.js";
|
|
7
|
-
import
|
|
7
|
+
import I from "./mainstack-design-system55.js";
|
|
8
8
|
import "./player-Chgv-hOU.js";
|
|
9
|
-
const
|
|
9
|
+
const S = ({
|
|
10
10
|
className: f,
|
|
11
11
|
children: p,
|
|
12
12
|
...g
|
|
13
13
|
}) => {
|
|
14
|
-
const {
|
|
14
|
+
const {
|
|
15
|
+
values: t,
|
|
16
|
+
onValuesChange: c,
|
|
17
|
+
accept: b,
|
|
18
|
+
maxSize: a,
|
|
19
|
+
maxFiles: o,
|
|
20
|
+
onError: e,
|
|
21
|
+
isError: h
|
|
22
|
+
} = D(), v = C(
|
|
15
23
|
async (i, n) => {
|
|
16
|
-
const
|
|
24
|
+
const x = t.length, u = (o || 0) - x;
|
|
17
25
|
if (i.length > u || n.length > 0) {
|
|
18
26
|
if (e) {
|
|
19
27
|
if (i.length > u || n.some(
|
|
@@ -37,40 +45,41 @@ const I = ({
|
|
|
37
45
|
return;
|
|
38
46
|
}
|
|
39
47
|
try {
|
|
40
|
-
const r = (await
|
|
48
|
+
const r = (await E(i)).filter(
|
|
41
49
|
(m) => !t.some(
|
|
42
50
|
(l) => l.fileName === m.fileName && l.fileSize === m.fileSize && l.lastModified === m.lastModified
|
|
43
51
|
)
|
|
44
|
-
),
|
|
45
|
-
c(
|
|
52
|
+
), z = [...t, ...r].slice(0, o);
|
|
53
|
+
c(z);
|
|
46
54
|
} catch (d) {
|
|
47
55
|
e && e(d);
|
|
48
56
|
}
|
|
49
57
|
},
|
|
50
58
|
[c, e, t, o, a]
|
|
51
59
|
);
|
|
52
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ y(
|
|
53
61
|
N,
|
|
54
62
|
{
|
|
55
63
|
"data-slot": "file-uploader-dropzone-content",
|
|
56
64
|
className: M(
|
|
57
65
|
"mds:relative mds:border mds:border-dashed mds:border-border-interactive-neutral mds:rounded-20 mds:bg-surface-neutral-l1 mds:data-[active-preview=true]:overflow-hidden mds:cursor-pointer mds:hover:bg-interactive-secondary mds:data-dragging:border-border-interactive-neutral mds:active:ring-2 mds:active:ring-border-interactive-neutral-pressed mds:p-24 mds:flex mds:flex-col mds:items-center mds:justify-center mds:h-full",
|
|
66
|
+
h && "mds:ring-2 mds:bg-surface-error-l1 mds:ring-border-surface-error-l1",
|
|
58
67
|
f
|
|
59
68
|
),
|
|
60
69
|
onDrop: v,
|
|
61
|
-
accept:
|
|
70
|
+
accept: b,
|
|
62
71
|
maxFiles: o,
|
|
63
72
|
maxSize: a,
|
|
64
73
|
asChild: !0,
|
|
65
74
|
...g,
|
|
66
75
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ w(I, { variant: "filled" }),
|
|
68
77
|
p
|
|
69
78
|
]
|
|
70
79
|
}
|
|
71
80
|
);
|
|
72
81
|
};
|
|
73
|
-
|
|
82
|
+
S.displayName = "FileUploaderDropzone";
|
|
74
83
|
export {
|
|
75
|
-
|
|
84
|
+
S as FileUploaderDropzone
|
|
76
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),t=require("react"),I=require("./utils-s-0cOrOT.cjs"),N=require("./mainstack-design-system406.cjs"),V=t.forwardRef,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),t=require("react"),I=require("./utils-s-0cOrOT.cjs"),N=require("./mainstack-design-system406.cjs"),V=t.forwardRef,p=V(({as:r,className:m,size:u="md",variant:y="primary",status:g="default",rounded:z="md",disabled:n,iconOnly:l=!1,children:b,isLoading:c,...f},h)=>{const x=r||"button",o=t.Children.toArray(b),a=o[0],i=o[o.length-1],s=t.isValidElement(a)&&typeof a.type!="string"&&a.type?.displayName==="ButtonIcon",d=t.isValidElement(i)&&typeof i.type!="string"&&i.type?.displayName==="ButtonIcon",w=o.some(e=>t.isValidElement(e)&&typeof e.type!="string"&&e.type?.displayName==="ButtonLabel"),B=s&&d?"both":s?"leading":d?"trailing":"none";return R.jsx(x,{ref:h,"data-disabled":n,tabIndex:n?-1:0,"data-slot":"button-root","data-button-icon-position":B,"data-button-icon-only":l?"true":"false","data-loading":c,disabled:n||c,"data-button-size":u,className:I.cn(N.buttonVariants({size:u,variant:y,status:g,rounded:z}),"mds:data-[button-size=tiny]:data-[button-icon-position=leading]:pr-12","mds:data-[button-size=tiny]:data-[button-icon-position=trailing]:pl-12","mds:data-[button-size=tiny]:data-[button-icon-position=both]:p-6","mds:data-[button-size=xs]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-14","mds:data-[button-size=xs]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24","mds:data-[button-size=xs]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pr-16","mds:data-[button-size=xs]:data-[button-icon-position=both]:data-[button-icon-only=false]:px-16","mds:data-[button-size=sm]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-24","mds:data-[button-size=sm]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24","mds:data-[button-size=sm]:data-[button-icon-position=both]:p-16","mds:data-[button-size=md]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-24","mds:data-[button-size=md]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24","mds:data-[button-size=md]:data-[button-icon-position=both]:py-12","mds:data-[button-size=md]:data-[button-icon-position=both]:px-16","mds:data-[button-size=lg]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-24","mds:data-[button-size=lg]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24","mds:data-[button-size=lg]:data-[button-icon-position=both]:p-16",s&&d&&w&&"mds:pl-4 mds:pr-5",l&&["mds:data-[button-size=tiny]:data-[button-icon-only=true]:px-8","mds:data-[button-size=tiny]:data-[button-icon-only=true]:w-30","mds:data-[button-size=xs]:data-[button-icon-only=true]:w-36","mds:data-[button-size=sm]:data-[button-icon-only=true]:w-40","mds:data-[button-size=md]:data-[button-icon-only=true]:w-48","mds:data-[button-size=lg]:data-[button-icon-only=true]:w-56"],m),...f,children:b})});p.displayName="ButtonRoot";exports.ButtonRoot=p;
|
|
@@ -4,54 +4,54 @@ import { c as I } from "./utils-Z5JtG_Bc.js";
|
|
|
4
4
|
import { buttonVariants as N } from "./mainstack-design-system406.js";
|
|
5
5
|
const R = B, C = R(
|
|
6
6
|
({
|
|
7
|
-
as:
|
|
8
|
-
className:
|
|
7
|
+
as: m,
|
|
8
|
+
className: c,
|
|
9
9
|
size: u = "md",
|
|
10
|
-
variant:
|
|
10
|
+
variant: r = "primary",
|
|
11
11
|
status: y = "default",
|
|
12
|
-
rounded:
|
|
12
|
+
rounded: f = "md",
|
|
13
13
|
disabled: n,
|
|
14
|
-
iconOnly:
|
|
15
|
-
children:
|
|
16
|
-
isLoading:
|
|
17
|
-
...
|
|
18
|
-
},
|
|
19
|
-
const h =
|
|
14
|
+
iconOnly: l = !1,
|
|
15
|
+
children: b,
|
|
16
|
+
isLoading: p,
|
|
17
|
+
...g
|
|
18
|
+
}, z) => {
|
|
19
|
+
const h = m || "button", t = o.Children.toArray(b), a = t[0], i = t[t.length - 1], s = o.isValidElement(a) && typeof a.type != "string" && a.type?.displayName === "ButtonIcon", d = o.isValidElement(i) && typeof i.type != "string" && i.type?.displayName === "ButtonIcon", x = t.some(
|
|
20
20
|
(e) => o.isValidElement(e) && typeof e.type != "string" && e.type?.displayName === "ButtonLabel"
|
|
21
21
|
);
|
|
22
22
|
return /* @__PURE__ */ w(
|
|
23
23
|
h,
|
|
24
24
|
{
|
|
25
|
-
ref:
|
|
25
|
+
ref: z,
|
|
26
26
|
"data-disabled": n,
|
|
27
27
|
tabIndex: n ? -1 : 0,
|
|
28
28
|
"data-slot": "button-root",
|
|
29
29
|
"data-button-icon-position": s && d ? "both" : s ? "leading" : d ? "trailing" : "none",
|
|
30
|
-
"data-button-icon-only":
|
|
31
|
-
"data-loading":
|
|
32
|
-
disabled: n ||
|
|
30
|
+
"data-button-icon-only": l ? "true" : "false",
|
|
31
|
+
"data-loading": p,
|
|
32
|
+
disabled: n || p,
|
|
33
33
|
"data-button-size": u,
|
|
34
34
|
className: I(
|
|
35
|
-
N({ size: u, variant:
|
|
35
|
+
N({ size: u, variant: r, status: y, rounded: f }),
|
|
36
36
|
"mds:data-[button-size=tiny]:data-[button-icon-position=leading]:pr-12",
|
|
37
37
|
"mds:data-[button-size=tiny]:data-[button-icon-position=trailing]:pl-12",
|
|
38
38
|
"mds:data-[button-size=tiny]:data-[button-icon-position=both]:p-6",
|
|
39
|
-
"mds:data-[button-size=xs]:data-[button-icon-position=leading]:pr-14",
|
|
40
|
-
"mds:data-[button-size=xs]:data-[button-icon-position=trailing]:pl-24",
|
|
41
|
-
"mds:data-[button-size=xs]:data-[button-icon-position=trailing]:pr-16",
|
|
42
|
-
"mds:data-[button-size=xs]:data-[button-icon-position=both]:px-16",
|
|
43
|
-
"mds:data-[button-size=sm]:data-[button-icon-position=leading]:pr-24",
|
|
44
|
-
"mds:data-[button-size=sm]:data-[button-icon-position=trailing]:pl-24",
|
|
39
|
+
"mds:data-[button-size=xs]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-14",
|
|
40
|
+
"mds:data-[button-size=xs]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24",
|
|
41
|
+
"mds:data-[button-size=xs]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pr-16",
|
|
42
|
+
"mds:data-[button-size=xs]:data-[button-icon-position=both]:data-[button-icon-only=false]:px-16",
|
|
43
|
+
"mds:data-[button-size=sm]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-24",
|
|
44
|
+
"mds:data-[button-size=sm]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24",
|
|
45
45
|
"mds:data-[button-size=sm]:data-[button-icon-position=both]:p-16",
|
|
46
|
-
"mds:data-[button-size=md]:data-[button-icon-position=leading]:pr-24",
|
|
47
|
-
"mds:data-[button-size=md]:data-[button-icon-position=trailing]:pl-24",
|
|
46
|
+
"mds:data-[button-size=md]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-24",
|
|
47
|
+
"mds:data-[button-size=md]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24",
|
|
48
48
|
"mds:data-[button-size=md]:data-[button-icon-position=both]:py-12",
|
|
49
49
|
"mds:data-[button-size=md]:data-[button-icon-position=both]:px-16",
|
|
50
|
-
"mds:data-[button-size=lg]:data-[button-icon-position=leading]:pr-24",
|
|
51
|
-
"mds:data-[button-size=lg]:data-[button-icon-position=trailing]:pl-24",
|
|
50
|
+
"mds:data-[button-size=lg]:data-[button-icon-position=leading]:data-[button-icon-only=false]:pr-24",
|
|
51
|
+
"mds:data-[button-size=lg]:data-[button-icon-position=trailing]:data-[button-icon-only=false]:pl-24",
|
|
52
52
|
"mds:data-[button-size=lg]:data-[button-icon-position=both]:p-16",
|
|
53
53
|
s && d && x && "mds:pl-4 mds:pr-5",
|
|
54
|
-
|
|
54
|
+
l && [
|
|
55
55
|
"mds:data-[button-size=tiny]:data-[button-icon-only=true]:px-8",
|
|
56
56
|
"mds:data-[button-size=tiny]:data-[button-icon-only=true]:w-30",
|
|
57
57
|
"mds:data-[button-size=xs]:data-[button-icon-only=true]:w-36",
|
|
@@ -59,10 +59,10 @@ const R = B, C = R(
|
|
|
59
59
|
"mds:data-[button-size=md]:data-[button-icon-only=true]:w-48",
|
|
60
60
|
"mds:data-[button-size=lg]:data-[button-icon-only=true]:w-56"
|
|
61
61
|
],
|
|
62
|
-
|
|
62
|
+
c
|
|
63
63
|
),
|
|
64
|
-
...
|
|
65
|
-
children:
|
|
64
|
+
...g,
|
|
65
|
+
children: b
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),u=require("./utils-s-0cOrOT.cjs"),i=require("./mainstack-design-system397.cjs"),o=a.forwardRef(({className:r,children:e,...n},s)=>e||t.jsx("span",{className:" mds:animate-pulse-wiggle",children:t.jsx(i.Spinner,{ref:s,"data-slot":"button-loader",className:u.cn(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),u=require("./utils-s-0cOrOT.cjs"),i=require("./mainstack-design-system397.cjs"),o=a.forwardRef(({className:r,children:e,...n},s)=>e||t.jsx("span",{className:"mds:hidden mds:group-data-[loading=true]/buttonroot:block mds:animate-pulse-wiggle",children:t.jsx(i.Spinner,{ref:s,"data-slot":"button-loader",className:u.cn(r),...n})}));o.displayName="ButtonLoader";exports.ButtonLoader=o;
|
|
@@ -3,15 +3,12 @@ import { forwardRef as m } from "react";
|
|
|
3
3
|
import { c as n } from "./utils-Z5JtG_Bc.js";
|
|
4
4
|
import { Spinner as s } from "./mainstack-design-system397.js";
|
|
5
5
|
const d = m(
|
|
6
|
-
({ className: t, children: o, ...a }, e) => o || /* @__PURE__ */ r("span", { className: " mds:animate-pulse-wiggle", children: /* @__PURE__ */ r(
|
|
6
|
+
({ className: t, children: o, ...a }, e) => o || /* @__PURE__ */ r("span", { className: "mds:hidden mds:group-data-[loading=true]/buttonroot:block mds:animate-pulse-wiggle", children: /* @__PURE__ */ r(
|
|
7
7
|
s,
|
|
8
8
|
{
|
|
9
9
|
ref: e,
|
|
10
10
|
"data-slot": "button-loader",
|
|
11
|
-
className: n(
|
|
12
|
-
"mds:hidden mds:group-data-[loading=true]/buttonroot:block ",
|
|
13
|
-
t
|
|
14
|
-
),
|
|
11
|
+
className: n(t),
|
|
15
12
|
...a
|
|
16
13
|
}
|
|
17
14
|
) })
|