@plasmicpkgs/react-aria 0.0.139 → 0.0.141

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/react-aria",
3
- "version": "0.0.139",
3
+ "version": "0.0.141",
4
4
  "description": "Plasmic registration calls for react-aria based components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,15 +46,15 @@
46
46
  "upgrade-aria": "yarn upgrade --latest --scope @react-stately && yarn upgrade --latest --scope @react-aria && yarn upgrade --latest --scope react-aria-components"
47
47
  },
48
48
  "dependencies": {
49
- "@react-aria/i18n": "^3.11.0",
50
- "@react-aria/utils": "^3.24.0",
51
- "react-aria": "^3.33.0",
52
- "react-aria-components": "^1.2.0",
49
+ "@react-aria/i18n": "^3.12.9",
50
+ "@react-aria/utils": "^3.29.0",
51
+ "react-aria": "^3.40.0",
52
+ "react-aria-components": "^1.9.0",
53
53
  "react-keyed-flatten-children": "^3.0.0",
54
- "react-stately": "^3.31.0"
54
+ "react-stately": "^3.38.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@plasmicapp/host": "1.0.218",
57
+ "@plasmicapp/host": "1.0.219",
58
58
  "@rollup/plugin-commonjs": "^11.0.0",
59
59
  "@rollup/plugin-json": "^4.0.0",
60
60
  "@rollup/plugin-node-resolve": "^9.0.0",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "0a0c1782456e5cab80f416e465c3b7938e4917c8"
77
+ "gitHead": "32ec99a8c839ba179925352b617b084a01d4988e"
78
78
  }
@@ -57,11 +57,11 @@ function BasePopover(props) {
57
57
  const canvasContext = host.usePlasmicCanvasContext();
58
58
  const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;
59
59
  const _b = utils.mergeProps(
60
- {
60
+ canvasContext && !canvasContext.interactive ? {
61
61
  // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.
62
62
  // Setting isNonModal to true in edit mode (canvas) means that the popover will not prevent the user from interacting with the canvas while the popover is open.
63
- isNonModal: canvasContext && !canvasContext.interactive
64
- },
63
+ isNonModal: true
64
+ } : void 0,
65
65
  restProps,
66
66
  { className: `${resetClassName}` },
67
67
  // Override some props if the popover is standalone
@@ -1 +1 @@
1
- {"version":3,"file":"registerPopover.cjs.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React, { useEffect } from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { COMMON_STYLES, getCommonOverlayProps } from \"./common\";\nimport { PlasmicPopoverTriggerContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n HasControlContextData,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport interface BasePopoverControlContextData {\n canMatchTriggerWidth?: boolean;\n}\nexport interface BasePopoverProps\n extends React.ComponentProps<typeof Popover>,\n HasControlContextData<BasePopoverControlContextData> {\n className?: string;\n resetClassName?: string;\n children?: React.ReactNode;\n matchTriggerWidth?: boolean;\n}\n\n// PopoverContext is used by BasePopover and BaseOverlayArrow\nexport function BasePopover(props: BasePopoverProps) {\n const {\n resetClassName,\n setControlContextData,\n matchTriggerWidth,\n ...restProps\n } = props;\n // Popover can be inside DialogTrigger, Select, Combobox, etc. So we can't just use a particular context like DialogTrigger (like we do in Modal) to decide if it is standalone\n const isStandalone = !React.useContext(PopoverContext);\n const hasTrigger = !!React.useContext(PlasmicPopoverTriggerContext);\n const triggerRef = React.useRef<any>(null);\n const canvasContext = usePlasmicCanvasContext();\n const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;\n\n /*\n We only want to trap focus if:\n 1. The popover is NOT in canvas (because while the dialog is open on the canvas, the focus is trapped inside it, so any Studio modals like the Color Picker modal would glitch due to focus jumping back and forth)\n 2. The popover is NOT standalone or inside a Select/Combobox (focus trapping is already handled in Select/Combobox). A way to identify this is by the presence of a DialogTrigger context.\n */\n const { children, ...mergedProps } = mergeProps(\n {\n // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.\n // Setting isNonModal to true in edit mode (canvas) means that the popover will not prevent the user from interacting with the canvas while the popover is open.\n isNonModal: canvasContext && !canvasContext.interactive,\n },\n restProps,\n { className: `${resetClassName}` },\n // Override some props if the popover is standalone\n isStandalone\n ? {\n triggerRef,\n isNonModal: true,\n // Always true, 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\n // In component view, we never want to start with an empty artboard, so isOpen has to be true\n isOpen: true,\n }\n : null\n );\n\n useEffect(() => {\n setControlContextData?.({\n canMatchTriggerWidth: hasTrigger,\n });\n }, [hasTrigger, setControlContextData]);\n\n return (\n <>\n {isStandalone && <div ref={triggerRef} />}\n <Popover\n // more about `--trigger-width` here: https://react-spectrum.adobe.com/react-aria/Select.html#popover-1\n style={{\n ...(matchTriggerWidthProp ? { width: `var(--trigger-width)` } : {}),\n ...COMMON_STYLES,\n }}\n {...mergedProps}\n >\n {children}\n </Popover>\n </>\n );\n}\n\nexport const POPOVER_COMPONENT_NAME = makeComponentName(\"popover\");\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: POPOVER_COMPONENT_NAME,\n displayName: \"Aria Popover\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerPopover\",\n importName: \"BasePopover\",\n defaultStyles: {\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n width: \"300px\",\n backgroundColor: \"#FDE3C3\",\n },\n props: {\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n width: \"stretch\",\n padding: \"20px\",\n rowGap: \"10px\",\n },\n children: [\n {\n type: \"text\",\n value: \"This is a Popover!\",\n },\n {\n type: \"text\",\n value: \"You can put anything you can imagine here!\",\n styles: {\n fontWeight: 500,\n },\n },\n {\n type: \"text\",\n value:\n \"Use it in a `Aria Dialog Trigger` component to trigger it on a button click!\",\n },\n ],\n },\n ],\n },\n shouldFlip: {\n type: \"boolean\",\n description:\n \"Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.\",\n defaultValueHint: true,\n },\n\n resetClassName: {\n type: \"themeResetClass\",\n },\n matchTriggerWidth: {\n type: \"boolean\",\n defaultValue: true,\n hidden: (_props, ctx) => !ctx?.canMatchTriggerWidth,\n },\n ...getCommonOverlayProps<BasePopoverProps>(\"popover\", {\n placement: { defaultValueHint: \"bottom\" },\n offset: { defaultValueHint: 8 },\n containerPadding: { defaultValueHint: 12 },\n crossOffset: { defaultValueHint: 0 },\n }),\n },\n // No isOpen state for popover, because we assume that its open state is always going to be controlled by a parent like Select, Combobox, DialogTrigger, etc.\n styleSections: true,\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","PopoverContext","PlasmicPopoverTriggerContext","usePlasmicCanvasContext","mergeProps","useEffect","Popover","COMMON_STYLES","makeComponentName","registerComponentHelper","getCommonOverlayProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAA,MAKI,EAJF,GAAA,KAAA,EAAA;AAAA,IAAA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,iBAAA;AAAA,GA9BJ,GAgCM,EADC,EAAA,SAAA,GAAA,SAAA,CACD,EADC,EAAA;AAAA,IAHH,gBAAA;AAAA,IACA,uBAAA;AAAA,IACA,mBAAA;AAAA,GAAA,CAAA,CAAA;AAIF,EAAA,MAAM,YAAe,GAAA,CAACA,sBAAM,CAAA,UAAA,CAAWC,kCAAc,CAAA,CAAA;AACrD,EAAA,MAAM,UAAa,GAAA,CAA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,QACA,UAAY,EAAA;AAAA,UACV,IAAM,EAAA,SAAA;AAAA,UACN,WACE,EAAA,oJAAA;AAAA,UACF,gBAAkB,EAAA,IAAA;AAAA,SACpB;AAAA,QAEA,cAAgB,EAAA;AAAA,UACd,IAAM,EAAA,iBAAA;AAAA,SACR;AAAA,QACA,iBAAmB,EAAA;AAAA,UACjB,IAAM,EAAA,SAAA;AAAA,UACN,YAAc,EAAA,IAAA;AAAA,UACd,MAAQ,EAAA,CAAC,MAAQ,EAAA,GAAA,KAAQ,EAAC,GAAK,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,oBAAA,CAAA;AAAA,SACjC;AAAA,OAAA,EACGC,6BAAwC,SAAW,EAAA;AAAA,QACpD,SAAA,EAAW,EAAE,gBAAA,EAAkB,QAAS,EAAA;AAAA,QACxC,MAAA,EAAQ,EAAE,gBAAA,EAAkB,CAAE,EAAA;AAAA,QAC9B,gBAAA,EAAkB,EAAE,gBAAA,EAAkB,EAAG,EAAA;AAAA,QACzC,WAAA,EAAa,EAAE,gBAAA,EAAkB,CAAE,EAAA;AAAA,OACpC,CAAA,CAAA;AAAA;AAAA,MAGH,aAAe,EAAA,IAAA;AAAA,MACf,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;;"}
1
+ {"version":3,"file":"registerPopover.cjs.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React, { useEffect } from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { COMMON_STYLES, getCommonOverlayProps } from \"./common\";\nimport { PlasmicPopoverTriggerContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n HasControlContextData,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport interface BasePopoverControlContextData {\n canMatchTriggerWidth?: boolean;\n}\nexport interface BasePopoverProps\n extends React.ComponentProps<typeof Popover>,\n HasControlContextData<BasePopoverControlContextData> {\n className?: string;\n resetClassName?: string;\n children?: React.ReactNode;\n matchTriggerWidth?: boolean;\n}\n\n// PopoverContext is used by BasePopover and BaseOverlayArrow\nexport function BasePopover(props: BasePopoverProps) {\n const {\n resetClassName,\n setControlContextData,\n matchTriggerWidth,\n ...restProps\n } = props;\n // Popover can be inside DialogTrigger, Select, Combobox, etc. So we can't just use a particular context like DialogTrigger (like we do in Modal) to decide if it is standalone\n const isStandalone = !React.useContext(PopoverContext);\n const hasTrigger = !!React.useContext(PlasmicPopoverTriggerContext);\n const triggerRef = React.useRef<any>(null);\n const canvasContext = usePlasmicCanvasContext();\n const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;\n\n /*\n We only want to trap focus if:\n 1. The popover is NOT in canvas (because while the dialog is open on the canvas, the focus is trapped inside it, so any Studio modals like the Color Picker modal would glitch due to focus jumping back and forth)\n 2. The popover is NOT standalone or inside a Select/Combobox (focus trapping is already handled in Select/Combobox). A way to identify this is by the presence of a DialogTrigger context.\n */\n const { children, ...mergedProps } = mergeProps(\n canvasContext && !canvasContext.interactive\n ? {\n // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.\n // Setting isNonModal to true in edit mode (canvas) means that the popover will not prevent the user from interacting with the canvas while the popover is open.\n isNonModal: true,\n }\n : undefined,\n restProps,\n { className: `${resetClassName}` },\n // Override some props if the popover is standalone\n isStandalone\n ? {\n triggerRef,\n isNonModal: true,\n // Always true, 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\n // In component view, we never want to start with an empty artboard, so isOpen has to be true\n isOpen: true,\n }\n : null\n );\n\n useEffect(() => {\n setControlContextData?.({\n canMatchTriggerWidth: hasTrigger,\n });\n }, [hasTrigger, setControlContextData]);\n\n return (\n <>\n {isStandalone && <div ref={triggerRef} />}\n <Popover\n // more about `--trigger-width` here: https://react-spectrum.adobe.com/react-aria/Select.html#popover-1\n style={{\n ...(matchTriggerWidthProp ? { width: `var(--trigger-width)` } : {}),\n ...COMMON_STYLES,\n }}\n {...mergedProps}\n >\n {children}\n </Popover>\n </>\n );\n}\n\nexport const POPOVER_COMPONENT_NAME = makeComponentName(\"popover\");\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: POPOVER_COMPONENT_NAME,\n displayName: \"Aria Popover\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerPopover\",\n importName: \"BasePopover\",\n defaultStyles: {\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n width: \"300px\",\n backgroundColor: \"#FDE3C3\",\n },\n props: {\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n width: \"stretch\",\n padding: \"20px\",\n rowGap: \"10px\",\n },\n children: [\n {\n type: \"text\",\n value: \"This is a Popover!\",\n },\n {\n type: \"text\",\n value: \"You can put anything you can imagine here!\",\n styles: {\n fontWeight: 500,\n },\n },\n {\n type: \"text\",\n value:\n \"Use it in a `Aria Dialog Trigger` component to trigger it on a button click!\",\n },\n ],\n },\n ],\n },\n shouldFlip: {\n type: \"boolean\",\n description:\n \"Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.\",\n defaultValueHint: true,\n },\n\n resetClassName: {\n type: \"themeResetClass\",\n },\n matchTriggerWidth: {\n type: \"boolean\",\n defaultValue: true,\n hidden: (_props, ctx) => !ctx?.canMatchTriggerWidth,\n },\n ...getCommonOverlayProps<BasePopoverProps>(\"popover\", {\n placement: { defaultValueHint: \"bottom\" },\n offset: { defaultValueHint: 8 },\n containerPadding: { defaultValueHint: 12 },\n crossOffset: { defaultValueHint: 0 },\n }),\n },\n // No isOpen state for popover, because we assume that its open state is always going to be controlled by a parent like Select, Combobox, DialogTrigger, etc.\n styleSections: true,\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","PopoverContext","PlasmicPopoverTriggerContext","usePlasmicCanvasContext","mergeProps","useEffect","Popover","COMMON_STYLES","makeComponentName","registerComponentHelper","getCommonOverlayProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAA,MAKI,EAJF,GAAA,KAAA,EAAA;AAAA,IAAA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,iBAAA;AAAA,GA9BJ,GAgCM,EADC,EAAA,SAAA,GAAA,SAAA,CACD,EADC,EAAA;AAAA,IAHH,gBAAA;AAAA,IACA,uBAAA;AAAA,IACA,mBAAA;AAAA,GAAA,CAAA,CAAA;AAIF,EAAA,MAAM,YAAe,GAAA,CAACA,sBAAM,CAAA,UAAA,CAAWC,kCAAc,CAAA,CAAA;AACrD,EAAA,MAAM,UAAa,GAAA,CAAC,CAACD,sBAAA,CAAM,WAAWE,qCAA4B,CAAA,CAAA;AAClE,EAAM,MAAA,UAAA,GAAaF,sBAAM,CAAA,MAAA,CAAY,IAAI,CAAA,CAAA;AACzC,EAAA,MAAM,gBAAgBG,4BAAwB,EAAA,CAAA;AAC9C,EAAA,MAAM,wBAAwB,UAAc,IAAA,iBAAA,CAAA;AAO5C,EAAqC,MAAA,EAAA,GAAAC,gBAAA;AAAA,IACnC,aAAA,IAAiB,CAAC,aAAA,CAAc,WAC5B,GAAA;AAAA;AAAA;AAAA,MAGE,UAAY,EAAA,IAAA;AAAA,KAEd,GAAA,KAAA,CAAA;AAAA,IACJ,SAAA;AAAA,IACA,EAAE,SAAW,EAAA,CAAA,EAAG,cAAiB,CAAA,CAAA,EAAA;AAAA;AAAA,IAEjC,YACI,GAAA;AAAA,MACE,UAAA;AAAA,MACA,UAAY,EAAA,IAAA;AAAA;AAAA;AAAA,MAGZ,MAAQ,EAAA,IAAA;AAAA,KAEV,GAAA,IAAA;AAAA,KAnBE,EA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AkB,EAAG,EAAA;AAAA,QACzC,WAAA,EAAa,EAAE,gBAAA,EAAkB,CAAE,EAAA;AAAA,OACpC,CAAA,CAAA;AAAA;AAAA,MAGH,aAAe,EAAA,IAAA;AAAA,MACf,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;;"}
@@ -51,11 +51,11 @@ function BasePopover(props) {
51
51
  const canvasContext = usePlasmicCanvasContext();
52
52
  const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;
53
53
  const _b = mergeProps(
54
- {
54
+ canvasContext && !canvasContext.interactive ? {
55
55
  // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.
56
56
  // Setting isNonModal to true in edit mode (canvas) means that the popover will not prevent the user from interacting with the canvas while the popover is open.
57
- isNonModal: canvasContext && !canvasContext.interactive
58
- },
57
+ isNonModal: true
58
+ } : void 0,
59
59
  restProps,
60
60
  { className: `${resetClassName}` },
61
61
  // Override some props if the popover is standalone
@@ -1 +1 @@
1
- {"version":3,"file":"registerPopover.esm.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React, { useEffect } from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { COMMON_STYLES, getCommonOverlayProps } from \"./common\";\nimport { PlasmicPopoverTriggerContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n HasControlContextData,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport interface BasePopoverControlContextData {\n canMatchTriggerWidth?: boolean;\n}\nexport interface BasePopoverProps\n extends React.ComponentProps<typeof Popover>,\n HasControlContextData<BasePopoverControlContextData> {\n className?: string;\n resetClassName?: string;\n children?: React.ReactNode;\n matchTriggerWidth?: boolean;\n}\n\n// PopoverContext is used by BasePopover and BaseOverlayArrow\nexport function BasePopover(props: BasePopoverProps) {\n const {\n resetClassName,\n setControlContextData,\n matchTriggerWidth,\n ...restProps\n } = props;\n // Popover can be inside DialogTrigger, Select, Combobox, etc. So we can't just use a particular context like DialogTrigger (like we do in Modal) to decide if it is standalone\n const isStandalone = !React.useContext(PopoverContext);\n const hasTrigger = !!React.useContext(PlasmicPopoverTriggerContext);\n const triggerRef = React.useRef<any>(null);\n const canvasContext = usePlasmicCanvasContext();\n const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;\n\n /*\n We only want to trap focus if:\n 1. The popover is NOT in canvas (because while the dialog is open on the canvas, the focus is trapped inside it, so any Studio modals like the Color Picker modal would glitch due to focus jumping back and forth)\n 2. The popover is NOT standalone or inside a Select/Combobox (focus trapping is already handled in Select/Combobox). A way to identify this is by the presence of a DialogTrigger context.\n */\n const { children, ...mergedProps } = mergeProps(\n {\n // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.\n // Setting isNonModal to true in edit mode (canvas) means that the popover will not prevent the user from interacting with the canvas while the popover is open.\n isNonModal: canvasContext && !canvasContext.interactive,\n },\n restProps,\n { className: `${resetClassName}` },\n // Override some props if the popover is standalone\n isStandalone\n ? {\n triggerRef,\n isNonModal: true,\n // Always true, 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\n // In component view, we never want to start with an empty artboard, so isOpen has to be true\n isOpen: true,\n }\n : null\n );\n\n useEffect(() => {\n setControlContextData?.({\n canMatchTriggerWidth: hasTrigger,\n });\n }, [hasTrigger, setControlContextData]);\n\n return (\n <>\n {isStandalone && <div ref={triggerRef} />}\n <Popover\n // more about `--trigger-width` here: https://react-spectrum.adobe.com/react-aria/Select.html#popover-1\n style={{\n ...(matchTriggerWidthProp ? { width: `var(--trigger-width)` } : {}),\n ...COMMON_STYLES,\n }}\n {...mergedProps}\n >\n {children}\n </Popover>\n </>\n );\n}\n\nexport const POPOVER_COMPONENT_NAME = makeComponentName(\"popover\");\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: POPOVER_COMPONENT_NAME,\n displayName: \"Aria Popover\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerPopover\",\n importName: \"BasePopover\",\n defaultStyles: {\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n width: \"300px\",\n backgroundColor: \"#FDE3C3\",\n },\n props: {\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n width: \"stretch\",\n padding: \"20px\",\n rowGap: \"10px\",\n },\n children: [\n {\n type: \"text\",\n value: \"This is a Popover!\",\n },\n {\n type: \"text\",\n value: \"You can put anything you can imagine here!\",\n styles: {\n fontWeight: 500,\n },\n },\n {\n type: \"text\",\n value:\n \"Use it in a `Aria Dialog Trigger` component to trigger it on a button click!\",\n },\n ],\n },\n ],\n },\n shouldFlip: {\n type: \"boolean\",\n description:\n \"Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.\",\n defaultValueHint: true,\n },\n\n resetClassName: {\n type: \"themeResetClass\",\n },\n matchTriggerWidth: {\n type: \"boolean\",\n defaultValue: true,\n hidden: (_props, ctx) => !ctx?.canMatchTriggerWidth,\n },\n ...getCommonOverlayProps<BasePopoverProps>(\"popover\", {\n placement: { defaultValueHint: \"bottom\" },\n offset: { defaultValueHint: 8 },\n containerPadding: { defaultValueHint: 12 },\n crossOffset: { defaultValueHint: 0 },\n }),\n },\n // No isOpen state for popover, because we assume that its open state is always going to be controlled by a parent like Select, Combobox, DialogTrigger, etc.\n styleSections: true,\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAA,MAKI,EAJF,GAAA,KAAA,EAAA;AAAA,IAAA,cAAA;AAAA,IACA,qBAAA;A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AA,MAAA;AAAA,kBACN,KAAO,EAAA,4CAAA;AAAA,kBACP,MAAQ,EAAA;AAAA,oBACN,UAAY,EAAA,GAAA;AAAA,mBACd;AAAA,iBACF;AAAA,gBACA;AAAA,kBACE,IAAM,EAAA,MAAA;AAAA,kBACN,KACE,EAAA,8EAAA;AAAA,iBACJ;AAAA,eACF;AAAA,aACF;AAAA,WACF;AAAA,SACF;AAAA,QACA,UAAY,EAAA;AAAA,UACV,IAAM,EAAA,SAAA;AAAA,UACN,WACE,EAAA,oJAAA;AAAA,UACF,gBAAkB,EAAA,IAAA;AAAA,SACpB;AAAA,QAEA,cAAgB,EAAA;AAAA,UACd,IAAM,EAAA,iBAAA;AAAA,SACR;AAAA,QACA,iBAAmB,EAAA;AAAA,UACjB,IAAM,EAAA,SAAA;AAAA,UACN,YAAc,EAAA,IAAA;AAAA,UACd,MAAQ,EAAA,CAAC,MAAQ,EAAA,GAAA,KAAQ,EAAC,GAAK,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,oBAAA,CAAA;AAAA,SACjC;AAAA,OAAA,EACG,sBAAwC,SAAW,EAAA;AAAA,QACpD,SAAA,EAAW,EAAE,gBAAA,EAAkB,QAAS,EAAA;AAAA,QACxC,MAAA,EAAQ,EAAE,gBAAA,EAAkB,CAAE,EAAA;AAAA,QAC9B,gBAAA,EAAkB,EAAE,gBAAA,EAAkB,EAAG,EAAA;AAAA,QACzC,WAAA,EAAa,EAAE,gBAAA,EAAkB,CAAE,EAAA;AAAA,OACpC,CAAA,CAAA;AAAA;AAAA,MAGH,aAAe,EAAA,IAAA;AAAA,MACf,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
1
+ {"version":3,"file":"registerPopover.esm.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React, { useEffect } from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { COMMON_STYLES, getCommonOverlayProps } from \"./common\";\nimport { PlasmicPopoverTriggerContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n HasControlContextData,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport interface BasePopoverControlContextData {\n canMatchTriggerWidth?: boolean;\n}\nexport interface BasePopoverProps\n extends React.ComponentProps<typeof Popover>,\n HasControlContextData<BasePopoverControlContextData> {\n className?: string;\n resetClassName?: string;\n children?: React.ReactNode;\n matchTriggerWidth?: boolean;\n}\n\n// PopoverContext is used by BasePopover and BaseOverlayArrow\nexport function BasePopover(props: BasePopoverProps) {\n const {\n resetClassName,\n setControlContextData,\n matchTriggerWidth,\n ...restProps\n } = props;\n // Popover can be inside DialogTrigger, Select, Combobox, etc. So we can't just use a particular context like DialogTrigger (like we do in Modal) to decide if it is standalone\n const isStandalone = !React.useContext(PopoverContext);\n const hasTrigger = !!React.useContext(PlasmicPopoverTriggerContext);\n const triggerRef = React.useRef<any>(null);\n const canvasContext = usePlasmicCanvasContext();\n const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;\n\n /*\n We only want to trap focus if:\n 1. The popover is NOT in canvas (because while the dialog is open on the canvas, the focus is trapped inside it, so any Studio modals like the Color Picker modal would glitch due to focus jumping back and forth)\n 2. The popover is NOT standalone or inside a Select/Combobox (focus trapping is already handled in Select/Combobox). A way to identify this is by the presence of a DialogTrigger context.\n */\n const { children, ...mergedProps } = mergeProps(\n canvasContext && !canvasContext.interactive\n ? {\n // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.\n // Setting isNonModal to true in edit mode (canvas) means that the popover will not prevent the user from interacting with the canvas while the popover is open.\n isNonModal: true,\n }\n : undefined,\n restProps,\n { className: `${resetClassName}` },\n // Override some props if the popover is standalone\n isStandalone\n ? {\n triggerRef,\n isNonModal: true,\n // Always true, 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\n // In component view, we never want to start with an empty artboard, so isOpen has to be true\n isOpen: true,\n }\n : null\n );\n\n useEffect(() => {\n setControlContextData?.({\n canMatchTriggerWidth: hasTrigger,\n });\n }, [hasTrigger, setControlContextData]);\n\n return (\n <>\n {isStandalone && <div ref={triggerRef} />}\n <Popover\n // more about `--trigger-width` here: https://react-spectrum.adobe.com/react-aria/Select.html#popover-1\n style={{\n ...(matchTriggerWidthProp ? { width: `var(--trigger-width)` } : {}),\n ...COMMON_STYLES,\n }}\n {...mergedProps}\n >\n {children}\n </Popover>\n </>\n );\n}\n\nexport const POPOVER_COMPONENT_NAME = makeComponentName(\"popover\");\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: POPOVER_COMPONENT_NAME,\n displayName: \"Aria Popover\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerPopover\",\n importName: \"BasePopover\",\n defaultStyles: {\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n width: \"300px\",\n backgroundColor: \"#FDE3C3\",\n },\n props: {\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n width: \"stretch\",\n padding: \"20px\",\n rowGap: \"10px\",\n },\n children: [\n {\n type: \"text\",\n value: \"This is a Popover!\",\n },\n {\n type: \"text\",\n value: \"You can put anything you can imagine here!\",\n styles: {\n fontWeight: 500,\n },\n },\n {\n type: \"text\",\n value:\n \"Use it in a `Aria Dialog Trigger` component to trigger it on a button click!\",\n },\n ],\n },\n ],\n },\n shouldFlip: {\n type: \"boolean\",\n description:\n \"Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.\",\n defaultValueHint: true,\n },\n\n resetClassName: {\n type: \"themeResetClass\",\n },\n matchTriggerWidth: {\n type: \"boolean\",\n defaultValue: true,\n hidden: (_props, ctx) => !ctx?.canMatchTriggerWidth,\n },\n ...getCommonOverlayProps<BasePopoverProps>(\"popover\", {\n placement: { defaultValueHint: \"bottom\" },\n offset: { defaultValueHint: 8 },\n containerPadding: { defaultValueHint: 12 },\n crossOffset: { defaultValueHint: 0 },\n }),\n },\n // No isOpen state for popover, because we assume that its open state is always going to be controlled by a parent like Select, Combobox, DialogTrigger, etc.\n styleSections: true,\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAA,MAKI,EAJF,GAAA,KAAA,EAAA;AAAA,IAAA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,iBAAA;AAAA,GA9BJ,GAgCM,EADC,EAAA,SAAA,GAAA,SAAA,CACD,EADC,EAAA;AAAA,IAHH,gBAAA;AAAA,IACA,uBAAA;AAAA,IACA,mBAAA;AAAA,GAAA,CAAA,CAAA;AAIF,EAAA,MAAM,YAAe,GAAA,CAAC,KAAM,CAAA,UAAA,CAAW,cAAc,CAAA,CAAA;AACrD,EAAA,MAAM,UAAa,GAAA,CAAC,CAAC,KAAA,CAAM,WAAW,4BAA4B,CAAA,CAAA;AAClE,EAAM,MAAA,UAAA,GAAa,KAAM,CAAA,MAAA,CAAY,IAAI,CAAA,CAAA;AACzC,EAAA,MAAM,gBAAgB,uBAAwB,EAAA,CAAA;AAC9C,EAAA,MAAM,wBAAwB,UAAc,IAAA,iBAAA,CAAA;AAO5C,EAAqC,MAAA,EAAA,GAAA,UAAA;AAAA,IACnC,aAAA,IAAiB,CAAC,aAAA,CAAc,WAC5B,GAAA;AAAA;AAAA;AAAA,MAGE,UAAY,EAAA,IAAA;AAAA,KAEd,GAAA,KAAA,CAAA;AAAA,IACJ,SAAA;AAAA,IACA,EAAE,SAAW,EAAA,CAAA,EAAG,cAAiB,CAAA,CAAA,EAAA;AAAA;AAAA,IAEjC,YACI,GAAA;AAAA,MAC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