@particle-network/ui-react 0.4.0-beta.23 → 0.4.0-beta.24

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.
@@ -33,10 +33,10 @@ const button_theme_button = tv({
33
33
  text: 'bg-transparent min-w-0 w-auto h-auto px-0'
34
34
  },
35
35
  size: {
36
- xs: 'gap-2 rounded-[6px] !text-body3 min-w-min font-medium [&_[aria-label="Loading"]>div]:size-3',
37
- sm: 'gap-2 rounded-[6px] !text-body3 min-w-min font-medium [&_[aria-label="Loading"]>div]:size-3',
38
- md: 'gap-2 rounded-[6px] text-tiny min-w-min font-medium [&_[aria-label="Loading"]>div]:size-4',
39
- lg: 'gap-2 rounded-[10px] text-medium min-w-min font-medium [&_[aria-label="Loading"]>div]:size-6',
36
+ xs: 'gap-1 rounded-[4px] !text-caption1 min-w-min font-medium [&>svg]:size-3.5',
37
+ sm: 'gap-1 rounded-[6px] !text-body3 min-w-min font-medium [&>svg]:size-4',
38
+ md: 'gap-1 rounded-[6px] text-tiny min-w-min font-medium [&>svg]:size-4',
39
+ lg: 'gap-1 rounded-[10px] text-medium min-w-min font-medium [&>svg]:size-6',
40
40
  auto: 'min-w-min rounded-[10px]'
41
41
  },
42
42
  color: {
@@ -97,7 +97,7 @@ const button_theme_button = tv({
97
97
  'light',
98
98
  'bordered'
99
99
  ],
100
- class: 'px-sm h-5'
100
+ class: 'px-md h-5'
101
101
  },
102
102
  {
103
103
  size: 'sm',
@@ -107,7 +107,7 @@ const button_theme_button = tv({
107
107
  'light',
108
108
  'bordered'
109
109
  ],
110
- class: 'px-sm h-6'
110
+ class: 'px-lg h-6'
111
111
  },
112
112
  {
113
113
  size: 'md',
@@ -117,7 +117,7 @@ const button_theme_button = tv({
117
117
  'light',
118
118
  'bordered'
119
119
  ],
120
- class: 'px-md h-[30px]'
120
+ class: 'px-lg h-[30px]'
121
121
  },
122
122
  {
123
123
  size: 'lg',
@@ -178,64 +178,56 @@ const button_theme_button = tv({
178
178
  variant: 'light',
179
179
  color: 'default',
180
180
  class: [
181
- colorVariants.light["default"],
182
- 'data-[hover=true]:bg-default/40'
181
+ colorVariants.light["default"]
183
182
  ]
184
183
  },
185
184
  {
186
185
  variant: 'light',
187
186
  color: 'primary',
188
187
  class: [
189
- colorVariants.light.primary,
190
- 'data-[hover=true]:bg-primary/20'
188
+ colorVariants.light.primary
191
189
  ]
192
190
  },
193
191
  {
194
192
  variant: 'light',
195
193
  color: 'secondary',
196
194
  class: [
197
- colorVariants.light.secondary,
198
- 'data-[hover=true]:bg-default/40'
195
+ colorVariants.light.secondary
199
196
  ]
200
197
  },
201
198
  {
202
199
  variant: 'light',
203
200
  color: 'success',
204
201
  class: [
205
- colorVariants.light.success,
206
- 'data-[hover=true]:bg-success/20'
202
+ colorVariants.light.success
207
203
  ]
208
204
  },
209
205
  {
210
206
  variant: 'light',
211
207
  color: 'warning',
212
208
  class: [
213
- colorVariants.light.warning,
214
- 'data-[hover=true]:bg-warning/20'
209
+ colorVariants.light.warning
215
210
  ]
216
211
  },
217
212
  {
218
213
  variant: 'light',
219
214
  color: 'danger',
220
215
  class: [
221
- colorVariants.light.danger,
222
- 'data-[hover=true]:bg-danger/20'
216
+ colorVariants.light.danger
223
217
  ]
224
218
  },
225
219
  {
226
220
  variant: 'light',
227
221
  color: 'bullish',
228
222
  class: [
229
- colorVariants.light.bullish,
230
- 'data-[hover=true]:bg-bullish/20'
223
+ colorVariants.light.bullish
231
224
  ]
232
225
  },
233
226
  {
234
227
  variant: 'light',
235
228
  color: 'bearish',
236
229
  class: [
237
- colorVariants.light.bearish,
238
- 'data-[hover=true]:bg-bearish/20'
230
+ colorVariants.light.bearish
239
231
  ]
240
232
  },
241
233
  {
@@ -101,8 +101,9 @@ function useButton(props) {
101
101
  const endContent = getIconClone(endContentProp);
102
102
  const spinnerSize = useMemo(()=>{
103
103
  const buttonSpinnerSizeMap = {
104
- sm: 14,
105
- md: 18,
104
+ xs: 14,
105
+ sm: 16,
106
+ md: 16,
106
107
  lg: 24
107
108
  };
108
109
  return buttonSpinnerSizeMap[size];
@@ -30,7 +30,7 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
30
30
  wrapper: [
31
31
  'w-3.5 h-3.5 me-0',
32
32
  'rounded-[calc(theme(borderRadius.medium)*0.2)]',
33
- 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1.5',
33
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1',
34
34
  'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
35
35
  ],
36
36
  label: '!text-body3 font-medium',
@@ -40,7 +40,7 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
40
40
  wrapper: [
41
41
  'w-4 h-4 me-0',
42
42
  'rounded-[calc(theme(borderRadius.medium)*0.2)]',
43
- 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-2',
43
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1.5',
44
44
  'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
45
45
  ],
46
46
  label: '!text-body2 font-medium',
@@ -50,7 +50,7 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
50
50
  wrapper: [
51
51
  'w-[18px] h-[18px] me-0',
52
52
  'rounded-[calc(theme(borderRadius.medium)*0.3)]',
53
- 'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-secondary before:border-2',
53
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-secondary before:border-1.5',
54
54
  'after:rounded-[calc(theme(borderRadius.medium)*0.3)]'
55
55
  ],
56
56
  label: '!text-body1 font-medium',
@@ -4,5 +4,6 @@ import { type VStackProps } from '../layout';
4
4
  export interface UXEmptyProps extends VStackProps {
5
5
  iconProps?: IconProps;
6
6
  text?: React.ReactNode;
7
+ action?: React.ReactNode;
7
8
  }
8
9
  export declare const UXEmpty: import("@heroui/system-rsc").InternalForwardRefRenderFunction<"div", UXEmptyProps, never>;
@@ -8,7 +8,7 @@ import { VStack } from "../layout/index.js";
8
8
  import { Text } from "../typography/Text.js";
9
9
  const UXEmpty = forwardRef((props, ref)=>{
10
10
  const i18n = useI18n();
11
- const { text = i18n.table.emptyContent, iconProps, className, ...restProps } = props;
11
+ const { text = i18n.table.emptyContent, iconProps, className, action, ...restProps } = props;
12
12
  return /*#__PURE__*/ jsxs(VStack, {
13
13
  ref: ref,
14
14
  center: true,
@@ -26,6 +26,10 @@ const UXEmpty = forwardRef((props, ref)=>{
26
26
  color: "secondary",
27
27
  fontWeight: "normal",
28
28
  children: text
29
+ }),
30
+ action && /*#__PURE__*/ jsx("div", {
31
+ className: "mt-lg",
32
+ children: action
29
33
  })
30
34
  ]
31
35
  });
@@ -1,7 +1,7 @@
1
1
  const solid = {
2
2
  default: 'bg-background-200 text-foreground',
3
3
  primary: 'bg-primary text-primary-foreground',
4
- secondary: 'bg-background-200 text-foreground-300',
4
+ secondary: 'bg-background-200 text-secondary',
5
5
  success: 'bg-success text-success-foreground',
6
6
  warning: 'bg-warning text-warning-foreground',
7
7
  danger: 'bg-danger text-danger-foreground',
@@ -22,9 +22,9 @@ const shadow = {
22
22
  bearish: 'shadow-lg shadow-bearish/40 bg-bearish text-foreground'
23
23
  };
24
24
  const bordered = {
25
- default: 'bg-transparent border-foreground-100 text-foreground',
25
+ default: 'bg-transparent border-foreground text-foreground',
26
26
  primary: 'bg-transparent border-primary text-primary',
27
- secondary: 'bg-transparent border-foreground-100 text-foreground-300',
27
+ secondary: 'bg-transparent border-secondary text-secondary',
28
28
  success: 'bg-transparent border-success text-success',
29
29
  warning: 'bg-transparent border-warning text-warning',
30
30
  danger: 'bg-transparent border-danger text-danger',
@@ -33,9 +33,9 @@ const bordered = {
33
33
  bearish: 'bg-transparent border-bearish text-bearish'
34
34
  };
35
35
  const flat = {
36
- default: 'bg-background-300 text-default-foreground',
36
+ default: 'bg-background-300 text-foreground',
37
37
  primary: 'bg-primary/20 text-primary',
38
- secondary: 'bg-background-300 text-foreground-300',
38
+ secondary: 'bg-background-300 text-secondary',
39
39
  success: 'bg-success/20 text-success',
40
40
  warning: 'bg-warning/20 text-warning',
41
41
  danger: 'bg-danger/20 text-danger',
@@ -55,15 +55,15 @@ const faded = {
55
55
  bearish: 'border-bearish bg-bearish text-foreground'
56
56
  };
57
57
  const light = {
58
- default: 'bg-transparent text-default-foreground',
59
- primary: 'bg-transparent text-primary',
60
- secondary: 'bg-transparent text-foreground-300',
61
- success: 'bg-transparent text-success',
62
- warning: 'bg-transparent text-warning',
63
- danger: 'bg-transparent text-danger',
64
- foreground: 'bg-transparent text-foreground',
65
- bullish: 'bg-transparent text-bullish',
66
- bearish: 'bg-transparent text-bearish'
58
+ default: 'bg-transparent text-foreground data-[hover=true]:bg-background-200/50',
59
+ primary: 'bg-transparent text-primary data-[hover=true]:bg-primary/20',
60
+ secondary: 'bg-transparent text-secondary data-[hover=true]:bg-background-200/50',
61
+ success: 'bg-transparent text-success data-[hover=true]:bg-success/20',
62
+ warning: 'bg-transparent text-warning data-[hover=true]:bg-warning/20',
63
+ danger: 'bg-transparent text-danger data-[hover=true]:bg-danger/20',
64
+ foreground: 'bg-transparent text-foreground data-[hover=true]:bg-foreground/20',
65
+ bullish: 'bg-transparent text-bullish data-[hover=true]:bg-bullish/20',
66
+ bearish: 'bg-transparent text-bearish data-[hover=true]:bg-bearish/20'
67
67
  };
68
68
  const ghost = {
69
69
  default: 'border-default text-default-foreground',
@@ -77,9 +77,9 @@ const ghost = {
77
77
  bearish: 'border-bearish text-foreground hover:!bg-bearish'
78
78
  };
79
79
  const variants_text = {
80
- default: 'bg-transparent text-default-foreground',
80
+ default: 'bg-transparent text-foreground',
81
81
  primary: 'bg-transparent text-primary',
82
- secondary: 'bg-transparent text-foreground-300',
82
+ secondary: 'bg-transparent text-secondary',
83
83
  success: 'bg-transparent text-success',
84
84
  warning: 'bg-transparent text-warning',
85
85
  danger: 'bg-transparent text-danger',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.4.0-beta.23",
3
+ "version": "0.4.0-beta.24",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -38,8 +38,8 @@
38
38
  "@rslib/core": "^0.12.3",
39
39
  "@types/react": "^19.1.10",
40
40
  "react": "^19.1.0",
41
- "@particle-network/lintstaged-config": "0.1.0",
42
- "@particle-network/eslint-config": "0.3.0"
41
+ "@particle-network/eslint-config": "0.3.0",
42
+ "@particle-network/lintstaged-config": "0.1.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.9.0",
@@ -49,8 +49,8 @@
49
49
  "ahooks": "^3.9.4",
50
50
  "copy-to-clipboard": "^3.3.3",
51
51
  "zustand": "^5.0.8",
52
- "@particle-network/icons": "0.4.0-beta.14",
53
- "@particle-network/ui-shared": "0.3.0-beta.6"
52
+ "@particle-network/ui-shared": "0.3.0-beta.6",
53
+ "@particle-network/icons": "0.4.0-beta.14"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "rslib build",