@plasmicpkgs/react-aria 0.0.23 → 0.0.25
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/.tsbuildinfo +1 -1
- package/dist/contexts.d.ts +1 -1
- package/dist/interaction-variant-utils.d.ts +31 -0
- package/dist/react-aria.esm.js +308 -215
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +307 -214
- package/dist/react-aria.js.map +1 -1
- package/dist/registerButton.d.ts +4 -1
- package/dist/registerCheckbox.d.ts +4 -2
- package/dist/registerInput.d.ts +7 -1
- package/dist/registerRadio.d.ts +6 -4
- package/dist/registerRadioGroup.d.ts +2 -6
- package/dist/registerSwitch.d.ts +9 -2
- package/dist/registerTextArea.d.ts +7 -1
- package/dist/registerTextField.d.ts +1 -1
- package/dist/utils.d.ts +0 -1
- package/package.json +3 -3
- package/skinny/contexts.d.ts +1 -1
- package/skinny/interaction-variant-utils-608d984b.esm.js +39 -0
- package/skinny/interaction-variant-utils-608d984b.esm.js.map +1 -0
- package/skinny/interaction-variant-utils-80bf1cfd.cjs.js +45 -0
- package/skinny/interaction-variant-utils-80bf1cfd.cjs.js.map +1 -0
- package/skinny/interaction-variant-utils.d.ts +31 -0
- package/skinny/registerButton.cjs.js +32 -50
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.d.ts +4 -1
- package/skinny/registerButton.esm.js +32 -50
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +22 -44
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +4 -2
- package/skinny/registerCheckbox.esm.js +22 -44
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +2 -1
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +2 -1
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +1 -1
- package/skinny/registerComboBox.esm.js +1 -1
- package/skinny/registerDescription.cjs.js +1 -1
- package/skinny/registerDescription.esm.js +1 -1
- package/skinny/registerFieldError.cjs.js +1 -1
- package/skinny/registerFieldError.esm.js +1 -1
- package/skinny/registerForm.cjs.js +1 -1
- package/skinny/registerForm.esm.js +1 -1
- package/skinny/registerHeader.cjs.js +1 -1
- package/skinny/registerHeader.esm.js +1 -1
- package/skinny/registerInput.cjs.js +40 -2
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.d.ts +7 -1
- package/skinny/registerInput.esm.js +40 -2
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/registerLabel.cjs.js +1 -2
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.esm.js +1 -2
- package/skinny/registerLabel.esm.js.map +1 -1
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerListBoxItem.cjs.js +1 -1
- package/skinny/registerListBoxItem.esm.js +1 -1
- package/skinny/registerModal.cjs.js +1 -1
- package/skinny/registerModal.esm.js +1 -1
- package/skinny/registerPopover.cjs.js +1 -1
- package/skinny/registerPopover.esm.js +1 -1
- package/skinny/registerRadio.cjs.js +21 -55
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.d.ts +6 -4
- package/skinny/registerRadio.esm.js +21 -55
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +4 -31
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.d.ts +2 -6
- package/skinny/registerRadioGroup.esm.js +4 -27
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +1 -1
- package/skinny/registerSection.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +1 -1
- package/skinny/registerSelect.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +42 -12
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.d.ts +9 -2
- package/skinny/registerSwitch.esm.js +38 -12
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerText.cjs.js +1 -1
- package/skinny/registerText.esm.js +1 -1
- package/skinny/registerTextArea.cjs.js +61 -2
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.d.ts +7 -1
- package/skinny/registerTextArea.esm.js +61 -2
- package/skinny/registerTextArea.esm.js.map +1 -1
- package/skinny/registerTextField.cjs.js +54 -6
- package/skinny/registerTextField.cjs.js.map +1 -1
- package/skinny/registerTextField.d.ts +1 -1
- package/skinny/registerTextField.esm.js +54 -6
- package/skinny/registerTextField.esm.js.map +1 -1
- package/skinny/registerTooltip.cjs.js +1 -1
- package/skinny/registerTooltip.esm.js +1 -1
- package/skinny/{utils-1190a0a9.cjs.js → utils-18b2465b.cjs.js} +2 -12
- package/skinny/utils-18b2465b.cjs.js.map +1 -0
- package/skinny/{utils-28f98072.esm.js → utils-cf2632c9.esm.js} +3 -12
- package/skinny/utils-cf2632c9.esm.js.map +1 -0
- package/skinny/utils.d.ts +0 -1
- package/skinny/utils-1190a0a9.cjs.js.map +0 -1
- package/skinny/utils-28f98072.esm.js.map +0 -1
package/dist/react-aria.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, Component } from 'react';
|
|
2
2
|
import { Button, Checkbox, Text, FieldError, Label, CheckboxGroup, ComboBox, ComboBoxStateContext, Form, Input, ListBoxItem, ListBox, Heading, ModalOverlay, Modal, Dialog, PopoverContext, Popover, Radio, RadioGroup, Header, Section, Collection, SelectValue, Select, Switch, TextArea, TextField } from 'react-aria-components';
|
|
3
3
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
4
4
|
import { useFilter } from '@react-aria/i18n';
|
|
@@ -58,6 +58,41 @@ function getCommonInputProps(fieldName, fields) {
|
|
|
58
58
|
return filteredProps;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
const ARIA_COMPONENTS_INTERACTION_VARIANTS = {
|
|
62
|
+
hovered: {
|
|
63
|
+
cssSelector: "[data-hovered]",
|
|
64
|
+
displayName: "Hovered"
|
|
65
|
+
},
|
|
66
|
+
pressed: {
|
|
67
|
+
cssSelector: "[data-pressed]",
|
|
68
|
+
displayName: "Pressed"
|
|
69
|
+
},
|
|
70
|
+
focused: {
|
|
71
|
+
cssSelector: "[data-focused]",
|
|
72
|
+
displayName: "Focused"
|
|
73
|
+
},
|
|
74
|
+
focusVisible: {
|
|
75
|
+
cssSelector: "[data-focus-visible]",
|
|
76
|
+
displayName: "Focus Visible"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
function realWithObservedValues(children, changes, updateInteractionVariant) {
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
if (updateInteractionVariant) {
|
|
82
|
+
updateInteractionVariant(changes);
|
|
83
|
+
}
|
|
84
|
+
}, [changes, updateInteractionVariant]);
|
|
85
|
+
return children;
|
|
86
|
+
}
|
|
87
|
+
function pickAriaComponentVariants(keys) {
|
|
88
|
+
return {
|
|
89
|
+
interactionVariants: Object.fromEntries(
|
|
90
|
+
keys.map((key) => [key, ARIA_COMPONENTS_INTERACTION_VARIANTS[key]])
|
|
91
|
+
),
|
|
92
|
+
withObservedValues: realWithObservedValues
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
61
96
|
var __defProp$m = Object.defineProperty;
|
|
62
97
|
var __defProps$d = Object.defineProperties;
|
|
63
98
|
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
@@ -77,12 +112,6 @@ var __spreadValues$m = (a, b) => {
|
|
|
77
112
|
return a;
|
|
78
113
|
};
|
|
79
114
|
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
80
|
-
function ValueObserver({ value, onChange }) {
|
|
81
|
-
useEffect(() => {
|
|
82
|
-
onChange(value);
|
|
83
|
-
}, [value, onChange]);
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
115
|
function registerComponentHelper(loader, component, meta, overrides) {
|
|
87
116
|
if (overrides) {
|
|
88
117
|
meta = __spreadProps$d(__spreadValues$m(__spreadValues$m({}, meta), overrides), {
|
|
@@ -115,9 +144,7 @@ function makeChildComponentName(fullParentName, fullChildName) {
|
|
|
115
144
|
}
|
|
116
145
|
function extractPlasmicDataProps(props) {
|
|
117
146
|
return Object.fromEntries(
|
|
118
|
-
Object.entries(props).filter(
|
|
119
|
-
([key, val]) => key.startsWith("data-plasmic-")
|
|
120
|
-
)
|
|
147
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-plasmic-"))
|
|
121
148
|
);
|
|
122
149
|
}
|
|
123
150
|
function withoutNils(array) {
|
|
@@ -143,7 +170,7 @@ var __spreadValues$l = (a, b) => {
|
|
|
143
170
|
return a;
|
|
144
171
|
};
|
|
145
172
|
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
146
|
-
var __objRest$
|
|
173
|
+
var __objRest$e = (source, exclude) => {
|
|
147
174
|
var target = {};
|
|
148
175
|
for (var prop in source)
|
|
149
176
|
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -155,16 +182,38 @@ var __objRest$c = (source, exclude) => {
|
|
|
155
182
|
}
|
|
156
183
|
return target;
|
|
157
184
|
};
|
|
185
|
+
const BUTTON_INTERACTION_VARIANTS = [
|
|
186
|
+
"hovered",
|
|
187
|
+
"pressed",
|
|
188
|
+
"focused",
|
|
189
|
+
"focusVisible"
|
|
190
|
+
];
|
|
191
|
+
const { interactionVariants: interactionVariants$5, withObservedValues: withObservedValues$3 } = pickAriaComponentVariants(
|
|
192
|
+
BUTTON_INTERACTION_VARIANTS
|
|
193
|
+
);
|
|
158
194
|
function BaseButton(props) {
|
|
159
|
-
const _a = props, {
|
|
195
|
+
const _a = props, {
|
|
196
|
+
submitsForm,
|
|
197
|
+
resetsForm,
|
|
198
|
+
children,
|
|
199
|
+
updateInteractionVariant
|
|
200
|
+
} = _a, rest = __objRest$e(_a, [
|
|
201
|
+
"submitsForm",
|
|
202
|
+
"resetsForm",
|
|
203
|
+
"children",
|
|
204
|
+
"updateInteractionVariant"
|
|
205
|
+
]);
|
|
160
206
|
const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
|
|
161
|
-
return /* @__PURE__ */ React.createElement(Button, __spreadValues$l({ type }, rest), ({
|
|
162
|
-
|
|
207
|
+
return /* @__PURE__ */ React.createElement(Button, __spreadValues$l({ type }, rest), ({ isHovered, isPressed, isFocused, isFocusVisible }) => withObservedValues$3(
|
|
208
|
+
children,
|
|
163
209
|
{
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
210
|
+
hovered: isHovered,
|
|
211
|
+
pressed: isPressed,
|
|
212
|
+
focused: isFocused,
|
|
213
|
+
focusVisible: isFocusVisible
|
|
214
|
+
},
|
|
215
|
+
updateInteractionVariant
|
|
216
|
+
));
|
|
168
217
|
}
|
|
169
218
|
function registerButton(loader, overrides) {
|
|
170
219
|
registerComponentHelper(
|
|
@@ -175,6 +224,7 @@ function registerButton(loader, overrides) {
|
|
|
175
224
|
displayName: "Aria Button",
|
|
176
225
|
importPath: "@plasmicpkgs/react-aria/skinny/registerButton",
|
|
177
226
|
importName: "BaseButton",
|
|
227
|
+
interactionVariants: interactionVariants$5,
|
|
178
228
|
props: __spreadProps$c(__spreadValues$l({}, getCommonInputProps("button", [
|
|
179
229
|
"isDisabled",
|
|
180
230
|
"aria-label",
|
|
@@ -195,50 +245,8 @@ function registerButton(loader, overrides) {
|
|
|
195
245
|
hidden: (ps) => Boolean(ps.submitsForm),
|
|
196
246
|
description: "Whether clicking this button should reset the enclosing form.",
|
|
197
247
|
advanced: true
|
|
198
|
-
},
|
|
199
|
-
onPress: {
|
|
200
|
-
type: "eventHandler",
|
|
201
|
-
argTypes: [{ name: "event", type: "object" }]
|
|
202
|
-
},
|
|
203
|
-
onHoverChange: {
|
|
204
|
-
type: "eventHandler",
|
|
205
|
-
argTypes: [{ name: "isHovered", type: "boolean" }]
|
|
206
|
-
},
|
|
207
|
-
onPressChange: {
|
|
208
|
-
type: "eventHandler",
|
|
209
|
-
argTypes: [{ name: "isPressed", type: "boolean" }]
|
|
210
|
-
},
|
|
211
|
-
onFocusChange: {
|
|
212
|
-
type: "eventHandler",
|
|
213
|
-
argTypes: [{ name: "isFocused", type: "boolean" }]
|
|
214
|
-
},
|
|
215
|
-
onFocusVisibleChange: {
|
|
216
|
-
type: "eventHandler",
|
|
217
|
-
argTypes: [{ name: "isFocusVisible", type: "boolean" }]
|
|
218
248
|
}
|
|
219
249
|
}),
|
|
220
|
-
states: {
|
|
221
|
-
isHovered: {
|
|
222
|
-
type: "readonly",
|
|
223
|
-
onChangeProp: "onHoverChange",
|
|
224
|
-
variableType: "boolean"
|
|
225
|
-
},
|
|
226
|
-
isPressed: {
|
|
227
|
-
type: "readonly",
|
|
228
|
-
onChangeProp: "onPressChange",
|
|
229
|
-
variableType: "boolean"
|
|
230
|
-
},
|
|
231
|
-
isFocused: {
|
|
232
|
-
type: "readonly",
|
|
233
|
-
onChangeProp: "onFocusChange",
|
|
234
|
-
variableType: "boolean"
|
|
235
|
-
},
|
|
236
|
-
isFocusVisible: {
|
|
237
|
-
type: "readonly",
|
|
238
|
-
onChangeProp: "onFocusVisibleChange",
|
|
239
|
-
variableType: "boolean"
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
250
|
trapsFocus: true
|
|
243
251
|
},
|
|
244
252
|
overrides
|
|
@@ -264,7 +272,7 @@ var __spreadValues$k = (a, b) => {
|
|
|
264
272
|
return a;
|
|
265
273
|
};
|
|
266
274
|
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
267
|
-
var __objRest$
|
|
275
|
+
var __objRest$d = (source, exclude) => {
|
|
268
276
|
var target = {};
|
|
269
277
|
for (var prop in source)
|
|
270
278
|
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -276,15 +284,27 @@ var __objRest$b = (source, exclude) => {
|
|
|
276
284
|
}
|
|
277
285
|
return target;
|
|
278
286
|
};
|
|
287
|
+
const CHECKBOX_INTERACTION_VARIANTS = [
|
|
288
|
+
"hovered",
|
|
289
|
+
"pressed",
|
|
290
|
+
"focused",
|
|
291
|
+
"focusVisible"
|
|
292
|
+
];
|
|
293
|
+
const { interactionVariants: interactionVariants$4, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(
|
|
294
|
+
CHECKBOX_INTERACTION_VARIANTS
|
|
295
|
+
);
|
|
279
296
|
function BaseCheckbox(props) {
|
|
280
|
-
const _a = props, { children,
|
|
281
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$k({}, rest), ({
|
|
282
|
-
|
|
297
|
+
const _a = props, { children, updateInteractionVariant } = _a, rest = __objRest$d(_a, ["children", "updateInteractionVariant"]);
|
|
298
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$k({}, rest), ({ isHovered, isPressed, isFocused, isFocusVisible }) => withObservedValues$2(
|
|
299
|
+
children,
|
|
283
300
|
{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
301
|
+
hovered: isHovered,
|
|
302
|
+
pressed: isPressed,
|
|
303
|
+
focused: isFocused,
|
|
304
|
+
focusVisible: isFocusVisible
|
|
305
|
+
},
|
|
306
|
+
updateInteractionVariant
|
|
307
|
+
)));
|
|
288
308
|
}
|
|
289
309
|
function registerCheckbox(loader, overrides) {
|
|
290
310
|
registerComponentHelper(
|
|
@@ -295,6 +315,7 @@ function registerCheckbox(loader, overrides) {
|
|
|
295
315
|
displayName: "Aria Checkbox",
|
|
296
316
|
importPath: "@plasmicpkgs/react-aria/skinny/registerCheckbox",
|
|
297
317
|
importName: "BaseCheckbox",
|
|
318
|
+
interactionVariants: interactionVariants$4,
|
|
298
319
|
props: __spreadProps$b(__spreadValues$k({}, getCommonInputProps("checkbox", [
|
|
299
320
|
"name",
|
|
300
321
|
"isDisabled",
|
|
@@ -336,22 +357,6 @@ function registerCheckbox(loader, overrides) {
|
|
|
336
357
|
onChange: {
|
|
337
358
|
type: "eventHandler",
|
|
338
359
|
argTypes: [{ name: "isSelected", type: "boolean" }]
|
|
339
|
-
},
|
|
340
|
-
onHoverChange: {
|
|
341
|
-
type: "eventHandler",
|
|
342
|
-
argTypes: [{ name: "isHovered", type: "boolean" }]
|
|
343
|
-
},
|
|
344
|
-
onFocusChange: {
|
|
345
|
-
type: "eventHandler",
|
|
346
|
-
argTypes: [{ name: "isFocused", type: "boolean" }]
|
|
347
|
-
},
|
|
348
|
-
onPressChange: {
|
|
349
|
-
type: "eventHandler",
|
|
350
|
-
argTypes: [{ name: "isPressed", type: "boolean" }]
|
|
351
|
-
},
|
|
352
|
-
onFocusVisibleChange: {
|
|
353
|
-
type: "eventHandler",
|
|
354
|
-
argTypes: [{ name: "isFocusVisible", type: "boolean" }]
|
|
355
360
|
}
|
|
356
361
|
}),
|
|
357
362
|
states: {
|
|
@@ -360,26 +365,6 @@ function registerCheckbox(loader, overrides) {
|
|
|
360
365
|
valueProp: "isSelected",
|
|
361
366
|
onChangeProp: "onChange",
|
|
362
367
|
variableType: "boolean"
|
|
363
|
-
},
|
|
364
|
-
isHovered: {
|
|
365
|
-
type: "readonly",
|
|
366
|
-
onChangeProp: "onHoverChange",
|
|
367
|
-
variableType: "boolean"
|
|
368
|
-
},
|
|
369
|
-
isPressed: {
|
|
370
|
-
type: "readonly",
|
|
371
|
-
onChangeProp: "onPressChange",
|
|
372
|
-
variableType: "boolean"
|
|
373
|
-
},
|
|
374
|
-
isFocused: {
|
|
375
|
-
type: "readonly",
|
|
376
|
-
onChangeProp: "onFocusChange",
|
|
377
|
-
variableType: "boolean"
|
|
378
|
-
},
|
|
379
|
-
isFocusVisible: {
|
|
380
|
-
type: "readonly",
|
|
381
|
-
onChangeProp: "onFocusVisibleChange",
|
|
382
|
-
variableType: "boolean"
|
|
383
368
|
}
|
|
384
369
|
},
|
|
385
370
|
trapsFocus: true
|
|
@@ -404,7 +389,7 @@ var __spreadValues$j = (a, b) => {
|
|
|
404
389
|
}
|
|
405
390
|
return a;
|
|
406
391
|
};
|
|
407
|
-
var __objRest$
|
|
392
|
+
var __objRest$c = (source, exclude) => {
|
|
408
393
|
var target = {};
|
|
409
394
|
for (var prop in source)
|
|
410
395
|
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -417,7 +402,7 @@ var __objRest$a = (source, exclude) => {
|
|
|
417
402
|
return target;
|
|
418
403
|
};
|
|
419
404
|
function BaseText(_a) {
|
|
420
|
-
var _b = _a, { children } = _b, rest = __objRest$
|
|
405
|
+
var _b = _a, { children } = _b, rest = __objRest$c(_b, ["children"]);
|
|
421
406
|
return /* @__PURE__ */ React.createElement(Text, __spreadValues$j({}, rest), children);
|
|
422
407
|
}
|
|
423
408
|
function registerText(loader, overrides) {
|
|
@@ -487,7 +472,7 @@ var __spreadValues$h = (a, b) => {
|
|
|
487
472
|
}
|
|
488
473
|
return a;
|
|
489
474
|
};
|
|
490
|
-
var __objRest$
|
|
475
|
+
var __objRest$b = (source, exclude) => {
|
|
491
476
|
var target = {};
|
|
492
477
|
for (var prop in source)
|
|
493
478
|
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -511,7 +496,7 @@ function BaseFieldError(_a) {
|
|
|
511
496
|
tooShort,
|
|
512
497
|
typeMismatch,
|
|
513
498
|
valueMissing
|
|
514
|
-
} = _b, rest = __objRest$
|
|
499
|
+
} = _b, rest = __objRest$b(_b, [
|
|
515
500
|
"badInput",
|
|
516
501
|
"customError",
|
|
517
502
|
"patternMismatch",
|
|
@@ -1176,7 +1161,7 @@ var __spreadValues$e = (a, b) => {
|
|
|
1176
1161
|
}
|
|
1177
1162
|
return a;
|
|
1178
1163
|
};
|
|
1179
|
-
var __objRest$
|
|
1164
|
+
var __objRest$a = (source, exclude) => {
|
|
1180
1165
|
var target = {};
|
|
1181
1166
|
for (var prop in source)
|
|
1182
1167
|
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1189,7 +1174,7 @@ var __objRest$8 = (source, exclude) => {
|
|
|
1189
1174
|
return target;
|
|
1190
1175
|
};
|
|
1191
1176
|
function BaseForm(props) {
|
|
1192
|
-
const _a = props, { onSubmit, children } = _a, rest = __objRest$
|
|
1177
|
+
const _a = props, { onSubmit, children } = _a, rest = __objRest$a(_a, ["onSubmit", "children"]);
|
|
1193
1178
|
return /* @__PURE__ */ React.createElement(
|
|
1194
1179
|
Form,
|
|
1195
1180
|
__spreadValues$e({
|
|
@@ -1258,8 +1243,44 @@ var __spreadValues$d = (a, b) => {
|
|
|
1258
1243
|
}
|
|
1259
1244
|
return a;
|
|
1260
1245
|
};
|
|
1246
|
+
var __objRest$9 = (source, exclude) => {
|
|
1247
|
+
var target = {};
|
|
1248
|
+
for (var prop in source)
|
|
1249
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1250
|
+
target[prop] = source[prop];
|
|
1251
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
1252
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
1253
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
1254
|
+
target[prop] = source[prop];
|
|
1255
|
+
}
|
|
1256
|
+
return target;
|
|
1257
|
+
};
|
|
1258
|
+
const INPUT_INTERACTION_VARIANTS = ["focused", "hovered"];
|
|
1259
|
+
const { interactionVariants: interactionVariants$3 } = pickAriaComponentVariants(
|
|
1260
|
+
INPUT_INTERACTION_VARIANTS
|
|
1261
|
+
);
|
|
1261
1262
|
function BaseInput(props) {
|
|
1262
|
-
|
|
1263
|
+
const _a = props, { updateInteractionVariant } = _a, rest = __objRest$9(_a, ["updateInteractionVariant"]);
|
|
1264
|
+
return /* @__PURE__ */ React.createElement(
|
|
1265
|
+
Input,
|
|
1266
|
+
__spreadValues$d({
|
|
1267
|
+
onHoverChange: (isHovered) => {
|
|
1268
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
1269
|
+
hovered: isHovered
|
|
1270
|
+
});
|
|
1271
|
+
},
|
|
1272
|
+
onFocus: () => {
|
|
1273
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
1274
|
+
focused: true
|
|
1275
|
+
});
|
|
1276
|
+
},
|
|
1277
|
+
onBlur: () => {
|
|
1278
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
1279
|
+
focused: false
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
}, rest)
|
|
1283
|
+
);
|
|
1263
1284
|
}
|
|
1264
1285
|
function registerInput(loader, overrides) {
|
|
1265
1286
|
registerComponentHelper(
|
|
@@ -1270,6 +1291,7 @@ function registerInput(loader, overrides) {
|
|
|
1270
1291
|
displayName: "Aria Input",
|
|
1271
1292
|
importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
|
|
1272
1293
|
importName: "BaseInput",
|
|
1294
|
+
interactionVariants: interactionVariants$3,
|
|
1273
1295
|
props: {
|
|
1274
1296
|
placeholder: {
|
|
1275
1297
|
type: "string"
|
|
@@ -1356,7 +1378,7 @@ var __spreadValues$b = (a, b) => {
|
|
|
1356
1378
|
return a;
|
|
1357
1379
|
};
|
|
1358
1380
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
1359
|
-
var __objRest$
|
|
1381
|
+
var __objRest$8 = (source, exclude) => {
|
|
1360
1382
|
var target = {};
|
|
1361
1383
|
for (var prop in source)
|
|
1362
1384
|
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1412,7 +1434,7 @@ function BaseListBox(props) {
|
|
|
1412
1434
|
renderItem,
|
|
1413
1435
|
renderSection,
|
|
1414
1436
|
getItemType
|
|
1415
|
-
} = _a, rest = __objRest$
|
|
1437
|
+
} = _a, rest = __objRest$8(_a, [
|
|
1416
1438
|
"makeItemProps",
|
|
1417
1439
|
"makeSectionProps",
|
|
1418
1440
|
"renderItem",
|
|
@@ -1498,7 +1520,7 @@ var __spreadValues$a = (a, b) => {
|
|
|
1498
1520
|
return a;
|
|
1499
1521
|
};
|
|
1500
1522
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
1501
|
-
var __objRest$
|
|
1523
|
+
var __objRest$7 = (source, exclude) => {
|
|
1502
1524
|
var target = {};
|
|
1503
1525
|
for (var prop in source)
|
|
1504
1526
|
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1518,7 +1540,7 @@ const BaseModal = forwardRef(
|
|
|
1518
1540
|
modalOverlayClass,
|
|
1519
1541
|
onOpenChange,
|
|
1520
1542
|
className
|
|
1521
|
-
} = _a, rest = __objRest$
|
|
1543
|
+
} = _a, rest = __objRest$7(_a, [
|
|
1522
1544
|
"children",
|
|
1523
1545
|
"heading",
|
|
1524
1546
|
"modalOverlayClass",
|
|
@@ -1628,7 +1650,7 @@ var __spreadValues$9 = (a, b) => {
|
|
|
1628
1650
|
return a;
|
|
1629
1651
|
};
|
|
1630
1652
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
1631
|
-
var __objRest$
|
|
1653
|
+
var __objRest$6 = (source, exclude) => {
|
|
1632
1654
|
var target = {};
|
|
1633
1655
|
for (var prop in source)
|
|
1634
1656
|
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1641,7 +1663,7 @@ var __objRest$5 = (source, exclude) => {
|
|
|
1641
1663
|
return target;
|
|
1642
1664
|
};
|
|
1643
1665
|
function BasePopover(props) {
|
|
1644
|
-
const _a = props, { resetClassName } = _a, restProps = __objRest$
|
|
1666
|
+
const _a = props, { resetClassName } = _a, restProps = __objRest$6(_a, ["resetClassName"]);
|
|
1645
1667
|
const isStandalone = !React.useContext(PopoverContext);
|
|
1646
1668
|
const contextProps = React.useContext(PlasmicPopoverContext);
|
|
1647
1669
|
const canvas = usePlasmicCanvasContext();
|
|
@@ -1752,7 +1774,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
1752
1774
|
return a;
|
|
1753
1775
|
};
|
|
1754
1776
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1755
|
-
var __objRest$
|
|
1777
|
+
var __objRest$5 = (source, exclude) => {
|
|
1756
1778
|
var target = {};
|
|
1757
1779
|
for (var prop in source)
|
|
1758
1780
|
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1764,27 +1786,27 @@ var __objRest$4 = (source, exclude) => {
|
|
|
1764
1786
|
}
|
|
1765
1787
|
return target;
|
|
1766
1788
|
};
|
|
1789
|
+
const RADIO_INTERACTION_VARIANTS = [
|
|
1790
|
+
"hovered",
|
|
1791
|
+
"pressed",
|
|
1792
|
+
"focused",
|
|
1793
|
+
"focusVisible"
|
|
1794
|
+
];
|
|
1795
|
+
const { interactionVariants: interactionVariants$2, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(
|
|
1796
|
+
RADIO_INTERACTION_VARIANTS
|
|
1797
|
+
);
|
|
1767
1798
|
function BaseRadio(props) {
|
|
1768
|
-
const _a = props, {
|
|
1799
|
+
const _a = props, { children, updateInteractionVariant } = _a, rest = __objRest$5(_a, ["children", "updateInteractionVariant"]);
|
|
1800
|
+
const radio = /* @__PURE__ */ React.createElement(Radio, __spreadValues$8({}, rest), ({ isHovered, isPressed, isFocused, isFocusVisible }) => withObservedValues$1(
|
|
1769
1801
|
children,
|
|
1770
|
-
onPressChange,
|
|
1771
|
-
onFocusVisibleChange,
|
|
1772
|
-
onHoverChange,
|
|
1773
|
-
onSelectionChange
|
|
1774
|
-
} = _a, rest = __objRest$4(_a, [
|
|
1775
|
-
"children",
|
|
1776
|
-
"onPressChange",
|
|
1777
|
-
"onFocusVisibleChange",
|
|
1778
|
-
"onHoverChange",
|
|
1779
|
-
"onSelectionChange"
|
|
1780
|
-
]);
|
|
1781
|
-
const radio = /* @__PURE__ */ React.createElement(Radio, __spreadValues$8({}, rest), ({ isFocusVisible, isPressed, isHovered, isSelected }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
1782
|
-
ValueObserver,
|
|
1783
1802
|
{
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1803
|
+
hovered: isHovered,
|
|
1804
|
+
pressed: isPressed,
|
|
1805
|
+
focused: isFocused,
|
|
1806
|
+
focusVisible: isFocusVisible
|
|
1807
|
+
},
|
|
1808
|
+
updateInteractionVariant
|
|
1809
|
+
));
|
|
1788
1810
|
return /* @__PURE__ */ React.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React.createElement(RadioGroup, null, radio) }, radio);
|
|
1789
1811
|
}
|
|
1790
1812
|
function registerRadio(loader, overrides) {
|
|
@@ -1796,6 +1818,7 @@ function registerRadio(loader, overrides) {
|
|
|
1796
1818
|
displayName: "Aria Radio",
|
|
1797
1819
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
1798
1820
|
importName: "BaseRadio",
|
|
1821
|
+
interactionVariants: interactionVariants$2,
|
|
1799
1822
|
props: __spreadProps$4(__spreadValues$8({}, getCommonInputProps("radio", [
|
|
1800
1823
|
"isDisabled",
|
|
1801
1824
|
"autoFocus",
|
|
@@ -1806,48 +1829,12 @@ function registerRadio(loader, overrides) {
|
|
|
1806
1829
|
type: "string",
|
|
1807
1830
|
description: "The value of the input element, used when submitting an HTML form."
|
|
1808
1831
|
},
|
|
1809
|
-
onHoverChange: {
|
|
1810
|
-
type: "eventHandler",
|
|
1811
|
-
argTypes: [{ name: "isHovered", type: "boolean" }]
|
|
1812
|
-
},
|
|
1813
|
-
onFocusChange: {
|
|
1814
|
-
type: "eventHandler",
|
|
1815
|
-
argTypes: [{ name: "isFocused", type: "boolean" }]
|
|
1816
|
-
},
|
|
1817
|
-
onPressChange: {
|
|
1818
|
-
type: "eventHandler",
|
|
1819
|
-
argTypes: [{ name: "isPressed", type: "boolean" }]
|
|
1820
|
-
},
|
|
1821
|
-
onFocusVisibleChange: {
|
|
1822
|
-
type: "eventHandler",
|
|
1823
|
-
argTypes: [{ name: "isFocusVisible", type: "boolean" }]
|
|
1824
|
-
},
|
|
1825
1832
|
onSelectionChange: {
|
|
1826
1833
|
type: "eventHandler",
|
|
1827
1834
|
argTypes: [{ name: "isSelected", type: "boolean" }]
|
|
1828
1835
|
}
|
|
1829
1836
|
}),
|
|
1830
1837
|
states: {
|
|
1831
|
-
isHovered: {
|
|
1832
|
-
type: "readonly",
|
|
1833
|
-
onChangeProp: "onHoverChange",
|
|
1834
|
-
variableType: "boolean"
|
|
1835
|
-
},
|
|
1836
|
-
isPressed: {
|
|
1837
|
-
type: "readonly",
|
|
1838
|
-
onChangeProp: "onPressChange",
|
|
1839
|
-
variableType: "boolean"
|
|
1840
|
-
},
|
|
1841
|
-
isFocused: {
|
|
1842
|
-
type: "readonly",
|
|
1843
|
-
onChangeProp: "onFocusChange",
|
|
1844
|
-
variableType: "boolean"
|
|
1845
|
-
},
|
|
1846
|
-
isFocusVisible: {
|
|
1847
|
-
type: "readonly",
|
|
1848
|
-
onChangeProp: "onFocusVisibleChange",
|
|
1849
|
-
variableType: "boolean"
|
|
1850
|
-
},
|
|
1851
1838
|
isSelected: {
|
|
1852
1839
|
type: "readonly",
|
|
1853
1840
|
onChangeProp: "onSelectionChange",
|
|
@@ -1879,22 +1866,7 @@ var __spreadValues$7 = (a, b) => {
|
|
|
1879
1866
|
return a;
|
|
1880
1867
|
};
|
|
1881
1868
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1882
|
-
|
|
1883
|
-
var target = {};
|
|
1884
|
-
for (var prop in source)
|
|
1885
|
-
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1886
|
-
target[prop] = source[prop];
|
|
1887
|
-
if (source != null && __getOwnPropSymbols$7)
|
|
1888
|
-
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
1889
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
1890
|
-
target[prop] = source[prop];
|
|
1891
|
-
}
|
|
1892
|
-
return target;
|
|
1893
|
-
};
|
|
1894
|
-
function BaseRadioGroup(props) {
|
|
1895
|
-
const _a = props, { children } = _a, rest = __objRest$3(_a, ["children"]);
|
|
1896
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$7({}, rest), children));
|
|
1897
|
-
}
|
|
1869
|
+
const BaseRadioGroup = RadioGroup;
|
|
1898
1870
|
const componentName$1 = makeComponentName("radioGroup");
|
|
1899
1871
|
function registerRadioGroup(loader, overrides) {
|
|
1900
1872
|
registerComponentHelper(
|
|
@@ -1934,10 +1906,6 @@ function registerRadioGroup(loader, overrides) {
|
|
|
1934
1906
|
onChange: {
|
|
1935
1907
|
type: "eventHandler",
|
|
1936
1908
|
argTypes: [{ name: "value", type: "string" }]
|
|
1937
|
-
},
|
|
1938
|
-
onFocusChange: {
|
|
1939
|
-
type: "eventHandler",
|
|
1940
|
-
argTypes: [{ name: "isFocused", type: "boolean" }]
|
|
1941
1909
|
}
|
|
1942
1910
|
}),
|
|
1943
1911
|
states: {
|
|
@@ -1946,11 +1914,6 @@ function registerRadioGroup(loader, overrides) {
|
|
|
1946
1914
|
valueProp: "value",
|
|
1947
1915
|
onChangeProp: "onChange",
|
|
1948
1916
|
variableType: "array"
|
|
1949
|
-
},
|
|
1950
|
-
isFocused: {
|
|
1951
|
-
type: "readonly",
|
|
1952
|
-
onChangeProp: "onFocusChange",
|
|
1953
|
-
variableType: "boolean"
|
|
1954
1917
|
}
|
|
1955
1918
|
},
|
|
1956
1919
|
trapsFocus: true
|
|
@@ -2020,7 +1983,7 @@ var __spreadValues$5 = (a, b) => {
|
|
|
2020
1983
|
}
|
|
2021
1984
|
return a;
|
|
2022
1985
|
};
|
|
2023
|
-
var __objRest$
|
|
1986
|
+
var __objRest$4 = (source, exclude) => {
|
|
2024
1987
|
var target = {};
|
|
2025
1988
|
for (var prop in source)
|
|
2026
1989
|
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2035,7 +1998,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
2035
1998
|
function BaseSection(props) {
|
|
2036
1999
|
const contextProps = React.useContext(PlasmicSectionContext);
|
|
2037
2000
|
const mergedProps = mergeProps(contextProps, props);
|
|
2038
|
-
const _a = mergedProps, { section, renderHeader, key, makeItemProps, renderItem } = _a, rest = __objRest$
|
|
2001
|
+
const _a = mergedProps, { section, renderHeader, key, makeItemProps, renderItem } = _a, rest = __objRest$4(_a, ["section", "renderHeader", "key", "makeItemProps", "renderItem"]);
|
|
2039
2002
|
return /* @__PURE__ */ React.createElement(Section, __spreadValues$5({ id: key != null ? key : void 0 }, rest), /* @__PURE__ */ React.createElement(PlasmicHeaderContext.Provider, { value: { children: section == null ? void 0 : section.label } }, renderHeader == null ? void 0 : renderHeader(section)), /* @__PURE__ */ React.createElement(Collection, { items: section == null ? void 0 : section.items }, (item) => {
|
|
2040
2003
|
const itemProps = makeItemProps == null ? void 0 : makeItemProps(item);
|
|
2041
2004
|
return /* @__PURE__ */ React.createElement(PlasmicItemContext.Provider, { key: itemProps == null ? void 0 : itemProps.key, value: itemProps }, renderItem == null ? void 0 : renderItem(item));
|
|
@@ -2276,7 +2239,40 @@ var __spreadValues$3 = (a, b) => {
|
|
|
2276
2239
|
return a;
|
|
2277
2240
|
};
|
|
2278
2241
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2279
|
-
|
|
2242
|
+
var __objRest$3 = (source, exclude) => {
|
|
2243
|
+
var target = {};
|
|
2244
|
+
for (var prop in source)
|
|
2245
|
+
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2246
|
+
target[prop] = source[prop];
|
|
2247
|
+
if (source != null && __getOwnPropSymbols$3)
|
|
2248
|
+
for (var prop of __getOwnPropSymbols$3(source)) {
|
|
2249
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
|
|
2250
|
+
target[prop] = source[prop];
|
|
2251
|
+
}
|
|
2252
|
+
return target;
|
|
2253
|
+
};
|
|
2254
|
+
const SWITCH_INTERACTION_VARIANTS = [
|
|
2255
|
+
"hovered",
|
|
2256
|
+
"pressed",
|
|
2257
|
+
"focused",
|
|
2258
|
+
"focusVisible"
|
|
2259
|
+
];
|
|
2260
|
+
const { interactionVariants: interactionVariants$1, withObservedValues } = pickAriaComponentVariants(
|
|
2261
|
+
SWITCH_INTERACTION_VARIANTS
|
|
2262
|
+
);
|
|
2263
|
+
function BaseSwitch(props) {
|
|
2264
|
+
const _a = props, { children, updateInteractionVariant } = _a, rest = __objRest$3(_a, ["children", "updateInteractionVariant"]);
|
|
2265
|
+
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({ isHovered, isPressed, isFocused, isFocusVisible }) => withObservedValues(
|
|
2266
|
+
children,
|
|
2267
|
+
{
|
|
2268
|
+
hovered: isHovered,
|
|
2269
|
+
pressed: isPressed,
|
|
2270
|
+
focused: isFocused,
|
|
2271
|
+
focusVisible: isFocusVisible
|
|
2272
|
+
},
|
|
2273
|
+
updateInteractionVariant
|
|
2274
|
+
));
|
|
2275
|
+
}
|
|
2280
2276
|
function registerSwitch(loader, overrides) {
|
|
2281
2277
|
registerComponentHelper(
|
|
2282
2278
|
loader,
|
|
@@ -2286,6 +2282,7 @@ function registerSwitch(loader, overrides) {
|
|
|
2286
2282
|
displayName: "Aria Switch",
|
|
2287
2283
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSwitch",
|
|
2288
2284
|
importName: "BaseSwitch",
|
|
2285
|
+
interactionVariants: interactionVariants$1,
|
|
2289
2286
|
props: __spreadProps$2(__spreadValues$3({}, getCommonInputProps("switch", [
|
|
2290
2287
|
"name",
|
|
2291
2288
|
"isDisabled",
|
|
@@ -2304,10 +2301,6 @@ function registerSwitch(loader, overrides) {
|
|
|
2304
2301
|
onChange: {
|
|
2305
2302
|
type: "eventHandler",
|
|
2306
2303
|
argTypes: [{ name: "isSelected", type: "boolean" }]
|
|
2307
|
-
},
|
|
2308
|
-
onHoverChange: {
|
|
2309
|
-
type: "eventHandler",
|
|
2310
|
-
argTypes: [{ name: "isHovered", type: "boolean" }]
|
|
2311
2304
|
}
|
|
2312
2305
|
}),
|
|
2313
2306
|
states: {
|
|
@@ -2316,11 +2309,6 @@ function registerSwitch(loader, overrides) {
|
|
|
2316
2309
|
valueProp: "value",
|
|
2317
2310
|
onChangeProp: "onChange",
|
|
2318
2311
|
variableType: "boolean"
|
|
2319
|
-
},
|
|
2320
|
-
isHovered: {
|
|
2321
|
-
type: "readonly",
|
|
2322
|
-
onChangeProp: "onHoverChange",
|
|
2323
|
-
variableType: "boolean"
|
|
2324
2312
|
}
|
|
2325
2313
|
},
|
|
2326
2314
|
trapsFocus: true
|
|
@@ -2345,8 +2333,45 @@ var __spreadValues$2 = (a, b) => {
|
|
|
2345
2333
|
}
|
|
2346
2334
|
return a;
|
|
2347
2335
|
};
|
|
2336
|
+
var __objRest$2 = (source, exclude) => {
|
|
2337
|
+
var target = {};
|
|
2338
|
+
for (var prop in source)
|
|
2339
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2340
|
+
target[prop] = source[prop];
|
|
2341
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
2342
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
2343
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
2344
|
+
target[prop] = source[prop];
|
|
2345
|
+
}
|
|
2346
|
+
return target;
|
|
2347
|
+
};
|
|
2348
|
+
const TEXTAREA_INTERACTION_VARIANTS = ["focused", "hovered"];
|
|
2349
|
+
const { interactionVariants } = pickAriaComponentVariants(
|
|
2350
|
+
TEXTAREA_INTERACTION_VARIANTS
|
|
2351
|
+
);
|
|
2348
2352
|
function BaseTextArea(props) {
|
|
2349
|
-
|
|
2353
|
+
const _a = props, { disabled, updateInteractionVariant } = _a, rest = __objRest$2(_a, ["disabled", "updateInteractionVariant"]);
|
|
2354
|
+
return /* @__PURE__ */ React.createElement(
|
|
2355
|
+
TextArea,
|
|
2356
|
+
__spreadValues$2({
|
|
2357
|
+
onFocus: () => {
|
|
2358
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
2359
|
+
focused: true
|
|
2360
|
+
});
|
|
2361
|
+
},
|
|
2362
|
+
onBlur: () => {
|
|
2363
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
2364
|
+
focused: false
|
|
2365
|
+
});
|
|
2366
|
+
},
|
|
2367
|
+
onHoverChange: (isHovered) => {
|
|
2368
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
2369
|
+
hovered: isHovered
|
|
2370
|
+
});
|
|
2371
|
+
},
|
|
2372
|
+
disabled
|
|
2373
|
+
}, rest)
|
|
2374
|
+
);
|
|
2350
2375
|
}
|
|
2351
2376
|
function registerTextArea(loader, overrides) {
|
|
2352
2377
|
registerComponentHelper(
|
|
@@ -2357,9 +2382,30 @@ function registerTextArea(loader, overrides) {
|
|
|
2357
2382
|
displayName: "Aria TextArea",
|
|
2358
2383
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextArea",
|
|
2359
2384
|
importName: "BaseTextArea",
|
|
2385
|
+
interactionVariants,
|
|
2360
2386
|
props: {
|
|
2361
2387
|
placeholder: {
|
|
2362
2388
|
type: "string"
|
|
2389
|
+
},
|
|
2390
|
+
onKeyDown: {
|
|
2391
|
+
type: "eventHandler",
|
|
2392
|
+
argTypes: [{ name: "keyboardEvent", type: "object" }]
|
|
2393
|
+
},
|
|
2394
|
+
onKeyUp: {
|
|
2395
|
+
type: "eventHandler",
|
|
2396
|
+
argTypes: [{ name: "keyboardEvent", type: "object" }]
|
|
2397
|
+
},
|
|
2398
|
+
onCopy: {
|
|
2399
|
+
type: "eventHandler",
|
|
2400
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }]
|
|
2401
|
+
},
|
|
2402
|
+
onCut: {
|
|
2403
|
+
type: "eventHandler",
|
|
2404
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }]
|
|
2405
|
+
},
|
|
2406
|
+
onPaste: {
|
|
2407
|
+
type: "eventHandler",
|
|
2408
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }]
|
|
2363
2409
|
}
|
|
2364
2410
|
},
|
|
2365
2411
|
trapsFocus: true
|
|
@@ -2572,9 +2618,61 @@ function registerTextField(loader, overrides) {
|
|
|
2572
2618
|
type: "eventHandler",
|
|
2573
2619
|
argTypes: [{ name: "value", type: "string" }]
|
|
2574
2620
|
},
|
|
2621
|
+
onFocus: {
|
|
2622
|
+
type: "eventHandler",
|
|
2623
|
+
argTypes: [{ name: "focusEvent", type: "object" }]
|
|
2624
|
+
},
|
|
2625
|
+
onBlur: {
|
|
2626
|
+
type: "eventHandler",
|
|
2627
|
+
argTypes: [{ name: "focusEvent", type: "object" }]
|
|
2628
|
+
},
|
|
2575
2629
|
onFocusChange: {
|
|
2576
2630
|
type: "eventHandler",
|
|
2577
2631
|
argTypes: [{ name: "isFocused", type: "boolean" }]
|
|
2632
|
+
},
|
|
2633
|
+
onKeyDown: {
|
|
2634
|
+
type: "eventHandler",
|
|
2635
|
+
argTypes: [{ name: "keyboardEvent", type: "object" }]
|
|
2636
|
+
},
|
|
2637
|
+
onKeyUp: {
|
|
2638
|
+
type: "eventHandler",
|
|
2639
|
+
argTypes: [{ name: "keyboardEvent", type: "object" }]
|
|
2640
|
+
},
|
|
2641
|
+
onCopy: {
|
|
2642
|
+
type: "eventHandler",
|
|
2643
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }]
|
|
2644
|
+
},
|
|
2645
|
+
onCut: {
|
|
2646
|
+
type: "eventHandler",
|
|
2647
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }]
|
|
2648
|
+
},
|
|
2649
|
+
onPaste: {
|
|
2650
|
+
type: "eventHandler",
|
|
2651
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }]
|
|
2652
|
+
},
|
|
2653
|
+
onCompositionStart: {
|
|
2654
|
+
type: "eventHandler",
|
|
2655
|
+
argTypes: [{ name: "compositionEvent", type: "object" }]
|
|
2656
|
+
},
|
|
2657
|
+
onCompositionEnd: {
|
|
2658
|
+
type: "eventHandler",
|
|
2659
|
+
argTypes: [{ name: "compositionEvent", type: "object" }]
|
|
2660
|
+
},
|
|
2661
|
+
onCompositionUpdate: {
|
|
2662
|
+
type: "eventHandler",
|
|
2663
|
+
argTypes: [{ name: "compositionEvent", type: "object" }]
|
|
2664
|
+
},
|
|
2665
|
+
onSelect: {
|
|
2666
|
+
type: "eventHandler",
|
|
2667
|
+
argTypes: [{ name: "selectionEvent", type: "object" }]
|
|
2668
|
+
},
|
|
2669
|
+
onBeforeInput: {
|
|
2670
|
+
type: "eventHandler",
|
|
2671
|
+
argTypes: [{ name: "inputEvent", type: "object" }]
|
|
2672
|
+
},
|
|
2673
|
+
onInput: {
|
|
2674
|
+
type: "eventHandler",
|
|
2675
|
+
argTypes: [{ name: "inputEvent", type: "object" }]
|
|
2578
2676
|
}
|
|
2579
2677
|
}),
|
|
2580
2678
|
// NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented
|
|
@@ -2584,11 +2682,6 @@ function registerTextField(loader, overrides) {
|
|
|
2584
2682
|
valueProp: "value",
|
|
2585
2683
|
onChangeProp: "onChange",
|
|
2586
2684
|
variableType: "text"
|
|
2587
|
-
},
|
|
2588
|
-
isFocused: {
|
|
2589
|
-
type: "readonly",
|
|
2590
|
-
onChangeProp: "onFocusChange",
|
|
2591
|
-
variableType: "boolean"
|
|
2592
2685
|
}
|
|
2593
2686
|
},
|
|
2594
2687
|
trapsFocus: true
|