@particle-network/ui-react 0.5.0-beta.0 → 0.5.0

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.
Files changed (51) hide show
  1. package/dist/components/UXButton/button-theme.d.ts +3 -0
  2. package/dist/components/UXButton/button-theme.js +36 -9
  3. package/dist/components/UXButton/use-button.js +2 -1
  4. package/dist/components/UXChip/chip.extend.d.ts +1 -1
  5. package/dist/components/UXChip/chip.extend.js +17 -2
  6. package/dist/components/UXChip/index.d.ts +1 -1
  7. package/dist/components/UXCopy/index.d.ts +2 -0
  8. package/dist/components/UXCopy/index.js +4 -3
  9. package/dist/components/UXDivider/divider.extend.d.ts +7 -283
  10. package/dist/components/UXInput/index.d.ts +24 -333
  11. package/dist/components/UXInput/input.extend.d.ts +24 -333
  12. package/dist/components/UXModal/index.js +2 -5
  13. package/dist/components/UXNumberInput/number-input.extend.d.ts +1 -0
  14. package/dist/components/UXSlider/index.d.ts +5 -0
  15. package/dist/components/UXSlider/index.js +3 -0
  16. package/dist/components/UXSlider/slider-theme.d.ts +521 -0
  17. package/dist/components/UXSlider/slider-theme.js +464 -0
  18. package/dist/components/UXSlider/slider-thumb.d.ts +4 -0
  19. package/dist/components/UXSlider/slider-thumb.js +33 -0
  20. package/dist/components/UXSlider/slider.d.ts +4 -0
  21. package/dist/components/UXSlider/slider.js +77 -0
  22. package/dist/components/UXSlider/use-slider-thumb.d.ts +61 -0
  23. package/dist/components/UXSlider/use-slider-thumb.js +79 -0
  24. package/dist/components/UXSlider/use-slider.d.ts +182 -0
  25. package/dist/components/UXSlider/use-slider.js +277 -0
  26. package/dist/components/UXSwitch/index.d.ts +11 -323
  27. package/dist/components/UXSwitch/switch.extend.d.ts +11 -323
  28. package/dist/components/UXTabSwitch/index.d.ts +16 -0
  29. package/dist/components/UXTabSwitch/index.js +30 -0
  30. package/dist/components/UXTable/index.d.ts +23 -336
  31. package/dist/components/UXTable/table.extend.d.ts +23 -336
  32. package/dist/components/UXTabs/tabs.classes.js +4 -4
  33. package/dist/components/UXThemeSwitch/theme-switch.d.ts +6 -2
  34. package/dist/components/UXThemeSwitch/theme-switch.js +16 -9
  35. package/dist/components/UXThemeSwitch/use-theme-color.d.ts +22 -1
  36. package/dist/components/UXThemeSwitch/use-theme-color.js +5 -1
  37. package/dist/components/UXThemeSwitch/use-theme.js +12 -6
  38. package/dist/components/UXToast/index.js +2 -2
  39. package/dist/components/UXTooltip/index.d.ts +2 -2
  40. package/dist/components/UXTooltip/tooltip.extend.d.ts +9 -311
  41. package/dist/components/index.d.ts +2 -0
  42. package/dist/components/index.js +2 -0
  43. package/dist/components/typography/Text.type.d.ts +0 -14
  44. package/dist/hooks/useI18n.d.ts +4 -0
  45. package/dist/hooks/useI18n.js +8 -0
  46. package/dist/utils/classes.d.ts +11 -0
  47. package/dist/utils/classes.js +12 -1
  48. package/dist/utils/input-classes.d.ts +37 -2
  49. package/dist/utils/input-classes.js +65 -6
  50. package/package.json +5 -5
  51. package/tailwind-preset.js +112 -33
@@ -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 dark:placeholder:text-tertiary placeholder:font-medium font-medium text-foreground'
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.5.0-beta.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -37,7 +37,7 @@
37
37
  "@rsbuild/plugin-react": "^1.3.5",
38
38
  "@rslib/core": "^0.12.3",
39
39
  "@types/react": "^19.1.10",
40
- "react": "^19.1.2",
40
+ "react": "^19.1.0",
41
41
  "@particle-network/lintstaged-config": "0.1.0",
42
42
  "@particle-network/eslint-config": "0.3.0"
43
43
  },
@@ -49,13 +49,13 @@
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.5.0-beta.0",
53
- "@particle-network/ui-shared": "0.3.0"
52
+ "@particle-network/icons": "0.5.0",
53
+ "@particle-network/ui-shared": "0.4.0"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "rslib build",
57
57
  "dev": "rslib build --watch",
58
- "type-check": "npx tsgo --noEmit -p ./tsconfig.json",
58
+ "type-check": "npx tsc --noEmit -p ./tsconfig.json",
59
59
  "lint": "eslint . --no-error-on-unmatched-pattern --quiet",
60
60
  "lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
61
61
  "clean": "rm -rf .turbo node_modules dist"
@@ -201,7 +201,7 @@ module.exports = {
201
201
  },
202
202
  foreground: {
203
203
  100: '#D8D8DE',
204
- 300: '#767A80',
204
+ 300: '#61656B',
205
205
  500: '#0C0C0F',
206
206
  DEFAULT: '#0C0C0F',
207
207
  },
@@ -223,7 +223,7 @@ module.exports = {
223
223
  foreground: '#FFFFFF',
224
224
  },
225
225
  secondary: {
226
- DEFAULT: '#767A80',
226
+ DEFAULT: '#61656B',
227
227
  foreground: '#FFFFFF',
228
228
  },
229
229
  tertiary: {
@@ -434,22 +434,22 @@ module.exports = {
434
434
  extend: 'dark',
435
435
  colors: {
436
436
  content1: {
437
- DEFAULT: '#17171C',
437
+ DEFAULT: '#1F2025',
438
438
  foreground: '#FFFFFF',
439
439
  },
440
440
  overlay: {
441
- DEFAULT: '#17171C',
441
+ DEFAULT: '#1F2025',
442
442
  foreground: '#FFFFFF',
443
443
  },
444
444
  background: {
445
445
  200: '#2A2A30',
446
- 300: '#17171C',
446
+ 300: '#1F2025',
447
447
  400: '#171517',
448
448
  500: '#100E11',
449
449
  DEFAULT: '#100E11',
450
450
  },
451
451
  foreground: {
452
- 100: '#70707C',
452
+ 100: '#4E4E56',
453
453
  300: '#BBBBC4',
454
454
  500: '#FDFDFE',
455
455
  DEFAULT: '#FDFDFE',
@@ -476,20 +476,20 @@ module.exports = {
476
476
  foreground: '#000000',
477
477
  },
478
478
  tertiary: {
479
- DEFAULT: '#70707C',
479
+ DEFAULT: '#4E4E56',
480
480
  foreground: '#FFFFFF',
481
481
  },
482
482
  success: {
483
- DEFAULT: '#73D090',
484
- foreground: '#000000',
483
+ DEFAULT: '#19AB5E',
484
+ foreground: '#FFFFFF',
485
485
  },
486
486
  danger: {
487
- DEFAULT: '#F46271',
488
- foreground: '#000000',
487
+ DEFAULT: '#FF5868',
488
+ foreground: '#FFFFFF',
489
489
  },
490
490
  warning: {
491
491
  DEFAULT: '#F8BF63',
492
- foreground: '#000000',
492
+ foreground: '#FFFFFF',
493
493
  },
494
494
  divider: {
495
495
  DEFAULT: '#26272D',
@@ -497,19 +497,19 @@ module.exports = {
497
497
  },
498
498
  alert: {
499
499
  DEFAULT: '#F37A39',
500
- foreground: '#000000',
500
+ foreground: '#FFFFFF',
501
501
  },
502
502
  gold: {
503
503
  DEFAULT: '#FFB800',
504
- foreground: '#000000',
504
+ foreground: '#FFFFFF',
505
505
  },
506
506
  bullish: {
507
- DEFAULT: '#73D090',
508
- foreground: '#000000',
507
+ DEFAULT: '#19AB5E',
508
+ foreground: '#FFFFFF',
509
509
  },
510
510
  bearish: {
511
- DEFAULT: '#F46271',
512
- foreground: '#000000',
511
+ DEFAULT: '#FF5868',
512
+ foreground: '#FFFFFF',
513
513
  },
514
514
  },
515
515
  },
@@ -533,7 +533,7 @@ module.exports = {
533
533
  },
534
534
  foreground: {
535
535
  100: '#CFCFD7',
536
- 300: '#3D3C3F',
536
+ 300: '#55585C',
537
537
  500: '#000000',
538
538
  DEFAULT: '#000000',
539
539
  },
@@ -555,7 +555,7 @@ module.exports = {
555
555
  foreground: '#FFFFFF',
556
556
  },
557
557
  secondary: {
558
- DEFAULT: '#3D3C3F',
558
+ DEFAULT: '#55585C',
559
559
  foreground: '#FFFFFF',
560
560
  },
561
561
  tertiary: {
@@ -781,7 +781,7 @@ module.exports = {
781
781
  DEFAULT: '#0A1318',
782
782
  },
783
783
  foreground: {
784
- 100: '#949E9C',
784
+ 100: '#5D6466',
785
785
  300: '#D1D4DC',
786
786
  500: '#F6FEFD',
787
787
  DEFAULT: '#F6FEFD',
@@ -808,8 +808,8 @@ module.exports = {
808
808
  foreground: '#000000',
809
809
  },
810
810
  tertiary: {
811
- DEFAULT: '#949E9C',
812
- foreground: '#000000',
811
+ DEFAULT: '#5D6466',
812
+ foreground: '#FFFFFF',
813
813
  },
814
814
  success: {
815
815
  DEFAULT: '#1FA67D',
@@ -1040,16 +1040,16 @@ module.exports = {
1040
1040
  foreground: '#FFFFFF',
1041
1041
  },
1042
1042
  primary: {
1043
- 100: '#EFF6F3',
1044
- 200: '#D2E9DE',
1045
- 300: '#B0E1C9',
1046
- 400: '#8BDCB3',
1047
- 500: '#61DC9B',
1048
- 600: '#34CD79',
1049
- 700: '#2A9B5A',
1050
- 800: '#1F693E',
1051
- 900: '#133A22',
1052
- DEFAULT: '#61DC9B',
1043
+ 100: '#F0F4F2',
1044
+ 200: '#C8DBD2',
1045
+ 300: '#9CC6B2',
1046
+ 400: '#6DB590',
1047
+ 500: '#459C6E',
1048
+ 600: '#3B805B',
1049
+ 700: '#316648',
1050
+ 800: '#264B35',
1051
+ 900: '#1A3224',
1052
+ DEFAULT: '#459C6E',
1053
1053
  foreground: '#000000',
1054
1054
  },
1055
1055
  secondary: {
@@ -1094,6 +1094,85 @@ module.exports = {
1094
1094
  },
1095
1095
  },
1096
1096
  },
1097
+ 'product-test': {
1098
+ extend: 'dark',
1099
+ colors: {
1100
+ default: {
1101
+ DEFAULT: '#222D33',
1102
+ foreground: '#F6FEFD',
1103
+ },
1104
+ secondary: {
1105
+ DEFAULT: '#D1D4DC',
1106
+ foreground: '#000000',
1107
+ },
1108
+ tertiary: {
1109
+ DEFAULT: '#949E9C',
1110
+ foreground: '#000000',
1111
+ },
1112
+ primary: {
1113
+ 100: '#EFF5F5',
1114
+ 200: '#CEE6E4',
1115
+ 300: '#A8DBD6',
1116
+ 400: '#7ED4CB',
1117
+ 500: '#50D2C1',
1118
+ 600: '#34B9A5',
1119
+ 700: '#2B8C7C',
1120
+ 800: '#206255',
1121
+ 900: '#143831',
1122
+ DEFAULT: '#50D2C1',
1123
+ foreground: '#000000',
1124
+ },
1125
+ success: {
1126
+ DEFAULT: '#19AB5E',
1127
+ foreground: '#000000',
1128
+ },
1129
+ danger: {
1130
+ DEFAULT: '#E84A5A',
1131
+ foreground: '#000000',
1132
+ },
1133
+ alert: {
1134
+ DEFAULT: '#F57733',
1135
+ foreground: '#000000',
1136
+ },
1137
+ warning: {
1138
+ DEFAULT: '#FFD13F',
1139
+ foreground: '#000000',
1140
+ },
1141
+ gold: {
1142
+ DEFAULT: '#FFB800',
1143
+ foreground: '#000000',
1144
+ },
1145
+ overlay: {
1146
+ DEFAULT: '#1B2429',
1147
+ foreground: '#FFFFFF',
1148
+ },
1149
+ divider: {
1150
+ DEFAULT: '#394145',
1151
+ foreground: '#FFFFFF',
1152
+ },
1153
+ bullish: {
1154
+ DEFAULT: '#D745FF',
1155
+ foreground: '#000000',
1156
+ },
1157
+ bearish: {
1158
+ DEFAULT: '#F38300',
1159
+ foreground: '#000000',
1160
+ },
1161
+ background: {
1162
+ 200: '#222D33',
1163
+ 300: '#1B2429',
1164
+ 400: '#0F1A1F',
1165
+ 500: '#0A1318',
1166
+ DEFAULT: '#0A1318',
1167
+ },
1168
+ foreground: {
1169
+ 100: '#949E9C',
1170
+ 300: '#D1D4DC',
1171
+ 500: '#F6FEFD',
1172
+ DEFAULT: '#F6FEFD',
1173
+ },
1174
+ },
1175
+ },
1097
1176
  },
1098
1177
  function({ addVariant, addComponents }) {
1099
1178
  addVariant('child', '& > *');