aot-ui 0.2.1 → 0.2.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-lib/aot-ui.js
CHANGED
|
@@ -2824,57 +2824,59 @@ function fn(e, t) {
|
|
|
2824
2824
|
let n = e.trim();
|
|
2825
2825
|
return `${n[0]} ${n[1]}`;
|
|
2826
2826
|
}
|
|
2827
|
-
|
|
2828
|
-
let
|
|
2827
|
+
var pn = a(function({ children: e, tone: t, size: n, loading: r = !1, loadingIcon: a, block: o = !1, plain: s, text: c, bg: l = !1, link: u = !1, round: d, circle: f = !1, dashed: p, icon: m, iconPosition: h = "start", color: y, autoInsertSpace: b, tag: x = "button", disabled: S = !1, className: C = "", type: w = "button", style: T, ...E }, D) {
|
|
2828
|
+
let O = Ut(), k = un(), A = O.button ?? {}, j = s ?? A.plain ?? !1, M = c ?? A.text ?? !1, N = d ?? A.round ?? !1, P = p ?? A.dashed ?? !1, F = b ?? A.autoInsertSpace ?? !1, I = t ?? k?.tone ?? A.type ?? "primary", L = M || t === "text", R = L && t === "text" ? "primary" : I, z = n ?? k?.size, B = z == null, V = z ?? O.size, H = !r && m ? /* @__PURE__ */ _("span", {
|
|
2829
2829
|
className: ["aot-btn__icon", h === "end" ? "aot-btn__icon--end" : "aot-btn__icon--start"].join(" "),
|
|
2830
2830
|
"aria-hidden": !0,
|
|
2831
2831
|
children: m
|
|
2832
|
-
}) : null,
|
|
2832
|
+
}) : null, U = r ? /* @__PURE__ */ _("span", {
|
|
2833
2833
|
className: "aot-btn__loading",
|
|
2834
2834
|
"aria-hidden": !0,
|
|
2835
2835
|
children: a ?? /* @__PURE__ */ _("span", { className: "aot-btn__spin" })
|
|
2836
|
-
}) : null,
|
|
2836
|
+
}) : null, W = fn(e, F), G = W != null && W !== !1 ? /* @__PURE__ */ _("span", {
|
|
2837
2837
|
className: "aot-btn__label",
|
|
2838
|
-
children:
|
|
2839
|
-
}) : null,
|
|
2838
|
+
children: W
|
|
2839
|
+
}) : null, ee = {
|
|
2840
2840
|
...T,
|
|
2841
2841
|
...y ? { "--btn-custom": y } : null
|
|
2842
|
-
},
|
|
2842
|
+
}, K = [
|
|
2843
2843
|
"aot-btn",
|
|
2844
|
-
`aot-btn--${
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2844
|
+
`aot-btn--${L ? "primary" : R}`,
|
|
2845
|
+
B ? "aot-btn--follow" : `aot-btn--${V}`,
|
|
2846
|
+
j ? "is-plain" : "",
|
|
2847
|
+
L ? "is-text" : "",
|
|
2848
|
+
L && l ? "is-text-bg" : "",
|
|
2849
2849
|
u ? "is-link" : "",
|
|
2850
|
-
|
|
2850
|
+
N ? "is-round" : "",
|
|
2851
2851
|
f ? "is-circle" : "",
|
|
2852
|
-
|
|
2852
|
+
P ? "is-dashed" : "",
|
|
2853
2853
|
o ? "is-block" : "",
|
|
2854
2854
|
r ? "is-loading" : "",
|
|
2855
2855
|
y ? "is-custom" : "",
|
|
2856
2856
|
m && !e ? "is-icon-only" : "",
|
|
2857
2857
|
C
|
|
2858
|
-
].filter(Boolean).join(" "),
|
|
2859
|
-
|
|
2860
|
-
h === "start" ?
|
|
2861
|
-
|
|
2862
|
-
h === "end" ?
|
|
2858
|
+
].filter(Boolean).join(" "), q = x === "button" || x === void 0, J = /* @__PURE__ */ v(g, { children: [
|
|
2859
|
+
U,
|
|
2860
|
+
h === "start" ? H : null,
|
|
2861
|
+
G,
|
|
2862
|
+
h === "end" ? H : null
|
|
2863
2863
|
] });
|
|
2864
|
-
return
|
|
2864
|
+
return q ? /* @__PURE__ */ _("button", {
|
|
2865
|
+
ref: D,
|
|
2865
2866
|
type: w,
|
|
2866
|
-
"data-size":
|
|
2867
|
-
className:
|
|
2868
|
-
style:
|
|
2867
|
+
"data-size": V,
|
|
2868
|
+
className: K,
|
|
2869
|
+
style: ee,
|
|
2869
2870
|
disabled: S || r,
|
|
2870
2871
|
"aria-busy": r || void 0,
|
|
2871
2872
|
...E,
|
|
2872
|
-
children:
|
|
2873
|
+
children: J
|
|
2873
2874
|
}) : i(x, {
|
|
2874
2875
|
...E,
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2876
|
+
ref: D,
|
|
2877
|
+
"data-size": V,
|
|
2878
|
+
className: K,
|
|
2879
|
+
style: ee,
|
|
2878
2880
|
"aria-disabled": S || r || void 0,
|
|
2879
2881
|
"aria-busy": r || void 0,
|
|
2880
2882
|
role: E.role ?? "button",
|
|
@@ -2882,8 +2884,8 @@ function pn({ children: e, tone: t, size: n, loading: r = !1, loadingIcon: a, bl
|
|
|
2882
2884
|
onClick: (e) => {
|
|
2883
2885
|
S || r ? e.preventDefault() : E.onClick?.(e);
|
|
2884
2886
|
}
|
|
2885
|
-
},
|
|
2886
|
-
}
|
|
2887
|
+
}, J);
|
|
2888
|
+
});
|
|
2887
2889
|
// src/modules/button/components/ButtonGroup.tsx
|
|
2888
2890
|
function mn({ children: e, size: t, tone: n, direction: r = "horizontal", className: i = "", role: a = "group", ...o }) {
|
|
2889
2891
|
let s = p(() => ({
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const Button: import('react').ForwardRefExoticComponent<{
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
tone?: import('..').ButtonTone;
|
|
5
|
+
size?: import('..').ButtonSize;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
loadingIcon?: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
block?: boolean;
|
|
10
|
+
plain?: boolean;
|
|
11
|
+
text?: boolean;
|
|
12
|
+
bg?: boolean;
|
|
13
|
+
link?: boolean;
|
|
14
|
+
round?: boolean;
|
|
15
|
+
circle?: boolean;
|
|
16
|
+
dashed?: boolean;
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
iconPosition?: import('..').ButtonIconPosition;
|
|
19
|
+
color?: string;
|
|
20
|
+
autoInsertSpace?: boolean;
|
|
21
|
+
tag?: import('react').ElementType;
|
|
22
|
+
href?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
} & Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "className" | "color"> & import('react').RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aot-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "AOT React UI component kit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist-lib/aot-ui.js",
|
|
@@ -37,11 +37,15 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": ">=18",
|
|
39
39
|
"react-dom": ">=18",
|
|
40
|
-
"react-router-dom": ">=6"
|
|
40
|
+
"react-router-dom": ">=6",
|
|
41
|
+
"@tauri-apps/api": ">=2"
|
|
41
42
|
},
|
|
42
43
|
"peerDependenciesMeta": {
|
|
43
44
|
"react-router-dom": {
|
|
44
45
|
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"@tauri-apps/api": {
|
|
48
|
+
"optional": true
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
"dependencies": {
|