@plasmicpkgs/react-aria 0.0.12 → 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 (52) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/contexts.d.ts +1 -1
  3. package/dist/react-aria.esm.js +897 -189
  4. package/dist/react-aria.esm.js.map +1 -1
  5. package/dist/react-aria.js +895 -187
  6. package/dist/react-aria.js.map +1 -1
  7. package/dist/registerCheckbox.d.ts +10 -0
  8. package/dist/registerCheckboxGroup.d.ts +5 -0
  9. package/dist/registerDescription.d.ts +3 -0
  10. package/dist/registerFieldError.d.ts +19 -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 +2 -2
  16. package/skinny/contexts.d.ts +1 -1
  17. package/skinny/registerCheckbox.cjs.js +158 -0
  18. package/skinny/registerCheckbox.cjs.js.map +1 -0
  19. package/skinny/registerCheckbox.d.ts +10 -0
  20. package/skinny/registerCheckbox.esm.js +151 -0
  21. package/skinny/registerCheckbox.esm.js.map +1 -0
  22. package/skinny/registerCheckboxGroup.cjs.js +113 -0
  23. package/skinny/registerCheckboxGroup.cjs.js.map +1 -0
  24. package/skinny/registerCheckboxGroup.d.ts +5 -0
  25. package/skinny/registerCheckboxGroup.esm.js +110 -0
  26. package/skinny/registerCheckboxGroup.esm.js.map +1 -0
  27. package/skinny/registerDescription.cjs.js +38 -0
  28. package/skinny/registerDescription.cjs.js.map +1 -0
  29. package/skinny/registerDescription.d.ts +3 -0
  30. package/skinny/registerDescription.esm.js +36 -0
  31. package/skinny/registerDescription.esm.js.map +1 -0
  32. package/skinny/registerFieldError.d.ts +19 -0
  33. package/skinny/registerLabel.cjs.js +2 -24
  34. package/skinny/registerLabel.cjs.js.map +1 -1
  35. package/skinny/registerLabel.d.ts +2 -3
  36. package/skinny/registerLabel.esm.js +2 -20
  37. package/skinny/registerLabel.esm.js.map +1 -1
  38. package/skinny/registerRadio.cjs.js +146 -0
  39. package/skinny/registerRadio.cjs.js.map +1 -0
  40. package/skinny/registerRadio.d.ts +10 -0
  41. package/skinny/registerRadio.esm.js +139 -0
  42. package/skinny/registerRadio.esm.js.map +1 -0
  43. package/skinny/registerRadioGroup.cjs.js +142 -0
  44. package/skinny/registerRadioGroup.cjs.js.map +1 -0
  45. package/skinny/registerRadioGroup.d.ts +9 -0
  46. package/skinny/registerRadioGroup.esm.js +135 -0
  47. package/skinny/registerRadioGroup.esm.js.map +1 -0
  48. package/skinny/registerText.cjs.js +69 -0
  49. package/skinny/registerText.cjs.js.map +1 -0
  50. package/skinny/registerText.d.ts +5 -0
  51. package/skinny/registerText.esm.js +62 -0
  52. package/skinny/registerText.esm.js.map +1 -0
@@ -62,25 +62,25 @@ function getCommonInputProps(fieldName, fields) {
62
62
  return filteredProps;
63
63
  }
64
64
 
65
- var __defProp$c = Object.defineProperty;
66
- var __defProps$5 = Object.defineProperties;
67
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
68
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
69
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
70
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
71
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
72
- var __spreadValues$c = (a, b) => {
65
+ var __defProp$i = Object.defineProperty;
66
+ var __defProps$a = Object.defineProperties;
67
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
68
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
69
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
70
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
71
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
72
+ var __spreadValues$i = (a, b) => {
73
73
  for (var prop in b || (b = {}))
74
- if (__hasOwnProp$c.call(b, prop))
75
- __defNormalProp$c(a, prop, b[prop]);
76
- if (__getOwnPropSymbols$c)
77
- for (var prop of __getOwnPropSymbols$c(b)) {
78
- if (__propIsEnum$c.call(b, prop))
79
- __defNormalProp$c(a, prop, b[prop]);
74
+ if (__hasOwnProp$i.call(b, prop))
75
+ __defNormalProp$i(a, prop, b[prop]);
76
+ if (__getOwnPropSymbols$i)
77
+ for (var prop of __getOwnPropSymbols$i(b)) {
78
+ if (__propIsEnum$i.call(b, prop))
79
+ __defNormalProp$i(a, prop, b[prop]);
80
80
  }
81
81
  return a;
82
82
  };
83
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
83
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
84
84
  function ValueObserver({ value, onChange }) {
85
85
  React.useEffect(() => {
86
86
  onChange(value);
@@ -89,8 +89,8 @@ function ValueObserver({ value, onChange }) {
89
89
  }
90
90
  function registerComponentHelper(loader, component, meta, overrides) {
91
91
  if (overrides) {
92
- meta = __spreadProps$5(__spreadValues$c(__spreadValues$c({}, meta), overrides), {
93
- props: __spreadValues$c(__spreadValues$c({}, meta.props), overrides.props)
92
+ meta = __spreadProps$a(__spreadValues$i(__spreadValues$i({}, meta), overrides), {
93
+ props: __spreadValues$i(__spreadValues$i({}, meta.props), overrides.props)
94
94
  });
95
95
  if (overrides.parentComponentName) {
96
96
  meta.name = makeChildComponentName(
@@ -128,41 +128,41 @@ function withoutNils(array) {
128
128
  return array.filter((x) => x != null);
129
129
  }
130
130
 
131
- var __defProp$b = Object.defineProperty;
132
- var __defProps$4 = Object.defineProperties;
133
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
134
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
135
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
136
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
137
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
138
- var __spreadValues$b = (a, b) => {
131
+ var __defProp$h = Object.defineProperty;
132
+ var __defProps$9 = Object.defineProperties;
133
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
134
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
135
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
136
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
137
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
138
+ var __spreadValues$h = (a, b) => {
139
139
  for (var prop in b || (b = {}))
140
- if (__hasOwnProp$b.call(b, prop))
141
- __defNormalProp$b(a, prop, b[prop]);
142
- if (__getOwnPropSymbols$b)
143
- for (var prop of __getOwnPropSymbols$b(b)) {
144
- if (__propIsEnum$b.call(b, prop))
145
- __defNormalProp$b(a, prop, b[prop]);
140
+ if (__hasOwnProp$h.call(b, prop))
141
+ __defNormalProp$h(a, prop, b[prop]);
142
+ if (__getOwnPropSymbols$h)
143
+ for (var prop of __getOwnPropSymbols$h(b)) {
144
+ if (__propIsEnum$h.call(b, prop))
145
+ __defNormalProp$h(a, prop, b[prop]);
146
146
  }
147
147
  return a;
148
148
  };
149
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
150
- var __objRest$4 = (source, exclude) => {
149
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
150
+ var __objRest$9 = (source, exclude) => {
151
151
  var target = {};
152
152
  for (var prop in source)
153
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
153
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
154
154
  target[prop] = source[prop];
155
- if (source != null && __getOwnPropSymbols$b)
156
- for (var prop of __getOwnPropSymbols$b(source)) {
157
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
155
+ if (source != null && __getOwnPropSymbols$h)
156
+ for (var prop of __getOwnPropSymbols$h(source)) {
157
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
158
158
  target[prop] = source[prop];
159
159
  }
160
160
  return target;
161
161
  };
162
162
  function BaseButton(props) {
163
- const _a = props, { submitsForm, onFocusVisibleChange, resetsForm, children } = _a, rest = __objRest$4(_a, ["submitsForm", "onFocusVisibleChange", "resetsForm", "children"]);
163
+ const _a = props, { submitsForm, onFocusVisibleChange, resetsForm, children } = _a, rest = __objRest$9(_a, ["submitsForm", "onFocusVisibleChange", "resetsForm", "children"]);
164
164
  const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
165
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Button, __spreadValues$b({ type }, rest), ({ isFocusVisible }) => /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
165
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Button, __spreadValues$h({ type }, rest), ({ isFocusVisible }) => /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
166
166
  ValueObserver,
167
167
  {
168
168
  value: isFocusVisible,
@@ -179,7 +179,7 @@ function registerButton(loader, overrides) {
179
179
  displayName: "BaseButton",
180
180
  importPath: "@plasmicpkgs/react-aria/registerButton",
181
181
  importName: "BaseButton",
182
- props: __spreadProps$4(__spreadValues$b({}, getCommonInputProps("button", [
182
+ props: __spreadProps$9(__spreadValues$h({}, getCommonInputProps("button", [
183
183
  "isDisabled",
184
184
  "aria-label",
185
185
  "children"
@@ -249,6 +249,499 @@ function registerButton(loader, overrides) {
249
249
  );
250
250
  }
251
251
 
252
+ var __defProp$g = Object.defineProperty;
253
+ var __defProps$8 = Object.defineProperties;
254
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
255
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
256
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
257
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
258
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
259
+ var __spreadValues$g = (a, b) => {
260
+ for (var prop in b || (b = {}))
261
+ if (__hasOwnProp$g.call(b, prop))
262
+ __defNormalProp$g(a, prop, b[prop]);
263
+ if (__getOwnPropSymbols$g)
264
+ for (var prop of __getOwnPropSymbols$g(b)) {
265
+ if (__propIsEnum$g.call(b, prop))
266
+ __defNormalProp$g(a, prop, b[prop]);
267
+ }
268
+ return a;
269
+ };
270
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
271
+ var __objRest$8 = (source, exclude) => {
272
+ var target = {};
273
+ for (var prop in source)
274
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
275
+ target[prop] = source[prop];
276
+ if (source != null && __getOwnPropSymbols$g)
277
+ for (var prop of __getOwnPropSymbols$g(source)) {
278
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
279
+ target[prop] = source[prop];
280
+ }
281
+ return target;
282
+ };
283
+ function BaseCheckbox(props) {
284
+ const _a = props, { children, onPressChange, onFocusVisibleChange } = _a, rest = __objRest$8(_a, ["children", "onPressChange", "onFocusVisibleChange"]);
285
+ return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Checkbox, __spreadValues$g({}, rest), ({ isFocusVisible, isPressed }) => /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
286
+ ValueObserver,
287
+ {
288
+ value: isFocusVisible,
289
+ onChange: onFocusVisibleChange
290
+ }
291
+ ), /* @__PURE__ */ React__default.default.createElement(ValueObserver, { value: isPressed, onChange: onPressChange }), children)));
292
+ }
293
+ function registerCheckbox(loader, overrides) {
294
+ registerComponentHelper(
295
+ loader,
296
+ BaseCheckbox,
297
+ {
298
+ name: makeComponentName("checkbox"),
299
+ displayName: "BaseCheckbox",
300
+ importPath: "@plasmicpkgs/react-aria/registerCheckbox",
301
+ importName: "BaseCheckbox",
302
+ props: __spreadProps$8(__spreadValues$g({}, getCommonInputProps("checkbox", [
303
+ "name",
304
+ "isDisabled",
305
+ "isReadOnly",
306
+ "aria-label",
307
+ "children",
308
+ "isRequired",
309
+ "autoFocus"
310
+ ])), {
311
+ value: {
312
+ type: "string",
313
+ description: "The value of the input element, used when submitting an HTML form."
314
+ },
315
+ isSelected: {
316
+ type: "boolean",
317
+ editOnly: true,
318
+ uncontrolledProp: "defaultSelected",
319
+ description: "Whether the checkbox is toggled on",
320
+ defaultValueHint: false
321
+ },
322
+ isIndeterminate: {
323
+ displayName: "Indeterminate",
324
+ type: "boolean",
325
+ 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.",
326
+ defaultValueHint: false
327
+ },
328
+ isInvalid: {
329
+ displayName: "Invalid",
330
+ type: "boolean",
331
+ description: "Whether the input value is invalid",
332
+ defaultValueHint: false
333
+ },
334
+ validationBehavior: {
335
+ type: "choice",
336
+ options: ["native", "aria"],
337
+ 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.",
338
+ defaultValueHint: "native"
339
+ },
340
+ onChange: {
341
+ type: "eventHandler",
342
+ argTypes: [{ name: "isSelected", type: "boolean" }]
343
+ },
344
+ onHoverChange: {
345
+ type: "eventHandler",
346
+ argTypes: [{ name: "isHovered", type: "boolean" }]
347
+ },
348
+ onFocusChange: {
349
+ type: "eventHandler",
350
+ argTypes: [{ name: "isFocused", type: "boolean" }]
351
+ },
352
+ onPressChange: {
353
+ type: "eventHandler",
354
+ argTypes: [{ name: "isPressed", type: "boolean" }]
355
+ },
356
+ onFocusVisibleChange: {
357
+ type: "eventHandler",
358
+ argTypes: [{ name: "isFocusVisible", type: "boolean" }]
359
+ }
360
+ }),
361
+ states: {
362
+ isSelected: {
363
+ type: "writable",
364
+ valueProp: "isSelected",
365
+ onChangeProp: "onChange",
366
+ variableType: "boolean"
367
+ },
368
+ isHovered: {
369
+ type: "readonly",
370
+ onChangeProp: "onHoverChange",
371
+ variableType: "boolean"
372
+ },
373
+ isPressed: {
374
+ type: "readonly",
375
+ onChangeProp: "onPressChange",
376
+ variableType: "boolean"
377
+ },
378
+ isFocused: {
379
+ type: "readonly",
380
+ onChangeProp: "onFocusChange",
381
+ variableType: "boolean"
382
+ },
383
+ isFocusVisible: {
384
+ type: "readonly",
385
+ onChangeProp: "onFocusVisibleChange",
386
+ variableType: "boolean"
387
+ }
388
+ },
389
+ trapsFocus: true
390
+ },
391
+ overrides
392
+ );
393
+ }
394
+
395
+ var __defProp$f = Object.defineProperty;
396
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
397
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
398
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
399
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
400
+ var __spreadValues$f = (a, b) => {
401
+ for (var prop in b || (b = {}))
402
+ if (__hasOwnProp$f.call(b, prop))
403
+ __defNormalProp$f(a, prop, b[prop]);
404
+ if (__getOwnPropSymbols$f)
405
+ for (var prop of __getOwnPropSymbols$f(b)) {
406
+ if (__propIsEnum$f.call(b, prop))
407
+ __defNormalProp$f(a, prop, b[prop]);
408
+ }
409
+ return a;
410
+ };
411
+ var __objRest$7 = (source, exclude) => {
412
+ var target = {};
413
+ for (var prop in source)
414
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
415
+ target[prop] = source[prop];
416
+ if (source != null && __getOwnPropSymbols$f)
417
+ for (var prop of __getOwnPropSymbols$f(source)) {
418
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
419
+ target[prop] = source[prop];
420
+ }
421
+ return target;
422
+ };
423
+ function BaseText(_a) {
424
+ var _b = _a, { children } = _b, rest = __objRest$7(_b, ["children"]);
425
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Text, __spreadValues$f({}, rest), children);
426
+ }
427
+ function registerText(loader, overrides) {
428
+ registerComponentHelper(
429
+ loader,
430
+ BaseText,
431
+ {
432
+ name: makeComponentName("text"),
433
+ displayName: "BaseText",
434
+ importPath: "@plasmicpkgs/react-aria/registerText",
435
+ importName: "BaseText",
436
+ props: {
437
+ children: {
438
+ type: "slot"
439
+ },
440
+ slot: {
441
+ type: "string"
442
+ }
443
+ },
444
+ trapsFocus: true
445
+ },
446
+ overrides
447
+ );
448
+ }
449
+
450
+ var __defProp$e = Object.defineProperty;
451
+ var __defProps$7 = Object.defineProperties;
452
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
453
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
454
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
455
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
456
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
457
+ var __spreadValues$e = (a, b) => {
458
+ for (var prop in b || (b = {}))
459
+ if (__hasOwnProp$e.call(b, prop))
460
+ __defNormalProp$e(a, prop, b[prop]);
461
+ if (__getOwnPropSymbols$e)
462
+ for (var prop of __getOwnPropSymbols$e(b)) {
463
+ if (__propIsEnum$e.call(b, prop))
464
+ __defNormalProp$e(a, prop, b[prop]);
465
+ }
466
+ return a;
467
+ };
468
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
469
+ function registerDescription(loader, overrides) {
470
+ registerText(loader, __spreadProps$7(__spreadValues$e({}, overrides), {
471
+ displayName: "BaseDescription",
472
+ props: {
473
+ slot: { type: "string", hidden: () => true, defaultValue: "description" }
474
+ }
475
+ }));
476
+ }
477
+
478
+ var __defProp$d = Object.defineProperty;
479
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
480
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
481
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
482
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
483
+ var __spreadValues$d = (a, b) => {
484
+ for (var prop in b || (b = {}))
485
+ if (__hasOwnProp$d.call(b, prop))
486
+ __defNormalProp$d(a, prop, b[prop]);
487
+ if (__getOwnPropSymbols$d)
488
+ for (var prop of __getOwnPropSymbols$d(b)) {
489
+ if (__propIsEnum$d.call(b, prop))
490
+ __defNormalProp$d(a, prop, b[prop]);
491
+ }
492
+ return a;
493
+ };
494
+ var __objRest$6 = (source, exclude) => {
495
+ var target = {};
496
+ for (var prop in source)
497
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
498
+ target[prop] = source[prop];
499
+ if (source != null && __getOwnPropSymbols$d)
500
+ for (var prop of __getOwnPropSymbols$d(source)) {
501
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
502
+ target[prop] = source[prop];
503
+ }
504
+ return target;
505
+ };
506
+ function BaseFieldError(_a) {
507
+ var _b = _a, {
508
+ badInput,
509
+ customError,
510
+ patternMismatch,
511
+ rangeOverflow,
512
+ rangeUnderflow,
513
+ stepMismatch,
514
+ tooLong,
515
+ tooShort,
516
+ typeMismatch,
517
+ valueMissing
518
+ } = _b, rest = __objRest$6(_b, [
519
+ "badInput",
520
+ "customError",
521
+ "patternMismatch",
522
+ "rangeOverflow",
523
+ "rangeUnderflow",
524
+ "stepMismatch",
525
+ "tooLong",
526
+ "tooShort",
527
+ "typeMismatch",
528
+ "valueMissing"
529
+ ]);
530
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.FieldError, __spreadValues$d({}, rest), ({ validationDetails, validationErrors }) => {
531
+ if (validationDetails.badInput && badInput)
532
+ return badInput;
533
+ if (validationDetails.customError && customError)
534
+ return customError;
535
+ if (validationDetails.patternMismatch && patternMismatch)
536
+ return patternMismatch;
537
+ if (validationDetails.rangeOverflow && rangeOverflow)
538
+ return rangeOverflow;
539
+ if (validationDetails.rangeUnderflow && rangeUnderflow)
540
+ return rangeUnderflow;
541
+ if (validationDetails.stepMismatch && stepMismatch)
542
+ return stepMismatch;
543
+ if (validationDetails.tooLong && tooLong)
544
+ return tooLong;
545
+ if (validationDetails.tooShort && tooShort)
546
+ return tooShort;
547
+ if (validationDetails.typeMismatch && typeMismatch)
548
+ return typeMismatch;
549
+ if (validationDetails.valueMissing && valueMissing)
550
+ return valueMissing;
551
+ return validationErrors;
552
+ });
553
+ }
554
+ function PropsDescription() {
555
+ return /* @__PURE__ */ React__default.default.createElement("div", { style: { marginBottom: 20 } }, /* @__PURE__ */ React__default.default.createElement("p", null, "You can customize the error messages for built-in validations by utilizing the props below."), /* @__PURE__ */ React__default.default.createElement("p", null, "For further information on the specific conditions triggering each error, please refer to the", " ", /* @__PURE__ */ React__default.default.createElement(
556
+ "a",
557
+ {
558
+ target: "_blank",
559
+ href: "https://developer.mozilla.org/en-US/docs/Web/API/ValidityState#instance_properties"
560
+ },
561
+ "MDN Docs"
562
+ ), "."));
563
+ }
564
+ function registerFieldError(loader, overrides) {
565
+ registerComponentHelper(
566
+ loader,
567
+ BaseFieldError,
568
+ {
569
+ name: makeComponentName("fielderror"),
570
+ displayName: "BaseFieldError",
571
+ importPath: "@plasmicpkgs/react-aria/registerFieldError",
572
+ importName: "BaseFieldError",
573
+ actions: [
574
+ {
575
+ type: "custom-action",
576
+ control: PropsDescription
577
+ }
578
+ ],
579
+ props: {
580
+ badInput: {
581
+ type: "string",
582
+ description: "Error message if the user has provided input that the browser is unable to convert"
583
+ },
584
+ customError: {
585
+ type: "string",
586
+ description: "Error message for custom validations"
587
+ },
588
+ patternMismatch: {
589
+ type: "string",
590
+ description: "Error message if the value does not match the specified pattern"
591
+ },
592
+ rangeOverflow: {
593
+ type: "string",
594
+ description: "Error message if the value is greater than the maximum specified"
595
+ },
596
+ rangeUnderflow: {
597
+ type: "string",
598
+ description: "Error message if the value is less than the minimum specified"
599
+ },
600
+ stepMismatch: {
601
+ type: "string",
602
+ description: "Error message if the value is not evenly divisible by the step value"
603
+ },
604
+ tooLong: {
605
+ type: "string",
606
+ description: "Error message if the value exceeds the specified maximum number of characters"
607
+ },
608
+ tooShort: {
609
+ type: "string",
610
+ description: "Error message if the value fails to meet the specified minimum number of characters"
611
+ },
612
+ typeMismatch: {
613
+ type: "string",
614
+ description: "Error message if the value is not in the required syntax (when type is email or url)"
615
+ },
616
+ valueMissing: {
617
+ type: "string",
618
+ description: "Error message if a required field has no value"
619
+ }
620
+ },
621
+ trapsFocus: true
622
+ },
623
+ overrides
624
+ );
625
+ }
626
+
627
+ const BaseLabel = reactAriaComponents.Label;
628
+ function registerLabel(loader, overrides) {
629
+ registerComponentHelper(
630
+ loader,
631
+ BaseLabel,
632
+ {
633
+ name: makeComponentName("label"),
634
+ displayName: "BaseLabel",
635
+ importPath: "@plasmicpkgs/react-aria/registerLabel",
636
+ importName: "BaseLabel",
637
+ props: {
638
+ children: {
639
+ type: "slot"
640
+ }
641
+ },
642
+ trapsFocus: true
643
+ },
644
+ overrides
645
+ );
646
+ }
647
+
648
+ var __defProp$c = Object.defineProperty;
649
+ var __defProps$6 = Object.defineProperties;
650
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
651
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
652
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
653
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
654
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
655
+ var __spreadValues$c = (a, b) => {
656
+ for (var prop in b || (b = {}))
657
+ if (__hasOwnProp$c.call(b, prop))
658
+ __defNormalProp$c(a, prop, b[prop]);
659
+ if (__getOwnPropSymbols$c)
660
+ for (var prop of __getOwnPropSymbols$c(b)) {
661
+ if (__propIsEnum$c.call(b, prop))
662
+ __defNormalProp$c(a, prop, b[prop]);
663
+ }
664
+ return a;
665
+ };
666
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
667
+ const BaseCheckboxGroup = reactAriaComponents.CheckboxGroup;
668
+ const componentName$1 = makeComponentName("checkboxGroup");
669
+ function registerCheckboxGroup(loader, overrides) {
670
+ registerComponentHelper(
671
+ loader,
672
+ BaseCheckboxGroup,
673
+ {
674
+ name: componentName$1,
675
+ displayName: "BaseCheckboxGroup",
676
+ importPath: "@plasmicpkgs/react-aria/registerCheckboxGroup",
677
+ importName: "BaseCheckboxGroup",
678
+ props: __spreadProps$6(__spreadValues$c({}, getCommonInputProps("checkbox group", [
679
+ "name",
680
+ "isDisabled",
681
+ "isReadOnly",
682
+ "aria-label",
683
+ "children",
684
+ "isRequired"
685
+ ])), {
686
+ value: {
687
+ type: "array",
688
+ editOnly: true,
689
+ uncontrolledProp: "defaultValue",
690
+ description: "The current value"
691
+ },
692
+ options: {
693
+ type: "array",
694
+ description: "The options in the radio group",
695
+ itemType: {
696
+ type: "object",
697
+ nameFunc: (item) => item.label,
698
+ fields: {
699
+ label: "string",
700
+ value: "string"
701
+ }
702
+ }
703
+ },
704
+ isInvalid: {
705
+ displayName: "Invalid",
706
+ type: "boolean",
707
+ description: "Whether the input value is invalid",
708
+ defaultValueHint: false
709
+ },
710
+ validationBehavior: {
711
+ type: "choice",
712
+ options: ["native", "aria"],
713
+ 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.",
714
+ defaultValueHint: "native"
715
+ },
716
+ onChange: {
717
+ type: "eventHandler",
718
+ argTypes: [{ name: "value", type: "object" }]
719
+ }
720
+ }),
721
+ states: {
722
+ value: {
723
+ type: "writable",
724
+ valueProp: "value",
725
+ onChangeProp: "onChange",
726
+ variableType: "array"
727
+ }
728
+ },
729
+ trapsFocus: true
730
+ },
731
+ overrides
732
+ );
733
+ const thisName = makeChildComponentName(
734
+ overrides == null ? void 0 : overrides.parentComponentName,
735
+ componentName$1
736
+ );
737
+ registerFieldError(loader, { parentComponentName: thisName });
738
+ registerCheckbox(loader, { parentComponentName: thisName });
739
+ registerLabel(loader, { parentComponentName: thisName });
740
+ registerDescription(loader, {
741
+ parentComponentName: thisName
742
+ });
743
+ }
744
+
252
745
  React__default.default.createContext(void 0);
253
746
  const PlasmicListBoxContext = React__default.default.createContext(void 0);
254
747
  const PlasmicPopoverContext = React__default.default.createContext(void 0);
@@ -406,25 +899,25 @@ function makeValuePropType() {
406
899
  return type;
407
900
  }
408
901
 
409
- var __defProp$a = Object.defineProperty;
410
- var __defProps$3 = Object.defineProperties;
411
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
412
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
413
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
414
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
415
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
416
- var __spreadValues$a = (a, b) => {
902
+ var __defProp$b = Object.defineProperty;
903
+ var __defProps$5 = Object.defineProperties;
904
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
905
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
906
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
907
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
908
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
909
+ var __spreadValues$b = (a, b) => {
417
910
  for (var prop in b || (b = {}))
418
- if (__hasOwnProp$a.call(b, prop))
419
- __defNormalProp$a(a, prop, b[prop]);
420
- if (__getOwnPropSymbols$a)
421
- for (var prop of __getOwnPropSymbols$a(b)) {
422
- if (__propIsEnum$a.call(b, prop))
423
- __defNormalProp$a(a, prop, b[prop]);
911
+ if (__hasOwnProp$b.call(b, prop))
912
+ __defNormalProp$b(a, prop, b[prop]);
913
+ if (__getOwnPropSymbols$b)
914
+ for (var prop of __getOwnPropSymbols$b(b)) {
915
+ if (__propIsEnum$b.call(b, prop))
916
+ __defNormalProp$b(a, prop, b[prop]);
424
917
  }
425
918
  return a;
426
919
  };
427
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
920
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
428
921
  function BaseComboBox(props) {
429
922
  const {
430
923
  value,
@@ -457,7 +950,7 @@ function BaseComboBox(props) {
457
950
  return withoutNils(
458
951
  options2.map((op) => {
459
952
  if (op.type === "section") {
460
- return __spreadProps$3(__spreadValues$a({}, op), {
953
+ return __spreadProps$5(__spreadValues$b({}, op), {
461
954
  items: op.items ? filterOptions(op.items) : void 0
462
955
  });
463
956
  } else {
@@ -541,7 +1034,7 @@ function BaseComboBox(props) {
541
1034
  ]);
542
1035
  return /* @__PURE__ */ React__default.default.createElement(
543
1036
  reactAriaComponents.ComboBox,
544
- __spreadValues$a({
1037
+ __spreadValues$b({
545
1038
  selectedKey: value,
546
1039
  onSelectionChange,
547
1040
  isDisabled,
@@ -680,39 +1173,39 @@ function registerComboBox(loader) {
680
1173
  });
681
1174
  }
682
1175
 
683
- var __defProp$9 = Object.defineProperty;
684
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
685
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
686
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
687
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
688
- var __spreadValues$9 = (a, b) => {
1176
+ var __defProp$a = Object.defineProperty;
1177
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1178
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1179
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1180
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1181
+ var __spreadValues$a = (a, b) => {
689
1182
  for (var prop in b || (b = {}))
690
- if (__hasOwnProp$9.call(b, prop))
691
- __defNormalProp$9(a, prop, b[prop]);
692
- if (__getOwnPropSymbols$9)
693
- for (var prop of __getOwnPropSymbols$9(b)) {
694
- if (__propIsEnum$9.call(b, prop))
695
- __defNormalProp$9(a, prop, b[prop]);
1183
+ if (__hasOwnProp$a.call(b, prop))
1184
+ __defNormalProp$a(a, prop, b[prop]);
1185
+ if (__getOwnPropSymbols$a)
1186
+ for (var prop of __getOwnPropSymbols$a(b)) {
1187
+ if (__propIsEnum$a.call(b, prop))
1188
+ __defNormalProp$a(a, prop, b[prop]);
696
1189
  }
697
1190
  return a;
698
1191
  };
699
- var __objRest$3 = (source, exclude) => {
1192
+ var __objRest$5 = (source, exclude) => {
700
1193
  var target = {};
701
1194
  for (var prop in source)
702
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
1195
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
703
1196
  target[prop] = source[prop];
704
- if (source != null && __getOwnPropSymbols$9)
705
- for (var prop of __getOwnPropSymbols$9(source)) {
706
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
1197
+ if (source != null && __getOwnPropSymbols$a)
1198
+ for (var prop of __getOwnPropSymbols$a(source)) {
1199
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
707
1200
  target[prop] = source[prop];
708
1201
  }
709
1202
  return target;
710
1203
  };
711
1204
  function BaseForm(props) {
712
- const _a = props, { onSubmit, children } = _a, rest = __objRest$3(_a, ["onSubmit", "children"]);
1205
+ const _a = props, { onSubmit, children } = _a, rest = __objRest$5(_a, ["onSubmit", "children"]);
713
1206
  return /* @__PURE__ */ React__default.default.createElement(
714
1207
  reactAriaComponents.Form,
715
- __spreadValues$9({
1208
+ __spreadValues$a({
716
1209
  onSubmit: (e) => {
717
1210
  e.preventDefault();
718
1211
  const formData = new FormData(e.currentTarget);
@@ -762,25 +1255,25 @@ function registerForm(loader, overrides) {
762
1255
  );
763
1256
  }
764
1257
 
765
- var __defProp$8 = Object.defineProperty;
766
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
767
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
768
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
769
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
770
- var __spreadValues$8 = (a, b) => {
1258
+ var __defProp$9 = Object.defineProperty;
1259
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1260
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1261
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1262
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1263
+ var __spreadValues$9 = (a, b) => {
771
1264
  for (var prop in b || (b = {}))
772
- if (__hasOwnProp$8.call(b, prop))
773
- __defNormalProp$8(a, prop, b[prop]);
774
- if (__getOwnPropSymbols$8)
775
- for (var prop of __getOwnPropSymbols$8(b)) {
776
- if (__propIsEnum$8.call(b, prop))
777
- __defNormalProp$8(a, prop, b[prop]);
1265
+ if (__hasOwnProp$9.call(b, prop))
1266
+ __defNormalProp$9(a, prop, b[prop]);
1267
+ if (__getOwnPropSymbols$9)
1268
+ for (var prop of __getOwnPropSymbols$9(b)) {
1269
+ if (__propIsEnum$9.call(b, prop))
1270
+ __defNormalProp$9(a, prop, b[prop]);
778
1271
  }
779
1272
  return a;
780
1273
  };
781
1274
  function BaseInput(props) {
782
1275
  const contextProps = React__default.default.useContext(PlasmicInputContext);
783
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Input, __spreadValues$8({}, utils.mergeProps(contextProps, props)));
1276
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Input, __spreadValues$9({}, utils.mergeProps(contextProps, props)));
784
1277
  }
785
1278
  function registerInput(loader, overrides) {
786
1279
  registerComponentHelper(
@@ -824,58 +1317,19 @@ function registerInput(loader, overrides) {
824
1317
  );
825
1318
  }
826
1319
 
827
- var __defProp$7 = Object.defineProperty;
828
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
829
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
830
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
831
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
832
- var __spreadValues$7 = (a, b) => {
833
- for (var prop in b || (b = {}))
834
- if (__hasOwnProp$7.call(b, prop))
835
- __defNormalProp$7(a, prop, b[prop]);
836
- if (__getOwnPropSymbols$7)
837
- for (var prop of __getOwnPropSymbols$7(b)) {
838
- if (__propIsEnum$7.call(b, prop))
839
- __defNormalProp$7(a, prop, b[prop]);
840
- }
841
- return a;
842
- };
843
- function BaseLabel(props) {
844
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Label, __spreadValues$7({}, props));
845
- }
846
- function registerLabel(loader, overrides) {
847
- registerComponentHelper(
848
- loader,
849
- BaseLabel,
850
- {
851
- name: makeComponentName("label"),
852
- displayName: "BaseLabel",
853
- importPath: "@plasmicpkgs/react-aria/registerLabel",
854
- importName: "BaseLabel",
855
- props: {
856
- children: {
857
- type: "slot"
858
- }
859
- },
860
- trapsFocus: true
861
- },
862
- overrides
863
- );
864
- }
865
-
866
- var __defProp$6 = Object.defineProperty;
867
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
868
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
869
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
870
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
871
- var __spreadValues$6 = (a, b) => {
1320
+ var __defProp$8 = Object.defineProperty;
1321
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1322
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1323
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1324
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1325
+ var __spreadValues$8 = (a, b) => {
872
1326
  for (var prop in b || (b = {}))
873
- if (__hasOwnProp$6.call(b, prop))
874
- __defNormalProp$6(a, prop, b[prop]);
875
- if (__getOwnPropSymbols$6)
876
- for (var prop of __getOwnPropSymbols$6(b)) {
877
- if (__propIsEnum$6.call(b, prop))
878
- __defNormalProp$6(a, prop, b[prop]);
1327
+ if (__hasOwnProp$8.call(b, prop))
1328
+ __defNormalProp$8(a, prop, b[prop]);
1329
+ if (__getOwnPropSymbols$8)
1330
+ for (var prop of __getOwnPropSymbols$8(b)) {
1331
+ if (__propIsEnum$8.call(b, prop))
1332
+ __defNormalProp$8(a, prop, b[prop]);
879
1333
  }
880
1334
  return a;
881
1335
  };
@@ -883,7 +1337,7 @@ function BaseListBoxItem(props) {
883
1337
  var _a;
884
1338
  const contextProps = React__default.default.useContext(PlasmicItemContext);
885
1339
  const mergedProps = utils.mergeProps(contextProps, props);
886
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ListBoxItem, __spreadValues$6({ id: (_a = mergedProps.key) != null ? _a : void 0 }, mergedProps));
1340
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ListBoxItem, __spreadValues$8({ id: (_a = mergedProps.key) != null ? _a : void 0 }, mergedProps));
887
1341
  }
888
1342
  function registerListBoxItem(loader, overrides) {
889
1343
  registerComponentHelper(
@@ -919,33 +1373,33 @@ function registerListBoxItem(loader, overrides) {
919
1373
  );
920
1374
  }
921
1375
 
922
- var __defProp$5 = Object.defineProperty;
923
- var __defProps$2 = Object.defineProperties;
924
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
925
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
926
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
927
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
928
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
929
- var __spreadValues$5 = (a, b) => {
1376
+ var __defProp$7 = Object.defineProperty;
1377
+ var __defProps$4 = Object.defineProperties;
1378
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1379
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1380
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1381
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1382
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1383
+ var __spreadValues$7 = (a, b) => {
930
1384
  for (var prop in b || (b = {}))
931
- if (__hasOwnProp$5.call(b, prop))
932
- __defNormalProp$5(a, prop, b[prop]);
933
- if (__getOwnPropSymbols$5)
934
- for (var prop of __getOwnPropSymbols$5(b)) {
935
- if (__propIsEnum$5.call(b, prop))
936
- __defNormalProp$5(a, prop, b[prop]);
1385
+ if (__hasOwnProp$7.call(b, prop))
1386
+ __defNormalProp$7(a, prop, b[prop]);
1387
+ if (__getOwnPropSymbols$7)
1388
+ for (var prop of __getOwnPropSymbols$7(b)) {
1389
+ if (__propIsEnum$7.call(b, prop))
1390
+ __defNormalProp$7(a, prop, b[prop]);
937
1391
  }
938
1392
  return a;
939
1393
  };
940
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
941
- var __objRest$2 = (source, exclude) => {
1394
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1395
+ var __objRest$4 = (source, exclude) => {
942
1396
  var target = {};
943
1397
  for (var prop in source)
944
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1398
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
945
1399
  target[prop] = source[prop];
946
- if (source != null && __getOwnPropSymbols$5)
947
- for (var prop of __getOwnPropSymbols$5(source)) {
948
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1400
+ if (source != null && __getOwnPropSymbols$7)
1401
+ for (var prop of __getOwnPropSymbols$7(source)) {
1402
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
949
1403
  target[prop] = source[prop];
950
1404
  }
951
1405
  return target;
@@ -994,21 +1448,21 @@ function BaseListBox(props) {
994
1448
  renderItem,
995
1449
  renderSection,
996
1450
  getItemType
997
- } = _a, rest = __objRest$2(_a, [
1451
+ } = _a, rest = __objRest$4(_a, [
998
1452
  "makeItemProps",
999
1453
  "makeSectionProps",
1000
1454
  "renderItem",
1001
1455
  "renderSection",
1002
1456
  "getItemType"
1003
1457
  ]);
1004
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ListBox, __spreadValues$5({}, utils.mergeProps(contextProps, rest)), (item) => {
1458
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ListBox, __spreadValues$7({}, utils.mergeProps(contextProps, rest)), (item) => {
1005
1459
  if ((getItemType == null ? void 0 : getItemType(item)) === "section") {
1006
1460
  const sectionProps = makeSectionProps == null ? void 0 : makeSectionProps(item);
1007
1461
  return /* @__PURE__ */ React__default.default.createElement(
1008
1462
  PlasmicSectionContext.Provider,
1009
1463
  {
1010
1464
  key: sectionProps == null ? void 0 : sectionProps.key,
1011
- value: __spreadProps$2(__spreadValues$5({}, sectionProps), { makeItemProps, renderItem })
1465
+ value: __spreadProps$4(__spreadValues$7({}, sectionProps), { makeItemProps, renderItem })
1012
1466
  },
1013
1467
  renderSection == null ? void 0 : renderSection(item)
1014
1468
  );
@@ -1061,39 +1515,39 @@ function registerListBox(loader, overrides) {
1061
1515
  });
1062
1516
  }
1063
1517
 
1064
- var __defProp$4 = Object.defineProperty;
1065
- var __defProps$1 = Object.defineProperties;
1066
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1067
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1068
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1069
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1070
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1071
- var __spreadValues$4 = (a, b) => {
1518
+ var __defProp$6 = Object.defineProperty;
1519
+ var __defProps$3 = Object.defineProperties;
1520
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1521
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1522
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1523
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1524
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1525
+ var __spreadValues$6 = (a, b) => {
1072
1526
  for (var prop in b || (b = {}))
1073
- if (__hasOwnProp$4.call(b, prop))
1074
- __defNormalProp$4(a, prop, b[prop]);
1075
- if (__getOwnPropSymbols$4)
1076
- for (var prop of __getOwnPropSymbols$4(b)) {
1077
- if (__propIsEnum$4.call(b, prop))
1078
- __defNormalProp$4(a, prop, b[prop]);
1527
+ if (__hasOwnProp$6.call(b, prop))
1528
+ __defNormalProp$6(a, prop, b[prop]);
1529
+ if (__getOwnPropSymbols$6)
1530
+ for (var prop of __getOwnPropSymbols$6(b)) {
1531
+ if (__propIsEnum$6.call(b, prop))
1532
+ __defNormalProp$6(a, prop, b[prop]);
1079
1533
  }
1080
1534
  return a;
1081
1535
  };
1082
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1083
- var __objRest$1 = (source, exclude) => {
1536
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1537
+ var __objRest$3 = (source, exclude) => {
1084
1538
  var target = {};
1085
1539
  for (var prop in source)
1086
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1540
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1087
1541
  target[prop] = source[prop];
1088
- if (source != null && __getOwnPropSymbols$4)
1089
- for (var prop of __getOwnPropSymbols$4(source)) {
1090
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1542
+ if (source != null && __getOwnPropSymbols$6)
1543
+ for (var prop of __getOwnPropSymbols$6(source)) {
1544
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1091
1545
  target[prop] = source[prop];
1092
1546
  }
1093
1547
  return target;
1094
1548
  };
1095
1549
  function BasePopover(props) {
1096
- const _a = props, restProps = __objRest$1(_a, ["resetClassName"]);
1550
+ const _a = props, restProps = __objRest$3(_a, ["resetClassName"]);
1097
1551
  const isStandalone = !React__default.default.useContext(reactAriaComponents.PopoverContext);
1098
1552
  const contextProps = React__default.default.useContext(PlasmicPopoverContext);
1099
1553
  const canvas = host.usePlasmicCanvasContext();
@@ -1104,14 +1558,14 @@ function BasePopover(props) {
1104
1558
  const triggerRef = React__default.default.useRef(null);
1105
1559
  return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React__default.default.createElement(
1106
1560
  reactAriaComponents.Popover,
1107
- __spreadProps$1(__spreadValues$4({}, mergedProps), {
1561
+ __spreadProps$3(__spreadValues$6({}, mergedProps), {
1108
1562
  triggerRef,
1109
1563
  isNonModal: true,
1110
1564
  isOpen: true
1111
1565
  })
1112
1566
  ));
1113
1567
  } else {
1114
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Popover, __spreadProps$1(__spreadValues$4({}, mergedProps), { isNonModal: !!canvas }));
1568
+ return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Popover, __spreadProps$3(__spreadValues$6({}, mergedProps), { isNonModal: !!canvas }));
1115
1569
  }
1116
1570
  }
1117
1571
  function registerPopover(loader, overrides) {
@@ -1169,6 +1623,257 @@ function registerPopover(loader, overrides) {
1169
1623
  );
1170
1624
  }
1171
1625
 
1626
+ var __defProp$5 = Object.defineProperty;
1627
+ var __defProps$2 = Object.defineProperties;
1628
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1629
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1630
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1631
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1632
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1633
+ var __spreadValues$5 = (a, b) => {
1634
+ for (var prop in b || (b = {}))
1635
+ if (__hasOwnProp$5.call(b, prop))
1636
+ __defNormalProp$5(a, prop, b[prop]);
1637
+ if (__getOwnPropSymbols$5)
1638
+ for (var prop of __getOwnPropSymbols$5(b)) {
1639
+ if (__propIsEnum$5.call(b, prop))
1640
+ __defNormalProp$5(a, prop, b[prop]);
1641
+ }
1642
+ return a;
1643
+ };
1644
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1645
+ var __objRest$2 = (source, exclude) => {
1646
+ var target = {};
1647
+ for (var prop in source)
1648
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1649
+ target[prop] = source[prop];
1650
+ if (source != null && __getOwnPropSymbols$5)
1651
+ for (var prop of __getOwnPropSymbols$5(source)) {
1652
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1653
+ target[prop] = source[prop];
1654
+ }
1655
+ return target;
1656
+ };
1657
+ function BaseRadio(props) {
1658
+ const _a = props, {
1659
+ children,
1660
+ onPressChange,
1661
+ onFocusVisibleChange,
1662
+ onHoverChange
1663
+ } = _a, rest = __objRest$2(_a, [
1664
+ "children",
1665
+ "onPressChange",
1666
+ "onFocusVisibleChange",
1667
+ "onHoverChange"
1668
+ ]);
1669
+ return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Radio, __spreadValues$5({}, rest), ({ isFocusVisible, isPressed, isHovered }) => (
1670
+ // TODO: Remove DataProvider once Interaction variants are implemented for Code components
1671
+ /* @__PURE__ */ React__default.default.createElement(
1672
+ host.DataProvider,
1673
+ {
1674
+ name: "states",
1675
+ data: { isFocusVisible, isPressed, isHovered }
1676
+ },
1677
+ /* @__PURE__ */ React__default.default.createElement(
1678
+ ValueObserver,
1679
+ {
1680
+ value: isFocusVisible,
1681
+ onChange: onFocusVisibleChange
1682
+ }
1683
+ ),
1684
+ /* @__PURE__ */ React__default.default.createElement(ValueObserver, { value: isPressed, onChange: onPressChange }),
1685
+ /* @__PURE__ */ React__default.default.createElement(ValueObserver, { value: isHovered, onChange: onHoverChange }),
1686
+ children
1687
+ )
1688
+ )));
1689
+ }
1690
+ function registerRadio(loader, overrides) {
1691
+ registerComponentHelper(
1692
+ loader,
1693
+ BaseRadio,
1694
+ {
1695
+ name: makeComponentName("radio"),
1696
+ displayName: "BaseRadio",
1697
+ importPath: "@plasmicpkgs/react-aria/registerRadio",
1698
+ // TODO: Remove DataProvider once Interaction variants are implemented for Code components
1699
+ providesData: true,
1700
+ importName: "BaseRadio",
1701
+ props: __spreadProps$2(__spreadValues$5({}, getCommonInputProps("radio", [
1702
+ "isDisabled",
1703
+ "autoFocus",
1704
+ "aria-label",
1705
+ "children"
1706
+ ])), {
1707
+ value: {
1708
+ type: "string",
1709
+ description: "The value of the input element, used when submitting an HTML form."
1710
+ },
1711
+ onHoverChange: {
1712
+ type: "eventHandler",
1713
+ argTypes: [{ name: "isHovered", type: "boolean" }]
1714
+ },
1715
+ onFocusChange: {
1716
+ type: "eventHandler",
1717
+ argTypes: [{ name: "isFocused", type: "boolean" }]
1718
+ },
1719
+ onPressChange: {
1720
+ type: "eventHandler",
1721
+ argTypes: [{ name: "isPressed", type: "boolean" }]
1722
+ },
1723
+ onFocusVisibleChange: {
1724
+ type: "eventHandler",
1725
+ argTypes: [{ name: "isFocusVisible", type: "boolean" }]
1726
+ }
1727
+ }),
1728
+ states: {
1729
+ isHovered: {
1730
+ type: "readonly",
1731
+ onChangeProp: "onHoverChange",
1732
+ variableType: "boolean"
1733
+ },
1734
+ isPressed: {
1735
+ type: "readonly",
1736
+ onChangeProp: "onPressChange",
1737
+ variableType: "boolean"
1738
+ },
1739
+ isFocused: {
1740
+ type: "readonly",
1741
+ onChangeProp: "onFocusChange",
1742
+ variableType: "boolean"
1743
+ },
1744
+ isFocusVisible: {
1745
+ type: "readonly",
1746
+ onChangeProp: "onFocusVisibleChange",
1747
+ variableType: "boolean"
1748
+ }
1749
+ },
1750
+ trapsFocus: true
1751
+ },
1752
+ overrides
1753
+ );
1754
+ }
1755
+
1756
+ var __defProp$4 = Object.defineProperty;
1757
+ var __defProps$1 = Object.defineProperties;
1758
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1759
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1760
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1761
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1762
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1763
+ var __spreadValues$4 = (a, b) => {
1764
+ for (var prop in b || (b = {}))
1765
+ if (__hasOwnProp$4.call(b, prop))
1766
+ __defNormalProp$4(a, prop, b[prop]);
1767
+ if (__getOwnPropSymbols$4)
1768
+ for (var prop of __getOwnPropSymbols$4(b)) {
1769
+ if (__propIsEnum$4.call(b, prop))
1770
+ __defNormalProp$4(a, prop, b[prop]);
1771
+ }
1772
+ return a;
1773
+ };
1774
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1775
+ var __objRest$1 = (source, exclude) => {
1776
+ var target = {};
1777
+ for (var prop in source)
1778
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1779
+ target[prop] = source[prop];
1780
+ if (source != null && __getOwnPropSymbols$4)
1781
+ for (var prop of __getOwnPropSymbols$4(source)) {
1782
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1783
+ target[prop] = source[prop];
1784
+ }
1785
+ return target;
1786
+ };
1787
+ function BaseRadioGroup(props) {
1788
+ const _a = props, { children } = _a, rest = __objRest$1(_a, ["children"]);
1789
+ return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.RadioGroup, __spreadValues$4({}, rest), children));
1790
+ }
1791
+ const componentName = makeComponentName("radioGroup");
1792
+ function registerRadioGroup(loader, overrides) {
1793
+ registerComponentHelper(
1794
+ loader,
1795
+ BaseRadioGroup,
1796
+ {
1797
+ name: componentName,
1798
+ displayName: "BaseRadioGroup",
1799
+ importPath: "@plasmicpkgs/react-aria/registerRadioGroup",
1800
+ importName: "BaseRadioGroup",
1801
+ props: __spreadProps$1(__spreadValues$4({}, getCommonInputProps("radio group", [
1802
+ "name",
1803
+ "isDisabled",
1804
+ "isReadOnly",
1805
+ "aria-label",
1806
+ "children",
1807
+ "isRequired"
1808
+ ])), {
1809
+ value: {
1810
+ type: "string",
1811
+ editOnly: true,
1812
+ uncontrolledProp: "defaultValue",
1813
+ description: "The current value"
1814
+ },
1815
+ options: {
1816
+ type: "array",
1817
+ description: "The options in the radio group",
1818
+ itemType: {
1819
+ type: "object",
1820
+ nameFunc: (item) => item.label,
1821
+ fields: {
1822
+ label: "string",
1823
+ value: "string"
1824
+ }
1825
+ }
1826
+ },
1827
+ isInvalid: {
1828
+ displayName: "Invalid",
1829
+ type: "boolean",
1830
+ description: "Whether the input value is invalid",
1831
+ defaultValueHint: false
1832
+ },
1833
+ validationBehavior: {
1834
+ type: "choice",
1835
+ options: ["native", "aria"],
1836
+ 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.",
1837
+ defaultValueHint: "native"
1838
+ },
1839
+ onChange: {
1840
+ type: "eventHandler",
1841
+ argTypes: [{ name: "value", type: "string" }]
1842
+ },
1843
+ onFocusChange: {
1844
+ type: "eventHandler",
1845
+ argTypes: [{ name: "isFocused", type: "boolean" }]
1846
+ }
1847
+ }),
1848
+ states: {
1849
+ value: {
1850
+ type: "writable",
1851
+ valueProp: "value",
1852
+ onChangeProp: "onChange",
1853
+ variableType: "array"
1854
+ },
1855
+ isFocused: {
1856
+ type: "readonly",
1857
+ onChangeProp: "onFocusChange",
1858
+ variableType: "boolean"
1859
+ }
1860
+ },
1861
+ trapsFocus: true
1862
+ },
1863
+ overrides
1864
+ );
1865
+ const thisName = makeChildComponentName(
1866
+ overrides == null ? void 0 : overrides.parentComponentName,
1867
+ componentName
1868
+ );
1869
+ registerFieldError(loader, { parentComponentName: thisName });
1870
+ registerRadio(loader, { parentComponentName: thisName });
1871
+ registerLabel(loader, { parentComponentName: thisName });
1872
+ registerDescription(loader, {
1873
+ parentComponentName: thisName
1874
+ });
1875
+ }
1876
+
1172
1877
  var __defProp$3 = Object.defineProperty;
1173
1878
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1174
1879
  var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
@@ -1540,6 +2245,9 @@ function registerAll(loader) {
1540
2245
  registerSection(loader);
1541
2246
  registerSwitch(loader);
1542
2247
  registerForm(loader);
2248
+ registerCheckbox(loader);
2249
+ registerCheckboxGroup(loader);
2250
+ registerRadioGroup(loader);
1543
2251
  }
1544
2252
 
1545
2253
  exports.registerAll = registerAll;