@plasmicpkgs/react-aria 0.0.11 → 0.0.13

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.
Files changed (80) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/react-aria.esm.js +962 -177
  3. package/dist/react-aria.esm.js.map +1 -1
  4. package/dist/react-aria.js +960 -175
  5. package/dist/react-aria.js.map +1 -1
  6. package/dist/registerCheckbox.d.ts +10 -0
  7. package/dist/registerCheckboxGroup.d.ts +5 -0
  8. package/dist/registerDescription.d.ts +3 -0
  9. package/dist/registerFieldError.d.ts +19 -0
  10. package/dist/registerForm.d.ts +9 -0
  11. package/dist/registerLabel.d.ts +2 -3
  12. package/dist/registerRadio.d.ts +10 -0
  13. package/dist/registerRadioGroup.d.ts +9 -0
  14. package/dist/registerText.d.ts +5 -0
  15. package/package.json +4 -4
  16. package/skinny/{contexts-c0294d96.cjs.js → contexts-3e42cdf9.cjs.js} +2 -3
  17. package/skinny/{contexts-c0294d96.cjs.js.map → contexts-3e42cdf9.cjs.js.map} +1 -1
  18. package/skinny/{contexts-fd3e1077.esm.js → contexts-49f6c298.esm.js} +3 -3
  19. package/skinny/{contexts-fd3e1077.esm.js.map → contexts-49f6c298.esm.js.map} +1 -1
  20. package/skinny/registerCheckbox.cjs.js +158 -0
  21. package/skinny/registerCheckbox.cjs.js.map +1 -0
  22. package/skinny/registerCheckbox.d.ts +10 -0
  23. package/skinny/registerCheckbox.esm.js +151 -0
  24. package/skinny/registerCheckbox.esm.js.map +1 -0
  25. package/skinny/registerCheckboxGroup.cjs.js +113 -0
  26. package/skinny/registerCheckboxGroup.cjs.js.map +1 -0
  27. package/skinny/registerCheckboxGroup.d.ts +5 -0
  28. package/skinny/registerCheckboxGroup.esm.js +110 -0
  29. package/skinny/registerCheckboxGroup.esm.js.map +1 -0
  30. package/skinny/registerComboBox.cjs.js +1 -1
  31. package/skinny/registerComboBox.esm.js +1 -1
  32. package/skinny/registerDescription.cjs.js +38 -0
  33. package/skinny/registerDescription.cjs.js.map +1 -0
  34. package/skinny/registerDescription.d.ts +3 -0
  35. package/skinny/registerDescription.esm.js +36 -0
  36. package/skinny/registerDescription.esm.js.map +1 -0
  37. package/skinny/registerFieldError.cjs.js +163 -0
  38. package/skinny/registerFieldError.cjs.js.map +1 -0
  39. package/skinny/registerFieldError.d.ts +19 -0
  40. package/skinny/registerFieldError.esm.js +156 -0
  41. package/skinny/registerFieldError.esm.js.map +1 -0
  42. package/skinny/registerForm.cjs.js +96 -0
  43. package/skinny/registerForm.cjs.js.map +1 -0
  44. package/skinny/registerForm.d.ts +9 -0
  45. package/skinny/registerForm.esm.js +89 -0
  46. package/skinny/registerForm.esm.js.map +1 -0
  47. package/skinny/registerHeader.cjs.js +1 -1
  48. package/skinny/registerHeader.esm.js +1 -1
  49. package/skinny/registerInput.cjs.js +1 -1
  50. package/skinny/registerInput.esm.js +1 -1
  51. package/skinny/registerLabel.cjs.js +6 -36
  52. package/skinny/registerLabel.cjs.js.map +1 -1
  53. package/skinny/registerLabel.d.ts +2 -3
  54. package/skinny/registerLabel.esm.js +5 -31
  55. package/skinny/registerLabel.esm.js.map +1 -1
  56. package/skinny/registerListBox.cjs.js +1 -1
  57. package/skinny/registerListBox.esm.js +1 -1
  58. package/skinny/registerListBoxItem.cjs.js +1 -1
  59. package/skinny/registerListBoxItem.esm.js +1 -1
  60. package/skinny/registerPopover.cjs.js +1 -1
  61. package/skinny/registerPopover.esm.js +1 -1
  62. package/skinny/registerRadio.cjs.js +146 -0
  63. package/skinny/registerRadio.cjs.js.map +1 -0
  64. package/skinny/registerRadio.d.ts +10 -0
  65. package/skinny/registerRadio.esm.js +139 -0
  66. package/skinny/registerRadio.esm.js.map +1 -0
  67. package/skinny/registerRadioGroup.cjs.js +142 -0
  68. package/skinny/registerRadioGroup.cjs.js.map +1 -0
  69. package/skinny/registerRadioGroup.d.ts +9 -0
  70. package/skinny/registerRadioGroup.esm.js +135 -0
  71. package/skinny/registerRadioGroup.esm.js.map +1 -0
  72. package/skinny/registerSection.cjs.js +1 -1
  73. package/skinny/registerSection.esm.js +1 -1
  74. package/skinny/registerSelect.cjs.js +1 -1
  75. package/skinny/registerSelect.esm.js +1 -1
  76. package/skinny/registerText.cjs.js +69 -0
  77. package/skinny/registerText.cjs.js.map +1 -0
  78. package/skinny/registerText.d.ts +5 -0
  79. package/skinny/registerText.esm.js +62 -0
  80. package/skinny/registerText.esm.js.map +1 -0
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect } from 'react';
2
- import { Button, ComboBox, ComboBoxStateContext, Input, Label, ListBoxItem, ListBox, PopoverContext, Popover, Header, Section, Collection, SelectValue, Select, Switch } from 'react-aria-components';
2
+ import { Button, Checkbox, Text, FieldError, Label, CheckboxGroup, ComboBox, ComboBoxStateContext, Form, Input, ListBoxItem, ListBox, PopoverContext, Popover, Radio, RadioGroup, Header, Section, Collection, SelectValue, Select, Switch } from 'react-aria-components';
3
3
  import registerComponent from '@plasmicapp/host/registerComponent';
4
4
  import { useFilter } from '@react-aria/i18n';
5
5
  import { mergeProps } from '@react-aria/utils';
6
- import { usePlasmicCanvasContext } from '@plasmicapp/host';
6
+ import { usePlasmicCanvasContext, DataProvider } from '@plasmicapp/host';
7
7
 
8
8
  function getCommonInputProps(fieldName, fields) {
9
9
  const commonInputProps = {
@@ -55,25 +55,25 @@ function getCommonInputProps(fieldName, fields) {
55
55
  return filteredProps;
56
56
  }
57
57
 
58
- var __defProp$b = Object.defineProperty;
59
- var __defProps$5 = Object.defineProperties;
60
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
61
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
62
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
63
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
64
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
65
- var __spreadValues$b = (a, b) => {
58
+ var __defProp$i = Object.defineProperty;
59
+ var __defProps$a = Object.defineProperties;
60
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
61
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
62
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
63
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
64
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
65
+ var __spreadValues$i = (a, b) => {
66
66
  for (var prop in b || (b = {}))
67
- if (__hasOwnProp$b.call(b, prop))
68
- __defNormalProp$b(a, prop, b[prop]);
69
- if (__getOwnPropSymbols$b)
70
- for (var prop of __getOwnPropSymbols$b(b)) {
71
- if (__propIsEnum$b.call(b, prop))
72
- __defNormalProp$b(a, prop, b[prop]);
67
+ if (__hasOwnProp$i.call(b, prop))
68
+ __defNormalProp$i(a, prop, b[prop]);
69
+ if (__getOwnPropSymbols$i)
70
+ for (var prop of __getOwnPropSymbols$i(b)) {
71
+ if (__propIsEnum$i.call(b, prop))
72
+ __defNormalProp$i(a, prop, b[prop]);
73
73
  }
74
74
  return a;
75
75
  };
76
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
76
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
77
77
  function ValueObserver({ value, onChange }) {
78
78
  useEffect(() => {
79
79
  onChange(value);
@@ -82,8 +82,8 @@ function ValueObserver({ value, onChange }) {
82
82
  }
83
83
  function registerComponentHelper(loader, component, meta, overrides) {
84
84
  if (overrides) {
85
- meta = __spreadProps$5(__spreadValues$b(__spreadValues$b({}, meta), overrides), {
86
- props: __spreadValues$b(__spreadValues$b({}, meta.props), overrides.props)
85
+ meta = __spreadProps$a(__spreadValues$i(__spreadValues$i({}, meta), overrides), {
86
+ props: __spreadValues$i(__spreadValues$i({}, meta.props), overrides.props)
87
87
  });
88
88
  if (overrides.parentComponentName) {
89
89
  meta.name = makeChildComponentName(
@@ -121,41 +121,41 @@ function withoutNils(array) {
121
121
  return array.filter((x) => x != null);
122
122
  }
123
123
 
124
- var __defProp$a = Object.defineProperty;
125
- var __defProps$4 = Object.defineProperties;
126
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
127
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
128
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
129
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
130
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
131
- var __spreadValues$a = (a, b) => {
124
+ var __defProp$h = Object.defineProperty;
125
+ var __defProps$9 = Object.defineProperties;
126
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
127
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
128
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
129
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
130
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
131
+ var __spreadValues$h = (a, b) => {
132
132
  for (var prop in b || (b = {}))
133
- if (__hasOwnProp$a.call(b, prop))
134
- __defNormalProp$a(a, prop, b[prop]);
135
- if (__getOwnPropSymbols$a)
136
- for (var prop of __getOwnPropSymbols$a(b)) {
137
- if (__propIsEnum$a.call(b, prop))
138
- __defNormalProp$a(a, prop, b[prop]);
133
+ if (__hasOwnProp$h.call(b, prop))
134
+ __defNormalProp$h(a, prop, b[prop]);
135
+ if (__getOwnPropSymbols$h)
136
+ for (var prop of __getOwnPropSymbols$h(b)) {
137
+ if (__propIsEnum$h.call(b, prop))
138
+ __defNormalProp$h(a, prop, b[prop]);
139
139
  }
140
140
  return a;
141
141
  };
142
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
143
- var __objRest$3 = (source, exclude) => {
142
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
143
+ var __objRest$9 = (source, exclude) => {
144
144
  var target = {};
145
145
  for (var prop in source)
146
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
146
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
147
147
  target[prop] = source[prop];
148
- if (source != null && __getOwnPropSymbols$a)
149
- for (var prop of __getOwnPropSymbols$a(source)) {
150
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
148
+ if (source != null && __getOwnPropSymbols$h)
149
+ for (var prop of __getOwnPropSymbols$h(source)) {
150
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
151
151
  target[prop] = source[prop];
152
152
  }
153
153
  return target;
154
154
  };
155
155
  function BaseButton(props) {
156
- const _a = props, { submitsForm, onFocusVisibleChange, resetsForm, children } = _a, rest = __objRest$3(_a, ["submitsForm", "onFocusVisibleChange", "resetsForm", "children"]);
156
+ const _a = props, { submitsForm, onFocusVisibleChange, resetsForm, children } = _a, rest = __objRest$9(_a, ["submitsForm", "onFocusVisibleChange", "resetsForm", "children"]);
157
157
  const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
158
- return /* @__PURE__ */ React.createElement(Button, __spreadValues$a({ type }, rest), ({ isFocusVisible }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
158
+ return /* @__PURE__ */ React.createElement(Button, __spreadValues$h({ type }, rest), ({ isFocusVisible }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
159
159
  ValueObserver,
160
160
  {
161
161
  value: isFocusVisible,
@@ -172,7 +172,7 @@ function registerButton(loader, overrides) {
172
172
  displayName: "BaseButton",
173
173
  importPath: "@plasmicpkgs/react-aria/registerButton",
174
174
  importName: "BaseButton",
175
- props: __spreadProps$4(__spreadValues$a({}, getCommonInputProps("button", [
175
+ props: __spreadProps$9(__spreadValues$h({}, getCommonInputProps("button", [
176
176
  "isDisabled",
177
177
  "aria-label",
178
178
  "children"
@@ -242,7 +242,500 @@ function registerButton(loader, overrides) {
242
242
  );
243
243
  }
244
244
 
245
- const PlasmicLabelContext = React.createContext(void 0);
245
+ var __defProp$g = Object.defineProperty;
246
+ var __defProps$8 = Object.defineProperties;
247
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
248
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
249
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
250
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
251
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
252
+ var __spreadValues$g = (a, b) => {
253
+ for (var prop in b || (b = {}))
254
+ if (__hasOwnProp$g.call(b, prop))
255
+ __defNormalProp$g(a, prop, b[prop]);
256
+ if (__getOwnPropSymbols$g)
257
+ for (var prop of __getOwnPropSymbols$g(b)) {
258
+ if (__propIsEnum$g.call(b, prop))
259
+ __defNormalProp$g(a, prop, b[prop]);
260
+ }
261
+ return a;
262
+ };
263
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
264
+ var __objRest$8 = (source, exclude) => {
265
+ var target = {};
266
+ for (var prop in source)
267
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
268
+ target[prop] = source[prop];
269
+ if (source != null && __getOwnPropSymbols$g)
270
+ for (var prop of __getOwnPropSymbols$g(source)) {
271
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
272
+ target[prop] = source[prop];
273
+ }
274
+ return target;
275
+ };
276
+ function BaseCheckbox(props) {
277
+ const _a = props, { children, onPressChange, onFocusVisibleChange } = _a, rest = __objRest$8(_a, ["children", "onPressChange", "onFocusVisibleChange"]);
278
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$g({}, rest), ({ isFocusVisible, isPressed }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
279
+ ValueObserver,
280
+ {
281
+ value: isFocusVisible,
282
+ onChange: onFocusVisibleChange
283
+ }
284
+ ), /* @__PURE__ */ React.createElement(ValueObserver, { value: isPressed, onChange: onPressChange }), children)));
285
+ }
286
+ function registerCheckbox(loader, overrides) {
287
+ registerComponentHelper(
288
+ loader,
289
+ BaseCheckbox,
290
+ {
291
+ name: makeComponentName("checkbox"),
292
+ displayName: "BaseCheckbox",
293
+ importPath: "@plasmicpkgs/react-aria/registerCheckbox",
294
+ importName: "BaseCheckbox",
295
+ props: __spreadProps$8(__spreadValues$g({}, getCommonInputProps("checkbox", [
296
+ "name",
297
+ "isDisabled",
298
+ "isReadOnly",
299
+ "aria-label",
300
+ "children",
301
+ "isRequired",
302
+ "autoFocus"
303
+ ])), {
304
+ value: {
305
+ type: "string",
306
+ description: "The value of the input element, used when submitting an HTML form."
307
+ },
308
+ isSelected: {
309
+ type: "boolean",
310
+ editOnly: true,
311
+ uncontrolledProp: "defaultSelected",
312
+ description: "Whether the checkbox is toggled on",
313
+ defaultValueHint: false
314
+ },
315
+ isIndeterminate: {
316
+ displayName: "Indeterminate",
317
+ type: "boolean",
318
+ description: "This state indicates that the checkbox is neither fully checked nor unchecked. It typically represents a partial selection when dealing with groups of options. Some but not all items in the group are selected, resulting in an indeterminate state for the checkbox.",
319
+ defaultValueHint: false
320
+ },
321
+ isInvalid: {
322
+ displayName: "Invalid",
323
+ type: "boolean",
324
+ description: "Whether the input value is invalid",
325
+ defaultValueHint: false
326
+ },
327
+ validationBehavior: {
328
+ type: "choice",
329
+ options: ["native", "aria"],
330
+ description: "Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.",
331
+ defaultValueHint: "native"
332
+ },
333
+ onChange: {
334
+ type: "eventHandler",
335
+ argTypes: [{ name: "isSelected", type: "boolean" }]
336
+ },
337
+ onHoverChange: {
338
+ type: "eventHandler",
339
+ argTypes: [{ name: "isHovered", type: "boolean" }]
340
+ },
341
+ onFocusChange: {
342
+ type: "eventHandler",
343
+ argTypes: [{ name: "isFocused", type: "boolean" }]
344
+ },
345
+ onPressChange: {
346
+ type: "eventHandler",
347
+ argTypes: [{ name: "isPressed", type: "boolean" }]
348
+ },
349
+ onFocusVisibleChange: {
350
+ type: "eventHandler",
351
+ argTypes: [{ name: "isFocusVisible", type: "boolean" }]
352
+ }
353
+ }),
354
+ states: {
355
+ isSelected: {
356
+ type: "writable",
357
+ valueProp: "isSelected",
358
+ onChangeProp: "onChange",
359
+ variableType: "boolean"
360
+ },
361
+ isHovered: {
362
+ type: "readonly",
363
+ onChangeProp: "onHoverChange",
364
+ variableType: "boolean"
365
+ },
366
+ isPressed: {
367
+ type: "readonly",
368
+ onChangeProp: "onPressChange",
369
+ variableType: "boolean"
370
+ },
371
+ isFocused: {
372
+ type: "readonly",
373
+ onChangeProp: "onFocusChange",
374
+ variableType: "boolean"
375
+ },
376
+ isFocusVisible: {
377
+ type: "readonly",
378
+ onChangeProp: "onFocusVisibleChange",
379
+ variableType: "boolean"
380
+ }
381
+ },
382
+ trapsFocus: true
383
+ },
384
+ overrides
385
+ );
386
+ }
387
+
388
+ var __defProp$f = Object.defineProperty;
389
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
390
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
391
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
392
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
393
+ var __spreadValues$f = (a, b) => {
394
+ for (var prop in b || (b = {}))
395
+ if (__hasOwnProp$f.call(b, prop))
396
+ __defNormalProp$f(a, prop, b[prop]);
397
+ if (__getOwnPropSymbols$f)
398
+ for (var prop of __getOwnPropSymbols$f(b)) {
399
+ if (__propIsEnum$f.call(b, prop))
400
+ __defNormalProp$f(a, prop, b[prop]);
401
+ }
402
+ return a;
403
+ };
404
+ var __objRest$7 = (source, exclude) => {
405
+ var target = {};
406
+ for (var prop in source)
407
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
408
+ target[prop] = source[prop];
409
+ if (source != null && __getOwnPropSymbols$f)
410
+ for (var prop of __getOwnPropSymbols$f(source)) {
411
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
412
+ target[prop] = source[prop];
413
+ }
414
+ return target;
415
+ };
416
+ function BaseText(_a) {
417
+ var _b = _a, { children } = _b, rest = __objRest$7(_b, ["children"]);
418
+ return /* @__PURE__ */ React.createElement(Text, __spreadValues$f({}, rest), children);
419
+ }
420
+ function registerText(loader, overrides) {
421
+ registerComponentHelper(
422
+ loader,
423
+ BaseText,
424
+ {
425
+ name: makeComponentName("text"),
426
+ displayName: "BaseText",
427
+ importPath: "@plasmicpkgs/react-aria/registerText",
428
+ importName: "BaseText",
429
+ props: {
430
+ children: {
431
+ type: "slot"
432
+ },
433
+ slot: {
434
+ type: "string"
435
+ }
436
+ },
437
+ trapsFocus: true
438
+ },
439
+ overrides
440
+ );
441
+ }
442
+
443
+ var __defProp$e = Object.defineProperty;
444
+ var __defProps$7 = Object.defineProperties;
445
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
446
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
447
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
448
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
449
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
450
+ var __spreadValues$e = (a, b) => {
451
+ for (var prop in b || (b = {}))
452
+ if (__hasOwnProp$e.call(b, prop))
453
+ __defNormalProp$e(a, prop, b[prop]);
454
+ if (__getOwnPropSymbols$e)
455
+ for (var prop of __getOwnPropSymbols$e(b)) {
456
+ if (__propIsEnum$e.call(b, prop))
457
+ __defNormalProp$e(a, prop, b[prop]);
458
+ }
459
+ return a;
460
+ };
461
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
462
+ function registerDescription(loader, overrides) {
463
+ registerText(loader, __spreadProps$7(__spreadValues$e({}, overrides), {
464
+ displayName: "BaseDescription",
465
+ props: {
466
+ slot: { type: "string", hidden: () => true, defaultValue: "description" }
467
+ }
468
+ }));
469
+ }
470
+
471
+ var __defProp$d = Object.defineProperty;
472
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
473
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
474
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
475
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
476
+ var __spreadValues$d = (a, b) => {
477
+ for (var prop in b || (b = {}))
478
+ if (__hasOwnProp$d.call(b, prop))
479
+ __defNormalProp$d(a, prop, b[prop]);
480
+ if (__getOwnPropSymbols$d)
481
+ for (var prop of __getOwnPropSymbols$d(b)) {
482
+ if (__propIsEnum$d.call(b, prop))
483
+ __defNormalProp$d(a, prop, b[prop]);
484
+ }
485
+ return a;
486
+ };
487
+ var __objRest$6 = (source, exclude) => {
488
+ var target = {};
489
+ for (var prop in source)
490
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
491
+ target[prop] = source[prop];
492
+ if (source != null && __getOwnPropSymbols$d)
493
+ for (var prop of __getOwnPropSymbols$d(source)) {
494
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
495
+ target[prop] = source[prop];
496
+ }
497
+ return target;
498
+ };
499
+ function BaseFieldError(_a) {
500
+ var _b = _a, {
501
+ badInput,
502
+ customError,
503
+ patternMismatch,
504
+ rangeOverflow,
505
+ rangeUnderflow,
506
+ stepMismatch,
507
+ tooLong,
508
+ tooShort,
509
+ typeMismatch,
510
+ valueMissing
511
+ } = _b, rest = __objRest$6(_b, [
512
+ "badInput",
513
+ "customError",
514
+ "patternMismatch",
515
+ "rangeOverflow",
516
+ "rangeUnderflow",
517
+ "stepMismatch",
518
+ "tooLong",
519
+ "tooShort",
520
+ "typeMismatch",
521
+ "valueMissing"
522
+ ]);
523
+ return /* @__PURE__ */ React.createElement(FieldError, __spreadValues$d({}, rest), ({ validationDetails, validationErrors }) => {
524
+ if (validationDetails.badInput && badInput)
525
+ return badInput;
526
+ if (validationDetails.customError && customError)
527
+ return customError;
528
+ if (validationDetails.patternMismatch && patternMismatch)
529
+ return patternMismatch;
530
+ if (validationDetails.rangeOverflow && rangeOverflow)
531
+ return rangeOverflow;
532
+ if (validationDetails.rangeUnderflow && rangeUnderflow)
533
+ return rangeUnderflow;
534
+ if (validationDetails.stepMismatch && stepMismatch)
535
+ return stepMismatch;
536
+ if (validationDetails.tooLong && tooLong)
537
+ return tooLong;
538
+ if (validationDetails.tooShort && tooShort)
539
+ return tooShort;
540
+ if (validationDetails.typeMismatch && typeMismatch)
541
+ return typeMismatch;
542
+ if (validationDetails.valueMissing && valueMissing)
543
+ return valueMissing;
544
+ return validationErrors;
545
+ });
546
+ }
547
+ function PropsDescription() {
548
+ return /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 20 } }, /* @__PURE__ */ React.createElement("p", null, "You can customize the error messages for built-in validations by utilizing the props below."), /* @__PURE__ */ React.createElement("p", null, "For further information on the specific conditions triggering each error, please refer to the", " ", /* @__PURE__ */ React.createElement(
549
+ "a",
550
+ {
551
+ target: "_blank",
552
+ href: "https://developer.mozilla.org/en-US/docs/Web/API/ValidityState#instance_properties"
553
+ },
554
+ "MDN Docs"
555
+ ), "."));
556
+ }
557
+ function registerFieldError(loader, overrides) {
558
+ registerComponentHelper(
559
+ loader,
560
+ BaseFieldError,
561
+ {
562
+ name: makeComponentName("fielderror"),
563
+ displayName: "BaseFieldError",
564
+ importPath: "@plasmicpkgs/react-aria/registerFieldError",
565
+ importName: "BaseFieldError",
566
+ actions: [
567
+ {
568
+ type: "custom-action",
569
+ control: PropsDescription
570
+ }
571
+ ],
572
+ props: {
573
+ badInput: {
574
+ type: "string",
575
+ description: "Error message if the user has provided input that the browser is unable to convert"
576
+ },
577
+ customError: {
578
+ type: "string",
579
+ description: "Error message for custom validations"
580
+ },
581
+ patternMismatch: {
582
+ type: "string",
583
+ description: "Error message if the value does not match the specified pattern"
584
+ },
585
+ rangeOverflow: {
586
+ type: "string",
587
+ description: "Error message if the value is greater than the maximum specified"
588
+ },
589
+ rangeUnderflow: {
590
+ type: "string",
591
+ description: "Error message if the value is less than the minimum specified"
592
+ },
593
+ stepMismatch: {
594
+ type: "string",
595
+ description: "Error message if the value is not evenly divisible by the step value"
596
+ },
597
+ tooLong: {
598
+ type: "string",
599
+ description: "Error message if the value exceeds the specified maximum number of characters"
600
+ },
601
+ tooShort: {
602
+ type: "string",
603
+ description: "Error message if the value fails to meet the specified minimum number of characters"
604
+ },
605
+ typeMismatch: {
606
+ type: "string",
607
+ description: "Error message if the value is not in the required syntax (when type is email or url)"
608
+ },
609
+ valueMissing: {
610
+ type: "string",
611
+ description: "Error message if a required field has no value"
612
+ }
613
+ },
614
+ trapsFocus: true
615
+ },
616
+ overrides
617
+ );
618
+ }
619
+
620
+ const BaseLabel = Label;
621
+ function registerLabel(loader, overrides) {
622
+ registerComponentHelper(
623
+ loader,
624
+ BaseLabel,
625
+ {
626
+ name: makeComponentName("label"),
627
+ displayName: "BaseLabel",
628
+ importPath: "@plasmicpkgs/react-aria/registerLabel",
629
+ importName: "BaseLabel",
630
+ props: {
631
+ children: {
632
+ type: "slot"
633
+ }
634
+ },
635
+ trapsFocus: true
636
+ },
637
+ overrides
638
+ );
639
+ }
640
+
641
+ var __defProp$c = Object.defineProperty;
642
+ var __defProps$6 = Object.defineProperties;
643
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
644
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
645
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
646
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
647
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
648
+ var __spreadValues$c = (a, b) => {
649
+ for (var prop in b || (b = {}))
650
+ if (__hasOwnProp$c.call(b, prop))
651
+ __defNormalProp$c(a, prop, b[prop]);
652
+ if (__getOwnPropSymbols$c)
653
+ for (var prop of __getOwnPropSymbols$c(b)) {
654
+ if (__propIsEnum$c.call(b, prop))
655
+ __defNormalProp$c(a, prop, b[prop]);
656
+ }
657
+ return a;
658
+ };
659
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
660
+ const BaseCheckboxGroup = CheckboxGroup;
661
+ const componentName$1 = makeComponentName("checkboxGroup");
662
+ function registerCheckboxGroup(loader, overrides) {
663
+ registerComponentHelper(
664
+ loader,
665
+ BaseCheckboxGroup,
666
+ {
667
+ name: componentName$1,
668
+ displayName: "BaseCheckboxGroup",
669
+ importPath: "@plasmicpkgs/react-aria/registerCheckboxGroup",
670
+ importName: "BaseCheckboxGroup",
671
+ props: __spreadProps$6(__spreadValues$c({}, getCommonInputProps("checkbox group", [
672
+ "name",
673
+ "isDisabled",
674
+ "isReadOnly",
675
+ "aria-label",
676
+ "children",
677
+ "isRequired"
678
+ ])), {
679
+ value: {
680
+ type: "array",
681
+ editOnly: true,
682
+ uncontrolledProp: "defaultValue",
683
+ description: "The current value"
684
+ },
685
+ options: {
686
+ type: "array",
687
+ description: "The options in the radio group",
688
+ itemType: {
689
+ type: "object",
690
+ nameFunc: (item) => item.label,
691
+ fields: {
692
+ label: "string",
693
+ value: "string"
694
+ }
695
+ }
696
+ },
697
+ isInvalid: {
698
+ displayName: "Invalid",
699
+ type: "boolean",
700
+ description: "Whether the input value is invalid",
701
+ defaultValueHint: false
702
+ },
703
+ validationBehavior: {
704
+ type: "choice",
705
+ options: ["native", "aria"],
706
+ description: "Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.",
707
+ defaultValueHint: "native"
708
+ },
709
+ onChange: {
710
+ type: "eventHandler",
711
+ argTypes: [{ name: "value", type: "object" }]
712
+ }
713
+ }),
714
+ states: {
715
+ value: {
716
+ type: "writable",
717
+ valueProp: "value",
718
+ onChangeProp: "onChange",
719
+ variableType: "array"
720
+ }
721
+ },
722
+ trapsFocus: true
723
+ },
724
+ overrides
725
+ );
726
+ const thisName = makeChildComponentName(
727
+ overrides == null ? void 0 : overrides.parentComponentName,
728
+ componentName$1
729
+ );
730
+ registerFieldError(loader, { parentComponentName: thisName });
731
+ registerCheckbox(loader, { parentComponentName: thisName });
732
+ registerLabel(loader, { parentComponentName: thisName });
733
+ registerDescription(loader, {
734
+ parentComponentName: thisName
735
+ });
736
+ }
737
+
738
+ React.createContext(void 0);
246
739
  const PlasmicListBoxContext = React.createContext(void 0);
247
740
  const PlasmicPopoverContext = React.createContext(void 0);
248
741
  const PlasmicItemContext = React.createContext(void 0);
@@ -399,25 +892,25 @@ function makeValuePropType() {
399
892
  return type;
400
893
  }
401
894
 
402
- var __defProp$9 = Object.defineProperty;
403
- var __defProps$3 = Object.defineProperties;
404
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
405
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
406
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
407
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
408
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
409
- var __spreadValues$9 = (a, b) => {
895
+ var __defProp$b = Object.defineProperty;
896
+ var __defProps$5 = Object.defineProperties;
897
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
898
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
899
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
900
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
901
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
902
+ var __spreadValues$b = (a, b) => {
410
903
  for (var prop in b || (b = {}))
411
- if (__hasOwnProp$9.call(b, prop))
412
- __defNormalProp$9(a, prop, b[prop]);
413
- if (__getOwnPropSymbols$9)
414
- for (var prop of __getOwnPropSymbols$9(b)) {
415
- if (__propIsEnum$9.call(b, prop))
416
- __defNormalProp$9(a, prop, b[prop]);
904
+ if (__hasOwnProp$b.call(b, prop))
905
+ __defNormalProp$b(a, prop, b[prop]);
906
+ if (__getOwnPropSymbols$b)
907
+ for (var prop of __getOwnPropSymbols$b(b)) {
908
+ if (__propIsEnum$b.call(b, prop))
909
+ __defNormalProp$b(a, prop, b[prop]);
417
910
  }
418
911
  return a;
419
912
  };
420
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
913
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
421
914
  function BaseComboBox(props) {
422
915
  const {
423
916
  value,
@@ -450,7 +943,7 @@ function BaseComboBox(props) {
450
943
  return withoutNils(
451
944
  options2.map((op) => {
452
945
  if (op.type === "section") {
453
- return __spreadProps$3(__spreadValues$9({}, op), {
946
+ return __spreadProps$5(__spreadValues$b({}, op), {
454
947
  items: op.items ? filterOptions(op.items) : void 0
455
948
  });
456
949
  } else {
@@ -534,7 +1027,7 @@ function BaseComboBox(props) {
534
1027
  ]);
535
1028
  return /* @__PURE__ */ React.createElement(
536
1029
  ComboBox,
537
- __spreadValues$9({
1030
+ __spreadValues$b({
538
1031
  selectedKey: value,
539
1032
  onSelectionChange,
540
1033
  isDisabled,
@@ -673,25 +1166,107 @@ function registerComboBox(loader) {
673
1166
  });
674
1167
  }
675
1168
 
676
- var __defProp$8 = Object.defineProperty;
677
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
678
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
679
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
680
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
681
- var __spreadValues$8 = (a, b) => {
1169
+ var __defProp$a = Object.defineProperty;
1170
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1171
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1172
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1173
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1174
+ var __spreadValues$a = (a, b) => {
682
1175
  for (var prop in b || (b = {}))
683
- if (__hasOwnProp$8.call(b, prop))
684
- __defNormalProp$8(a, prop, b[prop]);
685
- if (__getOwnPropSymbols$8)
686
- for (var prop of __getOwnPropSymbols$8(b)) {
687
- if (__propIsEnum$8.call(b, prop))
688
- __defNormalProp$8(a, prop, b[prop]);
1176
+ if (__hasOwnProp$a.call(b, prop))
1177
+ __defNormalProp$a(a, prop, b[prop]);
1178
+ if (__getOwnPropSymbols$a)
1179
+ for (var prop of __getOwnPropSymbols$a(b)) {
1180
+ if (__propIsEnum$a.call(b, prop))
1181
+ __defNormalProp$a(a, prop, b[prop]);
1182
+ }
1183
+ return a;
1184
+ };
1185
+ var __objRest$5 = (source, exclude) => {
1186
+ var target = {};
1187
+ for (var prop in source)
1188
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
1189
+ target[prop] = source[prop];
1190
+ if (source != null && __getOwnPropSymbols$a)
1191
+ for (var prop of __getOwnPropSymbols$a(source)) {
1192
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
1193
+ target[prop] = source[prop];
1194
+ }
1195
+ return target;
1196
+ };
1197
+ function BaseForm(props) {
1198
+ const _a = props, { onSubmit, children } = _a, rest = __objRest$5(_a, ["onSubmit", "children"]);
1199
+ return /* @__PURE__ */ React.createElement(
1200
+ Form,
1201
+ __spreadValues$a({
1202
+ onSubmit: (e) => {
1203
+ e.preventDefault();
1204
+ const formData = new FormData(e.currentTarget);
1205
+ const formValues = {};
1206
+ formData.forEach((value, key) => {
1207
+ const field = e.currentTarget.elements.namedItem(key);
1208
+ if (field instanceof RadioNodeList && Array.from(field.values()).every(
1209
+ (f) => f.type === "checkbox"
1210
+ )) {
1211
+ formValues[key] = formData.getAll(key);
1212
+ } else {
1213
+ field.type;
1214
+ formValues[key] = formData.get(key);
1215
+ }
1216
+ });
1217
+ onSubmit == null ? void 0 : onSubmit(formValues);
1218
+ }
1219
+ }, rest),
1220
+ children
1221
+ );
1222
+ }
1223
+ function registerForm(loader, overrides) {
1224
+ registerComponentHelper(
1225
+ loader,
1226
+ BaseForm,
1227
+ {
1228
+ name: makeComponentName("form"),
1229
+ displayName: "BaseForm",
1230
+ importPath: "@plasmicpkgs/react-aria/registerForm",
1231
+ importName: "BaseForm",
1232
+ props: {
1233
+ children: {
1234
+ type: "slot"
1235
+ },
1236
+ onSubmit: {
1237
+ type: "eventHandler",
1238
+ argTypes: [{ name: "data", type: "object" }]
1239
+ },
1240
+ onReset: {
1241
+ type: "eventHandler",
1242
+ argTypes: []
1243
+ }
1244
+ },
1245
+ trapsFocus: true
1246
+ },
1247
+ overrides
1248
+ );
1249
+ }
1250
+
1251
+ var __defProp$9 = Object.defineProperty;
1252
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1253
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1254
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1255
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1256
+ var __spreadValues$9 = (a, b) => {
1257
+ for (var prop in b || (b = {}))
1258
+ if (__hasOwnProp$9.call(b, prop))
1259
+ __defNormalProp$9(a, prop, b[prop]);
1260
+ if (__getOwnPropSymbols$9)
1261
+ for (var prop of __getOwnPropSymbols$9(b)) {
1262
+ if (__propIsEnum$9.call(b, prop))
1263
+ __defNormalProp$9(a, prop, b[prop]);
689
1264
  }
690
1265
  return a;
691
1266
  };
692
1267
  function BaseInput(props) {
693
1268
  const contextProps = React.useContext(PlasmicInputContext);
694
- return /* @__PURE__ */ React.createElement(Input, __spreadValues$8({}, mergeProps(contextProps, props)));
1269
+ return /* @__PURE__ */ React.createElement(Input, __spreadValues$9({}, mergeProps(contextProps, props)));
695
1270
  }
696
1271
  function registerInput(loader, overrides) {
697
1272
  registerComponentHelper(
@@ -735,64 +1310,19 @@ function registerInput(loader, overrides) {
735
1310
  );
736
1311
  }
737
1312
 
738
- var __defProp$7 = Object.defineProperty;
739
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
740
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
741
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
742
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
743
- var __spreadValues$7 = (a, b) => {
744
- for (var prop in b || (b = {}))
745
- if (__hasOwnProp$7.call(b, prop))
746
- __defNormalProp$7(a, prop, b[prop]);
747
- if (__getOwnPropSymbols$7)
748
- for (var prop of __getOwnPropSymbols$7(b)) {
749
- if (__propIsEnum$7.call(b, prop))
750
- __defNormalProp$7(a, prop, b[prop]);
751
- }
752
- return a;
753
- };
754
- function BaseLabel(props) {
755
- const contextProps = React.useContext(PlasmicLabelContext);
756
- return /* @__PURE__ */ React.createElement(Label, __spreadValues$7({}, mergeProps(contextProps, props)));
757
- }
758
- function registerLabel(loader, overrides) {
759
- registerComponentHelper(
760
- loader,
761
- BaseLabel,
762
- {
763
- name: "plasmic-react-aria-label",
764
- displayName: "BaseLabel",
765
- importPath: "@plasmicpkgs/react-aria/registerLabel",
766
- importName: "BaseLabel",
767
- props: {
768
- children: {
769
- type: "slot",
770
- defaultValue: {
771
- type: "text",
772
- value: "Label"
773
- },
774
- mergeWithParent: true
775
- }
776
- },
777
- trapsFocus: true
778
- },
779
- overrides
780
- );
781
- }
782
-
783
- var __defProp$6 = Object.defineProperty;
784
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
785
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
786
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
787
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
788
- var __spreadValues$6 = (a, b) => {
1313
+ var __defProp$8 = Object.defineProperty;
1314
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1315
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1316
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1317
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1318
+ var __spreadValues$8 = (a, b) => {
789
1319
  for (var prop in b || (b = {}))
790
- if (__hasOwnProp$6.call(b, prop))
791
- __defNormalProp$6(a, prop, b[prop]);
792
- if (__getOwnPropSymbols$6)
793
- for (var prop of __getOwnPropSymbols$6(b)) {
794
- if (__propIsEnum$6.call(b, prop))
795
- __defNormalProp$6(a, prop, b[prop]);
1320
+ if (__hasOwnProp$8.call(b, prop))
1321
+ __defNormalProp$8(a, prop, b[prop]);
1322
+ if (__getOwnPropSymbols$8)
1323
+ for (var prop of __getOwnPropSymbols$8(b)) {
1324
+ if (__propIsEnum$8.call(b, prop))
1325
+ __defNormalProp$8(a, prop, b[prop]);
796
1326
  }
797
1327
  return a;
798
1328
  };
@@ -800,7 +1330,7 @@ function BaseListBoxItem(props) {
800
1330
  var _a;
801
1331
  const contextProps = React.useContext(PlasmicItemContext);
802
1332
  const mergedProps = mergeProps(contextProps, props);
803
- return /* @__PURE__ */ React.createElement(ListBoxItem, __spreadValues$6({ id: (_a = mergedProps.key) != null ? _a : void 0 }, mergedProps));
1333
+ return /* @__PURE__ */ React.createElement(ListBoxItem, __spreadValues$8({ id: (_a = mergedProps.key) != null ? _a : void 0 }, mergedProps));
804
1334
  }
805
1335
  function registerListBoxItem(loader, overrides) {
806
1336
  registerComponentHelper(
@@ -836,33 +1366,33 @@ function registerListBoxItem(loader, overrides) {
836
1366
  );
837
1367
  }
838
1368
 
839
- var __defProp$5 = Object.defineProperty;
840
- var __defProps$2 = Object.defineProperties;
841
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
842
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
843
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
844
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
845
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
846
- var __spreadValues$5 = (a, b) => {
1369
+ var __defProp$7 = Object.defineProperty;
1370
+ var __defProps$4 = Object.defineProperties;
1371
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1372
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1373
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1374
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1375
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1376
+ var __spreadValues$7 = (a, b) => {
847
1377
  for (var prop in b || (b = {}))
848
- if (__hasOwnProp$5.call(b, prop))
849
- __defNormalProp$5(a, prop, b[prop]);
850
- if (__getOwnPropSymbols$5)
851
- for (var prop of __getOwnPropSymbols$5(b)) {
852
- if (__propIsEnum$5.call(b, prop))
853
- __defNormalProp$5(a, prop, b[prop]);
1378
+ if (__hasOwnProp$7.call(b, prop))
1379
+ __defNormalProp$7(a, prop, b[prop]);
1380
+ if (__getOwnPropSymbols$7)
1381
+ for (var prop of __getOwnPropSymbols$7(b)) {
1382
+ if (__propIsEnum$7.call(b, prop))
1383
+ __defNormalProp$7(a, prop, b[prop]);
854
1384
  }
855
1385
  return a;
856
1386
  };
857
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
858
- var __objRest$2 = (source, exclude) => {
1387
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1388
+ var __objRest$4 = (source, exclude) => {
859
1389
  var target = {};
860
1390
  for (var prop in source)
861
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1391
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
862
1392
  target[prop] = source[prop];
863
- if (source != null && __getOwnPropSymbols$5)
864
- for (var prop of __getOwnPropSymbols$5(source)) {
865
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1393
+ if (source != null && __getOwnPropSymbols$7)
1394
+ for (var prop of __getOwnPropSymbols$7(source)) {
1395
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
866
1396
  target[prop] = source[prop];
867
1397
  }
868
1398
  return target;
@@ -911,21 +1441,21 @@ function BaseListBox(props) {
911
1441
  renderItem,
912
1442
  renderSection,
913
1443
  getItemType
914
- } = _a, rest = __objRest$2(_a, [
1444
+ } = _a, rest = __objRest$4(_a, [
915
1445
  "makeItemProps",
916
1446
  "makeSectionProps",
917
1447
  "renderItem",
918
1448
  "renderSection",
919
1449
  "getItemType"
920
1450
  ]);
921
- return /* @__PURE__ */ React.createElement(ListBox, __spreadValues$5({}, mergeProps(contextProps, rest)), (item) => {
1451
+ return /* @__PURE__ */ React.createElement(ListBox, __spreadValues$7({}, mergeProps(contextProps, rest)), (item) => {
922
1452
  if ((getItemType == null ? void 0 : getItemType(item)) === "section") {
923
1453
  const sectionProps = makeSectionProps == null ? void 0 : makeSectionProps(item);
924
1454
  return /* @__PURE__ */ React.createElement(
925
1455
  PlasmicSectionContext.Provider,
926
1456
  {
927
1457
  key: sectionProps == null ? void 0 : sectionProps.key,
928
- value: __spreadProps$2(__spreadValues$5({}, sectionProps), { makeItemProps, renderItem })
1458
+ value: __spreadProps$4(__spreadValues$7({}, sectionProps), { makeItemProps, renderItem })
929
1459
  },
930
1460
  renderSection == null ? void 0 : renderSection(item)
931
1461
  );
@@ -978,39 +1508,39 @@ function registerListBox(loader, overrides) {
978
1508
  });
979
1509
  }
980
1510
 
981
- var __defProp$4 = Object.defineProperty;
982
- var __defProps$1 = Object.defineProperties;
983
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
984
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
985
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
986
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
987
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
988
- var __spreadValues$4 = (a, b) => {
1511
+ var __defProp$6 = Object.defineProperty;
1512
+ var __defProps$3 = Object.defineProperties;
1513
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1514
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1515
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1516
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1517
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1518
+ var __spreadValues$6 = (a, b) => {
989
1519
  for (var prop in b || (b = {}))
990
- if (__hasOwnProp$4.call(b, prop))
991
- __defNormalProp$4(a, prop, b[prop]);
992
- if (__getOwnPropSymbols$4)
993
- for (var prop of __getOwnPropSymbols$4(b)) {
994
- if (__propIsEnum$4.call(b, prop))
995
- __defNormalProp$4(a, prop, b[prop]);
1520
+ if (__hasOwnProp$6.call(b, prop))
1521
+ __defNormalProp$6(a, prop, b[prop]);
1522
+ if (__getOwnPropSymbols$6)
1523
+ for (var prop of __getOwnPropSymbols$6(b)) {
1524
+ if (__propIsEnum$6.call(b, prop))
1525
+ __defNormalProp$6(a, prop, b[prop]);
996
1526
  }
997
1527
  return a;
998
1528
  };
999
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1000
- var __objRest$1 = (source, exclude) => {
1529
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1530
+ var __objRest$3 = (source, exclude) => {
1001
1531
  var target = {};
1002
1532
  for (var prop in source)
1003
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1533
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1004
1534
  target[prop] = source[prop];
1005
- if (source != null && __getOwnPropSymbols$4)
1006
- for (var prop of __getOwnPropSymbols$4(source)) {
1007
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1535
+ if (source != null && __getOwnPropSymbols$6)
1536
+ for (var prop of __getOwnPropSymbols$6(source)) {
1537
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1008
1538
  target[prop] = source[prop];
1009
1539
  }
1010
1540
  return target;
1011
1541
  };
1012
1542
  function BasePopover(props) {
1013
- const _a = props, restProps = __objRest$1(_a, ["resetClassName"]);
1543
+ const _a = props, restProps = __objRest$3(_a, ["resetClassName"]);
1014
1544
  const isStandalone = !React.useContext(PopoverContext);
1015
1545
  const contextProps = React.useContext(PlasmicPopoverContext);
1016
1546
  const canvas = usePlasmicCanvasContext();
@@ -1021,14 +1551,14 @@ function BasePopover(props) {
1021
1551
  const triggerRef = React.useRef(null);
1022
1552
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React.createElement(
1023
1553
  Popover,
1024
- __spreadProps$1(__spreadValues$4({}, mergedProps), {
1554
+ __spreadProps$3(__spreadValues$6({}, mergedProps), {
1025
1555
  triggerRef,
1026
1556
  isNonModal: true,
1027
1557
  isOpen: true
1028
1558
  })
1029
1559
  ));
1030
1560
  } else {
1031
- return /* @__PURE__ */ React.createElement(Popover, __spreadProps$1(__spreadValues$4({}, mergedProps), { isNonModal: !!canvas }));
1561
+ return /* @__PURE__ */ React.createElement(Popover, __spreadProps$3(__spreadValues$6({}, mergedProps), { isNonModal: !!canvas }));
1032
1562
  }
1033
1563
  }
1034
1564
  function registerPopover(loader, overrides) {
@@ -1086,6 +1616,257 @@ function registerPopover(loader, overrides) {
1086
1616
  );
1087
1617
  }
1088
1618
 
1619
+ var __defProp$5 = Object.defineProperty;
1620
+ var __defProps$2 = Object.defineProperties;
1621
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1622
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1623
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1624
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1625
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1626
+ var __spreadValues$5 = (a, b) => {
1627
+ for (var prop in b || (b = {}))
1628
+ if (__hasOwnProp$5.call(b, prop))
1629
+ __defNormalProp$5(a, prop, b[prop]);
1630
+ if (__getOwnPropSymbols$5)
1631
+ for (var prop of __getOwnPropSymbols$5(b)) {
1632
+ if (__propIsEnum$5.call(b, prop))
1633
+ __defNormalProp$5(a, prop, b[prop]);
1634
+ }
1635
+ return a;
1636
+ };
1637
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1638
+ var __objRest$2 = (source, exclude) => {
1639
+ var target = {};
1640
+ for (var prop in source)
1641
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1642
+ target[prop] = source[prop];
1643
+ if (source != null && __getOwnPropSymbols$5)
1644
+ for (var prop of __getOwnPropSymbols$5(source)) {
1645
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1646
+ target[prop] = source[prop];
1647
+ }
1648
+ return target;
1649
+ };
1650
+ function BaseRadio(props) {
1651
+ const _a = props, {
1652
+ children,
1653
+ onPressChange,
1654
+ onFocusVisibleChange,
1655
+ onHoverChange
1656
+ } = _a, rest = __objRest$2(_a, [
1657
+ "children",
1658
+ "onPressChange",
1659
+ "onFocusVisibleChange",
1660
+ "onHoverChange"
1661
+ ]);
1662
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Radio, __spreadValues$5({}, rest), ({ isFocusVisible, isPressed, isHovered }) => (
1663
+ // TODO: Remove DataProvider once Interaction variants are implemented for Code components
1664
+ /* @__PURE__ */ React.createElement(
1665
+ DataProvider,
1666
+ {
1667
+ name: "states",
1668
+ data: { isFocusVisible, isPressed, isHovered }
1669
+ },
1670
+ /* @__PURE__ */ React.createElement(
1671
+ ValueObserver,
1672
+ {
1673
+ value: isFocusVisible,
1674
+ onChange: onFocusVisibleChange
1675
+ }
1676
+ ),
1677
+ /* @__PURE__ */ React.createElement(ValueObserver, { value: isPressed, onChange: onPressChange }),
1678
+ /* @__PURE__ */ React.createElement(ValueObserver, { value: isHovered, onChange: onHoverChange }),
1679
+ children
1680
+ )
1681
+ )));
1682
+ }
1683
+ function registerRadio(loader, overrides) {
1684
+ registerComponentHelper(
1685
+ loader,
1686
+ BaseRadio,
1687
+ {
1688
+ name: makeComponentName("radio"),
1689
+ displayName: "BaseRadio",
1690
+ importPath: "@plasmicpkgs/react-aria/registerRadio",
1691
+ // TODO: Remove DataProvider once Interaction variants are implemented for Code components
1692
+ providesData: true,
1693
+ importName: "BaseRadio",
1694
+ props: __spreadProps$2(__spreadValues$5({}, getCommonInputProps("radio", [
1695
+ "isDisabled",
1696
+ "autoFocus",
1697
+ "aria-label",
1698
+ "children"
1699
+ ])), {
1700
+ value: {
1701
+ type: "string",
1702
+ description: "The value of the input element, used when submitting an HTML form."
1703
+ },
1704
+ onHoverChange: {
1705
+ type: "eventHandler",
1706
+ argTypes: [{ name: "isHovered", type: "boolean" }]
1707
+ },
1708
+ onFocusChange: {
1709
+ type: "eventHandler",
1710
+ argTypes: [{ name: "isFocused", type: "boolean" }]
1711
+ },
1712
+ onPressChange: {
1713
+ type: "eventHandler",
1714
+ argTypes: [{ name: "isPressed", type: "boolean" }]
1715
+ },
1716
+ onFocusVisibleChange: {
1717
+ type: "eventHandler",
1718
+ argTypes: [{ name: "isFocusVisible", type: "boolean" }]
1719
+ }
1720
+ }),
1721
+ states: {
1722
+ isHovered: {
1723
+ type: "readonly",
1724
+ onChangeProp: "onHoverChange",
1725
+ variableType: "boolean"
1726
+ },
1727
+ isPressed: {
1728
+ type: "readonly",
1729
+ onChangeProp: "onPressChange",
1730
+ variableType: "boolean"
1731
+ },
1732
+ isFocused: {
1733
+ type: "readonly",
1734
+ onChangeProp: "onFocusChange",
1735
+ variableType: "boolean"
1736
+ },
1737
+ isFocusVisible: {
1738
+ type: "readonly",
1739
+ onChangeProp: "onFocusVisibleChange",
1740
+ variableType: "boolean"
1741
+ }
1742
+ },
1743
+ trapsFocus: true
1744
+ },
1745
+ overrides
1746
+ );
1747
+ }
1748
+
1749
+ var __defProp$4 = Object.defineProperty;
1750
+ var __defProps$1 = Object.defineProperties;
1751
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1752
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1753
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1754
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1755
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1756
+ var __spreadValues$4 = (a, b) => {
1757
+ for (var prop in b || (b = {}))
1758
+ if (__hasOwnProp$4.call(b, prop))
1759
+ __defNormalProp$4(a, prop, b[prop]);
1760
+ if (__getOwnPropSymbols$4)
1761
+ for (var prop of __getOwnPropSymbols$4(b)) {
1762
+ if (__propIsEnum$4.call(b, prop))
1763
+ __defNormalProp$4(a, prop, b[prop]);
1764
+ }
1765
+ return a;
1766
+ };
1767
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1768
+ var __objRest$1 = (source, exclude) => {
1769
+ var target = {};
1770
+ for (var prop in source)
1771
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1772
+ target[prop] = source[prop];
1773
+ if (source != null && __getOwnPropSymbols$4)
1774
+ for (var prop of __getOwnPropSymbols$4(source)) {
1775
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1776
+ target[prop] = source[prop];
1777
+ }
1778
+ return target;
1779
+ };
1780
+ function BaseRadioGroup(props) {
1781
+ const _a = props, { children } = _a, rest = __objRest$1(_a, ["children"]);
1782
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$4({}, rest), children));
1783
+ }
1784
+ const componentName = makeComponentName("radioGroup");
1785
+ function registerRadioGroup(loader, overrides) {
1786
+ registerComponentHelper(
1787
+ loader,
1788
+ BaseRadioGroup,
1789
+ {
1790
+ name: componentName,
1791
+ displayName: "BaseRadioGroup",
1792
+ importPath: "@plasmicpkgs/react-aria/registerRadioGroup",
1793
+ importName: "BaseRadioGroup",
1794
+ props: __spreadProps$1(__spreadValues$4({}, getCommonInputProps("radio group", [
1795
+ "name",
1796
+ "isDisabled",
1797
+ "isReadOnly",
1798
+ "aria-label",
1799
+ "children",
1800
+ "isRequired"
1801
+ ])), {
1802
+ value: {
1803
+ type: "string",
1804
+ editOnly: true,
1805
+ uncontrolledProp: "defaultValue",
1806
+ description: "The current value"
1807
+ },
1808
+ options: {
1809
+ type: "array",
1810
+ description: "The options in the radio group",
1811
+ itemType: {
1812
+ type: "object",
1813
+ nameFunc: (item) => item.label,
1814
+ fields: {
1815
+ label: "string",
1816
+ value: "string"
1817
+ }
1818
+ }
1819
+ },
1820
+ isInvalid: {
1821
+ displayName: "Invalid",
1822
+ type: "boolean",
1823
+ description: "Whether the input value is invalid",
1824
+ defaultValueHint: false
1825
+ },
1826
+ validationBehavior: {
1827
+ type: "choice",
1828
+ options: ["native", "aria"],
1829
+ description: "Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.",
1830
+ defaultValueHint: "native"
1831
+ },
1832
+ onChange: {
1833
+ type: "eventHandler",
1834
+ argTypes: [{ name: "value", type: "string" }]
1835
+ },
1836
+ onFocusChange: {
1837
+ type: "eventHandler",
1838
+ argTypes: [{ name: "isFocused", type: "boolean" }]
1839
+ }
1840
+ }),
1841
+ states: {
1842
+ value: {
1843
+ type: "writable",
1844
+ valueProp: "value",
1845
+ onChangeProp: "onChange",
1846
+ variableType: "array"
1847
+ },
1848
+ isFocused: {
1849
+ type: "readonly",
1850
+ onChangeProp: "onFocusChange",
1851
+ variableType: "boolean"
1852
+ }
1853
+ },
1854
+ trapsFocus: true
1855
+ },
1856
+ overrides
1857
+ );
1858
+ const thisName = makeChildComponentName(
1859
+ overrides == null ? void 0 : overrides.parentComponentName,
1860
+ componentName
1861
+ );
1862
+ registerFieldError(loader, { parentComponentName: thisName });
1863
+ registerRadio(loader, { parentComponentName: thisName });
1864
+ registerLabel(loader, { parentComponentName: thisName });
1865
+ registerDescription(loader, {
1866
+ parentComponentName: thisName
1867
+ });
1868
+ }
1869
+
1089
1870
  var __defProp$3 = Object.defineProperty;
1090
1871
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1091
1872
  var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
@@ -1456,6 +2237,10 @@ function registerAll(loader) {
1456
2237
  registerInput(loader);
1457
2238
  registerSection(loader);
1458
2239
  registerSwitch(loader);
2240
+ registerForm(loader);
2241
+ registerCheckbox(loader);
2242
+ registerCheckboxGroup(loader);
2243
+ registerRadioGroup(loader);
1459
2244
  }
1460
2245
 
1461
2246
  export { registerAll };