Skip to content

Commit 2fabc1a

Browse files
Removing step from ColorSlider, ColorWheel, ColorField docs (#2915)
* removing step from color slider and color wheel docs * Remove step from ColorField docs Co-authored-by: Rob Snow <[email protected]>
1 parent 847af08 commit 2fabc1a

File tree

6 files changed

+0
-59
lines changed

6 files changed

+0
-59
lines changed

packages/@react-aria/color/docs/useColorField.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ color fields that can be styled as needed.
4646
* Support for parsing and formatting a hex color value
4747
* Validates keyboard entry as the user types so that only valid hex characters are accepted
4848
* Supports using the arrow keys to increment and decrement the value
49-
* Support for customizing the step value for incrementing and decrementing
5049
* Exposed to assistive technology as a `textbox` via ARIA
5150
* Visual and ARIA labeling support
5251
* Follows the [spinbutton](https://www.w3.org/TR/wai-aria-practices-1.2/#spinbutton) ARIA pattern
@@ -130,14 +129,6 @@ function Example() {
130129
}
131130
```
132131

133-
### Step
134-
135-
The `step` prop can be used to make a `ColorField` snap its value to specific increments.
136-
137-
```tsx example
138-
<ColorField defaultValue="#7f007f" step={16} />
139-
```
140-
141132
### Disabled and read only
142133

143134
A `ColorField` can be disabled using the `isDisabled` prop, and made read only using the `isReadOnly` prop.

packages/@react-aria/color/docs/useColorSlider.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ touch-friendly color sliders that can be styled as needed.
5050
* Pressing on the track moves the thumb to that position
5151
* Supports using the arrow keys, as well as page up/down, home, and end keys
5252
* Support for both horizontal and vertical orientations
53-
* Support for custom step values with handling for rounding errors
5453
* Support for disabling the color slider
5554
* Prevents text selection while dragging
5655
* Exposed to assistive technology as a `slider` element via ARIA
@@ -299,14 +298,6 @@ function Example() {
299298
}
300299
```
301300

302-
### Step
303-
304-
The `step` prop can be used to make a `ColorSlider` snap its value to specific increments.
305-
306-
```tsx example
307-
<ColorSlider channel="hue" defaultValue="hsl(0, 100%, 50%)" step={30} />
308-
```
309-
310301
### onChangeEnd
311302

312303
The `onChangeEnd` prop can be used to handle when a user stops dragging a color slider, whereas the `onChange`

packages/@react-aria/color/docs/useColorWheel.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ touch-friendly color wheels that can be styled as needed.
4848
* Multi-touch support
4949
* Pressing on the track moves the thumb to that position
5050
* Supports using the arrow keys, as well as page up/down, home, and end keys
51-
* Support for custom step values with handling for rounding errors
5251
* Support for disabling the color wheel
5352
* Prevents text selection while dragging
5453
* Exposed to assistive technology as a `slider` element via ARIA
@@ -179,14 +178,6 @@ function Example() {
179178
}
180179
```
181180

182-
### Step
183-
184-
The `step` prop can be used to make a `ColorWheel` snap its value to specific increments.
185-
186-
```tsx example
187-
<ColorWheel step={30} />
188-
```
189-
190181
### Disabled
191182

192183
A `ColorWheel` can be disabled using the `isDisabled` prop. This prevents the thumb from being focused or dragged.

packages/@react-spectrum/color/docs/ColorField.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,6 @@ the `id` of the labeling element instead.
9393
In order to internationalize a ColorField, a localized string should be passed to the `label` or `aria-label` prop.
9494
When the `necessityIndicator` prop is set to `"label"`, a localized string will be provided for `"(required)"` or `"(optional)"` automatically.
9595

96-
## Step values
97-
98-
The `step` prop can be used to increment or decrement the current `value` using up or down arrow keys. These increments
99-
are calculated from the current `value` or zero if the `value` is empty. A `step` can be set to any positive decimal,
100-
defaulting to `1` if unspecified.
101-
102-
```tsx example
103-
<ColorField label="Primary Color" step={16} />
104-
```
105-
10696
## Validation
10797

10898
ColorField can display a validation state to communicate to the user whether the current value is valid or invalid.

packages/@react-spectrum/color/docs/ColorSlider.mdx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,6 @@ or `aria-labelledby`, be sure to localize the string or labeling element appropr
9595
For languages that are read right-to-left (e.g. Hebrew and Arabic), the layout of the ColorSlider is automatically flipped. As mentioned previously,
9696
ColorSlider automatically uses the current locale to format the channel and value label.
9797

98-
## Step values
99-
100-
The `step` prop can be used to snap the ColorSlider's value to specific increments. Be sure to provide a number that makes sense for the range of the ColorSlider's channel
101-
(e.g. the "alpha" channel value ranges from 0 to 1 so the step should be less than 1).
102-
103-
```tsx example
104-
<Flex gap="size-300" wrap>
105-
<ColorSlider channel="hue" defaultValue="hsl(0, 100%, 50%)" step={10} />
106-
<ColorSlider channel="alpha" defaultValue="hsla(0, 100%, 50%, 0.5)" step={.05} />
107-
</Flex>
108-
```
109-
11098
## Events
11199

112100
ColorSlider supports two events: `onChange` and `onChangeEnd`. `onChange` is triggered whenever the ColorSlider's handle is dragged, and `onChangeEnd`

packages/@react-spectrum/color/docs/ColorWheel.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,6 @@ function Example() {
8282
By default, a localized string for the "hue" channel name is used as the `aria-label` for the ColorWheel. When a custom `aria-label` or `aria-labelledby`
8383
is provided, it should be localized accordingly.
8484

85-
## Step values
86-
87-
The `step` prop can be used to snap the ColorWheel's value to specific increments. The value provided should the number of degrees that each step should span,
88-
ranging from 0 to 360. Note that the steps are calculated starting from 0˚ and that the final step will always snap back to 0˚, regardless of how much
89-
remaining track distance there is from the step prior.
90-
91-
```tsx example
92-
<ColorWheel step={60} />
93-
```
94-
9585
## Events
9686

9787
ColorWheel supports two events: `onChange` and `onChangeEnd`. `onChange` is triggered whenever the ColorWheel's handle is dragged, and `onChangeEnd`

0 commit comments

Comments
 (0)