@plasmicpkgs/react-aria 0.0.61 → 0.0.63
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/react-aria.esm.js +8 -3
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +8 -3
- package/dist/react-aria.js.map +1 -1
- package/package.json +2 -2
- package/skinny/{common-41a8c2ce.esm.js → common-0c4336fe.esm.js} +7 -3
- package/skinny/common-0c4336fe.esm.js.map +1 -0
- package/skinny/{common-3a916199.cjs.js → common-2e984ab4.cjs.js} +7 -3
- package/skinny/common-2e984ab4.cjs.js.map +1 -0
- package/skinny/registerButton.cjs.js +1 -1
- package/skinny/registerButton.esm.js +1 -1
- package/skinny/registerCheckbox.cjs.js +1 -1
- package/skinny/registerCheckbox.esm.js +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +1 -1
- package/skinny/registerCheckboxGroup.esm.js +1 -1
- package/skinny/registerComboBox.cjs.js +2 -2
- package/skinny/registerComboBox.esm.js +2 -2
- package/skinny/registerDialogTrigger.cjs.js +1 -1
- package/skinny/registerDialogTrigger.esm.js +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/{registerListBox-ad33e1e2.cjs.js → registerListBox-4761c48d.cjs.js} +3 -2
- package/skinny/registerListBox-4761c48d.cjs.js.map +1 -0
- package/skinny/{registerListBox-3842316b.esm.js → registerListBox-8c096263.esm.js} +3 -2
- package/skinny/registerListBox-8c096263.esm.js.map +1 -0
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerModal.cjs.js +1 -1
- package/skinny/registerModal.esm.js +1 -1
- package/skinny/registerRadio.cjs.js +1 -1
- package/skinny/registerRadio.esm.js +1 -1
- package/skinny/registerRadioGroup.cjs.js +1 -1
- package/skinny/registerRadioGroup.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +2 -2
- package/skinny/registerSelect.esm.js +2 -2
- package/skinny/registerSlider.cjs.js +1 -1
- package/skinny/registerSlider.esm.js +1 -1
- package/skinny/registerSliderThumb.cjs.js +1 -1
- package/skinny/registerSliderThumb.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +1 -1
- package/skinny/registerSwitch.esm.js +1 -1
- package/skinny/registerTextArea.cjs.js +1 -1
- package/skinny/registerTextArea.esm.js +1 -1
- package/skinny/registerTextField.cjs.js +1 -1
- package/skinny/registerTextField.esm.js +1 -1
- package/skinny/common-3a916199.cjs.js.map +0 -1
- package/skinny/common-41a8c2ce.esm.js.map +0 -1
- package/skinny/registerListBox-3842316b.esm.js.map +0 -1
- package/skinny/registerListBox-ad33e1e2.cjs.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/react-aria",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.63",
|
|
4
4
|
"description": "Plasmic registration calls for react-aria based components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "096218f75b4ff17a7a8a6d206dce09cd40644abc"
|
|
78
78
|
}
|
|
@@ -31,7 +31,9 @@ function createNameProp() {
|
|
|
31
31
|
type: "string",
|
|
32
32
|
description: "Name for this field if it is part of a form",
|
|
33
33
|
displayName: "Form field key",
|
|
34
|
-
hidden: hasParent,
|
|
34
|
+
// hidden: hasParent,
|
|
35
|
+
hidden: () => true,
|
|
36
|
+
// hiding required prop until the release of Aria Forms
|
|
35
37
|
advanced: true
|
|
36
38
|
};
|
|
37
39
|
}
|
|
@@ -61,7 +63,9 @@ function createRequiredProp(componentName) {
|
|
|
61
63
|
description: `Whether user input is required on the ${componentName} before form submission.`,
|
|
62
64
|
defaultValueHint: false,
|
|
63
65
|
advanced: true,
|
|
64
|
-
hidden: hasParent
|
|
66
|
+
// hidden: hasParent,
|
|
67
|
+
hidden: () => true
|
|
68
|
+
// hiding required prop until the release of Aria Forms
|
|
65
69
|
};
|
|
66
70
|
}
|
|
67
71
|
function createAutoFocusProp(componentName) {
|
|
@@ -339,4 +343,4 @@ function getCommonProps(componentName, propNames) {
|
|
|
339
343
|
}
|
|
340
344
|
|
|
341
345
|
export { getCommonProps as g, hasParent as h, resolveAutoComplete as r };
|
|
342
|
-
//# sourceMappingURL=common-
|
|
346
|
+
//# sourceMappingURL=common-0c4336fe.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-0c4336fe.esm.js","sources":["../src/common.ts"],"sourcesContent":["import { PropType } from \"@plasmicapp/host\";\nimport {\n BaseControlContextData,\n HasControlContextData,\n isDefined,\n} from \"./utils\";\n\nexport function hasParent<T>(_props: T, ctx: ConditionalContext<T>): boolean {\n return isDefined(ctx?.parent) === true;\n}\n\nexport function isParentReadOnly<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isReadOnly === true;\n}\n\nexport function isParentDisabled<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isDisabled === true;\n}\n\nexport function resolveAutoComplete(autoCompleteProp?: string | string[]) {\n if (typeof autoCompleteProp === \"string\") {\n return autoCompleteProp;\n }\n if (\n !autoCompleteProp ||\n !Array.isArray(autoCompleteProp) ||\n autoCompleteProp.includes(\"off\")\n ) {\n return undefined;\n }\n if (autoCompleteProp.includes(\"off\")) {\n return \"off\";\n }\n if (autoCompleteProp.includes(\"on\") && autoCompleteProp.length === 1) {\n return \"on\";\n }\n return autoCompleteProp.filter((x) => x !== \"on\").join(\" \");\n}\n\ntype ConditionalContext<T> = T extends HasControlContextData\n ? BaseControlContextData | null\n : null;\n\nfunction createNameProp<T>(): PropType<T> {\n return {\n type: \"string\",\n description: \"Name for this field if it is part of a form\",\n displayName: \"Form field key\",\n // hidden: hasParent,\n hidden: () => true, // hiding required prop until the release of Aria Forms\n advanced: true,\n };\n}\n\nfunction createDisabledProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Disabled\",\n type: \"boolean\",\n description: `Whether the ${componentName} is read-only and unfocusable`,\n defaultValueHint: false,\n hidden: isParentDisabled,\n };\n}\n\nfunction createReadOnlyProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Read only\",\n type: \"boolean\",\n description: `Whether the value of this ${componentName} can be changed by the user. Unlike disabled, read-only does not prevent the user from interacting with the component (such as focus).`,\n defaultValueHint: false,\n advanced: true,\n hidden: isParentReadOnly,\n };\n}\n\nfunction createRequiredProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Required\",\n type: \"boolean\",\n description: `Whether user input is required on the ${componentName} before form submission.`,\n defaultValueHint: false,\n advanced: true,\n // hidden: hasParent,\n hidden: () => true, // hiding required prop until the release of Aria Forms\n };\n}\n\nfunction createAutoFocusProp<T>(componentName: string): PropType<T> {\n return {\n type: \"boolean\",\n description: `Whether the ${componentName} should be focused when rendered`,\n defaultValueHint: false,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createAriaLabelProp<T>(componentName: string): PropType<T> {\n return {\n type: \"string\",\n displayName: \"ARIA label\",\n description: `Label for this ${componentName}, if no visible label is used, to identify the element to assistive technology`,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createChildrenProp<T>(): PropType<T> {\n return {\n type: \"slot\",\n mergeWithParent: true,\n };\n}\n\nexport function getCommonProps<T>(\n componentName: string,\n propNames: (keyof T)[]\n) {\n const commonProps: Record<string, PropType<T>> = {\n name: createNameProp<T>(),\n disabled: createDisabledProp(componentName),\n isDisabled: createDisabledProp(componentName),\n readOnly: createReadOnlyProp(componentName),\n isReadOnly: createReadOnlyProp(componentName),\n autoFocus: createAutoFocusProp(componentName),\n \"aria-label\": createAriaLabelProp(componentName),\n required: createRequiredProp(componentName),\n isRequired: createRequiredProp(componentName),\n children: createChildrenProp(),\n // NOTE: The following props are only applicable to inputs, textareas, and text fields\n value: {\n type: \"string\",\n editOnly: true,\n displayName: \"Initial value\",\n uncontrolledProp: \"defaultValue\",\n description: `The default value of the ${componentName}`,\n hidden: hasParent,\n },\n maxLength: {\n type: \"number\",\n description: \"The maximum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n minLength: {\n type: \"number\",\n description: \"The minimum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), visit [Regexr](https://regexr.com/)\",\n validator: (value: string) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n advanced: true,\n hidden: hasParent,\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n description:\n \"The type of data that an input field is expected to handle. It influences the input's behavior, validation, and the kind of interface provided to the user.\",\n advanced: true,\n hidden: hasParent,\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n hidden: hasParent,\n },\n autoComplete: {\n type: \"choice\",\n advanced: true,\n multiSelect: true,\n hidden: hasParent,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"Learn more about the available options on the [MDN guide](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)\",\n options: [\n \"on\",\n \"off\",\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n advanced: true,\n hidden: hasParent,\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n hidden: hasParent,\n },\n onFocus: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBlur: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyDown: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyUp: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCopy: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCut: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onPaste: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionStart: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionEnd: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionUpdate: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onSelect: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBeforeInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n placeholder: {\n type: \"string\",\n },\n };\n\n // Filter the properties based on the provided fields array\n const filteredProps: Partial<Record<keyof T, PropType<T>>> = {};\n propNames.forEach((propName) => {\n if (Object.prototype.hasOwnProperty.call(commonProps, propName)) {\n filteredProps[propName] = commonProps[propName as string];\n }\n });\n\n return filteredProps;\n}\n"],"names":[],"mappings":";;AAOgB,SAAA,SAAA,CAAa,QAAW,GAAqC,EAAA;AAC3E,EAAO,OAAA,SAAA,CAAU,GAAK,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,MAAM,CAAM,KAAA,IAAA,CAAA;AACpC,CAAA;AAEgB,SAAA,gBAAA,CAAoB,QAAW,GAA4B,EAAA;AAX3E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CAAA;AAAA,MACvD,QAAU,EAAA,IAAA;AAAA,MACV,MAAQ,EAAA,SAAA;AAAA,KACV;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA,cAAA;AAAA,MACN,UAAU,CAAC,EAAE,MAAM,gBAAkB,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,MACrD,QAAU,EAAA,IAAA;AAAA,MACV,MAAQ,EAAA,SAAA;AAAA,KACV;AAAA,IACA,aAAe,EAAA;AAAA,MACb,IAAM,EAAA,cAAA;AAAA,MACN,UAAU,CAAC,EAAE,MAAM,YAAc,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,MACjD,QAAU,EAAA,IAAA;AAAA,MACV,MAAQ,EAAA,SAAA;AAAA,KACV;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,cAAA;AAAA,MACN,UAAU,CAAC,EAAE,MAAM,YAAc,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,MACjD,QAAU,EAAA,IAAA;AAAA,MACV,MAAQ,EAAA,SAAA;AAAA,KACV;AAAA,IACA,WAAa,EAAA;AAAA,MACX,IAAM,EAAA,QAAA;AAAA,KACR;AAAA,GACF,CAAA;AAGA,EAAA,MAAM,gBAAuD,EAAC,CAAA;AAC9D,EAAU,SAAA,CAAA,OAAA,CAAQ,CAAC,QAAa,KAAA;AAC9B,IAAA,IAAI,OAAO,SAAU,CAAA,cAAA,CAAe,IAAK,CAAA,WAAA,EAAa,QAAQ,CAAG,EAAA;AAC/D,MAAc,aAAA,CAAA,QAAQ,CAAI,GAAA,WAAA,CAAY,QAAkB,CAAA,CAAA;AAAA,KAC1D;AAAA,GACD,CAAA,CAAA;AAED,EAAO,OAAA,aAAA,CAAA;AACT;;;;"}
|
|
@@ -33,7 +33,9 @@ function createNameProp() {
|
|
|
33
33
|
type: "string",
|
|
34
34
|
description: "Name for this field if it is part of a form",
|
|
35
35
|
displayName: "Form field key",
|
|
36
|
-
hidden: hasParent,
|
|
36
|
+
// hidden: hasParent,
|
|
37
|
+
hidden: () => true,
|
|
38
|
+
// hiding required prop until the release of Aria Forms
|
|
37
39
|
advanced: true
|
|
38
40
|
};
|
|
39
41
|
}
|
|
@@ -63,7 +65,9 @@ function createRequiredProp(componentName) {
|
|
|
63
65
|
description: `Whether user input is required on the ${componentName} before form submission.`,
|
|
64
66
|
defaultValueHint: false,
|
|
65
67
|
advanced: true,
|
|
66
|
-
hidden: hasParent
|
|
68
|
+
// hidden: hasParent,
|
|
69
|
+
hidden: () => true
|
|
70
|
+
// hiding required prop until the release of Aria Forms
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
function createAutoFocusProp(componentName) {
|
|
@@ -343,4 +347,4 @@ function getCommonProps(componentName, propNames) {
|
|
|
343
347
|
exports.getCommonProps = getCommonProps;
|
|
344
348
|
exports.hasParent = hasParent;
|
|
345
349
|
exports.resolveAutoComplete = resolveAutoComplete;
|
|
346
|
-
//# sourceMappingURL=common-
|
|
350
|
+
//# sourceMappingURL=common-2e984ab4.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-2e984ab4.cjs.js","sources":["../src/common.ts"],"sourcesContent":["import { PropType } from \"@plasmicapp/host\";\nimport {\n BaseControlContextData,\n HasControlContextData,\n isDefined,\n} from \"./utils\";\n\nexport function hasParent<T>(_props: T, ctx: ConditionalContext<T>): boolean {\n return isDefined(ctx?.parent) === true;\n}\n\nexport function isParentReadOnly<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isReadOnly === true;\n}\n\nexport function isParentDisabled<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isDisabled === true;\n}\n\nexport function resolveAutoComplete(autoCompleteProp?: string | string[]) {\n if (typeof autoCompleteProp === \"string\") {\n return autoCompleteProp;\n }\n if (\n !autoCompleteProp ||\n !Array.isArray(autoCompleteProp) ||\n autoCompleteProp.includes(\"off\")\n ) {\n return undefined;\n }\n if (autoCompleteProp.includes(\"off\")) {\n return \"off\";\n }\n if (autoCompleteProp.includes(\"on\") && autoCompleteProp.length === 1) {\n return \"on\";\n }\n return autoCompleteProp.filter((x) => x !== \"on\").join(\" \");\n}\n\ntype ConditionalContext<T> = T extends HasControlContextData\n ? BaseControlContextData | null\n : null;\n\nfunction createNameProp<T>(): PropType<T> {\n return {\n type: \"string\",\n description: \"Name for this field if it is part of a form\",\n displayName: \"Form field key\",\n // hidden: hasParent,\n hidden: () => true, // hiding required prop until the release of Aria Forms\n advanced: true,\n };\n}\n\nfunction createDisabledProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Disabled\",\n type: \"boolean\",\n description: `Whether the ${componentName} is read-only and unfocusable`,\n defaultValueHint: false,\n hidden: isParentDisabled,\n };\n}\n\nfunction createReadOnlyProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Read only\",\n type: \"boolean\",\n description: `Whether the value of this ${componentName} can be changed by the user. Unlike disabled, read-only does not prevent the user from interacting with the component (such as focus).`,\n defaultValueHint: false,\n advanced: true,\n hidden: isParentReadOnly,\n };\n}\n\nfunction createRequiredProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Required\",\n type: \"boolean\",\n description: `Whether user input is required on the ${componentName} before form submission.`,\n defaultValueHint: false,\n advanced: true,\n // hidden: hasParent,\n hidden: () => true, // hiding required prop until the release of Aria Forms\n };\n}\n\nfunction createAutoFocusProp<T>(componentName: string): PropType<T> {\n return {\n type: \"boolean\",\n description: `Whether the ${componentName} should be focused when rendered`,\n defaultValueHint: false,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createAriaLabelProp<T>(componentName: string): PropType<T> {\n return {\n type: \"string\",\n displayName: \"ARIA label\",\n description: `Label for this ${componentName}, if no visible label is used, to identify the element to assistive technology`,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createChildrenProp<T>(): PropType<T> {\n return {\n type: \"slot\",\n mergeWithParent: true,\n };\n}\n\nexport function getCommonProps<T>(\n componentName: string,\n propNames: (keyof T)[]\n) {\n const commonProps: Record<string, PropType<T>> = {\n name: createNameProp<T>(),\n disabled: createDisabledProp(componentName),\n isDisabled: createDisabledProp(componentName),\n readOnly: createReadOnlyProp(componentName),\n isReadOnly: createReadOnlyProp(componentName),\n autoFocus: createAutoFocusProp(componentName),\n \"aria-label\": createAriaLabelProp(componentName),\n required: createRequiredProp(componentName),\n isRequired: createRequiredProp(componentName),\n children: createChildrenProp(),\n // NOTE: The following props are only applicable to inputs, textareas, and text fields\n value: {\n type: \"string\",\n editOnly: true,\n displayName: \"Initial value\",\n uncontrolledProp: \"defaultValue\",\n description: `The default value of the ${componentName}`,\n hidden: hasParent,\n },\n maxLength: {\n type: \"number\",\n description: \"The maximum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n minLength: {\n type: \"number\",\n description: \"The minimum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), visit [Regexr](https://regexr.com/)\",\n validator: (value: string) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n advanced: true,\n hidden: hasParent,\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n description:\n \"The type of data that an input field is expected to handle. It influences the input's behavior, validation, and the kind of interface provided to the user.\",\n advanced: true,\n hidden: hasParent,\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n hidden: hasParent,\n },\n autoComplete: {\n type: \"choice\",\n advanced: true,\n multiSelect: true,\n hidden: hasParent,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"Learn more about the available options on the [MDN guide](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)\",\n options: [\n \"on\",\n \"off\",\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n advanced: true,\n hidden: hasParent,\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n hidden: hasParent,\n },\n onFocus: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBlur: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyDown: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyUp: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCopy: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCut: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onPaste: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionStart: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionEnd: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionUpdate: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onSelect: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBeforeInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n placeholder: {\n type: \"string\",\n },\n };\n\n // Filter the properties based on the provided fields array\n const filteredProps: Partial<Record<keyof T, PropType<T>>> = {};\n propNames.forEach((propName) => {\n if (Object.prototype.hasOwnProperty.call(commonProps, propName)) {\n filteredProps[propName] = commonProps[propName as string];\n }\n });\n\n return filteredProps;\n}\n"],"names":["isDefined"],"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,CAAA;AAAA,KAC1D;AAAA,GACD,CAAA,CAAA;AAED,EAAO,OAAA,aAAA,CAAA;AACT;;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
7
7
|
var variantUtils = require('./variant-utils-db5b9590.cjs.js');
|
|
8
8
|
require('@plasmicapp/host/registerComponent');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { a as makeComponentName, r as registerComponentHelper } from './utils-c7662a47.esm.js';
|
|
5
5
|
import { p as pickAriaComponentVariants } from './variant-utils-23360776.esm.js';
|
|
6
6
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
7
7
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
8
8
|
var variantUtils = require('./variant-utils-db5b9590.cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Checkbox } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps, h as hasParent } from './common-
|
|
3
|
+
import { g as getCommonProps, h as hasParent } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { P as PlasmicCheckboxGroupContext } from './contexts-081d65a0.esm.js';
|
|
5
5
|
import { r as registerComponentHelper, a as makeComponentName } from './utils-c7662a47.esm.js';
|
|
6
6
|
import { p as pickAriaComponentVariants } from './variant-utils-23360776.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
7
7
|
var registerCheckbox = require('./registerCheckbox.cjs.js');
|
|
8
8
|
var registerDescription = require('./registerDescription.cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckboxGroup } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { P as PlasmicCheckboxGroupContext } from './contexts-081d65a0.esm.js';
|
|
5
5
|
import { registerCheckbox, makeDefaultCheckboxChildren } from './registerCheckbox.esm.js';
|
|
6
6
|
import { DESCRIPTION_COMPONENT_NAME } from './registerDescription.esm.js';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
7
|
-
var registerListBox = require('./registerListBox-
|
|
7
|
+
var registerListBox = require('./registerListBox-4761c48d.cjs.js');
|
|
8
8
|
var registerButton = require('./registerButton.cjs.js');
|
|
9
9
|
var registerInput = require('./registerInput.cjs.js');
|
|
10
10
|
var registerLabel = require('./registerLabel.cjs.js');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo, useEffect } from 'react';
|
|
2
2
|
import { ComboBox } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { a as PlasmicPopoverContext, b as PlasmicListBoxContext, c as PlasmicInputContext } from './contexts-081d65a0.esm.js';
|
|
5
|
-
import { L as ListBoxItemIdManager, a as LIST_BOX_COMPONENT_NAME } from './registerListBox-
|
|
5
|
+
import { L as ListBoxItemIdManager, a as LIST_BOX_COMPONENT_NAME } from './registerListBox-8c096263.esm.js';
|
|
6
6
|
import { BUTTON_COMPONENT_NAME } from './registerButton.esm.js';
|
|
7
7
|
import { INPUT_COMPONENT_NAME } from './registerInput.esm.js';
|
|
8
8
|
import { LABEL_COMPONENT_NAME } from './registerLabel.esm.js';
|
|
@@ -6,7 +6,7 @@ var contexts = require('./contexts-baa37b74.cjs.js');
|
|
|
6
6
|
var registerButton = require('./registerButton.cjs.js');
|
|
7
7
|
var registerModal = require('./registerModal.cjs.js');
|
|
8
8
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
9
|
-
require('./common-
|
|
9
|
+
require('./common-2e984ab4.cjs.js');
|
|
10
10
|
require('./variant-utils-db5b9590.cjs.js');
|
|
11
11
|
require('@plasmicapp/host');
|
|
12
12
|
require('react-aria');
|
|
@@ -4,7 +4,7 @@ import { d as PlasmicDialogTriggerContext } from './contexts-081d65a0.esm.js';
|
|
|
4
4
|
import { BUTTON_COMPONENT_NAME } from './registerButton.esm.js';
|
|
5
5
|
import { MODAL_COMPONENT_NAME } from './registerModal.esm.js';
|
|
6
6
|
import { r as registerComponentHelper, a as makeComponentName } from './utils-c7662a47.esm.js';
|
|
7
|
-
import './common-
|
|
7
|
+
import './common-0c4336fe.esm.js';
|
|
8
8
|
import './variant-utils-23360776.esm.js';
|
|
9
9
|
import '@plasmicapp/host';
|
|
10
10
|
import 'react-aria';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAria = require('react-aria');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var common = require('./common-
|
|
6
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
8
8
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
9
9
|
var variantUtils = require('./variant-utils-db5b9590.cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { mergeProps } from 'react-aria';
|
|
3
3
|
import { Input } from 'react-aria-components';
|
|
4
|
-
import { r as resolveAutoComplete, g as getCommonProps } from './common-
|
|
4
|
+
import { r as resolveAutoComplete, g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
5
5
|
import { g as PlasmicTextFieldContext, c as PlasmicInputContext } from './contexts-081d65a0.esm.js';
|
|
6
6
|
import { a as makeComponentName, r as registerComponentHelper } from './utils-c7662a47.esm.js';
|
|
7
7
|
import { p as pickAriaComponentVariants } from './variant-utils-23360776.esm.js';
|
|
@@ -125,11 +125,12 @@ function BaseListBox(props) {
|
|
|
125
125
|
[]
|
|
126
126
|
);
|
|
127
127
|
React.useEffect(() => {
|
|
128
|
+
console.log("sarah useEffect", { setControlContextData, ids });
|
|
128
129
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
129
130
|
itemIds: ids,
|
|
130
131
|
isStandalone
|
|
131
132
|
});
|
|
132
|
-
}, [ids, isStandalone]);
|
|
133
|
+
}, [ids, isStandalone, setControlContextData]);
|
|
133
134
|
React.useEffect(() => {
|
|
134
135
|
idManager.subscribe((_ids) => {
|
|
135
136
|
setIds(_ids);
|
|
@@ -329,4 +330,4 @@ exports.LIST_BOX_COMPONENT_NAME = LIST_BOX_COMPONENT_NAME;
|
|
|
329
330
|
exports.ListBoxItemIdManager = ListBoxItemIdManager;
|
|
330
331
|
exports.listboxHelpers = listboxHelpers;
|
|
331
332
|
exports.registerListBox = registerListBox;
|
|
332
|
-
//# sourceMappingURL=registerListBox-
|
|
333
|
+
//# sourceMappingURL=registerListBox-4761c48d.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerListBox-4761c48d.cjs.js","sources":["../src/ListBoxItemIdManager.ts","../src/registerListBox.tsx"],"sourcesContent":["type Observer = (ids: string[]) => void;\n\nexport class ListBoxItemIdManager {\n private readonly _ids: Set<string> = new Set();\n private readonly _observers: Set<Observer> = new Set();\n\n private generateDuplicateId(id: string, count = 1): string {\n const dupId = `${id} duplicate(${count})`;\n if (this._ids.has(dupId)) {\n return this.generateDuplicateId(id, count + 1);\n } else {\n return dupId;\n }\n }\n\n private generateMissingId(count = 1): string {\n const missingId = `missing(${count})`;\n if (this._ids.has(missingId)) {\n return this.generateMissingId(count + 1);\n } else {\n return missingId;\n }\n }\n\n register(id?: unknown): string {\n const idStr = id === undefined ? undefined : String(id).trim();\n let newId: string;\n\n if (!idStr) {\n // No id is provided, so generate one\n newId = this.generateMissingId();\n } else if (this._ids.has(idStr)) {\n // The provided id is already registered with another uuid (i.e. it's not unique), so just generate a new one\n newId = this.generateDuplicateId(idStr);\n } else {\n // The provided id is not already registered, so use it\n newId = idStr;\n }\n\n this._ids.add(newId);\n this.notify();\n return newId;\n }\n\n unregister(id: string) {\n this._ids.delete(id);\n this.notify();\n }\n\n subscribe(observer: Observer) {\n this._observers.add(observer);\n }\n\n // Notify all observers about an event.\n notify() {\n this._observers.forEach((observer) => observer(this.ids));\n }\n\n get ids(): string[] {\n return Array.from(this._ids);\n }\n}\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport { Key, ListBox } from \"react-aria-components\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { ListBoxItemIdManager } from \"./ListBoxItemIdManager\";\nimport {\n makeDefaultListBoxItemChildren,\n registerListBoxItem,\n} from \"./registerListBoxItem\";\nimport { registerSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n HasControlContextData,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxControlContextData {\n itemIds: string[];\n isStandalone: boolean;\n}\n\nexport interface BaseListBoxProps\n extends Omit<\n React.ComponentProps<typeof ListBox>,\n \"selectedKeys\" | \"defaultSelectedKeys\"\n >,\n HasControlContextData<BaseListBoxControlContextData> {\n children?: React.ReactNode;\n selectedKeys?: string | string[] | undefined;\n defaultSelectedKeys?: string | string[] | undefined;\n}\n\nexport const listboxHelpers = {\n states: {\n selectedKey: {\n onChangeArgsToValue: (value: Set<Key> | string[] | string) => {\n // only single selection is supported\n return Array.from(value)[0];\n },\n },\n },\n};\n\nfunction normalizeSelectedKeys(selectedKeys: string | string[] | undefined) {\n // Listbox expects it to be of type \"all\" | Iterable\n return typeof selectedKeys === \"string\" && selectedKeys !== \"all\"\n ? [selectedKeys]\n : selectedKeys;\n}\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const {\n setControlContextData: setControlContextData,\n children,\n selectedKeys,\n defaultSelectedKeys,\n ...rest\n } = props;\n const context = React.useContext(PlasmicListBoxContext);\n const isStandalone = !context;\n const [ids, setIds] = useState<string[]>([]);\n\n const idManager = useMemo(\n () => context?.idManager ?? new ListBoxItemIdManager(),\n []\n );\n\n useEffect(() => {\n console.log(\"sarah useEffect\", { setControlContextData, ids });\n setControlContextData?.({\n itemIds: ids,\n isStandalone,\n });\n }, [ids, isStandalone, setControlContextData]);\n\n useEffect(() => {\n idManager.subscribe((_ids: string[]) => {\n setIds(_ids);\n });\n }, []);\n\n const listbox = (\n <ListBox\n selectedKeys={normalizeSelectedKeys(selectedKeys)}\n defaultSelectedKeys={normalizeSelectedKeys(defaultSelectedKeys)}\n {...rest}\n >\n {children}\n </ListBox>\n );\n\n if (isStandalone) {\n return (\n <PlasmicListBoxContext.Provider\n value={{\n idManager,\n }}\n >\n {listbox}\n </PlasmicListBoxContext.Provider>\n );\n }\n\n return listbox;\n}\n\nexport const LIST_BOX_COMPONENT_NAME = makeComponentName(\"listbox\");\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n const listBoxItemMeta = registerListBoxItem(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n });\n const sectionMeta = registerSection(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n props: {\n items: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-1\",\n textValue: \"Section1-Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-2\",\n textValue: \"Section1-Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-3\",\n textValue: \"Section1-Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n ],\n },\n },\n });\n\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: LIST_BOX_COMPONENT_NAME,\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n defaultStyles: {\n width: \"250px\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n props: {\n children: {\n type: \"slot\",\n displayName: \"List Items\",\n allowedComponents: [listBoxItemMeta.name, sectionMeta.name],\n allowRootWrapper: true,\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"1\",\n textValue: \"Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"2\",\n textValue: \"Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"3\",\n textValue: \"Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: sectionMeta.name,\n },\n ],\n },\n selectionMode: {\n type: \"choice\",\n description: \"The selection mode of the listbox\",\n options: [\"none\", \"single\"],\n defaultValue: \"none\",\n hidden: (_props, ctx) => !ctx?.isStandalone,\n },\n selectedKeys: {\n type: \"choice\",\n description: \"The selected keys of the listbox\",\n editOnly: true,\n uncontrolledProp: \"defaultSelectedKeys\",\n displayName: \"Initial selected key\",\n options: (_props, ctx) =>\n ctx?.itemIds ? Array.from(ctx.itemIds) : [],\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n // We do not support multiple selections yet (Because React Aria select and combobox only support single selections).\n multiSelect: false,\n },\n onSelectionChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"itemIds\", type: \"object\" }],\n },\n },\n states: {\n selectedKey: {\n type: \"writable\",\n valueProp: \"selectedKeys\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"text\",\n ...listboxHelpers.states.selectedKey,\n },\n },\n componentHelpers: {\n helpers: listboxHelpers,\n importName: \"listboxHelpers\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","PlasmicListBoxContext","useState","useMemo","_a","useEffect","ListBox","makeComponentName","registerListBoxItem","registerSection","makeDefaultListBoxItemChildren","registerComponentHelper"],"mappings":";;;;;;;;;;;;;AAEO,MAAM,oBAAqB,CAAA;AAAA,EAA3B,WAAA,GAAA;AACL,IAAiB,IAAA,CAAA,IAAA,uBAAwB,GAAI,EAAA,CAAA;AAC7C,IAAiB,IAAA,CAAA,UAAA,uBAAgC,GAAI,EAAA,CAAA;AAAA,GAAA;AAAA,EA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gBAAkB,EAAA,qBAAA;AAAA,UAClB,WAAa,EAAA,sBAAA;AAAA,UACb,OAAA,EAAS,CAAC,MAAA,EAAQ,GAChB,KAAA,CAAA,GAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAK,OAAU,IAAA,KAAA,CAAM,IAAK,CAAA,GAAA,CAAI,OAAO,CAAA,GAAI,EAAC;AAAA,UAC5C,MAAA,EAAQ,CAAC,KAAO,EAAA,GAAA,KACd,EAAC,GAAK,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,YAAA,CAAA,IAAgB,MAAM,aAAkB,KAAA,MAAA;AAAA;AAAA,UAEhD,WAAa,EAAA,KAAA;AAAA,SACf;AAAA,QACA,iBAAmB,EAAA;AAAA,UACjB,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,SAAW,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,SAChD;AAAA,OACF;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,WAAa,EAAA,cAAA,CAAA;AAAA,UACX,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,cAAA;AAAA,UACX,YAAc,EAAA,mBAAA;AAAA,UACd,YAAc,EAAA,MAAA;AAAA,SAAA,EACX,eAAe,MAAO,CAAA,WAAA,CAAA;AAAA,OAE7B;AAAA,MACA,gBAAkB,EAAA;AAAA,QAChB,OAAS,EAAA,cAAA;AAAA,QACT,UAAY,EAAA,gBAAA;AAAA,QACZ,UAAY,EAAA,gDAAA;AAAA,OACd;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;;;;"}
|
|
@@ -119,11 +119,12 @@ function BaseListBox(props) {
|
|
|
119
119
|
[]
|
|
120
120
|
);
|
|
121
121
|
useEffect(() => {
|
|
122
|
+
console.log("sarah useEffect", { setControlContextData, ids });
|
|
122
123
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
123
124
|
itemIds: ids,
|
|
124
125
|
isStandalone
|
|
125
126
|
});
|
|
126
|
-
}, [ids, isStandalone]);
|
|
127
|
+
}, [ids, isStandalone, setControlContextData]);
|
|
127
128
|
useEffect(() => {
|
|
128
129
|
idManager.subscribe((_ids) => {
|
|
129
130
|
setIds(_ids);
|
|
@@ -319,4 +320,4 @@ function registerListBox(loader, overrides) {
|
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
export { BaseListBox as B, ListBoxItemIdManager as L, LIST_BOX_COMPONENT_NAME as a, listboxHelpers as l, registerListBox as r };
|
|
322
|
-
//# sourceMappingURL=registerListBox-
|
|
323
|
+
//# sourceMappingURL=registerListBox-8c096263.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerListBox-8c096263.esm.js","sources":["../src/ListBoxItemIdManager.ts","../src/registerListBox.tsx"],"sourcesContent":["type Observer = (ids: string[]) => void;\n\nexport class ListBoxItemIdManager {\n private readonly _ids: Set<string> = new Set();\n private readonly _observers: Set<Observer> = new Set();\n\n private generateDuplicateId(id: string, count = 1): string {\n const dupId = `${id} duplicate(${count})`;\n if (this._ids.has(dupId)) {\n return this.generateDuplicateId(id, count + 1);\n } else {\n return dupId;\n }\n }\n\n private generateMissingId(count = 1): string {\n const missingId = `missing(${count})`;\n if (this._ids.has(missingId)) {\n return this.generateMissingId(count + 1);\n } else {\n return missingId;\n }\n }\n\n register(id?: unknown): string {\n const idStr = id === undefined ? undefined : String(id).trim();\n let newId: string;\n\n if (!idStr) {\n // No id is provided, so generate one\n newId = this.generateMissingId();\n } else if (this._ids.has(idStr)) {\n // The provided id is already registered with another uuid (i.e. it's not unique), so just generate a new one\n newId = this.generateDuplicateId(idStr);\n } else {\n // The provided id is not already registered, so use it\n newId = idStr;\n }\n\n this._ids.add(newId);\n this.notify();\n return newId;\n }\n\n unregister(id: string) {\n this._ids.delete(id);\n this.notify();\n }\n\n subscribe(observer: Observer) {\n this._observers.add(observer);\n }\n\n // Notify all observers about an event.\n notify() {\n this._observers.forEach((observer) => observer(this.ids));\n }\n\n get ids(): string[] {\n return Array.from(this._ids);\n }\n}\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport { Key, ListBox } from \"react-aria-components\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { ListBoxItemIdManager } from \"./ListBoxItemIdManager\";\nimport {\n makeDefaultListBoxItemChildren,\n registerListBoxItem,\n} from \"./registerListBoxItem\";\nimport { registerSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n HasControlContextData,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxControlContextData {\n itemIds: string[];\n isStandalone: boolean;\n}\n\nexport interface BaseListBoxProps\n extends Omit<\n React.ComponentProps<typeof ListBox>,\n \"selectedKeys\" | \"defaultSelectedKeys\"\n >,\n HasControlContextData<BaseListBoxControlContextData> {\n children?: React.ReactNode;\n selectedKeys?: string | string[] | undefined;\n defaultSelectedKeys?: string | string[] | undefined;\n}\n\nexport const listboxHelpers = {\n states: {\n selectedKey: {\n onChangeArgsToValue: (value: Set<Key> | string[] | string) => {\n // only single selection is supported\n return Array.from(value)[0];\n },\n },\n },\n};\n\nfunction normalizeSelectedKeys(selectedKeys: string | string[] | undefined) {\n // Listbox expects it to be of type \"all\" | Iterable\n return typeof selectedKeys === \"string\" && selectedKeys !== \"all\"\n ? [selectedKeys]\n : selectedKeys;\n}\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const {\n setControlContextData: setControlContextData,\n children,\n selectedKeys,\n defaultSelectedKeys,\n ...rest\n } = props;\n const context = React.useContext(PlasmicListBoxContext);\n const isStandalone = !context;\n const [ids, setIds] = useState<string[]>([]);\n\n const idManager = useMemo(\n () => context?.idManager ?? new ListBoxItemIdManager(),\n []\n );\n\n useEffect(() => {\n console.log(\"sarah useEffect\", { setControlContextData, ids });\n setControlContextData?.({\n itemIds: ids,\n isStandalone,\n });\n }, [ids, isStandalone, setControlContextData]);\n\n useEffect(() => {\n idManager.subscribe((_ids: string[]) => {\n setIds(_ids);\n });\n }, []);\n\n const listbox = (\n <ListBox\n selectedKeys={normalizeSelectedKeys(selectedKeys)}\n defaultSelectedKeys={normalizeSelectedKeys(defaultSelectedKeys)}\n {...rest}\n >\n {children}\n </ListBox>\n );\n\n if (isStandalone) {\n return (\n <PlasmicListBoxContext.Provider\n value={{\n idManager,\n }}\n >\n {listbox}\n </PlasmicListBoxContext.Provider>\n );\n }\n\n return listbox;\n}\n\nexport const LIST_BOX_COMPONENT_NAME = makeComponentName(\"listbox\");\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n const listBoxItemMeta = registerListBoxItem(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n });\n const sectionMeta = registerSection(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n props: {\n items: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-1\",\n textValue: \"Section1-Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-2\",\n textValue: \"Section1-Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-3\",\n textValue: \"Section1-Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n ],\n },\n },\n });\n\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: LIST_BOX_COMPONENT_NAME,\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n defaultStyles: {\n width: \"250px\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n props: {\n children: {\n type: \"slot\",\n displayName: \"List Items\",\n allowedComponents: [listBoxItemMeta.name, sectionMeta.name],\n allowRootWrapper: true,\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"1\",\n textValue: \"Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"2\",\n textValue: \"Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"3\",\n textValue: \"Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: sectionMeta.name,\n },\n ],\n },\n selectionMode: {\n type: \"choice\",\n description: \"The selection mode of the listbox\",\n options: [\"none\", \"single\"],\n defaultValue: \"none\",\n hidden: (_props, ctx) => !ctx?.isStandalone,\n },\n selectedKeys: {\n type: \"choice\",\n description: \"The selected keys of the listbox\",\n editOnly: true,\n uncontrolledProp: \"defaultSelectedKeys\",\n displayName: \"Initial selected key\",\n options: (_props, ctx) =>\n ctx?.itemIds ? Array.from(ctx.itemIds) : [],\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n // We do not support multiple selections yet (Because React Aria select and combobox only support single selections).\n multiSelect: false,\n },\n onSelectionChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"itemIds\", type: \"object\" }],\n },\n },\n states: {\n selectedKey: {\n type: \"writable\",\n valueProp: \"selectedKeys\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"text\",\n ...listboxHelpers.states.selectedKey,\n },\n },\n componentHelpers: {\n helpers: listboxHelpers,\n importName: \"listboxHelpers\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["_a"],"mappings":";;;;;;;AAEO,MAAM,oBAAqB,CAAA;AAAA,EAA3B,WAAA,GAAA;AACL,IAAiB,IAAA,CAAA,IAAA,uBAAwB,GAAI,EAAA,CAAA;AAC7C,IAAiB,IAAA,CAAA,UAAA,uBAAgC,GAAI,EAAA,CAAA;AAAA,GAAA;AAAA,EAE7C,mBAAA,CAAoB,EAAY,EAAA,KAAA,GAAQ,CAAW,EAAA;AACzD,IAAM,MAAA,KAAA,GAAQ,GAAG,EAAgB,CAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACjC,IAAA,IAAI,IAAK,CAAA,IAAA,CAAK,GAAI,CAAA,KAAK,CAAG,EAAA;AACxB,MAAA,OAAO,IAAK,CAAA,mBAAA,CAAoB,EAAI,EAAA,KAAA,GAAQ,CAAC,CAAA,CAAA;AAAA,KACxC,MAAA;AACL,MAAO,OAAA,KAAA,CAAA;AAAA,KACT;AAAA,GACF;AAAA,EAEQ,iBAAA,CAAkB,QAAQ,CAAW,EAAA;AAC3C,IAAA,MAAM,YAAY,CAAW,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AAC7B,IAAA,IAAI,IAAK,CAAA,IAAA,CAAK,GAAI,CAAA,SAAS,CAAG,EAAA;AAC5B,MAAO,OAAA,IAAA,CAAK,iBAAkB,CAAA,KAAA,GAAQ,CAAC,CAAA,CAAA;AAAA,KAClC,MAAA;AACL,MAAO,OAAA,SAAA,CAAA;AAAA,KACT;AAAA,GACF;AAAA,EAEA,SAAS,EAAsB,EAAA;AAC7B,IAAA,MAAM,QAAQ,EAAO,KAAA,KAAA,CAAA,GAAY,SAAY,MAAO,CAAA,EAAE,EAAE,IAAK,EAAA,CAAA;AAC7D,IAAI,IAAA,KAAA,CAAA;AAEJ,IAAA,I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ACZ,UAAY,EAAA,gDAAA;AAAA,OACd;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require('react');
|
|
4
4
|
require('react-aria-components');
|
|
5
5
|
require('./contexts-baa37b74.cjs.js');
|
|
6
|
-
var registerListBox = require('./registerListBox-
|
|
6
|
+
var registerListBox = require('./registerListBox-4761c48d.cjs.js');
|
|
7
7
|
require('./registerListBoxItem.cjs.js');
|
|
8
8
|
require('./registerSection.cjs.js');
|
|
9
9
|
require('./utils-8dbb4d1f.cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'react-aria-components';
|
|
3
3
|
import './contexts-081d65a0.esm.js';
|
|
4
|
-
export { B as BaseListBox, a as LIST_BOX_COMPONENT_NAME, l as listboxHelpers, r as registerListBox } from './registerListBox-
|
|
4
|
+
export { B as BaseListBox, a as LIST_BOX_COMPONENT_NAME, l as listboxHelpers, r as registerListBox } from './registerListBox-8c096263.esm.js';
|
|
5
5
|
import './registerListBoxItem.esm.js';
|
|
6
6
|
import './registerSection.esm.js';
|
|
7
7
|
import './utils-c7662a47.esm.js';
|
|
@@ -4,7 +4,7 @@ var host = require('@plasmicapp/host');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAria = require('react-aria');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var common = require('./common-
|
|
7
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
8
8
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
9
9
|
var registerHeading = require('./registerHeading.cjs.js');
|
|
10
10
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
@@ -2,7 +2,7 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
3
3
|
import { mergeProps } from 'react-aria';
|
|
4
4
|
import { ModalOverlay, Modal, Dialog } from 'react-aria-components';
|
|
5
|
-
import { h as hasParent } from './common-
|
|
5
|
+
import { h as hasParent } from './common-0c4336fe.esm.js';
|
|
6
6
|
import { d as PlasmicDialogTriggerContext } from './contexts-081d65a0.esm.js';
|
|
7
7
|
import { HEADING_COMPONENT_NAME } from './registerHeading.esm.js';
|
|
8
8
|
import { a as makeComponentName, r as registerComponentHelper } from './utils-c7662a47.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
7
7
|
var registerLabel = require('./registerLabel.cjs.js');
|
|
8
8
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Radio, RadioGroup } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { e as PlasmicRadioGroupContext } from './contexts-081d65a0.esm.js';
|
|
5
5
|
import { LABEL_COMPONENT_NAME } from './registerLabel.esm.js';
|
|
6
6
|
import { r as registerComponentHelper, a as makeComponentName } from './utils-c7662a47.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
7
7
|
var registerDescription = require('./registerDescription.cjs.js');
|
|
8
8
|
var registerFieldError = require('./registerFieldError.cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioGroup } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { e as PlasmicRadioGroupContext } from './contexts-081d65a0.esm.js';
|
|
5
5
|
import { DESCRIPTION_COMPONENT_NAME } from './registerDescription.esm.js';
|
|
6
6
|
import { registerFieldError } from './registerFieldError.esm.js';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var host = require('@plasmicapp/host');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var common = require('./common-
|
|
6
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
8
|
-
var registerListBox = require('./registerListBox-
|
|
8
|
+
var registerListBox = require('./registerListBox-4761c48d.cjs.js');
|
|
9
9
|
var registerButton = require('./registerButton.cjs.js');
|
|
10
10
|
var registerLabel = require('./registerLabel.cjs.js');
|
|
11
11
|
var registerPopover = require('./registerPopover.cjs.js');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
2
2
|
import React, { useMemo, useEffect } from 'react';
|
|
3
3
|
import { SelectValue, Select } from 'react-aria-components';
|
|
4
|
-
import { g as getCommonProps } from './common-
|
|
4
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
5
5
|
import { a as PlasmicPopoverContext, b as PlasmicListBoxContext } from './contexts-081d65a0.esm.js';
|
|
6
|
-
import { L as ListBoxItemIdManager, a as LIST_BOX_COMPONENT_NAME } from './registerListBox-
|
|
6
|
+
import { L as ListBoxItemIdManager, a as LIST_BOX_COMPONENT_NAME } from './registerListBox-8c096263.esm.js';
|
|
7
7
|
import { BUTTON_COMPONENT_NAME } from './registerButton.esm.js';
|
|
8
8
|
import { LABEL_COMPONENT_NAME } from './registerLabel.esm.js';
|
|
9
9
|
import { POPOVER_COMPONENT_NAME } from './registerPopover.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
7
7
|
var registerLabel = require('./registerLabel.cjs.js');
|
|
8
8
|
var registerSliderOutput = require('./registerSliderOutput.cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Slider } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { f as PlasmicSliderContext } from './contexts-081d65a0.esm.js';
|
|
5
5
|
import { LABEL_COMPONENT_NAME } from './registerLabel.esm.js';
|
|
6
6
|
import { registerSliderOutput } from './registerSliderOutput.esm.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAria = require('react-aria');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var common = require('./common-
|
|
6
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-baa37b74.cjs.js');
|
|
8
8
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
9
9
|
var variantUtils = require('./variant-utils-db5b9590.cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { mergeProps } from 'react-aria';
|
|
3
3
|
import { SliderThumb, Slider, SliderTrack } from 'react-aria-components';
|
|
4
|
-
import { g as getCommonProps } from './common-
|
|
4
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
5
5
|
import { f as PlasmicSliderContext } from './contexts-081d65a0.esm.js';
|
|
6
6
|
import { a as makeComponentName, r as registerComponentHelper } from './utils-c7662a47.esm.js';
|
|
7
7
|
import { p as pickAriaComponentVariants } from './variant-utils-23360776.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-2e984ab4.cjs.js');
|
|
6
6
|
var registerDescription = require('./registerDescription.cjs.js');
|
|
7
7
|
var registerLabel = require('./registerLabel.cjs.js');
|
|
8
8
|
var utils = require('./utils-8dbb4d1f.cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Switch } from 'react-aria-components';
|
|
3
|
-
import { g as getCommonProps } from './common-
|
|
3
|
+
import { g as getCommonProps } from './common-0c4336fe.esm.js';
|
|
4
4
|
import { DESCRIPTION_COMPONENT_NAME } from './registerDescription.esm.js';
|
|
5
5
|
import { LABEL_COMPONENT_NAME } from './registerLabel.esm.js';
|
|
6
6
|
import { r as registerComponentHelper, a as makeComponentName } from './utils-c7662a47.esm.js';
|