@react-spectrum/button 3.10.0 → 3.11.1
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.css +1 -1
- package/dist/main.js +232 -180
- package/dist/main.js.map +1 -1
- package/dist/module.js +232 -180
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/Button.tsx +10 -11
package/dist/main.js
CHANGED
@@ -24,7 +24,28 @@ $parcel$export(module.exports, "FieldButton", () => $5931ec1ea1ec1b0d$export$47d
|
|
24
24
|
$parcel$export(module.exports, "LogicButton", () => $3bd294eda342b0c4$export$9b0b80fed00ba8b1);
|
25
25
|
$parcel$export(module.exports, "ClearButton", () => $9c84a434f1c9da63$export$13ec83e50bf04290);
|
26
26
|
$parcel$export(module.exports, "ToggleButton", () => $b5c927da7d8f1be6$export$d2b052e7b4be1756);
|
27
|
-
|
27
|
+
/*
|
28
|
+
* Copyright 2020 Adobe. All rights reserved.
|
29
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
30
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
31
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
32
|
+
*
|
33
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
34
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
35
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
36
|
+
* governing permissions and limitations under the License.
|
37
|
+
*/ /// <reference types="css-module-types" />
|
38
|
+
/*
|
39
|
+
* Copyright 2020 Adobe. All rights reserved.
|
40
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
41
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
42
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
43
|
+
*
|
44
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
45
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
46
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
47
|
+
* governing permissions and limitations under the License.
|
48
|
+
*/
|
28
49
|
|
29
50
|
|
30
51
|
|
@@ -36,9 +57,8 @@ $parcel$export($afc5a4514aca2340$exports, "spectrum-LogicButton", () => $afc5a45
|
|
36
57
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-FieldButton", () => $afc5a4514aca2340$export$a024c99ecf6b5741, (v) => $afc5a4514aca2340$export$a024c99ecf6b5741 = v);
|
37
58
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-ClearButton", () => $afc5a4514aca2340$export$b752ce409e5660c, (v) => $afc5a4514aca2340$export$b752ce409e5660c = v);
|
38
59
|
$parcel$export($afc5a4514aca2340$exports, "focus-ring", () => $afc5a4514aca2340$export$f39a09f249340e2a, (v) => $afc5a4514aca2340$export$f39a09f249340e2a = v);
|
60
|
+
$parcel$export($afc5a4514aca2340$exports, "spectrum-FieldButton--quiet", () => $afc5a4514aca2340$export$5ca7b274e4fff9fc, (v) => $afc5a4514aca2340$export$5ca7b274e4fff9fc = v);
|
39
61
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-Icon", () => $afc5a4514aca2340$export$d374b04f30360026, (v) => $afc5a4514aca2340$export$d374b04f30360026 = v);
|
40
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--emphasized", () => $afc5a4514aca2340$export$5aabb61a966e266f, (v) => $afc5a4514aca2340$export$5aabb61a966e266f = v);
|
41
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--staticColor", () => $afc5a4514aca2340$export$29b7b5d6a5a497c5, (v) => $afc5a4514aca2340$export$29b7b5d6a5a497c5 = v);
|
42
62
|
$parcel$export($afc5a4514aca2340$exports, "is-hovered", () => $afc5a4514aca2340$export$b8813cd5d7824ce7, (v) => $afc5a4514aca2340$export$b8813cd5d7824ce7 = v);
|
43
63
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button-label", () => $afc5a4514aca2340$export$c081ba562e204942, (v) => $afc5a4514aca2340$export$c081ba562e204942 = v);
|
44
64
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--iconOnly", () => $afc5a4514aca2340$export$c1d306ec0fae3838, (v) => $afc5a4514aca2340$export$c1d306ec0fae3838 = v);
|
@@ -47,33 +67,27 @@ $parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton-hold", () => $a
|
|
47
67
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--quiet", () => $afc5a4514aca2340$export$40e1f009544bacf3, (v) => $afc5a4514aca2340$export$40e1f009544bacf3 = v);
|
48
68
|
$parcel$export($afc5a4514aca2340$exports, "is-disabled", () => $afc5a4514aca2340$export$d35bc1e505d1ebbf, (v) => $afc5a4514aca2340$export$d35bc1e505d1ebbf = v);
|
49
69
|
$parcel$export($afc5a4514aca2340$exports, "is-open", () => $afc5a4514aca2340$export$a9781837241c946d, (v) => $afc5a4514aca2340$export$a9781837241c946d = v);
|
50
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-FieldButton--quiet", () => $afc5a4514aca2340$export$5ca7b274e4fff9fc, (v) => $afc5a4514aca2340$export$5ca7b274e4fff9fc = v);
|
51
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-ClearButton--overBackground", () => $afc5a4514aca2340$export$116f2fccf941d34d, (v) => $afc5a4514aca2340$export$116f2fccf941d34d = v);
|
52
70
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-ClearButton--small", () => $afc5a4514aca2340$export$49280ffa5236ba8b, (v) => $afc5a4514aca2340$export$49280ffa5236ba8b = v);
|
53
|
-
$parcel$export($afc5a4514aca2340$exports, "is-focused", () => $afc5a4514aca2340$export$e7dc768d35940237, (v) => $afc5a4514aca2340$export$e7dc768d35940237 = v);
|
54
71
|
$parcel$export($afc5a4514aca2340$exports, "is-active", () => $afc5a4514aca2340$export$20fd0f7cd4e6112f, (v) => $afc5a4514aca2340$export$20fd0f7cd4e6112f = v);
|
55
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--cta", () => $afc5a4514aca2340$export$b818fdf0052a2cab, (v) => $afc5a4514aca2340$export$b818fdf0052a2cab = v);
|
56
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--primary", () => $afc5a4514aca2340$export$c1c3511f5e96e926, (v) => $afc5a4514aca2340$export$c1c3511f5e96e926 = v);
|
57
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--secondary", () => $afc5a4514aca2340$export$4f1b75526afd8ff3, (v) => $afc5a4514aca2340$export$4f1b75526afd8ff3 = v);
|
58
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--warning", () => $afc5a4514aca2340$export$6f97cef817ff1cac, (v) => $afc5a4514aca2340$export$6f97cef817ff1cac = v);
|
59
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--overBackground", () => $afc5a4514aca2340$export$5cda1128f9112d2e, (v) => $afc5a4514aca2340$export$5cda1128f9112d2e = v);
|
60
|
-
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--quiet", () => $afc5a4514aca2340$export$25f049c049371040, (v) => $afc5a4514aca2340$export$25f049c049371040 = v);
|
61
72
|
$parcel$export($afc5a4514aca2340$exports, "is-selected", () => $afc5a4514aca2340$export$1e0fb04f31d3c22a, (v) => $afc5a4514aca2340$export$1e0fb04f31d3c22a = v);
|
73
|
+
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--emphasized", () => $afc5a4514aca2340$export$5aabb61a966e266f, (v) => $afc5a4514aca2340$export$5aabb61a966e266f = v);
|
62
74
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--staticWhite", () => $afc5a4514aca2340$export$ccc536e1adbdc059, (v) => $afc5a4514aca2340$export$ccc536e1adbdc059 = v);
|
63
75
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--staticBlack", () => $afc5a4514aca2340$export$8f7c9db66978d20f, (v) => $afc5a4514aca2340$export$8f7c9db66978d20f = v);
|
76
|
+
$parcel$export($afc5a4514aca2340$exports, "spectrum-ActionButton--staticColor", () => $afc5a4514aca2340$export$29b7b5d6a5a497c5, (v) => $afc5a4514aca2340$export$29b7b5d6a5a497c5 = v);
|
64
77
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-LogicButton--and", () => $afc5a4514aca2340$export$e52daab43a62c528, (v) => $afc5a4514aca2340$export$e52daab43a62c528 = v);
|
65
78
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-LogicButton--or", () => $afc5a4514aca2340$export$da76be6126aaa633, (v) => $afc5a4514aca2340$export$da76be6126aaa633 = v);
|
79
|
+
$parcel$export($afc5a4514aca2340$exports, "is-focused", () => $afc5a4514aca2340$export$e7dc768d35940237, (v) => $afc5a4514aca2340$export$e7dc768d35940237 = v);
|
66
80
|
$parcel$export($afc5a4514aca2340$exports, "is-placeholder", () => $afc5a4514aca2340$export$e5b2f5233e4e5194, (v) => $afc5a4514aca2340$export$e5b2f5233e4e5194 = v);
|
67
81
|
$parcel$export($afc5a4514aca2340$exports, "spectrum-FieldButton--invalid", () => $afc5a4514aca2340$export$c9f503f672e8a3c1, (v) => $afc5a4514aca2340$export$c9f503f672e8a3c1 = v);
|
82
|
+
$parcel$export($afc5a4514aca2340$exports, "spectrum-Button--overBackground", () => $afc5a4514aca2340$export$5cda1128f9112d2e, (v) => $afc5a4514aca2340$export$5cda1128f9112d2e = v);
|
68
83
|
var $afc5a4514aca2340$export$1db4cca5b4ade39a;
|
69
84
|
var $afc5a4514aca2340$export$53da69f51b770d3;
|
70
85
|
var $afc5a4514aca2340$export$36ae67a131730482;
|
71
86
|
var $afc5a4514aca2340$export$a024c99ecf6b5741;
|
72
87
|
var $afc5a4514aca2340$export$b752ce409e5660c;
|
73
88
|
var $afc5a4514aca2340$export$f39a09f249340e2a;
|
89
|
+
var $afc5a4514aca2340$export$5ca7b274e4fff9fc;
|
74
90
|
var $afc5a4514aca2340$export$d374b04f30360026;
|
75
|
-
var $afc5a4514aca2340$export$5aabb61a966e266f;
|
76
|
-
var $afc5a4514aca2340$export$29b7b5d6a5a497c5;
|
77
91
|
var $afc5a4514aca2340$export$b8813cd5d7824ce7;
|
78
92
|
var $afc5a4514aca2340$export$c081ba562e204942;
|
79
93
|
var $afc5a4514aca2340$export$c1d306ec0fae3838;
|
@@ -82,33 +96,27 @@ var $afc5a4514aca2340$export$4a4f01c443eff992;
|
|
82
96
|
var $afc5a4514aca2340$export$40e1f009544bacf3;
|
83
97
|
var $afc5a4514aca2340$export$d35bc1e505d1ebbf;
|
84
98
|
var $afc5a4514aca2340$export$a9781837241c946d;
|
85
|
-
var $afc5a4514aca2340$export$5ca7b274e4fff9fc;
|
86
|
-
var $afc5a4514aca2340$export$116f2fccf941d34d;
|
87
99
|
var $afc5a4514aca2340$export$49280ffa5236ba8b;
|
88
|
-
var $afc5a4514aca2340$export$e7dc768d35940237;
|
89
100
|
var $afc5a4514aca2340$export$20fd0f7cd4e6112f;
|
90
|
-
var $afc5a4514aca2340$export$b818fdf0052a2cab;
|
91
|
-
var $afc5a4514aca2340$export$c1c3511f5e96e926;
|
92
|
-
var $afc5a4514aca2340$export$4f1b75526afd8ff3;
|
93
|
-
var $afc5a4514aca2340$export$6f97cef817ff1cac;
|
94
|
-
var $afc5a4514aca2340$export$5cda1128f9112d2e;
|
95
|
-
var $afc5a4514aca2340$export$25f049c049371040;
|
96
101
|
var $afc5a4514aca2340$export$1e0fb04f31d3c22a;
|
102
|
+
var $afc5a4514aca2340$export$5aabb61a966e266f;
|
97
103
|
var $afc5a4514aca2340$export$ccc536e1adbdc059;
|
98
104
|
var $afc5a4514aca2340$export$8f7c9db66978d20f;
|
105
|
+
var $afc5a4514aca2340$export$29b7b5d6a5a497c5;
|
99
106
|
var $afc5a4514aca2340$export$e52daab43a62c528;
|
100
107
|
var $afc5a4514aca2340$export$da76be6126aaa633;
|
108
|
+
var $afc5a4514aca2340$export$e7dc768d35940237;
|
101
109
|
var $afc5a4514aca2340$export$e5b2f5233e4e5194;
|
102
110
|
var $afc5a4514aca2340$export$c9f503f672e8a3c1;
|
111
|
+
var $afc5a4514aca2340$export$5cda1128f9112d2e;
|
103
112
|
$afc5a4514aca2340$export$1db4cca5b4ade39a = "spectrum-Button_e2d99e";
|
104
113
|
$afc5a4514aca2340$export$53da69f51b770d3 = "spectrum-ActionButton_e2d99e";
|
105
114
|
$afc5a4514aca2340$export$36ae67a131730482 = "spectrum-LogicButton_e2d99e";
|
106
115
|
$afc5a4514aca2340$export$a024c99ecf6b5741 = "spectrum-FieldButton_e2d99e";
|
107
116
|
$afc5a4514aca2340$export$b752ce409e5660c = "spectrum-ClearButton_e2d99e";
|
108
117
|
$afc5a4514aca2340$export$f39a09f249340e2a = "focus-ring_e2d99e";
|
118
|
+
$afc5a4514aca2340$export$5ca7b274e4fff9fc = "spectrum-FieldButton--quiet_e2d99e";
|
109
119
|
$afc5a4514aca2340$export$d374b04f30360026 = "spectrum-Icon_e2d99e";
|
110
|
-
$afc5a4514aca2340$export$5aabb61a966e266f = "spectrum-ActionButton--emphasized_e2d99e";
|
111
|
-
$afc5a4514aca2340$export$29b7b5d6a5a497c5 = "spectrum-ActionButton--staticColor_e2d99e";
|
112
120
|
$afc5a4514aca2340$export$b8813cd5d7824ce7 = "is-hovered_e2d99e";
|
113
121
|
$afc5a4514aca2340$export$c081ba562e204942 = "spectrum-Button-label_e2d99e";
|
114
122
|
$afc5a4514aca2340$export$c1d306ec0fae3838 = "spectrum-Button--iconOnly_e2d99e";
|
@@ -117,82 +125,88 @@ $afc5a4514aca2340$export$4a4f01c443eff992 = "spectrum-ActionButton-hold_e2d99e";
|
|
117
125
|
$afc5a4514aca2340$export$40e1f009544bacf3 = "spectrum-ActionButton--quiet_e2d99e";
|
118
126
|
$afc5a4514aca2340$export$d35bc1e505d1ebbf = "is-disabled_e2d99e";
|
119
127
|
$afc5a4514aca2340$export$a9781837241c946d = "is-open_e2d99e";
|
120
|
-
$afc5a4514aca2340$export$5ca7b274e4fff9fc = "spectrum-FieldButton--quiet_e2d99e";
|
121
|
-
$afc5a4514aca2340$export$116f2fccf941d34d = "spectrum-ClearButton--overBackground_e2d99e";
|
122
128
|
$afc5a4514aca2340$export$49280ffa5236ba8b = "spectrum-ClearButton--small_e2d99e";
|
123
|
-
$afc5a4514aca2340$export$e7dc768d35940237 = "is-focused_e2d99e";
|
124
129
|
$afc5a4514aca2340$export$20fd0f7cd4e6112f = "is-active_e2d99e";
|
125
|
-
$afc5a4514aca2340$export$b818fdf0052a2cab = "spectrum-Button--cta_e2d99e";
|
126
|
-
$afc5a4514aca2340$export$c1c3511f5e96e926 = "spectrum-Button--primary_e2d99e";
|
127
|
-
$afc5a4514aca2340$export$4f1b75526afd8ff3 = "spectrum-Button--secondary_e2d99e";
|
128
|
-
$afc5a4514aca2340$export$6f97cef817ff1cac = "spectrum-Button--warning_e2d99e";
|
129
|
-
$afc5a4514aca2340$export$5cda1128f9112d2e = "spectrum-Button--overBackground_e2d99e";
|
130
|
-
$afc5a4514aca2340$export$25f049c049371040 = "spectrum-Button--quiet_e2d99e";
|
131
130
|
$afc5a4514aca2340$export$1e0fb04f31d3c22a = "is-selected_e2d99e";
|
131
|
+
$afc5a4514aca2340$export$5aabb61a966e266f = "spectrum-ActionButton--emphasized_e2d99e";
|
132
132
|
$afc5a4514aca2340$export$ccc536e1adbdc059 = "spectrum-ActionButton--staticWhite_e2d99e";
|
133
133
|
$afc5a4514aca2340$export$8f7c9db66978d20f = "spectrum-ActionButton--staticBlack_e2d99e";
|
134
|
+
$afc5a4514aca2340$export$29b7b5d6a5a497c5 = "spectrum-ActionButton--staticColor_e2d99e";
|
134
135
|
$afc5a4514aca2340$export$e52daab43a62c528 = "spectrum-LogicButton--and_e2d99e";
|
135
136
|
$afc5a4514aca2340$export$da76be6126aaa633 = "spectrum-LogicButton--or_e2d99e";
|
137
|
+
$afc5a4514aca2340$export$e7dc768d35940237 = "is-focused_e2d99e";
|
136
138
|
$afc5a4514aca2340$export$e5b2f5233e4e5194 = "is-placeholder_e2d99e";
|
137
139
|
$afc5a4514aca2340$export$c9f503f672e8a3c1 = "spectrum-FieldButton--invalid_e2d99e";
|
140
|
+
$afc5a4514aca2340$export$5cda1128f9112d2e = "spectrum-Button--overBackground_e2d99e";
|
138
141
|
|
139
142
|
|
140
143
|
|
141
144
|
|
142
145
|
|
143
146
|
|
144
|
-
// todo: CSS hasn't caught up yet, map
|
145
|
-
let $842a195ed1671b15$var$VARIANT_MAPPING = {
|
146
|
-
negative: 'warning'
|
147
|
-
};
|
148
147
|
function $842a195ed1671b15$var$Button(props, ref) {
|
149
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
150
|
-
props = $IPaYO$reactspectrumutils.useSlotProps(props,
|
151
|
-
let { elementType: ElementType =
|
152
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
153
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
154
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
148
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
149
|
+
props = (0, $IPaYO$reactspectrumutils.useSlotProps)(props, "button");
|
150
|
+
let { elementType: ElementType = "button" , children: children , variant: variant , style: style = variant === "accent" || variant === "cta" ? "fill" : "outline" , staticColor: staticColor , isDisabled: isDisabled , autoFocus: autoFocus , ...otherProps } = props;
|
151
|
+
let domRef = (0, $IPaYO$reactspectrumutils.useFocusableRef)(ref);
|
152
|
+
let { buttonProps: buttonProps , isPressed: isPressed } = (0, $IPaYO$reactariabutton.useButton)(props, domRef);
|
153
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
155
154
|
isDisabled: isDisabled
|
156
155
|
});
|
157
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
158
|
-
let hasLabel = $IPaYO$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))[
|
159
|
-
let hasIcon = $IPaYO$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))[
|
160
|
-
|
161
|
-
if (
|
162
|
-
|
163
|
-
|
156
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
157
|
+
let hasLabel = (0, $IPaYO$reactspectrumutils.useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)))["spectrum-Button-label"]}`, domRef);
|
158
|
+
let hasIcon = (0, $IPaYO$reactspectrumutils.useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)))["spectrum-Icon"]}`, domRef);
|
159
|
+
if (variant === "cta") variant = "accent";
|
160
|
+
else if (variant === "overBackground") {
|
161
|
+
variant = "primary";
|
162
|
+
staticColor = "white";
|
163
|
+
}
|
164
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactariafocus.FocusRing), {
|
165
|
+
focusRingClass: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring"),
|
164
166
|
autoFocus: autoFocus
|
165
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(ElementType, {
|
167
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement(ElementType, {
|
166
168
|
...styleProps,
|
167
|
-
|
169
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
168
170
|
ref: domRef,
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
171
|
+
"data-variant": variant,
|
172
|
+
"data-style": style,
|
173
|
+
"data-static-color": staticColor || undefined,
|
174
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Button", {
|
175
|
+
"spectrum-Button--iconOnly": hasIcon && !hasLabel,
|
176
|
+
"is-disabled": isDisabled,
|
177
|
+
"is-active": isPressed,
|
178
|
+
"is-hovered": isHovered
|
175
179
|
}, styleProps.className)
|
176
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
180
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
177
181
|
slots: {
|
178
182
|
icon: {
|
179
|
-
size:
|
180
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
183
|
+
size: "S",
|
184
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Icon")
|
181
185
|
},
|
182
186
|
text: {
|
183
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
187
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Button-label")
|
184
188
|
}
|
185
189
|
}
|
186
|
-
}, typeof children ===
|
190
|
+
}, typeof children === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumtext.Text), null, children) : children)));
|
187
191
|
}
|
188
192
|
/**
|
189
193
|
* Buttons allow users to perform an action or to navigate to another page.
|
190
194
|
* They have multiple styles for various needs, and are ideal for calling attention to
|
191
195
|
* where a user needs to do something in order to move forward in a flow.
|
192
|
-
*/ let $842a195ed1671b15$export$353f5b6fc5456de1 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($842a195ed1671b15$var$Button);
|
193
|
-
|
196
|
+
*/ let $842a195ed1671b15$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($842a195ed1671b15$var$Button);
|
194
197
|
|
195
198
|
|
199
|
+
/*
|
200
|
+
* Copyright 2020 Adobe. All rights reserved.
|
201
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
202
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
203
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
204
|
+
*
|
205
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
206
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
207
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
208
|
+
* governing permissions and limitations under the License.
|
209
|
+
*/
|
196
210
|
|
197
211
|
|
198
212
|
|
@@ -203,55 +217,64 @@ function $842a195ed1671b15$var$Button(props, ref) {
|
|
203
217
|
|
204
218
|
|
205
219
|
function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
|
206
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
207
|
-
props = $IPaYO$reactspectrumutils.useSlotProps(props,
|
220
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
221
|
+
props = (0, $IPaYO$reactspectrumutils.useSlotProps)(props, "actionButton");
|
208
222
|
let { isQuiet: isQuiet , isDisabled: isDisabled , staticColor: staticColor , children: children , autoFocus: autoFocus , holdAffordance: // @ts-ignore (private)
|
209
223
|
holdAffordance , ...otherProps } = props;
|
210
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
211
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
212
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
224
|
+
let domRef = (0, $IPaYO$reactspectrumutils.useFocusableRef)(ref);
|
225
|
+
let { buttonProps: buttonProps , isPressed: isPressed } = (0, $IPaYO$reactariabutton.useButton)(props, domRef);
|
226
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
213
227
|
isDisabled: isDisabled
|
214
228
|
});
|
215
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
216
|
-
let isTextOnly = ($parcel$interopDefault($IPaYO$react)).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).isValidElement(c)
|
217
|
-
)
|
218
|
-
|
219
|
-
focusRingClass: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)), 'focus-ring'),
|
229
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
230
|
+
let isTextOnly = (0, ($parcel$interopDefault($IPaYO$react))).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).isValidElement(c));
|
231
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactariafocus.FocusRing), {
|
232
|
+
focusRingClass: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring"),
|
220
233
|
autoFocus: autoFocus
|
221
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
234
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
222
235
|
...styleProps,
|
223
|
-
|
236
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
224
237
|
ref: domRef,
|
225
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
238
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton", {
|
239
|
+
"spectrum-ActionButton--quiet": isQuiet,
|
240
|
+
"spectrum-ActionButton--staticColor": !!staticColor,
|
241
|
+
"spectrum-ActionButton--staticWhite": staticColor === "white",
|
242
|
+
"spectrum-ActionButton--staticBlack": staticColor === "black",
|
243
|
+
"is-active": isPressed,
|
244
|
+
"is-disabled": isDisabled,
|
245
|
+
"is-hovered": isHovered
|
233
246
|
}, styleProps.className)
|
234
|
-
}, holdAffordance && /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(($parcel$interopDefault($IPaYO$spectrumiconsuiCornerTriangle)), {
|
235
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
236
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
247
|
+
}, holdAffordance && /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, ($parcel$interopDefault($IPaYO$spectrumiconsuiCornerTriangle))), {
|
248
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton-hold")
|
249
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
237
250
|
slots: {
|
238
251
|
icon: {
|
239
|
-
size:
|
240
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
252
|
+
size: "S",
|
253
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Icon")
|
241
254
|
},
|
242
255
|
text: {
|
243
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
256
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton-label")
|
244
257
|
}
|
245
258
|
}
|
246
|
-
}, typeof children ===
|
259
|
+
}, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumtext.Text), null, children) : children)));
|
247
260
|
}
|
248
261
|
/**
|
249
262
|
* ActionButtons allow users to perform an action.
|
250
263
|
* They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.
|
251
|
-
*/ let $65dbde0e8e7aba71$export$cfc7921d29ef7b80 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($65dbde0e8e7aba71$var$ActionButton);
|
252
|
-
|
264
|
+
*/ let $65dbde0e8e7aba71$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($65dbde0e8e7aba71$var$ActionButton);
|
253
265
|
|
254
266
|
|
267
|
+
/*
|
268
|
+
* Copyright 2020 Adobe. All rights reserved.
|
269
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
270
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
271
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
272
|
+
*
|
273
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
274
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
275
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
276
|
+
* governing permissions and limitations under the License.
|
277
|
+
*/
|
255
278
|
|
256
279
|
|
257
280
|
|
@@ -260,40 +283,50 @@ function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
|
|
260
283
|
|
261
284
|
// @private
|
262
285
|
function $5931ec1ea1ec1b0d$var$FieldButton(props, ref) {
|
263
|
-
props = $IPaYO$reactspectrumutils.useSlotProps(props,
|
286
|
+
props = (0, $IPaYO$reactspectrumutils.useSlotProps)(props, "button");
|
264
287
|
let { isQuiet: isQuiet , isDisabled: isDisabled , validationState: validationState , children: children , autoFocus: autoFocus , isActive: isActive , focusRingClass: focusRingClass , ...otherProps } = props;
|
265
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
266
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
267
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
288
|
+
let domRef = (0, $IPaYO$reactspectrumutils.useFocusableRef)(ref);
|
289
|
+
let { buttonProps: buttonProps , isPressed: isPressed } = (0, $IPaYO$reactariabutton.useButton)(props, domRef);
|
290
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
268
291
|
isDisabled: isDisabled
|
269
292
|
});
|
270
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
271
|
-
return
|
272
|
-
focusRingClass: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
293
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
294
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactariafocus.FocusRing), {
|
295
|
+
focusRingClass: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring", focusRingClass),
|
273
296
|
autoFocus: autoFocus
|
274
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
275
|
-
|
297
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
298
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
276
299
|
ref: domRef,
|
277
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
300
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-FieldButton", {
|
301
|
+
"spectrum-FieldButton--quiet": isQuiet,
|
302
|
+
"is-active": isActive || isPressed,
|
303
|
+
"is-disabled": isDisabled,
|
304
|
+
"spectrum-FieldButton--invalid": validationState === "invalid",
|
305
|
+
"is-hovered": isHovered
|
283
306
|
}, styleProps.className)
|
284
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
307
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
285
308
|
slots: {
|
286
309
|
icon: {
|
287
|
-
size:
|
288
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
310
|
+
size: "S",
|
311
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Icon")
|
289
312
|
}
|
290
313
|
}
|
291
|
-
}, children)))
|
314
|
+
}, children)));
|
292
315
|
}
|
293
|
-
let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($5931ec1ea1ec1b0d$var$FieldButton);
|
294
|
-
|
316
|
+
let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($5931ec1ea1ec1b0d$var$FieldButton);
|
295
317
|
|
296
318
|
|
319
|
+
/*
|
320
|
+
* Copyright 2020 Adobe. All rights reserved.
|
321
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
322
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
323
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
324
|
+
*
|
325
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
326
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
327
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
328
|
+
* governing permissions and limitations under the License.
|
329
|
+
*/
|
297
330
|
|
298
331
|
|
299
332
|
|
@@ -302,37 +335,47 @@ let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ ($parcel$interopDe
|
|
302
335
|
|
303
336
|
|
304
337
|
function $3bd294eda342b0c4$var$LogicButton(props, ref) {
|
305
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
338
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
306
339
|
let { variant: variant , children: children , isDisabled: isDisabled , autoFocus: autoFocus , ...otherProps } = props;
|
307
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
308
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
309
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
340
|
+
let domRef = (0, $IPaYO$reactspectrumutils.useFocusableRef)(ref);
|
341
|
+
let { buttonProps: buttonProps , isPressed: isPressed } = (0, $IPaYO$reactariabutton.useButton)(props, domRef);
|
342
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
310
343
|
isDisabled: isDisabled
|
311
344
|
});
|
312
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
313
|
-
return
|
314
|
-
focusRingClass: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
345
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
346
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactariafocus.FocusRing), {
|
347
|
+
focusRingClass: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring"),
|
315
348
|
autoFocus: autoFocus
|
316
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
349
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
317
350
|
...styleProps,
|
318
|
-
|
351
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
319
352
|
ref: domRef,
|
320
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
353
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-LogicButton", {
|
321
354
|
[`spectrum-LogicButton--${variant}`]: variant,
|
322
|
-
|
323
|
-
|
324
|
-
|
355
|
+
"is-disabled": isDisabled,
|
356
|
+
"is-active": isPressed,
|
357
|
+
"is-hovered": isHovered
|
325
358
|
}, styleProps.className)
|
326
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("span", {
|
327
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
328
|
-
}, children)))
|
359
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("span", {
|
360
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Button-label")
|
361
|
+
}, children)));
|
329
362
|
}
|
330
363
|
/**
|
331
364
|
* A LogicButton displays an operator within a boolean logic sequence.
|
332
|
-
*/ let $3bd294eda342b0c4$export$9b0b80fed00ba8b1 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($3bd294eda342b0c4$var$LogicButton);
|
333
|
-
|
365
|
+
*/ let $3bd294eda342b0c4$export$9b0b80fed00ba8b1 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($3bd294eda342b0c4$var$LogicButton);
|
334
366
|
|
335
367
|
|
368
|
+
/*
|
369
|
+
* Copyright 2020 Adobe. All rights reserved.
|
370
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
371
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
372
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
373
|
+
*
|
374
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
375
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
376
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
377
|
+
* governing permissions and limitations under the License.
|
378
|
+
*/
|
336
379
|
|
337
380
|
|
338
381
|
|
@@ -341,42 +384,52 @@ function $3bd294eda342b0c4$var$LogicButton(props, ref) {
|
|
341
384
|
|
342
385
|
|
343
386
|
function $9c84a434f1c9da63$var$ClearButton(props, ref) {
|
344
|
-
let { children: children = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(($parcel$interopDefault($IPaYO$spectrumiconsuiCrossSmall)), {
|
345
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))[
|
346
|
-
}) , focusClassName: focusClassName , variant: variant , autoFocus: autoFocus , isDisabled: isDisabled , preventFocus: preventFocus , elementType: elementType = preventFocus ?
|
347
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
348
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton({
|
387
|
+
let { children: children = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, ($parcel$interopDefault($IPaYO$spectrumiconsuiCrossSmall))), {
|
388
|
+
UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)))["spectrum-Icon"]
|
389
|
+
}) , focusClassName: focusClassName , variant: variant , autoFocus: autoFocus , isDisabled: isDisabled , preventFocus: preventFocus , elementType: elementType = preventFocus ? "div" : "button" , ...otherProps } = props;
|
390
|
+
let domRef = (0, $IPaYO$reactspectrumutils.useFocusableRef)(ref);
|
391
|
+
let { buttonProps: buttonProps , isPressed: isPressed } = (0, $IPaYO$reactariabutton.useButton)({
|
349
392
|
...props,
|
350
393
|
elementType: elementType
|
351
394
|
}, domRef);
|
352
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
395
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
353
396
|
isDisabled: isDisabled
|
354
397
|
});
|
355
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
398
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
356
399
|
// For cases like the clear button in a search field, remove the tabIndex so
|
357
400
|
// iOS 14 with VoiceOver doesn't focus the button and hide the keyboard when
|
358
401
|
// moving the cursor over the clear button.
|
359
402
|
if (preventFocus) delete buttonProps.tabIndex;
|
360
403
|
let ElementType = elementType;
|
361
|
-
return
|
362
|
-
focusRingClass: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
404
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactariafocus.FocusRing), {
|
405
|
+
focusRingClass: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring", focusClassName),
|
363
406
|
autoFocus: autoFocus
|
364
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(ElementType, {
|
407
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement(ElementType, {
|
365
408
|
...styleProps,
|
366
|
-
|
409
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
367
410
|
ref: domRef,
|
368
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
411
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ClearButton", {
|
369
412
|
[`spectrum-ClearButton--${variant}`]: variant,
|
370
|
-
|
371
|
-
|
372
|
-
|
413
|
+
"is-disabled": isDisabled,
|
414
|
+
"is-active": isPressed,
|
415
|
+
"is-hovered": isHovered
|
373
416
|
}, styleProps.className)
|
374
|
-
}, children))
|
417
|
+
}, children));
|
375
418
|
}
|
376
|
-
let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($9c84a434f1c9da63$var$ClearButton);
|
377
|
-
|
419
|
+
let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($9c84a434f1c9da63$var$ClearButton);
|
378
420
|
|
379
421
|
|
422
|
+
/*
|
423
|
+
* Copyright 2020 Adobe. All rights reserved.
|
424
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
425
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
426
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
427
|
+
*
|
428
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
429
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
430
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
431
|
+
* governing permissions and limitations under the License.
|
432
|
+
*/
|
380
433
|
|
381
434
|
|
382
435
|
|
@@ -387,51 +440,50 @@ let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ ($parcel$interopDe
|
|
387
440
|
|
388
441
|
|
389
442
|
function $b5c927da7d8f1be6$var$ToggleButton(props, ref) {
|
390
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
443
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
391
444
|
let { isQuiet: isQuiet , isDisabled: isDisabled , isEmphasized: isEmphasized , staticColor: staticColor , children: children , autoFocus: autoFocus , ...otherProps } = props;
|
392
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
393
|
-
let state = $IPaYO$reactstatelytoggle.useToggleState(props);
|
394
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useToggleButton(props, state, domRef);
|
395
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
445
|
+
let domRef = (0, $IPaYO$reactspectrumutils.useFocusableRef)(ref);
|
446
|
+
let state = (0, $IPaYO$reactstatelytoggle.useToggleState)(props);
|
447
|
+
let { buttonProps: buttonProps , isPressed: isPressed } = (0, $IPaYO$reactariabutton.useToggleButton)(props, state, domRef);
|
448
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
396
449
|
isDisabled: isDisabled
|
397
450
|
});
|
398
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
399
|
-
let isTextOnly = ($parcel$interopDefault($IPaYO$react)).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).isValidElement(c)
|
400
|
-
)
|
401
|
-
|
402
|
-
focusRingClass: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)), 'focus-ring'),
|
451
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
452
|
+
let isTextOnly = (0, ($parcel$interopDefault($IPaYO$react))).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).isValidElement(c));
|
453
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactariafocus.FocusRing), {
|
454
|
+
focusRingClass: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "focus-ring"),
|
403
455
|
autoFocus: autoFocus
|
404
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
456
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
405
457
|
...styleProps,
|
406
|
-
|
458
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
407
459
|
ref: domRef,
|
408
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
460
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton", {
|
461
|
+
"spectrum-ActionButton--quiet": isQuiet,
|
462
|
+
"spectrum-ActionButton--emphasized": isEmphasized,
|
463
|
+
"spectrum-ActionButton--staticColor": !!staticColor,
|
464
|
+
"spectrum-ActionButton--staticWhite": staticColor === "white",
|
465
|
+
"spectrum-ActionButton--staticBlack": staticColor === "black",
|
466
|
+
"is-active": isPressed,
|
467
|
+
"is-disabled": isDisabled,
|
468
|
+
"is-hovered": isHovered,
|
469
|
+
"is-selected": state.isSelected
|
418
470
|
}, styleProps.className)
|
419
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
471
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
420
472
|
slots: {
|
421
473
|
icon: {
|
422
|
-
size:
|
423
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
474
|
+
size: "S",
|
475
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-Icon")
|
424
476
|
},
|
425
477
|
text: {
|
426
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
478
|
+
UNSAFE_className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ActionButton-label")
|
427
479
|
}
|
428
480
|
}
|
429
|
-
}, typeof children ===
|
481
|
+
}, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumtext.Text), null, children) : children)));
|
430
482
|
}
|
431
483
|
/**
|
432
484
|
* ToggleButtons allow users to toggle a selection on or off, for example
|
433
485
|
* switching between two states or modes.
|
434
|
-
*/ let $b5c927da7d8f1be6$export$d2b052e7b4be1756 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($b5c927da7d8f1be6$var$ToggleButton);
|
486
|
+
*/ let $b5c927da7d8f1be6$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($b5c927da7d8f1be6$var$ToggleButton);
|
435
487
|
|
436
488
|
|
437
489
|
|