@plasmicpkgs/react-aria 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/common.d.ts +2 -0
- package/dist/contexts.d.ts +1 -1
- package/dist/react-aria.esm.js +404 -203
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +403 -202
- package/dist/react-aria.js.map +1 -1
- package/dist/registerButton.d.ts +1 -0
- package/dist/registerForm.d.ts +9 -0
- package/dist/registerLabel.d.ts +2 -2
- package/dist/registerSwitch.d.ts +5 -0
- package/package.json +4 -4
- package/skinny/common-52c26d37.esm.js +52 -0
- package/skinny/common-52c26d37.esm.js.map +1 -0
- package/skinny/common-e74a9214.cjs.js +54 -0
- package/skinny/common-e74a9214.cjs.js.map +1 -0
- package/skinny/common.d.ts +2 -0
- package/skinny/{contexts-c0294d96.cjs.js → contexts-3e42cdf9.cjs.js} +2 -3
- package/skinny/{contexts-c0294d96.cjs.js.map → contexts-3e42cdf9.cjs.js.map} +1 -1
- package/skinny/{contexts-fd3e1077.esm.js → contexts-49f6c298.esm.js} +3 -3
- package/skinny/{contexts-fd3e1077.esm.js.map → contexts-49f6c298.esm.js.map} +1 -1
- package/skinny/contexts.d.ts +1 -1
- package/skinny/registerButton.cjs.js +20 -18
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.d.ts +1 -0
- package/skinny/registerButton.esm.js +20 -18
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +1 -1
- package/skinny/registerComboBox.esm.js +1 -1
- package/skinny/registerFieldError.cjs.js +163 -0
- package/skinny/registerFieldError.cjs.js.map +1 -0
- package/skinny/registerFieldError.esm.js +156 -0
- package/skinny/registerFieldError.esm.js.map +1 -0
- package/skinny/registerForm.cjs.js +96 -0
- package/skinny/registerForm.cjs.js.map +1 -0
- package/skinny/registerForm.d.ts +9 -0
- package/skinny/registerForm.esm.js +89 -0
- package/skinny/registerForm.esm.js.map +1 -0
- package/skinny/registerHeader.cjs.js +1 -1
- package/skinny/registerHeader.esm.js +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/registerLabel.cjs.js +5 -13
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.d.ts +2 -2
- package/skinny/registerLabel.esm.js +4 -12
- package/skinny/registerLabel.esm.js.map +1 -1
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerListBoxItem.cjs.js +1 -1
- package/skinny/registerListBoxItem.esm.js +1 -1
- package/skinny/registerPopover.cjs.js +1 -1
- package/skinny/registerPopover.esm.js +1 -1
- package/skinny/registerSection.cjs.js +1 -1
- package/skinny/registerSection.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +1 -1
- package/skinny/registerSelect.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +83 -0
- package/skinny/registerSwitch.cjs.js.map +1 -0
- package/skinny/registerSwitch.d.ts +5 -0
- package/skinny/registerSwitch.esm.js +80 -0
- package/skinny/registerSwitch.esm.js.map +1 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldError } from 'react-aria-components';
|
|
3
|
+
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
4
|
+
import '@plasmicapp/host/registerComponent';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
function BaseFieldError(_a) {
|
|
35
|
+
var _b = _a, {
|
|
36
|
+
badInput,
|
|
37
|
+
customError,
|
|
38
|
+
patternMismatch,
|
|
39
|
+
rangeOverflow,
|
|
40
|
+
rangeUnderflow,
|
|
41
|
+
stepMismatch,
|
|
42
|
+
tooLong,
|
|
43
|
+
tooShort,
|
|
44
|
+
typeMismatch,
|
|
45
|
+
valueMissing
|
|
46
|
+
} = _b, rest = __objRest(_b, [
|
|
47
|
+
"badInput",
|
|
48
|
+
"customError",
|
|
49
|
+
"patternMismatch",
|
|
50
|
+
"rangeOverflow",
|
|
51
|
+
"rangeUnderflow",
|
|
52
|
+
"stepMismatch",
|
|
53
|
+
"tooLong",
|
|
54
|
+
"tooShort",
|
|
55
|
+
"typeMismatch",
|
|
56
|
+
"valueMissing"
|
|
57
|
+
]);
|
|
58
|
+
return /* @__PURE__ */ React.createElement(FieldError, __spreadValues({}, rest), ({ validationDetails, validationErrors }) => {
|
|
59
|
+
if (validationDetails.badInput && badInput)
|
|
60
|
+
return badInput;
|
|
61
|
+
if (validationDetails.customError && customError)
|
|
62
|
+
return customError;
|
|
63
|
+
if (validationDetails.patternMismatch && patternMismatch)
|
|
64
|
+
return patternMismatch;
|
|
65
|
+
if (validationDetails.rangeOverflow && rangeOverflow)
|
|
66
|
+
return rangeOverflow;
|
|
67
|
+
if (validationDetails.rangeUnderflow && rangeUnderflow)
|
|
68
|
+
return rangeUnderflow;
|
|
69
|
+
if (validationDetails.stepMismatch && stepMismatch)
|
|
70
|
+
return stepMismatch;
|
|
71
|
+
if (validationDetails.tooLong && tooLong)
|
|
72
|
+
return tooLong;
|
|
73
|
+
if (validationDetails.tooShort && tooShort)
|
|
74
|
+
return tooShort;
|
|
75
|
+
if (validationDetails.typeMismatch && typeMismatch)
|
|
76
|
+
return typeMismatch;
|
|
77
|
+
if (validationDetails.valueMissing && valueMissing)
|
|
78
|
+
return valueMissing;
|
|
79
|
+
return validationErrors;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function PropsDescription() {
|
|
83
|
+
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(
|
|
84
|
+
"a",
|
|
85
|
+
{
|
|
86
|
+
target: "_blank",
|
|
87
|
+
href: "https://developer.mozilla.org/en-US/docs/Web/API/ValidityState#instance_properties"
|
|
88
|
+
},
|
|
89
|
+
"MDN Docs"
|
|
90
|
+
), "."));
|
|
91
|
+
}
|
|
92
|
+
function registerFieldError(loader, overrides) {
|
|
93
|
+
registerComponentHelper(
|
|
94
|
+
loader,
|
|
95
|
+
BaseFieldError,
|
|
96
|
+
{
|
|
97
|
+
name: makeComponentName("fielderror"),
|
|
98
|
+
displayName: "BaseFieldError",
|
|
99
|
+
importPath: "@plasmicpkgs/react-aria/registerFieldError",
|
|
100
|
+
importName: "BaseFieldError",
|
|
101
|
+
actions: [
|
|
102
|
+
{
|
|
103
|
+
type: "custom-action",
|
|
104
|
+
control: PropsDescription
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
props: {
|
|
108
|
+
badInput: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: "Error message if the user has provided input that the browser is unable to convert"
|
|
111
|
+
},
|
|
112
|
+
customError: {
|
|
113
|
+
type: "string",
|
|
114
|
+
description: "Error message for custom validations"
|
|
115
|
+
},
|
|
116
|
+
patternMismatch: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Error message if the value does not match the specified pattern"
|
|
119
|
+
},
|
|
120
|
+
rangeOverflow: {
|
|
121
|
+
type: "string",
|
|
122
|
+
description: "Error message if the value is greater than the maximum specified"
|
|
123
|
+
},
|
|
124
|
+
rangeUnderflow: {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "Error message if the value is less than the minimum specified"
|
|
127
|
+
},
|
|
128
|
+
stepMismatch: {
|
|
129
|
+
type: "string",
|
|
130
|
+
description: "Error message if the value is not evenly divisible by the step value"
|
|
131
|
+
},
|
|
132
|
+
tooLong: {
|
|
133
|
+
type: "string",
|
|
134
|
+
description: "Error message if the value exceeds the specified maximum number of characters"
|
|
135
|
+
},
|
|
136
|
+
tooShort: {
|
|
137
|
+
type: "string",
|
|
138
|
+
description: "Error message if the value fails to meet the specified minimum number of characters"
|
|
139
|
+
},
|
|
140
|
+
typeMismatch: {
|
|
141
|
+
type: "string",
|
|
142
|
+
description: "Error message if the value is not in the required syntax (when type is email or url)"
|
|
143
|
+
},
|
|
144
|
+
valueMissing: {
|
|
145
|
+
type: "string",
|
|
146
|
+
description: "Error message if a required field has no value"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
trapsFocus: true
|
|
150
|
+
},
|
|
151
|
+
overrides
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { BaseFieldError, registerFieldError };
|
|
156
|
+
//# sourceMappingURL=registerFieldError.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerFieldError.esm.js","sources":["../src/registerFieldError.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FieldErrorProps } from \"react-aria-components\";\nimport { FieldError } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseFieldErrorProps extends FieldErrorProps {\n useBuiltInValidation: boolean;\n badInput?: string;\n customError?: string;\n patternMismatch?: string;\n rangeOverflow?: string;\n rangeUnderflow?: string;\n stepMismatch?: string;\n tooLong?: string;\n tooShort?: string;\n typeMismatch?: string;\n valueMissing?: string;\n}\n\nexport function BaseFieldError({\n badInput,\n customError,\n patternMismatch,\n rangeOverflow,\n rangeUnderflow,\n stepMismatch,\n tooLong,\n tooShort,\n typeMismatch,\n valueMissing,\n ...rest\n}: BaseFieldErrorProps) {\n return (\n <FieldError {...rest}>\n {({ validationDetails, validationErrors }) => {\n if (validationDetails.badInput && badInput) return badInput;\n if (validationDetails.customError && customError) return customError;\n if (validationDetails.patternMismatch && patternMismatch)\n return patternMismatch;\n if (validationDetails.rangeOverflow && rangeOverflow)\n return rangeOverflow;\n if (validationDetails.rangeUnderflow && rangeUnderflow)\n return rangeUnderflow;\n if (validationDetails.stepMismatch && stepMismatch) return stepMismatch;\n if (validationDetails.tooLong && tooLong) return tooLong;\n if (validationDetails.tooShort && tooShort) return tooShort;\n if (validationDetails.typeMismatch && typeMismatch) return typeMismatch;\n if (validationDetails.valueMissing && valueMissing) return valueMissing;\n return validationErrors;\n }}\n </FieldError>\n );\n}\n\nfunction PropsDescription() {\n return (\n <div style={{ marginBottom: 20 }}>\n <p>\n You can customize the error messages for built-in validations by\n utilizing the props below.\n </p>\n <p>\n For further information on the specific conditions triggering each\n error, please refer to the{\" \"}\n <a\n target=\"_blank\"\n href=\"https://developer.mozilla.org/en-US/docs/Web/API/ValidityState#instance_properties\"\n >\n MDN Docs\n </a>\n .\n </p>\n </div>\n );\n}\n\nexport function registerFieldError(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseFieldError>\n) {\n registerComponentHelper(\n loader,\n BaseFieldError,\n {\n name: makeComponentName(\"fielderror\"),\n displayName: \"BaseFieldError\",\n importPath: \"@plasmicpkgs/react-aria/registerFieldError\",\n importName: \"BaseFieldError\",\n actions: [\n {\n type: \"custom-action\",\n control: PropsDescription,\n },\n ],\n props: {\n badInput: {\n type: \"string\",\n description:\n \"Error message if the user has provided input that the browser is unable to convert\",\n },\n customError: {\n type: \"string\",\n description: \"Error message for custom validations\",\n },\n patternMismatch: {\n type: \"string\",\n description:\n \"Error message if the value does not match the specified pattern\",\n },\n rangeOverflow: {\n type: \"string\",\n description:\n \"Error message if the value is greater than the maximum specified\",\n },\n rangeUnderflow: {\n type: \"string\",\n description:\n \"Error message if the value is less than the minimum specified\",\n },\n stepMismatch: {\n type: \"string\",\n description:\n \"Error message if the value is not evenly divisible by the step value\",\n },\n tooLong: {\n type: \"string\",\n description:\n \"Error message if the value exceeds the specified maximum number of characters\",\n },\n tooShort: {\n type: \"string\",\n description:\n \"Error message if the value fails to meet the specified minimum number of characters\",\n },\n typeMismatch: {\n type: \"string\",\n description:\n \"Error message if the value is not in the required syntax (when type is email or url)\",\n },\n valueMissing: {\n type: \"string\",\n description: \"Error message if a required field has no value\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,SAAS,eAAe,EAYP,EAAA;AAZO,EAC7B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,IAC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AAM,EAAA,QAAA;AAAA,UACN,WACE,EAAA,+DAAA;AAAA,SACJ;AAAA,QACA,YAAc,EAAA;AAAA,UACZ,IAAM,EAAA,QAAA;AAAA,UACN,WACE,EAAA,sEAAA;AAAA,SACJ;AAAA,QACA,OAAS,EAAA;AAAA,UACP,IAAM,EAAA,QAAA;AAAA,UACN,WACE,EAAA,+EAAA;AAAA,SACJ;AAAA,QACA,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,QAAA;AAAA,UACN,WACE,EAAA,sFAAA;AAAA,SACJ;AAAA,QACA,YAAc,EAAA;AAAA,UACZ,IAAM,EAAA,QAAA;AAAA,UACN,WACE,EAAA,sFAAA;AAAA,SACJ;AAAA,QACA,YAAc,EAAA;AAAA,UACZ,IAAM,EAAA,QAAA;AAAA,UACN,WAAa,EAAA,gDAAA;AAAA,SACf;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactAriaComponents = require('react-aria-components');
|
|
5
|
+
var utils = require('./utils-1190a0a9.cjs.js');
|
|
6
|
+
require('@plasmicapp/host/registerComponent');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
+
var __spreadValues = (a, b) => {
|
|
18
|
+
for (var prop in b || (b = {}))
|
|
19
|
+
if (__hasOwnProp.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
if (__getOwnPropSymbols)
|
|
22
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
+
if (__propIsEnum.call(b, prop))
|
|
24
|
+
__defNormalProp(a, prop, b[prop]);
|
|
25
|
+
}
|
|
26
|
+
return a;
|
|
27
|
+
};
|
|
28
|
+
var __objRest = (source, exclude) => {
|
|
29
|
+
var target = {};
|
|
30
|
+
for (var prop in source)
|
|
31
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
if (source != null && __getOwnPropSymbols)
|
|
34
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
35
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
36
|
+
target[prop] = source[prop];
|
|
37
|
+
}
|
|
38
|
+
return target;
|
|
39
|
+
};
|
|
40
|
+
function BaseForm(props) {
|
|
41
|
+
const _a = props, { onSubmit, children } = _a, rest = __objRest(_a, ["onSubmit", "children"]);
|
|
42
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
43
|
+
reactAriaComponents.Form,
|
|
44
|
+
__spreadValues({
|
|
45
|
+
onSubmit: (e) => {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
const formData = new FormData(e.currentTarget);
|
|
48
|
+
const formValues = {};
|
|
49
|
+
formData.forEach((value, key) => {
|
|
50
|
+
const field = e.currentTarget.elements.namedItem(key);
|
|
51
|
+
if (field instanceof RadioNodeList && Array.from(field.values()).every(
|
|
52
|
+
(f) => f.type === "checkbox"
|
|
53
|
+
)) {
|
|
54
|
+
formValues[key] = formData.getAll(key);
|
|
55
|
+
} else {
|
|
56
|
+
field.type;
|
|
57
|
+
formValues[key] = formData.get(key);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
onSubmit == null ? void 0 : onSubmit(formValues);
|
|
61
|
+
}
|
|
62
|
+
}, rest),
|
|
63
|
+
children
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function registerForm(loader, overrides) {
|
|
67
|
+
utils.registerComponentHelper(
|
|
68
|
+
loader,
|
|
69
|
+
BaseForm,
|
|
70
|
+
{
|
|
71
|
+
name: utils.makeComponentName("form"),
|
|
72
|
+
displayName: "BaseForm",
|
|
73
|
+
importPath: "@plasmicpkgs/react-aria/registerForm",
|
|
74
|
+
importName: "BaseForm",
|
|
75
|
+
props: {
|
|
76
|
+
children: {
|
|
77
|
+
type: "slot"
|
|
78
|
+
},
|
|
79
|
+
onSubmit: {
|
|
80
|
+
type: "eventHandler",
|
|
81
|
+
argTypes: [{ name: "data", type: "object" }]
|
|
82
|
+
},
|
|
83
|
+
onReset: {
|
|
84
|
+
type: "eventHandler",
|
|
85
|
+
argTypes: []
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
trapsFocus: true
|
|
89
|
+
},
|
|
90
|
+
overrides
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
exports.BaseForm = BaseForm;
|
|
95
|
+
exports.registerForm = registerForm;
|
|
96
|
+
//# sourceMappingURL=registerForm.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerForm.cjs.js","sources":["../src/registerForm.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormProps } from \"react-aria-components\";\nimport { Form } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseFormProps extends Omit<FormProps, \"onSubmit\"> {\n onSubmit: (\n data: Record<string, FormDataEntryValue | FormDataEntryValue[] | null>\n ) => void;\n}\n\nexport function BaseForm(props: BaseFormProps) {\n const { onSubmit, children, ...rest } = props;\n return (\n <Form\n onSubmit={(e) => {\n e.preventDefault();\n const formData = new FormData(e.currentTarget);\n const formValues: {\n [key: string]: FormDataEntryValue | FormDataEntryValue[] | null;\n } = {};\n formData.forEach((value, key) => {\n const field = e.currentTarget.elements.namedItem(key);\n if (\n field instanceof RadioNodeList &&\n (Array.from(field.values()) as HTMLInputElement[]).every(\n (f) => f.type === \"checkbox\"\n )\n ) {\n formValues[key] = formData.getAll(key);\n } else {\n (field as HTMLInputElement).type;\n formValues[key] = formData.get(key);\n }\n });\n onSubmit?.(formValues);\n }}\n {...rest}\n >\n {children}\n </Form>\n );\n}\n\nexport function registerForm(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseForm>\n) {\n registerComponentHelper(\n loader,\n BaseForm,\n {\n name: makeComponentName(\"form\"),\n displayName: \"BaseForm\",\n importPath: \"@plasmicpkgs/react-aria/registerForm\",\n importName: \"BaseForm\",\n props: {\n children: {\n type: \"slot\",\n },\n onSubmit: {\n type: \"eventHandler\",\n argTypes: [{ name: \"data\", type: \"object\" }],\n } as any,\n onReset: {\n type: \"eventHandler\",\n argTypes: [],\n } as any,\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","Form","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,SAAS,KAAsB,EAAA;AAC7C,EAAwC,MAAA,EAAA,GAAA,KAAA,EAAhC,YAAU,QAjBpB,EAAA,GAiB0C,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAAvB,UAAU,EAAA,UAAA,CAAA,CAAA,CAAA;AAClB,EACE,uBAAAA,sBAAA,CAAA,aAAA;AAAA,IAACC,wBAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,QAAA,EAAU,CAAC,CAAM,KAAA;AACf,QAAA,CAAA,CAAE,cAAe,EAAA,CAAA;AACjB,QAAA,MAAM,QAAW,GAAA,IAAI,QAAS,CAAA,CAAA,CAAE,aAAa,CAAA,CAAA;AAC7C,QAAA,MAAM,aAEF,EAAC,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C7C;AAAA,QACA,OAAS,EAAA;AAAA,UACP,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,EAAC;AAAA,SACb;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FormProps } from "react-aria-components";
|
|
3
|
+
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
|
+
interface BaseFormProps extends Omit<FormProps, "onSubmit"> {
|
|
5
|
+
onSubmit: (data: Record<string, FormDataEntryValue | FormDataEntryValue[] | null>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function BaseForm(props: BaseFormProps): React.JSX.Element;
|
|
8
|
+
export declare function registerForm(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseForm>): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Form } from 'react-aria-components';
|
|
3
|
+
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
4
|
+
import '@plasmicapp/host/registerComponent';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
function BaseForm(props) {
|
|
35
|
+
const _a = props, { onSubmit, children } = _a, rest = __objRest(_a, ["onSubmit", "children"]);
|
|
36
|
+
return /* @__PURE__ */ React.createElement(
|
|
37
|
+
Form,
|
|
38
|
+
__spreadValues({
|
|
39
|
+
onSubmit: (e) => {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
const formData = new FormData(e.currentTarget);
|
|
42
|
+
const formValues = {};
|
|
43
|
+
formData.forEach((value, key) => {
|
|
44
|
+
const field = e.currentTarget.elements.namedItem(key);
|
|
45
|
+
if (field instanceof RadioNodeList && Array.from(field.values()).every(
|
|
46
|
+
(f) => f.type === "checkbox"
|
|
47
|
+
)) {
|
|
48
|
+
formValues[key] = formData.getAll(key);
|
|
49
|
+
} else {
|
|
50
|
+
field.type;
|
|
51
|
+
formValues[key] = formData.get(key);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
onSubmit == null ? void 0 : onSubmit(formValues);
|
|
55
|
+
}
|
|
56
|
+
}, rest),
|
|
57
|
+
children
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function registerForm(loader, overrides) {
|
|
61
|
+
registerComponentHelper(
|
|
62
|
+
loader,
|
|
63
|
+
BaseForm,
|
|
64
|
+
{
|
|
65
|
+
name: makeComponentName("form"),
|
|
66
|
+
displayName: "BaseForm",
|
|
67
|
+
importPath: "@plasmicpkgs/react-aria/registerForm",
|
|
68
|
+
importName: "BaseForm",
|
|
69
|
+
props: {
|
|
70
|
+
children: {
|
|
71
|
+
type: "slot"
|
|
72
|
+
},
|
|
73
|
+
onSubmit: {
|
|
74
|
+
type: "eventHandler",
|
|
75
|
+
argTypes: [{ name: "data", type: "object" }]
|
|
76
|
+
},
|
|
77
|
+
onReset: {
|
|
78
|
+
type: "eventHandler",
|
|
79
|
+
argTypes: []
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
trapsFocus: true
|
|
83
|
+
},
|
|
84
|
+
overrides
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { BaseForm, registerForm };
|
|
89
|
+
//# sourceMappingURL=registerForm.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerForm.esm.js","sources":["../src/registerForm.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormProps } from \"react-aria-components\";\nimport { Form } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseFormProps extends Omit<FormProps, \"onSubmit\"> {\n onSubmit: (\n data: Record<string, FormDataEntryValue | FormDataEntryValue[] | null>\n ) => void;\n}\n\nexport function BaseForm(props: BaseFormProps) {\n const { onSubmit, children, ...rest } = props;\n return (\n <Form\n onSubmit={(e) => {\n e.preventDefault();\n const formData = new FormData(e.currentTarget);\n const formValues: {\n [key: string]: FormDataEntryValue | FormDataEntryValue[] | null;\n } = {};\n formData.forEach((value, key) => {\n const field = e.currentTarget.elements.namedItem(key);\n if (\n field instanceof RadioNodeList &&\n (Array.from(field.values()) as HTMLInputElement[]).every(\n (f) => f.type === \"checkbox\"\n )\n ) {\n formValues[key] = formData.getAll(key);\n } else {\n (field as HTMLInputElement).type;\n formValues[key] = formData.get(key);\n }\n });\n onSubmit?.(formValues);\n }}\n {...rest}\n >\n {children}\n </Form>\n );\n}\n\nexport function registerForm(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseForm>\n) {\n registerComponentHelper(\n loader,\n BaseForm,\n {\n name: makeComponentName(\"form\"),\n displayName: \"BaseForm\",\n importPath: \"@plasmicpkgs/react-aria/registerForm\",\n importName: \"BaseForm\",\n props: {\n children: {\n type: \"slot\",\n },\n onSubmit: {\n type: \"eventHandler\",\n argTypes: [{ name: \"data\", type: \"object\" }],\n } as any,\n onReset: {\n type: \"eventHandler\",\n argTypes: [],\n } as any,\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,SAAS,KAAsB,EAAA;AAC7C,EAAwC,MAAA,EAAA,GAAA,KAAA,EAAhC,YAAU,QAjBpB,EAAA,GAiB0C,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAAvB,UAAU,EAAA,UAAA,CAAA,CAAA,CAAA;AAClB,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,QAAA,EAAU,CAAC,CAAM,KAAA;AACf,QAAA,CAAA,CAAE,cAAe,EAAA,CAAA;AACjB,QAAA,MAAM,QAAW,GAAA,IAAI,QAAS,CAAA,CAAA,CAAE,aAAa,CAAA,CAAA;AAC7C,QAAA,MAAM,aAEF,EAAC,CAAA;AACL,QAAS,QAAA,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAC/B,UAAA,MAAM,KAAQ,GAAA,CAAA,CAAE,aAAc,CAAA,QAAA,CAAS,UAAU,GAAG,CAAA,CAAA;AACpD,UAAA,IACE,iBAAiB,aAChB,IAAA,KAAA,CAAM,KAAK,KAAM,CAAA,MAAA,EAAQ,CAAyB,CAAA,KAAA;AAAA,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
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-
|
|
6
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
7
7
|
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
8
8
|
require('@plasmicapp/host/registerComponent');
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from '@react-aria/utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Header } from 'react-aria-components';
|
|
4
|
-
import {
|
|
4
|
+
import { e as PlasmicHeaderContext } from './contexts-49f6c298.esm.js';
|
|
5
5
|
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
6
6
|
import '@plasmicapp/host/registerComponent';
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var utils = require('@react-aria/utils');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-
|
|
6
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
7
7
|
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
8
8
|
require('@plasmicapp/host/registerComponent');
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from '@react-aria/utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Input } from 'react-aria-components';
|
|
4
|
-
import { a as PlasmicInputContext } from './contexts-
|
|
4
|
+
import { a as PlasmicInputContext } from './contexts-49f6c298.esm.js';
|
|
5
5
|
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
6
6
|
import '@plasmicapp/host/registerComponent';
|
|
7
7
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var utils = require('@react-aria/utils');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var
|
|
7
|
-
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
5
|
+
var utils = require('./utils-1190a0a9.cjs.js');
|
|
8
6
|
require('@plasmicapp/host/registerComponent');
|
|
9
7
|
|
|
10
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -28,26 +26,20 @@ var __spreadValues = (a, b) => {
|
|
|
28
26
|
return a;
|
|
29
27
|
};
|
|
30
28
|
function BaseLabel(props) {
|
|
31
|
-
|
|
32
|
-
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Label, __spreadValues({}, utils.mergeProps(contextProps, props)));
|
|
29
|
+
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Label, __spreadValues({}, props));
|
|
33
30
|
}
|
|
34
31
|
function registerLabel(loader, overrides) {
|
|
35
|
-
utils
|
|
32
|
+
utils.registerComponentHelper(
|
|
36
33
|
loader,
|
|
37
34
|
BaseLabel,
|
|
38
35
|
{
|
|
39
|
-
name: "
|
|
36
|
+
name: utils.makeComponentName("label"),
|
|
40
37
|
displayName: "BaseLabel",
|
|
41
38
|
importPath: "@plasmicpkgs/react-aria/registerLabel",
|
|
42
39
|
importName: "BaseLabel",
|
|
43
40
|
props: {
|
|
44
41
|
children: {
|
|
45
|
-
type: "slot"
|
|
46
|
-
defaultValue: {
|
|
47
|
-
type: "text",
|
|
48
|
-
value: "Label"
|
|
49
|
-
},
|
|
50
|
-
mergeWithParent: true
|
|
42
|
+
type: "slot"
|
|
51
43
|
}
|
|
52
44
|
},
|
|
53
45
|
trapsFocus: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerLabel.cjs.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"registerLabel.cjs.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import React from \"react\";\nimport type { LabelProps } from \"react-aria-components\";\nimport { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseLabel(props: LabelProps) {\n return <Label {...props} />;\n}\n\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: makeComponentName(\"label\"),\n displayName: \"BaseLabel\",\n importPath: \"@plasmicpkgs/react-aria/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","Label","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,UAAU,KAAmB,EAAA;AAC3C,EAAO,uBAAAA,sBAAA,CAAA,aAAA,CAACC,8CAAU,KAAO,CAAA,CAAA,CAAA;AAC3B,CAAA;AAEgB,SAAA,aAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,wBAAkB,OAAO,CAAA;AAAA,MAC/B,WAAa,EAAA,WAAA;AAAA,MACb,UAAY,EAAA,uCAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { LabelProps } from "react-aria-components";
|
|
3
3
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
|
-
export declare function BaseLabel(props:
|
|
4
|
+
export declare function BaseLabel(props: LabelProps): React.JSX.Element;
|
|
5
5
|
export declare function registerLabel(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseLabel>): void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { mergeProps } from '@react-aria/utils';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Label } from 'react-aria-components';
|
|
4
|
-
import {
|
|
5
|
-
import { r as registerComponentHelper } from './utils-28f98072.esm.js';
|
|
3
|
+
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
6
4
|
import '@plasmicapp/host/registerComponent';
|
|
7
5
|
|
|
8
6
|
var __defProp = Object.defineProperty;
|
|
@@ -22,26 +20,20 @@ var __spreadValues = (a, b) => {
|
|
|
22
20
|
return a;
|
|
23
21
|
};
|
|
24
22
|
function BaseLabel(props) {
|
|
25
|
-
|
|
26
|
-
return /* @__PURE__ */ React.createElement(Label, __spreadValues({}, mergeProps(contextProps, props)));
|
|
23
|
+
return /* @__PURE__ */ React.createElement(Label, __spreadValues({}, props));
|
|
27
24
|
}
|
|
28
25
|
function registerLabel(loader, overrides) {
|
|
29
26
|
registerComponentHelper(
|
|
30
27
|
loader,
|
|
31
28
|
BaseLabel,
|
|
32
29
|
{
|
|
33
|
-
name: "
|
|
30
|
+
name: makeComponentName("label"),
|
|
34
31
|
displayName: "BaseLabel",
|
|
35
32
|
importPath: "@plasmicpkgs/react-aria/registerLabel",
|
|
36
33
|
importName: "BaseLabel",
|
|
37
34
|
props: {
|
|
38
35
|
children: {
|
|
39
|
-
type: "slot"
|
|
40
|
-
defaultValue: {
|
|
41
|
-
type: "text",
|
|
42
|
-
value: "Label"
|
|
43
|
-
},
|
|
44
|
-
mergeWithParent: true
|
|
36
|
+
type: "slot"
|
|
45
37
|
}
|
|
46
38
|
},
|
|
47
39
|
trapsFocus: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerLabel.esm.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"registerLabel.esm.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import React from \"react\";\nimport type { LabelProps } from \"react-aria-components\";\nimport { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseLabel(props: LabelProps) {\n return <Label {...props} />;\n}\n\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: makeComponentName(\"label\"),\n displayName: \"BaseLabel\",\n importPath: \"@plasmicpkgs/react-aria/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,UAAU,KAAmB,EAAA;AAC3C,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,0BAAU,KAAO,CAAA,CAAA,CAAA;AAC3B,CAAA;AAEgB,SAAA,aAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,OAAO,CAAA;AAAA,MAC/B,WAAa,EAAA,WAAA;AAAA,MACb,UAAY,EAAA,uCAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var utils = require('@react-aria/utils');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-
|
|
6
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
7
7
|
var registerListBoxItem = require('./registerListBoxItem.cjs.js');
|
|
8
8
|
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from '@react-aria/utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ListBox } from 'react-aria-components';
|
|
4
|
-
import { P as PlasmicListBoxContext,
|
|
4
|
+
import { P as PlasmicListBoxContext, b as PlasmicSectionContext, c as PlasmicItemContext } from './contexts-49f6c298.esm.js';
|
|
5
5
|
import { registerListBoxItem } from './registerListBoxItem.esm.js';
|
|
6
6
|
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
7
7
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var utils = require('@react-aria/utils');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-
|
|
6
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
7
7
|
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
8
8
|
require('@plasmicapp/host/registerComponent');
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from '@react-aria/utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ListBoxItem } from 'react-aria-components';
|
|
4
|
-
import {
|
|
4
|
+
import { c as PlasmicItemContext } from './contexts-49f6c298.esm.js';
|
|
5
5
|
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
6
6
|
import '@plasmicapp/host/registerComponent';
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ var host = require('@plasmicapp/host');
|
|
|
4
4
|
var utils = require('@react-aria/utils');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var contexts = require('./contexts-
|
|
7
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
8
8
|
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import { mergeProps } from '@react-aria/utils';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { PopoverContext, Popover } from 'react-aria-components';
|
|
5
|
-
import {
|
|
5
|
+
import { d as PlasmicPopoverContext } from './contexts-49f6c298.esm.js';
|
|
6
6
|
import { r as registerComponentHelper } from './utils-28f98072.esm.js';
|
|
7
7
|
import '@plasmicapp/host/registerComponent';
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var utils = require('@react-aria/utils');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-
|
|
6
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
7
7
|
var registerHeader = require('./registerHeader.cjs.js');
|
|
8
8
|
var utils$1 = require('./utils-1190a0a9.cjs.js');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from '@react-aria/utils';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Section, Collection } from 'react-aria-components';
|
|
4
|
-
import {
|
|
4
|
+
import { b as PlasmicSectionContext, e as PlasmicHeaderContext, c as PlasmicItemContext } from './contexts-49f6c298.esm.js';
|
|
5
5
|
import { registerHeader } from './registerHeader.esm.js';
|
|
6
6
|
import { r as registerComponentHelper, a as makeChildComponentName, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
7
7
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var host = require('@plasmicapp/host');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-
|
|
6
|
+
var contexts = require('./contexts-3e42cdf9.cjs.js');
|
|
7
7
|
var optionUtils = require('./option-utils-0db61f6d.cjs.js');
|
|
8
8
|
var utils = require('./utils-1190a0a9.cjs.js');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|