@companix/uikit 0.0.45 → 0.0.46
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/Button/Button.scss +14 -0
- package/dist/bundle.es4.js +38 -35
- package/package.json +1 -1
package/dist/Button/Button.scss
CHANGED
|
@@ -125,4 +125,18 @@
|
|
|
125
125
|
@include use-appearance(neutral);
|
|
126
126
|
@include use-appearance(negative);
|
|
127
127
|
@include use-appearance(positive);
|
|
128
|
+
|
|
129
|
+
&[data-loading] {
|
|
130
|
+
position: relative;
|
|
131
|
+
|
|
132
|
+
.button-text {
|
|
133
|
+
visibility: hidden;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.button-spinner {
|
|
137
|
+
position: absolute;
|
|
138
|
+
margin: 0;
|
|
139
|
+
color: inherit;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
128
142
|
}
|
package/dist/bundle.es4.js
CHANGED
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Spinner as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { attr as
|
|
6
|
-
const F =
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import h from "classnames";
|
|
3
|
+
import { Spinner as j } from "./bundle.es6.js";
|
|
4
|
+
import { forwardRef as k } from "react";
|
|
5
|
+
import { attr as d } from "@companix/utils-browser";
|
|
6
|
+
const F = k(
|
|
7
7
|
({
|
|
8
|
-
children:
|
|
9
|
-
fill:
|
|
10
|
-
text:
|
|
11
|
-
active:
|
|
12
|
-
mode:
|
|
13
|
-
appearance:
|
|
14
|
-
size:
|
|
15
|
-
align:
|
|
16
|
-
icon:
|
|
8
|
+
children: e,
|
|
9
|
+
fill: c,
|
|
10
|
+
text: r,
|
|
11
|
+
active: f,
|
|
12
|
+
mode: p = "default",
|
|
13
|
+
appearance: u = "neutral",
|
|
14
|
+
size: b = "md",
|
|
15
|
+
align: N,
|
|
16
|
+
icon: m,
|
|
17
17
|
loading: t,
|
|
18
|
-
className:
|
|
18
|
+
className: v,
|
|
19
19
|
iconRight: o,
|
|
20
|
-
Component:
|
|
21
|
-
...
|
|
22
|
-
},
|
|
23
|
-
|
|
20
|
+
Component: s = "button",
|
|
21
|
+
...n
|
|
22
|
+
}, x) => /* @__PURE__ */ a(
|
|
23
|
+
s,
|
|
24
24
|
{
|
|
25
|
-
ref:
|
|
26
|
-
className:
|
|
27
|
-
"data-size":
|
|
28
|
-
"data-loading":
|
|
29
|
-
"data-align": t ? "center" :
|
|
30
|
-
"data-appearance":
|
|
31
|
-
"data-mode":
|
|
32
|
-
"data-fill":
|
|
33
|
-
"data-active":
|
|
34
|
-
type:
|
|
35
|
-
...
|
|
36
|
-
onClick: t ??
|
|
37
|
-
children: t ? /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
ref: x,
|
|
26
|
+
className: h("button", v),
|
|
27
|
+
"data-size": b,
|
|
28
|
+
"data-loading": d(t),
|
|
29
|
+
"data-align": t ? "center" : N ?? (m && o ? "left" : "center"),
|
|
30
|
+
"data-appearance": u,
|
|
31
|
+
"data-mode": p,
|
|
32
|
+
"data-fill": d(c),
|
|
33
|
+
"data-active": d(f),
|
|
34
|
+
type: s === "button" ? "button" : void 0,
|
|
35
|
+
...n,
|
|
36
|
+
onClick: t ?? n.disabled ? void 0 : n.onClick,
|
|
37
|
+
children: t ? /* @__PURE__ */ i(l, { children: [
|
|
38
|
+
/* @__PURE__ */ a(j, { size: 14, className: "button-spinner" }),
|
|
39
|
+
/* @__PURE__ */ a("span", { className: "button-text", children: r ?? e })
|
|
40
|
+
] }) : /* @__PURE__ */ i(l, { children: [
|
|
41
|
+
m,
|
|
42
|
+
(e ?? r) && /* @__PURE__ */ a("span", { className: "button-text", children: r ?? e }),
|
|
40
43
|
o
|
|
41
44
|
] })
|
|
42
45
|
}
|