@plasmicpkgs/react-aria 0.0.114 → 0.0.116
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/contexts.d.ts +1 -1
- package/dist/react-aria.esm.js +125 -45
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +124 -44
- package/dist/react-aria.js.map +1 -1
- package/dist/registerInput.d.ts +2 -2
- package/dist/registerOverlayArrow.d.ts +2 -1
- package/dist/registerTextArea.d.ts +2 -2
- package/dist/utils.d.ts +2 -0
- package/package.json +2 -2
- package/skinny/{common-c8beb360.cjs.js → common-45acb83c.cjs.js} +2 -2
- package/skinny/{common-c8beb360.cjs.js.map → common-45acb83c.cjs.js.map} +1 -1
- package/skinny/{common-10d1b069.esm.js → common-616eb178.esm.js} +2 -2
- package/skinny/{common-10d1b069.esm.js.map → common-616eb178.esm.js.map} +1 -1
- package/skinny/contexts.d.ts +1 -1
- package/skinny/registerButton.cjs.js +2 -2
- package/skinny/registerButton.esm.js +2 -2
- package/skinny/registerButton.stories.cjs.js +2 -2
- package/skinny/registerButton.stories.esm.js +2 -2
- package/skinny/registerCheckbox.cjs.js +2 -2
- package/skinny/registerCheckbox.esm.js +2 -2
- package/skinny/registerCheckboxGroup.cjs.js +2 -2
- package/skinny/registerCheckboxGroup.esm.js +2 -2
- package/skinny/registerCheckboxGroup.stories.cjs.js +2 -2
- package/skinny/registerCheckboxGroup.stories.esm.js +2 -2
- package/skinny/registerComboBox.cjs.js +3 -3
- package/skinny/registerComboBox.esm.js +3 -3
- package/skinny/registerComboBox.stories.cjs.js +3 -3
- package/skinny/registerComboBox.stories.esm.js +3 -3
- package/skinny/registerDescription.cjs.js +2 -2
- package/skinny/registerDescription.esm.js +2 -2
- package/skinny/registerDialog.cjs.js +2 -2
- package/skinny/registerDialog.esm.js +2 -2
- package/skinny/registerDialogTrigger.cjs.js +2 -2
- package/skinny/registerDialogTrigger.esm.js +2 -2
- package/skinny/registerDialogTrigger.stories.cjs.js +2 -2
- package/skinny/registerDialogTrigger.stories.esm.js +2 -2
- package/skinny/registerFieldError.cjs.js +1 -1
- package/skinny/registerFieldError.esm.js +1 -1
- package/skinny/registerForm.cjs.js +1 -1
- package/skinny/registerForm.esm.js +1 -1
- package/skinny/registerHeading.cjs.js +2 -2
- package/skinny/registerHeading.esm.js +2 -2
- package/skinny/registerInput.cjs.js +43 -21
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.d.ts +2 -2
- package/skinny/registerInput.esm.js +46 -24
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/registerLabel.cjs.js +2 -2
- package/skinny/registerLabel.esm.js +2 -2
- package/skinny/{registerListBox-87d0e61a.cjs.js → registerListBox-040b0374.cjs.js} +3 -3
- package/skinny/{registerListBox-87d0e61a.cjs.js.map → registerListBox-040b0374.cjs.js.map} +1 -1
- package/skinny/{registerListBox-a5fd72be.esm.js → registerListBox-21dc99fa.esm.js} +3 -3
- package/skinny/{registerListBox-a5fd72be.esm.js.map → registerListBox-21dc99fa.esm.js.map} +1 -1
- package/skinny/registerListBox.cjs.js +3 -3
- package/skinny/registerListBox.esm.js +3 -3
- package/skinny/registerListBoxItem.cjs.js +2 -2
- package/skinny/registerListBoxItem.esm.js +2 -2
- package/skinny/registerListbox.stories.cjs.js +3 -3
- package/skinny/registerListbox.stories.esm.js +3 -3
- package/skinny/registerModal.cjs.js +2 -2
- package/skinny/registerModal.esm.js +2 -2
- package/skinny/registerModal.stories.cjs.js +2 -2
- package/skinny/registerModal.stories.esm.js +2 -2
- package/skinny/registerOverlayArrow.cjs.js +18 -10
- package/skinny/registerOverlayArrow.cjs.js.map +1 -1
- package/skinny/registerOverlayArrow.d.ts +2 -1
- package/skinny/registerOverlayArrow.esm.js +18 -10
- package/skinny/registerOverlayArrow.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +2 -2
- package/skinny/registerPopover.esm.js +2 -2
- package/skinny/registerPopover.stories.cjs.js +65 -5
- package/skinny/registerPopover.stories.cjs.js.map +1 -1
- package/skinny/registerPopover.stories.esm.js +65 -6
- package/skinny/registerPopover.stories.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +2 -2
- package/skinny/registerRadio.esm.js +2 -2
- package/skinny/registerRadioGroup.cjs.js +2 -2
- package/skinny/registerRadioGroup.esm.js +2 -2
- package/skinny/registerRadioGroup.stories.cjs.js +2 -2
- package/skinny/registerRadioGroup.stories.esm.js +2 -2
- package/skinny/registerSection.cjs.js +3 -3
- package/skinny/registerSection.esm.js +3 -3
- package/skinny/registerSelect.cjs.js +3 -3
- package/skinny/registerSelect.esm.js +3 -3
- package/skinny/registerSelect.stories.cjs.js +3 -3
- package/skinny/registerSelect.stories.esm.js +3 -3
- package/skinny/registerSlider.cjs.js +2 -2
- package/skinny/registerSlider.esm.js +2 -2
- package/skinny/registerSlider.stories.cjs.js +2 -2
- package/skinny/registerSlider.stories.esm.js +2 -2
- package/skinny/registerSliderOutput.cjs.js +2 -2
- package/skinny/registerSliderOutput.esm.js +2 -2
- package/skinny/registerSliderThumb.cjs.js +2 -2
- package/skinny/registerSliderThumb.esm.js +2 -2
- package/skinny/registerSliderTrack.cjs.js +2 -2
- package/skinny/registerSliderTrack.esm.js +2 -2
- package/skinny/registerSwitch.cjs.js +2 -2
- package/skinny/registerSwitch.esm.js +2 -2
- package/skinny/registerSwitch.stories.cjs.js +2 -2
- package/skinny/registerSwitch.stories.esm.js +2 -2
- package/skinny/registerText.cjs.js +2 -2
- package/skinny/registerText.esm.js +2 -2
- package/skinny/registerTextArea.cjs.js +49 -19
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.d.ts +2 -2
- package/skinny/registerTextArea.esm.js +52 -22
- package/skinny/registerTextArea.esm.js.map +1 -1
- package/skinny/registerTextField-common-stories.cjs.js +2 -2
- package/skinny/registerTextField-common-stories.esm.js +2 -2
- package/skinny/registerTextField-input.stories.cjs.js +2 -2
- package/skinny/registerTextField-input.stories.esm.js +2 -2
- package/skinny/registerTextField-textarea.stories.cjs.js +2 -2
- package/skinny/registerTextField-textarea.stories.esm.js +2 -2
- package/skinny/registerTextField.cjs.js +2 -2
- package/skinny/registerTextField.esm.js +2 -2
- package/skinny/registerTooltip.cjs.js +2 -2
- package/skinny/registerTooltip.esm.js +2 -2
- package/skinny/registerTooltip.stories.cjs.js +2 -2
- package/skinny/registerTooltip.stories.esm.js +2 -2
- package/skinny/{utils-91eee672.cjs.js → utils-fc1ddd7c.cjs.js} +22 -1
- package/skinny/utils-fc1ddd7c.cjs.js.map +1 -0
- package/skinny/{utils-59f72eb9.esm.js → utils-fd88ad47.esm.js} +22 -2
- package/skinny/utils-fd88ad47.esm.js.map +1 -0
- package/skinny/utils.d.ts +2 -0
- package/skinny/utils-59f72eb9.esm.js.map +0 -1
- package/skinny/utils-91eee672.cjs.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useMemo, useEffect, useCallback } from 'react';
|
|
2
2
|
import { Section, Header, ListBox } from 'react-aria-components';
|
|
3
|
-
import { C as COMMON_STYLES } from './common-
|
|
3
|
+
import { C as COMMON_STYLES } from './common-616eb178.esm.js';
|
|
4
4
|
import { b as PlasmicListBoxContext } from './contexts-5cb81c2f.esm.js';
|
|
5
5
|
import { O as OptionsItemIdManager } from './OptionsItemIdManager-832b8cfe.esm.js';
|
|
6
6
|
import { registerListBoxItem, makeDefaultListBoxItemChildren } from './registerListBoxItem.esm.js';
|
|
7
|
-
import { r as registerComponentHelper, m as makeComponentName } from './utils-
|
|
7
|
+
import { r as registerComponentHelper, m as makeComponentName } from './utils-fd88ad47.esm.js';
|
|
8
8
|
import { p as pickAriaComponentVariants } from './variant-utils-4405ebb0.esm.js';
|
|
9
9
|
|
|
10
10
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -370,4 +370,4 @@ function registerListBox(loader, overrides) {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
export { BaseListBox as B, LIST_BOX_COMPONENT_NAME as L, BaseSection as a, registerListBox as b, listboxHelpers as l, registerSection as r };
|
|
373
|
-
//# sourceMappingURL=registerListBox-
|
|
373
|
+
//# sourceMappingURL=registerListBox-21dc99fa.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBox-a5fd72be.esm.js","sources":["../src/registerSection.tsx","../src/registerListBox.tsx"],"sourcesContent":["import React from \"react\";\nimport { Header, Section } from \"react-aria-components\";\nimport { COMMON_STYLES } from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { BaseListBox } from \"./registerListBox\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n Styleable,\n} from \"./utils\";\n\nexport interface BaseSectionProps extends Styleable {\n items: React.ReactNode;\n header: React.ReactNode;\n}\n\nexport function BaseSection(props: BaseSectionProps) {\n const { header, items, ...rest } = props;\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone = !contextProps;\n\n const section = (\n <Section {...rest} style={COMMON_STYLES}>\n <Header>{header}</Header>\n {items}\n </Section>\n );\n\n if (isStandalone) {\n return (\n // BaseListbox should give section a listbox context (that it can't be used without)\n // as well as the id manager (that is needed to identify and warn about duplication of ids)\n // selection mode needs to be single/multiple to be able to trigger hover state on it.\n <BaseListBox selectionMode=\"single\">{section}</BaseListBox>\n );\n }\n\n return section;\n}\n\nexport function registerSection(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSection>\n) {\n return registerComponentHelper(\n loader,\n BaseSection,\n {\n name: makeComponentName(\"section\"),\n displayName: \"Aria Section\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerSection\",\n importName: \"BaseSection\",\n defaultStyles: {\n width: \"stretch\",\n padding: \"10px\",\n },\n props: {\n header: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"text\",\n value: \"Section Header.\",\n },\n ],\n },\n items: {\n type: \"slot\",\n mergeWithParent: true,\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n","import React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Key, ListBox, ListBoxRenderProps } from \"react-aria-components\";\nimport { COMMON_STYLES } from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { OptionsItemIdManager } from \"./OptionsItemIdManager\";\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\";\nimport { pickAriaComponentVariants, WithVariants } from \"./variant-utils\";\n\nexport interface BaseListBoxControlContextData {\n itemIds: string[];\n isStandalone: boolean;\n}\n\nconst LISTBOX_VARIANTS = [\"focused\" as const, \"focusVisible\" as const];\n\nconst { variants } = pickAriaComponentVariants(LISTBOX_VARIANTS);\n\nexport interface BaseListBoxProps\n extends Omit<\n React.ComponentProps<typeof ListBox>,\n \"selectedKeys\" | \"defaultSelectedKeys\" | \"className\"\n >,\n HasControlContextData<BaseListBoxControlContextData>,\n WithVariants<typeof LISTBOX_VARIANTS> {\n children?: React.ReactNode;\n selectedKeys?: string | string[] | undefined;\n defaultSelectedKeys?: string | string[] | undefined;\n className?: string;\n}\n\nexport const listboxHelpers = {\n states: {\n selectedValue: {\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 className,\n selectedKeys,\n defaultSelectedKeys,\n plasmicUpdateVariant,\n ...rest\n } = props;\n const context = React.useContext(PlasmicListBoxContext);\n const isStandalone = !context;\n const [ids, setIds] = useState<string[]>([]);\n const idManager = useMemo(\n () => context?.idManager ?? new OptionsItemIdManager(),\n []\n );\n\n useEffect(() => {\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 classNameProp = useCallback(\n ({ isFocusVisible, isFocused }: ListBoxRenderProps) => {\n plasmicUpdateVariant?.({\n focused: isFocused,\n focusVisible: isFocusVisible,\n });\n return className ?? \"\";\n },\n [className, plasmicUpdateVariant]\n );\n\n const listbox = (\n <ListBox\n selectedKeys={normalizeSelectedKeys(selectedKeys)}\n defaultSelectedKeys={normalizeSelectedKeys(defaultSelectedKeys)}\n className={classNameProp}\n style={COMMON_STYLES}\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 variants,\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 editOnly: true,\n uncontrolledProp: \"defaultSelectedKeys\",\n displayName: \"Initial selected item\",\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: \"selectedValues\", type: \"object\" }],\n },\n },\n states: {\n selectedValue: {\n type: \"writable\",\n valueProp: \"selectedKeys\",\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"text\",\n ...listboxHelpers.states.selectedValue,\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":["__objRest","__spreadValues","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAmC,MAAA,EAAA,GAAA,KAAA,EAA3B,UAAQ,KAnBlB,EAAA,GAmBqC,IAAT,IAAS,GAAAA,WAAA,CAAA,EAAA,EAAT,CAAlB,QAAQ,EAAA,OAAA,CAAA,CAAA,CAAA;AAChB,EAAM,MAAA,YAAA,GAAe,KAAM,CAAA,UAAA,CAAW,qBAAqB,CAAA,CAAA;AAC3D,EAAA,MAAM,eAAe,CAAC,YAAA,CAAA;AAEtB,EAAM,MAAA,OAAA,mBACH,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,aAAA,CAAAC,gBAAA,CAAA,EAAA,EAAY,IAAZ,CAAA,EAAA,EAAkB,KAAO,EAAA,aAAA,EAAA,CAAA,kBACvB,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAQ,MAAO,CAAA,EACf,KACH,CAAA,CAAA;AAGF,EAAA,IAAI,YAAc,EAAA;AAChB,IAAA;AAAA;AAAA;AAAA;AAAA,sBAIG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A,KAAA;AAAA,SACf;AAAA,QACA,iBAAmB,EAAA;AAAA,UACjB,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,gBAAkB,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,SACvD;AAAA,OACF;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,aAAe,EAAA,cAAA,CAAA;AAAA,UACb,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,cAAA;AAAA,UACX,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,UAChD,YAAc,EAAA,mBAAA;AAAA,UACd,YAAc,EAAA,MAAA;AAAA,SAAA,EACX,eAAe,MAAO,CAAA,aAAA,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;;;;"}
|
|
1
|
+
{"version":3,"file":"registerListBox-21dc99fa.esm.js","sources":["../src/registerSection.tsx","../src/registerListBox.tsx"],"sourcesContent":["import React from \"react\";\nimport { Header, Section } from \"react-aria-components\";\nimport { COMMON_STYLES } from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { BaseListBox } from \"./registerListBox\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n Styleable,\n} from \"./utils\";\n\nexport interface BaseSectionProps extends Styleable {\n items: React.ReactNode;\n header: React.ReactNode;\n}\n\nexport function BaseSection(props: BaseSectionProps) {\n const { header, items, ...rest } = props;\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone = !contextProps;\n\n const section = (\n <Section {...rest} style={COMMON_STYLES}>\n <Header>{header}</Header>\n {items}\n </Section>\n );\n\n if (isStandalone) {\n return (\n // BaseListbox should give section a listbox context (that it can't be used without)\n // as well as the id manager (that is needed to identify and warn about duplication of ids)\n // selection mode needs to be single/multiple to be able to trigger hover state on it.\n <BaseListBox selectionMode=\"single\">{section}</BaseListBox>\n );\n }\n\n return section;\n}\n\nexport function registerSection(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSection>\n) {\n return registerComponentHelper(\n loader,\n BaseSection,\n {\n name: makeComponentName(\"section\"),\n displayName: \"Aria Section\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerSection\",\n importName: \"BaseSection\",\n defaultStyles: {\n width: \"stretch\",\n padding: \"10px\",\n },\n props: {\n header: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"text\",\n value: \"Section Header.\",\n },\n ],\n },\n items: {\n type: \"slot\",\n mergeWithParent: true,\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n","import React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Key, ListBox, ListBoxRenderProps } from \"react-aria-components\";\nimport { COMMON_STYLES } from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { OptionsItemIdManager } from \"./OptionsItemIdManager\";\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\";\nimport { pickAriaComponentVariants, WithVariants } from \"./variant-utils\";\n\nexport interface BaseListBoxControlContextData {\n itemIds: string[];\n isStandalone: boolean;\n}\n\nconst LISTBOX_VARIANTS = [\"focused\" as const, \"focusVisible\" as const];\n\nconst { variants } = pickAriaComponentVariants(LISTBOX_VARIANTS);\n\nexport interface BaseListBoxProps\n extends Omit<\n React.ComponentProps<typeof ListBox>,\n \"selectedKeys\" | \"defaultSelectedKeys\" | \"className\"\n >,\n HasControlContextData<BaseListBoxControlContextData>,\n WithVariants<typeof LISTBOX_VARIANTS> {\n children?: React.ReactNode;\n selectedKeys?: string | string[] | undefined;\n defaultSelectedKeys?: string | string[] | undefined;\n className?: string;\n}\n\nexport const listboxHelpers = {\n states: {\n selectedValue: {\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 className,\n selectedKeys,\n defaultSelectedKeys,\n plasmicUpdateVariant,\n ...rest\n } = props;\n const context = React.useContext(PlasmicListBoxContext);\n const isStandalone = !context;\n const [ids, setIds] = useState<string[]>([]);\n const idManager = useMemo(\n () => context?.idManager ?? new OptionsItemIdManager(),\n []\n );\n\n useEffect(() => {\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 classNameProp = useCallback(\n ({ isFocusVisible, isFocused }: ListBoxRenderProps) => {\n plasmicUpdateVariant?.({\n focused: isFocused,\n focusVisible: isFocusVisible,\n });\n return className ?? \"\";\n },\n [className, plasmicUpdateVariant]\n );\n\n const listbox = (\n <ListBox\n selectedKeys={normalizeSelectedKeys(selectedKeys)}\n defaultSelectedKeys={normalizeSelectedKeys(defaultSelectedKeys)}\n className={classNameProp}\n style={COMMON_STYLES}\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 variants,\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 editOnly: true,\n uncontrolledProp: \"defaultSelectedKeys\",\n displayName: \"Initial selected item\",\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: \"selectedValues\", type: \"object\" }],\n },\n },\n states: {\n selectedValue: {\n type: \"writable\",\n valueProp: \"selectedKeys\",\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"text\",\n ...listboxHelpers.states.selectedValue,\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":["__objRest","__spreadValues","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAmC,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AA,gBAAA;AAAA,QACZ,UAAY,EAAA,gDAAA;AAAA,OACd;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
require('react');
|
|
4
4
|
require('react-aria-components');
|
|
5
|
-
require('./common-
|
|
5
|
+
require('./common-45acb83c.cjs.js');
|
|
6
6
|
require('./contexts-6d0cb2b1.cjs.js');
|
|
7
7
|
require('./OptionsItemIdManager-a89a28b9.cjs.js');
|
|
8
8
|
require('./registerListBoxItem.cjs.js');
|
|
9
|
-
var registerSection = require('./registerListBox-
|
|
10
|
-
require('./utils-
|
|
9
|
+
var registerSection = require('./registerListBox-040b0374.cjs.js');
|
|
10
|
+
require('./utils-fc1ddd7c.cjs.js');
|
|
11
11
|
require('./variant-utils-0ad70db8.cjs.js');
|
|
12
12
|
require('./registerDescription.cjs.js');
|
|
13
13
|
require('./registerText.cjs.js');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'react-aria-components';
|
|
3
|
-
import './common-
|
|
3
|
+
import './common-616eb178.esm.js';
|
|
4
4
|
import './contexts-5cb81c2f.esm.js';
|
|
5
5
|
import './OptionsItemIdManager-832b8cfe.esm.js';
|
|
6
6
|
import './registerListBoxItem.esm.js';
|
|
7
|
-
export { B as BaseListBox, L as LIST_BOX_COMPONENT_NAME, l as listboxHelpers, b as registerListBox } from './registerListBox-
|
|
8
|
-
import './utils-
|
|
7
|
+
export { B as BaseListBox, L as LIST_BOX_COMPONENT_NAME, l as listboxHelpers, b as registerListBox } from './registerListBox-21dc99fa.esm.js';
|
|
8
|
+
import './utils-fd88ad47.esm.js';
|
|
9
9
|
import './variant-utils-4405ebb0.esm.js';
|
|
10
10
|
import './registerDescription.esm.js';
|
|
11
11
|
import './registerText.esm.js';
|
|
@@ -2,11 +2,11 @@
|
|
|
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-45acb83c.cjs.js');
|
|
6
6
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
7
7
|
var registerDescription = require('./registerDescription.cjs.js');
|
|
8
8
|
var registerText = require('./registerText.cjs.js');
|
|
9
|
-
var utils = require('./utils-
|
|
9
|
+
var utils = require('./utils-fc1ddd7c.cjs.js');
|
|
10
10
|
var variantUtils = require('./variant-utils-0ad70db8.cjs.js');
|
|
11
11
|
require('@plasmicapp/host');
|
|
12
12
|
require('@plasmicapp/host/registerComponent');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { ListBoxItem, ListBox } from 'react-aria-components';
|
|
3
|
-
import { C as COMMON_STYLES } from './common-
|
|
3
|
+
import { C as COMMON_STYLES } from './common-616eb178.esm.js';
|
|
4
4
|
import { b as PlasmicListBoxContext } from './contexts-5cb81c2f.esm.js';
|
|
5
5
|
import { DESCRIPTION_COMPONENT_NAME } from './registerDescription.esm.js';
|
|
6
6
|
import { TEXT_COMPONENT_NAME } from './registerText.esm.js';
|
|
7
|
-
import { r as registerComponentHelper, m as makeComponentName } from './utils-
|
|
7
|
+
import { r as registerComponentHelper, m as makeComponentName } from './utils-fd88ad47.esm.js';
|
|
8
8
|
import { p as pickAriaComponentVariants } from './variant-utils-4405ebb0.esm.js';
|
|
9
9
|
import '@plasmicapp/host';
|
|
10
10
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var test = require('@storybook/test');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
8
|
-
var registerSection = require('./registerListBox-
|
|
8
|
+
var registerSection = require('./registerListBox-040b0374.cjs.js');
|
|
9
9
|
var registerListBoxItem = require('./registerListBoxItem.cjs.js');
|
|
10
|
-
require('./common-
|
|
11
|
-
require('./utils-
|
|
10
|
+
require('./common-45acb83c.cjs.js');
|
|
11
|
+
require('./utils-fc1ddd7c.cjs.js');
|
|
12
12
|
require('@plasmicapp/host');
|
|
13
13
|
require('@plasmicapp/host/registerComponent');
|
|
14
14
|
require('./contexts-6d0cb2b1.cjs.js');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { fn, within, expect, userEvent } from '@storybook/test';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ListBoxItem } from 'react-aria-components';
|
|
4
|
-
import { B as BaseListBox, a as BaseSection } from './registerListBox-
|
|
4
|
+
import { B as BaseListBox, a as BaseSection } from './registerListBox-21dc99fa.esm.js';
|
|
5
5
|
import { BaseListBoxItem } from './registerListBoxItem.esm.js';
|
|
6
|
-
import './common-
|
|
7
|
-
import './utils-
|
|
6
|
+
import './common-616eb178.esm.js';
|
|
7
|
+
import './utils-fd88ad47.esm.js';
|
|
8
8
|
import '@plasmicapp/host';
|
|
9
9
|
import '@plasmicapp/host/registerComponent';
|
|
10
10
|
import './contexts-5cb81c2f.esm.js';
|
|
@@ -4,9 +4,9 @@ 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-45acb83c.cjs.js');
|
|
8
8
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
9
|
-
var utils = require('./utils-
|
|
9
|
+
var utils = require('./utils-fc1ddd7c.cjs.js');
|
|
10
10
|
require('@plasmicapp/host/registerComponent');
|
|
11
11
|
|
|
12
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -2,9 +2,9 @@ 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 } from 'react-aria-components';
|
|
5
|
-
import { h as hasParent } from './common-
|
|
5
|
+
import { h as hasParent } from './common-616eb178.esm.js';
|
|
6
6
|
import { d as PlasmicDialogTriggerContext } from './contexts-5cb81c2f.esm.js';
|
|
7
|
-
import { a as useIsOpen, m as makeComponentName, r as registerComponentHelper } from './utils-
|
|
7
|
+
import { a as useIsOpen, m as makeComponentName, r as registerComponentHelper } from './utils-fd88ad47.esm.js';
|
|
8
8
|
import '@plasmicapp/host/registerComponent';
|
|
9
9
|
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
@@ -8,8 +8,8 @@ var React = require('react');
|
|
|
8
8
|
var registerModal = require('./registerModal.cjs.js');
|
|
9
9
|
require('react-aria');
|
|
10
10
|
require('react-aria-components');
|
|
11
|
-
require('./common-
|
|
12
|
-
require('./utils-
|
|
11
|
+
require('./common-45acb83c.cjs.js');
|
|
12
|
+
require('./utils-fc1ddd7c.cjs.js');
|
|
13
13
|
require('@plasmicapp/host/registerComponent');
|
|
14
14
|
require('./contexts-6d0cb2b1.cjs.js');
|
|
15
15
|
|
|
@@ -4,8 +4,8 @@ import React, { useState, useEffect } from 'react';
|
|
|
4
4
|
import { BaseModal } from './registerModal.esm.js';
|
|
5
5
|
import 'react-aria';
|
|
6
6
|
import 'react-aria-components';
|
|
7
|
-
import './common-
|
|
8
|
-
import './utils-
|
|
7
|
+
import './common-616eb178.esm.js';
|
|
8
|
+
import './utils-fd88ad47.esm.js';
|
|
9
9
|
import '@plasmicapp/host/registerComponent';
|
|
10
10
|
import './contexts-5cb81c2f.esm.js';
|
|
11
11
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
6
|
-
var utils = require('./utils-
|
|
5
|
+
var common = require('./common-45acb83c.cjs.js');
|
|
6
|
+
var utils = require('./utils-fc1ddd7c.cjs.js');
|
|
7
7
|
var variantUtils = require('./variant-utils-0ad70db8.cjs.js');
|
|
8
8
|
require('@plasmicapp/host');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|
|
@@ -39,20 +39,28 @@ const { variants, withObservedValues } = variantUtils.pickAriaComponentVariants(
|
|
|
39
39
|
);
|
|
40
40
|
function BaseOverlayArrow({
|
|
41
41
|
children,
|
|
42
|
-
plasmicUpdateVariant
|
|
42
|
+
plasmicUpdateVariant,
|
|
43
|
+
className
|
|
43
44
|
}) {
|
|
44
45
|
const popoverContext = React__default.default.useContext(reactAriaComponents.PopoverContext);
|
|
45
46
|
const tooltipContext = React__default.default.useContext(reactAriaComponents.TooltipContext);
|
|
46
47
|
const isStandalone = !popoverContext && !tooltipContext;
|
|
47
|
-
const overlayArrow = /* @__PURE__ */ React__default.default.createElement(
|
|
48
|
-
|
|
48
|
+
const overlayArrow = /* @__PURE__ */ React__default.default.createElement(
|
|
49
|
+
reactAriaComponents.OverlayArrow,
|
|
49
50
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
placementRight: placement === "right"
|
|
51
|
+
className,
|
|
52
|
+
style: __spreadValues({ lineHeight: "0" }, common.COMMON_STYLES)
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
({ placement }) => withObservedValues(
|
|
55
|
+
children,
|
|
56
|
+
{
|
|
57
|
+
placementTop: placement === "top",
|
|
58
|
+
placementLeft: placement === "left",
|
|
59
|
+
placementRight: placement === "right"
|
|
60
|
+
},
|
|
61
|
+
plasmicUpdateVariant
|
|
62
|
+
)
|
|
63
|
+
);
|
|
56
64
|
if (isStandalone) {
|
|
57
65
|
return /* @__PURE__ */ React__default.default.createElement("div", { style: { position: "relative" } }, overlayArrow);
|
|
58
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerOverlayArrow.cjs.js","sources":["../src/registerOverlayArrow.tsx"],"sourcesContent":["import React from \"react\";\nimport type {\n OverlayArrowProps,\n OverlayArrowRenderProps,\n} from \"react-aria-components\";\nimport {\n OverlayArrow,\n PopoverContext,\n TooltipContext,\n} from \"react-aria-components\";\nimport { arrowDown, COMMON_STYLES } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nimport { pickAriaComponentVariants, WithVariants } from \"./variant-utils\";\n\nconst OVERLAY_ARROW_VARIANTS = [\n // We do not offer a placementDown variant, because that's the default placement (an overlay arrow always has [data-placement=bottom] if it's not explicitly set)\n \"placementTop\" as const,\n \"placementLeft\" as const,\n \"placementRight\" as const,\n];\n\nexport interface BaseOverlayArrowProps\n extends OverlayArrowProps,\n WithVariants<typeof OVERLAY_ARROW_VARIANTS> {\n children: React.ReactNode;\n}\n\nconst { variants, withObservedValues } = pickAriaComponentVariants(\n OVERLAY_ARROW_VARIANTS\n);\n\nexport function BaseOverlayArrow({\n children,\n plasmicUpdateVariant,\n}: BaseOverlayArrowProps) {\n const popoverContext = React.useContext(PopoverContext);\n const tooltipContext = React.useContext(TooltipContext);\n const isStandalone = !popoverContext && !tooltipContext; // i.e. without a trigger to point to\n const overlayArrow = (\n <OverlayArrow
|
|
1
|
+
{"version":3,"file":"registerOverlayArrow.cjs.js","sources":["../src/registerOverlayArrow.tsx"],"sourcesContent":["import React from \"react\";\nimport type {\n OverlayArrowProps,\n OverlayArrowRenderProps,\n} from \"react-aria-components\";\nimport {\n OverlayArrow,\n PopoverContext,\n TooltipContext,\n} from \"react-aria-components\";\nimport { arrowDown, COMMON_STYLES } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nimport { pickAriaComponentVariants, WithVariants } from \"./variant-utils\";\n\nconst OVERLAY_ARROW_VARIANTS = [\n // We do not offer a placementDown variant, because that's the default placement (an overlay arrow always has [data-placement=bottom] if it's not explicitly set)\n \"placementTop\" as const,\n \"placementLeft\" as const,\n \"placementRight\" as const,\n];\n\nexport interface BaseOverlayArrowProps\n extends OverlayArrowProps,\n WithVariants<typeof OVERLAY_ARROW_VARIANTS> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst { variants, withObservedValues } = pickAriaComponentVariants(\n OVERLAY_ARROW_VARIANTS\n);\n\nexport function BaseOverlayArrow({\n children,\n plasmicUpdateVariant,\n className,\n}: BaseOverlayArrowProps) {\n const popoverContext = React.useContext(PopoverContext);\n const tooltipContext = React.useContext(TooltipContext);\n const isStandalone = !popoverContext && !tooltipContext; // i.e. without a trigger to point to\n const overlayArrow = (\n <OverlayArrow\n className={className}\n style={{ lineHeight: \"0\", ...COMMON_STYLES }}\n >\n {({ placement }: OverlayArrowRenderProps) =>\n withObservedValues(\n children,\n {\n placementTop: placement === \"top\",\n placementLeft: placement === \"left\",\n placementRight: placement === \"right\",\n },\n plasmicUpdateVariant\n )\n }\n </OverlayArrow>\n );\n if (isStandalone) {\n return <div style={{ position: \"relative\" }}>{overlayArrow}</div>;\n }\n return overlayArrow;\n}\n\nexport const OVERLAY_ARROW_COMPONENT_NAME = makeComponentName(\"overlayArrow\");\n\nexport function registerOverlayArrow(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseOverlayArrow>\n) {\n return registerComponentHelper(\n loader,\n BaseOverlayArrow,\n {\n name: OVERLAY_ARROW_COMPONENT_NAME,\n displayName: \"Aria Overlay Arrow\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerOverlayArrow\",\n importName: \"BaseOverlayArrow\",\n styleSections: false,\n variants,\n props: {\n children: {\n type: \"slot\",\n defaultValue: arrowDown,\n },\n },\n },\n overrides\n );\n}\n"],"names":["pickAriaComponentVariants","React","PopoverContext","TooltipContext","OverlayArrow","COMMON_STYLES","makeComponentName","registerComponentHelper","arrowDown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,sBAAyB,GAAA;AAAA;AAAA,EAE7B,cAAA;AAAA,EACA,eAAA;AAAA,E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;AAAA,MACE,IAAM,EAAA,4BAAA;AAAA,MACN,WAAa,EAAA,oBAAA;AAAA,MACb,UAAY,EAAA,qDAAA;AAAA,MACZ,UAAY,EAAA,kBAAA;AAAA,MACZ,aAAe,EAAA,KAAA;AAAA,MACf,QAAA;AAAA,MACA,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,UACN,YAAc,EAAAC,gBAAA;AAAA,SAChB;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;;"}
|
|
@@ -5,8 +5,9 @@ import { WithVariants } from "./variant-utils";
|
|
|
5
5
|
declare const OVERLAY_ARROW_VARIANTS: ("placementLeft" | "placementRight" | "placementTop")[];
|
|
6
6
|
export interface BaseOverlayArrowProps extends OverlayArrowProps, WithVariants<typeof OVERLAY_ARROW_VARIANTS> {
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare function BaseOverlayArrow({ children, plasmicUpdateVariant, }: BaseOverlayArrowProps): React.JSX.Element;
|
|
10
|
+
export declare function BaseOverlayArrow({ children, plasmicUpdateVariant, className, }: BaseOverlayArrowProps): React.JSX.Element;
|
|
10
11
|
export declare const OVERLAY_ARROW_COMPONENT_NAME: string;
|
|
11
12
|
export declare function registerOverlayArrow(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseOverlayArrow>): import("@plasmicapp/host").CodeComponentMeta<BaseOverlayArrowProps>;
|
|
12
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PopoverContext, TooltipContext, OverlayArrow } from 'react-aria-components';
|
|
3
|
-
import { C as COMMON_STYLES, a as arrowDown } from './common-
|
|
4
|
-
import { m as makeComponentName, r as registerComponentHelper } from './utils-
|
|
3
|
+
import { C as COMMON_STYLES, a as arrowDown } from './common-616eb178.esm.js';
|
|
4
|
+
import { m as makeComponentName, r as registerComponentHelper } from './utils-fd88ad47.esm.js';
|
|
5
5
|
import { p as pickAriaComponentVariants } from './variant-utils-4405ebb0.esm.js';
|
|
6
6
|
import '@plasmicapp/host';
|
|
7
7
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -33,20 +33,28 @@ const { variants, withObservedValues } = pickAriaComponentVariants(
|
|
|
33
33
|
);
|
|
34
34
|
function BaseOverlayArrow({
|
|
35
35
|
children,
|
|
36
|
-
plasmicUpdateVariant
|
|
36
|
+
plasmicUpdateVariant,
|
|
37
|
+
className
|
|
37
38
|
}) {
|
|
38
39
|
const popoverContext = React.useContext(PopoverContext);
|
|
39
40
|
const tooltipContext = React.useContext(TooltipContext);
|
|
40
41
|
const isStandalone = !popoverContext && !tooltipContext;
|
|
41
|
-
const overlayArrow = /* @__PURE__ */ React.createElement(
|
|
42
|
-
|
|
42
|
+
const overlayArrow = /* @__PURE__ */ React.createElement(
|
|
43
|
+
OverlayArrow,
|
|
43
44
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
placementRight: placement === "right"
|
|
45
|
+
className,
|
|
46
|
+
style: __spreadValues({ lineHeight: "0" }, COMMON_STYLES)
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
({ placement }) => withObservedValues(
|
|
49
|
+
children,
|
|
50
|
+
{
|
|
51
|
+
placementTop: placement === "top",
|
|
52
|
+
placementLeft: placement === "left",
|
|
53
|
+
placementRight: placement === "right"
|
|
54
|
+
},
|
|
55
|
+
plasmicUpdateVariant
|
|
56
|
+
)
|
|
57
|
+
);
|
|
50
58
|
if (isStandalone) {
|
|
51
59
|
return /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, overlayArrow);
|
|
52
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerOverlayArrow.esm.js","sources":["../src/registerOverlayArrow.tsx"],"sourcesContent":["import React from \"react\";\nimport type {\n OverlayArrowProps,\n OverlayArrowRenderProps,\n} from \"react-aria-components\";\nimport {\n OverlayArrow,\n PopoverContext,\n TooltipContext,\n} from \"react-aria-components\";\nimport { arrowDown, COMMON_STYLES } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nimport { pickAriaComponentVariants, WithVariants } from \"./variant-utils\";\n\nconst OVERLAY_ARROW_VARIANTS = [\n // We do not offer a placementDown variant, because that's the default placement (an overlay arrow always has [data-placement=bottom] if it's not explicitly set)\n \"placementTop\" as const,\n \"placementLeft\" as const,\n \"placementRight\" as const,\n];\n\nexport interface BaseOverlayArrowProps\n extends OverlayArrowProps,\n WithVariants<typeof OVERLAY_ARROW_VARIANTS> {\n children: React.ReactNode;\n}\n\nconst { variants, withObservedValues } = pickAriaComponentVariants(\n OVERLAY_ARROW_VARIANTS\n);\n\nexport function BaseOverlayArrow({\n children,\n plasmicUpdateVariant,\n}: BaseOverlayArrowProps) {\n const popoverContext = React.useContext(PopoverContext);\n const tooltipContext = React.useContext(TooltipContext);\n const isStandalone = !popoverContext && !tooltipContext; // i.e. without a trigger to point to\n const overlayArrow = (\n <OverlayArrow
|
|
1
|
+
{"version":3,"file":"registerOverlayArrow.esm.js","sources":["../src/registerOverlayArrow.tsx"],"sourcesContent":["import React from \"react\";\nimport type {\n OverlayArrowProps,\n OverlayArrowRenderProps,\n} from \"react-aria-components\";\nimport {\n OverlayArrow,\n PopoverContext,\n TooltipContext,\n} from \"react-aria-components\";\nimport { arrowDown, COMMON_STYLES } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nimport { pickAriaComponentVariants, WithVariants } from \"./variant-utils\";\n\nconst OVERLAY_ARROW_VARIANTS = [\n // We do not offer a placementDown variant, because that's the default placement (an overlay arrow always has [data-placement=bottom] if it's not explicitly set)\n \"placementTop\" as const,\n \"placementLeft\" as const,\n \"placementRight\" as const,\n];\n\nexport interface BaseOverlayArrowProps\n extends OverlayArrowProps,\n WithVariants<typeof OVERLAY_ARROW_VARIANTS> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst { variants, withObservedValues } = pickAriaComponentVariants(\n OVERLAY_ARROW_VARIANTS\n);\n\nexport function BaseOverlayArrow({\n children,\n plasmicUpdateVariant,\n className,\n}: BaseOverlayArrowProps) {\n const popoverContext = React.useContext(PopoverContext);\n const tooltipContext = React.useContext(TooltipContext);\n const isStandalone = !popoverContext && !tooltipContext; // i.e. without a trigger to point to\n const overlayArrow = (\n <OverlayArrow\n className={className}\n style={{ lineHeight: \"0\", ...COMMON_STYLES }}\n >\n {({ placement }: OverlayArrowRenderProps) =>\n withObservedValues(\n children,\n {\n placementTop: placement === \"top\",\n placementLeft: placement === \"left\",\n placementRight: placement === \"right\",\n },\n plasmicUpdateVariant\n )\n }\n </OverlayArrow>\n );\n if (isStandalone) {\n return <div style={{ position: \"relative\" }}>{overlayArrow}</div>;\n }\n return overlayArrow;\n}\n\nexport const OVERLAY_ARROW_COMPONENT_NAME = makeComponentName(\"overlayArrow\");\n\nexport function registerOverlayArrow(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseOverlayArrow>\n) {\n return registerComponentHelper(\n loader,\n BaseOverlayArrow,\n {\n name: OVERLAY_ARROW_COMPONENT_NAME,\n displayName: \"Aria Overlay Arrow\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerOverlayArrow\",\n importName: \"BaseOverlayArrow\",\n styleSections: false,\n variants,\n props: {\n children: {\n type: \"slot\",\n defaultValue: arrowDown,\n },\n },\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,sBAAyB,GAAA;AAAA;AAAA,EAE7B,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AACF,CAAA,CAAA;AASA,MAAM,EAAE,QAAU,EAAA,kBAAA,EAAuB,GAAA,yBAAA;AAAA,EACvC,sBAAA;AACF,CAAA,CAAA;AAE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AA,KAAA;AAAA,MACf,QAAA;AAAA,MACA,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,UACN,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -4,9 +4,9 @@ var host = require('@plasmicapp/host');
|
|
|
4
4
|
var utils = require('@react-aria/utils');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var common = require('./common-
|
|
7
|
+
var common = require('./common-45acb83c.cjs.js');
|
|
8
8
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
9
|
-
var utils$1 = require('./utils-
|
|
9
|
+
var utils$1 = require('./utils-fc1ddd7c.cjs.js');
|
|
10
10
|
var variantUtils = require('./variant-utils-0ad70db8.cjs.js');
|
|
11
11
|
require('@plasmicapp/host/registerComponent');
|
|
12
12
|
|
|
@@ -2,9 +2,9 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import { mergeProps } from '@react-aria/utils';
|
|
3
3
|
import React, { useEffect } from 'react';
|
|
4
4
|
import { PopoverContext, Popover } from 'react-aria-components';
|
|
5
|
-
import { C as COMMON_STYLES, b as getCommonOverlayProps } from './common-
|
|
5
|
+
import { C as COMMON_STYLES, b as getCommonOverlayProps } from './common-616eb178.esm.js';
|
|
6
6
|
import { a as PlasmicPopoverTriggerContext } from './contexts-5cb81c2f.esm.js';
|
|
7
|
-
import { m as makeComponentName, r as registerComponentHelper } from './utils-
|
|
7
|
+
import { m as makeComponentName, r as registerComponentHelper } from './utils-fd88ad47.esm.js';
|
|
8
8
|
import { p as pickAriaComponentVariants } from './variant-utils-4405ebb0.esm.js';
|
|
9
9
|
import '@plasmicapp/host/registerComponent';
|
|
10
10
|
|
|
@@ -4,20 +4,49 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var test = require('@storybook/test');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var registerOverlayArrow = require('./registerOverlayArrow.cjs.js');
|
|
7
8
|
var registerPopover = require('./registerPopover.cjs.js');
|
|
8
|
-
require('@plasmicapp/host');
|
|
9
|
-
require('@react-aria/utils');
|
|
10
9
|
require('react-aria-components');
|
|
11
|
-
require('./common-
|
|
12
|
-
require('./utils-
|
|
10
|
+
require('./common-45acb83c.cjs.js');
|
|
11
|
+
require('./utils-fc1ddd7c.cjs.js');
|
|
12
|
+
require('@plasmicapp/host');
|
|
13
13
|
require('@plasmicapp/host/registerComponent');
|
|
14
|
-
require('./contexts-6d0cb2b1.cjs.js');
|
|
15
14
|
require('./variant-utils-0ad70db8.cjs.js');
|
|
15
|
+
require('@react-aria/utils');
|
|
16
|
+
require('./contexts-6d0cb2b1.cjs.js');
|
|
16
17
|
|
|
17
18
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
19
|
|
|
19
20
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
20
21
|
|
|
22
|
+
var __defProp = Object.defineProperty;
|
|
23
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
24
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
25
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
26
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
27
|
+
var __spreadValues = (a, b) => {
|
|
28
|
+
for (var prop in b || (b = {}))
|
|
29
|
+
if (__hasOwnProp.call(b, prop))
|
|
30
|
+
__defNormalProp(a, prop, b[prop]);
|
|
31
|
+
if (__getOwnPropSymbols)
|
|
32
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
33
|
+
if (__propIsEnum.call(b, prop))
|
|
34
|
+
__defNormalProp(a, prop, b[prop]);
|
|
35
|
+
}
|
|
36
|
+
return a;
|
|
37
|
+
};
|
|
38
|
+
var __objRest = (source, exclude) => {
|
|
39
|
+
var target = {};
|
|
40
|
+
for (var prop in source)
|
|
41
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
42
|
+
target[prop] = source[prop];
|
|
43
|
+
if (source != null && __getOwnPropSymbols)
|
|
44
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
45
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
46
|
+
target[prop] = source[prop];
|
|
47
|
+
}
|
|
48
|
+
return target;
|
|
49
|
+
};
|
|
21
50
|
const meta = {
|
|
22
51
|
title: "Components/BasePopover",
|
|
23
52
|
component: registerPopover.BasePopover,
|
|
@@ -36,7 +65,38 @@ const Standalone = {
|
|
|
36
65
|
test.expect(args.onOpenChange).not.toHaveBeenCalled();
|
|
37
66
|
}
|
|
38
67
|
};
|
|
68
|
+
const WithArrow = {
|
|
69
|
+
render: (_a) => {
|
|
70
|
+
var _b = _a, { children } = _b, args = __objRest(_b, ["children"]);
|
|
71
|
+
return /* @__PURE__ */ React__default.default.createElement(registerPopover.BasePopover, __spreadValues({}, args), /* @__PURE__ */ React__default.default.createElement(
|
|
72
|
+
"style",
|
|
73
|
+
{
|
|
74
|
+
dangerouslySetInnerHTML: {
|
|
75
|
+
__html: `
|
|
76
|
+
.triangle-up {
|
|
77
|
+
width: 1px;
|
|
78
|
+
height: 1px;
|
|
79
|
+
border-left: 10px solid transparent;
|
|
80
|
+
border-right: 10px solid transparent;
|
|
81
|
+
border-bottom: 10px solid black;
|
|
82
|
+
}
|
|
83
|
+
`
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
), /* @__PURE__ */ React__default.default.createElement(registerOverlayArrow.BaseOverlayArrow, { className: "triangle-up" }), children);
|
|
87
|
+
},
|
|
88
|
+
play: async ({ args }) => {
|
|
89
|
+
const doc = test.within(document.body);
|
|
90
|
+
await test.waitFor(() => {
|
|
91
|
+
test.expect(doc.getByTestId("popover-content")).toBeInTheDocument();
|
|
92
|
+
test.expect(document.querySelector(".triangle-up")).toBeInTheDocument();
|
|
93
|
+
});
|
|
94
|
+
await test.userEvent.click(document.body);
|
|
95
|
+
test.expect(args.onOpenChange).not.toHaveBeenCalled();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
39
98
|
|
|
40
99
|
exports.Standalone = Standalone;
|
|
100
|
+
exports.WithArrow = WithArrow;
|
|
41
101
|
exports.default = meta;
|
|
42
102
|
//# sourceMappingURL=registerPopover.stories.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerPopover.stories.cjs.js","sources":["../src/registerPopover.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { expect, fn, userEvent, waitFor, within } from \"@storybook/test\";\nimport React from \"react\";\nimport { BasePopover } from \"./registerPopover\";\n\nconst meta: Meta<typeof BasePopover> = {\n title: \"Components/BasePopover\",\n component: BasePopover,\n args: {\n onOpenChange: fn(),\n children: (\n <div data-testid=\"popover-content\">\n <h2>Standalone Popover</h2>\n <p>This popover is rendered without a trigger</p>\n </div>\n ),\n },\n};\n\nexport default meta;\ntype Story = StoryObj<typeof BasePopover>;\n\n// Standalone popover should always remain open, because we assume that popover is always going to be controlled by a parent like Select, Combobox, DialogTrigger, etc, and its only really standalone in component view\nexport const Standalone: Story = {\n play: async ({ args }) => {\n const doc = within(document.body);\n\n // Verify popover is visible\n await waitFor(() => {\n expect(doc.getByTestId(\"popover-content\")).toBeInTheDocument();\n });\n // Click outside should not dismiss popover\n await userEvent.click(document.body);\n expect(args.onOpenChange).not.toHaveBeenCalled();\n },\n};\n"],"names":["BasePopover","fn","React","within","waitFor","expect","userEvent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerPopover.stories.cjs.js","sources":["../src/registerPopover.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { expect, fn, userEvent, waitFor, within } from \"@storybook/test\";\nimport React from \"react\";\nimport { BaseOverlayArrow } from \"./registerOverlayArrow\";\nimport { BasePopover } from \"./registerPopover\";\n\nconst meta: Meta<typeof BasePopover> = {\n title: \"Components/BasePopover\",\n component: BasePopover,\n args: {\n onOpenChange: fn(),\n children: (\n <div data-testid=\"popover-content\">\n <h2>Standalone Popover</h2>\n <p>This popover is rendered without a trigger</p>\n </div>\n ),\n },\n};\n\nexport default meta;\ntype Story = StoryObj<typeof BasePopover>;\n\n// Standalone popover should always remain open, because we assume that popover is always going to be controlled by a parent like Select, Combobox, DialogTrigger, etc, and its only really standalone in component view\nexport const Standalone: Story = {\n play: async ({ args }) => {\n const doc = within(document.body);\n\n // Verify popover is visible\n await waitFor(() => {\n expect(doc.getByTestId(\"popover-content\")).toBeInTheDocument();\n });\n // Click outside should not dismiss popover\n await userEvent.click(document.body);\n expect(args.onOpenChange).not.toHaveBeenCalled();\n },\n};\n\nexport const WithArrow: Story = {\n render: ({ children, ...args }) => (\n <BasePopover {...args}>\n <style\n dangerouslySetInnerHTML={{\n __html: `\n .triangle-up {\n width: 1px;\n height: 1px;\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-bottom: 10px solid black;\n }\n `,\n }}\n />\n <BaseOverlayArrow className={\"triangle-up\"} />\n {children}\n </BasePopover>\n ),\n play: async ({ args }) => {\n const doc = within(document.body);\n\n // Verify popover is visible\n await waitFor(() => {\n expect(doc.getByTestId(\"popover-content\")).toBeInTheDocument();\n expect(document.querySelector(\".triangle-up\")).toBeInTheDocument();\n });\n // Click outside should not dismiss popover\n await userEvent.click(document.body);\n expect(args.onOpenChange).not.toHaveBeenCalled();\n },\n};\n"],"names":["BasePopover","fn","React","within","waitFor","expect","userEvent","BaseOverlayArrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,IAAiC,GAAA;AAAA,EACrC,KAAO,EAAA,wBAAA;AAAA,EACP,SAAW,EAAAA,2BAAA;AAAA,E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