@particle-network/ui-react 0.4.0-beta.2 → 0.4.0-beta.21
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/components/ProgressWrapper/index.d.ts +1 -1
- package/dist/components/ProgressWrapper/index.js +18 -3
- package/dist/components/UXAutocomplete/index.d.ts +5 -0
- package/dist/components/UXAutocomplete/index.js +72 -0
- package/dist/components/UXDrawer/index.d.ts +9 -0
- package/dist/components/UXDrawer/index.js +89 -0
- package/dist/components/UXDropdown/dropdown-item.js +1 -1
- package/dist/components/UXEmpty/index.js +3 -1
- package/dist/components/UXInput/index.d.ts +28 -28
- package/dist/components/UXInput/input.extend.d.ts +28 -28
- package/dist/components/UXModal/index.js +3 -1
- package/dist/components/UXSelect/index.js +2 -2
- package/dist/components/UXSwitch/index.d.ts +17 -17
- package/dist/components/UXSwitch/switch.extend.d.ts +17 -17
- package/dist/components/UXTable/index.d.ts +17 -17
- package/dist/components/UXTable/table.extend.d.ts +17 -17
- package/dist/components/UXTabs/tabs.classes.js +7 -7
- package/dist/components/UXThemeSwitch/index.d.ts +0 -1
- package/dist/components/UXThemeSwitch/index.js +0 -1
- package/dist/components/UXThemeSwitch/theme-item.d.ts +1 -1
- package/dist/components/UXThemeSwitch/theme-item.js +5 -4
- package/dist/components/UXThemeSwitch/theme-switch.js +72 -86
- package/dist/components/UXThemeSwitch/use-color-scheme.d.ts +1 -1
- package/dist/components/UXThemeSwitch/use-theme-color.d.ts +1 -19
- package/dist/components/UXThemeSwitch/use-theme-store.d.ts +1 -6
- package/dist/components/UXThemeSwitch/use-theme-store.js +2 -6
- package/dist/components/UXThemeSwitch/use-theme.d.ts +2 -4
- package/dist/components/UXThemeSwitch/use-theme.js +65 -50
- package/dist/components/UXToast/index.d.ts +7 -4
- package/dist/components/UXToast/index.js +21 -17
- package/dist/components/UXTooltip/tooltip.extend.d.ts +19 -19
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/package.json +4 -5
- package/tailwind-preset.js +192 -93
- package/dist/components/UXThemeSwitch/theme-data.d.ts +0 -29
- package/dist/components/UXThemeSwitch/theme-data.js +0 -304
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ToastProvider, addToast, closeAll, closeToast } from "@heroui/toast";
|
|
2
|
+
import { ToastProvider, addToast, closeAll, closeToast, getToastQueue, isToastClosing } from "@heroui/toast";
|
|
3
3
|
import CircleCheckIcon from "@particle-network/icons/web/CircleCheckIcon";
|
|
4
4
|
import CircleCloseIcon from "@particle-network/icons/web/CircleCloseIcon";
|
|
5
5
|
import CloseIcon from "@particle-network/icons/web/CloseIcon";
|
|
@@ -9,33 +9,35 @@ const UXToastProvider = ()=>/*#__PURE__*/ jsx(ToastProvider, {
|
|
|
9
9
|
disableAnimation: true,
|
|
10
10
|
placement: "top-center",
|
|
11
11
|
maxVisibleToasts: 4,
|
|
12
|
-
toastOffset: 40,
|
|
13
12
|
toastProps: {
|
|
14
13
|
timeout: 4000
|
|
15
14
|
},
|
|
16
15
|
regionProps: {
|
|
17
|
-
className: 'items-center
|
|
16
|
+
className: 'items-center mt-12 p-0 gap-2'
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
const getIcon = (type)=>{
|
|
21
20
|
if ('success' === type) return /*#__PURE__*/ jsx(CircleCheckIcon, {
|
|
22
|
-
size: 18
|
|
21
|
+
size: 18,
|
|
22
|
+
color: "success"
|
|
23
23
|
});
|
|
24
24
|
if ('error' === type) return /*#__PURE__*/ jsx(CircleCloseIcon, {
|
|
25
|
-
size: 18
|
|
25
|
+
size: 18,
|
|
26
|
+
color: "danger"
|
|
26
27
|
});
|
|
27
28
|
if ('loading' === type) return /*#__PURE__*/ jsx(UXSpinner, {
|
|
29
|
+
color: "primary",
|
|
28
30
|
size: 18
|
|
29
31
|
});
|
|
30
32
|
return null;
|
|
31
33
|
};
|
|
32
34
|
const show = (props)=>{
|
|
33
|
-
const { type, hideCloseButton, variant, classNames, description, ...toastProps } = props ?? {};
|
|
34
|
-
const { base, description: descriptionClassName, icon, loadingComponent, content, closeButton, ...restClassNames } = classNames ?? {};
|
|
35
|
+
const { type, hideCloseButton, icon, variant, classNames, description, ...toastProps } = props ?? {};
|
|
36
|
+
const { base, description: descriptionClassName, icon: iconClassName, loadingComponent, content, closeButton, ...restClassNames } = classNames ?? {};
|
|
35
37
|
return addToast({
|
|
36
38
|
classNames: {
|
|
37
39
|
base: [
|
|
38
|
-
'bg-tertiary rounded-xl px-3.5 py-3 shadow-none border-none !w-fit max-w-[90vw] md:max-w-[400px]',
|
|
40
|
+
'bg-tertiary rounded-xl px-3.5 py-3 shadow-none border-none !w-fit max-w-[90vw] md:max-w-[400px] m-0',
|
|
39
41
|
!hideCloseButton && 'pr-12',
|
|
40
42
|
'flat' === variant && 'success' === type && 'bg-[#0E3728]',
|
|
41
43
|
'flat' === variant && 'error' === type && 'bg-[#501D1D]',
|
|
@@ -48,11 +50,8 @@ const show = (props)=>{
|
|
|
48
50
|
descriptionClassName
|
|
49
51
|
],
|
|
50
52
|
icon: [
|
|
51
|
-
'
|
|
52
|
-
|
|
53
|
-
'error' === type && 'text-danger',
|
|
54
|
-
'loading' === type && 'text-primary',
|
|
55
|
-
icon
|
|
53
|
+
'h-fit w-fit shrink-0',
|
|
54
|
+
iconClassName
|
|
56
55
|
],
|
|
57
56
|
loadingComponent: [
|
|
58
57
|
'text-primary h-5 w-5',
|
|
@@ -70,18 +69,24 @@ const show = (props)=>{
|
|
|
70
69
|
...restClassNames
|
|
71
70
|
},
|
|
72
71
|
description,
|
|
73
|
-
icon: getIcon(type),
|
|
72
|
+
icon: icon ?? getIcon(type),
|
|
73
|
+
hideIcon: !icon && !getIcon(type),
|
|
74
74
|
closeIcon: /*#__PURE__*/ jsx(CloseIcon, {
|
|
75
75
|
className: 'flat' === variant ? 'text-white' : 'text-foreground'
|
|
76
76
|
}),
|
|
77
77
|
loadingComponent: /*#__PURE__*/ jsx(UXSpinner, {
|
|
78
78
|
size: 18
|
|
79
79
|
}),
|
|
80
|
-
timeout: 'loading' === type ? 1 / 0 :
|
|
80
|
+
timeout: 'loading' === type ? 1 / 0 : 4000,
|
|
81
81
|
...toastProps
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
const toast = {
|
|
85
|
+
info: (message, props)=>show({
|
|
86
|
+
type: 'info',
|
|
87
|
+
description: message,
|
|
88
|
+
...props
|
|
89
|
+
}),
|
|
85
90
|
success: (message, props)=>show({
|
|
86
91
|
type: 'success',
|
|
87
92
|
description: message,
|
|
@@ -95,11 +100,10 @@ const toast = {
|
|
|
95
100
|
loading: (message, props)=>show({
|
|
96
101
|
type: 'loading',
|
|
97
102
|
description: message,
|
|
98
|
-
timeout: 1 / 0,
|
|
99
103
|
...props
|
|
100
104
|
}),
|
|
101
105
|
show,
|
|
102
106
|
closeAll: closeAll,
|
|
103
107
|
close: closeToast
|
|
104
108
|
};
|
|
105
|
-
export { UXToastProvider, toast };
|
|
109
|
+
export { UXToastProvider, addToast, closeAll, closeToast, getToastQueue, isToastClosing, toast };
|
|
@@ -39,7 +39,7 @@ declare const ExtendedTooltip: import("react").ForwardRefExoticComponent<Omit<{
|
|
|
39
39
|
vocab?: string | undefined;
|
|
40
40
|
autoCorrect?: string | undefined;
|
|
41
41
|
autoSave?: string | undefined;
|
|
42
|
-
color?: "default" | "
|
|
42
|
+
color?: "default" | "success" | "foreground" | "secondary" | "primary" | "danger" | "warning" | undefined;
|
|
43
43
|
itemProp?: string | undefined;
|
|
44
44
|
itemScope?: boolean | undefined;
|
|
45
45
|
itemType?: string | undefined;
|
|
@@ -284,31 +284,31 @@ declare const ExtendedTooltip: import("react").ForwardRefExoticComponent<Omit<{
|
|
|
284
284
|
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
|
|
285
285
|
offset?: number | undefined;
|
|
286
286
|
key?: import("react").Key | null | undefined;
|
|
287
|
-
|
|
287
|
+
classNames?: import("@heroui/theme").SlotsToClasses<"content" | "base" | "arrow"> | undefined;
|
|
288
288
|
isDisabled?: boolean | undefined;
|
|
289
|
-
|
|
289
|
+
disableAnimation?: boolean | undefined;
|
|
290
290
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
291
|
+
onOpenChange?: ((isOpen: boolean) => void) | undefined;
|
|
292
|
+
shouldCloseOnBlur?: boolean | undefined;
|
|
291
293
|
onClose?: ((() => void) & (() => void)) | undefined;
|
|
292
|
-
|
|
294
|
+
isOpen?: boolean | undefined;
|
|
293
295
|
placement?: import("@heroui/aria-utils").OverlayPlacement | undefined;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
+
containerPadding?: number | undefined;
|
|
297
|
+
crossOffset?: number | undefined;
|
|
298
|
+
shouldFlip?: boolean | undefined;
|
|
299
|
+
isKeyboardDismissDisabled?: boolean | undefined;
|
|
300
|
+
shouldCloseOnInteractOutside?: ((element: Element) => boolean) | undefined;
|
|
301
|
+
isDismissable?: boolean | undefined;
|
|
302
|
+
showArrow?: boolean | undefined;
|
|
303
|
+
updatePositionDeps?: any[] | undefined;
|
|
304
|
+
shadow?: "sm" | "md" | "lg" | "none" | undefined;
|
|
296
305
|
triggerScaleOnOpen?: boolean | undefined;
|
|
297
306
|
isTriggerDisabled?: boolean | undefined;
|
|
298
|
-
|
|
299
|
-
trigger?: "focus" | undefined;
|
|
307
|
+
motionProps?: Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> | undefined;
|
|
300
308
|
portalContainer?: Element | undefined;
|
|
301
|
-
updatePositionDeps?: any[] | undefined;
|
|
302
|
-
isOpen?: boolean | undefined;
|
|
303
|
-
isDismissable?: boolean | undefined;
|
|
304
|
-
shouldCloseOnBlur?: boolean | undefined;
|
|
305
|
-
isKeyboardDismissDisabled?: boolean | undefined;
|
|
306
|
-
shouldCloseOnInteractOutside?: ((element: Element) => boolean) | undefined;
|
|
307
309
|
defaultOpen?: boolean | undefined;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
shouldFlip?: boolean | undefined;
|
|
312
|
-
containerPadding?: number | undefined;
|
|
310
|
+
trigger?: "focus" | undefined;
|
|
311
|
+
delay?: number | undefined;
|
|
312
|
+
closeDelay?: number | undefined;
|
|
313
313
|
}, "ref"> & import("react").RefAttributes<import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>>;
|
|
314
314
|
export default ExtendedTooltip;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './layout';
|
|
2
2
|
export * from './ProgressWrapper';
|
|
3
3
|
export * from './typography/Text';
|
|
4
|
+
export * from './UXAutocomplete';
|
|
4
5
|
export * from './UXButton';
|
|
5
6
|
export * from './UXCalendar';
|
|
6
7
|
export * from './UXCheckbox';
|
|
@@ -9,6 +10,7 @@ export * from './UXCopy';
|
|
|
9
10
|
export * from './UXDatePicker';
|
|
10
11
|
export * from './UXDateRangePicker';
|
|
11
12
|
export * from './UXDivider';
|
|
13
|
+
export * from './UXDrawer';
|
|
12
14
|
export * from './UXDropdown';
|
|
13
15
|
export * from './UXEmpty';
|
|
14
16
|
export * from './UXHint';
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./layout/index.js";
|
|
2
2
|
export * from "./ProgressWrapper/index.js";
|
|
3
3
|
export * from "./typography/Text.js";
|
|
4
|
+
export * from "./UXAutocomplete/index.js";
|
|
4
5
|
export * from "./UXButton/index.js";
|
|
5
6
|
export * from "./UXCalendar/index.js";
|
|
6
7
|
export * from "./UXCheckbox/index.js";
|
|
@@ -9,6 +10,7 @@ export * from "./UXCopy/index.js";
|
|
|
9
10
|
export * from "./UXDatePicker/index.js";
|
|
10
11
|
export * from "./UXDateRangePicker/index.js";
|
|
11
12
|
export * from "./UXDivider/index.js";
|
|
13
|
+
export * from "./UXDrawer/index.js";
|
|
12
14
|
export * from "./UXDropdown/index.js";
|
|
13
15
|
export * from "./UXEmpty/index.js";
|
|
14
16
|
export * from "./UXHint/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"@rslib/core": "^0.12.3",
|
|
39
39
|
"@types/react": "^19.1.10",
|
|
40
40
|
"react": "^19.1.0",
|
|
41
|
-
"typescript": "^5.8.3",
|
|
42
41
|
"@particle-network/lintstaged-config": "0.1.0",
|
|
43
42
|
"@particle-network/eslint-config": "0.3.0"
|
|
44
43
|
},
|
|
@@ -50,13 +49,13 @@
|
|
|
50
49
|
"ahooks": "^3.9.4",
|
|
51
50
|
"copy-to-clipboard": "^3.3.3",
|
|
52
51
|
"zustand": "^5.0.8",
|
|
53
|
-
"@particle-network/icons": "0.4.0-beta.
|
|
54
|
-
"@particle-network/ui-shared": "0.3.0-beta.
|
|
52
|
+
"@particle-network/icons": "0.4.0-beta.13",
|
|
53
|
+
"@particle-network/ui-shared": "0.3.0-beta.6"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
56
|
"build": "rslib build",
|
|
58
57
|
"dev": "rslib build --watch",
|
|
59
|
-
"type-check": "npx
|
|
58
|
+
"type-check": "npx tsgo --noEmit -p ./tsconfig.json",
|
|
60
59
|
"lint": "eslint . --no-error-on-unmatched-pattern --quiet",
|
|
61
60
|
"lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
|
|
62
61
|
"clean": "rm -rf .turbo node_modules dist"
|