@plasmicpkgs/react-aria 0.0.13 → 0.0.14
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/ErrorBoundary.d.ts +14 -0
- package/dist/contexts.d.ts +1 -1
- package/dist/react-aria.esm.js +721 -448
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +718 -445
- package/dist/react-aria.js.map +1 -1
- package/dist/registerInput.d.ts +2 -2
- package/dist/registerRadio.d.ts +1 -0
- package/dist/registerTextArea.d.ts +5 -0
- package/dist/registerTextField.d.ts +14 -0
- package/package.json +2 -2
- package/skinny/ErrorBoundary.d.ts +14 -0
- package/skinny/contexts.d.ts +1 -1
- package/skinny/registerButton.cjs.js +2 -2
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.esm.js +2 -2
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +2 -2
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.esm.js +2 -2
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +2 -2
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +2 -2
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +4 -4
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +4 -4
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDescription.cjs.js +1 -1
- package/skinny/registerDescription.cjs.js.map +1 -1
- package/skinny/registerDescription.esm.js +1 -1
- package/skinny/registerDescription.esm.js.map +1 -1
- package/skinny/registerFieldError.cjs.js +2 -2
- package/skinny/registerFieldError.cjs.js.map +1 -1
- package/skinny/registerFieldError.esm.js +2 -2
- package/skinny/registerFieldError.esm.js.map +1 -1
- package/skinny/registerForm.cjs.js +2 -2
- package/skinny/registerForm.cjs.js.map +1 -1
- package/skinny/registerForm.esm.js +2 -2
- package/skinny/registerForm.esm.js.map +1 -1
- package/skinny/registerHeader.cjs.js +2 -2
- package/skinny/registerHeader.cjs.js.map +1 -1
- package/skinny/registerHeader.esm.js +2 -2
- package/skinny/registerHeader.esm.js.map +1 -1
- package/skinny/registerInput.cjs.js +10 -35
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.d.ts +2 -2
- package/skinny/registerInput.esm.js +7 -32
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/registerLabel.cjs.js +2 -2
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.esm.js +2 -2
- package/skinny/registerLabel.esm.js.map +1 -1
- package/skinny/registerListBox.cjs.js +2 -2
- package/skinny/registerListBox.cjs.js.map +1 -1
- package/skinny/registerListBox.esm.js +2 -2
- package/skinny/registerListBox.esm.js.map +1 -1
- package/skinny/registerListBoxItem.cjs.js +2 -2
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.esm.js +2 -2
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +4 -4
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.esm.js +4 -4
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +39 -27
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.d.ts +1 -0
- package/skinny/registerRadio.esm.js +41 -29
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +2 -3
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +2 -3
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +2 -2
- package/skinny/registerSection.cjs.js.map +1 -1
- package/skinny/registerSection.esm.js +2 -2
- package/skinny/registerSection.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +3 -3
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +3 -3
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSwitch.cjs.js +2 -2
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.esm.js +2 -2
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerText.cjs.js +2 -2
- package/skinny/registerText.cjs.js.map +1 -1
- package/skinny/registerText.esm.js +2 -2
- package/skinny/registerText.esm.js.map +1 -1
- package/skinny/registerTextArea.cjs.js +53 -0
- package/skinny/registerTextArea.cjs.js.map +1 -0
- package/skinny/registerTextArea.d.ts +5 -0
- package/skinny/registerTextArea.esm.js +46 -0
- package/skinny/registerTextArea.esm.js.map +1 -0
- package/skinny/registerTextField.cjs.js +263 -0
- package/skinny/registerTextField.cjs.js.map +1 -0
- package/skinny/registerTextField.d.ts +14 -0
- package/skinny/registerTextField.esm.js +256 -0
- package/skinny/registerTextField.esm.js.map +1 -0
|
@@ -27,7 +27,7 @@ var __spreadValues = (a, b) => {
|
|
|
27
27
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
28
28
|
function registerDescription(loader, overrides) {
|
|
29
29
|
registerText.registerText(loader, __spreadProps(__spreadValues({}, overrides), {
|
|
30
|
-
displayName: "
|
|
30
|
+
displayName: "Aria Description",
|
|
31
31
|
props: {
|
|
32
32
|
slot: { type: "string", hidden: () => true, defaultValue: "description" }
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerDescription.cjs.js","sources":["../src/registerDescription.tsx"],"sourcesContent":["import { BaseText, registerText } from \"./registerText\";\nimport { CodeComponentMetaOverrides, Registerable } from \"./utils\";\n\nexport function registerDescription(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseText>\n) {\n registerText(loader, {\n ...overrides,\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerDescription.cjs.js","sources":["../src/registerDescription.tsx"],"sourcesContent":["import { BaseText, registerText } from \"./registerText\";\nimport { CodeComponentMetaOverrides, Registerable } from \"./utils\";\n\nexport function registerDescription(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseText>\n) {\n registerText(loader, {\n ...overrides,\n displayName: \"Aria Description\",\n props: {\n slot: { type: \"string\", hidden: () => true, defaultValue: \"description\" },\n },\n });\n}\n"],"names":["registerText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGgB,SAAA,mBAAA,CACd,QACA,SACA,EAAA;AACA,EAAaA,yBAAA,CAAA,MAAA,EAAQ,iCAChB,SADgB,CAAA,EAAA;AAAA,IAEnB,WAAa,EAAA,kBAAA;AAAA,IACb,KAAO,EAAA;AAAA,MACL,IAAA,EAAM,EAAE,IAAM,EAAA,QAAA,EAAU,QAAQ,MAAM,IAAA,EAAM,cAAc,aAAc,EAAA;AAAA,KAC1E;AAAA,GACD,CAAA,CAAA,CAAA;AACH;;;;"}
|
|
@@ -25,7 +25,7 @@ var __spreadValues = (a, b) => {
|
|
|
25
25
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
26
|
function registerDescription(loader, overrides) {
|
|
27
27
|
registerText(loader, __spreadProps(__spreadValues({}, overrides), {
|
|
28
|
-
displayName: "
|
|
28
|
+
displayName: "Aria Description",
|
|
29
29
|
props: {
|
|
30
30
|
slot: { type: "string", hidden: () => true, defaultValue: "description" }
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerDescription.esm.js","sources":["../src/registerDescription.tsx"],"sourcesContent":["import { BaseText, registerText } from \"./registerText\";\nimport { CodeComponentMetaOverrides, Registerable } from \"./utils\";\n\nexport function registerDescription(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseText>\n) {\n registerText(loader, {\n ...overrides,\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerDescription.esm.js","sources":["../src/registerDescription.tsx"],"sourcesContent":["import { BaseText, registerText } from \"./registerText\";\nimport { CodeComponentMetaOverrides, Registerable } from \"./utils\";\n\nexport function registerDescription(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseText>\n) {\n registerText(loader, {\n ...overrides,\n displayName: \"Aria Description\",\n props: {\n slot: { type: \"string\", hidden: () => true, defaultValue: \"description\" },\n },\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGgB,SAAA,mBAAA,CACd,QACA,SACA,EAAA;AACA,EAAa,YAAA,CAAA,MAAA,EAAQ,iCAChB,SADgB,CAAA,EAAA;AAAA,IAEnB,WAAa,EAAA,kBAAA;AAAA,IACb,KAAO,EAAA;AAAA,MACL,IAAA,EAAM,EAAE,IAAM,EAAA,QAAA,EAAU,QAAQ,MAAM,IAAA,EAAM,cAAc,aAAc,EAAA;AAAA,KAC1E;AAAA,GACD,CAAA,CAAA,CAAA;AACH;;;;"}
|
|
@@ -101,8 +101,8 @@ function registerFieldError(loader, overrides) {
|
|
|
101
101
|
BaseFieldError,
|
|
102
102
|
{
|
|
103
103
|
name: utils.makeComponentName("fielderror"),
|
|
104
|
-
displayName: "
|
|
105
|
-
importPath: "@plasmicpkgs/react-aria/registerFieldError",
|
|
104
|
+
displayName: "Aria Field Error",
|
|
105
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerFieldError",
|
|
106
106
|
importName: "BaseFieldError",
|
|
107
107
|
actions: [
|
|
108
108
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerFieldError.cjs.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: \"
|
|
1
|
+
{"version":3,"file":"registerFieldError.cjs.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: \"Aria Field Error\",\n importPath: \"@plasmicpkgs/react-aria/skinny/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":["FieldError","React","registerComponentHelper","makeComponentName"],"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,IACA,YAAA;AAAA,GAlCF,GAwB+B,EAW1B,EAAA,IAAA,GAAA,SAAA,CAX0B,EAW1B,EAAA;AAAA,IAVH,UAAA;AAAA,IACA,aAAA;AAAA,IACA,iBAAA;AAAA,IACA,eAAA;AAAA,IACA,gBAAA;AA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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;;;;;"}
|
|
@@ -95,8 +95,8 @@ function registerFieldError(loader, overrides) {
|
|
|
95
95
|
BaseFieldError,
|
|
96
96
|
{
|
|
97
97
|
name: makeComponentName("fielderror"),
|
|
98
|
-
displayName: "
|
|
99
|
-
importPath: "@plasmicpkgs/react-aria/registerFieldError",
|
|
98
|
+
displayName: "Aria Field Error",
|
|
99
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerFieldError",
|
|
100
100
|
importName: "BaseFieldError",
|
|
101
101
|
actions: [
|
|
102
102
|
{
|
|
@@ -1 +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: \"
|
|
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: \"Aria Field Error\",\n importPath: \"@plasmicpkgs/react-aria/skinny/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,IACA,YAAA;AAAA,GAlCF,GAwB+B,EAW1B,EAAA,IAAA,GAAA,SAAA,CAX0B,EAW1B,EAAA;AAAA,IAVH,UAAA;AAAA,IACA,aAAA;AAAA,IACA,iBAAA;AAAA,IACA,eAAA;AAAA,IACA,gBAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,2CACG,UAAe,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,EACb,CAAC,EAAE,iB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A,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;;;;"}
|
|
@@ -69,8 +69,8 @@ function registerForm(loader, overrides) {
|
|
|
69
69
|
BaseForm,
|
|
70
70
|
{
|
|
71
71
|
name: utils.makeComponentName("form"),
|
|
72
|
-
displayName: "
|
|
73
|
-
importPath: "@plasmicpkgs/react-aria/registerForm",
|
|
72
|
+
displayName: "Aria Form",
|
|
73
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerForm",
|
|
74
74
|
importName: "BaseForm",
|
|
75
75
|
props: {
|
|
76
76
|
children: {
|
|
@@ -1 +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: \"
|
|
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: \"Aria Form\",\n importPath: \"@plasmicpkgs/react-aria/skinny/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,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,YACjD,CAAC,CAAM,KAAA,CAAA,CAAE,IAAS,KAAA,UAAA;AAAA,WAEpB,EAAA;AACA,YAAA,UAAA,CAAW,GAAG,CAAA,GAAI,QAAS,CAAA,MAAA,CAAO,GAAG,CAAA,CAAA;AAAA,WAChC,MAAA;AACL,YAAC,KAA2B,CAAA,IAAA,CAAA;AAC5B,YAAA,UAAA,CAAW,GAAG,CAAA,GAAI,QAAS,CAAA,GAAA,CAAI,GAAG,CAAA,CAAA;AAAA,WACpC;AAAA,SACD,CAAA,CAAA;AACD,QAAW,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,UAAA,CAAA,CAAA;AAAA,OACb;AAAA,KACI,EAAA,IAAA,CAAA;AAAA,IAEH,QAAA;AAAA,GACH,CAAA;AAEJ,CAAA;AAEgB,SAAA,YAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,wBAAkB,MAAM,CAAA;AAAA,MAC9B,WAAa,EAAA,WAAA;AAAA,MACb,UAAY,EAAA,6CAAA;AAAA,MACZ,UAAY,EAAA,UAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,SACR;AAAA,QACA,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,MAAQ,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,SAC7C;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;;;;;"}
|
|
@@ -63,8 +63,8 @@ function registerForm(loader, overrides) {
|
|
|
63
63
|
BaseForm,
|
|
64
64
|
{
|
|
65
65
|
name: makeComponentName("form"),
|
|
66
|
-
displayName: "
|
|
67
|
-
importPath: "@plasmicpkgs/react-aria/registerForm",
|
|
66
|
+
displayName: "Aria Form",
|
|
67
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerForm",
|
|
68
68
|
importName: "BaseForm",
|
|
69
69
|
props: {
|
|
70
70
|
children: {
|
|
@@ -1 +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: \"
|
|
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: \"Aria Form\",\n importPath: \"@plasmicpkgs/react-aria/skinny/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,EA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AA,UACN,UAAU,EAAC;AAAA,SACb;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -37,8 +37,8 @@ function registerHeader(loader, overrides) {
|
|
|
37
37
|
BaseHeader,
|
|
38
38
|
{
|
|
39
39
|
name: utils$1.makeComponentName("header"),
|
|
40
|
-
displayName: "
|
|
41
|
-
importPath: "@plasmicpkgs/react-aria/registerHeader",
|
|
40
|
+
displayName: "Aria Header",
|
|
41
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerHeader",
|
|
42
42
|
importName: "BaseHeader",
|
|
43
43
|
props: {}
|
|
44
44
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerHeader.cjs.js","sources":["../src/registerHeader.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n
|
|
1
|
+
{"version":3,"file":"registerHeader.cjs.js","sources":["../src/registerHeader.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport function BaseHeader(props: React.ComponentProps<typeof Header>) {\n const contextProps = React.useContext(PlasmicHeaderContext);\n return <Header {...mergeProps(contextProps, props)} />;\n}\n\nexport function registerHeader(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseHeader>\n) {\n registerComponentHelper(\n loader,\n BaseHeader,\n {\n name: makeComponentName(\"header\"),\n displayName: \"Aria Header\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerHeader\",\n importName: \"BaseHeader\",\n props: {},\n },\n overrides\n );\n}\n"],"names":["React","PlasmicHeaderContext","Header","mergeProps","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,KAA4C,EAAA;AACrE,EAAM,MAAA,YAAA,GAAeA,sBAAM,CAAA,UAAA,CAAWC,6BAAoB,CAAA,CAAA;AAC1D,EAAA,uBAAQD,sBAAA,CAAA,aAAA,CAAAE,0BAAA,EAAA,cAAA,CAAA,EAAA,EAAWC,gBAAW,CAAA,YAAA,EAAc,KAAK,CAAG,CAAA,CAAA,CAAA;AACtD,CAAA;AAEgB,SAAA,cAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,+BAAA;AAAA,IACE,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,0BAAkB,QAAQ,CAAA;AAAA,MAChC,WAAa,EAAA,aAAA;AAAA,MACb,UAAY,EAAA,+CAAA;AAAA,MACZ,UAAY,EAAA,YAAA;AAAA,MACZ,OAAO,EAAC;AAAA,KACV;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -31,8 +31,8 @@ function registerHeader(loader, overrides) {
|
|
|
31
31
|
BaseHeader,
|
|
32
32
|
{
|
|
33
33
|
name: makeComponentName("header"),
|
|
34
|
-
displayName: "
|
|
35
|
-
importPath: "@plasmicpkgs/react-aria/registerHeader",
|
|
34
|
+
displayName: "Aria Header",
|
|
35
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerHeader",
|
|
36
36
|
importName: "BaseHeader",
|
|
37
37
|
props: {}
|
|
38
38
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerHeader.esm.js","sources":["../src/registerHeader.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n
|
|
1
|
+
{"version":3,"file":"registerHeader.esm.js","sources":["../src/registerHeader.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport function BaseHeader(props: React.ComponentProps<typeof Header>) {\n const contextProps = React.useContext(PlasmicHeaderContext);\n return <Header {...mergeProps(contextProps, props)} />;\n}\n\nexport function registerHeader(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseHeader>\n) {\n registerComponentHelper(\n loader,\n BaseHeader,\n {\n name: makeComponentName(\"header\"),\n displayName: \"Aria Header\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerHeader\",\n importName: \"BaseHeader\",\n props: {},\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,KAA4C,EAAA;AACrE,EAAM,MAAA,YAAA,GAAe,KAAM,CAAA,UAAA,CAAW,oBAAoB,CAAA,CAAA;AAC1D,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,cAAA,CAAA,EAAA,EAAW,UAAW,CAAA,YAAA,EAAc,KAAK,CAAG,CAAA,CAAA,CAAA;AACtD,CAAA;AAEgB,SAAA,cAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,QAAQ,CAAA;AAAA,MAChC,WAAa,EAAA,aAAA;AAAA,MACb,UAAY,EAAA,+CAAA;AAAA,MACZ,UAAY,EAAA,YAAA;AAAA,MACZ,OAAO,EAAC;AAAA,KACV;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -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,46 +26,23 @@ var __spreadValues = (a, b) => {
|
|
|
28
26
|
return a;
|
|
29
27
|
};
|
|
30
28
|
function BaseInput(props) {
|
|
31
|
-
|
|
32
|
-
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Input, __spreadValues({}, utils.mergeProps(contextProps, props)));
|
|
29
|
+
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Input, __spreadValues({}, props));
|
|
33
30
|
}
|
|
34
31
|
function registerInput(loader, overrides) {
|
|
35
|
-
utils
|
|
32
|
+
utils.registerComponentHelper(
|
|
36
33
|
loader,
|
|
37
34
|
BaseInput,
|
|
38
35
|
{
|
|
39
|
-
name: utils
|
|
40
|
-
displayName: "
|
|
41
|
-
importPath: "@plasmicpkgs/react-aria/registerInput",
|
|
36
|
+
name: utils.makeComponentName("input"),
|
|
37
|
+
displayName: "Aria Input",
|
|
38
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
|
|
42
39
|
importName: "BaseInput",
|
|
43
40
|
props: {
|
|
44
|
-
|
|
45
|
-
type: "
|
|
46
|
-
displayName: "Additional states",
|
|
47
|
-
selectors: [
|
|
48
|
-
{
|
|
49
|
-
selector: ":self[data-hovered]",
|
|
50
|
-
label: "Hovered"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
selector: ":self[data-focused]",
|
|
54
|
-
label: "Focused"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
selector: ":self[data-focus-visible]",
|
|
58
|
-
label: "Focused by keyboard"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
selector: ":self[data-disabled]",
|
|
62
|
-
label: "Disabled"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
selector: ":self::placeholder",
|
|
66
|
-
label: "Placeholder"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
41
|
+
placeholder: {
|
|
42
|
+
type: "string"
|
|
69
43
|
}
|
|
70
|
-
}
|
|
44
|
+
},
|
|
45
|
+
trapsFocus: true
|
|
71
46
|
},
|
|
72
47
|
overrides
|
|
73
48
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerInput.cjs.js","sources":["../src/registerInput.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"registerInput.cjs.js","sources":["../src/registerInput.tsx"],"sourcesContent":["import React from \"react\";\nimport type { InputProps } from \"react-aria-components\";\nimport { Input } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseInput(props: InputProps) {\n return <Input {...props} />;\n}\n\nexport function registerInput(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseInput>\n) {\n registerComponentHelper(\n loader,\n BaseInput,\n {\n name: makeComponentName(\"input\"),\n displayName: \"Aria Input\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerInput\",\n importName: \"BaseInput\",\n props: {\n placeholder: {\n type: \"string\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","Input","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,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,WAAa,EAAA;AAAA,UACX,IAAM,EAAA,QAAA;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 { InputProps } from "react-aria-components";
|
|
3
3
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
|
-
export declare function BaseInput(props:
|
|
4
|
+
export declare function BaseInput(props: InputProps): React.JSX.Element;
|
|
5
5
|
export declare function registerInput(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseInput>): void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { mergeProps } from '@react-aria/utils';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Input } from 'react-aria-components';
|
|
4
|
-
import { a as PlasmicInputContext } from './contexts-49f6c298.esm.js';
|
|
5
3
|
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
6
4
|
import '@plasmicapp/host/registerComponent';
|
|
7
5
|
|
|
@@ -22,8 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
22
20
|
return a;
|
|
23
21
|
};
|
|
24
22
|
function BaseInput(props) {
|
|
25
|
-
|
|
26
|
-
return /* @__PURE__ */ React.createElement(Input, __spreadValues({}, mergeProps(contextProps, props)));
|
|
23
|
+
return /* @__PURE__ */ React.createElement(Input, __spreadValues({}, props));
|
|
27
24
|
}
|
|
28
25
|
function registerInput(loader, overrides) {
|
|
29
26
|
registerComponentHelper(
|
|
@@ -31,37 +28,15 @@ function registerInput(loader, overrides) {
|
|
|
31
28
|
BaseInput,
|
|
32
29
|
{
|
|
33
30
|
name: makeComponentName("input"),
|
|
34
|
-
displayName: "
|
|
35
|
-
importPath: "@plasmicpkgs/react-aria/registerInput",
|
|
31
|
+
displayName: "Aria Input",
|
|
32
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
|
|
36
33
|
importName: "BaseInput",
|
|
37
34
|
props: {
|
|
38
|
-
|
|
39
|
-
type: "
|
|
40
|
-
displayName: "Additional states",
|
|
41
|
-
selectors: [
|
|
42
|
-
{
|
|
43
|
-
selector: ":self[data-hovered]",
|
|
44
|
-
label: "Hovered"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
selector: ":self[data-focused]",
|
|
48
|
-
label: "Focused"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
selector: ":self[data-focus-visible]",
|
|
52
|
-
label: "Focused by keyboard"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
selector: ":self[data-disabled]",
|
|
56
|
-
label: "Disabled"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
selector: ":self::placeholder",
|
|
60
|
-
label: "Placeholder"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
35
|
+
placeholder: {
|
|
36
|
+
type: "string"
|
|
63
37
|
}
|
|
64
|
-
}
|
|
38
|
+
},
|
|
39
|
+
trapsFocus: true
|
|
65
40
|
},
|
|
66
41
|
overrides
|
|
67
42
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerInput.esm.js","sources":["../src/registerInput.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"registerInput.esm.js","sources":["../src/registerInput.tsx"],"sourcesContent":["import React from \"react\";\nimport type { InputProps } from \"react-aria-components\";\nimport { Input } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseInput(props: InputProps) {\n return <Input {...props} />;\n}\n\nexport function registerInput(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseInput>\n) {\n registerComponentHelper(\n loader,\n BaseInput,\n {\n name: makeComponentName(\"input\"),\n displayName: \"Aria Input\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerInput\",\n importName: \"BaseInput\",\n props: {\n placeholder: {\n type: \"string\",\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,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,WAAa,EAAA;AAAA,UACX,IAAM,EAAA,QAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -12,8 +12,8 @@ function registerLabel(loader, overrides) {
|
|
|
12
12
|
BaseLabel,
|
|
13
13
|
{
|
|
14
14
|
name: utils.makeComponentName("label"),
|
|
15
|
-
displayName: "
|
|
16
|
-
importPath: "@plasmicpkgs/react-aria/registerLabel",
|
|
15
|
+
displayName: "Aria Label",
|
|
16
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerLabel",
|
|
17
17
|
importName: "BaseLabel",
|
|
18
18
|
props: {
|
|
19
19
|
children: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerLabel.cjs.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\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: \"
|
|
1
|
+
{"version":3,"file":"registerLabel.cjs.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\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: \"Aria Label\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["Label","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;AAQO,MAAM,SAAY,GAAAA,0BAAA;AAET,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,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;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;;;;;"}
|
|
@@ -10,8 +10,8 @@ function registerLabel(loader, overrides) {
|
|
|
10
10
|
BaseLabel,
|
|
11
11
|
{
|
|
12
12
|
name: makeComponentName("label"),
|
|
13
|
-
displayName: "
|
|
14
|
-
importPath: "@plasmicpkgs/react-aria/registerLabel",
|
|
13
|
+
displayName: "Aria Label",
|
|
14
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerLabel",
|
|
15
15
|
importName: "BaseLabel",
|
|
16
16
|
props: {
|
|
17
17
|
children: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerLabel.esm.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\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: \"
|
|
1
|
+
{"version":3,"file":"registerLabel.esm.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\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: \"Aria Label\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;AAQO,MAAM,SAAY,GAAA,MAAA;AAET,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,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;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;;;;"}
|
|
@@ -117,8 +117,8 @@ function registerListBox(loader, overrides) {
|
|
|
117
117
|
BaseListBox,
|
|
118
118
|
{
|
|
119
119
|
name: utils$1.makeComponentName("listbox"),
|
|
120
|
-
displayName: "
|
|
121
|
-
importPath: "@plasmicpkgs/react-aria/registerListBox",
|
|
120
|
+
displayName: "Aria ListBox",
|
|
121
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerListBox",
|
|
122
122
|
importName: "BaseListBox",
|
|
123
123
|
props: {
|
|
124
124
|
renderItem: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBox.cjs.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerListBox.cjs.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n props: {\n renderItem: {\n type: \"slot\",\n displayName: \"Render Item\",\n renderPropParams: [\"item\"],\n },\n renderSection: {\n type: \"slot\",\n displayName: \"Render Section\",\n renderPropParams: [\"section\"],\n },\n className: {\n type: \"class\",\n displayName: \"Additional states\",\n selectors: [\n {\n selector: \":self[data-focused]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-focus-visible]\",\n label: \"Focused by keyboard\",\n },\n ],\n },\n },\n },\n overrides\n );\n\n registerListBoxItem(loader, {\n parentComponentName: makeComponentName(\"listbox\"),\n });\n}\n"],"names":["React","PlasmicListBoxContext","ListBox","mergeProps","PlasmicSectionContext","PlasmicItemContext","registerComponentHelper","makeComponentName","registerListBoxItem"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AA,mBAAA;AAAA,UACb,SAAW,EAAA;AAAA,YACT;AAAA,cACE,QAAU,EAAA,qBAAA;AAAA,cACV,KAAO,EAAA,SAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,2BAAA;AAAA,cACV,KAAO,EAAA,qBAAA;AAAA,aACT;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AAEA,EAAAC,uCAAA,CAAoB,MAAQ,EAAA;AAAA,IAC1B,mBAAA,EAAqBD,0BAAkB,SAAS,CAAA;AAAA,GACjD,CAAA,CAAA;AACH;;;;;"}
|
|
@@ -111,8 +111,8 @@ function registerListBox(loader, overrides) {
|
|
|
111
111
|
BaseListBox,
|
|
112
112
|
{
|
|
113
113
|
name: makeComponentName("listbox"),
|
|
114
|
-
displayName: "
|
|
115
|
-
importPath: "@plasmicpkgs/react-aria/registerListBox",
|
|
114
|
+
displayName: "Aria ListBox",
|
|
115
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerListBox",
|
|
116
116
|
importName: "BaseListBox",
|
|
117
117
|
props: {
|
|
118
118
|
renderItem: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBox.esm.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerListBox.esm.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n props: {\n renderItem: {\n type: \"slot\",\n displayName: \"Render Item\",\n renderPropParams: [\"item\"],\n },\n renderSection: {\n type: \"slot\",\n displayName: \"Render Section\",\n renderPropParams: [\"section\"],\n },\n className: {\n type: \"class\",\n displayName: \"Additional states\",\n selectors: [\n {\n selector: \":self[data-focused]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-focus-visible]\",\n label: \"Focused by keyboard\",\n },\n ],\n },\n },\n },\n overrides\n );\n\n registerListBoxItem(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