@plasmicpkgs/react-aria 0.0.39 → 0.0.41
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 +3 -2
- package/dist/interaction-variant-utils.d.ts +16 -0
- package/dist/react-aria.esm.js +707 -428
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +695 -416
- package/dist/react-aria.js.map +1 -1
- package/dist/registerButton.d.ts +1 -1
- package/dist/registerCheckbox.d.ts +1 -1
- package/dist/registerCheckboxGroup.d.ts +8 -1
- package/dist/registerInput.d.ts +3 -2
- package/dist/registerRadio.d.ts +1 -1
- package/dist/registerRadioGroup.d.ts +9 -2
- package/dist/registerSlider.d.ts +5 -0
- package/dist/registerSliderOutput.d.ts +10 -2
- package/dist/registerSliderThumb.d.ts +1 -1
- package/dist/registerSwitch.d.ts +1 -1
- package/dist/registerTextArea.d.ts +3 -2
- package/dist/registerTextField.d.ts +4 -1
- package/package.json +3 -3
- package/skinny/{contexts-9475faad.esm.js → contexts-21e0d928.esm.js} +3 -2
- package/skinny/{contexts-9475faad.esm.js.map → contexts-21e0d928.esm.js.map} +1 -1
- package/skinny/{contexts-b21f6b12.cjs.js → contexts-7236059e.cjs.js} +3 -1
- package/skinny/{contexts-b21f6b12.cjs.js.map → contexts-7236059e.cjs.js.map} +1 -1
- package/skinny/contexts.d.ts +3 -2
- package/skinny/{interaction-variant-utils-244b74fb.cjs.js → interaction-variant-utils-36f1b397.cjs.js} +17 -1
- package/skinny/{interaction-variant-utils-244b74fb.cjs.js.map → interaction-variant-utils-36f1b397.cjs.js.map} +1 -1
- package/skinny/{interaction-variant-utils-c44a9d56.esm.js → interaction-variant-utils-abd0c319.esm.js} +17 -1
- package/skinny/{interaction-variant-utils-c44a9d56.esm.js.map → interaction-variant-utils-abd0c319.esm.js.map} +1 -1
- package/skinny/interaction-variant-utils.d.ts +16 -0
- package/skinny/registerButton.cjs.js +6 -4
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.d.ts +1 -1
- package/skinny/registerButton.esm.js +6 -4
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +22 -5
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +1 -1
- package/skinny/registerCheckbox.esm.js +22 -5
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +31 -3
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.d.ts +8 -1
- package/skinny/registerCheckboxGroup.esm.js +31 -3
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +4 -3
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +4 -3
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDialogTrigger.cjs.js +2 -2
- package/skinny/registerDialogTrigger.esm.js +2 -2
- package/skinny/registerHeader.cjs.js +1 -1
- package/skinny/registerHeader.esm.js +1 -1
- package/skinny/registerInput.cjs.js +28 -4
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.d.ts +3 -2
- package/skinny/registerInput.esm.js +29 -5
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/{registerListBox-cbc7beea.esm.js → registerListBox-38a08460.esm.js} +2 -2
- package/skinny/{registerListBox-cbc7beea.esm.js.map → registerListBox-38a08460.esm.js.map} +1 -1
- package/skinny/{registerListBox-e98e849f.cjs.js → registerListBox-f060da58.cjs.js} +2 -2
- package/skinny/{registerListBox-e98e849f.cjs.js.map → registerListBox-f060da58.cjs.js.map} +1 -1
- package/skinny/registerListBox.cjs.js +2 -2
- package/skinny/registerListBox.esm.js +2 -2
- 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 +19 -5
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.d.ts +1 -1
- package/skinny/registerRadio.esm.js +19 -5
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +31 -3
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.d.ts +9 -2
- package/skinny/registerRadioGroup.esm.js +31 -3
- 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 +5 -5
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +5 -5
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/{registerSlider-22197722.cjs.js → registerSlider-58ef7e20.cjs.js} +48 -8
- package/skinny/registerSlider-58ef7e20.cjs.js.map +1 -0
- package/skinny/{registerSlider-3045cc63.esm.js → registerSlider-d74e2330.esm.js} +48 -8
- package/skinny/registerSlider-d74e2330.esm.js.map +1 -0
- package/skinny/registerSlider.cjs.js +3 -3
- package/skinny/registerSlider.d.ts +5 -0
- package/skinny/registerSlider.esm.js +3 -3
- package/skinny/registerSliderOutput.cjs.js +49 -1
- package/skinny/registerSliderOutput.cjs.js.map +1 -1
- package/skinny/registerSliderOutput.d.ts +10 -2
- package/skinny/registerSliderOutput.esm.js +45 -1
- package/skinny/registerSliderOutput.esm.js.map +1 -1
- package/skinny/registerSliderThumb.cjs.js +17 -7
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.d.ts +1 -1
- package/skinny/registerSliderThumb.esm.js +17 -7
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +3 -3
- package/skinny/registerSliderTrack.esm.js +3 -3
- package/skinny/registerSwitch.cjs.js +18 -4
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.d.ts +1 -1
- package/skinny/registerSwitch.esm.js +18 -4
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerTextArea.cjs.js +29 -6
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.d.ts +3 -2
- package/skinny/registerTextArea.esm.js +30 -7
- package/skinny/registerTextArea.esm.js.map +1 -1
- package/skinny/registerTextField.cjs.js +32 -5
- package/skinny/registerTextField.cjs.js.map +1 -1
- package/skinny/registerTextField.d.ts +4 -1
- package/skinny/registerTextField.esm.js +32 -5
- package/skinny/registerTextField.esm.js.map +1 -1
- package/skinny/registerSlider-22197722.cjs.js.map +0 -1
- package/skinny/registerSlider-3045cc63.esm.js.map +0 -1
package/dist/react-aria.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { Component, forwardRef, useImperativeHandle, useMemo, useRef
|
|
1
|
+
import React, { useEffect, Component, forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
|
|
2
2
|
import { Button, Label, Checkbox, Text, FieldError, CheckboxGroup, Input, ListBoxItem, ListBox, Header, Section, Collection, PopoverContext, SelectContext, Popover, ComboBox, ComboBoxStateContext, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Form, Radio, RadioGroup, Select, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField } from 'react-aria-components';
|
|
3
3
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
4
4
|
import { useFilter } from '@react-aria/i18n';
|
|
5
|
-
import { mergeProps } from '
|
|
5
|
+
import { mergeProps, useTooltipTrigger } from 'react-aria';
|
|
6
|
+
import { mergeProps as mergeProps$1 } from '@react-aria/utils';
|
|
6
7
|
import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
7
|
-
import { mergeProps as mergeProps$1, useTooltipTrigger } from 'react-aria';
|
|
8
8
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
9
9
|
import { useTooltipTriggerState } from 'react-stately';
|
|
10
10
|
|
|
@@ -78,6 +78,22 @@ const ARIA_COMPONENTS_INTERACTION_VARIANTS = {
|
|
|
78
78
|
dragging: {
|
|
79
79
|
cssSelector: "[data-dragging]",
|
|
80
80
|
displayName: "Dragging"
|
|
81
|
+
},
|
|
82
|
+
selected: {
|
|
83
|
+
cssSelector: "[data-selected]",
|
|
84
|
+
displayName: "Selected"
|
|
85
|
+
},
|
|
86
|
+
readonly: {
|
|
87
|
+
cssSelector: "[data-readonly]",
|
|
88
|
+
displayName: "Read Only"
|
|
89
|
+
},
|
|
90
|
+
disabled: {
|
|
91
|
+
cssSelector: "[data-disabled]",
|
|
92
|
+
displayName: "Disabled"
|
|
93
|
+
},
|
|
94
|
+
indeterminate: {
|
|
95
|
+
cssSelector: "[data-indeterminate]",
|
|
96
|
+
displayName: "Indeterminate"
|
|
81
97
|
}
|
|
82
98
|
};
|
|
83
99
|
function ChangesObserver({
|
|
@@ -111,29 +127,29 @@ function pickAriaComponentVariants(keys) {
|
|
|
111
127
|
};
|
|
112
128
|
}
|
|
113
129
|
|
|
114
|
-
var __defProp$
|
|
115
|
-
var __defProps$
|
|
116
|
-
var __getOwnPropDescs$
|
|
117
|
-
var __getOwnPropSymbols$
|
|
118
|
-
var __hasOwnProp$
|
|
119
|
-
var __propIsEnum$
|
|
120
|
-
var __defNormalProp$
|
|
121
|
-
var __spreadValues$
|
|
130
|
+
var __defProp$r = Object.defineProperty;
|
|
131
|
+
var __defProps$e = Object.defineProperties;
|
|
132
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
133
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
134
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
135
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
136
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
137
|
+
var __spreadValues$r = (a, b) => {
|
|
122
138
|
for (var prop in b || (b = {}))
|
|
123
|
-
if (__hasOwnProp$
|
|
124
|
-
__defNormalProp$
|
|
125
|
-
if (__getOwnPropSymbols$
|
|
126
|
-
for (var prop of __getOwnPropSymbols$
|
|
127
|
-
if (__propIsEnum$
|
|
128
|
-
__defNormalProp$
|
|
139
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
140
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
141
|
+
if (__getOwnPropSymbols$r)
|
|
142
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
143
|
+
if (__propIsEnum$r.call(b, prop))
|
|
144
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
129
145
|
}
|
|
130
146
|
return a;
|
|
131
147
|
};
|
|
132
|
-
var __spreadProps$
|
|
148
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
133
149
|
function registerComponentHelper(loader, component, meta, overrides) {
|
|
134
150
|
if (overrides) {
|
|
135
|
-
meta = __spreadProps$
|
|
136
|
-
props: __spreadValues$
|
|
151
|
+
meta = __spreadProps$e(__spreadValues$r(__spreadValues$r({}, meta), overrides), {
|
|
152
|
+
props: __spreadValues$r(__spreadValues$r({}, meta.props), overrides.props)
|
|
137
153
|
});
|
|
138
154
|
if (overrides.parentComponentName) {
|
|
139
155
|
meta.name = makeChildComponentName(
|
|
@@ -173,33 +189,33 @@ function isDefined(thing) {
|
|
|
173
189
|
return thing !== void 0 && thing !== null;
|
|
174
190
|
}
|
|
175
191
|
|
|
176
|
-
var __defProp$
|
|
177
|
-
var __defProps$
|
|
178
|
-
var __getOwnPropDescs$
|
|
179
|
-
var __getOwnPropSymbols$
|
|
180
|
-
var __hasOwnProp$
|
|
181
|
-
var __propIsEnum$
|
|
182
|
-
var __defNormalProp$
|
|
183
|
-
var __spreadValues$
|
|
192
|
+
var __defProp$q = Object.defineProperty;
|
|
193
|
+
var __defProps$d = Object.defineProperties;
|
|
194
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
195
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
196
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
197
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
198
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
199
|
+
var __spreadValues$q = (a, b) => {
|
|
184
200
|
for (var prop in b || (b = {}))
|
|
185
|
-
if (__hasOwnProp$
|
|
186
|
-
__defNormalProp$
|
|
187
|
-
if (__getOwnPropSymbols$
|
|
188
|
-
for (var prop of __getOwnPropSymbols$
|
|
189
|
-
if (__propIsEnum$
|
|
190
|
-
__defNormalProp$
|
|
201
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
202
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
203
|
+
if (__getOwnPropSymbols$q)
|
|
204
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
205
|
+
if (__propIsEnum$q.call(b, prop))
|
|
206
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
191
207
|
}
|
|
192
208
|
return a;
|
|
193
209
|
};
|
|
194
|
-
var __spreadProps$
|
|
195
|
-
var __objRest$
|
|
210
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
211
|
+
var __objRest$k = (source, exclude) => {
|
|
196
212
|
var target = {};
|
|
197
213
|
for (var prop in source)
|
|
198
|
-
if (__hasOwnProp$
|
|
214
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
199
215
|
target[prop] = source[prop];
|
|
200
|
-
if (source != null && __getOwnPropSymbols$
|
|
201
|
-
for (var prop of __getOwnPropSymbols$
|
|
202
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
216
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
217
|
+
for (var prop of __getOwnPropSymbols$q(source)) {
|
|
218
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
|
|
203
219
|
target[prop] = source[prop];
|
|
204
220
|
}
|
|
205
221
|
return target;
|
|
@@ -208,9 +224,10 @@ const BUTTON_INTERACTION_VARIANTS = [
|
|
|
208
224
|
"hovered",
|
|
209
225
|
"pressed",
|
|
210
226
|
"focused",
|
|
211
|
-
"focusVisible"
|
|
227
|
+
"focusVisible",
|
|
228
|
+
"disabled"
|
|
212
229
|
];
|
|
213
|
-
const { interactionVariants: interactionVariants$
|
|
230
|
+
const { interactionVariants: interactionVariants$c, withObservedValues: withObservedValues$a } = pickAriaComponentVariants(
|
|
214
231
|
BUTTON_INTERACTION_VARIANTS
|
|
215
232
|
);
|
|
216
233
|
function BaseButton(props) {
|
|
@@ -219,20 +236,21 @@ function BaseButton(props) {
|
|
|
219
236
|
resetsForm,
|
|
220
237
|
children,
|
|
221
238
|
updateInteractionVariant
|
|
222
|
-
} = _a, rest = __objRest$
|
|
239
|
+
} = _a, rest = __objRest$k(_a, [
|
|
223
240
|
"submitsForm",
|
|
224
241
|
"resetsForm",
|
|
225
242
|
"children",
|
|
226
243
|
"updateInteractionVariant"
|
|
227
244
|
]);
|
|
228
245
|
const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
|
|
229
|
-
return /* @__PURE__ */ React.createElement(Button, __spreadValues$
|
|
246
|
+
return /* @__PURE__ */ React.createElement(Button, __spreadValues$q({ type }, rest), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$a(
|
|
230
247
|
children,
|
|
231
248
|
{
|
|
232
249
|
hovered: isHovered,
|
|
233
250
|
pressed: isPressed,
|
|
234
251
|
focused: isFocused,
|
|
235
|
-
focusVisible: isFocusVisible
|
|
252
|
+
focusVisible: isFocusVisible,
|
|
253
|
+
disabled: isDisabled
|
|
236
254
|
},
|
|
237
255
|
updateInteractionVariant
|
|
238
256
|
));
|
|
@@ -247,7 +265,7 @@ function registerButton(loader, overrides) {
|
|
|
247
265
|
displayName: "Aria Button",
|
|
248
266
|
importPath: "@plasmicpkgs/react-aria/skinny/registerButton",
|
|
249
267
|
importName: "BaseButton",
|
|
250
|
-
interactionVariants: interactionVariants$
|
|
268
|
+
interactionVariants: interactionVariants$c,
|
|
251
269
|
defaultStyles: {
|
|
252
270
|
borderWidth: "1px",
|
|
253
271
|
borderStyle: "solid",
|
|
@@ -255,7 +273,7 @@ function registerButton(loader, overrides) {
|
|
|
255
273
|
padding: "2px 10px",
|
|
256
274
|
cursor: "pointer"
|
|
257
275
|
},
|
|
258
|
-
props: __spreadProps$
|
|
276
|
+
props: __spreadProps$d(__spreadValues$q({}, getCommonInputProps("button", [
|
|
259
277
|
"isDisabled",
|
|
260
278
|
"aria-label"
|
|
261
279
|
])), {
|
|
@@ -294,6 +312,7 @@ function registerButton(loader, overrides) {
|
|
|
294
312
|
);
|
|
295
313
|
}
|
|
296
314
|
|
|
315
|
+
const PlasmicTextFieldContext = React.createContext(void 0);
|
|
297
316
|
const PlasmicCheckboxGroupContext = React.createContext(void 0);
|
|
298
317
|
const PlasmicRadioGroupContext = React.createContext(void 0);
|
|
299
318
|
const PlasmicDialogTriggerContext = React.createContext(void 0);
|
|
@@ -331,33 +350,33 @@ function registerLabel(loader, overrides) {
|
|
|
331
350
|
);
|
|
332
351
|
}
|
|
333
352
|
|
|
334
|
-
var __defProp$
|
|
335
|
-
var __defProps$
|
|
336
|
-
var __getOwnPropDescs$
|
|
337
|
-
var __getOwnPropSymbols$
|
|
338
|
-
var __hasOwnProp$
|
|
339
|
-
var __propIsEnum$
|
|
340
|
-
var __defNormalProp$
|
|
341
|
-
var __spreadValues$
|
|
353
|
+
var __defProp$p = Object.defineProperty;
|
|
354
|
+
var __defProps$c = Object.defineProperties;
|
|
355
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
356
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
357
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
358
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
359
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
360
|
+
var __spreadValues$p = (a, b) => {
|
|
342
361
|
for (var prop in b || (b = {}))
|
|
343
|
-
if (__hasOwnProp$
|
|
344
|
-
__defNormalProp$
|
|
345
|
-
if (__getOwnPropSymbols$
|
|
346
|
-
for (var prop of __getOwnPropSymbols$
|
|
347
|
-
if (__propIsEnum$
|
|
348
|
-
__defNormalProp$
|
|
362
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
363
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
364
|
+
if (__getOwnPropSymbols$p)
|
|
365
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
366
|
+
if (__propIsEnum$p.call(b, prop))
|
|
367
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
349
368
|
}
|
|
350
369
|
return a;
|
|
351
370
|
};
|
|
352
|
-
var __spreadProps$
|
|
353
|
-
var __objRest$
|
|
371
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
372
|
+
var __objRest$j = (source, exclude) => {
|
|
354
373
|
var target = {};
|
|
355
374
|
for (var prop in source)
|
|
356
|
-
if (__hasOwnProp$
|
|
375
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
357
376
|
target[prop] = source[prop];
|
|
358
|
-
if (source != null && __getOwnPropSymbols$
|
|
359
|
-
for (var prop of __getOwnPropSymbols$
|
|
360
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
377
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
378
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
379
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
361
380
|
target[prop] = source[prop];
|
|
362
381
|
}
|
|
363
382
|
return target;
|
|
@@ -366,25 +385,42 @@ const CHECKBOX_INTERACTION_VARIANTS = [
|
|
|
366
385
|
"hovered",
|
|
367
386
|
"pressed",
|
|
368
387
|
"focused",
|
|
369
|
-
"focusVisible"
|
|
388
|
+
"focusVisible",
|
|
389
|
+
"indeterminate",
|
|
390
|
+
"disabled",
|
|
391
|
+
"selected",
|
|
392
|
+
"readonly"
|
|
370
393
|
];
|
|
371
|
-
const { interactionVariants: interactionVariants$
|
|
394
|
+
const { interactionVariants: interactionVariants$b, withObservedValues: withObservedValues$9 } = pickAriaComponentVariants(
|
|
372
395
|
CHECKBOX_INTERACTION_VARIANTS
|
|
373
396
|
);
|
|
374
397
|
function BaseCheckbox(props) {
|
|
375
|
-
const _a = props, { children, updateInteractionVariant, setControlContextData } = _a, rest = __objRest$
|
|
398
|
+
const _a = props, { children, updateInteractionVariant, setControlContextData } = _a, rest = __objRest$j(_a, ["children", "updateInteractionVariant", "setControlContextData"]);
|
|
376
399
|
const contextProps = React.useContext(PlasmicCheckboxGroupContext);
|
|
377
400
|
const isStandalone = !contextProps;
|
|
378
401
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
379
402
|
isStandalone
|
|
380
403
|
});
|
|
381
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$
|
|
404
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$p({}, rest), ({
|
|
405
|
+
isHovered,
|
|
406
|
+
isPressed,
|
|
407
|
+
isFocused,
|
|
408
|
+
isFocusVisible,
|
|
409
|
+
isDisabled,
|
|
410
|
+
isIndeterminate,
|
|
411
|
+
isSelected,
|
|
412
|
+
isReadOnly
|
|
413
|
+
}) => withObservedValues$9(
|
|
382
414
|
children,
|
|
383
415
|
{
|
|
384
416
|
hovered: isHovered,
|
|
385
417
|
pressed: isPressed,
|
|
386
418
|
focused: isFocused,
|
|
387
|
-
focusVisible: isFocusVisible
|
|
419
|
+
focusVisible: isFocusVisible,
|
|
420
|
+
disabled: isDisabled,
|
|
421
|
+
indeterminate: isIndeterminate,
|
|
422
|
+
selected: isSelected,
|
|
423
|
+
readonly: isReadOnly
|
|
388
424
|
},
|
|
389
425
|
updateInteractionVariant
|
|
390
426
|
)));
|
|
@@ -450,8 +486,8 @@ function registerCheckbox(loader, overrides) {
|
|
|
450
486
|
displayName: "Aria Checkbox",
|
|
451
487
|
importPath: "@plasmicpkgs/react-aria/skinny/registerCheckbox",
|
|
452
488
|
importName: "BaseCheckbox",
|
|
453
|
-
interactionVariants: interactionVariants$
|
|
454
|
-
props: __spreadProps$
|
|
489
|
+
interactionVariants: interactionVariants$b,
|
|
490
|
+
props: __spreadProps$c(__spreadValues$p({}, getCommonInputProps("checkbox", [
|
|
455
491
|
"name",
|
|
456
492
|
"isDisabled",
|
|
457
493
|
"isReadOnly",
|
|
@@ -517,37 +553,37 @@ function registerCheckbox(loader, overrides) {
|
|
|
517
553
|
);
|
|
518
554
|
}
|
|
519
555
|
|
|
520
|
-
var __defProp$
|
|
521
|
-
var __getOwnPropSymbols$
|
|
522
|
-
var __hasOwnProp$
|
|
523
|
-
var __propIsEnum$
|
|
524
|
-
var __defNormalProp$
|
|
525
|
-
var __spreadValues$
|
|
556
|
+
var __defProp$o = Object.defineProperty;
|
|
557
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
558
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
559
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
560
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
561
|
+
var __spreadValues$o = (a, b) => {
|
|
526
562
|
for (var prop in b || (b = {}))
|
|
527
|
-
if (__hasOwnProp$
|
|
528
|
-
__defNormalProp$
|
|
529
|
-
if (__getOwnPropSymbols$
|
|
530
|
-
for (var prop of __getOwnPropSymbols$
|
|
531
|
-
if (__propIsEnum$
|
|
532
|
-
__defNormalProp$
|
|
563
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
564
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
565
|
+
if (__getOwnPropSymbols$o)
|
|
566
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
567
|
+
if (__propIsEnum$o.call(b, prop))
|
|
568
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
533
569
|
}
|
|
534
570
|
return a;
|
|
535
571
|
};
|
|
536
|
-
var __objRest$
|
|
572
|
+
var __objRest$i = (source, exclude) => {
|
|
537
573
|
var target = {};
|
|
538
574
|
for (var prop in source)
|
|
539
|
-
if (__hasOwnProp$
|
|
575
|
+
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
540
576
|
target[prop] = source[prop];
|
|
541
|
-
if (source != null && __getOwnPropSymbols$
|
|
542
|
-
for (var prop of __getOwnPropSymbols$
|
|
543
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
577
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
578
|
+
for (var prop of __getOwnPropSymbols$o(source)) {
|
|
579
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
|
|
544
580
|
target[prop] = source[prop];
|
|
545
581
|
}
|
|
546
582
|
return target;
|
|
547
583
|
};
|
|
548
584
|
function BaseText(_a) {
|
|
549
|
-
var _b = _a, { children } = _b, rest = __objRest$
|
|
550
|
-
return /* @__PURE__ */ React.createElement(Text, __spreadValues$
|
|
585
|
+
var _b = _a, { children } = _b, rest = __objRest$i(_b, ["children"]);
|
|
586
|
+
return /* @__PURE__ */ React.createElement(Text, __spreadValues$o({}, rest), children);
|
|
551
587
|
}
|
|
552
588
|
const TEXT_COMPONENT_NAME = makeComponentName("text");
|
|
553
589
|
function registerText(loader, overrides) {
|
|
@@ -581,28 +617,28 @@ function registerText(loader, overrides) {
|
|
|
581
617
|
);
|
|
582
618
|
}
|
|
583
619
|
|
|
584
|
-
var __defProp$
|
|
585
|
-
var __defProps$
|
|
586
|
-
var __getOwnPropDescs$
|
|
587
|
-
var __getOwnPropSymbols$
|
|
588
|
-
var __hasOwnProp$
|
|
589
|
-
var __propIsEnum$
|
|
590
|
-
var __defNormalProp$
|
|
591
|
-
var __spreadValues$
|
|
620
|
+
var __defProp$n = Object.defineProperty;
|
|
621
|
+
var __defProps$b = Object.defineProperties;
|
|
622
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
623
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
624
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
625
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
626
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
627
|
+
var __spreadValues$n = (a, b) => {
|
|
592
628
|
for (var prop in b || (b = {}))
|
|
593
|
-
if (__hasOwnProp$
|
|
594
|
-
__defNormalProp$
|
|
595
|
-
if (__getOwnPropSymbols$
|
|
596
|
-
for (var prop of __getOwnPropSymbols$
|
|
597
|
-
if (__propIsEnum$
|
|
598
|
-
__defNormalProp$
|
|
629
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
630
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
631
|
+
if (__getOwnPropSymbols$n)
|
|
632
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
633
|
+
if (__propIsEnum$n.call(b, prop))
|
|
634
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
599
635
|
}
|
|
600
636
|
return a;
|
|
601
637
|
};
|
|
602
|
-
var __spreadProps$
|
|
638
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
603
639
|
const DESCRIPTION_COMPONENT_NAME = makeComponentName("description");
|
|
604
640
|
function registerDescription(loader, overrides) {
|
|
605
|
-
return registerText(loader, __spreadProps$
|
|
641
|
+
return registerText(loader, __spreadProps$b(__spreadValues$n({}, overrides), {
|
|
606
642
|
name: DESCRIPTION_COMPONENT_NAME,
|
|
607
643
|
displayName: "Aria Description",
|
|
608
644
|
props: {
|
|
@@ -615,30 +651,30 @@ function registerDescription(loader, overrides) {
|
|
|
615
651
|
}));
|
|
616
652
|
}
|
|
617
653
|
|
|
618
|
-
var __defProp$
|
|
619
|
-
var __getOwnPropSymbols$
|
|
620
|
-
var __hasOwnProp$
|
|
621
|
-
var __propIsEnum$
|
|
622
|
-
var __defNormalProp$
|
|
623
|
-
var __spreadValues$
|
|
654
|
+
var __defProp$m = Object.defineProperty;
|
|
655
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
656
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
657
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
658
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
659
|
+
var __spreadValues$m = (a, b) => {
|
|
624
660
|
for (var prop in b || (b = {}))
|
|
625
|
-
if (__hasOwnProp$
|
|
626
|
-
__defNormalProp$
|
|
627
|
-
if (__getOwnPropSymbols$
|
|
628
|
-
for (var prop of __getOwnPropSymbols$
|
|
629
|
-
if (__propIsEnum$
|
|
630
|
-
__defNormalProp$
|
|
661
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
662
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
663
|
+
if (__getOwnPropSymbols$m)
|
|
664
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
665
|
+
if (__propIsEnum$m.call(b, prop))
|
|
666
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
631
667
|
}
|
|
632
668
|
return a;
|
|
633
669
|
};
|
|
634
|
-
var __objRest$
|
|
670
|
+
var __objRest$h = (source, exclude) => {
|
|
635
671
|
var target = {};
|
|
636
672
|
for (var prop in source)
|
|
637
|
-
if (__hasOwnProp$
|
|
673
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
638
674
|
target[prop] = source[prop];
|
|
639
|
-
if (source != null && __getOwnPropSymbols$
|
|
640
|
-
for (var prop of __getOwnPropSymbols$
|
|
641
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
675
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
676
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
677
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
642
678
|
target[prop] = source[prop];
|
|
643
679
|
}
|
|
644
680
|
return target;
|
|
@@ -655,7 +691,7 @@ function BaseFieldError(_a) {
|
|
|
655
691
|
tooShort,
|
|
656
692
|
typeMismatch,
|
|
657
693
|
valueMissing
|
|
658
|
-
} = _b, rest = __objRest$
|
|
694
|
+
} = _b, rest = __objRest$h(_b, [
|
|
659
695
|
"badInput",
|
|
660
696
|
"customError",
|
|
661
697
|
"patternMismatch",
|
|
@@ -667,7 +703,7 @@ function BaseFieldError(_a) {
|
|
|
667
703
|
"typeMismatch",
|
|
668
704
|
"valueMissing"
|
|
669
705
|
]);
|
|
670
|
-
return /* @__PURE__ */ React.createElement(FieldError, __spreadValues$
|
|
706
|
+
return /* @__PURE__ */ React.createElement(FieldError, __spreadValues$m({}, rest), ({ validationDetails, validationErrors }) => {
|
|
671
707
|
if (validationDetails.badInput && badInput) {
|
|
672
708
|
return badInput;
|
|
673
709
|
}
|
|
@@ -774,27 +810,54 @@ function registerFieldError(loader, overrides) {
|
|
|
774
810
|
);
|
|
775
811
|
}
|
|
776
812
|
|
|
777
|
-
var __defProp$
|
|
778
|
-
var __defProps$
|
|
779
|
-
var __getOwnPropDescs$
|
|
780
|
-
var __getOwnPropSymbols$
|
|
781
|
-
var __hasOwnProp$
|
|
782
|
-
var __propIsEnum$
|
|
783
|
-
var __defNormalProp$
|
|
784
|
-
var __spreadValues$
|
|
813
|
+
var __defProp$l = Object.defineProperty;
|
|
814
|
+
var __defProps$a = Object.defineProperties;
|
|
815
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
816
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
817
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
818
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
819
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
820
|
+
var __spreadValues$l = (a, b) => {
|
|
785
821
|
for (var prop in b || (b = {}))
|
|
786
|
-
if (__hasOwnProp$
|
|
787
|
-
__defNormalProp$
|
|
788
|
-
if (__getOwnPropSymbols$
|
|
789
|
-
for (var prop of __getOwnPropSymbols$
|
|
790
|
-
if (__propIsEnum$
|
|
791
|
-
__defNormalProp$
|
|
822
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
823
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
824
|
+
if (__getOwnPropSymbols$l)
|
|
825
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
826
|
+
if (__propIsEnum$l.call(b, prop))
|
|
827
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
792
828
|
}
|
|
793
829
|
return a;
|
|
794
830
|
};
|
|
795
|
-
var __spreadProps$
|
|
831
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
832
|
+
var __objRest$g = (source, exclude) => {
|
|
833
|
+
var target = {};
|
|
834
|
+
for (var prop in source)
|
|
835
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
836
|
+
target[prop] = source[prop];
|
|
837
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
838
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
839
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
840
|
+
target[prop] = source[prop];
|
|
841
|
+
}
|
|
842
|
+
return target;
|
|
843
|
+
};
|
|
844
|
+
const CHECKBOX_GROUP_INTERACTION_VARIANTS = [
|
|
845
|
+
"disabled",
|
|
846
|
+
"readonly"
|
|
847
|
+
];
|
|
848
|
+
const { interactionVariants: interactionVariants$a, withObservedValues: withObservedValues$8 } = pickAriaComponentVariants(
|
|
849
|
+
CHECKBOX_GROUP_INTERACTION_VARIANTS
|
|
850
|
+
);
|
|
796
851
|
function BaseCheckboxGroup(props) {
|
|
797
|
-
|
|
852
|
+
const _a = props, { children, updateInteractionVariant } = _a; __objRest$g(_a, ["children", "updateInteractionVariant"]);
|
|
853
|
+
return /* @__PURE__ */ React.createElement(PlasmicCheckboxGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(CheckboxGroup, __spreadValues$l({}, props), ({ isDisabled, isReadOnly }) => withObservedValues$8(
|
|
854
|
+
children,
|
|
855
|
+
{
|
|
856
|
+
disabled: isDisabled,
|
|
857
|
+
readonly: isReadOnly
|
|
858
|
+
},
|
|
859
|
+
updateInteractionVariant
|
|
860
|
+
)));
|
|
798
861
|
}
|
|
799
862
|
const componentName = makeComponentName("checkboxGroup");
|
|
800
863
|
function registerCheckboxGroup(loader, overrides) {
|
|
@@ -815,7 +878,8 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
815
878
|
displayName: "Aria Checkbox Group",
|
|
816
879
|
importPath: "@plasmicpkgs/react-aria/skinny/registerCheckboxGroup",
|
|
817
880
|
importName: "BaseCheckboxGroup",
|
|
818
|
-
|
|
881
|
+
interactionVariants: interactionVariants$a,
|
|
882
|
+
props: __spreadProps$a(__spreadValues$l({}, getCommonInputProps("checkbox group", [
|
|
819
883
|
"name",
|
|
820
884
|
"isDisabled",
|
|
821
885
|
"isReadOnly",
|
|
@@ -1095,43 +1159,59 @@ function makeValuePropType() {
|
|
|
1095
1159
|
return type;
|
|
1096
1160
|
}
|
|
1097
1161
|
|
|
1098
|
-
var __defProp$
|
|
1099
|
-
var __getOwnPropSymbols$
|
|
1100
|
-
var __hasOwnProp$
|
|
1101
|
-
var __propIsEnum$
|
|
1102
|
-
var __defNormalProp$
|
|
1103
|
-
var __spreadValues$
|
|
1162
|
+
var __defProp$k = Object.defineProperty;
|
|
1163
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
1164
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
1165
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
1166
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1167
|
+
var __spreadValues$k = (a, b) => {
|
|
1104
1168
|
for (var prop in b || (b = {}))
|
|
1105
|
-
if (__hasOwnProp$
|
|
1106
|
-
__defNormalProp$
|
|
1107
|
-
if (__getOwnPropSymbols$
|
|
1108
|
-
for (var prop of __getOwnPropSymbols$
|
|
1109
|
-
if (__propIsEnum$
|
|
1110
|
-
__defNormalProp$
|
|
1169
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
1170
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1171
|
+
if (__getOwnPropSymbols$k)
|
|
1172
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
1173
|
+
if (__propIsEnum$k.call(b, prop))
|
|
1174
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1111
1175
|
}
|
|
1112
1176
|
return a;
|
|
1113
1177
|
};
|
|
1114
|
-
var __objRest$
|
|
1178
|
+
var __objRest$f = (source, exclude) => {
|
|
1115
1179
|
var target = {};
|
|
1116
1180
|
for (var prop in source)
|
|
1117
|
-
if (__hasOwnProp$
|
|
1181
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1118
1182
|
target[prop] = source[prop];
|
|
1119
|
-
if (source != null && __getOwnPropSymbols$
|
|
1120
|
-
for (var prop of __getOwnPropSymbols$
|
|
1121
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1183
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
1184
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
1185
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
1122
1186
|
target[prop] = source[prop];
|
|
1123
1187
|
}
|
|
1124
1188
|
return target;
|
|
1125
1189
|
};
|
|
1126
|
-
const INPUT_INTERACTION_VARIANTS = [
|
|
1127
|
-
|
|
1190
|
+
const INPUT_INTERACTION_VARIANTS = [
|
|
1191
|
+
"focused",
|
|
1192
|
+
"hovered",
|
|
1193
|
+
"disabled"
|
|
1194
|
+
];
|
|
1195
|
+
const { interactionVariants: interactionVariants$9 } = pickAriaComponentVariants(
|
|
1128
1196
|
INPUT_INTERACTION_VARIANTS
|
|
1129
1197
|
);
|
|
1130
1198
|
function BaseInput(props) {
|
|
1131
|
-
|
|
1199
|
+
var _b;
|
|
1200
|
+
const context = React.useContext(PlasmicTextFieldContext);
|
|
1201
|
+
const isStandalone = !context;
|
|
1202
|
+
const _a = props, { updateInteractionVariant, setControlContextData, disabled } = _a, rest = __objRest$f(_a, ["updateInteractionVariant", "setControlContextData", "disabled"]);
|
|
1203
|
+
const mergedProps = mergeProps(rest, {
|
|
1204
|
+
disabled: (_b = context == null ? void 0 : context.isDisabled) != null ? _b : disabled
|
|
1205
|
+
});
|
|
1206
|
+
useEffect(() => {
|
|
1207
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
1208
|
+
disabled: mergedProps.disabled
|
|
1209
|
+
});
|
|
1210
|
+
}, [mergedProps.disabled, updateInteractionVariant]);
|
|
1211
|
+
setControlContextData == null ? void 0 : setControlContextData({ isStandalone });
|
|
1132
1212
|
return /* @__PURE__ */ React.createElement(
|
|
1133
1213
|
Input,
|
|
1134
|
-
__spreadValues$
|
|
1214
|
+
__spreadValues$k({
|
|
1135
1215
|
onHoverChange: (isHovered) => {
|
|
1136
1216
|
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
1137
1217
|
hovered: isHovered
|
|
@@ -1147,7 +1227,7 @@ function BaseInput(props) {
|
|
|
1147
1227
|
focused: false
|
|
1148
1228
|
});
|
|
1149
1229
|
}
|
|
1150
|
-
},
|
|
1230
|
+
}, mergedProps)
|
|
1151
1231
|
);
|
|
1152
1232
|
}
|
|
1153
1233
|
const INPUT_COMPONENT_NAME = makeComponentName("input");
|
|
@@ -1160,7 +1240,7 @@ function registerInput(loader, overrides) {
|
|
|
1160
1240
|
displayName: "Aria Input",
|
|
1161
1241
|
importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
|
|
1162
1242
|
importName: "BaseInput",
|
|
1163
|
-
interactionVariants: interactionVariants$
|
|
1243
|
+
interactionVariants: interactionVariants$9,
|
|
1164
1244
|
defaultStyles: {
|
|
1165
1245
|
width: "300px",
|
|
1166
1246
|
borderWidth: "1px",
|
|
@@ -1171,6 +1251,12 @@ function registerInput(loader, overrides) {
|
|
|
1171
1251
|
props: {
|
|
1172
1252
|
placeholder: {
|
|
1173
1253
|
type: "string"
|
|
1254
|
+
},
|
|
1255
|
+
disabled: {
|
|
1256
|
+
type: "boolean",
|
|
1257
|
+
description: "Whether the input is disabled",
|
|
1258
|
+
defaultValueHint: false,
|
|
1259
|
+
hidden: (_ps, ctx) => !(ctx == null ? void 0 : ctx.isStandalone)
|
|
1174
1260
|
}
|
|
1175
1261
|
},
|
|
1176
1262
|
trapsFocus: true
|
|
@@ -1195,29 +1281,29 @@ class ErrorBoundary extends Component {
|
|
|
1195
1281
|
}
|
|
1196
1282
|
}
|
|
1197
1283
|
|
|
1198
|
-
var __defProp$
|
|
1199
|
-
var __defProps$
|
|
1200
|
-
var __getOwnPropDescs$
|
|
1201
|
-
var __getOwnPropSymbols$
|
|
1202
|
-
var __hasOwnProp$
|
|
1203
|
-
var __propIsEnum$
|
|
1204
|
-
var __defNormalProp$
|
|
1205
|
-
var __spreadValues$
|
|
1284
|
+
var __defProp$j = Object.defineProperty;
|
|
1285
|
+
var __defProps$9 = Object.defineProperties;
|
|
1286
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
1287
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
1288
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
1289
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
1290
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1291
|
+
var __spreadValues$j = (a, b) => {
|
|
1206
1292
|
for (var prop in b || (b = {}))
|
|
1207
|
-
if (__hasOwnProp$
|
|
1208
|
-
__defNormalProp$
|
|
1209
|
-
if (__getOwnPropSymbols$
|
|
1210
|
-
for (var prop of __getOwnPropSymbols$
|
|
1211
|
-
if (__propIsEnum$
|
|
1212
|
-
__defNormalProp$
|
|
1293
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
1294
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1295
|
+
if (__getOwnPropSymbols$j)
|
|
1296
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
1297
|
+
if (__propIsEnum$j.call(b, prop))
|
|
1298
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1213
1299
|
}
|
|
1214
1300
|
return a;
|
|
1215
1301
|
};
|
|
1216
|
-
var __spreadProps$
|
|
1302
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
1217
1303
|
function BaseListBoxItem(props) {
|
|
1218
1304
|
const contextProps = React.useContext(PlasmicItemContext);
|
|
1219
|
-
const mergedProps = mergeProps(contextProps, props);
|
|
1220
|
-
const listboxItem = /* @__PURE__ */ React.createElement(ListBoxItem, __spreadProps$
|
|
1305
|
+
const mergedProps = mergeProps$1(contextProps, props);
|
|
1306
|
+
const listboxItem = /* @__PURE__ */ React.createElement(ListBoxItem, __spreadProps$9(__spreadValues$j({}, mergedProps), { textValue: contextProps == null ? void 0 : contextProps.label }), mergedProps.children);
|
|
1221
1307
|
return /* @__PURE__ */ React.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React.createElement(ListBox, null, listboxItem) }, listboxItem);
|
|
1222
1308
|
}
|
|
1223
1309
|
const makeDefaultListBoxItemChildren = (label, description) => ({
|
|
@@ -1277,25 +1363,25 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1277
1363
|
);
|
|
1278
1364
|
}
|
|
1279
1365
|
|
|
1280
|
-
var __defProp$
|
|
1281
|
-
var __getOwnPropSymbols$
|
|
1282
|
-
var __hasOwnProp$
|
|
1283
|
-
var __propIsEnum$
|
|
1284
|
-
var __defNormalProp$
|
|
1285
|
-
var __spreadValues$
|
|
1366
|
+
var __defProp$i = Object.defineProperty;
|
|
1367
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
1368
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
1369
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
1370
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1371
|
+
var __spreadValues$i = (a, b) => {
|
|
1286
1372
|
for (var prop in b || (b = {}))
|
|
1287
|
-
if (__hasOwnProp$
|
|
1288
|
-
__defNormalProp$
|
|
1289
|
-
if (__getOwnPropSymbols$
|
|
1290
|
-
for (var prop of __getOwnPropSymbols$
|
|
1291
|
-
if (__propIsEnum$
|
|
1292
|
-
__defNormalProp$
|
|
1373
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
1374
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1375
|
+
if (__getOwnPropSymbols$i)
|
|
1376
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
1377
|
+
if (__propIsEnum$i.call(b, prop))
|
|
1378
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1293
1379
|
}
|
|
1294
1380
|
return a;
|
|
1295
1381
|
};
|
|
1296
1382
|
function BaseHeader(props) {
|
|
1297
1383
|
const contextProps = React.useContext(PlasmicHeaderContext);
|
|
1298
|
-
return /* @__PURE__ */ React.createElement(Header, __spreadValues$
|
|
1384
|
+
return /* @__PURE__ */ React.createElement(Header, __spreadValues$i({}, mergeProps$1(contextProps, props)));
|
|
1299
1385
|
}
|
|
1300
1386
|
function registerHeader(loader, overrides) {
|
|
1301
1387
|
return registerComponentHelper(
|
|
@@ -1316,27 +1402,27 @@ function registerHeader(loader, overrides) {
|
|
|
1316
1402
|
);
|
|
1317
1403
|
}
|
|
1318
1404
|
|
|
1319
|
-
var __defProp$
|
|
1320
|
-
var __getOwnPropSymbols$
|
|
1321
|
-
var __hasOwnProp$
|
|
1322
|
-
var __propIsEnum$
|
|
1323
|
-
var __defNormalProp$
|
|
1324
|
-
var __spreadValues$
|
|
1405
|
+
var __defProp$h = Object.defineProperty;
|
|
1406
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1407
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1408
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1409
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1410
|
+
var __spreadValues$h = (a, b) => {
|
|
1325
1411
|
for (var prop in b || (b = {}))
|
|
1326
|
-
if (__hasOwnProp$
|
|
1327
|
-
__defNormalProp$
|
|
1328
|
-
if (__getOwnPropSymbols$
|
|
1329
|
-
for (var prop of __getOwnPropSymbols$
|
|
1330
|
-
if (__propIsEnum$
|
|
1331
|
-
__defNormalProp$
|
|
1412
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1413
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1414
|
+
if (__getOwnPropSymbols$h)
|
|
1415
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1416
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1417
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1332
1418
|
}
|
|
1333
1419
|
return a;
|
|
1334
1420
|
};
|
|
1335
1421
|
function BaseSection(props) {
|
|
1336
1422
|
const contextProps = React.useContext(PlasmicSectionContext);
|
|
1337
|
-
const mergedProps = mergeProps(contextProps, props);
|
|
1423
|
+
const mergedProps = mergeProps$1(contextProps, props);
|
|
1338
1424
|
const { section, renderHeader, key, renderItem } = mergedProps;
|
|
1339
|
-
return /* @__PURE__ */ React.createElement(Section, __spreadValues$
|
|
1425
|
+
return /* @__PURE__ */ React.createElement(Section, __spreadValues$h({ id: key }, mergedProps), /* @__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) => {
|
|
1340
1426
|
return /* @__PURE__ */ React.createElement(PlasmicItemContext.Provider, { value: item }, renderItem == null ? void 0 : renderItem(item));
|
|
1341
1427
|
}));
|
|
1342
1428
|
}
|
|
@@ -1376,33 +1462,33 @@ function registerSection(loader, overrides) {
|
|
|
1376
1462
|
);
|
|
1377
1463
|
}
|
|
1378
1464
|
|
|
1379
|
-
var __defProp$
|
|
1380
|
-
var __defProps$
|
|
1381
|
-
var __getOwnPropDescs$
|
|
1382
|
-
var __getOwnPropSymbols$
|
|
1383
|
-
var __hasOwnProp$
|
|
1384
|
-
var __propIsEnum$
|
|
1385
|
-
var __defNormalProp$
|
|
1386
|
-
var __spreadValues$
|
|
1465
|
+
var __defProp$g = Object.defineProperty;
|
|
1466
|
+
var __defProps$8 = Object.defineProperties;
|
|
1467
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
1468
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1469
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1470
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1471
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1472
|
+
var __spreadValues$g = (a, b) => {
|
|
1387
1473
|
for (var prop in b || (b = {}))
|
|
1388
|
-
if (__hasOwnProp$
|
|
1389
|
-
__defNormalProp$
|
|
1390
|
-
if (__getOwnPropSymbols$
|
|
1391
|
-
for (var prop of __getOwnPropSymbols$
|
|
1392
|
-
if (__propIsEnum$
|
|
1393
|
-
__defNormalProp$
|
|
1474
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
1475
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1476
|
+
if (__getOwnPropSymbols$g)
|
|
1477
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
1478
|
+
if (__propIsEnum$g.call(b, prop))
|
|
1479
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1394
1480
|
}
|
|
1395
1481
|
return a;
|
|
1396
1482
|
};
|
|
1397
|
-
var __spreadProps$
|
|
1398
|
-
var __objRest$
|
|
1483
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1484
|
+
var __objRest$e = (source, exclude) => {
|
|
1399
1485
|
var target = {};
|
|
1400
1486
|
for (var prop in source)
|
|
1401
|
-
if (__hasOwnProp$
|
|
1487
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1402
1488
|
target[prop] = source[prop];
|
|
1403
|
-
if (source != null && __getOwnPropSymbols$
|
|
1404
|
-
for (var prop of __getOwnPropSymbols$
|
|
1405
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1489
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
1490
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
1491
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
1406
1492
|
target[prop] = source[prop];
|
|
1407
1493
|
}
|
|
1408
1494
|
return target;
|
|
@@ -1411,17 +1497,17 @@ function BaseListBox(props) {
|
|
|
1411
1497
|
var _c;
|
|
1412
1498
|
const contextProps = React.useContext(PlasmicListBoxContext);
|
|
1413
1499
|
const isStandalone = !contextProps;
|
|
1414
|
-
const _a = props, rest = __objRest$
|
|
1500
|
+
const _a = props, rest = __objRest$e(_a, ["options"]);
|
|
1415
1501
|
const { options } = useStrictOptions(props);
|
|
1416
|
-
const _b = mergeProps(
|
|
1502
|
+
const _b = mergeProps$1(
|
|
1417
1503
|
contextProps,
|
|
1418
1504
|
rest,
|
|
1419
1505
|
isStandalone ? { items: options } : {}
|
|
1420
|
-
), { renderItem, renderSection } = _b, mergedProps = __objRest$
|
|
1506
|
+
), { renderItem, renderSection } = _b, mergedProps = __objRest$e(_b, ["renderItem", "renderSection"]);
|
|
1421
1507
|
(_c = props.setControlContextData) == null ? void 0 : _c.call(props, {
|
|
1422
1508
|
isStandalone
|
|
1423
1509
|
});
|
|
1424
|
-
return /* @__PURE__ */ React.createElement(ListBox, __spreadValues$
|
|
1510
|
+
return /* @__PURE__ */ React.createElement(ListBox, __spreadValues$g({}, mergedProps), (item) => {
|
|
1425
1511
|
var _a2;
|
|
1426
1512
|
if (item.type === "option-group") {
|
|
1427
1513
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
@@ -1463,7 +1549,7 @@ function registerListBox(loader, overrides) {
|
|
|
1463
1549
|
borderColor: "black"
|
|
1464
1550
|
},
|
|
1465
1551
|
props: {
|
|
1466
|
-
options: __spreadProps$
|
|
1552
|
+
options: __spreadProps$8(__spreadValues$g({}, makeOptionsPropType()), {
|
|
1467
1553
|
displayName: "Items",
|
|
1468
1554
|
hidden: (_ps, ctx) => !(ctx == null ? void 0 : ctx.isStandalone)
|
|
1469
1555
|
}),
|
|
@@ -1500,41 +1586,41 @@ function registerListBox(loader, overrides) {
|
|
|
1500
1586
|
);
|
|
1501
1587
|
}
|
|
1502
1588
|
|
|
1503
|
-
var __defProp$
|
|
1504
|
-
var __getOwnPropSymbols$
|
|
1505
|
-
var __hasOwnProp$
|
|
1506
|
-
var __propIsEnum$
|
|
1507
|
-
var __defNormalProp$
|
|
1508
|
-
var __spreadValues$
|
|
1589
|
+
var __defProp$f = Object.defineProperty;
|
|
1590
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1591
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1592
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1593
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1594
|
+
var __spreadValues$f = (a, b) => {
|
|
1509
1595
|
for (var prop in b || (b = {}))
|
|
1510
|
-
if (__hasOwnProp$
|
|
1511
|
-
__defNormalProp$
|
|
1512
|
-
if (__getOwnPropSymbols$
|
|
1513
|
-
for (var prop of __getOwnPropSymbols$
|
|
1514
|
-
if (__propIsEnum$
|
|
1515
|
-
__defNormalProp$
|
|
1596
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
1597
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1598
|
+
if (__getOwnPropSymbols$f)
|
|
1599
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
1600
|
+
if (__propIsEnum$f.call(b, prop))
|
|
1601
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1516
1602
|
}
|
|
1517
1603
|
return a;
|
|
1518
1604
|
};
|
|
1519
|
-
var __objRest$
|
|
1605
|
+
var __objRest$d = (source, exclude) => {
|
|
1520
1606
|
var target = {};
|
|
1521
1607
|
for (var prop in source)
|
|
1522
|
-
if (__hasOwnProp$
|
|
1608
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1523
1609
|
target[prop] = source[prop];
|
|
1524
|
-
if (source != null && __getOwnPropSymbols$
|
|
1525
|
-
for (var prop of __getOwnPropSymbols$
|
|
1526
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1610
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
1611
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
1612
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
1527
1613
|
target[prop] = source[prop];
|
|
1528
1614
|
}
|
|
1529
1615
|
return target;
|
|
1530
1616
|
};
|
|
1531
1617
|
const SHOULD_FLIP_INSIDE_SELECT = false;
|
|
1532
1618
|
function BasePopover(props) {
|
|
1533
|
-
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$
|
|
1619
|
+
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$d(_a, ["resetClassName", "setControlContextData"]);
|
|
1534
1620
|
const isStandalone = !React.useContext(PopoverContext);
|
|
1535
1621
|
const contextProps = React.useContext(PlasmicPopoverContext);
|
|
1536
1622
|
const isInsideSelect = !!React.useContext(SelectContext);
|
|
1537
|
-
const mergedProps = mergeProps(
|
|
1623
|
+
const mergedProps = mergeProps$1(
|
|
1538
1624
|
contextProps,
|
|
1539
1625
|
restProps,
|
|
1540
1626
|
{
|
|
@@ -1555,7 +1641,7 @@ function BasePopover(props) {
|
|
|
1555
1641
|
});
|
|
1556
1642
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, isStandalone && /* @__PURE__ */ React.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React.createElement(
|
|
1557
1643
|
Popover,
|
|
1558
|
-
__spreadValues$
|
|
1644
|
+
__spreadValues$f(__spreadValues$f({
|
|
1559
1645
|
isNonModal: isEditMode ? true : void 0
|
|
1560
1646
|
}, mergedProps), standaloneProps)
|
|
1561
1647
|
));
|
|
@@ -1657,25 +1743,25 @@ function registerPopover(loader, overrides) {
|
|
|
1657
1743
|
);
|
|
1658
1744
|
}
|
|
1659
1745
|
|
|
1660
|
-
var __defProp$
|
|
1661
|
-
var __defProps$
|
|
1662
|
-
var __getOwnPropDescs$
|
|
1663
|
-
var __getOwnPropSymbols$
|
|
1664
|
-
var __hasOwnProp$
|
|
1665
|
-
var __propIsEnum$
|
|
1666
|
-
var __defNormalProp$
|
|
1667
|
-
var __spreadValues$
|
|
1746
|
+
var __defProp$e = Object.defineProperty;
|
|
1747
|
+
var __defProps$7 = Object.defineProperties;
|
|
1748
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1749
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1750
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1751
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1752
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1753
|
+
var __spreadValues$e = (a, b) => {
|
|
1668
1754
|
for (var prop in b || (b = {}))
|
|
1669
|
-
if (__hasOwnProp$
|
|
1670
|
-
__defNormalProp$
|
|
1671
|
-
if (__getOwnPropSymbols$
|
|
1672
|
-
for (var prop of __getOwnPropSymbols$
|
|
1673
|
-
if (__propIsEnum$
|
|
1674
|
-
__defNormalProp$
|
|
1755
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
1756
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1757
|
+
if (__getOwnPropSymbols$e)
|
|
1758
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
1759
|
+
if (__propIsEnum$e.call(b, prop))
|
|
1760
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1675
1761
|
}
|
|
1676
1762
|
return a;
|
|
1677
1763
|
};
|
|
1678
|
-
var __spreadProps$
|
|
1764
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
1679
1765
|
function BaseComboBox(props) {
|
|
1680
1766
|
const {
|
|
1681
1767
|
value,
|
|
@@ -1708,7 +1794,7 @@ function BaseComboBox(props) {
|
|
|
1708
1794
|
return withoutNils(
|
|
1709
1795
|
opts.map((op) => {
|
|
1710
1796
|
if (op.type === "option-group") {
|
|
1711
|
-
return __spreadProps$
|
|
1797
|
+
return __spreadProps$7(__spreadValues$e({}, op), {
|
|
1712
1798
|
items: op.items ? filterOptions(op.items) : void 0
|
|
1713
1799
|
});
|
|
1714
1800
|
} else {
|
|
@@ -1796,7 +1882,7 @@ function BaseComboBox(props) {
|
|
|
1796
1882
|
]);
|
|
1797
1883
|
return /* @__PURE__ */ React.createElement(
|
|
1798
1884
|
ComboBox,
|
|
1799
|
-
__spreadValues$
|
|
1885
|
+
__spreadValues$e({
|
|
1800
1886
|
selectedKey: value,
|
|
1801
1887
|
onSelectionChange,
|
|
1802
1888
|
isDisabled,
|
|
@@ -2019,33 +2105,33 @@ function registerComboBox(loader) {
|
|
|
2019
2105
|
});
|
|
2020
2106
|
}
|
|
2021
2107
|
|
|
2022
|
-
var __defProp$
|
|
2023
|
-
var __defProps$
|
|
2024
|
-
var __getOwnPropDescs$
|
|
2025
|
-
var __getOwnPropSymbols$
|
|
2026
|
-
var __hasOwnProp$
|
|
2027
|
-
var __propIsEnum$
|
|
2028
|
-
var __defNormalProp$
|
|
2029
|
-
var __spreadValues$
|
|
2108
|
+
var __defProp$d = Object.defineProperty;
|
|
2109
|
+
var __defProps$6 = Object.defineProperties;
|
|
2110
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
2111
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
2112
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
2113
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
2114
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2115
|
+
var __spreadValues$d = (a, b) => {
|
|
2030
2116
|
for (var prop in b || (b = {}))
|
|
2031
|
-
if (__hasOwnProp$
|
|
2032
|
-
__defNormalProp$
|
|
2033
|
-
if (__getOwnPropSymbols$
|
|
2034
|
-
for (var prop of __getOwnPropSymbols$
|
|
2035
|
-
if (__propIsEnum$
|
|
2036
|
-
__defNormalProp$
|
|
2117
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
2118
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2119
|
+
if (__getOwnPropSymbols$d)
|
|
2120
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
2121
|
+
if (__propIsEnum$d.call(b, prop))
|
|
2122
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2037
2123
|
}
|
|
2038
2124
|
return a;
|
|
2039
2125
|
};
|
|
2040
|
-
var __spreadProps$
|
|
2041
|
-
var __objRest$
|
|
2126
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
2127
|
+
var __objRest$c = (source, exclude) => {
|
|
2042
2128
|
var target = {};
|
|
2043
2129
|
for (var prop in source)
|
|
2044
|
-
if (__hasOwnProp$
|
|
2130
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2045
2131
|
target[prop] = source[prop];
|
|
2046
|
-
if (source != null && __getOwnPropSymbols$
|
|
2047
|
-
for (var prop of __getOwnPropSymbols$
|
|
2048
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2132
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
2133
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
2134
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
2049
2135
|
target[prop] = source[prop];
|
|
2050
2136
|
}
|
|
2051
2137
|
return target;
|
|
@@ -2060,7 +2146,7 @@ const BaseModal = forwardRef(
|
|
|
2060
2146
|
className,
|
|
2061
2147
|
isOpen,
|
|
2062
2148
|
setControlContextData
|
|
2063
|
-
} = _a, rest = __objRest$
|
|
2149
|
+
} = _a, rest = __objRest$c(_a, [
|
|
2064
2150
|
"children",
|
|
2065
2151
|
"heading",
|
|
2066
2152
|
"modalOverlayClass",
|
|
@@ -2071,7 +2157,7 @@ const BaseModal = forwardRef(
|
|
|
2071
2157
|
]);
|
|
2072
2158
|
const contextProps = React.useContext(PlasmicDialogTriggerContext);
|
|
2073
2159
|
const isStandalone = !contextProps;
|
|
2074
|
-
const mergedProps = mergeProps
|
|
2160
|
+
const mergedProps = mergeProps(contextProps, rest, {
|
|
2075
2161
|
isOpen: isStandalone ? isOpen : contextProps.isOpen
|
|
2076
2162
|
});
|
|
2077
2163
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -2089,7 +2175,7 @@ const BaseModal = forwardRef(
|
|
|
2089
2175
|
const body = /* @__PURE__ */ React.createElement(React.Fragment, null, heading && /* @__PURE__ */ React.createElement(Heading, { slot: "title" }, heading), children);
|
|
2090
2176
|
return /* @__PURE__ */ React.createElement(
|
|
2091
2177
|
ModalOverlay,
|
|
2092
|
-
__spreadProps$
|
|
2178
|
+
__spreadProps$6(__spreadValues$d({}, mergedProps), {
|
|
2093
2179
|
className: modalOverlayClass,
|
|
2094
2180
|
onOpenChange
|
|
2095
2181
|
}),
|
|
@@ -2215,37 +2301,37 @@ function registerModal(loader, overrides) {
|
|
|
2215
2301
|
);
|
|
2216
2302
|
}
|
|
2217
2303
|
|
|
2218
|
-
var __defProp$
|
|
2219
|
-
var __getOwnPropSymbols$
|
|
2220
|
-
var __hasOwnProp$
|
|
2221
|
-
var __propIsEnum$
|
|
2222
|
-
var __defNormalProp$
|
|
2223
|
-
var __spreadValues$
|
|
2304
|
+
var __defProp$c = Object.defineProperty;
|
|
2305
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2306
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2307
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
2308
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2309
|
+
var __spreadValues$c = (a, b) => {
|
|
2224
2310
|
for (var prop in b || (b = {}))
|
|
2225
|
-
if (__hasOwnProp$
|
|
2226
|
-
__defNormalProp$
|
|
2227
|
-
if (__getOwnPropSymbols$
|
|
2228
|
-
for (var prop of __getOwnPropSymbols$
|
|
2229
|
-
if (__propIsEnum$
|
|
2230
|
-
__defNormalProp$
|
|
2311
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
2312
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
2313
|
+
if (__getOwnPropSymbols$c)
|
|
2314
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
2315
|
+
if (__propIsEnum$c.call(b, prop))
|
|
2316
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
2231
2317
|
}
|
|
2232
2318
|
return a;
|
|
2233
2319
|
};
|
|
2234
|
-
var __objRest$
|
|
2320
|
+
var __objRest$b = (source, exclude) => {
|
|
2235
2321
|
var target = {};
|
|
2236
2322
|
for (var prop in source)
|
|
2237
|
-
if (__hasOwnProp$
|
|
2323
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2238
2324
|
target[prop] = source[prop];
|
|
2239
|
-
if (source != null && __getOwnPropSymbols$
|
|
2240
|
-
for (var prop of __getOwnPropSymbols$
|
|
2241
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2325
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
2326
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
2327
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
2242
2328
|
target[prop] = source[prop];
|
|
2243
2329
|
}
|
|
2244
2330
|
return target;
|
|
2245
2331
|
};
|
|
2246
2332
|
function BaseDialogTrigger(props) {
|
|
2247
|
-
const _a = props, { trigger, dialog } = _a, rest = __objRest$
|
|
2248
|
-
return /* @__PURE__ */ React.createElement(PlasmicDialogTriggerContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(DialogTrigger, __spreadValues$
|
|
2333
|
+
const _a = props, { trigger, dialog } = _a, rest = __objRest$b(_a, ["trigger", "dialog"]);
|
|
2334
|
+
return /* @__PURE__ */ React.createElement(PlasmicDialogTriggerContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(DialogTrigger, __spreadValues$c({}, rest), trigger, dialog));
|
|
2249
2335
|
}
|
|
2250
2336
|
function registerDialogTrigger(loader, overrides) {
|
|
2251
2337
|
registerComponentHelper(
|
|
@@ -2303,39 +2389,39 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2303
2389
|
);
|
|
2304
2390
|
}
|
|
2305
2391
|
|
|
2306
|
-
var __defProp$
|
|
2307
|
-
var __getOwnPropSymbols$
|
|
2308
|
-
var __hasOwnProp$
|
|
2309
|
-
var __propIsEnum$
|
|
2310
|
-
var __defNormalProp$
|
|
2311
|
-
var __spreadValues$
|
|
2392
|
+
var __defProp$b = Object.defineProperty;
|
|
2393
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
2394
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
2395
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
2396
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2397
|
+
var __spreadValues$b = (a, b) => {
|
|
2312
2398
|
for (var prop in b || (b = {}))
|
|
2313
|
-
if (__hasOwnProp$
|
|
2314
|
-
__defNormalProp$
|
|
2315
|
-
if (__getOwnPropSymbols$
|
|
2316
|
-
for (var prop of __getOwnPropSymbols$
|
|
2317
|
-
if (__propIsEnum$
|
|
2318
|
-
__defNormalProp$
|
|
2399
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
2400
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2401
|
+
if (__getOwnPropSymbols$b)
|
|
2402
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
2403
|
+
if (__propIsEnum$b.call(b, prop))
|
|
2404
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2319
2405
|
}
|
|
2320
2406
|
return a;
|
|
2321
2407
|
};
|
|
2322
|
-
var __objRest$
|
|
2408
|
+
var __objRest$a = (source, exclude) => {
|
|
2323
2409
|
var target = {};
|
|
2324
2410
|
for (var prop in source)
|
|
2325
|
-
if (__hasOwnProp$
|
|
2411
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2326
2412
|
target[prop] = source[prop];
|
|
2327
|
-
if (source != null && __getOwnPropSymbols$
|
|
2328
|
-
for (var prop of __getOwnPropSymbols$
|
|
2329
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2413
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
2414
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
2415
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
2330
2416
|
target[prop] = source[prop];
|
|
2331
2417
|
}
|
|
2332
2418
|
return target;
|
|
2333
2419
|
};
|
|
2334
2420
|
function BaseForm(props) {
|
|
2335
|
-
const _a = props, { onSubmit, children } = _a, rest = __objRest$
|
|
2421
|
+
const _a = props, { onSubmit, children } = _a, rest = __objRest$a(_a, ["onSubmit", "children"]);
|
|
2336
2422
|
return /* @__PURE__ */ React.createElement(
|
|
2337
2423
|
Form,
|
|
2338
|
-
__spreadValues$
|
|
2424
|
+
__spreadValues$b({
|
|
2339
2425
|
onSubmit: (e) => {
|
|
2340
2426
|
e.preventDefault();
|
|
2341
2427
|
const formData = new FormData(e.currentTarget);
|
|
@@ -2385,56 +2471,70 @@ function registerForm(loader, overrides) {
|
|
|
2385
2471
|
);
|
|
2386
2472
|
}
|
|
2387
2473
|
|
|
2388
|
-
var __defProp$
|
|
2389
|
-
var __defProps$
|
|
2390
|
-
var __getOwnPropDescs$
|
|
2391
|
-
var __getOwnPropSymbols$
|
|
2392
|
-
var __hasOwnProp$
|
|
2393
|
-
var __propIsEnum$
|
|
2394
|
-
var __defNormalProp$
|
|
2395
|
-
var __spreadValues$
|
|
2474
|
+
var __defProp$a = Object.defineProperty;
|
|
2475
|
+
var __defProps$5 = Object.defineProperties;
|
|
2476
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
2477
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
2478
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
2479
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
2480
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2481
|
+
var __spreadValues$a = (a, b) => {
|
|
2396
2482
|
for (var prop in b || (b = {}))
|
|
2397
|
-
if (__hasOwnProp$
|
|
2398
|
-
__defNormalProp$
|
|
2399
|
-
if (__getOwnPropSymbols$
|
|
2400
|
-
for (var prop of __getOwnPropSymbols$
|
|
2401
|
-
if (__propIsEnum$
|
|
2402
|
-
__defNormalProp$
|
|
2483
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
2484
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2485
|
+
if (__getOwnPropSymbols$a)
|
|
2486
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
2487
|
+
if (__propIsEnum$a.call(b, prop))
|
|
2488
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2403
2489
|
}
|
|
2404
2490
|
return a;
|
|
2405
2491
|
};
|
|
2406
|
-
var __spreadProps$
|
|
2407
|
-
var __objRest$
|
|
2492
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
2493
|
+
var __objRest$9 = (source, exclude) => {
|
|
2408
2494
|
var target = {};
|
|
2409
2495
|
for (var prop in source)
|
|
2410
|
-
if (__hasOwnProp$
|
|
2496
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2411
2497
|
target[prop] = source[prop];
|
|
2412
|
-
if (source != null && __getOwnPropSymbols$
|
|
2413
|
-
for (var prop of __getOwnPropSymbols$
|
|
2414
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2498
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
2499
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
2500
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
2415
2501
|
target[prop] = source[prop];
|
|
2416
2502
|
}
|
|
2417
2503
|
return target;
|
|
2418
2504
|
};
|
|
2419
2505
|
const RADIO_INTERACTION_VARIANTS = [
|
|
2506
|
+
"selected",
|
|
2420
2507
|
"hovered",
|
|
2421
2508
|
"pressed",
|
|
2422
2509
|
"focused",
|
|
2423
|
-
"focusVisible"
|
|
2510
|
+
"focusVisible",
|
|
2511
|
+
"disabled",
|
|
2512
|
+
"readonly"
|
|
2424
2513
|
];
|
|
2425
|
-
const { interactionVariants: interactionVariants$
|
|
2514
|
+
const { interactionVariants: interactionVariants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(
|
|
2426
2515
|
RADIO_INTERACTION_VARIANTS
|
|
2427
2516
|
);
|
|
2428
2517
|
function BaseRadio(props) {
|
|
2429
|
-
const _a = props, { children, updateInteractionVariant, setControlContextData } = _a, rest = __objRest$
|
|
2518
|
+
const _a = props, { children, updateInteractionVariant, setControlContextData } = _a, rest = __objRest$9(_a, ["children", "updateInteractionVariant", "setControlContextData"]);
|
|
2430
2519
|
const contextProps = React.useContext(PlasmicRadioGroupContext);
|
|
2431
|
-
const radio = /* @__PURE__ */ React.createElement(Radio, __spreadValues$
|
|
2520
|
+
const radio = /* @__PURE__ */ React.createElement(Radio, __spreadValues$a({}, rest), ({
|
|
2521
|
+
isHovered,
|
|
2522
|
+
isPressed,
|
|
2523
|
+
isFocused,
|
|
2524
|
+
isFocusVisible,
|
|
2525
|
+
isSelected,
|
|
2526
|
+
isDisabled,
|
|
2527
|
+
isReadOnly
|
|
2528
|
+
}) => withObservedValues$7(
|
|
2432
2529
|
children,
|
|
2433
2530
|
{
|
|
2434
2531
|
hovered: isHovered,
|
|
2435
2532
|
pressed: isPressed,
|
|
2436
2533
|
focused: isFocused,
|
|
2437
|
-
focusVisible: isFocusVisible
|
|
2534
|
+
focusVisible: isFocusVisible,
|
|
2535
|
+
selected: isSelected,
|
|
2536
|
+
disabled: isDisabled,
|
|
2537
|
+
readonly: isReadOnly
|
|
2438
2538
|
},
|
|
2439
2539
|
updateInteractionVariant
|
|
2440
2540
|
));
|
|
@@ -2485,8 +2585,8 @@ function registerRadio(loader, overrides) {
|
|
|
2485
2585
|
displayName: "Aria Radio",
|
|
2486
2586
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
2487
2587
|
importName: "BaseRadio",
|
|
2488
|
-
interactionVariants: interactionVariants$
|
|
2489
|
-
props: __spreadProps$
|
|
2588
|
+
interactionVariants: interactionVariants$8,
|
|
2589
|
+
props: __spreadProps$5(__spreadValues$a({}, getCommonInputProps("radio", [
|
|
2490
2590
|
"isDisabled",
|
|
2491
2591
|
"autoFocus",
|
|
2492
2592
|
"aria-label"
|
|
@@ -2522,27 +2622,54 @@ function registerRadio(loader, overrides) {
|
|
|
2522
2622
|
);
|
|
2523
2623
|
}
|
|
2524
2624
|
|
|
2525
|
-
var __defProp$
|
|
2526
|
-
var __defProps$
|
|
2527
|
-
var __getOwnPropDescs$
|
|
2528
|
-
var __getOwnPropSymbols$
|
|
2529
|
-
var __hasOwnProp$
|
|
2530
|
-
var __propIsEnum$
|
|
2531
|
-
var __defNormalProp$
|
|
2532
|
-
var __spreadValues$
|
|
2625
|
+
var __defProp$9 = Object.defineProperty;
|
|
2626
|
+
var __defProps$4 = Object.defineProperties;
|
|
2627
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
2628
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
2629
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
2630
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
2631
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2632
|
+
var __spreadValues$9 = (a, b) => {
|
|
2533
2633
|
for (var prop in b || (b = {}))
|
|
2534
|
-
if (__hasOwnProp$
|
|
2535
|
-
__defNormalProp$
|
|
2536
|
-
if (__getOwnPropSymbols$
|
|
2537
|
-
for (var prop of __getOwnPropSymbols$
|
|
2538
|
-
if (__propIsEnum$
|
|
2539
|
-
__defNormalProp$
|
|
2634
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
2635
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
2636
|
+
if (__getOwnPropSymbols$9)
|
|
2637
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
2638
|
+
if (__propIsEnum$9.call(b, prop))
|
|
2639
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
2540
2640
|
}
|
|
2541
2641
|
return a;
|
|
2542
2642
|
};
|
|
2543
|
-
var __spreadProps$
|
|
2643
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
2644
|
+
var __objRest$8 = (source, exclude) => {
|
|
2645
|
+
var target = {};
|
|
2646
|
+
for (var prop in source)
|
|
2647
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2648
|
+
target[prop] = source[prop];
|
|
2649
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
2650
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
2651
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
2652
|
+
target[prop] = source[prop];
|
|
2653
|
+
}
|
|
2654
|
+
return target;
|
|
2655
|
+
};
|
|
2656
|
+
const RADIO_GROUP_INTERACTION_VARIANTS = [
|
|
2657
|
+
"disabled",
|
|
2658
|
+
"readonly"
|
|
2659
|
+
];
|
|
2660
|
+
const { interactionVariants: interactionVariants$7, withObservedValues: withObservedValues$6 } = pickAriaComponentVariants(
|
|
2661
|
+
RADIO_GROUP_INTERACTION_VARIANTS
|
|
2662
|
+
);
|
|
2544
2663
|
function BaseRadioGroup(props) {
|
|
2545
|
-
|
|
2664
|
+
const _a = props, { children, updateInteractionVariant } = _a, rest = __objRest$8(_a, ["children", "updateInteractionVariant"]);
|
|
2665
|
+
return /* @__PURE__ */ React.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$6(
|
|
2666
|
+
children,
|
|
2667
|
+
{
|
|
2668
|
+
disabled: isDisabled,
|
|
2669
|
+
readonly: isReadOnly
|
|
2670
|
+
},
|
|
2671
|
+
updateInteractionVariant
|
|
2672
|
+
)));
|
|
2546
2673
|
}
|
|
2547
2674
|
const RADIO_GROUP_COMPONENT_NAME = makeComponentName("radioGroup");
|
|
2548
2675
|
function registerRadioGroup(loader, overrides) {
|
|
@@ -2561,7 +2688,8 @@ function registerRadioGroup(loader, overrides) {
|
|
|
2561
2688
|
displayName: "Aria RadioGroup",
|
|
2562
2689
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadioGroup",
|
|
2563
2690
|
importName: "BaseRadioGroup",
|
|
2564
|
-
|
|
2691
|
+
interactionVariants: interactionVariants$7,
|
|
2692
|
+
props: __spreadProps$4(__spreadValues$9({}, getCommonInputProps("radio group", [
|
|
2565
2693
|
"name",
|
|
2566
2694
|
"isDisabled",
|
|
2567
2695
|
"isReadOnly",
|
|
@@ -2666,19 +2794,19 @@ function registerRadioGroup(loader, overrides) {
|
|
|
2666
2794
|
);
|
|
2667
2795
|
}
|
|
2668
2796
|
|
|
2669
|
-
var __defProp$
|
|
2670
|
-
var __getOwnPropSymbols$
|
|
2671
|
-
var __hasOwnProp$
|
|
2672
|
-
var __propIsEnum$
|
|
2673
|
-
var __defNormalProp$
|
|
2674
|
-
var __spreadValues$
|
|
2797
|
+
var __defProp$8 = Object.defineProperty;
|
|
2798
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
2799
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
2800
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
2801
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2802
|
+
var __spreadValues$8 = (a, b) => {
|
|
2675
2803
|
for (var prop in b || (b = {}))
|
|
2676
|
-
if (__hasOwnProp$
|
|
2677
|
-
__defNormalProp$
|
|
2678
|
-
if (__getOwnPropSymbols$
|
|
2679
|
-
for (var prop of __getOwnPropSymbols$
|
|
2680
|
-
if (__propIsEnum$
|
|
2681
|
-
__defNormalProp$
|
|
2804
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
2805
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
2806
|
+
if (__getOwnPropSymbols$8)
|
|
2807
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
2808
|
+
if (__propIsEnum$8.call(b, prop))
|
|
2809
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
2682
2810
|
}
|
|
2683
2811
|
return a;
|
|
2684
2812
|
};
|
|
@@ -2706,7 +2834,7 @@ function BaseSelect(props) {
|
|
|
2706
2834
|
const disabledKeys = flattenOptions(options).filter((op) => op.isDisabled).map((op) => op.id);
|
|
2707
2835
|
return /* @__PURE__ */ React.createElement(
|
|
2708
2836
|
Select,
|
|
2709
|
-
__spreadValues$
|
|
2837
|
+
__spreadValues$8(__spreadValues$8({
|
|
2710
2838
|
placeholder,
|
|
2711
2839
|
selectedKey: value,
|
|
2712
2840
|
onSelectionChange: onChange,
|
|
@@ -2739,7 +2867,6 @@ function registerSelect(loader) {
|
|
|
2739
2867
|
props: {
|
|
2740
2868
|
customize: {
|
|
2741
2869
|
type: "boolean",
|
|
2742
|
-
advanced: true,
|
|
2743
2870
|
description: "Whether to customize the selected value display"
|
|
2744
2871
|
},
|
|
2745
2872
|
children: {
|
|
@@ -2749,7 +2876,8 @@ function registerSelect(loader) {
|
|
|
2749
2876
|
type: "text",
|
|
2750
2877
|
value: "Selected value..."
|
|
2751
2878
|
}
|
|
2752
|
-
]
|
|
2879
|
+
],
|
|
2880
|
+
hidden: (ps) => !ps.customize
|
|
2753
2881
|
},
|
|
2754
2882
|
className: {
|
|
2755
2883
|
type: "class",
|
|
@@ -2938,7 +3066,48 @@ function registerSelect(loader) {
|
|
|
2938
3066
|
});
|
|
2939
3067
|
}
|
|
2940
3068
|
|
|
2941
|
-
|
|
3069
|
+
var __defProp$7 = Object.defineProperty;
|
|
3070
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
3071
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
3072
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
3073
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3074
|
+
var __spreadValues$7 = (a, b) => {
|
|
3075
|
+
for (var prop in b || (b = {}))
|
|
3076
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
3077
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
3078
|
+
if (__getOwnPropSymbols$7)
|
|
3079
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
3080
|
+
if (__propIsEnum$7.call(b, prop))
|
|
3081
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
3082
|
+
}
|
|
3083
|
+
return a;
|
|
3084
|
+
};
|
|
3085
|
+
var __objRest$7 = (source, exclude) => {
|
|
3086
|
+
var target = {};
|
|
3087
|
+
for (var prop in source)
|
|
3088
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3089
|
+
target[prop] = source[prop];
|
|
3090
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
3091
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
3092
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
3093
|
+
target[prop] = source[prop];
|
|
3094
|
+
}
|
|
3095
|
+
return target;
|
|
3096
|
+
};
|
|
3097
|
+
const SLIDER_OUTPUT_INTERACTION_VARIANTS = ["disabled"];
|
|
3098
|
+
const { interactionVariants: interactionVariants$6, withObservedValues: withObservedValues$5 } = pickAriaComponentVariants(
|
|
3099
|
+
SLIDER_OUTPUT_INTERACTION_VARIANTS
|
|
3100
|
+
);
|
|
3101
|
+
function BaseSliderOutput(props) {
|
|
3102
|
+
const _a = props, { updateInteractionVariant, children } = _a, rest = __objRest$7(_a, ["updateInteractionVariant", "children"]);
|
|
3103
|
+
return /* @__PURE__ */ React.createElement(SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$5(
|
|
3104
|
+
children,
|
|
3105
|
+
{
|
|
3106
|
+
disabled: isDisabled
|
|
3107
|
+
},
|
|
3108
|
+
updateInteractionVariant
|
|
3109
|
+
));
|
|
3110
|
+
}
|
|
2942
3111
|
const SLIDER_OUTPUT_COMPONENT_NAME = makeComponentName("sliderOutput");
|
|
2943
3112
|
function registerSliderOutput(loader, overrides) {
|
|
2944
3113
|
registerComponentHelper(
|
|
@@ -2949,6 +3118,7 @@ function registerSliderOutput(loader, overrides) {
|
|
|
2949
3118
|
displayName: "Aria Slider Output",
|
|
2950
3119
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSliderOutput",
|
|
2951
3120
|
importName: "BaseSliderOutput",
|
|
3121
|
+
interactionVariants: interactionVariants$6,
|
|
2952
3122
|
props: {
|
|
2953
3123
|
children: { type: "slot" }
|
|
2954
3124
|
},
|
|
@@ -2959,6 +3129,8 @@ function registerSliderOutput(loader, overrides) {
|
|
|
2959
3129
|
}
|
|
2960
3130
|
|
|
2961
3131
|
var __defProp$6 = Object.defineProperty;
|
|
3132
|
+
var __defProps$3 = Object.defineProperties;
|
|
3133
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
2962
3134
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
2963
3135
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
2964
3136
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
@@ -2974,6 +3146,7 @@ var __spreadValues$6 = (a, b) => {
|
|
|
2974
3146
|
}
|
|
2975
3147
|
return a;
|
|
2976
3148
|
};
|
|
3149
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
2977
3150
|
var __objRest$6 = (source, exclude) => {
|
|
2978
3151
|
var target = {};
|
|
2979
3152
|
for (var prop in source)
|
|
@@ -2990,9 +3163,10 @@ const SLIDER_THUMB_INTERACTION_VARIANTS = [
|
|
|
2990
3163
|
"dragging",
|
|
2991
3164
|
"hovered",
|
|
2992
3165
|
"focused",
|
|
2993
|
-
"focusVisible"
|
|
3166
|
+
"focusVisible",
|
|
3167
|
+
"disabled"
|
|
2994
3168
|
];
|
|
2995
|
-
const { interactionVariants: interactionVariants$
|
|
3169
|
+
const { interactionVariants: interactionVariants$5, withObservedValues: withObservedValues$4 } = pickAriaComponentVariants(
|
|
2996
3170
|
SLIDER_THUMB_INTERACTION_VARIANTS
|
|
2997
3171
|
);
|
|
2998
3172
|
function BaseSliderThumb(_a) {
|
|
@@ -3006,14 +3180,15 @@ function BaseSliderThumb(_a) {
|
|
|
3006
3180
|
"updateInteractionVariant"
|
|
3007
3181
|
]);
|
|
3008
3182
|
const context = React.useContext(PlasmicSliderContext);
|
|
3009
|
-
const mergedProps = mergeProps
|
|
3010
|
-
const thumb = /* @__PURE__ */ React.createElement(SliderThumb, __spreadValues$6({}, mergedProps), ({ isDragging, isHovered, isFocused, isFocusVisible }) => withObservedValues$
|
|
3183
|
+
const mergedProps = mergeProps(context, rest);
|
|
3184
|
+
const thumb = /* @__PURE__ */ React.createElement(SliderThumb, __spreadValues$6({}, mergedProps), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$4(
|
|
3011
3185
|
/* @__PURE__ */ React.createElement(React.Fragment, null, advanced ? children : void 0),
|
|
3012
3186
|
{
|
|
3013
3187
|
dragging: isDragging,
|
|
3014
3188
|
hovered: isHovered,
|
|
3015
3189
|
focused: isFocused,
|
|
3016
|
-
focusVisible: isFocusVisible
|
|
3190
|
+
focusVisible: isFocusVisible,
|
|
3191
|
+
disabled: isDisabled
|
|
3017
3192
|
},
|
|
3018
3193
|
updateInteractionVariant
|
|
3019
3194
|
));
|
|
@@ -3044,8 +3219,12 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3044
3219
|
borderRadius: "100%",
|
|
3045
3220
|
cursor: "pointer"
|
|
3046
3221
|
},
|
|
3047
|
-
interactionVariants: interactionVariants$
|
|
3048
|
-
props: {
|
|
3222
|
+
interactionVariants: interactionVariants$5,
|
|
3223
|
+
props: __spreadProps$3(__spreadValues$6({}, getCommonInputProps("slider thumb", [
|
|
3224
|
+
"name",
|
|
3225
|
+
"isDisabled",
|
|
3226
|
+
"autoFocus"
|
|
3227
|
+
])), {
|
|
3049
3228
|
advanced: {
|
|
3050
3229
|
type: "boolean",
|
|
3051
3230
|
displayName: "Advanced",
|
|
@@ -3055,7 +3234,7 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3055
3234
|
type: "slot",
|
|
3056
3235
|
hidden: (ps) => !ps.advanced
|
|
3057
3236
|
}
|
|
3058
|
-
},
|
|
3237
|
+
}),
|
|
3059
3238
|
trapsFocus: true
|
|
3060
3239
|
},
|
|
3061
3240
|
overrides
|
|
@@ -3091,7 +3270,7 @@ var __objRest$5 = (source, exclude) => {
|
|
|
3091
3270
|
return target;
|
|
3092
3271
|
};
|
|
3093
3272
|
const SLIDER_TRACK_INTERACTION_VARIANTS = ["hovered"];
|
|
3094
|
-
const { interactionVariants: interactionVariants$
|
|
3273
|
+
const { interactionVariants: interactionVariants$4, withObservedValues: withObservedValues$3 } = pickAriaComponentVariants(
|
|
3095
3274
|
SLIDER_TRACK_INTERACTION_VARIANTS
|
|
3096
3275
|
);
|
|
3097
3276
|
function findMinMaxIndices(values) {
|
|
@@ -3112,7 +3291,7 @@ function findMinMaxIndices(values) {
|
|
|
3112
3291
|
}
|
|
3113
3292
|
function BaseSliderTrack(props) {
|
|
3114
3293
|
const context = React.useContext(PlasmicSliderContext);
|
|
3115
|
-
const mergedProps = mergeProps
|
|
3294
|
+
const mergedProps = mergeProps(context, props);
|
|
3116
3295
|
const _a = mergedProps, {
|
|
3117
3296
|
children,
|
|
3118
3297
|
progressBar,
|
|
@@ -3141,7 +3320,7 @@ function BaseSliderTrack(props) {
|
|
|
3141
3320
|
const lastThumb = rawThumbs[rawThumbs.length - 1];
|
|
3142
3321
|
return rawThumbs.concat(new Array(difference).fill(lastThumb));
|
|
3143
3322
|
}, [children, mergedProps.value]);
|
|
3144
|
-
const track = /* @__PURE__ */ React.createElement(SliderTrack, __spreadValues$5({ style: { position: "relative" } }, rest), ({ state, isHovered }) => /* @__PURE__ */ React.createElement(React.Fragment, null, withObservedValues$
|
|
3323
|
+
const track = /* @__PURE__ */ React.createElement(SliderTrack, __spreadValues$5({ style: { position: "relative" } }, rest), ({ state, isHovered }) => /* @__PURE__ */ React.createElement(React.Fragment, null, withObservedValues$3(
|
|
3145
3324
|
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3146
3325
|
"div",
|
|
3147
3326
|
{
|
|
@@ -3183,6 +3362,7 @@ function registerSliderTrack(loader, overrides) {
|
|
|
3183
3362
|
displayName: "Aria Slider Track",
|
|
3184
3363
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSliderTrack",
|
|
3185
3364
|
importName: "BaseSliderTrack",
|
|
3365
|
+
interactionVariants: interactionVariants$4,
|
|
3186
3366
|
defaultStyles: {
|
|
3187
3367
|
width: "stretch",
|
|
3188
3368
|
backgroundColor: "#aaa",
|
|
@@ -3190,7 +3370,6 @@ function registerSliderTrack(loader, overrides) {
|
|
|
3190
3370
|
height: "10px",
|
|
3191
3371
|
padding: 0
|
|
3192
3372
|
},
|
|
3193
|
-
interactionVariants: interactionVariants$2,
|
|
3194
3373
|
props: {
|
|
3195
3374
|
children: {
|
|
3196
3375
|
type: "slot",
|
|
@@ -3219,6 +3398,18 @@ function registerSliderTrack(loader, overrides) {
|
|
|
3219
3398
|
}
|
|
3220
3399
|
}
|
|
3221
3400
|
]
|
|
3401
|
+
},
|
|
3402
|
+
onHoverStart: {
|
|
3403
|
+
type: "eventHandler",
|
|
3404
|
+
argTypes: [{ name: "event", type: "object" }]
|
|
3405
|
+
},
|
|
3406
|
+
onHoverEnd: {
|
|
3407
|
+
type: "eventHandler",
|
|
3408
|
+
argTypes: [{ name: "event", type: "object" }]
|
|
3409
|
+
},
|
|
3410
|
+
onHoverChange: {
|
|
3411
|
+
type: "eventHandler",
|
|
3412
|
+
argTypes: [{ name: "isHovering", type: "boolean" }]
|
|
3222
3413
|
}
|
|
3223
3414
|
},
|
|
3224
3415
|
trapsFocus: true
|
|
@@ -3259,6 +3450,10 @@ var __objRest$4 = (source, exclude) => {
|
|
|
3259
3450
|
return target;
|
|
3260
3451
|
};
|
|
3261
3452
|
const SLIDER_COMPONENT_NAME = makeComponentName("slider");
|
|
3453
|
+
const SLIDER_INTERACTION_VARIANTS = ["disabled"];
|
|
3454
|
+
const { interactionVariants: interactionVariants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(
|
|
3455
|
+
SLIDER_INTERACTION_VARIANTS
|
|
3456
|
+
);
|
|
3262
3457
|
const sliderHelpers = {
|
|
3263
3458
|
states: {
|
|
3264
3459
|
range: {
|
|
@@ -3280,7 +3475,23 @@ const sliderHelpers = {
|
|
|
3280
3475
|
}
|
|
3281
3476
|
};
|
|
3282
3477
|
function BaseSlider(props) {
|
|
3283
|
-
const _a = props, {
|
|
3478
|
+
const _a = props, {
|
|
3479
|
+
range,
|
|
3480
|
+
value,
|
|
3481
|
+
defaultRange,
|
|
3482
|
+
children,
|
|
3483
|
+
updateInteractionVariant,
|
|
3484
|
+
defaultValue,
|
|
3485
|
+
onChange
|
|
3486
|
+
} = _a, rest = __objRest$4(_a, [
|
|
3487
|
+
"range",
|
|
3488
|
+
"value",
|
|
3489
|
+
"defaultRange",
|
|
3490
|
+
"children",
|
|
3491
|
+
"updateInteractionVariant",
|
|
3492
|
+
"defaultValue",
|
|
3493
|
+
"onChange"
|
|
3494
|
+
]);
|
|
3284
3495
|
const isFirstRender = useRef(true);
|
|
3285
3496
|
useEffect(() => {
|
|
3286
3497
|
var _a2, _b, _c;
|
|
@@ -3299,7 +3510,7 @@ function BaseSlider(props) {
|
|
|
3299
3510
|
}
|
|
3300
3511
|
(_c = props.onChange) == null ? void 0 : _c.call(props, Array.isArray(value) ? 0 : value != null ? value : 0, false);
|
|
3301
3512
|
}, [props.isMultiValue]);
|
|
3302
|
-
const mergedProps = mergeProps
|
|
3513
|
+
const mergedProps = mergeProps(rest, {
|
|
3303
3514
|
value: props.isMultiValue ? range : value,
|
|
3304
3515
|
defaultValue: props.isMultiValue ? defaultRange : defaultValue
|
|
3305
3516
|
});
|
|
@@ -3310,7 +3521,14 @@ function BaseSlider(props) {
|
|
|
3310
3521
|
onChange: (newValue) => {
|
|
3311
3522
|
onChange == null ? void 0 : onChange(newValue, props.isMultiValue);
|
|
3312
3523
|
}
|
|
3313
|
-
}, mergedProps)
|
|
3524
|
+
}, mergedProps),
|
|
3525
|
+
({ isDisabled }) => withObservedValues$2(
|
|
3526
|
+
children,
|
|
3527
|
+
{
|
|
3528
|
+
disabled: isDisabled
|
|
3529
|
+
},
|
|
3530
|
+
updateInteractionVariant
|
|
3531
|
+
)
|
|
3314
3532
|
));
|
|
3315
3533
|
}
|
|
3316
3534
|
function registerSlider(loader, overrides) {
|
|
@@ -3322,6 +3540,7 @@ function registerSlider(loader, overrides) {
|
|
|
3322
3540
|
displayName: "Aria Slider",
|
|
3323
3541
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSlider",
|
|
3324
3542
|
importName: "BaseSlider",
|
|
3543
|
+
interactionVariants: interactionVariants$3,
|
|
3325
3544
|
defaultStyles: {
|
|
3326
3545
|
width: "300px"
|
|
3327
3546
|
},
|
|
@@ -3502,20 +3721,34 @@ const SWITCH_INTERACTION_VARIANTS = [
|
|
|
3502
3721
|
"hovered",
|
|
3503
3722
|
"pressed",
|
|
3504
3723
|
"focused",
|
|
3505
|
-
"focusVisible"
|
|
3724
|
+
"focusVisible",
|
|
3725
|
+
"selected",
|
|
3726
|
+
"disabled",
|
|
3727
|
+
"readonly"
|
|
3506
3728
|
];
|
|
3507
|
-
const { interactionVariants: interactionVariants$
|
|
3729
|
+
const { interactionVariants: interactionVariants$2, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(
|
|
3508
3730
|
SWITCH_INTERACTION_VARIANTS
|
|
3509
3731
|
);
|
|
3510
3732
|
function BaseSwitch(props) {
|
|
3511
3733
|
const _a = props, { children, updateInteractionVariant } = _a, rest = __objRest$3(_a, ["children", "updateInteractionVariant"]);
|
|
3512
|
-
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
|
|
3734
|
+
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
|
|
3735
|
+
isHovered,
|
|
3736
|
+
isPressed,
|
|
3737
|
+
isFocused,
|
|
3738
|
+
isFocusVisible,
|
|
3739
|
+
isSelected,
|
|
3740
|
+
isDisabled,
|
|
3741
|
+
isReadOnly
|
|
3742
|
+
}) => withObservedValues$1(
|
|
3513
3743
|
children,
|
|
3514
3744
|
{
|
|
3515
3745
|
hovered: isHovered,
|
|
3516
3746
|
pressed: isPressed,
|
|
3517
3747
|
focused: isFocused,
|
|
3518
|
-
focusVisible: isFocusVisible
|
|
3748
|
+
focusVisible: isFocusVisible,
|
|
3749
|
+
selected: isSelected,
|
|
3750
|
+
disabled: isDisabled,
|
|
3751
|
+
readonly: isReadOnly
|
|
3519
3752
|
},
|
|
3520
3753
|
updateInteractionVariant
|
|
3521
3754
|
));
|
|
@@ -3529,7 +3762,7 @@ function registerSwitch(loader, overrides) {
|
|
|
3529
3762
|
displayName: "Aria Switch",
|
|
3530
3763
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSwitch",
|
|
3531
3764
|
importName: "BaseSwitch",
|
|
3532
|
-
interactionVariants: interactionVariants$
|
|
3765
|
+
interactionVariants: interactionVariants$2,
|
|
3533
3766
|
defaultStyles: {
|
|
3534
3767
|
display: "flex",
|
|
3535
3768
|
flexDirection: "column",
|
|
@@ -3669,12 +3902,28 @@ var __objRest$2 = (source, exclude) => {
|
|
|
3669
3902
|
}
|
|
3670
3903
|
return target;
|
|
3671
3904
|
};
|
|
3672
|
-
const TEXTAREA_INTERACTION_VARIANTS = [
|
|
3673
|
-
|
|
3905
|
+
const TEXTAREA_INTERACTION_VARIANTS = [
|
|
3906
|
+
"focused",
|
|
3907
|
+
"hovered",
|
|
3908
|
+
"disabled"
|
|
3909
|
+
];
|
|
3910
|
+
const { interactionVariants: interactionVariants$1 } = pickAriaComponentVariants(
|
|
3674
3911
|
TEXTAREA_INTERACTION_VARIANTS
|
|
3675
3912
|
);
|
|
3676
3913
|
function BaseTextArea(props) {
|
|
3677
|
-
|
|
3914
|
+
var _b;
|
|
3915
|
+
const _a = props, { disabled, updateInteractionVariant, setControlContextData } = _a, rest = __objRest$2(_a, ["disabled", "updateInteractionVariant", "setControlContextData"]);
|
|
3916
|
+
const context = React.useContext(PlasmicTextFieldContext);
|
|
3917
|
+
const isStandalone = !context;
|
|
3918
|
+
const mergedProps = mergeProps(rest, {
|
|
3919
|
+
disabled: (_b = context == null ? void 0 : context.isDisabled) != null ? _b : disabled
|
|
3920
|
+
});
|
|
3921
|
+
useEffect(() => {
|
|
3922
|
+
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
3923
|
+
disabled: mergedProps.disabled
|
|
3924
|
+
});
|
|
3925
|
+
}, [mergedProps.disabled, updateInteractionVariant]);
|
|
3926
|
+
setControlContextData == null ? void 0 : setControlContextData({ isStandalone });
|
|
3678
3927
|
return /* @__PURE__ */ React.createElement(
|
|
3679
3928
|
TextArea,
|
|
3680
3929
|
__spreadValues$2({
|
|
@@ -3692,9 +3941,8 @@ function BaseTextArea(props) {
|
|
|
3692
3941
|
updateInteractionVariant == null ? void 0 : updateInteractionVariant({
|
|
3693
3942
|
hovered: isHovered
|
|
3694
3943
|
});
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
}, rest)
|
|
3944
|
+
}
|
|
3945
|
+
}, mergedProps)
|
|
3698
3946
|
);
|
|
3699
3947
|
}
|
|
3700
3948
|
function registerTextArea(loader, overrides) {
|
|
@@ -3706,11 +3954,17 @@ function registerTextArea(loader, overrides) {
|
|
|
3706
3954
|
displayName: "Aria TextArea",
|
|
3707
3955
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextArea",
|
|
3708
3956
|
importName: "BaseTextArea",
|
|
3709
|
-
interactionVariants,
|
|
3957
|
+
interactionVariants: interactionVariants$1,
|
|
3710
3958
|
props: {
|
|
3711
3959
|
placeholder: {
|
|
3712
3960
|
type: "string"
|
|
3713
3961
|
},
|
|
3962
|
+
disabled: {
|
|
3963
|
+
type: "boolean",
|
|
3964
|
+
description: "Whether the input is disabled",
|
|
3965
|
+
defaultValueHint: false,
|
|
3966
|
+
hidden: (_ps, ctx) => !(ctx == null ? void 0 : ctx.isStandalone)
|
|
3967
|
+
},
|
|
3714
3968
|
onKeyDown: {
|
|
3715
3969
|
type: "eventHandler",
|
|
3716
3970
|
argTypes: [{ name: "keyboardEvent", type: "object" }]
|
|
@@ -3769,15 +4023,39 @@ var __objRest$1 = (source, exclude) => {
|
|
|
3769
4023
|
}
|
|
3770
4024
|
return target;
|
|
3771
4025
|
};
|
|
4026
|
+
const TEXT_FIELD_INTERACTION_VARIANTS = [
|
|
4027
|
+
"disabled",
|
|
4028
|
+
"readonly"
|
|
4029
|
+
];
|
|
4030
|
+
const { interactionVariants, withObservedValues } = pickAriaComponentVariants(
|
|
4031
|
+
TEXT_FIELD_INTERACTION_VARIANTS
|
|
4032
|
+
);
|
|
3772
4033
|
function BaseTextField(props) {
|
|
3773
|
-
const _a = props, {
|
|
3774
|
-
|
|
4034
|
+
const _a = props, {
|
|
4035
|
+
enableAutoComplete,
|
|
4036
|
+
autoComplete,
|
|
4037
|
+
children,
|
|
4038
|
+
updateInteractionVariant
|
|
4039
|
+
} = _a, rest = __objRest$1(_a, [
|
|
4040
|
+
"enableAutoComplete",
|
|
4041
|
+
"autoComplete",
|
|
4042
|
+
"children",
|
|
4043
|
+
"updateInteractionVariant"
|
|
4044
|
+
]);
|
|
4045
|
+
return /* @__PURE__ */ React.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(
|
|
3775
4046
|
TextField,
|
|
3776
4047
|
__spreadValues$1({
|
|
3777
4048
|
autoComplete: enableAutoComplete ? autoComplete : void 0
|
|
3778
4049
|
}, rest),
|
|
3779
|
-
|
|
3780
|
-
|
|
4050
|
+
({ isDisabled, isReadOnly }) => withObservedValues(
|
|
4051
|
+
children,
|
|
4052
|
+
{
|
|
4053
|
+
disabled: isDisabled,
|
|
4054
|
+
readonly: isReadOnly
|
|
4055
|
+
},
|
|
4056
|
+
updateInteractionVariant
|
|
4057
|
+
)
|
|
4058
|
+
));
|
|
3781
4059
|
}
|
|
3782
4060
|
const TEXT_FIELD_COMPONENT_NAME = makeComponentName("textField");
|
|
3783
4061
|
function registerTextField(loader, overrides) {
|
|
@@ -3789,6 +4067,7 @@ function registerTextField(loader, overrides) {
|
|
|
3789
4067
|
displayName: "Aria TextField",
|
|
3790
4068
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextField",
|
|
3791
4069
|
importName: "BaseTextField",
|
|
4070
|
+
interactionVariants,
|
|
3792
4071
|
// TODO: Support for validate prop
|
|
3793
4072
|
props: __spreadProps(__spreadValues$1({}, getCommonInputProps("input", [
|
|
3794
4073
|
"name",
|
|
@@ -4110,13 +4389,13 @@ function BaseTooltip(props) {
|
|
|
4110
4389
|
},
|
|
4111
4390
|
React.isValidElement(focusableChild) ? React.cloneElement(focusableChild, __spreadValues({
|
|
4112
4391
|
ref
|
|
4113
|
-
}, mergeProps(
|
|
4392
|
+
}, mergeProps$1(
|
|
4114
4393
|
focusableChild.props,
|
|
4115
4394
|
triggerProps
|
|
4116
4395
|
))) : null,
|
|
4117
4396
|
state.isOpen && /* @__PURE__ */ React.createElement(React.Fragment, null, React.cloneElement(
|
|
4118
4397
|
hasContent ? tooltipContent : /* @__PURE__ */ React.createElement("p", null, "Add some content to the tooltip..."),
|
|
4119
|
-
mergeProps(tooltipProps, tooltipContent == null ? void 0 : tooltipContent.props.attrs, { className })
|
|
4398
|
+
mergeProps$1(tooltipProps, tooltipContent == null ? void 0 : tooltipContent.props.attrs, { className })
|
|
4120
4399
|
))
|
|
4121
4400
|
);
|
|
4122
4401
|
}
|