@particle-network/ui-react 0.1.4-beta.7 → 0.1.4-beta.9
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type CheckboxProps } from '@heroui/checkbox';
|
|
3
3
|
type ExtendedCheckboxProps = Omit<CheckboxProps, 'color'> & {
|
|
4
|
-
color?: 'primary' | 'success' | 'warning' | 'danger' | 'bullish' | 'bearish';
|
|
4
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'bullish' | 'bearish';
|
|
5
|
+
labelPlacement?: 'left' | 'right';
|
|
5
6
|
};
|
|
6
7
|
declare const ExtendedCheckbox: React.ForwardRefExoticComponent<ExtendedCheckboxProps>;
|
|
7
8
|
export default ExtendedCheckbox;
|
|
@@ -6,6 +6,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
|
|
|
6
6
|
primary: {
|
|
7
7
|
wrapper: 'after:bg-primary after:text-primary-foreground text-primary-foreground'
|
|
8
8
|
},
|
|
9
|
+
secondary: {
|
|
10
|
+
wrapper: 'after:bg-tertiary after:text-tertiary-foreground text-tertiary-foreground'
|
|
11
|
+
},
|
|
9
12
|
success: {
|
|
10
13
|
wrapper: 'after:bg-success after:text-success-foreground text-success-foreground'
|
|
11
14
|
},
|
|
@@ -25,9 +28,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
|
|
|
25
28
|
size: {
|
|
26
29
|
sm: {
|
|
27
30
|
wrapper: [
|
|
28
|
-
'w-3.5 h-3.5 me-
|
|
31
|
+
'w-3.5 h-3.5 me-0',
|
|
29
32
|
'rounded-[calc(theme(borderRadius.medium)*0.2)]',
|
|
30
|
-
'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-
|
|
33
|
+
'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1.5',
|
|
31
34
|
'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
|
|
32
35
|
],
|
|
33
36
|
label: '!text-body3 font-medium',
|
|
@@ -35,9 +38,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
|
|
|
35
38
|
},
|
|
36
39
|
md: {
|
|
37
40
|
wrapper: [
|
|
38
|
-
'w-4 h-4 me-
|
|
41
|
+
'w-4 h-4 me-0',
|
|
39
42
|
'rounded-[calc(theme(borderRadius.medium)*0.2)]',
|
|
40
|
-
'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-
|
|
43
|
+
'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-2',
|
|
41
44
|
'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
|
|
42
45
|
],
|
|
43
46
|
label: '!text-body2 font-medium',
|
|
@@ -45,9 +48,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
|
|
|
45
48
|
},
|
|
46
49
|
lg: {
|
|
47
50
|
wrapper: [
|
|
48
|
-
'w-
|
|
51
|
+
'w-[18px] h-[18px] me-0',
|
|
49
52
|
'rounded-[calc(theme(borderRadius.medium)*0.3)]',
|
|
50
|
-
'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-
|
|
53
|
+
'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-secondary before:border-2',
|
|
51
54
|
'after:rounded-[calc(theme(borderRadius.medium)*0.3)]'
|
|
52
55
|
],
|
|
53
56
|
label: '!text-body1 font-medium',
|
|
@@ -138,13 +141,22 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
|
|
|
138
141
|
icon: 'transition-opacity motion-reduce:transition-none',
|
|
139
142
|
label: 'transition-colors-opacity before:transition-width motion-reduce:transition-none'
|
|
140
143
|
}
|
|
144
|
+
},
|
|
145
|
+
labelPlacement: {
|
|
146
|
+
left: {
|
|
147
|
+
base: 'flex-row-reverse gap-2'
|
|
148
|
+
},
|
|
149
|
+
right: {
|
|
150
|
+
base: 'flex-row gap-2'
|
|
151
|
+
}
|
|
141
152
|
}
|
|
142
153
|
},
|
|
143
154
|
defaultVariants: {
|
|
144
155
|
color: 'primary',
|
|
145
156
|
size: 'md',
|
|
146
157
|
isDisabled: false,
|
|
147
|
-
lineThrough: false
|
|
158
|
+
lineThrough: false,
|
|
159
|
+
labelPlacement: 'right'
|
|
148
160
|
}
|
|
149
161
|
});
|
|
150
162
|
const checkbox_extend = ExtendedCheckbox;
|
|
@@ -3,7 +3,8 @@ import { type CheckboxGroupProps } from '@heroui/checkbox';
|
|
|
3
3
|
import ExtendedCheckbox from './checkbox.extend';
|
|
4
4
|
export type UXCheckboxProps = React.ComponentPropsWithRef<typeof ExtendedCheckbox>;
|
|
5
5
|
declare const UXCheckbox: React.ForwardRefExoticComponent<Omit<Omit<import("@heroui/checkbox").CheckboxProps, "color"> & {
|
|
6
|
-
color?: "primary" | "success" | "warning" | "danger" | "bullish" | "bearish";
|
|
6
|
+
color?: "primary" | "secondary" | "success" | "warning" | "danger" | "bullish" | "bearish";
|
|
7
|
+
labelPlacement?: "left" | "right";
|
|
7
8
|
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
8
9
|
export default UXCheckbox;
|
|
9
10
|
export declare const UXCheckboxGroup: import("@heroui/system-rsc").InternalForwardRefRenderFunction<"div", CheckboxGroupProps, never>;
|
|
@@ -3,14 +3,20 @@ import { Tooltip } from "@heroui/tooltip";
|
|
|
3
3
|
const ExtendedTooltip = extendVariants(Tooltip, {
|
|
4
4
|
variants: {
|
|
5
5
|
size: {
|
|
6
|
+
sm: {
|
|
7
|
+
content: '!p-sm max-w-[300px]'
|
|
8
|
+
},
|
|
6
9
|
md: {
|
|
7
|
-
content: '
|
|
10
|
+
content: '!p-md max-w-[300px]'
|
|
11
|
+
},
|
|
12
|
+
lg: {
|
|
13
|
+
content: '!p-lg max-w-[300px]'
|
|
8
14
|
}
|
|
9
15
|
},
|
|
10
16
|
color: {
|
|
11
17
|
default: {
|
|
12
18
|
base: 'before:bg-content1 before:shadow-box',
|
|
13
|
-
content: 'bg-content1 text-foreground-300 shadow-box'
|
|
19
|
+
content: 'bg-content1 text-foreground-300 shadow-box text-tiny leading-1.4 break-all hyphens-manual wrap-break-word'
|
|
14
20
|
}
|
|
15
21
|
}
|
|
16
22
|
},
|
package/package.json
CHANGED
package/tailwind-preset.js
CHANGED
|
@@ -124,6 +124,9 @@ module.exports = {
|
|
|
124
124
|
content1: {
|
|
125
125
|
DEFAULT: '#FFFFFF',
|
|
126
126
|
},
|
|
127
|
+
overlay: {
|
|
128
|
+
DEFAULT: '#FFFFFF',
|
|
129
|
+
},
|
|
127
130
|
background: {
|
|
128
131
|
200: '#E8E8ED',
|
|
129
132
|
300: '#F0F0F2',
|
|
@@ -149,7 +152,11 @@ module.exports = {
|
|
|
149
152
|
foreground: '#FFFFFF',
|
|
150
153
|
},
|
|
151
154
|
secondary: {
|
|
152
|
-
DEFAULT: '#
|
|
155
|
+
DEFAULT: '#767A80',
|
|
156
|
+
foreground: '#FFFFFF',
|
|
157
|
+
},
|
|
158
|
+
tertiary: {
|
|
159
|
+
DEFAULT: '#C0C0C9',
|
|
153
160
|
foreground: '#000000',
|
|
154
161
|
},
|
|
155
162
|
success: {
|
|
@@ -175,6 +182,9 @@ module.exports = {
|
|
|
175
182
|
content1: {
|
|
176
183
|
DEFAULT: '#17171C',
|
|
177
184
|
},
|
|
185
|
+
overlay: {
|
|
186
|
+
DEFAULT: '#17171C',
|
|
187
|
+
},
|
|
178
188
|
background: {
|
|
179
189
|
200: '#1F1F23',
|
|
180
190
|
300: '#17171C',
|
|
@@ -200,7 +210,11 @@ module.exports = {
|
|
|
200
210
|
foreground: '#FFFFFF',
|
|
201
211
|
},
|
|
202
212
|
secondary: {
|
|
203
|
-
DEFAULT: '#
|
|
213
|
+
DEFAULT: '#A1A1AA',
|
|
214
|
+
foreground: '#FFFFFF',
|
|
215
|
+
},
|
|
216
|
+
tertiary: {
|
|
217
|
+
DEFAULT: '#4E4E56',
|
|
204
218
|
foreground: '#FFFFFF',
|
|
205
219
|
},
|
|
206
220
|
success: {
|