@react-spectrum/button 3.11.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 +213 -144
- package/dist/main.js.map +1 -1
- package/dist/module.js +213 -144
- package/dist/module.js.map +1 -1
- package/package.json +11 -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
|
|
@@ -124,58 +145,68 @@ $afc5a4514aca2340$export$5cda1128f9112d2e = "spectrum-Button--overBackground_e2d
|
|
124
145
|
|
125
146
|
|
126
147
|
function $842a195ed1671b15$var$Button(props, ref) {
|
127
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
128
|
-
props = $IPaYO$reactspectrumutils.useSlotProps(props,
|
129
|
-
let { elementType: ElementType =
|
130
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
131
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
132
|
-
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)({
|
133
154
|
isDisabled: isDisabled
|
134
155
|
});
|
135
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
136
|
-
let hasLabel = $IPaYO$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))[
|
137
|
-
let hasIcon = $IPaYO$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))[
|
138
|
-
if (variant ===
|
139
|
-
else if (variant ===
|
140
|
-
variant =
|
141
|
-
staticColor =
|
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";
|
142
163
|
}
|
143
|
-
return
|
144
|
-
focusRingClass: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
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"),
|
145
166
|
autoFocus: autoFocus
|
146
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(ElementType, {
|
167
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement(ElementType, {
|
147
168
|
...styleProps,
|
148
|
-
|
169
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
149
170
|
ref: domRef,
|
150
171
|
"data-variant": variant,
|
151
172
|
"data-style": style,
|
152
173
|
"data-static-color": staticColor || undefined,
|
153
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
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
|
158
179
|
}, styleProps.className)
|
159
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
180
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
160
181
|
slots: {
|
161
182
|
icon: {
|
162
|
-
size:
|
163
|
-
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")
|
164
185
|
},
|
165
186
|
text: {
|
166
|
-
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")
|
167
188
|
}
|
168
189
|
}
|
169
|
-
}, typeof children ===
|
190
|
+
}, typeof children === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumtext.Text), null, children) : children)));
|
170
191
|
}
|
171
192
|
/**
|
172
193
|
* Buttons allow users to perform an action or to navigate to another page.
|
173
194
|
* They have multiple styles for various needs, and are ideal for calling attention to
|
174
195
|
* where a user needs to do something in order to move forward in a flow.
|
175
|
-
*/ let $842a195ed1671b15$export$353f5b6fc5456de1 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($842a195ed1671b15$var$Button);
|
176
|
-
|
196
|
+
*/ let $842a195ed1671b15$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($842a195ed1671b15$var$Button);
|
177
197
|
|
178
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
|
+
*/
|
179
210
|
|
180
211
|
|
181
212
|
|
@@ -186,55 +217,64 @@ function $842a195ed1671b15$var$Button(props, ref) {
|
|
186
217
|
|
187
218
|
|
188
219
|
function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
|
189
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
190
|
-
props = $IPaYO$reactspectrumutils.useSlotProps(props,
|
220
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
221
|
+
props = (0, $IPaYO$reactspectrumutils.useSlotProps)(props, "actionButton");
|
191
222
|
let { isQuiet: isQuiet , isDisabled: isDisabled , staticColor: staticColor , children: children , autoFocus: autoFocus , holdAffordance: // @ts-ignore (private)
|
192
223
|
holdAffordance , ...otherProps } = props;
|
193
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
194
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
195
|
-
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)({
|
196
227
|
isDisabled: isDisabled
|
197
228
|
});
|
198
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
199
|
-
let isTextOnly = ($parcel$interopDefault($IPaYO$react)).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).isValidElement(c)
|
200
|
-
)
|
201
|
-
|
202
|
-
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"),
|
203
233
|
autoFocus: autoFocus
|
204
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
234
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
205
235
|
...styleProps,
|
206
|
-
|
236
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
207
237
|
ref: domRef,
|
208
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
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
|
216
246
|
}, styleProps.className)
|
217
|
-
}, holdAffordance && /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(($parcel$interopDefault($IPaYO$spectrumiconsuiCornerTriangle)), {
|
218
|
-
UNSAFE_className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
219
|
-
}), /*#__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), {
|
220
250
|
slots: {
|
221
251
|
icon: {
|
222
|
-
size:
|
223
|
-
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")
|
224
254
|
},
|
225
255
|
text: {
|
226
|
-
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")
|
227
257
|
}
|
228
258
|
}
|
229
|
-
}, typeof children ===
|
259
|
+
}, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumtext.Text), null, children) : children)));
|
230
260
|
}
|
231
261
|
/**
|
232
262
|
* ActionButtons allow users to perform an action.
|
233
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.
|
234
|
-
*/ let $65dbde0e8e7aba71$export$cfc7921d29ef7b80 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($65dbde0e8e7aba71$var$ActionButton);
|
235
|
-
|
264
|
+
*/ let $65dbde0e8e7aba71$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($65dbde0e8e7aba71$var$ActionButton);
|
236
265
|
|
237
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
|
+
*/
|
238
278
|
|
239
279
|
|
240
280
|
|
@@ -243,40 +283,50 @@ function $65dbde0e8e7aba71$var$ActionButton(props, ref) {
|
|
243
283
|
|
244
284
|
// @private
|
245
285
|
function $5931ec1ea1ec1b0d$var$FieldButton(props, ref) {
|
246
|
-
props = $IPaYO$reactspectrumutils.useSlotProps(props,
|
286
|
+
props = (0, $IPaYO$reactspectrumutils.useSlotProps)(props, "button");
|
247
287
|
let { isQuiet: isQuiet , isDisabled: isDisabled , validationState: validationState , children: children , autoFocus: autoFocus , isActive: isActive , focusRingClass: focusRingClass , ...otherProps } = props;
|
248
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
249
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
250
|
-
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)({
|
251
291
|
isDisabled: isDisabled
|
252
292
|
});
|
253
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
254
|
-
return
|
255
|
-
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),
|
256
296
|
autoFocus: autoFocus
|
257
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
258
|
-
|
297
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
298
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
259
299
|
ref: domRef,
|
260
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
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
|
266
306
|
}, styleProps.className)
|
267
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
307
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
268
308
|
slots: {
|
269
309
|
icon: {
|
270
|
-
size:
|
271
|
-
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")
|
272
312
|
}
|
273
313
|
}
|
274
|
-
}, children)))
|
314
|
+
}, children)));
|
275
315
|
}
|
276
|
-
let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($5931ec1ea1ec1b0d$var$FieldButton);
|
277
|
-
|
316
|
+
let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($5931ec1ea1ec1b0d$var$FieldButton);
|
278
317
|
|
279
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
|
+
*/
|
280
330
|
|
281
331
|
|
282
332
|
|
@@ -285,37 +335,47 @@ let $5931ec1ea1ec1b0d$export$47dc48f595b075da = /*#__PURE__*/ ($parcel$interopDe
|
|
285
335
|
|
286
336
|
|
287
337
|
function $3bd294eda342b0c4$var$LogicButton(props, ref) {
|
288
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
338
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
289
339
|
let { variant: variant , children: children , isDisabled: isDisabled , autoFocus: autoFocus , ...otherProps } = props;
|
290
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
291
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useButton(props, domRef);
|
292
|
-
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)({
|
293
343
|
isDisabled: isDisabled
|
294
344
|
});
|
295
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
296
|
-
return
|
297
|
-
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"),
|
298
348
|
autoFocus: autoFocus
|
299
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
349
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
300
350
|
...styleProps,
|
301
|
-
|
351
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
302
352
|
ref: domRef,
|
303
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
353
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-LogicButton", {
|
304
354
|
[`spectrum-LogicButton--${variant}`]: variant,
|
305
|
-
|
306
|
-
|
307
|
-
|
355
|
+
"is-disabled": isDisabled,
|
356
|
+
"is-active": isPressed,
|
357
|
+
"is-hovered": isHovered
|
308
358
|
}, styleProps.className)
|
309
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("span", {
|
310
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
311
|
-
}, 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)));
|
312
362
|
}
|
313
363
|
/**
|
314
364
|
* A LogicButton displays an operator within a boolean logic sequence.
|
315
|
-
*/ let $3bd294eda342b0c4$export$9b0b80fed00ba8b1 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($3bd294eda342b0c4$var$LogicButton);
|
316
|
-
|
365
|
+
*/ let $3bd294eda342b0c4$export$9b0b80fed00ba8b1 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($3bd294eda342b0c4$var$LogicButton);
|
317
366
|
|
318
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
|
+
*/
|
319
379
|
|
320
380
|
|
321
381
|
|
@@ -324,42 +384,52 @@ function $3bd294eda342b0c4$var$LogicButton(props, ref) {
|
|
324
384
|
|
325
385
|
|
326
386
|
function $9c84a434f1c9da63$var$ClearButton(props, ref) {
|
327
|
-
let { children: children = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(($parcel$interopDefault($IPaYO$spectrumiconsuiCrossSmall)), {
|
328
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))[
|
329
|
-
}) , focusClassName: focusClassName , variant: variant , autoFocus: autoFocus , isDisabled: isDisabled , preventFocus: preventFocus , elementType: elementType = preventFocus ?
|
330
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
331
|
-
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)({
|
332
392
|
...props,
|
333
393
|
elementType: elementType
|
334
394
|
}, domRef);
|
335
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $IPaYO$reactariainteractions.useHover({
|
395
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $IPaYO$reactariainteractions.useHover)({
|
336
396
|
isDisabled: isDisabled
|
337
397
|
});
|
338
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
398
|
+
let { styleProps: styleProps } = (0, $IPaYO$reactspectrumutils.useStyleProps)(otherProps);
|
339
399
|
// For cases like the clear button in a search field, remove the tabIndex so
|
340
400
|
// iOS 14 with VoiceOver doesn't focus the button and hide the keyboard when
|
341
401
|
// moving the cursor over the clear button.
|
342
402
|
if (preventFocus) delete buttonProps.tabIndex;
|
343
403
|
let ElementType = elementType;
|
344
|
-
return
|
345
|
-
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),
|
346
406
|
autoFocus: autoFocus
|
347
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement(ElementType, {
|
407
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement(ElementType, {
|
348
408
|
...styleProps,
|
349
|
-
|
409
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
350
410
|
ref: domRef,
|
351
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
411
|
+
className: (0, $IPaYO$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports))), "spectrum-ClearButton", {
|
352
412
|
[`spectrum-ClearButton--${variant}`]: variant,
|
353
|
-
|
354
|
-
|
355
|
-
|
413
|
+
"is-disabled": isDisabled,
|
414
|
+
"is-active": isPressed,
|
415
|
+
"is-hovered": isHovered
|
356
416
|
}, styleProps.className)
|
357
|
-
}, children))
|
417
|
+
}, children));
|
358
418
|
}
|
359
|
-
let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).forwardRef($9c84a434f1c9da63$var$ClearButton);
|
360
|
-
|
419
|
+
let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).forwardRef($9c84a434f1c9da63$var$ClearButton);
|
361
420
|
|
362
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
|
+
*/
|
363
433
|
|
364
434
|
|
365
435
|
|
@@ -370,51 +440,50 @@ let $9c84a434f1c9da63$export$13ec83e50bf04290 = /*#__PURE__*/ ($parcel$interopDe
|
|
370
440
|
|
371
441
|
|
372
442
|
function $b5c927da7d8f1be6$var$ToggleButton(props, ref) {
|
373
|
-
props = $IPaYO$reactspectrumprovider.useProviderProps(props);
|
443
|
+
props = (0, $IPaYO$reactspectrumprovider.useProviderProps)(props);
|
374
444
|
let { isQuiet: isQuiet , isDisabled: isDisabled , isEmphasized: isEmphasized , staticColor: staticColor , children: children , autoFocus: autoFocus , ...otherProps } = props;
|
375
|
-
let domRef = $IPaYO$reactspectrumutils.useFocusableRef(ref);
|
376
|
-
let state = $IPaYO$reactstatelytoggle.useToggleState(props);
|
377
|
-
let { buttonProps: buttonProps , isPressed: isPressed } = $IPaYO$reactariabutton.useToggleButton(props, state, domRef);
|
378
|
-
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)({
|
379
449
|
isDisabled: isDisabled
|
380
450
|
});
|
381
|
-
let { styleProps: styleProps } = $IPaYO$reactspectrumutils.useStyleProps(otherProps);
|
382
|
-
let isTextOnly = ($parcel$interopDefault($IPaYO$react)).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).isValidElement(c)
|
383
|
-
)
|
384
|
-
|
385
|
-
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"),
|
386
455
|
autoFocus: autoFocus
|
387
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement("button", {
|
456
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement("button", {
|
388
457
|
...styleProps,
|
389
|
-
|
458
|
+
...(0, $IPaYO$reactariautils.mergeProps)(buttonProps, hoverProps),
|
390
459
|
ref: domRef,
|
391
|
-
className: $IPaYO$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($afc5a4514aca2340$exports)),
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
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
|
401
470
|
}, styleProps.className)
|
402
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($IPaYO$react)).createElement($IPaYO$reactspectrumutils.SlotProvider, {
|
471
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumutils.SlotProvider), {
|
403
472
|
slots: {
|
404
473
|
icon: {
|
405
|
-
size:
|
406
|
-
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")
|
407
476
|
},
|
408
477
|
text: {
|
409
|
-
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")
|
410
479
|
}
|
411
480
|
}
|
412
|
-
}, typeof children ===
|
481
|
+
}, typeof children === "string" || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($IPaYO$react))).createElement((0, $IPaYO$reactspectrumtext.Text), null, children) : children)));
|
413
482
|
}
|
414
483
|
/**
|
415
484
|
* ToggleButtons allow users to toggle a selection on or off, for example
|
416
485
|
* switching between two states or modes.
|
417
|
-
*/ 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);
|
418
487
|
|
419
488
|
|
420
489
|
|