@windrun-huaiin/third-ui 5.9.6 → 5.9.8
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/main/index.d.mts +3 -11
- package/dist/main/index.d.ts +3 -11
- package/dist/main/index.js +11 -21
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +10 -19
- package/dist/main/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/main/x-button.tsx +11 -18
package/dist/main/index.d.mts
CHANGED
|
@@ -81,18 +81,10 @@ interface SplitButtonProps {
|
|
|
81
81
|
loadingText?: string;
|
|
82
82
|
menuWidth?: string;
|
|
83
83
|
className?: string;
|
|
84
|
+
mainButtonClassName?: string;
|
|
85
|
+
dropdownButtonClassName?: string;
|
|
84
86
|
}
|
|
85
87
|
type xButtonProps = SingleButtonProps | SplitButtonProps;
|
|
86
|
-
declare const XButtonIcons: {
|
|
87
|
-
copy: react_jsx_runtime.JSX.Element;
|
|
88
|
-
checkCheck: react_jsx_runtime.JSX.Element;
|
|
89
|
-
globe: react_jsx_runtime.JSX.Element;
|
|
90
|
-
loader: react_jsx_runtime.JSX.Element;
|
|
91
|
-
download: react_jsx_runtime.JSX.Element;
|
|
92
|
-
upload: react_jsx_runtime.JSX.Element;
|
|
93
|
-
share: react_jsx_runtime.JSX.Element;
|
|
94
|
-
edit: react_jsx_runtime.JSX.Element;
|
|
95
|
-
};
|
|
96
88
|
declare function XButton(props: xButtonProps): react_jsx_runtime.JSX.Element;
|
|
97
89
|
|
|
98
|
-
export { AdsAlertDialog, type BillingOption, CTA, FAQ, Features, Footer, Gallery, GoToTop, Loading, NProgressBar, PricePlan, type PricePlanAppConfig, type PricePlanProps, type Prices, SeoContent, Tips, Usage, XButton
|
|
90
|
+
export { AdsAlertDialog, type BillingOption, CTA, FAQ, Features, Footer, Gallery, GoToTop, Loading, NProgressBar, PricePlan, type PricePlanAppConfig, type PricePlanProps, type Prices, SeoContent, Tips, Usage, XButton };
|
package/dist/main/index.d.ts
CHANGED
|
@@ -81,18 +81,10 @@ interface SplitButtonProps {
|
|
|
81
81
|
loadingText?: string;
|
|
82
82
|
menuWidth?: string;
|
|
83
83
|
className?: string;
|
|
84
|
+
mainButtonClassName?: string;
|
|
85
|
+
dropdownButtonClassName?: string;
|
|
84
86
|
}
|
|
85
87
|
type xButtonProps = SingleButtonProps | SplitButtonProps;
|
|
86
|
-
declare const XButtonIcons: {
|
|
87
|
-
copy: react_jsx_runtime.JSX.Element;
|
|
88
|
-
checkCheck: react_jsx_runtime.JSX.Element;
|
|
89
|
-
globe: react_jsx_runtime.JSX.Element;
|
|
90
|
-
loader: react_jsx_runtime.JSX.Element;
|
|
91
|
-
download: react_jsx_runtime.JSX.Element;
|
|
92
|
-
upload: react_jsx_runtime.JSX.Element;
|
|
93
|
-
share: react_jsx_runtime.JSX.Element;
|
|
94
|
-
edit: react_jsx_runtime.JSX.Element;
|
|
95
|
-
};
|
|
96
88
|
declare function XButton(props: xButtonProps): react_jsx_runtime.JSX.Element;
|
|
97
89
|
|
|
98
|
-
export { AdsAlertDialog, type BillingOption, CTA, FAQ, Features, Footer, Gallery, GoToTop, Loading, NProgressBar, PricePlan, type PricePlanAppConfig, type PricePlanProps, type Prices, SeoContent, Tips, Usage, XButton
|
|
90
|
+
export { AdsAlertDialog, type BillingOption, CTA, FAQ, Features, Footer, Gallery, GoToTop, Loading, NProgressBar, PricePlan, type PricePlanAppConfig, type PricePlanProps, type Prices, SeoContent, Tips, Usage, XButton };
|
package/dist/main/index.js
CHANGED
|
@@ -93,8 +93,7 @@ __export(main_exports, {
|
|
|
93
93
|
SeoContent: () => SeoContent,
|
|
94
94
|
Tips: () => Tips,
|
|
95
95
|
Usage: () => Usage,
|
|
96
|
-
XButton: () => XButton
|
|
97
|
-
XButtonIcons: () => XButtonIcons
|
|
96
|
+
XButton: () => XButton
|
|
98
97
|
});
|
|
99
98
|
module.exports = __toCommonJS(main_exports);
|
|
100
99
|
|
|
@@ -6080,16 +6079,6 @@ function AdsAlertDialog({
|
|
|
6080
6079
|
// src/main/x-button.tsx
|
|
6081
6080
|
var import_react42 = require("react");
|
|
6082
6081
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6083
|
-
var XButtonIcons = {
|
|
6084
|
-
copy: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Copy, { className: "w-5 h-5 mr-1" }),
|
|
6085
|
-
checkCheck: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.CheckCheck, { className: "w-5 h-5 mr-1" }),
|
|
6086
|
-
globe: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Languages, { className: "w-5 h-5 mr-1" }),
|
|
6087
|
-
loader: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Loader2, { className: "w-5 h-5 mr-1 animate-spin" }),
|
|
6088
|
-
download: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Download, { className: "w-5 h-5 mr-1" }),
|
|
6089
|
-
upload: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.ImageUp, { className: "w-5 h-5 mr-1" }),
|
|
6090
|
-
share: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Share, { className: "w-5 h-5 mr-1" }),
|
|
6091
|
-
edit: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Pencil, { className: "w-5 h-5 mr-1" })
|
|
6092
|
-
};
|
|
6093
6082
|
function XButton(props) {
|
|
6094
6083
|
var _a, _b;
|
|
6095
6084
|
const [isLoading, setIsLoading] = (0, import_react42.useState)(false);
|
|
@@ -6121,7 +6110,7 @@ function XButton(props) {
|
|
|
6121
6110
|
setIsLoading(false);
|
|
6122
6111
|
}
|
|
6123
6112
|
});
|
|
6124
|
-
const baseButtonClass = "flex items-center justify-center px-4 py-2 bg-neutral-
|
|
6113
|
+
const baseButtonClass = "flex items-center justify-center px-4 py-2 bg-neutral-200 dark:bg-neutral-800 text-neutral-700 dark:text-white text-sm font-semibold transition-colors hover:bg-neutral-300 dark:hover:bg-neutral-700";
|
|
6125
6114
|
const disabledClass = "opacity-60 cursor-not-allowed";
|
|
6126
6115
|
if (props.type === "single") {
|
|
6127
6116
|
const { button, loadingText: loadingText2, minWidth = "min-w-[110px]", className: className2 = "" } = props;
|
|
@@ -6144,19 +6133,20 @@ function XButton(props) {
|
|
|
6144
6133
|
}
|
|
6145
6134
|
);
|
|
6146
6135
|
}
|
|
6147
|
-
const { mainButton, menuItems, loadingText, menuWidth = "w-40", className = "" } = props;
|
|
6136
|
+
const { mainButton, menuItems, loadingText, menuWidth = "w-40", className = "", mainButtonClassName = "", dropdownButtonClassName = "" } = props;
|
|
6148
6137
|
const isMainDisabled = mainButton.disabled || isLoading;
|
|
6149
6138
|
const actualLoadingText = loadingText || ((_b = mainButton.text) == null ? void 0 : _b.trim()) || "Loading...";
|
|
6150
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `relative flex bg-neutral-
|
|
6139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `relative flex bg-neutral-200 dark:bg-neutral-800 rounded-full ${className}`, children: [
|
|
6151
6140
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6152
6141
|
"button",
|
|
6153
6142
|
{
|
|
6154
6143
|
onClick: () => handleButtonClick(mainButton.onClick),
|
|
6155
6144
|
disabled: isMainDisabled,
|
|
6156
|
-
className: `flex-1 ${baseButtonClass} rounded-l-full ${isMainDisabled ? disabledClass : ""}`,
|
|
6145
|
+
className: `flex-1 ${baseButtonClass} rounded-l-full ${isMainDisabled ? disabledClass : ""} ${mainButtonClassName}`,
|
|
6157
6146
|
onMouseDown: (e) => {
|
|
6158
6147
|
if (e.button === 2) e.preventDefault();
|
|
6159
6148
|
},
|
|
6149
|
+
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
6160
6150
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
6161
6151
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.Loader2, { className: "w-5 h-5 mr-1 animate-spin" }),
|
|
6162
6152
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: actualLoadingText })
|
|
@@ -6169,12 +6159,13 @@ function XButton(props) {
|
|
|
6169
6159
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6170
6160
|
"span",
|
|
6171
6161
|
{
|
|
6172
|
-
className:
|
|
6162
|
+
className: `flex items-center justify-center w-10 py-2 cursor-pointer transition hover:bg-neutral-300 dark:hover:bg-neutral-700 rounded-r-full ${dropdownButtonClassName}`,
|
|
6173
6163
|
onClick: (e) => {
|
|
6174
6164
|
e.stopPropagation();
|
|
6175
6165
|
setMenuOpen((v) => !v);
|
|
6176
6166
|
},
|
|
6177
6167
|
tabIndex: 0,
|
|
6168
|
+
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
6178
6169
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(globalLucideIcons.ChevronDown, { className: "w-6 h-6" })
|
|
6179
6170
|
}
|
|
6180
6171
|
),
|
|
@@ -6191,7 +6182,7 @@ function XButton(props) {
|
|
|
6191
6182
|
setMenuOpen(false);
|
|
6192
6183
|
},
|
|
6193
6184
|
disabled: item.disabled,
|
|
6194
|
-
className: `flex items-center w-full px-4 py-3 transition hover:bg-neutral-
|
|
6185
|
+
className: `flex items-center w-full px-4 py-3 transition hover:bg-neutral-300 dark:hover:bg-neutral-600 text-left relative ${item.disabled ? disabledClass : ""}`,
|
|
6195
6186
|
children: [
|
|
6196
6187
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center", children: [
|
|
6197
6188
|
item.icon,
|
|
@@ -6201,7 +6192,7 @@ function XButton(props) {
|
|
|
6201
6192
|
"span",
|
|
6202
6193
|
{
|
|
6203
6194
|
className: "absolute right-3 top-1 text-[10px] font-semibold",
|
|
6204
|
-
style: { color: item.tag.color || "#
|
|
6195
|
+
style: { color: item.tag.color || "#A855F7", pointerEvents: "none" },
|
|
6205
6196
|
children: item.tag.text
|
|
6206
6197
|
}
|
|
6207
6198
|
)
|
|
@@ -6228,8 +6219,7 @@ function XButton(props) {
|
|
|
6228
6219
|
SeoContent,
|
|
6229
6220
|
Tips,
|
|
6230
6221
|
Usage,
|
|
6231
|
-
XButton
|
|
6232
|
-
XButtonIcons
|
|
6222
|
+
XButton
|
|
6233
6223
|
});
|
|
6234
6224
|
/*! Bundled license information:
|
|
6235
6225
|
|