@particle-network/ui-react 0.5.1-beta.25 → 0.5.1-beta.27

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.
@@ -5,6 +5,7 @@ export interface UXRangeInputValue {
5
5
  max?: number;
6
6
  }
7
7
  export type UXRangeInputProps = Omit<UXNumberInputProps, 'value' | 'defaultValue' | 'onValueChange' | 'minValue' | 'maxValue'> & {
8
+ asFragment?: boolean;
8
9
  /**
9
10
  * The current value of the range input (controlled)
10
11
  */
@@ -31,7 +32,6 @@ export type UXRangeInputProps = Omit<UXNumberInputProps, 'value' | 'defaultValue
31
32
  maxInputProps?: Partial<UXNumberInputProps>;
32
33
  /**
33
34
  * Separator between the two inputs
34
- * @default '-'
35
35
  */
36
36
  separator?: React.ReactNode;
37
37
  /**
@@ -39,4 +39,4 @@ export type UXRangeInputProps = Omit<UXNumberInputProps, 'value' | 'defaultValue
39
39
  */
40
40
  onValueChange?: (value: UXRangeInputValue) => void;
41
41
  };
42
- export declare const UXRangeInput: React.ForwardRefExoticComponent<UXRangeInputProps & React.RefAttributes<HTMLDivElement>>;
42
+ export declare const UXRangeInput: React.FC<UXRangeInputProps>;
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import react, { forwardRef, useCallback, useMemo } from "react";
2
+ import react, { Fragment, useCallback, useMemo } from "react";
3
3
  import { useI18n } from "../../hooks/index.js";
4
4
  import { HStack } from "../layout/index.js";
5
5
  import { UXNumberInput } from "../UXNumberInput/index.js";
6
- const UXRangeInput = /*#__PURE__*/ forwardRef((props, ref)=>{
7
- const { value, defaultValue, onValueChange, minValue, maxValue, minInputProps = {}, maxInputProps = {}, separator = '', className, ...restProps } = props;
6
+ const UXRangeInput = (props)=>{
7
+ const { asFragment, value, defaultValue, onValueChange, minValue, maxValue, minInputProps = {}, maxInputProps = {}, separator = '', className, ...restProps } = props;
8
8
  const i18n = useI18n();
9
9
  const [internalValue, setInternalValue] = react.useState(defaultValue || {
10
10
  min: void 0,
@@ -53,8 +53,8 @@ const UXRangeInput = /*#__PURE__*/ forwardRef((props, ref)=>{
53
53
  currentValue.min,
54
54
  minValue
55
55
  ]);
56
- return /*#__PURE__*/ jsxs(HStack, {
57
- ref: ref,
56
+ const Wrapper = asFragment ? Fragment : HStack;
57
+ return /*#__PURE__*/ jsxs(Wrapper, {
58
58
  gap: 2,
59
59
  className: className,
60
60
  children: [
@@ -64,6 +64,7 @@ const UXRangeInput = /*#__PURE__*/ forwardRef((props, ref)=>{
64
64
  "aria-hidden": "true",
65
65
  children: i18n.rangeInput.min
66
66
  }),
67
+ textAlign: "right",
67
68
  ...restProps,
68
69
  ...minInputProps,
69
70
  value: currentValue.min,
@@ -78,6 +79,7 @@ const UXRangeInput = /*#__PURE__*/ forwardRef((props, ref)=>{
78
79
  "aria-hidden": "true",
79
80
  children: i18n.rangeInput.max
80
81
  }),
82
+ textAlign: "right",
81
83
  ...restProps,
82
84
  ...maxInputProps,
83
85
  value: currentValue.max,
@@ -87,6 +89,6 @@ const UXRangeInput = /*#__PURE__*/ forwardRef((props, ref)=>{
87
89
  })
88
90
  ]
89
91
  });
90
- });
92
+ };
91
93
  UXRangeInput.displayName = 'UX.RangeInput';
92
94
  export { UXRangeInput };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.5.1-beta.25",
3
+ "version": "0.5.1-beta.27",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -986,11 +986,11 @@ module.exports = {
986
986
  },
987
987
  success: {
988
988
  DEFAULT: '#2EBD85',
989
- foreground: '#000000',
989
+ foreground: '#FFFFFF',
990
990
  },
991
991
  danger: {
992
- DEFAULT: '#F6465D',
993
- foreground: '#000000',
992
+ DEFAULT: '#F5465D',
993
+ foreground: '#FFFFFF',
994
994
  },
995
995
  warning: {
996
996
  DEFAULT: '#F0B90B',
@@ -1006,11 +1006,11 @@ module.exports = {
1006
1006
  },
1007
1007
  bullish: {
1008
1008
  DEFAULT: '#2EBD85',
1009
- foreground: '#000000',
1009
+ foreground: '#FFFFFF',
1010
1010
  },
1011
1011
  bearish: {
1012
- DEFAULT: '#F6465D',
1013
- foreground: '#000000',
1012
+ DEFAULT: '#F5465D',
1013
+ foreground: '#FFFFFF',
1014
1014
  },
1015
1015
  },
1016
1016
  },