@react-aria/checkbox 3.0.0-nightly.1394 → 3.0.0-nightly.1395
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/dist/main.js +27 -27
- package/dist/module.js +25 -25
- package/package.json +8 -8
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
1
|
+
var $csc5b$react = require("react");
|
|
2
|
+
var $csc5b$reactariatoggle = require("@react-aria/toggle");
|
|
3
|
+
var $csc5b$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $csc5b$reactarialabel = require("@react-aria/label");
|
|
5
|
+
var $csc5b$reactstatelytoggle = require("@react-stately/toggle");
|
|
6
6
|
|
|
7
7
|
function $parcel$exportWildcard(dest, source) {
|
|
8
8
|
Object.keys(source).forEach(function(key) {
|
|
@@ -23,16 +23,16 @@ function $parcel$exportWildcard(dest, source) {
|
|
|
23
23
|
function $parcel$export(e, n, v, s) {
|
|
24
24
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
25
25
|
}
|
|
26
|
-
var $
|
|
26
|
+
var $8e3a8695775dae64$exports = {};
|
|
27
27
|
|
|
28
|
-
$parcel$export($
|
|
28
|
+
$parcel$export($8e3a8695775dae64$exports, "useCheckbox", () => $8e3a8695775dae64$export$e375f10ce42261c5);
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
function $
|
|
32
|
-
let { inputProps: inputProps } = $
|
|
31
|
+
function $8e3a8695775dae64$export$e375f10ce42261c5(props, state, inputRef) {
|
|
32
|
+
let { inputProps: inputProps } = $csc5b$reactariatoggle.useToggle(props, state, inputRef);
|
|
33
33
|
let { isSelected: isSelected } = state;
|
|
34
34
|
let { isIndeterminate: isIndeterminate } = props;
|
|
35
|
-
$
|
|
35
|
+
$csc5b$react.useEffect(()=>{
|
|
36
36
|
// indeterminate is a property, but it can only be set via javascript
|
|
37
37
|
// https://css-tricks.com/indeterminate-checkboxes/
|
|
38
38
|
if (inputRef.current) inputRef.current.indeterminate = isIndeterminate;
|
|
@@ -47,29 +47,29 @@ function $45ea48f7d2a02a44$export$e375f10ce42261c5(props, state, inputRef) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var $
|
|
50
|
+
var $236317cbe6d4d104$exports = {};
|
|
51
51
|
|
|
52
|
-
$parcel$export($
|
|
53
|
-
const $
|
|
52
|
+
$parcel$export($236317cbe6d4d104$exports, "useCheckboxGroup", () => $236317cbe6d4d104$export$49ff6f28c54f1cbe);
|
|
53
|
+
const $494dde44f66cf558$export$31440636951aa68c = new WeakMap();
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
function $
|
|
58
|
+
function $236317cbe6d4d104$export$49ff6f28c54f1cbe(props, state) {
|
|
59
59
|
let { isDisabled: isDisabled , name: name } = props;
|
|
60
|
-
let { labelProps: labelProps , fieldProps: fieldProps } = $
|
|
60
|
+
let { labelProps: labelProps , fieldProps: fieldProps } = $csc5b$reactarialabel.useLabel({
|
|
61
61
|
...props,
|
|
62
62
|
// Checkbox group is not an HTML input element so it
|
|
63
63
|
// shouldn't be labeled by a <label> element.
|
|
64
64
|
labelElementType: 'span'
|
|
65
65
|
});
|
|
66
|
-
let domProps = $
|
|
66
|
+
let domProps = $csc5b$reactariautils.filterDOMProps(props, {
|
|
67
67
|
labelable: true
|
|
68
68
|
});
|
|
69
69
|
// Pass name prop from group to all items by attaching to the state.
|
|
70
|
-
$
|
|
70
|
+
$494dde44f66cf558$export$31440636951aa68c.set(state, name);
|
|
71
71
|
return {
|
|
72
|
-
groupProps: $
|
|
72
|
+
groupProps: $csc5b$reactariautils.mergeProps(domProps, {
|
|
73
73
|
role: 'group',
|
|
74
74
|
'aria-disabled': isDisabled || undefined,
|
|
75
75
|
...fieldProps
|
|
@@ -79,14 +79,14 @@ function $0dbcbfe5db2c4514$export$49ff6f28c54f1cbe(props, state) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var $
|
|
82
|
+
var $40670ca1adde6ca2$exports = {};
|
|
83
83
|
|
|
84
|
-
$parcel$export($
|
|
84
|
+
$parcel$export($40670ca1adde6ca2$exports, "useCheckboxGroupItem", () => $40670ca1adde6ca2$export$353b32fc6898d37d);
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
function $
|
|
89
|
-
const toggleState = $
|
|
88
|
+
function $40670ca1adde6ca2$export$353b32fc6898d37d(props, state, inputRef) {
|
|
89
|
+
const toggleState = $csc5b$reactstatelytoggle.useToggleState({
|
|
90
90
|
isReadOnly: props.isReadOnly || state.isReadOnly,
|
|
91
91
|
isSelected: state.isSelected(props.value),
|
|
92
92
|
onChange (isSelected) {
|
|
@@ -95,11 +95,11 @@ function $2ac09ec27497f24e$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
95
95
|
if (props.onChange) props.onChange(isSelected);
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
|
-
let { inputProps: inputProps } = $
|
|
98
|
+
let { inputProps: inputProps } = $8e3a8695775dae64$export$e375f10ce42261c5({
|
|
99
99
|
...props,
|
|
100
100
|
isReadOnly: props.isReadOnly || state.isReadOnly,
|
|
101
101
|
isDisabled: props.isDisabled || state.isDisabled,
|
|
102
|
-
name: props.name || $
|
|
102
|
+
name: props.name || $494dde44f66cf558$export$31440636951aa68c.get(state)
|
|
103
103
|
}, toggleState, inputRef);
|
|
104
104
|
return {
|
|
105
105
|
inputProps: inputProps
|
|
@@ -107,9 +107,9 @@ function $2ac09ec27497f24e$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
$parcel$exportWildcard(module.exports, $
|
|
111
|
-
$parcel$exportWildcard(module.exports, $
|
|
112
|
-
$parcel$exportWildcard(module.exports, $
|
|
110
|
+
$parcel$exportWildcard(module.exports, $8e3a8695775dae64$exports);
|
|
111
|
+
$parcel$exportWildcard(module.exports, $236317cbe6d4d104$exports);
|
|
112
|
+
$parcel$exportWildcard(module.exports, $40670ca1adde6ca2$exports);
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
//# sourceMappingURL=main.js.map
|
package/dist/module.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {useEffect as $
|
|
2
|
-
import {useToggle as $
|
|
3
|
-
import {filterDOMProps as $
|
|
4
|
-
import {useLabel as $
|
|
5
|
-
import {useToggleState as $
|
|
1
|
+
import {useEffect as $lS2ep$useEffect} from "react";
|
|
2
|
+
import {useToggle as $lS2ep$useToggle} from "@react-aria/toggle";
|
|
3
|
+
import {filterDOMProps as $lS2ep$filterDOMProps, mergeProps as $lS2ep$mergeProps} from "@react-aria/utils";
|
|
4
|
+
import {useLabel as $lS2ep$useLabel} from "@react-aria/label";
|
|
5
|
+
import {useToggleState as $lS2ep$useToggleState} from "@react-stately/toggle";
|
|
6
6
|
|
|
7
7
|
function $parcel$export(e, n, v, s) {
|
|
8
8
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
9
9
|
}
|
|
10
|
-
var $
|
|
10
|
+
var $6fc5544ca1b3ab2a$exports = {};
|
|
11
11
|
|
|
12
|
-
$parcel$export($
|
|
12
|
+
$parcel$export($6fc5544ca1b3ab2a$exports, "useCheckbox", () => $6fc5544ca1b3ab2a$export$e375f10ce42261c5);
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
function $
|
|
16
|
-
let { inputProps: inputProps } = $
|
|
15
|
+
function $6fc5544ca1b3ab2a$export$e375f10ce42261c5(props, state, inputRef) {
|
|
16
|
+
let { inputProps: inputProps } = $lS2ep$useToggle(props, state, inputRef);
|
|
17
17
|
let { isSelected: isSelected } = state;
|
|
18
18
|
let { isIndeterminate: isIndeterminate } = props;
|
|
19
|
-
$
|
|
19
|
+
$lS2ep$useEffect(()=>{
|
|
20
20
|
// indeterminate is a property, but it can only be set via javascript
|
|
21
21
|
// https://css-tricks.com/indeterminate-checkboxes/
|
|
22
22
|
if (inputRef.current) inputRef.current.indeterminate = isIndeterminate;
|
|
@@ -31,29 +31,29 @@ function $b43ef52523c593df$export$e375f10ce42261c5(props, state, inputRef) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var $
|
|
34
|
+
var $9c576869c2451f7f$exports = {};
|
|
35
35
|
|
|
36
|
-
$parcel$export($
|
|
37
|
-
const $
|
|
36
|
+
$parcel$export($9c576869c2451f7f$exports, "useCheckboxGroup", () => $9c576869c2451f7f$export$49ff6f28c54f1cbe);
|
|
37
|
+
const $46cd8c3ac90d2083$export$31440636951aa68c = new WeakMap();
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
function $
|
|
42
|
+
function $9c576869c2451f7f$export$49ff6f28c54f1cbe(props, state) {
|
|
43
43
|
let { isDisabled: isDisabled , name: name } = props;
|
|
44
|
-
let { labelProps: labelProps , fieldProps: fieldProps } = $
|
|
44
|
+
let { labelProps: labelProps , fieldProps: fieldProps } = $lS2ep$useLabel({
|
|
45
45
|
...props,
|
|
46
46
|
// Checkbox group is not an HTML input element so it
|
|
47
47
|
// shouldn't be labeled by a <label> element.
|
|
48
48
|
labelElementType: 'span'
|
|
49
49
|
});
|
|
50
|
-
let domProps = $
|
|
50
|
+
let domProps = $lS2ep$filterDOMProps(props, {
|
|
51
51
|
labelable: true
|
|
52
52
|
});
|
|
53
53
|
// Pass name prop from group to all items by attaching to the state.
|
|
54
|
-
$
|
|
54
|
+
$46cd8c3ac90d2083$export$31440636951aa68c.set(state, name);
|
|
55
55
|
return {
|
|
56
|
-
groupProps: $
|
|
56
|
+
groupProps: $lS2ep$mergeProps(domProps, {
|
|
57
57
|
role: 'group',
|
|
58
58
|
'aria-disabled': isDisabled || undefined,
|
|
59
59
|
...fieldProps
|
|
@@ -63,14 +63,14 @@ function $31d7fd3a45e5ec5a$export$49ff6f28c54f1cbe(props, state) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var $
|
|
66
|
+
var $1e517f900339691c$exports = {};
|
|
67
67
|
|
|
68
|
-
$parcel$export($
|
|
68
|
+
$parcel$export($1e517f900339691c$exports, "useCheckboxGroupItem", () => $1e517f900339691c$export$353b32fc6898d37d);
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
function $
|
|
73
|
-
const toggleState = $
|
|
72
|
+
function $1e517f900339691c$export$353b32fc6898d37d(props, state, inputRef) {
|
|
73
|
+
const toggleState = $lS2ep$useToggleState({
|
|
74
74
|
isReadOnly: props.isReadOnly || state.isReadOnly,
|
|
75
75
|
isSelected: state.isSelected(props.value),
|
|
76
76
|
onChange (isSelected) {
|
|
@@ -79,11 +79,11 @@ function $b4d28502af047866$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
79
79
|
if (props.onChange) props.onChange(isSelected);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
let { inputProps: inputProps } = $
|
|
82
|
+
let { inputProps: inputProps } = $6fc5544ca1b3ab2a$export$e375f10ce42261c5({
|
|
83
83
|
...props,
|
|
84
84
|
isReadOnly: props.isReadOnly || state.isReadOnly,
|
|
85
85
|
isDisabled: props.isDisabled || state.isDisabled,
|
|
86
|
-
name: props.name || $
|
|
86
|
+
name: props.name || $46cd8c3ac90d2083$export$31440636951aa68c.get(state)
|
|
87
87
|
}, toggleState, inputRef);
|
|
88
88
|
return {
|
|
89
89
|
inputProps: inputProps
|
|
@@ -93,5 +93,5 @@ function $b4d28502af047866$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
export {$
|
|
96
|
+
export {$6fc5544ca1b3ab2a$export$e375f10ce42261c5 as useCheckbox, $9c576869c2451f7f$export$49ff6f28c54f1cbe as useCheckboxGroup, $1e517f900339691c$export$353b32fc6898d37d as useCheckboxGroupItem};
|
|
97
97
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/checkbox",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1395+b2abc5d94",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.6.2",
|
|
21
|
-
"@react-aria/label": "3.0.0-nightly.
|
|
22
|
-
"@react-aria/toggle": "3.0.0-nightly.
|
|
23
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
24
|
-
"@react-stately/checkbox": "3.0.4-nightly.
|
|
25
|
-
"@react-stately/toggle": "3.0.0-nightly.
|
|
26
|
-
"@react-types/checkbox": "3.0.0-nightly.
|
|
21
|
+
"@react-aria/label": "3.0.0-nightly.1395+b2abc5d94",
|
|
22
|
+
"@react-aria/toggle": "3.0.0-nightly.1395+b2abc5d94",
|
|
23
|
+
"@react-aria/utils": "3.0.0-nightly.1395+b2abc5d94",
|
|
24
|
+
"@react-stately/checkbox": "3.0.4-nightly.3086+b2abc5d94",
|
|
25
|
+
"@react-stately/toggle": "3.0.0-nightly.1395+b2abc5d94",
|
|
26
|
+
"@react-types/checkbox": "3.0.0-nightly.1395+b2abc5d94"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "b2abc5d94162a7bd614fffcdf11e3d3754dc7d9f"
|
|
35
35
|
}
|