@particle-network/ui-react 0.4.5-beta.2 → 0.4.5-beta.20
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/UXButton/button-theme.d.ts +3 -0
- package/dist/components/UXButton/button-theme.js +36 -9
- package/dist/components/UXButton/use-button.js +2 -1
- package/dist/components/UXChip/chip.extend.d.ts +1 -1
- package/dist/components/UXChip/chip.extend.js +17 -2
- package/dist/components/UXChip/index.d.ts +1 -1
- package/dist/components/UXInput/index.d.ts +2 -0
- package/dist/components/UXInput/input.extend.d.ts +2 -0
- package/dist/components/UXModal/index.js +2 -5
- package/dist/components/UXNumberInput/number-input.extend.d.ts +1 -0
- package/dist/components/UXSlider/index.d.ts +5 -0
- package/dist/components/UXSlider/index.js +3 -0
- package/dist/components/UXSlider/slider-theme.d.ts +518 -0
- package/dist/components/UXSlider/slider-theme.js +465 -0
- package/dist/components/UXSlider/slider-thumb.d.ts +4 -0
- package/dist/components/UXSlider/slider-thumb.js +33 -0
- package/dist/components/UXSlider/slider.d.ts +4 -0
- package/dist/components/UXSlider/slider.js +77 -0
- package/dist/components/UXSlider/use-slider-thumb.d.ts +61 -0
- package/dist/components/UXSlider/use-slider-thumb.js +79 -0
- package/dist/components/UXSlider/use-slider.d.ts +182 -0
- package/dist/components/UXSlider/use-slider.js +277 -0
- package/dist/components/UXTabSwitch/index.d.ts +2 -0
- package/dist/components/UXTabSwitch/index.js +3 -1
- package/dist/components/UXTabs/tabs.classes.js +4 -4
- package/dist/components/UXThemeSwitch/theme-switch.d.ts +4 -2
- package/dist/components/UXThemeSwitch/theme-switch.js +11 -8
- package/dist/components/UXToast/index.js +2 -2
- package/dist/components/UXTooltip/index.d.ts +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/utils/classes.d.ts +11 -0
- package/dist/utils/classes.js +12 -1
- package/dist/utils/input-classes.d.ts +37 -2
- package/dist/utils/input-classes.js +65 -6
- package/package.json +3 -3
- package/tailwind-preset.js +1 -1
|
@@ -31,6 +31,7 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
31
31
|
sm: string;
|
|
32
32
|
md: string;
|
|
33
33
|
lg: string;
|
|
34
|
+
xl: string;
|
|
34
35
|
auto: string;
|
|
35
36
|
};
|
|
36
37
|
color: {
|
|
@@ -97,6 +98,7 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
97
98
|
sm: string;
|
|
98
99
|
md: string;
|
|
99
100
|
lg: string;
|
|
101
|
+
xl: string;
|
|
100
102
|
auto: string;
|
|
101
103
|
};
|
|
102
104
|
color: {
|
|
@@ -163,6 +165,7 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
163
165
|
sm: string;
|
|
164
166
|
md: string;
|
|
165
167
|
lg: string;
|
|
168
|
+
xl: string;
|
|
166
169
|
auto: string;
|
|
167
170
|
};
|
|
168
171
|
color: {
|
|
@@ -33,10 +33,11 @@ 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-1 rounded-
|
|
37
|
-
sm: 'gap-1 rounded-
|
|
38
|
-
md: 'gap-1 rounded-
|
|
39
|
-
lg: 'gap-1 rounded-
|
|
36
|
+
xs: 'gap-1 rounded-sm !text-caption1 min-w-min font-medium [&>svg]:size-[14px]',
|
|
37
|
+
sm: 'gap-1 rounded-md !text-body3 min-w-min font-medium [&>svg]:size-4',
|
|
38
|
+
md: 'gap-1 rounded-md text-tiny min-w-min font-medium [&>svg]:size-[18px]',
|
|
39
|
+
lg: 'gap-1 rounded-lg text-sm min-w-min font-medium [&>svg]:size-5',
|
|
40
|
+
xl: 'gap-1 rounded-[10px] text-medium min-w-min font-medium [&>svg]:size-6',
|
|
40
41
|
auto: 'min-w-min rounded-[10px]'
|
|
41
42
|
},
|
|
42
43
|
color: {
|
|
@@ -127,6 +128,16 @@ const button_theme_button = tv({
|
|
|
127
128
|
'light',
|
|
128
129
|
'bordered'
|
|
129
130
|
],
|
|
131
|
+
class: 'px-lg h-9'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
size: 'xl',
|
|
135
|
+
variant: [
|
|
136
|
+
'solid',
|
|
137
|
+
'flat',
|
|
138
|
+
'light',
|
|
139
|
+
'bordered'
|
|
140
|
+
],
|
|
130
141
|
class: 'px-lg h-11'
|
|
131
142
|
},
|
|
132
143
|
{
|
|
@@ -370,13 +381,13 @@ const button_theme_button = tv({
|
|
|
370
381
|
isSelected: true,
|
|
371
382
|
color: 'default',
|
|
372
383
|
variant: 'solid',
|
|
373
|
-
class: 'bg-tertiary'
|
|
384
|
+
class: 'bg-tertiary text-tertiary-foreground'
|
|
374
385
|
},
|
|
375
386
|
{
|
|
376
387
|
isSelected: true,
|
|
377
388
|
color: 'secondary',
|
|
378
389
|
variant: 'solid',
|
|
379
|
-
class: 'bg-tertiary text-foreground'
|
|
390
|
+
class: 'bg-tertiary text-tertiary-foreground'
|
|
380
391
|
},
|
|
381
392
|
{
|
|
382
393
|
isSelected: true,
|
|
@@ -468,6 +479,12 @@ const button_theme_button = tv({
|
|
|
468
479
|
color: 'bearish',
|
|
469
480
|
class: colorVariants.solid.bearish
|
|
470
481
|
},
|
|
482
|
+
{
|
|
483
|
+
isSelected: true,
|
|
484
|
+
variant: 'text',
|
|
485
|
+
color: 'secondary',
|
|
486
|
+
class: colorVariants.text["default"]
|
|
487
|
+
},
|
|
471
488
|
{
|
|
472
489
|
isInGroup: true,
|
|
473
490
|
class: 'rounded-none first:rounded-s-small last:rounded-e-small'
|
|
@@ -480,17 +497,22 @@ const button_theme_button = tv({
|
|
|
480
497
|
{
|
|
481
498
|
isInGroup: true,
|
|
482
499
|
size: 'sm',
|
|
483
|
-
class: 'rounded-none first:rounded-s-
|
|
500
|
+
class: 'rounded-none first:rounded-s-md last:rounded-e-md'
|
|
484
501
|
},
|
|
485
502
|
{
|
|
486
503
|
isInGroup: true,
|
|
487
504
|
size: 'md',
|
|
488
|
-
class: 'rounded-none first:rounded-s-
|
|
505
|
+
class: 'rounded-none first:rounded-s-md last:rounded-e-md'
|
|
489
506
|
},
|
|
490
507
|
{
|
|
491
508
|
isInGroup: true,
|
|
492
509
|
size: 'lg',
|
|
493
|
-
class: 'rounded-none first:rounded-s-
|
|
510
|
+
class: 'rounded-none first:rounded-s-lg last:rounded-e-lg'
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
isInGroup: true,
|
|
514
|
+
size: 'xl',
|
|
515
|
+
class: 'rounded-none first:rounded-s-[10px] last:rounded-e-[10px]'
|
|
494
516
|
},
|
|
495
517
|
{
|
|
496
518
|
isInGroup: true,
|
|
@@ -612,6 +634,11 @@ const button_theme_button = tv({
|
|
|
612
634
|
{
|
|
613
635
|
isIconOnly: true,
|
|
614
636
|
size: 'lg',
|
|
637
|
+
class: 'min-w-9 w-9 h-9'
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
isIconOnly: true,
|
|
641
|
+
size: 'xl',
|
|
615
642
|
class: 'min-w-11 w-11 h-11'
|
|
616
643
|
},
|
|
617
644
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type ChipProps } from '@heroui/chip';
|
|
3
3
|
type ExtendedChipProps = Omit<ChipProps, 'color'> & {
|
|
4
|
-
color?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'bullish' | 'bearish' | `#${string}`;
|
|
4
|
+
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'alert' | 'danger' | 'bullish' | 'bearish' | `#${string}`;
|
|
5
5
|
};
|
|
6
6
|
declare const ExtendedChip: React.ForwardRefExoticComponent<ExtendedChipProps>;
|
|
7
7
|
export default ExtendedChip;
|
|
@@ -4,9 +4,10 @@ const colorVariants = {
|
|
|
4
4
|
solid: {
|
|
5
5
|
default: 'bg-background-200 text-foreground-300',
|
|
6
6
|
primary: 'bg-primary text-primary-foreground',
|
|
7
|
-
secondary: 'bg-background-200 text-
|
|
7
|
+
secondary: 'bg-background-200 text-secondary',
|
|
8
8
|
success: 'bg-success text-success-foreground',
|
|
9
9
|
warning: 'bg-warning text-warning-foreground',
|
|
10
|
+
alert: 'bg-alert text-alert-foreground',
|
|
10
11
|
danger: 'bg-danger text-danger-foreground',
|
|
11
12
|
foreground: 'bg-foreground text-background',
|
|
12
13
|
bullish: 'bg-bullish text-bullish-foreground',
|
|
@@ -16,9 +17,10 @@ const colorVariants = {
|
|
|
16
17
|
flat: {
|
|
17
18
|
default: 'bg-background-300 text-foreground-300',
|
|
18
19
|
primary: 'bg-primary/20 text-primary',
|
|
19
|
-
secondary: 'bg-background-300 text-
|
|
20
|
+
secondary: 'bg-background-300 text-secondary',
|
|
20
21
|
success: 'bg-success/20 text-success',
|
|
21
22
|
warning: 'bg-warning/20 text-warning',
|
|
23
|
+
alert: 'bg-alert/20 text-alert',
|
|
22
24
|
danger: 'bg-danger/20 text-danger',
|
|
23
25
|
foreground: 'bg-foreground/10 text-foreground',
|
|
24
26
|
bullish: 'bg-bullish/20 text-bullish',
|
|
@@ -63,6 +65,9 @@ const ExtendedChip = extendVariants(Chip, {
|
|
|
63
65
|
danger: {
|
|
64
66
|
dot: 'bg-danger'
|
|
65
67
|
},
|
|
68
|
+
alert: {
|
|
69
|
+
dot: 'bg-alert'
|
|
70
|
+
},
|
|
66
71
|
bullish: {
|
|
67
72
|
dot: 'bg-bullish'
|
|
68
73
|
},
|
|
@@ -164,6 +169,11 @@ const ExtendedChip = extendVariants(Chip, {
|
|
|
164
169
|
color: 'danger',
|
|
165
170
|
class: colorVariants.solid.danger
|
|
166
171
|
},
|
|
172
|
+
{
|
|
173
|
+
variant: 'solid',
|
|
174
|
+
color: 'alert',
|
|
175
|
+
class: colorVariants.solid.alert
|
|
176
|
+
},
|
|
167
177
|
{
|
|
168
178
|
variant: 'solid',
|
|
169
179
|
color: 'bullish',
|
|
@@ -204,6 +214,11 @@ const ExtendedChip = extendVariants(Chip, {
|
|
|
204
214
|
color: 'danger',
|
|
205
215
|
class: colorVariants.flat.danger
|
|
206
216
|
},
|
|
217
|
+
{
|
|
218
|
+
variant: 'flat',
|
|
219
|
+
color: 'alert',
|
|
220
|
+
class: colorVariants.flat.alert
|
|
221
|
+
},
|
|
207
222
|
{
|
|
208
223
|
variant: 'flat',
|
|
209
224
|
color: 'bullish',
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import ExtendedChip from './chip.extend';
|
|
3
3
|
export type UXChipProps = React.ComponentPropsWithRef<typeof ExtendedChip>;
|
|
4
4
|
export declare const UXChip: import("@heroui/system-rsc").InternalForwardRefRenderFunction<"div", Omit<import("@heroui/chip").ChipProps, "color"> & {
|
|
5
|
-
color?: "default" | "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | `#${string}`;
|
|
5
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "alert" | "danger" | "bullish" | "bearish" | `#${string}`;
|
|
6
6
|
}, never>;
|
|
@@ -6,6 +6,7 @@ export declare const UXInput: React.ForwardRefExoticComponent<(Omit<Omit<import(
|
|
|
6
6
|
} & {
|
|
7
7
|
variant?: "flat" | "bordered" | undefined;
|
|
8
8
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
9
|
+
isColorText?: boolean | undefined;
|
|
9
10
|
color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | undefined;
|
|
10
11
|
size?: "sm" | "md" | "lg" | undefined;
|
|
11
12
|
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
|
|
@@ -21,6 +22,7 @@ export declare const UXInput: React.ForwardRefExoticComponent<(Omit<Omit<import(
|
|
|
21
22
|
} & {
|
|
22
23
|
variant?: "flat" | "bordered" | undefined;
|
|
23
24
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
25
|
+
isColorText?: boolean | undefined;
|
|
24
26
|
color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | undefined;
|
|
25
27
|
size?: "sm" | "md" | "lg" | undefined;
|
|
26
28
|
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
|
|
@@ -3,6 +3,7 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<(Omit<imp
|
|
|
3
3
|
} & {
|
|
4
4
|
variant?: "flat" | "bordered" | undefined;
|
|
5
5
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
6
|
+
isColorText?: boolean | undefined;
|
|
6
7
|
color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | undefined;
|
|
7
8
|
size?: "sm" | "md" | "lg" | undefined;
|
|
8
9
|
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
|
|
@@ -18,6 +19,7 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<(Omit<imp
|
|
|
18
19
|
} & {
|
|
19
20
|
variant?: "flat" | "bordered" | undefined;
|
|
20
21
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
22
|
+
isColorText?: boolean | undefined;
|
|
21
23
|
color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | undefined;
|
|
22
24
|
size?: "sm" | "md" | "lg" | undefined;
|
|
23
25
|
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
|
|
@@ -4,7 +4,6 @@ import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from "@herou
|
|
|
4
4
|
import CloseIcon from "@particle-network/icons/web/CloseIcon";
|
|
5
5
|
import { Center, Circle, Flex } from "../layout/index.js";
|
|
6
6
|
import { Text } from "../typography/Text.js";
|
|
7
|
-
import { UXButton } from "../UXButton/index.js";
|
|
8
7
|
const UXModal = (props)=>{
|
|
9
8
|
const { title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
|
|
10
9
|
return /*#__PURE__*/ jsx(Modal, {
|
|
@@ -41,13 +40,11 @@ const UXModal = (props)=>{
|
|
|
41
40
|
classNames?.footer
|
|
42
41
|
],
|
|
43
42
|
closeButton: [
|
|
44
|
-
'top-
|
|
43
|
+
'top-4 end-3.5 text-foreground',
|
|
45
44
|
classNames?.closeButton
|
|
46
45
|
]
|
|
47
46
|
},
|
|
48
|
-
closeButton: /*#__PURE__*/ jsx(
|
|
49
|
-
isIconOnly: true,
|
|
50
|
-
variant: "light",
|
|
47
|
+
closeButton: /*#__PURE__*/ jsx("button", {
|
|
51
48
|
children: /*#__PURE__*/ jsx(CloseIcon, {
|
|
52
49
|
size: 24
|
|
53
50
|
})
|
|
@@ -3,6 +3,7 @@ import { type NumberInputProps } from '@heroui/number-input';
|
|
|
3
3
|
type ExtendedNumberInputProps = Omit<NumberInputProps, 'color'> & {
|
|
4
4
|
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'bullish' | 'bearish';
|
|
5
5
|
textAlign?: 'left' | 'center' | 'right';
|
|
6
|
+
isColorText?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare const ExtendedNumberInput: React.ForwardRefExoticComponent<ExtendedNumberInputProps>;
|
|
8
9
|
export default ExtendedNumberInput;
|