x-ui-design 0.1.61 → 0.1.62

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.
@@ -2,4 +2,4 @@ import { ReactNode } from "react";
2
2
  import "./globals.css";
3
3
  export default function RootLayout({ children, }: Readonly<{
4
4
  children: ReactNode;
5
- }>): import("react").JSX.Element;
5
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export default function Home(): import("react").JSX.Element;
1
+ export default function Home(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { FormItemProps } from '@/types/form';
2
2
  import './style.css';
3
3
  declare const FormItem: {
4
- ({ prefixCls, name, label, rules, children, className, layout, style, valuePropName, dependencies, initialValue, feedbackIcons, ...props }: FormItemProps): import("react").JSX.Element;
4
+ ({ prefixCls, name, label, rules, children, className, layout, style, valuePropName, dependencies, initialValue, feedbackIcons, ...props }: FormItemProps): import("react/jsx-runtime").JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export default FormItem;
package/dist/index.esm.js CHANGED
@@ -1,56 +1,5 @@
1
1
  import require$$0, { useState, useEffect, useMemo } from 'react';
2
2
 
3
- function clsx(...args) {
4
- return args.flatMap(arg => {
5
- if (!arg) {
6
- return [];
7
- }
8
- if (typeof arg === 'string') {
9
- return [arg];
10
- }
11
- if (typeof arg === 'number') {
12
- return [String(arg)];
13
- }
14
- if (Array.isArray(arg)) {
15
- return clsx(...arg).split(' ');
16
- }
17
- if (typeof arg === 'object') {
18
- return Object.entries(arg).filter(([, value]) => Boolean(value)).map(([key]) => key);
19
- }
20
- return [];
21
- }).filter(Boolean).join(' ');
22
- }
23
-
24
- const prefixClsButton = 'xUi-button';
25
-
26
- function styleInject(css, ref) {
27
- if (ref === void 0) ref = {};
28
- var insertAt = ref.insertAt;
29
- if (!css || typeof document === 'undefined') {
30
- return;
31
- }
32
- var head = document.head || document.getElementsByTagName('head')[0];
33
- var style = document.createElement('style');
34
- style.type = 'text/css';
35
- if (insertAt === 'top') {
36
- if (head.firstChild) {
37
- head.insertBefore(style, head.firstChild);
38
- } else {
39
- head.appendChild(style);
40
- }
41
- } else {
42
- head.appendChild(style);
43
- }
44
- if (style.styleSheet) {
45
- style.styleSheet.cssText = css;
46
- } else {
47
- style.appendChild(document.createTextNode(css));
48
- }
49
- }
50
-
51
- var css_248z = ".style_xUi-button__He3BD {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-weight: 400;\n white-space: nowrap;\n vertical-align: middle;\n user-select: none;\n border: 1px solid transparent;\n cursor: pointer;\n transition: all 0.3s ease;\n border-radius: 6px;\n line-height: 1.5715;\n}\n\n.style_xUi-button-content__VHPLX {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.style_xUi-button-icon__KMMw- {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n margin-right: 0.5em;\n}\n\n.style_xUi-button-icon__KMMw-:last-child {\n margin-right: 0;\n margin-left: 0.5em;\n}\n\n.style_xUi-button-spinner__qwvoJ {\n width: 1em;\n height: 1em;\n border: 1px solid transparent;\n border-top-color: var(--xui-text-color);\n border-radius: 50%;\n animation: style_xUi-spin__42i7y 1s linear infinite;\n}\n\n@keyframes style_xUi-spin__42i7y {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.style_xUi-button-size-small__sFKdz {\n padding: 4px 12px;\n font-size: 12px;\n height: 24px;\n}\n\n.style_xUi-button-size-middle__1LAB4 {\n padding: 0 16px;\n font-size: 14px;\n height: 32px;\n}\n\n.style_xUi-button-size-large__kEqUs {\n padding: 8px 20px;\n font-size: 16px;\n height: 40px;\n}\n\n.style_xUi-button-circle__rXsQE {\n padding: 0;\n border-radius: 50%;\n justify-content: center;\n}\n\n.style_xUi-button-circle__rXsQE.style_xUi-button-size-small__sFKdz {\n width: 24px;\n height: 24px;\n}\n\n.style_xUi-button-circle__rXsQE.style_xUi-button-size-large__kEqUs {\n width: 40px;\n height: 40px;\n}\n\n.style_xUi-button-round__bPJ5d {\n border-radius: 9999px;\n}\n\n.style_xUi-button-default__jquWr {\n background-color: #fff;\n border-color: var(--xui-border-color);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.style_xUi-button-default__jquWr:hover {\n border-color: var(--xui-primary-color);\n color: var(--xui-primary-color);\n}\n\n.style_xUi-button-primary__5B32L {\n background-color: var(--xui-primary-color);\n border-color: var(--xui-primary-color);\n color: #fff;\n}\n\n.style_xUi-button-primary__5B32L:hover {\n background-color: var(--xui-primary-color-light);\n border-color: var(--xui-primary-color-light);\n color: #fff;\n}\n\n.style_xUi-button-dashed__eo6t6 {\n border-style: dashed;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.85);\n border-color: var(--xui-border-color);\n}\n\n.style_xUi-button-dashed__eo6t6:hover {\n border-color: var(--xui-primary-color);\n color: var(--xui-primary-color);\n}\n\n.style_xUi-button-text__cdwR2 {\n background-color: transparent;\n border-color: transparent !important;\n color: rgba(0, 0, 0, 0.88);\n}\n\n.style_xUi-button-text__cdwR2:hover {\n color: rgba(0, 0, 0, 0.88);\n border-color: transparent;\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.style_xUi-button-link__56eDf {\n background-color: transparent;\n border-color: transparent !important;\n color: var(--xui-primary-color);\n}\n\n.style_xUi-button-link__56eDf:hover {\n border-color: transparent;\n color: var(--xui-primary-color-light);\n}\n\n.style_xUi-button-outlined__soRkh {\n background-color: transparent;\n border-color: var(--xui-border-color);\n color: #fff;\n}\n\n.style_xUi-button-filled__TIZ8- {\n background-color: transparent;\n color: var(--xui-text-color);\n border-color: var(--xui-border-color);\n}\n\n.style_xUi-button-danger__VaYGc {\n background-color: transparent;\n border-color: var(--xui-error-color);\n color: var(--xui-error-color);\n}\n\n.style_xUi-button-danger__VaYGc:hover {\n color: var(--xui-error-color-light);\n border-color: var(--xui-error-color-light);\n}\n\n.style_xUi-button-ghost__yuT29 {\n opacity: 0;\n}\n\n.style_xUi-button-ghost__yuT29:hover {\n opacity: 1;\n}\n\n.style_xUi-button-block__Fm2wb {\n display: flex;\n width: 100%;\n}\n\n.style_xUi-button-disabled__lpRBf,\n.style_xUi-button-loading__X1L9j {\n cursor: not-allowed;\n opacity: 0.5;\n color: var(--xui-text-color);\n border-color: var(--xui-border-color);\n background-color: var(--xui-color-disabled);\n pointer-events: none;\n}\n\n.style_xUi-button-loading__X1L9j {\n background-color: transparent\n}";
52
- styleInject(css_248z);
53
-
54
3
  var jsxRuntime = {exports: {}};
55
4
 
56
5
  var reactJsxRuntime_production_min = {};
@@ -1260,6 +1209,57 @@ if (process.env.NODE_ENV === 'production') {
1260
1209
  }
1261
1210
  var jsxRuntimeExports = jsxRuntime.exports;
1262
1211
 
1212
+ function clsx(...args) {
1213
+ return args.flatMap(arg => {
1214
+ if (!arg) {
1215
+ return [];
1216
+ }
1217
+ if (typeof arg === 'string') {
1218
+ return [arg];
1219
+ }
1220
+ if (typeof arg === 'number') {
1221
+ return [String(arg)];
1222
+ }
1223
+ if (Array.isArray(arg)) {
1224
+ return clsx(...arg).split(' ');
1225
+ }
1226
+ if (typeof arg === 'object') {
1227
+ return Object.entries(arg).filter(([, value]) => Boolean(value)).map(([key]) => key);
1228
+ }
1229
+ return [];
1230
+ }).filter(Boolean).join(' ');
1231
+ }
1232
+
1233
+ const prefixClsButton = 'xUi-button';
1234
+
1235
+ function styleInject(css, ref) {
1236
+ if (ref === void 0) ref = {};
1237
+ var insertAt = ref.insertAt;
1238
+ if (!css || typeof document === 'undefined') {
1239
+ return;
1240
+ }
1241
+ var head = document.head || document.getElementsByTagName('head')[0];
1242
+ var style = document.createElement('style');
1243
+ style.type = 'text/css';
1244
+ if (insertAt === 'top') {
1245
+ if (head.firstChild) {
1246
+ head.insertBefore(style, head.firstChild);
1247
+ } else {
1248
+ head.appendChild(style);
1249
+ }
1250
+ } else {
1251
+ head.appendChild(style);
1252
+ }
1253
+ if (style.styleSheet) {
1254
+ style.styleSheet.cssText = css;
1255
+ } else {
1256
+ style.appendChild(document.createTextNode(css));
1257
+ }
1258
+ }
1259
+
1260
+ var css_248z = ".style_xUi-button__He3BD {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-weight: 400;\n white-space: nowrap;\n vertical-align: middle;\n user-select: none;\n border: 1px solid transparent;\n cursor: pointer;\n transition: all 0.3s ease;\n border-radius: 6px;\n line-height: 1.5715;\n}\n\n.style_xUi-button-content__VHPLX {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.style_xUi-button-icon__KMMw- {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n margin-right: 0.5em;\n}\n\n.style_xUi-button-icon__KMMw-:last-child {\n margin-right: 0;\n margin-left: 0.5em;\n}\n\n.style_xUi-button-spinner__qwvoJ {\n width: 1em;\n height: 1em;\n border: 1px solid transparent;\n border-top-color: var(--xui-text-color);\n border-radius: 50%;\n animation: style_xUi-spin__42i7y 1s linear infinite;\n}\n\n@keyframes style_xUi-spin__42i7y {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.style_xUi-button-size-small__sFKdz {\n padding: 4px 12px;\n font-size: 12px;\n height: 24px;\n}\n\n.style_xUi-button-size-middle__1LAB4 {\n padding: 0 16px;\n font-size: 14px;\n height: 32px;\n}\n\n.style_xUi-button-size-large__kEqUs {\n padding: 8px 20px;\n font-size: 16px;\n height: 40px;\n}\n\n.style_xUi-button-circle__rXsQE {\n padding: 0;\n border-radius: 50%;\n justify-content: center;\n}\n\n.style_xUi-button-circle__rXsQE.style_xUi-button-size-small__sFKdz {\n width: 24px;\n height: 24px;\n}\n\n.style_xUi-button-circle__rXsQE.style_xUi-button-size-large__kEqUs {\n width: 40px;\n height: 40px;\n}\n\n.style_xUi-button-round__bPJ5d {\n border-radius: 9999px;\n}\n\n.style_xUi-button-default__jquWr {\n background-color: #fff;\n border-color: var(--xui-border-color);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.style_xUi-button-default__jquWr:hover {\n border-color: var(--xui-primary-color);\n color: var(--xui-primary-color);\n}\n\n.style_xUi-button-primary__5B32L {\n background-color: var(--xui-primary-color);\n border-color: var(--xui-primary-color);\n color: #fff;\n}\n\n.style_xUi-button-primary__5B32L:hover {\n background-color: var(--xui-primary-color-light);\n border-color: var(--xui-primary-color-light);\n color: #fff;\n}\n\n.style_xUi-button-dashed__eo6t6 {\n border-style: dashed;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.85);\n border-color: var(--xui-border-color);\n}\n\n.style_xUi-button-dashed__eo6t6:hover {\n border-color: var(--xui-primary-color);\n color: var(--xui-primary-color);\n}\n\n.style_xUi-button-text__cdwR2 {\n background-color: transparent;\n border-color: transparent !important;\n color: rgba(0, 0, 0, 0.88);\n}\n\n.style_xUi-button-text__cdwR2:hover {\n color: rgba(0, 0, 0, 0.88);\n border-color: transparent;\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.style_xUi-button-link__56eDf {\n background-color: transparent;\n border-color: transparent !important;\n color: var(--xui-primary-color);\n}\n\n.style_xUi-button-link__56eDf:hover {\n border-color: transparent;\n color: var(--xui-primary-color-light);\n}\n\n.style_xUi-button-outlined__soRkh {\n background-color: transparent;\n border-color: var(--xui-border-color);\n color: #fff;\n}\n\n.style_xUi-button-filled__TIZ8- {\n background-color: transparent;\n color: var(--xui-text-color);\n border-color: var(--xui-border-color);\n}\n\n.style_xUi-button-danger__VaYGc {\n background-color: transparent;\n border-color: var(--xui-error-color);\n color: var(--xui-error-color);\n}\n\n.style_xUi-button-danger__VaYGc:hover {\n color: var(--xui-error-color-light);\n border-color: var(--xui-error-color-light);\n}\n\n.style_xUi-button-ghost__yuT29 {\n opacity: 0;\n}\n\n.style_xUi-button-ghost__yuT29:hover {\n opacity: 1;\n}\n\n.style_xUi-button-block__Fm2wb {\n display: flex;\n width: 100%;\n}\n\n.style_xUi-button-disabled__lpRBf,\n.style_xUi-button-loading__X1L9j {\n cursor: not-allowed;\n opacity: 0.5;\n color: var(--xui-text-color);\n border-color: var(--xui-border-color);\n background-color: var(--xui-color-disabled);\n pointer-events: none;\n}\n\n.style_xUi-button-loading__X1L9j {\n background-color: transparent\n}";
1261
+ styleInject(css_248z);
1262
+
1263
1263
  const ButtonComponent = ({
1264
1264
  type = 'default',
1265
1265
  variant = 'solid',
@@ -1302,20 +1302,20 @@ const ButtonComponent = ({
1302
1302
  [`${prefixCls}-disabled`]: disabled
1303
1303
  }, className);
1304
1304
  const iconNode = useMemo(() => {
1305
- return innerLoading ? typeof loading === 'object' && loading.icon || /*#__PURE__*/jsxRuntimeExports.jsx("span", {
1305
+ return innerLoading ? typeof loading === 'object' && loading.icon || jsxRuntimeExports.jsx("span", {
1306
1306
  className: `${prefixCls}-spinner`
1307
1307
  }) : icon;
1308
1308
  }, [icon, innerLoading, loading, prefixCls]);
1309
1309
  const content = useMemo(() => {
1310
- return /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
1311
- children: [iconNode && iconPosition === 'start' && /*#__PURE__*/jsxRuntimeExports.jsx("span", {
1310
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
1311
+ children: [iconNode && iconPosition === 'start' && jsxRuntimeExports.jsx("span", {
1312
1312
  className: clsx(`${prefixCls}-icon`, customClassNames.icon),
1313
1313
  style: styles.icon,
1314
1314
  children: iconNode
1315
- }), /*#__PURE__*/jsxRuntimeExports.jsx("span", {
1315
+ }), jsxRuntimeExports.jsx("span", {
1316
1316
  className: `${prefixCls}-content`,
1317
1317
  children: children
1318
- }), iconNode && iconPosition === 'end' && /*#__PURE__*/jsxRuntimeExports.jsx("span", {
1318
+ }), iconNode && iconPosition === 'end' && jsxRuntimeExports.jsx("span", {
1319
1319
  className: clsx(`${prefixCls}-icon`, customClassNames.icon),
1320
1320
  style: styles.icon,
1321
1321
  children: iconNode
@@ -1324,14 +1324,14 @@ const ButtonComponent = ({
1324
1324
  }, [children, customClassNames.icon, iconNode, iconPosition, prefixCls, styles.icon]);
1325
1325
  const mergedDisabled = disabled || innerLoading;
1326
1326
  if (href) {
1327
- return /*#__PURE__*/jsxRuntimeExports.jsx("a", {
1327
+ return jsxRuntimeExports.jsx("a", {
1328
1328
  className: classes,
1329
1329
  href: mergedDisabled ? undefined : href,
1330
1330
  "aria-disabled": mergedDisabled,
1331
1331
  children: content
1332
1332
  });
1333
1333
  }
1334
- return /*#__PURE__*/jsxRuntimeExports.jsx("button", {
1334
+ return jsxRuntimeExports.jsx("button", {
1335
1335
  type: htmlType,
1336
1336
  className: classes,
1337
1337
  disabled: mergedDisabled,