@react-types/shared 3.27.0 → 3.29.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/package.json +2 -2
- package/src/collections.d.ts +4 -1
- package/src/events.d.ts +9 -1
- package/src/style.d.ts +3 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/shared",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
|
|
18
18
|
}
|
package/src/collections.d.ts
CHANGED
|
@@ -180,7 +180,10 @@ export interface Collection<T> extends Iterable<T> {
|
|
|
180
180
|
getChildren?(key: Key): Iterable<T>,
|
|
181
181
|
|
|
182
182
|
/** Returns a string representation of the item's contents. */
|
|
183
|
-
getTextValue?(key: Key): string
|
|
183
|
+
getTextValue?(key: Key): string,
|
|
184
|
+
|
|
185
|
+
/** Filters the collection using the given function. */
|
|
186
|
+
UNSTABLE_filter?(filterFn: (nodeValue: string) => boolean): Collection<T>
|
|
184
187
|
}
|
|
185
188
|
|
|
186
189
|
export interface Node<T> {
|
package/src/events.d.ts
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import {FocusableElement} from './dom';
|
|
13
14
|
import {
|
|
14
15
|
FocusEvent,
|
|
16
|
+
MouseEvent,
|
|
15
17
|
KeyboardEvent as ReactKeyboardEvent,
|
|
16
18
|
SyntheticEvent
|
|
17
19
|
} from 'react';
|
|
@@ -112,7 +114,13 @@ export interface PressEvents {
|
|
|
112
114
|
* Handler that is called when a press is released over the target, regardless of
|
|
113
115
|
* whether it started on the target or not.
|
|
114
116
|
*/
|
|
115
|
-
onPressUp?: (e: PressEvent) => void
|
|
117
|
+
onPressUp?: (e: PressEvent) => void,
|
|
118
|
+
/**
|
|
119
|
+
* **Not recommended – use `onPress` instead.** `onClick` is an alias for `onPress`
|
|
120
|
+
* provided for compatibility with other libraries. `onPress` provides
|
|
121
|
+
* additional event details for non-mouse interactions.
|
|
122
|
+
*/
|
|
123
|
+
onClick?: (e: MouseEvent<FocusableElement>) => void
|
|
116
124
|
}
|
|
117
125
|
|
|
118
126
|
export interface FocusableProps<Target = Element> extends FocusEvents<Target>, KeyboardEvents {
|
package/src/style.d.ts
CHANGED
|
@@ -209,20 +209,11 @@ export interface ViewStyleProps<C extends ColorVersion> extends StyleProps {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
export interface BoxAlignmentStyleProps {
|
|
212
|
-
/**
|
|
213
|
-
* The distribution of space around items along the main axis. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content).
|
|
214
|
-
* @default 'stretch'
|
|
215
|
-
*/
|
|
212
|
+
/** The distribution of space around items along the main axis. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content). */
|
|
216
213
|
justifyContent?: Responsive<'start' | 'end' | 'center' | 'left' | 'right' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | 'baseline' | 'first baseline' | 'last baseline' | 'safe center' | 'unsafe center'>,
|
|
217
|
-
/**
|
|
218
|
-
* The distribution of space around child items along the cross axis. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content).
|
|
219
|
-
* @default 'start'
|
|
220
|
-
*/
|
|
214
|
+
/** The distribution of space around child items along the cross axis. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content).*/
|
|
221
215
|
alignContent?: Responsive<'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | 'baseline' | 'first baseline' | 'last baseline' | 'safe center' | 'unsafe center'>,
|
|
222
|
-
/**
|
|
223
|
-
* The alignment of children within their container. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items).
|
|
224
|
-
* @default 'stretch'
|
|
225
|
-
*/
|
|
216
|
+
/** The alignment of children within their container. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items). */
|
|
226
217
|
alignItems?: Responsive<'start' | 'end' | 'center' | 'stretch' | 'self-start' | 'self-end' | 'baseline' | 'first baseline' | 'last baseline' | 'safe center' | 'unsafe center'>,
|
|
227
218
|
/** The space to display between both rows and columns. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/gap). */
|
|
228
219
|
gap?: Responsive<DimensionValue>,
|