@startupjs-ui/range-input 0.2.3 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.3.0](https://github.com/startupjs/startupjs-ui/compare/v0.2.3...v0.3.0) (2026-05-27)
7
+
8
+
9
+ ### Features
10
+
11
+ * [BREAKING] [0.3] improve accessibility props for E2E tests. Support testID everywhere ([#31](https://github.com/startupjs/startupjs-ui/issues/31)) ([882588c](https://github.com/startupjs/startupjs-ui/commit/882588ca37d5e1fd14b5717b5697cf9ed47042e4))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.2.3](https://github.com/startupjs/startupjs-ui/compare/v0.2.2...v0.2.3) (2026-05-15)
7
18
 
8
19
 
package/README.mdx CHANGED
@@ -8,6 +8,8 @@ A slider control that lets users select a value (or a range of values) by draggi
8
8
 
9
9
  The component also supports style overrides for individual parts: `containerStyle`, `trackStyle`, `selectedStyle`, `markerStyle`, `stepStyle`, `stepLabelStyle`, and `stepMarkerStyle`. Use `customLabel` to replace the default marker label component, or `onChangeStart` and `onChangeFinish` to respond to the start and end of a drag gesture.
10
10
 
11
+ `testID` is forwarded to the underlying slider. The third-party slider does not currently expose `role` or `aria-*` props without adding an extra wrapper, so tests should use `testID` or surrounding visible text for this component.
12
+
11
13
  ```jsx
12
14
  import { RangeInput } from 'startupjs-ui'
13
15
  ```
package/index.d.ts CHANGED
@@ -49,4 +49,9 @@ export interface RangeInputProps {
49
49
  onChangeStart?: MultiSliderProps['onValuesChangeStart'];
50
50
  /** Handler triggered when sliding ends */
51
51
  onChangeFinish?: MultiSliderProps['onValuesChangeFinish'];
52
+ /** Test identifier forwarded to the underlying slider */
53
+ testID?: string;
54
+ /** Whether the slider is disabled */
55
+ disabled?: boolean;
56
+ [key: string]: any;
52
57
  }
package/index.tsx CHANGED
@@ -52,6 +52,11 @@ export interface RangeInputProps {
52
52
  onChangeStart?: MultiSliderProps['onValuesChangeStart']
53
53
  /** Handler triggered when sliding ends */
54
54
  onChangeFinish?: MultiSliderProps['onValuesChangeFinish']
55
+ /** Test identifier forwarded to the underlying slider */
56
+ testID?: string
57
+ /** Whether the slider is disabled */
58
+ disabled?: boolean
59
+ [key: string]: any
55
60
  }
56
61
 
57
62
  function RangeInput ({
@@ -69,6 +74,8 @@ function RangeInput ({
69
74
  onChange,
70
75
  onChangeFinish,
71
76
  onChangeStart,
77
+ testID,
78
+ disabled,
72
79
  ...props
73
80
  }: RangeInputProps): ReactNode {
74
81
  useMemo(() => {
@@ -96,9 +103,11 @@ function RangeInput ({
96
103
  MultiSlider.root(
97
104
  ...props
98
105
  part='root'
106
+ testID=testID
99
107
  customLabel=customLabel
100
108
  enableLabel=showLabel
101
- enabledTwo=range
109
+ enabledOne=!disabled
110
+ enabledTwo=range && !disabled
102
111
  min=min
103
112
  max=max
104
113
  showSteps=showSteps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/range-input",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,15 +8,15 @@
8
8
  "types": "index.d.ts",
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@startupjs-ui/core": "^0.2.0",
12
- "@startupjs-ui/div": "^0.2.0",
11
+ "@startupjs-ui/core": "^0.3.0",
12
+ "@startupjs-ui/div": "^0.3.0",
13
13
  "@startupjs-ui/react-native-multi-slider": "^2.2.2",
14
- "@startupjs-ui/span": "^0.2.0"
14
+ "@startupjs-ui/span": "^0.3.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "*",
18
18
  "react-native": "*",
19
19
  "startupjs": "*"
20
20
  },
21
- "gitHead": "6e854934a9a9d2484291670dd5955ba8ad9af621"
21
+ "gitHead": "8d212b47680af1dfe582f9759b38724b46488e25"
22
22
  }