@particle-network/ui-react 0.4.5-beta.7 → 0.4.5-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.
- 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 +1 -4
- package/dist/components/UXToast/index.js +2 -2
- package/dist/utils/input-classes.d.ts +37 -2
- package/dist/utils/input-classes.js +65 -6
- package/package.json +2 -2
|
@@ -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, {
|
|
@@ -45,9 +44,7 @@ const UXModal = (props)=>{
|
|
|
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
|
})
|
|
@@ -44,7 +44,7 @@ const show = (props)=>{
|
|
|
44
44
|
base
|
|
45
45
|
],
|
|
46
46
|
description: [
|
|
47
|
-
'text-foreground text-xs font-medium me-0 leading-4 line-clamp-4',
|
|
47
|
+
'text-tertiary-foreground text-xs font-medium me-0 leading-4 line-clamp-4',
|
|
48
48
|
'flat' === variant && 'text-white',
|
|
49
49
|
hasLongWord(description) && 'break-all',
|
|
50
50
|
descriptionClassName
|
|
@@ -72,7 +72,7 @@ const show = (props)=>{
|
|
|
72
72
|
icon: icon ?? getIcon(type),
|
|
73
73
|
hideIcon: !icon && !getIcon(type),
|
|
74
74
|
closeIcon: /*#__PURE__*/ jsx(CloseIcon, {
|
|
75
|
-
className: 'flat' === variant ? 'text-white' : 'text-foreground'
|
|
75
|
+
className: 'flat' === variant ? 'text-white' : 'text-tertiary-foreground'
|
|
76
76
|
}),
|
|
77
77
|
loadingComponent: /*#__PURE__*/ jsx(UXSpinner, {
|
|
78
78
|
size: 18
|
|
@@ -8,6 +8,7 @@ export declare const inputClasses: {
|
|
|
8
8
|
isDisabled: boolean;
|
|
9
9
|
hideStepper: boolean;
|
|
10
10
|
textAlign: string;
|
|
11
|
+
isColorText: boolean;
|
|
11
12
|
};
|
|
12
13
|
variants: {
|
|
13
14
|
variant: {
|
|
@@ -29,10 +30,13 @@ export declare const inputClasses: {
|
|
|
29
30
|
input: string;
|
|
30
31
|
};
|
|
31
32
|
};
|
|
33
|
+
isColorText: {
|
|
34
|
+
true: {};
|
|
35
|
+
false: {};
|
|
36
|
+
};
|
|
32
37
|
color: {
|
|
33
38
|
default: {
|
|
34
39
|
inputWrapper: string;
|
|
35
|
-
input: string;
|
|
36
40
|
};
|
|
37
41
|
primary: {
|
|
38
42
|
inputWrapper: string;
|
|
@@ -40,7 +44,6 @@ export declare const inputClasses: {
|
|
|
40
44
|
};
|
|
41
45
|
secondary: {
|
|
42
46
|
inputWrapper: string;
|
|
43
|
-
input: string;
|
|
44
47
|
};
|
|
45
48
|
success: {
|
|
46
49
|
inputWrapper: string;
|
|
@@ -166,6 +169,7 @@ export declare const inputClasses: {
|
|
|
166
169
|
variant?: undefined;
|
|
167
170
|
color?: undefined;
|
|
168
171
|
isInvalid?: undefined;
|
|
172
|
+
isColorText?: undefined;
|
|
169
173
|
labelPlacement?: undefined;
|
|
170
174
|
radius?: undefined;
|
|
171
175
|
disableAnimation?: undefined;
|
|
@@ -182,6 +186,7 @@ export declare const inputClasses: {
|
|
|
182
186
|
stepperButton?: undefined;
|
|
183
187
|
};
|
|
184
188
|
size?: undefined;
|
|
189
|
+
isColorText?: undefined;
|
|
185
190
|
labelPlacement?: undefined;
|
|
186
191
|
radius?: undefined;
|
|
187
192
|
disableAnimation?: undefined;
|
|
@@ -198,6 +203,24 @@ export declare const inputClasses: {
|
|
|
198
203
|
stepperButton?: undefined;
|
|
199
204
|
};
|
|
200
205
|
size?: undefined;
|
|
206
|
+
isColorText?: undefined;
|
|
207
|
+
labelPlacement?: undefined;
|
|
208
|
+
radius?: undefined;
|
|
209
|
+
disableAnimation?: undefined;
|
|
210
|
+
isMultiline?: undefined;
|
|
211
|
+
} | {
|
|
212
|
+
isColorText: boolean;
|
|
213
|
+
color: string;
|
|
214
|
+
class: {
|
|
215
|
+
input: string;
|
|
216
|
+
inputWrapper?: undefined;
|
|
217
|
+
label?: undefined;
|
|
218
|
+
innerWrapper?: undefined;
|
|
219
|
+
stepperButton?: undefined;
|
|
220
|
+
};
|
|
221
|
+
size?: undefined;
|
|
222
|
+
variant?: undefined;
|
|
223
|
+
isInvalid?: undefined;
|
|
201
224
|
labelPlacement?: undefined;
|
|
202
225
|
radius?: undefined;
|
|
203
226
|
disableAnimation?: undefined;
|
|
@@ -215,6 +238,7 @@ export declare const inputClasses: {
|
|
|
215
238
|
size?: undefined;
|
|
216
239
|
variant?: undefined;
|
|
217
240
|
isInvalid?: undefined;
|
|
241
|
+
isColorText?: undefined;
|
|
218
242
|
radius?: undefined;
|
|
219
243
|
disableAnimation?: undefined;
|
|
220
244
|
isMultiline?: undefined;
|
|
@@ -231,6 +255,7 @@ export declare const inputClasses: {
|
|
|
231
255
|
variant?: undefined;
|
|
232
256
|
color?: undefined;
|
|
233
257
|
isInvalid?: undefined;
|
|
258
|
+
isColorText?: undefined;
|
|
234
259
|
labelPlacement?: undefined;
|
|
235
260
|
disableAnimation?: undefined;
|
|
236
261
|
isMultiline?: undefined;
|
|
@@ -247,6 +272,7 @@ export declare const inputClasses: {
|
|
|
247
272
|
variant?: undefined;
|
|
248
273
|
color?: undefined;
|
|
249
274
|
isInvalid?: undefined;
|
|
275
|
+
isColorText?: undefined;
|
|
250
276
|
labelPlacement?: undefined;
|
|
251
277
|
disableAnimation?: undefined;
|
|
252
278
|
isMultiline?: undefined;
|
|
@@ -263,6 +289,7 @@ export declare const inputClasses: {
|
|
|
263
289
|
size?: undefined;
|
|
264
290
|
color?: undefined;
|
|
265
291
|
isInvalid?: undefined;
|
|
292
|
+
isColorText?: undefined;
|
|
266
293
|
labelPlacement?: undefined;
|
|
267
294
|
radius?: undefined;
|
|
268
295
|
isMultiline?: undefined;
|
|
@@ -279,6 +306,7 @@ export declare const inputClasses: {
|
|
|
279
306
|
variant?: undefined;
|
|
280
307
|
color?: undefined;
|
|
281
308
|
isInvalid?: undefined;
|
|
309
|
+
isColorText?: undefined;
|
|
282
310
|
radius?: undefined;
|
|
283
311
|
disableAnimation?: undefined;
|
|
284
312
|
isMultiline?: undefined;
|
|
@@ -295,6 +323,7 @@ export declare const inputClasses: {
|
|
|
295
323
|
};
|
|
296
324
|
color?: undefined;
|
|
297
325
|
isInvalid?: undefined;
|
|
326
|
+
isColorText?: undefined;
|
|
298
327
|
radius?: undefined;
|
|
299
328
|
disableAnimation?: undefined;
|
|
300
329
|
isMultiline?: undefined;
|
|
@@ -311,6 +340,7 @@ export declare const inputClasses: {
|
|
|
311
340
|
variant?: undefined;
|
|
312
341
|
color?: undefined;
|
|
313
342
|
isInvalid?: undefined;
|
|
343
|
+
isColorText?: undefined;
|
|
314
344
|
radius?: undefined;
|
|
315
345
|
disableAnimation?: undefined;
|
|
316
346
|
isMultiline?: undefined;
|
|
@@ -327,6 +357,7 @@ export declare const inputClasses: {
|
|
|
327
357
|
variant?: undefined;
|
|
328
358
|
color?: undefined;
|
|
329
359
|
isInvalid?: undefined;
|
|
360
|
+
isColorText?: undefined;
|
|
330
361
|
radius?: undefined;
|
|
331
362
|
disableAnimation?: undefined;
|
|
332
363
|
isMultiline?: undefined;
|
|
@@ -343,6 +374,7 @@ export declare const inputClasses: {
|
|
|
343
374
|
size?: undefined;
|
|
344
375
|
color?: undefined;
|
|
345
376
|
isInvalid?: undefined;
|
|
377
|
+
isColorText?: undefined;
|
|
346
378
|
radius?: undefined;
|
|
347
379
|
disableAnimation?: undefined;
|
|
348
380
|
isMultiline?: undefined;
|
|
@@ -359,6 +391,7 @@ export declare const inputClasses: {
|
|
|
359
391
|
variant?: undefined;
|
|
360
392
|
color?: undefined;
|
|
361
393
|
isInvalid?: undefined;
|
|
394
|
+
isColorText?: undefined;
|
|
362
395
|
radius?: undefined;
|
|
363
396
|
disableAnimation?: undefined;
|
|
364
397
|
isMultiline?: undefined;
|
|
@@ -375,6 +408,7 @@ export declare const inputClasses: {
|
|
|
375
408
|
};
|
|
376
409
|
color?: undefined;
|
|
377
410
|
isInvalid?: undefined;
|
|
411
|
+
isColorText?: undefined;
|
|
378
412
|
radius?: undefined;
|
|
379
413
|
disableAnimation?: undefined;
|
|
380
414
|
isMultiline?: undefined;
|
|
@@ -392,6 +426,7 @@ export declare const inputClasses: {
|
|
|
392
426
|
};
|
|
393
427
|
color?: undefined;
|
|
394
428
|
isInvalid?: undefined;
|
|
429
|
+
isColorText?: undefined;
|
|
395
430
|
radius?: undefined;
|
|
396
431
|
disableAnimation?: undefined;
|
|
397
432
|
})[];
|
|
@@ -7,7 +7,8 @@ const inputClasses = {
|
|
|
7
7
|
labelPlacement: 'outside',
|
|
8
8
|
isDisabled: false,
|
|
9
9
|
hideStepper: true,
|
|
10
|
-
textAlign: 'left'
|
|
10
|
+
textAlign: 'left',
|
|
11
|
+
isColorText: false
|
|
11
12
|
},
|
|
12
13
|
variants: {
|
|
13
14
|
variant: {
|
|
@@ -38,18 +39,20 @@ const inputClasses = {
|
|
|
38
39
|
input: 'text-right'
|
|
39
40
|
}
|
|
40
41
|
},
|
|
42
|
+
isColorText: {
|
|
43
|
+
true: {},
|
|
44
|
+
false: {}
|
|
45
|
+
},
|
|
41
46
|
color: {
|
|
42
47
|
default: {
|
|
43
|
-
inputWrapper: 'caret-foreground'
|
|
44
|
-
input: 'text-foreground'
|
|
48
|
+
inputWrapper: 'caret-foreground'
|
|
45
49
|
},
|
|
46
50
|
primary: {
|
|
47
51
|
inputWrapper: 'caret-primary',
|
|
48
52
|
stepperButton: 'text-primary'
|
|
49
53
|
},
|
|
50
54
|
secondary: {
|
|
51
|
-
inputWrapper: 'caret-foreground'
|
|
52
|
-
input: 'text-secondary'
|
|
55
|
+
inputWrapper: 'caret-foreground'
|
|
53
56
|
},
|
|
54
57
|
success: {
|
|
55
58
|
inputWrapper: 'caret-success',
|
|
@@ -190,7 +193,7 @@ const inputClasses = {
|
|
|
190
193
|
class: {
|
|
191
194
|
inputWrapper: 'bg-background-200 text-tertiary font-medium',
|
|
192
195
|
label: 'font-medium',
|
|
193
|
-
input: '!outline-none placeholder:text-tertiary
|
|
196
|
+
input: '!outline-none placeholder:text-tertiary placeholder:font-medium font-medium text-foreground'
|
|
194
197
|
}
|
|
195
198
|
},
|
|
196
199
|
{
|
|
@@ -353,6 +356,62 @@ const inputClasses = {
|
|
|
353
356
|
]
|
|
354
357
|
}
|
|
355
358
|
},
|
|
359
|
+
{
|
|
360
|
+
isColorText: true,
|
|
361
|
+
color: 'default',
|
|
362
|
+
class: {
|
|
363
|
+
input: 'text-foreground'
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
isColorText: true,
|
|
368
|
+
color: 'primary',
|
|
369
|
+
class: {
|
|
370
|
+
input: 'text-primary'
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
isColorText: true,
|
|
375
|
+
color: 'secondary',
|
|
376
|
+
class: {
|
|
377
|
+
input: 'text-secondary'
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
isColorText: true,
|
|
382
|
+
color: 'success',
|
|
383
|
+
class: {
|
|
384
|
+
input: 'text-success'
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
isColorText: true,
|
|
389
|
+
color: 'warning',
|
|
390
|
+
class: {
|
|
391
|
+
input: 'text-warning'
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
isColorText: true,
|
|
396
|
+
color: 'danger',
|
|
397
|
+
class: {
|
|
398
|
+
input: 'text-danger'
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
isColorText: true,
|
|
403
|
+
color: 'bullish',
|
|
404
|
+
class: {
|
|
405
|
+
input: 'text-bullish'
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
isColorText: true,
|
|
410
|
+
color: 'bearish',
|
|
411
|
+
class: {
|
|
412
|
+
input: 'text-bearish'
|
|
413
|
+
}
|
|
414
|
+
},
|
|
356
415
|
{
|
|
357
416
|
labelPlacement: 'inside',
|
|
358
417
|
color: 'default',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.4.5-beta.
|
|
3
|
+
"version": "0.4.5-beta.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -49,7 +49,7 @@
|
|
|
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.2-beta.
|
|
52
|
+
"@particle-network/icons": "0.4.2-beta.6",
|
|
53
53
|
"@particle-network/ui-shared": "0.3.2-beta.2"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|