@plasmicpkgs/react-aria 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/contexts.d.ts +14 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/option-utils.d.ts +51 -0
  6. package/dist/react-aria.esm.js +1191 -0
  7. package/dist/react-aria.esm.js.map +1 -0
  8. package/dist/react-aria.js +1198 -0
  9. package/dist/react-aria.js.map +1 -0
  10. package/dist/registerButton.d.ts +4 -0
  11. package/dist/registerComboBox.d.ts +21 -0
  12. package/dist/registerHeader.d.ts +5 -0
  13. package/dist/registerInput.d.ts +5 -0
  14. package/dist/registerLabel.d.ts +5 -0
  15. package/dist/registerListBox.d.ts +14 -0
  16. package/dist/registerListBoxItem.d.ts +7 -0
  17. package/dist/registerPopover.d.ts +7 -0
  18. package/dist/registerSection.d.ts +14 -0
  19. package/dist/registerSelect.d.ts +23 -0
  20. package/dist/utils.d.ts +18 -0
  21. package/package.json +74 -0
  22. package/skinny/contexts-c0294d96.cjs.js +24 -0
  23. package/skinny/contexts-c0294d96.cjs.js.map +1 -0
  24. package/skinny/contexts-fd3e1077.esm.js +12 -0
  25. package/skinny/contexts-fd3e1077.esm.js.map +1 -0
  26. package/skinny/contexts.d.ts +14 -0
  27. package/skinny/option-utils-0db61f6d.cjs.js +162 -0
  28. package/skinny/option-utils-0db61f6d.cjs.js.map +1 -0
  29. package/skinny/option-utils-765a1782.esm.js +153 -0
  30. package/skinny/option-utils-765a1782.esm.js.map +1 -0
  31. package/skinny/option-utils.d.ts +51 -0
  32. package/skinny/registerButton.cjs.js +31 -0
  33. package/skinny/registerButton.cjs.js.map +1 -0
  34. package/skinny/registerButton.d.ts +4 -0
  35. package/skinny/registerButton.esm.js +26 -0
  36. package/skinny/registerButton.esm.js.map +1 -0
  37. package/skinny/registerComboBox.cjs.js +291 -0
  38. package/skinny/registerComboBox.cjs.js.map +1 -0
  39. package/skinny/registerComboBox.d.ts +21 -0
  40. package/skinny/registerComboBox.esm.js +284 -0
  41. package/skinny/registerComboBox.esm.js.map +1 -0
  42. package/skinny/registerHeader.cjs.js +51 -0
  43. package/skinny/registerHeader.cjs.js.map +1 -0
  44. package/skinny/registerHeader.d.ts +5 -0
  45. package/skinny/registerHeader.esm.js +44 -0
  46. package/skinny/registerHeader.esm.js.map +1 -0
  47. package/skinny/registerInput.cjs.js +78 -0
  48. package/skinny/registerInput.cjs.js.map +1 -0
  49. package/skinny/registerInput.d.ts +5 -0
  50. package/skinny/registerInput.esm.js +71 -0
  51. package/skinny/registerInput.esm.js.map +1 -0
  52. package/skinny/registerLabel.cjs.js +59 -0
  53. package/skinny/registerLabel.cjs.js.map +1 -0
  54. package/skinny/registerLabel.d.ts +5 -0
  55. package/skinny/registerLabel.esm.js +52 -0
  56. package/skinny/registerLabel.esm.js.map +1 -0
  57. package/skinny/registerListBox.cjs.js +145 -0
  58. package/skinny/registerListBox.cjs.js.map +1 -0
  59. package/skinny/registerListBox.d.ts +14 -0
  60. package/skinny/registerListBox.esm.js +138 -0
  61. package/skinny/registerListBox.esm.js.map +1 -0
  62. package/skinny/registerListBoxItem.cjs.js +72 -0
  63. package/skinny/registerListBoxItem.cjs.js.map +1 -0
  64. package/skinny/registerListBoxItem.d.ts +7 -0
  65. package/skinny/registerListBoxItem.esm.js +65 -0
  66. package/skinny/registerListBoxItem.esm.js.map +1 -0
  67. package/skinny/registerPopover.cjs.js +111 -0
  68. package/skinny/registerPopover.cjs.js.map +1 -0
  69. package/skinny/registerPopover.d.ts +7 -0
  70. package/skinny/registerPopover.esm.js +104 -0
  71. package/skinny/registerPopover.esm.js.map +1 -0
  72. package/skinny/registerSection.cjs.js +82 -0
  73. package/skinny/registerSection.cjs.js.map +1 -0
  74. package/skinny/registerSection.d.ts +14 -0
  75. package/skinny/registerSection.esm.js +75 -0
  76. package/skinny/registerSection.esm.js.map +1 -0
  77. package/skinny/registerSelect.cjs.js +199 -0
  78. package/skinny/registerSelect.cjs.js.map +1 -0
  79. package/skinny/registerSelect.d.ts +23 -0
  80. package/skinny/registerSelect.esm.js +189 -0
  81. package/skinny/registerSelect.esm.js.map +1 -0
  82. package/skinny/utils-044c7f37.cjs.js +74 -0
  83. package/skinny/utils-044c7f37.cjs.js.map +1 -0
  84. package/skinny/utils-d92b3b76.esm.js +64 -0
  85. package/skinny/utils-d92b3b76.esm.js.map +1 -0
  86. package/skinny/utils.d.ts +18 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-aria.js","sources":["../src/utils.ts","../src/registerButton.tsx","../src/contexts.tsx","../src/option-utils.ts","../src/registerComboBox.tsx","../src/registerInput.tsx","../src/registerLabel.tsx","../src/registerListBoxItem.tsx","../src/registerListBox.tsx","../src/registerPopover.tsx","../src/registerHeader.tsx","../src/registerSection.tsx","../src/registerSelect.tsx","../src/index.tsx"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key, val]) =>\n key.startsWith(\"data-plasmic-\")\n )\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n","import { Button as BaseButton } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport { BaseButton };\n\nexport function registerButton(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseButton>\n) {\n registerComponentHelper(\n loader,\n BaseButton,\n {\n name: \"plasmic-react-aria-button\",\n displayName: \"BaseButton\",\n importPath: \"@plasmicpkgs/react-aria/registerButton\",\n importName: \"BaseButton\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n },\n overrides\n );\n}\n","import React from \"react\";\nimport type { BaseHeader } from \"./registerHeader\";\nimport type { BaseInput } from \"./registerInput\";\nimport type { BaseLabel } from \"./registerLabel\";\nimport type { BaseListBoxProps } from \"./registerListBox\";\nimport type { BaseListBoxItem } from \"./registerListBoxItem\";\nimport type { BasePopover } from \"./registerPopover\";\nimport type { BaseSection } from \"./registerSection\";\n\n// We pass down context props via our own Plasmic*Context instead of directly\n// using react-aria-component's *Context, because react-aria-component's\n// contexts don't \"merge\" with contexts further up the tree, so if we render\n// a context provider, it will just be overwritten by react-aria-component's\n// context provider. So we do the merging within our own Base* components\n// instead.\n\nexport const PlasmicLabelContext = React.createContext<\n React.ComponentProps<typeof BaseLabel> | undefined\n>(undefined);\n\nexport const PlasmicListBoxContext = React.createContext<\n BaseListBoxProps | undefined\n>(undefined);\n\nexport const PlasmicPopoverContext = React.createContext<\n React.ComponentProps<typeof BasePopover> | undefined\n>(undefined);\n\nexport const PlasmicItemContext = React.createContext<\n React.ComponentProps<typeof BaseListBoxItem> | undefined\n>(undefined);\n\nexport const PlasmicSectionContext = React.createContext<\n React.ComponentProps<typeof BaseSection> | undefined\n>(undefined);\n\nexport const PlasmicHeaderContext = React.createContext<\n React.ComponentProps<typeof BaseHeader> | undefined\n>(undefined);\n\nexport const PlasmicInputContext = React.createContext<\n React.ComponentProps<typeof BaseInput> | undefined\n>(undefined);\n","import type { ArrayType, ChoiceType } from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface ObjectSectionType<T extends object> {\n label?: string;\n items?: ObjectItemType<T>[];\n}\ninterface FlexSectionType<T extends object> {\n label?: string;\n items?: FlexItemType<T>[];\n}\n\nexport type ObjectItemType<T extends object> = StrictOptionType | T;\ntype FlexItemType<T extends object> = ObjectItemType<T> | string;\n\nexport type FlexOptionType<T extends object> =\n | FlexItemType<T>\n | FlexSectionType<T>;\n\nexport type ObjectOptionType<T extends object> =\n | ObjectSectionType<T>\n | ObjectItemType<T>;\n\nexport interface HasOptions<T extends object> {\n options?: FlexOptionType<T>[];\n optionInfo?: (option: FlexOptionType<T>) =>\n | {\n type?: \"item\";\n value: string;\n label?: string;\n isDisabled?: boolean;\n }\n | {\n type: \"section\";\n label?: string;\n items?: FlexOptionType<T>[];\n };\n}\n\nexport interface StrictItemType {\n type?: \"item\";\n value: string;\n label?: string;\n isDisabled?: boolean;\n}\n\nexport interface StrictSectionType {\n type: \"section\";\n label?: string;\n items?: StrictItemType[];\n key: string;\n}\n\nexport type StrictOptionType = StrictItemType | StrictSectionType;\n\nexport function useStrictOptions<T extends object>(props: HasOptions<T>) {\n const { options, optionInfo } = props;\n return React.useMemo(() => {\n return deriveStrictOptions({ options, optionInfo });\n }, [options, optionInfo]);\n}\n\nexport function deriveStrictOptions<T extends object>(props: HasOptions<T>) {\n const { options, optionInfo } = props;\n\n let sectionCount = 0;\n\n const makeStrict = (op: FlexOptionType<T>): StrictOptionType | undefined => {\n if (!op) {\n return undefined;\n } else if (typeof op === \"string\" || typeof op === \"number\") {\n const item = {\n value: op,\n };\n return item;\n } else if (optionInfo) {\n const info = optionInfo(op);\n if (info.type === \"section\") {\n const section: StrictSectionType = {\n type: \"section\",\n items: info.items\n ?.map?.((item) => makeStrict(item) as StrictItemType)\n ?.filter((x) => !!x),\n label: info.label,\n key: `section-${sectionCount}`,\n };\n sectionCount += 1;\n return section;\n } else {\n let item = info;\n if (!(\"value\" in item)) {\n item = {\n type: \"item\",\n value: JSON.stringify(item),\n };\n }\n return item;\n }\n } else if (typeof op === \"object\") {\n if (\"items\" in op) {\n const section: StrictSectionType = {\n type: \"section\",\n items: op.items\n ?.map?.((item) => makeStrict(item) as StrictItemType)\n ?.filter((x) => !!x),\n label: op.label,\n key: `section-${sectionCount}`,\n };\n sectionCount += 1;\n return section;\n } else {\n let item = op;\n if (!(\"value\" in item)) {\n item = {\n type: \"item\",\n value: JSON.stringify(item),\n };\n }\n return item;\n }\n } else {\n return undefined;\n }\n };\n\n const strictOptions = options\n ?.map(makeStrict)\n ?.filter((x): x is StrictOptionType => !!x);\n\n const optionText = (op: StrictItemType) => {\n return op.label ?? op.value;\n };\n\n return { options: strictOptions, optionText };\n}\n\nexport function flattenOptions(\n options: (StrictItemType | StrictSectionType)[] | undefined\n): StrictItemType[] {\n if (!options) {\n return [];\n } else {\n return options.flatMap((op) =>\n op.type === \"section\" ? op.items ?? [] : op\n );\n }\n}\n\nexport function makeOptionsPropType() {\n const type: ArrayType<HasOptions<any>> = {\n type: \"array\",\n itemType: {\n type: \"object\",\n nameFunc: (item: any) => item.label || item.value,\n fields: {\n type: {\n type: \"choice\",\n options: [\n { value: \"option\", label: \"Option\" },\n { value: \"option-group\", label: \"Option Group\" },\n ],\n defaultValue: \"option\",\n },\n value: {\n type: \"string\",\n hidden: (_ps: any, _ctx: any, { item }: any) =>\n item.type !== \"option\",\n },\n label: \"string\",\n items: {\n type: \"array\",\n displayName: \"Options\",\n hidden: (_ps: any, _ctx: any, { item }: any) => {\n return item.type !== \"option-group\";\n },\n itemType: {\n type: \"object\",\n nameFunc: (item: any) => item.label || item.value,\n fields: {\n value: \"string\",\n label: \"string\",\n },\n },\n },\n },\n },\n defaultValue: [\n {\n value: \"option1\",\n label: \"Option 1\",\n type: \"option\",\n },\n {\n value: \"option2\",\n label: \"Option 2\",\n type: \"option\",\n },\n ],\n };\n return type;\n}\n\nexport function makeValuePropType() {\n const type: ChoiceType<HasOptions<any>> = {\n type: \"choice\",\n options: (ps) => {\n const { options, optionText } = deriveStrictOptions(ps);\n return flattenOptions(options).map((op) => ({\n value: op.value,\n label: optionText(op),\n }));\n },\n };\n return type;\n}\n","import { useFilter } from \"@react-aria/i18n\";\nimport React from \"react\";\nimport { ComboBox, ComboBoxStateContext, Key } from \"react-aria-components\";\nimport { PlasmicInputContext, PlasmicListBoxContext } from \"./contexts\";\nimport {\n flattenOptions,\n HasOptions,\n makeOptionsPropType,\n makeValuePropType,\n StrictItemType,\n StrictOptionType,\n useStrictOptions,\n} from \"./option-utils\";\nimport {\n extractPlasmicDataProps,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n Styleable,\n withoutNils,\n} from \"./utils\";\n\nexport interface BaseComboBoxProps<T extends object>\n extends HasOptions<T>,\n Styleable {\n placeholder?: string;\n isDisabled?: boolean;\n menuTrigger?: React.ComponentProps<typeof ComboBox>[\"menuTrigger\"];\n\n valueType?: \"value\" | \"text\";\n allowsCustomValue?: boolean;\n\n value?: Key;\n onChange?: (value: Key) => void;\n\n filterValue?: string;\n onFilterValueChange?: (value: string) => void;\n\n previewOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n structure?: React.ReactNode;\n\n name?: string;\n}\n\nexport function BaseComboBox<T extends object>(props: BaseComboBoxProps<T>) {\n const {\n value,\n onChange,\n menuTrigger,\n filterValue,\n onFilterValueChange,\n valueType,\n allowsCustomValue,\n placeholder,\n previewOpen,\n onOpenChange,\n isDisabled,\n className,\n style,\n structure,\n name,\n } = props;\n\n const { options, optionText } = useStrictOptions(props);\n const { contains } = useFilter({ sensitivity: \"base\" });\n const [showAllOptions, setShowAllOptions] = React.useState(false);\n\n const filteredOptions = React.useMemo(() => {\n if (!filterValue || filterValue.trim().length === 0) {\n return options;\n }\n if (!options) {\n return options;\n }\n const filterOptions = (\n options: StrictOptionType[]\n ): StrictOptionType[] | undefined => {\n return withoutNils(\n options.map((op) => {\n if (op.type === \"section\") {\n return {\n ...op,\n items: op.items\n ? (filterOptions(op.items) as StrictItemType[])\n : undefined,\n };\n } else {\n if (contains(optionText(op), filterValue)) {\n return op;\n } else {\n return undefined;\n }\n }\n })\n );\n };\n return filterOptions(options);\n }, [options, filterValue, contains]);\n\n const flattenedOptions = React.useMemo(\n () => flattenOptions(options),\n [options]\n );\n\n const disabledKeys = flattenedOptions\n .filter((op) => op.isDisabled)\n .map((op) => op.value);\n\n const onSelectionChange = React.useCallback(\n (key: Key) => {\n const selectedOption = flattenedOptions?.find((op) => op.value === key);\n if (valueType === \"text\") {\n if (selectedOption) {\n onChange?.(optionText(selectedOption));\n }\n } else {\n onChange?.(key);\n }\n if (selectedOption) {\n onFilterValueChange?.(optionText(selectedOption));\n }\n },\n [onChange, onFilterValueChange, flattenedOptions, optionText]\n );\n\n const onInputValueChange = React.useCallback(\n (newValue: string) => {\n onFilterValueChange?.(newValue);\n setShowAllOptions(false);\n if (valueType === \"text\") {\n if (allowsCustomValue) {\n onChange?.(newValue);\n } else {\n const matchingOption = flattenedOptions?.find(\n (op) => optionText(op) === newValue\n );\n if (matchingOption) {\n onChange?.(optionText(matchingOption));\n }\n }\n }\n },\n [\n onFilterValueChange,\n onChange,\n flattenedOptions,\n optionText,\n valueType,\n allowsCustomValue,\n ]\n );\n\n const onBlur = React.useCallback(() => {\n // If we don't allow custom value, then on blur, reset the filter value\n // to the selected option\n if (!allowsCustomValue) {\n const selectedOption = flattenedOptions?.find((op) =>\n valueType === \"text\" ? optionText(op) === value : op.value === value\n );\n if (selectedOption) {\n const selectedOptionText = optionText(selectedOption);\n if (selectedOptionText !== filterValue) {\n onFilterValueChange?.(selectedOptionText);\n }\n }\n }\n }, [\n allowsCustomValue,\n valueType,\n flattenedOptions,\n value,\n optionText,\n onFilterValueChange,\n ]);\n\n return (\n <ComboBox\n selectedKey={value}\n onSelectionChange={onSelectionChange}\n isDisabled={isDisabled}\n className={className}\n style={style}\n items={showAllOptions ? options : filteredOptions}\n menuTrigger={menuTrigger}\n inputValue={filterValue}\n onInputChange={onInputValueChange}\n allowsCustomValue={allowsCustomValue}\n disabledKeys={disabledKeys}\n onOpenChange={(isOpen, trigger) => {\n if (isOpen && trigger === \"manual\") {\n setShowAllOptions(true);\n } else {\n setShowAllOptions(false);\n }\n onOpenChange?.(isOpen);\n }}\n onBlur={onBlur}\n formValue={valueType === \"text\" ? \"text\" : \"key\"}\n name={name}\n {...extractPlasmicDataProps(props)}\n >\n <PlasmicListBoxContext.Provider\n value={{\n makeItemProps: (item) => ({\n key: item.value,\n textValue: optionText(item),\n children: optionText(item),\n }),\n makeSectionProps: (section) => ({\n section,\n key: section.key,\n }),\n getItemType: (option) =>\n option.type === \"section\" ? \"section\" : \"item\",\n }}\n >\n <PlasmicInputContext.Provider value={{ placeholder }}>\n {structure}\n </PlasmicInputContext.Provider>\n </PlasmicListBoxContext.Provider>\n <BaseComboBoxEffects previewOpen={previewOpen} />\n </ComboBox>\n );\n}\n\nfunction BaseComboBoxEffects(\n props: Pick<BaseComboBoxProps<any>, \"previewOpen\">\n) {\n const { previewOpen } = props;\n const comboBoxState = React.useContext(ComboBoxStateContext);\n\n const prevPreviewOpenRef = React.useRef(previewOpen);\n React.useEffect(() => {\n // comboBoxState can be undefined if we are in `<Hidden/>`\n if (comboBoxState) {\n // There's no \"isOpen\" controlled state for ComboBox, so we use\n // sync comboBoxState with previewOpen prop instead\n if (previewOpen) {\n comboBoxState.open(undefined, \"manual\");\n } else if (prevPreviewOpenRef.current) {\n // Was previously previewOpen, now preview close\n comboBoxState.close();\n }\n }\n prevPreviewOpenRef.current = previewOpen;\n }, [previewOpen, comboBoxState, prevPreviewOpenRef]);\n\n return null;\n}\n\nexport function registerComboBox(loader?: Registerable) {\n const rootName = makeComponentName(\"combobox\");\n\n registerComponentHelper(loader, BaseComboBox, {\n name: rootName,\n displayName: \"BaseComboBox\",\n importPath: \"@plasmicpkgs/react-aria/registerComboBox\",\n importName: \"BaseComboBox\",\n props: {\n options: makeOptionsPropType(),\n value: makeValuePropType(),\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n filterValue: {\n type: \"string\",\n },\n onFilterValueChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n isDisabled: {\n type: \"boolean\",\n },\n valueType: {\n displayName: \"`value` Type\",\n type: \"choice\",\n options: [\n { value: \"value\", label: \"By option value\" },\n { value: \"text\", label: \"By option text\" },\n ],\n defaultValueHint: \"value\",\n description:\n \"This controls whether `value` and `onChange` are option values or option text. Choosing `text` allows you to optionally allow a custom value that's not in the provided list of options.\",\n advanced: true,\n },\n allowsCustomValue: {\n type: \"boolean\",\n displayName: \"Allows custom value?\",\n description: \"Allows entering a value that is not one of the options\",\n hidden: (ps) => ps.valueType !== \"text\",\n advanced: true,\n },\n onOpenChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isOpen\", type: \"boolean\" }],\n },\n structure: {\n type: \"slot\",\n },\n previewOpen: {\n type: \"boolean\",\n displayName: \"Preview opened?\",\n description: \"Preview opened state while designing in Plasmic editor\",\n editOnly: true,\n },\n },\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"text\",\n },\n filterValue: {\n type: \"writable\",\n valueProp: \"filterValue\",\n onChangeProp: \"onFilterValueChange\",\n variableType: \"text\",\n },\n isOpen: {\n type: \"readonly\",\n onChangeProp: \"onOpenChange\",\n variableType: \"boolean\",\n },\n },\n });\n}\n","import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Input } from \"react-aria-components\";\nimport { PlasmicInputContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseInput(props: React.ComponentProps<typeof Input>) {\n const contextProps = React.useContext(PlasmicInputContext);\n return <Input {...mergeProps(contextProps, 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: \"BaseInput\",\n importPath: \"@plasmicpkgs/react-aria/registerInput\",\n importName: \"BaseInput\",\n props: {\n className: {\n type: \"class\",\n displayName: \"Styles in different states\",\n selectors: [\n {\n selector: \":self[data-hovered]\",\n label: \"Hovered\",\n },\n {\n selector: \":self[data-focused]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-focus-visible]\",\n label: \"Focus visible\",\n },\n {\n selector: \":self[data-disabled]\",\n label: \"Disabled\",\n },\n {\n selector: \":self::placeholder\",\n label: \"Placeholder\",\n },\n ],\n },\n },\n },\n overrides\n );\n}\n","import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Label } from \"react-aria-components\";\nimport { PlasmicLabelContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseLabel(props: React.ComponentProps<typeof Label>) {\n const contextProps = React.useContext(PlasmicLabelContext);\n return <Label {...mergeProps(contextProps, props)} />;\n}\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: \"plasmic-react-aria-label\",\n displayName: \"BaseLabel\",\n importPath: \"@plasmicpkgs/react-aria/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: {\n type: \"text\",\n value: \"Label\",\n },\n },\n },\n },\n overrides\n );\n}\n","import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Key, ListBoxItem } from \"react-aria-components\";\nimport { PlasmicItemContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseListBoxItem(\n props: React.ComponentProps<typeof ListBoxItem> & {\n key?: Key;\n }\n) {\n const contextProps = React.useContext(PlasmicItemContext);\n const mergedProps = mergeProps(contextProps, props);\n return <ListBoxItem id={mergedProps.key ?? undefined} {...mergedProps} />;\n}\n\nexport function registerListBoxItem(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBoxItem>\n) {\n registerComponentHelper(\n loader,\n BaseListBoxItem,\n {\n name: makeComponentName(\"item\"),\n displayName: \"BaseListBoxItem\",\n importPath: \"@plasmicpkgs/react-aria/registerListBoxItem\",\n importName: \"BaseListBoxItem\",\n props: {\n className: {\n type: \"class\",\n displayName: \"Styles in different states\",\n selectors: [\n {\n selector: \":self[data-selected]\",\n label: \"Selected\",\n },\n {\n selector: \":self[data-focused], :self[data-hovered]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-disabled]\",\n label: \"Disabled\",\n },\n ],\n },\n },\n },\n overrides\n );\n}\n","import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox, ListBoxContext } 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 = !React.useContext(ListBoxContext);\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: \"BaseListBox\",\n importPath: \"@plasmicpkgs/react-aria/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 },\n },\n overrides\n );\n\n registerListBoxItem(loader, {\n parentComponentName: makeComponentName(\"listbox\"),\n });\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { PlasmicPopoverContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BasePopover(props: {\n className?: string;\n resetClassName?: string;\n}) {\n const { resetClassName, ...restProps } = props;\n const isStandalone = !React.useContext(PopoverContext);\n const contextProps = React.useContext(PlasmicPopoverContext);\n const canvas = usePlasmicCanvasContext();\n const mergedProps = mergeProps(contextProps, restProps, {\n className: `${props.resetClassName}`,\n });\n\n if (isStandalone) {\n const triggerRef = React.useRef<any>(null);\n return (\n <>\n <div ref={triggerRef} />\n <Popover\n {...mergedProps}\n triggerRef={triggerRef}\n isNonModal={true}\n isOpen={true}\n />\n </>\n );\n } else {\n return <Popover {...mergedProps} isNonModal={!!canvas} />;\n }\n}\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: \"plasmic-react-aria-popover\",\n displayName: \"BasePopover\",\n importPath: \"@plasmicpkgs/react-aria/registerPopover\",\n importName: \"BasePopover\",\n props: {\n children: {\n type: \"slot\",\n },\n offset: {\n type: \"number\",\n displayName: \"Offset\",\n description:\n \"Additional offset applied vertically between the popover and its trigger\",\n defaultValueHint: 0,\n },\n placement: {\n type: \"choice\",\n description:\n \"Default placement of the popover relative to the trigger, if there is enough space\",\n options: [\n \"bottom\",\n \"bottom left\",\n \"bottom right\",\n \"top\",\n \"top left\",\n \"top right\",\n ],\n },\n resetClassName: {\n type: \"themeResetClass\",\n },\n },\n styleSections: true,\n },\n overrides\n );\n}\n","import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n makeComponentName,\n registerComponentHelper\n} from \"./utils\";\nexport function BaseHeader(props: React.ComponentProps<typeof Header>) {\n const contextProps = React.useContext(PlasmicHeaderContext);\n return (\n <Header {...mergeProps(contextProps, props)} />\n );\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: \"BaseHeader\",\n importPath: \"@plasmicpkgs/react-aria/registerHeader\",\n importName: \"BaseHeader\",\n props: {},\n },\n overrides\n );\n}\n","import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Collection, Key, Section } from \"react-aria-components\";\nimport {\n PlasmicHeaderContext,\n PlasmicItemContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport type { StrictSectionType } from \"./option-utils\";\nimport { registerHeader } from \"./registerHeader\";\nimport { BaseListBoxItem } from \"./registerListBoxItem\";\nimport {\n CodeComponentMetaOverrides,\n makeChildComponentName,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n Styleable,\n} from \"./utils\";\n\nexport interface BaseSectionProps extends Styleable {\n // Configured via Studio\n renderHeader?: (section: any) => React.ReactNode;\n\n // Passed down via context from Select, ComboBox\n key?: Key;\n section?: StrictSectionType;\n\n // Passed down via context from ListBox\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n renderItem?: (item?: any) => React.ReactNode;\n}\n\nexport function BaseSection(props: BaseSectionProps) {\n const contextProps = React.useContext(PlasmicSectionContext);\n const mergedProps = mergeProps(contextProps, props);\n const { section, renderHeader, key, makeItemProps, renderItem, ...rest } =\n mergedProps;\n return (\n <Section id={key ?? undefined} {...rest}>\n <PlasmicHeaderContext.Provider value={{ children: section?.label }}>\n {renderHeader?.(section)}\n </PlasmicHeaderContext.Provider>\n <Collection items={section?.items}>\n {(item) => {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }}\n </Collection>\n </Section>\n );\n}\n\nexport function registerSection(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSection>\n) {\n registerComponentHelper(\n loader,\n BaseSection,\n {\n name: makeComponentName(\"section\"),\n displayName: \"BaseSection\",\n importPath: \"@plasmicpkgs/react-aria/registerSection\",\n importName: \"BaseSection\",\n props: {\n renderHeader: {\n type: \"slot\",\n displayName: \"Render section header\",\n renderPropParams: [\"section\"],\n },\n },\n },\n overrides\n );\n\n const thisName = makeChildComponentName(\n overrides?.parentComponentName,\n makeComponentName(\"section\")\n );\n\n registerHeader(loader, {\n parentComponentName: thisName,\n });\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport React from \"react\";\nimport {\n Key,\n Select,\n SelectValue as BaseSelectValue,\n} from \"react-aria-components\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport {\n flattenOptions,\n HasOptions,\n makeOptionsPropType,\n makeValuePropType,\n useStrictOptions,\n} from \"./option-utils\";\nimport {\n extractPlasmicDataProps,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n Styleable,\n} from \"./utils\";\n\nexport { BaseSelectValue };\n\nconst SELECT_NAME = makeComponentName(\"select\");\n\nexport interface BaseSelectProps<T extends object>\n extends HasOptions<T>,\n Styleable {\n placeholder?: string;\n isDisabled?: boolean;\n\n value?: Key;\n onChange?: (value: Key) => void;\n\n previewOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n structure?: React.ReactNode;\n\n name?: string;\n \"aria-label\"?: string;\n\n renderOption?: (item: {\n value: string;\n label?: string;\n isDisabled?: boolean;\n }) => React.ReactNode;\n}\n\nexport function BaseSelect<T extends object>(props: BaseSelectProps<T>) {\n const {\n value,\n onChange,\n placeholder,\n previewOpen,\n onOpenChange,\n isDisabled,\n className,\n style,\n structure,\n renderOption,\n name,\n \"aria-label\": ariaLabel,\n } = props;\n\n const { options, optionText } = useStrictOptions(props);\n\n const canvas = usePlasmicCanvasContext();\n\n const disabledKeys = flattenOptions(options)\n .filter((op) => op.isDisabled)\n .map((op) => op.value);\n\n return (\n <Select\n placeholder={placeholder}\n selectedKey={value}\n onSelectionChange={onChange}\n onOpenChange={onOpenChange}\n isDisabled={isDisabled}\n className={className}\n style={style}\n name={name}\n aria-label={ariaLabel}\n {...(previewOpen && canvas ? { isOpen: previewOpen } : undefined)}\n {...extractPlasmicDataProps(props)}\n >\n <PlasmicListBoxContext.Provider\n value={{\n items: options,\n disabledKeys: disabledKeys,\n makeItemProps: (item) => ({\n key: item.value,\n textValue: optionText(item),\n children: renderOption ? renderOption(item) : optionText(item),\n }),\n makeSectionProps: (section) => ({\n section,\n key: section.key,\n }),\n getItemType: (option) =>\n option.type === \"section\" ? \"section\" : \"item\",\n }}\n >\n {structure}\n </PlasmicListBoxContext.Provider>\n </Select>\n );\n}\n\nexport function registerSelect(loader?: Registerable) {\n registerComponentHelper(loader, BaseSelect, {\n name: SELECT_NAME,\n displayName: \"BaseSelect\",\n importPath: \"@plasmicpkgs/react-aria/registerSelect\",\n importName: \"BaseSelect\",\n props: {\n options: makeOptionsPropType(),\n placeholder: {\n type: \"string\",\n },\n isDisabled: {\n type: \"boolean\",\n },\n value: makeValuePropType(),\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n previewOpen: {\n type: \"boolean\",\n displayName: \"Preview opened?\",\n description: \"Preview opened state while designing in Plasmic editor\",\n editOnly: true,\n },\n onOpenChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isOpen\", type: \"boolean\" }],\n },\n // optionValue: {\n // type: \"string\",\n // displayName: \"Field key for an option's value\",\n // hidden: (ps) =>\n // !ps.options ||\n // !ps.options[0] ||\n // typeof ps.options[0] === \"string\" ||\n // \"value\" in ps.options[0],\n // exprHint:\n // \"Return a function that takes in an option object, and returns the key to use\",\n // },\n // optionText: {\n // type: \"string\",\n // displayName: \"Field key for an option's text value\",\n // hidden: (ps) =>\n // !ps.options ||\n // !ps.options[0] ||\n // typeof ps.options[0] === \"string\" ||\n // \"value\" in ps.options[0],\n // exprHint:\n // \"Return a function that takes in an option object, and returns the text value to use\",\n // },\n // optionDisabled: {\n // type: \"string\",\n // displayName: \"Field key for whether an option is disabled\",\n // hidden: (ps) =>\n // !ps.options ||\n // !ps.options[0] ||\n // typeof ps.options[0] === \"string\" ||\n // \"value\" in ps.options[0],\n // exprHint:\n // \"Return a function that takes in an option object, and returns true if option should be disabled\",\n // },\n\n structure: {\n type: \"slot\",\n },\n\n // renderOption: {\n // type: \"slot\",\n // displayName: \"Custom render option\",\n // renderPropParams: [\"item\"],\n // hidePlaceholder: true\n // },\n\n name: {\n type: \"string\",\n displayName: \"Form field key\",\n description: \"Name of the input, when submitting in an HTML form\",\n advanced: true,\n },\n\n \"aria-label\": {\n type: \"string\",\n displayName: \"Aria Label\",\n description: \"Label for this input, if no visible label is used\",\n advanced: true,\n },\n },\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"text\",\n },\n isOpen: {\n type: \"readonly\",\n onChangeProp: \"onOpenChange\",\n variableType: \"boolean\",\n },\n },\n });\n\n registerComponentHelper(loader, BaseSelectValue, {\n name: makeComponentName(\"select-value\"),\n displayName: \"Base Selected Value\",\n importPath: \"@plasmicpkgs/react-aria/registerSelect\",\n importName: \"SelectValue\",\n parentComponentName: SELECT_NAME,\n props: {},\n });\n}\n","import { registerButton } from \"./registerButton\";\nimport { registerComboBox } from \"./registerComboBox\";\nimport { registerInput } from \"./registerInput\";\nimport { registerLabel } from \"./registerLabel\";\nimport { registerListBox } from \"./registerListBox\";\nimport { registerPopover } from \"./registerPopover\";\nimport { registerSection } from \"./registerSection\";\nimport { registerSelect } from \"./registerSelect\";\nimport { Registerable } from \"./utils\";\n\nexport function registerAll(loader?: Registerable) {\n registerSelect(loader);\n registerComboBox(loader);\n registerButton(loader);\n registerLabel(loader);\n registerListBox(loader);\n registerPopover(loader);\n registerInput(loader);\n registerSection(loader);\n}\n"],"names":["__spreadProps","__spreadValues","registerComponent","BaseButton","React","_a","useFilter","options","ComboBox","ComboBoxStateContext","Input","mergeProps","Label","ListBoxItem","ListBoxContext","__objRest","ListBox","PopoverContext","usePlasmicCanvasContext","Popover","Header","Section","Collection","Select","BaseSelectValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAAA,eAAA,CAAAC,gBAAA,CAAAA,gBAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,EAAA;AAAA,MAGL,KAAO,EAAAA,gBAAA,CAAAA,gBAAA,CAAA,EAAA,EACF,IAAK,CAAA,KAAA,CAAA,EACL,SAAU,CAAA,KAAA,CAAA;AAAA,KAEjB,CAAA,CAAA;AACA,IAAA,IAAI,UAAU,mBAAqB,EAAA;AACjC,MAAA,IAAA,CAAK,IAAO,GAAA,sBAAA;AAAA,QACV,SAAU,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,IAAA;AAAA,OACZ;AAAA,KACF;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,IAAM,EAAA,UAAA;AAAA,QACN,SAAW,EAAA,OAAA;AAAA,QACX,YAAc,EAAA,UAAA;AAAA,QACd,YAAc,EAAA,MAAA;AAAA,OAChB;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,UAAA;AAAA,QACN,YAAc,EAAA,cAAA;AAAA,QACd,YAAc,EAAA,SAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACD,CAAA,CAAA;AAED,EAAA,uBAAA,CAAwB,QAAQoB,+BAAiB,EAAA;AAAA,IAC/C,IAAA,EAAM,kBAAkB,cAAc,CAAA;AAAA,IACtC,WAAa,EAAA,qBAAA;AAAA,IACb,UAAY,EAAA,wCAAA;AAAA,IACZ,UAAY,EAAA,aAAA;AAAA,IACZ,mBAAqB,EAAA,WAAA;AAAA,IACrB,OAAO,EAAC;AAAA,GACT,CAAA,CAAA;AACH;;ACrNO,SAAS,YAAY,MAAuB,EAAA;AACjD,EAAA,cAAA,CAAe,MAAM,CAAA,CAAA;AACrB,EAAA,gBAAA,CAAiB,MAAM,CAAA,CAAA;AACvB,EAAA,cAAA,CAAe,MAAM,CAAA,CAAA;AACrB,EAAA,aAAA,CAAc,MAAM,CAAA,CAAA;AACpB,EAAA,eAAA,CAAgB,MAAM,CAAA,CAAA;AACtB,EAAA,eAAA,CAAgB,MAAM,CAAA,CAAA;AACtB,EAAA,aAAA,CAAc,MAAM,CAAA,CAAA;AACpB,EAAA,eAAA,CAAgB,MAAM,CAAA,CAAA;AACxB;;;;"}
@@ -0,0 +1,4 @@
1
+ import { Button as BaseButton } from "react-aria-components";
2
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
3
+ export { BaseButton };
4
+ export declare function registerButton(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseButton>): void;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { ComboBox, Key } from "react-aria-components";
3
+ import { HasOptions } from "./option-utils";
4
+ import { Registerable, Styleable } from "./utils";
5
+ export interface BaseComboBoxProps<T extends object> extends HasOptions<T>, Styleable {
6
+ placeholder?: string;
7
+ isDisabled?: boolean;
8
+ menuTrigger?: React.ComponentProps<typeof ComboBox>["menuTrigger"];
9
+ valueType?: "value" | "text";
10
+ allowsCustomValue?: boolean;
11
+ value?: Key;
12
+ onChange?: (value: Key) => void;
13
+ filterValue?: string;
14
+ onFilterValueChange?: (value: string) => void;
15
+ previewOpen?: boolean;
16
+ onOpenChange?: (open: boolean) => void;
17
+ structure?: React.ReactNode;
18
+ name?: string;
19
+ }
20
+ export declare function BaseComboBox<T extends object>(props: BaseComboBoxProps<T>): React.JSX.Element;
21
+ export declare function registerComboBox(loader?: Registerable): void;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Header } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ export declare function BaseHeader(props: React.ComponentProps<typeof Header>): React.JSX.Element;
5
+ export declare function registerHeader(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseHeader>): void;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Input } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ export declare function BaseInput(props: React.ComponentProps<typeof Input>): React.JSX.Element;
5
+ export declare function registerInput(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseInput>): void;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Label } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ export declare function BaseLabel(props: React.ComponentProps<typeof Label>): React.JSX.Element;
5
+ export declare function registerLabel(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseLabel>): void;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { ListBox } from "react-aria-components";
3
+ import { type BaseListBoxItem } from "./registerListBoxItem";
4
+ import type { BaseSection } from "./registerSection";
5
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
6
+ export interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {
7
+ makeItemProps?: (item: any) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;
8
+ makeSectionProps?: (section: any) => Partial<React.ComponentProps<typeof BaseSection>>;
9
+ renderItem?: (item: any) => React.ReactNode;
10
+ renderSection?: (section: any) => React.ReactNode;
11
+ getItemType?: (thing: any) => "item" | "section";
12
+ }
13
+ export declare function BaseListBox(props: BaseListBoxProps): React.JSX.Element;
14
+ export declare function registerListBox(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseListBox>): void;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { Key, ListBoxItem } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ export declare function BaseListBoxItem(props: React.ComponentProps<typeof ListBoxItem> & {
5
+ key?: Key;
6
+ }): React.JSX.Element;
7
+ export declare function registerListBoxItem(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseListBoxItem>): void;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
3
+ export declare function BasePopover(props: {
4
+ className?: string;
5
+ resetClassName?: string;
6
+ }): React.JSX.Element;
7
+ export declare function registerPopover(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BasePopover>): void;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Key } from "react-aria-components";
3
+ import type { StrictSectionType } from "./option-utils";
4
+ import { BaseListBoxItem } from "./registerListBoxItem";
5
+ import { CodeComponentMetaOverrides, Registerable, Styleable } from "./utils";
6
+ export interface BaseSectionProps extends Styleable {
7
+ renderHeader?: (section: any) => React.ReactNode;
8
+ key?: Key;
9
+ section?: StrictSectionType;
10
+ makeItemProps?: (item: any) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;
11
+ renderItem?: (item?: any) => React.ReactNode;
12
+ }
13
+ export declare function BaseSection(props: BaseSectionProps): React.JSX.Element;
14
+ export declare function registerSection(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSection>): void;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { Key, SelectValue as BaseSelectValue } from "react-aria-components";
3
+ import { HasOptions } from "./option-utils";
4
+ import { Registerable, Styleable } from "./utils";
5
+ export { BaseSelectValue };
6
+ export interface BaseSelectProps<T extends object> extends HasOptions<T>, Styleable {
7
+ placeholder?: string;
8
+ isDisabled?: boolean;
9
+ value?: Key;
10
+ onChange?: (value: Key) => void;
11
+ previewOpen?: boolean;
12
+ onOpenChange?: (open: boolean) => void;
13
+ structure?: React.ReactNode;
14
+ name?: string;
15
+ "aria-label"?: string;
16
+ renderOption?: (item: {
17
+ value: string;
18
+ label?: string;
19
+ isDisabled?: boolean;
20
+ }) => React.ReactNode;
21
+ }
22
+ export declare function BaseSelect<T extends object>(props: BaseSelectProps<T>): React.JSX.Element;
23
+ export declare function registerSelect(loader?: Registerable): void;
@@ -0,0 +1,18 @@
1
+ import type { CodeComponentMeta } from "@plasmicapp/host";
2
+ import registerComponent from "@plasmicapp/host/registerComponent";
3
+ import React from "react";
4
+ export type Registerable = {
5
+ registerComponent: typeof registerComponent;
6
+ };
7
+ export type CodeComponentMetaOverrides<T extends React.ComponentType<any>> = Partial<Pick<CodeComponentMeta<React.ComponentProps<T>>, "parentComponentName" | "props" | "displayName">>;
8
+ export declare function registerComponentHelper<T extends React.ComponentType<any>>(loader: Registerable | undefined, component: T, meta: CodeComponentMeta<React.ComponentProps<T>>, overrides?: CodeComponentMetaOverrides<T>): void;
9
+ export declare function makeComponentName(name: string): string;
10
+ export declare function makeChildComponentName(fullParentName: string | undefined, fullChildName: string): string;
11
+ export interface Styleable {
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ }
15
+ export declare function extractPlasmicDataProps(props: Record<string, any>): {
16
+ [k: string]: any;
17
+ };
18
+ export declare function withoutNils<T>(array: (T | undefined | null)[]): T[];
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@plasmicpkgs/react-aria",
3
+ "version": "0.0.2",
4
+ "description": "Plasmic registration calls for react-aria based components",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "module": "dist/react-aria.esm.js",
8
+ "nx": {
9
+ "targets": {
10
+ "build": {
11
+ "inputs": [
12
+ "{projectRoot}/**/*",
13
+ "!{projectRoot}/**/dist/**/*",
14
+ "!{projectRoot}/skinny/**/*"
15
+ ],
16
+ "outputs": [
17
+ "{projectRoot}/**/dist/**/*",
18
+ "{projectRoot}/skinny/**/*"
19
+ ]
20
+ }
21
+ }
22
+ },
23
+ "exports": {
24
+ ".": {
25
+ "require": "./dist/index.js",
26
+ "import": "./dist/react-aria.esm.js",
27
+ "types": "./dist/index.d.ts"
28
+ },
29
+ "./skinny/*": {
30
+ "require": "./skinny/*.cjs.js",
31
+ "import": "./skinny/*.esm.js",
32
+ "types": "./skinny/*.d.ts"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "skinny"
38
+ ],
39
+ "scripts": {
40
+ "build": "rollup -c rollup.config.mjs && yarn tsc --emitDeclarationOnly --declaration src/index.tsx --incremental --tsBuildInfoFile ./dist/.tsbuildinfo --skipLibCheck --lib esnext --jsx react --esModuleInterop --strict --outDir ./dist/ && cp ./dist/*.d.ts skinny/ && rm skinny/index.d.ts",
41
+ "prepare": "if-env PREPARE_NO_BUILD=true || yarn build",
42
+ "clean": "rm -rf dist/ skinny/*.ts skinny/*.map skinny/*.js",
43
+ "storybook": "storybook dev -p 6006",
44
+ "build-storybook": "storybook build",
45
+ "test-storybook": "test-storybook"
46
+ },
47
+ "dependencies": {
48
+ "@react-aria/i18n": "^3.8.4",
49
+ "@react-aria/utils": "^3.21.1",
50
+ "react-aria-components": "^1.0.0-rc.0"
51
+ },
52
+ "devDependencies": {
53
+ "@plasmicapp/host": "1.0.177",
54
+ "@rollup/plugin-commonjs": "^11.0.0",
55
+ "@rollup/plugin-json": "^4.0.0",
56
+ "@rollup/plugin-node-resolve": "^9.0.0",
57
+ "@types/react": "^18.0.27",
58
+ "@types/react-dom": "^18.0.10",
59
+ "glob": "^8.1.0",
60
+ "react": "^18.2.0",
61
+ "react-dom": "^18.2.0",
62
+ "rollup": "^3.10.1",
63
+ "rollup-plugin-esbuild": "^5.0.0",
64
+ "typescript": "^5.2.2"
65
+ },
66
+ "peerDependencies": {
67
+ "@plasmicapp/host": ">=1.0.0",
68
+ "react": ">=16.8.0"
69
+ },
70
+ "publishConfig": {
71
+ "access": "public"
72
+ },
73
+ "gitHead": "65c4a8f0333097d9c78cd959dd055a65f8bc372b"
74
+ }
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
+
7
+ var React__default = /*#__PURE__*/_interopDefault(React);
8
+
9
+ const PlasmicLabelContext = React__default.default.createContext(void 0);
10
+ const PlasmicListBoxContext = React__default.default.createContext(void 0);
11
+ const PlasmicPopoverContext = React__default.default.createContext(void 0);
12
+ const PlasmicItemContext = React__default.default.createContext(void 0);
13
+ const PlasmicSectionContext = React__default.default.createContext(void 0);
14
+ const PlasmicHeaderContext = React__default.default.createContext(void 0);
15
+ const PlasmicInputContext = React__default.default.createContext(void 0);
16
+
17
+ exports.PlasmicHeaderContext = PlasmicHeaderContext;
18
+ exports.PlasmicInputContext = PlasmicInputContext;
19
+ exports.PlasmicItemContext = PlasmicItemContext;
20
+ exports.PlasmicLabelContext = PlasmicLabelContext;
21
+ exports.PlasmicListBoxContext = PlasmicListBoxContext;
22
+ exports.PlasmicPopoverContext = PlasmicPopoverContext;
23
+ exports.PlasmicSectionContext = PlasmicSectionContext;
24
+ //# sourceMappingURL=contexts-c0294d96.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contexts-c0294d96.cjs.js","sources":["../src/contexts.tsx"],"sourcesContent":["import React from \"react\";\nimport type { BaseHeader } from \"./registerHeader\";\nimport type { BaseInput } from \"./registerInput\";\nimport type { BaseLabel } from \"./registerLabel\";\nimport type { BaseListBoxProps } from \"./registerListBox\";\nimport type { BaseListBoxItem } from \"./registerListBoxItem\";\nimport type { BasePopover } from \"./registerPopover\";\nimport type { BaseSection } from \"./registerSection\";\n\n// We pass down context props via our own Plasmic*Context instead of directly\n// using react-aria-component's *Context, because react-aria-component's\n// contexts don't \"merge\" with contexts further up the tree, so if we render\n// a context provider, it will just be overwritten by react-aria-component's\n// context provider. So we do the merging within our own Base* components\n// instead.\n\nexport const PlasmicLabelContext = React.createContext<\n React.ComponentProps<typeof BaseLabel> | undefined\n>(undefined);\n\nexport const PlasmicListBoxContext = React.createContext<\n BaseListBoxProps | undefined\n>(undefined);\n\nexport const PlasmicPopoverContext = React.createContext<\n React.ComponentProps<typeof BasePopover> | undefined\n>(undefined);\n\nexport const PlasmicItemContext = React.createContext<\n React.ComponentProps<typeof BaseListBoxItem> | undefined\n>(undefined);\n\nexport const PlasmicSectionContext = React.createContext<\n React.ComponentProps<typeof BaseSection> | undefined\n>(undefined);\n\nexport const PlasmicHeaderContext = React.createContext<\n React.ComponentProps<typeof BaseHeader> | undefined\n>(undefined);\n\nexport const PlasmicInputContext = React.createContext<\n React.ComponentProps<typeof BaseInput> | undefined\n>(undefined);\n"],"names":["React"],"mappings":";;;;;;;;AAgBa,MAAA,mBAAA,GAAsBA,sBAAM,CAAA,aAAA,CAEvC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwBA,sBAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwBA,sBAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,kBAAA,GAAqBA,sBAAM,CAAA,aAAA,CAEtC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwBA,sBAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,oBAAA,GAAuBA,sBAAM,CAAA,aAAA,CAExC,KAAS,CAAA,EAAA;AAEE,MAAA,mBAAA,GAAsBA,sBAAM,CAAA,aAAA,CAEvC,KAAS,CAAA;;;;;;;;;;"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+
3
+ const PlasmicLabelContext = React.createContext(void 0);
4
+ const PlasmicListBoxContext = React.createContext(void 0);
5
+ const PlasmicPopoverContext = React.createContext(void 0);
6
+ const PlasmicItemContext = React.createContext(void 0);
7
+ const PlasmicSectionContext = React.createContext(void 0);
8
+ const PlasmicHeaderContext = React.createContext(void 0);
9
+ const PlasmicInputContext = React.createContext(void 0);
10
+
11
+ export { PlasmicListBoxContext as P, PlasmicInputContext as a, PlasmicLabelContext as b, PlasmicSectionContext as c, PlasmicItemContext as d, PlasmicPopoverContext as e, PlasmicHeaderContext as f };
12
+ //# sourceMappingURL=contexts-fd3e1077.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contexts-fd3e1077.esm.js","sources":["../src/contexts.tsx"],"sourcesContent":["import React from \"react\";\nimport type { BaseHeader } from \"./registerHeader\";\nimport type { BaseInput } from \"./registerInput\";\nimport type { BaseLabel } from \"./registerLabel\";\nimport type { BaseListBoxProps } from \"./registerListBox\";\nimport type { BaseListBoxItem } from \"./registerListBoxItem\";\nimport type { BasePopover } from \"./registerPopover\";\nimport type { BaseSection } from \"./registerSection\";\n\n// We pass down context props via our own Plasmic*Context instead of directly\n// using react-aria-component's *Context, because react-aria-component's\n// contexts don't \"merge\" with contexts further up the tree, so if we render\n// a context provider, it will just be overwritten by react-aria-component's\n// context provider. So we do the merging within our own Base* components\n// instead.\n\nexport const PlasmicLabelContext = React.createContext<\n React.ComponentProps<typeof BaseLabel> | undefined\n>(undefined);\n\nexport const PlasmicListBoxContext = React.createContext<\n BaseListBoxProps | undefined\n>(undefined);\n\nexport const PlasmicPopoverContext = React.createContext<\n React.ComponentProps<typeof BasePopover> | undefined\n>(undefined);\n\nexport const PlasmicItemContext = React.createContext<\n React.ComponentProps<typeof BaseListBoxItem> | undefined\n>(undefined);\n\nexport const PlasmicSectionContext = React.createContext<\n React.ComponentProps<typeof BaseSection> | undefined\n>(undefined);\n\nexport const PlasmicHeaderContext = React.createContext<\n React.ComponentProps<typeof BaseHeader> | undefined\n>(undefined);\n\nexport const PlasmicInputContext = React.createContext<\n React.ComponentProps<typeof BaseInput> | undefined\n>(undefined);\n"],"names":[],"mappings":";;AAgBa,MAAA,mBAAA,GAAsB,KAAM,CAAA,aAAA,CAEvC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwB,KAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwB,KAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,kBAAA,GAAqB,KAAM,CAAA,aAAA,CAEtC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwB,KAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,oBAAA,GAAuB,KAAM,CAAA,aAAA,CAExC,KAAS,CAAA,EAAA;AAEE,MAAA,mBAAA,GAAsB,KAAM,CAAA,aAAA,CAEvC,KAAS,CAAA;;;;"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { BaseListBoxProps } from "./registerListBox";
3
+ export declare const PlasmicLabelContext: React.Context<(import("react-aria-components").LabelProps & React.RefAttributes<HTMLLabelElement>) | undefined>;
4
+ export declare const PlasmicListBoxContext: React.Context<BaseListBoxProps | undefined>;
5
+ export declare const PlasmicPopoverContext: React.Context<{
6
+ className?: string | undefined;
7
+ resetClassName?: string | undefined;
8
+ } | undefined>;
9
+ export declare const PlasmicItemContext: React.Context<(import("react-aria-components").ListBoxItemProps<object> & React.RefAttributes<HTMLDivElement> & {
10
+ key?: import("react-stately").Key | undefined;
11
+ }) | undefined>;
12
+ export declare const PlasmicSectionContext: React.Context<import("./registerSection").BaseSectionProps | undefined>;
13
+ export declare const PlasmicHeaderContext: React.Context<(React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>) | undefined>;
14
+ export declare const PlasmicInputContext: React.Context<(import("react-aria-components").InputProps & React.RefAttributes<HTMLInputElement>) | undefined>;
@@ -0,0 +1,162 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
+
7
+ var React__default = /*#__PURE__*/_interopDefault(React);
8
+
9
+ function useStrictOptions(props) {
10
+ const { options, optionInfo } = props;
11
+ return React__default.default.useMemo(() => {
12
+ return deriveStrictOptions({ options, optionInfo });
13
+ }, [options, optionInfo]);
14
+ }
15
+ function deriveStrictOptions(props) {
16
+ var _a;
17
+ const { options, optionInfo } = props;
18
+ let sectionCount = 0;
19
+ const makeStrict = (op) => {
20
+ var _a2, _b, _c, _d, _e, _f;
21
+ if (!op) {
22
+ return void 0;
23
+ } else if (typeof op === "string" || typeof op === "number") {
24
+ const item = {
25
+ value: op
26
+ };
27
+ return item;
28
+ } else if (optionInfo) {
29
+ const info = optionInfo(op);
30
+ if (info.type === "section") {
31
+ const section = {
32
+ type: "section",
33
+ items: (_c = (_b = (_a2 = info.items) == null ? void 0 : _a2.map) == null ? void 0 : _b.call(_a2, (item) => makeStrict(item))) == null ? void 0 : _c.filter((x) => !!x),
34
+ label: info.label,
35
+ key: `section-${sectionCount}`
36
+ };
37
+ sectionCount += 1;
38
+ return section;
39
+ } else {
40
+ let item = info;
41
+ if (!("value" in item)) {
42
+ item = {
43
+ type: "item",
44
+ value: JSON.stringify(item)
45
+ };
46
+ }
47
+ return item;
48
+ }
49
+ } else if (typeof op === "object") {
50
+ if ("items" in op) {
51
+ const section = {
52
+ type: "section",
53
+ items: (_f = (_e = (_d = op.items) == null ? void 0 : _d.map) == null ? void 0 : _e.call(_d, (item) => makeStrict(item))) == null ? void 0 : _f.filter((x) => !!x),
54
+ label: op.label,
55
+ key: `section-${sectionCount}`
56
+ };
57
+ sectionCount += 1;
58
+ return section;
59
+ } else {
60
+ let item = op;
61
+ if (!("value" in item)) {
62
+ item = {
63
+ type: "item",
64
+ value: JSON.stringify(item)
65
+ };
66
+ }
67
+ return item;
68
+ }
69
+ } else {
70
+ return void 0;
71
+ }
72
+ };
73
+ const strictOptions = (_a = options == null ? void 0 : options.map(makeStrict)) == null ? void 0 : _a.filter((x) => !!x);
74
+ const optionText = (op) => {
75
+ var _a2;
76
+ return (_a2 = op.label) != null ? _a2 : op.value;
77
+ };
78
+ return { options: strictOptions, optionText };
79
+ }
80
+ function flattenOptions(options) {
81
+ if (!options) {
82
+ return [];
83
+ } else {
84
+ return options.flatMap(
85
+ (op) => {
86
+ var _a;
87
+ return op.type === "section" ? (_a = op.items) != null ? _a : [] : op;
88
+ }
89
+ );
90
+ }
91
+ }
92
+ function makeOptionsPropType() {
93
+ const type = {
94
+ type: "array",
95
+ itemType: {
96
+ type: "object",
97
+ nameFunc: (item) => item.label || item.value,
98
+ fields: {
99
+ type: {
100
+ type: "choice",
101
+ options: [
102
+ { value: "option", label: "Option" },
103
+ { value: "option-group", label: "Option Group" }
104
+ ],
105
+ defaultValue: "option"
106
+ },
107
+ value: {
108
+ type: "string",
109
+ hidden: (_ps, _ctx, { item }) => item.type !== "option"
110
+ },
111
+ label: "string",
112
+ items: {
113
+ type: "array",
114
+ displayName: "Options",
115
+ hidden: (_ps, _ctx, { item }) => {
116
+ return item.type !== "option-group";
117
+ },
118
+ itemType: {
119
+ type: "object",
120
+ nameFunc: (item) => item.label || item.value,
121
+ fields: {
122
+ value: "string",
123
+ label: "string"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ defaultValue: [
130
+ {
131
+ value: "option1",
132
+ label: "Option 1",
133
+ type: "option"
134
+ },
135
+ {
136
+ value: "option2",
137
+ label: "Option 2",
138
+ type: "option"
139
+ }
140
+ ]
141
+ };
142
+ return type;
143
+ }
144
+ function makeValuePropType() {
145
+ const type = {
146
+ type: "choice",
147
+ options: (ps) => {
148
+ const { options, optionText } = deriveStrictOptions(ps);
149
+ return flattenOptions(options).map((op) => ({
150
+ value: op.value,
151
+ label: optionText(op)
152
+ }));
153
+ }
154
+ };
155
+ return type;
156
+ }
157
+
158
+ exports.flattenOptions = flattenOptions;
159
+ exports.makeOptionsPropType = makeOptionsPropType;
160
+ exports.makeValuePropType = makeValuePropType;
161
+ exports.useStrictOptions = useStrictOptions;
162
+ //# sourceMappingURL=option-utils-0db61f6d.cjs.js.map