@elliemae/ds-popperjs 3.29.2-rc.0 → 3.30.0-next.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/PopoverContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n innerRef={setPopperElement}\n role=\"region\"\n aria-label=\"popover menu\"\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDb;AAlDV,mBAA4C;AAG5C,0BAA6B;AAC7B,oBAAkE;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,2BAAuB,0BAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,oBAAgB;AAAA,IACpB,MACE,4EACG;AAAA;AAAA,MACA,iBAAiB,QAChB,4EACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,4CAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,4CAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
4
+ "sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: TypescriptHelpersT.ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n innerRef={setPopperElement}\n role=\"region\"\n aria-label=\"popover menu\"\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmDb;AAnDV,mBAA4C;AAI5C,0BAA6B;AAC7B,oBAAkE;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,2BAAuB,0BAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,oBAAgB;AAAA,IACpB,MACE,4EACG;AAAA;AAAA,MACA,iBAAiB,QAChB,4EACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,4CAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,4CAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import {} from '@popperjs/core'; // fix for pnpm not portable typescript\nimport type { WeakValidationMap } from 'react';\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport type { usePopper } from 'react-popper';\n\nexport declare namespace DSPopperJST {\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export interface DefaultProps {\n closeContextMenu: () => void;\n withoutPortal: boolean;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n startPlacementPreference: PopperPlacementsT;\n placementOrderPreference: PopperPlacementsT[];\n zIndex: number;\n extraPopperStyles: Record<string, unknown>;\n onClickOutside: (e: MouseEvent | TouchEvent) => void;\n customOffset: [number, number];\n }\n export interface OptionalProps {\n boundaryElement?: HTMLElement;\n portalDOMContainer?: HTMLElement;\n modifiers?: NonNullable<Parameters<typeof usePopper>[2]>['modifiers'];\n actionRef?: React.MutableRefObject<{\n update: ReturnType<typeof usePopper>['update'];\n }>;\n }\n export interface RequiredProps {\n children: ReactChildrenComplete;\n referenceElement: HTMLElement | null;\n showPopover: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n}\n\nconst placementPreferenceArray = [\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\nexport const dspopperjsPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * The content of the popper\n */\n children: PropTypes.node.description('The content of the popper').isRequired,\n /**\n * The DOM element that needs to be used as a reference for positioning the popper.\n */\n referenceElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'The DOM element that needs to be used as a reference for positioning the popper.',\n ).isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: PropTypes.oneOf(placementPreferenceArray)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(placementPreferenceArray))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue('theme.zIndex.popper'),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue('[0,14]'),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\n boundaryElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n ),\n /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'When using portal, the container in which to append the DOM content, defaults to document body',\n ),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array.description(\n 'If you provide the modifiers array for full-custom override in popper.js,' +\n ' it means you are responsible for completely overwriting all the existing modifiers.' +\n ' This includes the modifiers that control \"boundaryElement,\" \"withoutArrow,\" \"placementOrderPreference,\" and \"customOffset\".' +\n 'For more detailed information, please refer to the documentation at https://popper.js.org/docs/v2/modifiers/.',\n ),\n actionRef: PropTypes.object.description('Ref object to access the popperjs instance methods'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAuE;AA6DvE,MAAM,2BAA2B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,UAAU,kCAAU,KAAK,YAAY,2BAA2B,EAAE;AAAA;AAAA;AAAA;AAAA,EAIlE,kBAAkB,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC/E;AAAA,EACF,EAAE;AAAA;AAAA;AAAA;AAAA,EAIF,aAAa,kCAAU,KAAK,YAAY,2CAA2C,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrF,kBAAkB,kCAAU,KACzB;AAAA,IACC;AAAA,EAEF,EACC,aAAa,UAAU;AAAA;AAAA;AAAA;AAAA,EAI1B,eAAe,kCAAU,KACtB,YAAY,wEAAwE,EACpF,aAAa,IAAI;AAAA;AAAA;AAAA;AAAA,EAIpB,cAAc,kCAAU,KACrB,YAAY,+DAA+D,EAC3E,aAAa,KAAK;AAAA;AAA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{ type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport type { usePopper } from 'react-popper';\n\nexport declare namespace DSPopperJST {\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export interface DefaultProps {\n closeContextMenu: () => void;\n withoutPortal: boolean;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n startPlacementPreference: PopperPlacementsT;\n placementOrderPreference: PopperPlacementsT[];\n zIndex: number;\n extraPopperStyles: Record<string, unknown>;\n onClickOutside: (e: MouseEvent | TouchEvent) => void;\n customOffset: [number, number];\n }\n export interface OptionalProps {\n boundaryElement?: HTMLElement;\n portalDOMContainer?: HTMLElement;\n modifiers?: NonNullable<Parameters<typeof usePopper>[2]>['modifiers'];\n actionRef?: React.MutableRefObject<{\n update: ReturnType<typeof usePopper>['update'];\n }>;\n }\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n referenceElement: HTMLElement | null;\n showPopover: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n}\n\nconst placementPreferenceArray = [\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\nexport const dspopperjsPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * The content of the popper\n */\n children: PropTypes.node.description('The content of the popper').isRequired,\n /**\n * The DOM element that needs to be used as a reference for positioning the popper.\n */\n referenceElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'The DOM element that needs to be used as a reference for positioning the popper.',\n ).isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: PropTypes.oneOf(placementPreferenceArray)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(placementPreferenceArray))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue('theme.zIndex.popper'),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue('[0,14]'),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\n boundaryElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n ),\n /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'When using portal, the container in which to append the DOM content, defaults to document body',\n ),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array.description(\n 'If you provide the modifiers array for full-custom override in popper.js,' +\n ' it means you are responsible for completely overwriting all the existing modifiers.' +\n ' This includes the modifiers that control \"boundaryElement,\" \"withoutArrow,\" \"placementOrderPreference,\" and \"customOffset\".' +\n 'For more detailed information, please refer to the documentation at https://popper.js.org/docs/v2/modifiers/.',\n ),\n actionRef: PropTypes.object.description('Ref object to access the popperjs instance methods'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AA6DvE,MAAM,2BAA2B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,E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,EAClB,gBAAgB,kCAAU,KACvB,YAAY,qDAAqD,EACjE,aAAa,MAAM,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B,iBAAiB,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC9E;AAAA,EAEF;AAAA;AAAA;AAAA;AAAA,EAIA,oBAAoB,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,kCAAU,MAAM;AAAA,IACzB;AAAA,EAIF;AAAA,EACA,WAAW,kCAAU,OAAO,YAAY,oDAAoD;AAC9F;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/PopoverContent.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useMemo } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n innerRef={setPopperElement}\n role=\"region\"\n aria-label=\"popover menu\"\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkDb,mBACE,KADF;AAlDV,SAAgB,aAAa,eAAe;AAG5C,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,4BAA4B;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,gBAAgB;AAAA,IACpB,MACE,iCACG;AAAA;AAAA,MACA,iBAAiB,QAChB,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,oBAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,oBAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useMemo } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: TypescriptHelpersT.ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n innerRef={setPopperElement}\n role=\"region\"\n aria-label=\"popover menu\"\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACmDb,mBACE,KADF;AAnDV,SAAgB,aAAa,eAAe;AAI5C,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,4BAA4B;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,gBAAgB;AAAA,IACpB,MACE,iCACG;AAAA;AAAA,MACA,iBAAiB,QAChB,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,oBAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,oBAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {} from '@popperjs/core'; // fix for pnpm not portable typescript\nimport type { WeakValidationMap } from 'react';\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport type { usePopper } from 'react-popper';\n\nexport declare namespace DSPopperJST {\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export interface DefaultProps {\n closeContextMenu: () => void;\n withoutPortal: boolean;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n startPlacementPreference: PopperPlacementsT;\n placementOrderPreference: PopperPlacementsT[];\n zIndex: number;\n extraPopperStyles: Record<string, unknown>;\n onClickOutside: (e: MouseEvent | TouchEvent) => void;\n customOffset: [number, number];\n }\n export interface OptionalProps {\n boundaryElement?: HTMLElement;\n portalDOMContainer?: HTMLElement;\n modifiers?: NonNullable<Parameters<typeof usePopper>[2]>['modifiers'];\n actionRef?: React.MutableRefObject<{\n update: ReturnType<typeof usePopper>['update'];\n }>;\n }\n export interface RequiredProps {\n children: ReactChildrenComplete;\n referenceElement: HTMLElement | null;\n showPopover: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n}\n\nconst placementPreferenceArray = [\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\nexport const dspopperjsPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * The content of the popper\n */\n children: PropTypes.node.description('The content of the popper').isRequired,\n /**\n * The DOM element that needs to be used as a reference for positioning the popper.\n */\n referenceElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'The DOM element that needs to be used as a reference for positioning the popper.',\n ).isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: PropTypes.oneOf(placementPreferenceArray)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(placementPreferenceArray))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue('theme.zIndex.popper'),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue('[0,14]'),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\n boundaryElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n ),\n /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'When using portal, the container in which to append the DOM content, defaults to document body',\n ),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array.description(\n 'If you provide the modifiers array for full-custom override in popper.js,' +\n ' it means you are responsible for completely overwriting all the existing modifiers.' +\n ' This includes the modifiers that control \"boundaryElement,\" \"withoutArrow,\" \"placementOrderPreference,\" and \"customOffset\".' +\n 'For more detailed information, please refer to the documentation at https://popper.js.org/docs/v2/modifiers/.',\n ),\n actionRef: PropTypes.object.description('Ref object to access the popperjs instance methods'),\n} as WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,2BAA2B,WAAW,wBAAwB;AA6DvE,MAAM,2BAA2B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,UAAU,UAAU,KAAK,YAAY,2BAA2B,EAAE;AAAA;AAAA;AAAA;AAAA,EAIlE,kBAAkB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC/E;AAAA,EACF,EAAE;AAAA;AAAA;AAAA;AAAA,EAIF,aAAa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M,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,UAAU,MAAM;AAAA,IACzB;AAAA,EAIF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,oDAAoD;AAC9F;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {} from '@popperjs/core'; // fix for pnpm not portable typescript\nimport type { WeakValidationMap } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport type { usePopper } from 'react-popper';\n\nexport declare namespace DSPopperJST {\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export interface DefaultProps {\n closeContextMenu: () => void;\n withoutPortal: boolean;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n startPlacementPreference: PopperPlacementsT;\n placementOrderPreference: PopperPlacementsT[];\n zIndex: number;\n extraPopperStyles: Record<string, unknown>;\n onClickOutside: (e: MouseEvent | TouchEvent) => void;\n customOffset: [number, number];\n }\n export interface OptionalProps {\n boundaryElement?: HTMLElement;\n portalDOMContainer?: HTMLElement;\n modifiers?: NonNullable<Parameters<typeof usePopper>[2]>['modifiers'];\n actionRef?: React.MutableRefObject<{\n update: ReturnType<typeof usePopper>['update'];\n }>;\n }\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n referenceElement: HTMLElement | null;\n showPopover: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n}\n\nconst placementPreferenceArray = [\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\nexport const dspopperjsPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * The content of the popper\n */\n children: PropTypes.node.description('The content of the popper').isRequired,\n /**\n * The DOM element that needs to be used as a reference for positioning the popper.\n */\n referenceElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'The DOM element that needs to be used as a reference for positioning the popper.',\n ).isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: PropTypes.oneOf(placementPreferenceArray)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(placementPreferenceArray))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue('theme.zIndex.popper'),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue('[0,14]'),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\n boundaryElement: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n ),\n /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])]).description(\n 'When using portal, the container in which to append the DOM content, defaults to document body',\n ),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array.description(\n 'If you provide the modifiers array for full-custom override in popper.js,' +\n ' it means you are responsible for completely overwriting all the existing modifiers.' +\n ' This includes the modifiers that control \"boundaryElement,\" \"withoutArrow,\" \"placementOrderPreference,\" and \"customOffset\".' +\n 'For more detailed information, please refer to the documentation at https://popper.js.org/docs/v2/modifiers/.',\n ),\n actionRef: PropTypes.object.description('Ref object to access the popperjs instance methods'),\n} as WeakValidationMap<unknown>;\n"],
5
+ "mappings": "AAAA,YAAY,W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AAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,qBAAqB;AAAA;AAAA;AAAA;AAAA,EAInG,cAAc,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,QAAQ;AAAA,EAC7G,mBAAmB,UAAU,OAC1B,YAAY,qDAAqD,EACjE,aAAa,CAAC,CAAC;AAAA,EAClB,gBAAgB,UAAU,KACvB,YAAY,qDAAqD,EACjE,aAAa,MAAM,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B,iBAAiB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC9E;AAAA,EAEF;AAAA;AAAA;AAAA;AAAA,EAIA,oBAAoB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,UAAU,MAAM;AAAA,IACzB;AAAA,EAIF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,oDAAoD;AAC9F;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
+ import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
2
3
  import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
3
4
  export interface PopoverContentPropsT {
4
5
  setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;
5
6
  popperStyles: React.CSSProperties;
6
7
  arrowStyle: React.CSSProperties;
7
8
  popperAttributes: Record<string, string> | undefined;
8
- children: ReactChildrenComplete;
9
+ children: TypescriptHelpersT.ReactChildrenComplete;
9
10
  setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;
10
11
  withoutArrow: boolean;
11
12
  withoutAnimation: boolean;
@@ -1,4 +1,5 @@
1
1
  import type { WeakValidationMap } from 'react';
2
+ import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
2
3
  import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
3
4
  import type { usePopper } from 'react-popper';
4
5
  export declare namespace DSPopperJST {
@@ -25,7 +26,7 @@ export declare namespace DSPopperJST {
25
26
  }>;
26
27
  }
27
28
  interface RequiredProps {
28
- children: ReactChildrenComplete;
29
+ children: TypescriptHelpersT.ReactChildrenComplete;
29
30
  referenceElement: HTMLElement | null;
30
31
  showPopover: boolean;
31
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-popperjs",
3
- "version": "3.29.2-rc.0",
3
+ "version": "3.30.0-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper JS Wrapper",
6
6
  "files": [
@@ -74,14 +74,15 @@
74
74
  "@popperjs/core": "~2.11.7",
75
75
  "@xstyled/system": "~3.7.3",
76
76
  "react-popper": "~2.3.0",
77
- "@elliemae/ds-system": "3.29.2-rc.0",
78
- "@elliemae/ds-utilities": "3.29.2-rc.0",
79
- "@elliemae/ds-props-helpers": "3.29.2-rc.0"
77
+ "@elliemae/ds-props-helpers": "3.30.0-next.0",
78
+ "@elliemae/ds-typescript-helpers": "3.30.0-next.0",
79
+ "@elliemae/ds-utilities": "3.30.0-next.0",
80
+ "@elliemae/ds-system": "3.30.0-next.0"
80
81
  },
81
82
  "devDependencies": {
82
83
  "@elliemae/pui-cli": "~9.0.0-next.31",
83
84
  "styled-components": "~5.3.9",
84
- "@elliemae/ds-monorepo-devops": "3.29.2-rc.0"
85
+ "@elliemae/ds-monorepo-devops": "3.30.0-next.0"
85
86
  },
86
87
  "peerDependencies": {
87
88
  "react": "^17.0.2",