@elliemae/ds-form-combobox 3.70.0-next.8 → 3.70.0-next.9

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.
@@ -90,9 +90,10 @@ const Container = () => {
90
90
  );
91
91
  const { refs, floatingStyles, context } = (0, import_ds_floating_context.useFloatingContext)(config);
92
92
  const hideTooltip = (0, import_react2.useCallback)(() => {
93
+ if (inline) return;
93
94
  setMenuState(false, "blur");
94
- }, [setMenuState]);
95
- (0, import_useClickOutside.useOnClickOutside)(refs.reference, hideTooltip, refs.floating);
95
+ }, [setMenuState, inline]);
96
+ (0, import_useClickOutside.useOnClickOutside)(inline ? null : refs.reference, hideTooltip, refs.floating);
96
97
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
97
98
  import_styled.StyledContainer,
98
99
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/container/Container.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable consistent-return */\n/* eslint-disable complexity */\nimport { FloatingWrapper, useFloatingContext } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes, useGetXstyledProps, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useContext, useEffect, useMemo } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport { useOnClickOutside } from '../../config/useClickOutside.js';\nimport { Controls } from '../controls/index.js';\nimport { LiveRegion } from '../LiveRegion.js';\nimport { MenuList } from '../menu-list/index.js';\nimport { StyledContainer, StyledPopperWrapper } from './styled.js';\n\nexport const Container = (): JSX.Element => {\n const { props, internalRef, setMenuState, menuState } = useContext(ComboBoxContext);\n\n const {\n inline,\n startPlacementPreference,\n placementOrderPreference,\n isLoading,\n isSkeleton,\n applyAriaDisabled,\n popperProps,\n } = props;\n const globalAttributes = useGetGlobalAttributes(props) as ReturnType<typeof useGetGlobalAttributes> & {\n 'data-testid'?: string;\n };\n const { zIndex, ...xStyledProps } = useGetXstyledProps(props);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n const correctZIndex = zIndex ? parseInt(zIndex as string, 10) : undefined;\n // Removing possible collisionable props\n const { className, 'data-testid': dataTestId } = globalAttributes;\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setMenuState(false, 'blur');\n if (internalRef?.current) internalRef.current.blur();\n }, [internalRef, setMenuState]);\n\n useEffect(() => {\n const closeMenuOnWindowBlur = () => {\n if (menuState) setMenuState(false, 'blur');\n };\n\n window.addEventListener('blur', closeMenuOnWindowBlur);\n\n return () => {\n window.removeEventListener('blur', closeMenuOnWindowBlur);\n };\n }, [menuState, setMenuState]);\n\n const config = useMemo(\n () => ({\n placement: startPlacementPreference,\n withoutAnimation: true,\n placementOrderPreference,\n zIndex: correctZIndex,\n customOffset: [0, 5] as [number, number],\n handleCloseMenu,\n externallyControlledIsOpen: menuState,\n }),\n [startPlacementPreference, placementOrderPreference, correctZIndex, handleCloseMenu, menuState],\n );\n\n const { refs, floatingStyles, context } = useFloatingContext(config);\n\n const hideTooltip = useCallback(() => {\n setMenuState(false, 'blur');\n }, [setMenuState]);\n\n useOnClickOutside(refs.reference, hideTooltip, refs.floating);\n\n return (\n <StyledContainer\n data-testid={dataTestId ?? ComboboxDataTestid.CONTAINER}\n innerRef={refs.setReference}\n className={className}\n applyAriaDisabled={applyAriaDisabled ?? false}\n {...xStyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LiveRegion />\n <Controls />\n\n {menuState && inline ? <MenuList /> : null}\n {menuState && !inline && refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n floatingStyles={floatingStyles}\n isOpen={menuState}\n context={context}\n {...popperProps}\n key={`${isLoading}${isSkeleton}`} // to force remount when loading/skeleton changes\n >\n <StyledPopperWrapper\n tabIndex={-1}\n onMouseDown={handleMouseDown}\n applyAriaDisabled={applyAriaDisabled ?? false}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuList />\n </StyledPopperWrapper>\n </FloatingWrapper>\n ) : null}\n </StyledContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6EnB;AAcI;AAzFR,iCAAoD;AACpD,8BAA0E;AAC1E,IAAAA,gBAAmE;AACnE,yBAA4B;AAC5B,iCAAmC;AACnC,6BAAkC;AAClC,sBAAyB;AACzB,wBAA2B;AAC3B,uBAAyB;AACzB,oBAAqD;AAE9C,MAAM,YAAY,MAAmB;AAC1C,QAAM,EAAE,OAAO,aAAa,cAAc,UAAU,QAAI,0BAAW,mBAAAC,OAAe;AAElF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,uBAAmB,gDAAuB,KAAK;AAGrD,QAAM,EAAE,QAAQ,GAAG,aAAa,QAAI,4CAAmB,KAAK;AAC5D,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,KAAK;AAErE,QAAM,gBAAgB,SAAS,SAAS,QAAkB,EAAE,IAAI;AAEhE,QAAM,EAAE,WAAW,eAAe,WAAW,IAAI;AACjD,QAAM,sBAAkB,2BAAY,CAAC,MAAwB;AAC3D,MAAE,eAAe;AAAA,EACnB,GAAG,CAAC,CAAC;AAEL,QAAM,sBAAkB,2BAAY,MAAM;AACxC,iBAAa,OAAO,MAAM;AAC1B,QAAI,aAAa,QAAS,aAAY,QAAQ,KAAK;AAAA,EACrD,GAAG,CAAC,aAAa,YAAY,CAAC;AAE9B,+BAAU,MAAM;AACd,UAAM,wBAAwB,M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,sDAAC,6BAAS;AAAA;AAAA,UACZ;AAAA,QACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable consistent-return */\n/* eslint-disable complexity */\nimport { FloatingWrapper, useFloatingContext } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes, useGetXstyledProps, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useContext, useEffect, useMemo } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport { useOnClickOutside } from '../../config/useClickOutside.js';\nimport { Controls } from '../controls/index.js';\nimport { LiveRegion } from '../LiveRegion.js';\nimport { MenuList } from '../menu-list/index.js';\nimport { StyledContainer, StyledPopperWrapper } from './styled.js';\n\nexport const Container = (): JSX.Element => {\n const { props, internalRef, setMenuState, menuState } = useContext(ComboBoxContext);\n\n const {\n inline,\n startPlacementPreference,\n placementOrderPreference,\n isLoading,\n isSkeleton,\n applyAriaDisabled,\n popperProps,\n } = props;\n const globalAttributes = useGetGlobalAttributes(props) as ReturnType<typeof useGetGlobalAttributes> & {\n 'data-testid'?: string;\n };\n const { zIndex, ...xStyledProps } = useGetXstyledProps(props);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n const correctZIndex = zIndex ? parseInt(zIndex as string, 10) : undefined;\n // Removing possible collisionable props\n const { className, 'data-testid': dataTestId } = globalAttributes;\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setMenuState(false, 'blur');\n if (internalRef?.current) internalRef.current.blur();\n }, [internalRef, setMenuState]);\n\n useEffect(() => {\n const closeMenuOnWindowBlur = () => {\n if (menuState) setMenuState(false, 'blur');\n };\n\n window.addEventListener('blur', closeMenuOnWindowBlur);\n\n return () => {\n window.removeEventListener('blur', closeMenuOnWindowBlur);\n };\n }, [menuState, setMenuState]);\n\n const config = useMemo(\n () => ({\n placement: startPlacementPreference,\n withoutAnimation: true,\n placementOrderPreference,\n zIndex: correctZIndex,\n customOffset: [0, 5] as [number, number],\n handleCloseMenu,\n externallyControlledIsOpen: menuState,\n }),\n [startPlacementPreference, placementOrderPreference, correctZIndex, handleCloseMenu, menuState],\n );\n\n const { refs, floatingStyles, context } = useFloatingContext(config);\n\n const hideTooltip = useCallback(() => {\n if (inline) return;\n setMenuState(false, 'blur');\n }, [setMenuState, inline]);\n\n useOnClickOutside(inline ? null : refs.reference, hideTooltip, refs.floating);\n\n return (\n <StyledContainer\n data-testid={dataTestId ?? ComboboxDataTestid.CONTAINER}\n innerRef={refs.setReference}\n className={className}\n applyAriaDisabled={applyAriaDisabled ?? false}\n {...xStyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LiveRegion />\n <Controls />\n\n {menuState && inline ? <MenuList /> : null}\n {menuState && !inline && refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n floatingStyles={floatingStyles}\n isOpen={menuState}\n context={context}\n {...popperProps}\n key={`${isLoading}${isSkeleton}`} // to force remount when loading/skeleton changes\n >\n <StyledPopperWrapper\n tabIndex={-1}\n onMouseDown={handleMouseDown}\n applyAriaDisabled={applyAriaDisabled ?? false}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuList />\n </StyledPopperWrapper>\n </FloatingWrapper>\n ) : null}\n </StyledContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8EnB;AAcI;AA1FR,iCAAoD;AACpD,8BAA0E;AAC1E,IAAAA,gBAAmE;AACnE,yBAA4B;AAC5B,iCAAmC;AACnC,6BAAkC;AAClC,sBAAyB;AACzB,wBAA2B;AAC3B,uBAAyB;AACzB,oBAAqD;AAE9C,MAAM,YA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2BAAY,MAAM;AACpC,QAAI,OAAQ;AACZ,iBAAa,OAAO,MAAM;AAAA,EAC5B,GAAG,CAAC,cAAc,MAAM,CAAC;AAEzB,gDAAkB,SAAS,OAAO,KAAK,WAAW,aAAa,KAAK,QAAQ;AAE5E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,cAAc,8CAAmB;AAAA,MAC9C,UAAU,KAAK;AAAA,MACf;AAAA,MACA,mBAAmB,qBAAqB;AAAA,MACvC,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,gCAAW;AAAA,QACZ,4CAAC,4BAAS;AAAA,QAET,aAAa,SAAS,4CAAC,6BAAS,IAAK;AAAA,QACrC,aAAa,CAAC,UAAU,KAAK,YAC5B;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf;AAAA,YACA,QAAQ;AAAA,YACR;AAAA,YACC,GAAG;AAAA,YACJ,KAAK,GAAG,SAAS,GAAG,UAAU;AAAA;AAAA,UAE9B;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,aAAa;AAAA,cACb,mBAAmB,qBAAqB;AAAA,cACxC;AAAA,cACA;AAAA,cAEA,sDAAC,6BAAS;AAAA;AAAA,UACZ;AAAA,QACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
6
6
  "names": ["import_react", "ComboBoxContext"]
7
7
  }
@@ -57,9 +57,10 @@ const Container = () => {
57
57
  );
58
58
  const { refs, floatingStyles, context } = useFloatingContext(config);
59
59
  const hideTooltip = useCallback(() => {
60
+ if (inline) return;
60
61
  setMenuState(false, "blur");
61
- }, [setMenuState]);
62
- useOnClickOutside(refs.reference, hideTooltip, refs.floating);
62
+ }, [setMenuState, inline]);
63
+ useOnClickOutside(inline ? null : refs.reference, hideTooltip, refs.floating);
63
64
  return /* @__PURE__ */ jsxs(
64
65
  StyledContainer,
65
66
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/container/Container.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable consistent-return */\n/* eslint-disable complexity */\nimport { FloatingWrapper, useFloatingContext } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes, useGetXstyledProps, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useContext, useEffect, useMemo } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport { useOnClickOutside } from '../../config/useClickOutside.js';\nimport { Controls } from '../controls/index.js';\nimport { LiveRegion } from '../LiveRegion.js';\nimport { MenuList } from '../menu-list/index.js';\nimport { StyledContainer, StyledPopperWrapper } from './styled.js';\n\nexport const Container = (): JSX.Element => {\n const { props, internalRef, setMenuState, menuState } = useContext(ComboBoxContext);\n\n const {\n inline,\n startPlacementPreference,\n placementOrderPreference,\n isLoading,\n isSkeleton,\n applyAriaDisabled,\n popperProps,\n } = props;\n const globalAttributes = useGetGlobalAttributes(props) as ReturnType<typeof useGetGlobalAttributes> & {\n 'data-testid'?: string;\n };\n const { zIndex, ...xStyledProps } = useGetXstyledProps(props);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n const correctZIndex = zIndex ? parseInt(zIndex as string, 10) : undefined;\n // Removing possible collisionable props\n const { className, 'data-testid': dataTestId } = globalAttributes;\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setMenuState(false, 'blur');\n if (internalRef?.current) internalRef.current.blur();\n }, [internalRef, setMenuState]);\n\n useEffect(() => {\n const closeMenuOnWindowBlur = () => {\n if (menuState) setMenuState(false, 'blur');\n };\n\n window.addEventListener('blur', closeMenuOnWindowBlur);\n\n return () => {\n window.removeEventListener('blur', closeMenuOnWindowBlur);\n };\n }, [menuState, setMenuState]);\n\n const config = useMemo(\n () => ({\n placement: startPlacementPreference,\n withoutAnimation: true,\n placementOrderPreference,\n zIndex: correctZIndex,\n customOffset: [0, 5] as [number, number],\n handleCloseMenu,\n externallyControlledIsOpen: menuState,\n }),\n [startPlacementPreference, placementOrderPreference, correctZIndex, handleCloseMenu, menuState],\n );\n\n const { refs, floatingStyles, context } = useFloatingContext(config);\n\n const hideTooltip = useCallback(() => {\n setMenuState(false, 'blur');\n }, [setMenuState]);\n\n useOnClickOutside(refs.reference, hideTooltip, refs.floating);\n\n return (\n <StyledContainer\n data-testid={dataTestId ?? ComboboxDataTestid.CONTAINER}\n innerRef={refs.setReference}\n className={className}\n applyAriaDisabled={applyAriaDisabled ?? false}\n {...xStyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LiveRegion />\n <Controls />\n\n {menuState && inline ? <MenuList /> : null}\n {menuState && !inline && refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n floatingStyles={floatingStyles}\n isOpen={menuState}\n context={context}\n {...popperProps}\n key={`${isLoading}${isSkeleton}`} // to force remount when loading/skeleton changes\n >\n <StyledPopperWrapper\n tabIndex={-1}\n onMouseDown={handleMouseDown}\n applyAriaDisabled={applyAriaDisabled ?? false}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuList />\n </StyledPopperWrapper>\n </FloatingWrapper>\n ) : null}\n </StyledContainer>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6EnB,SASE,KATF;AAcI;AAzFR,SAAS,iBAAiB,0BAA0B;AACpD,SAAS,wBAAwB,oBAAoB,qBAAqB;AAC1E,SAAgB,aAAa,YAAY,WAAW,eAAe;AACnE,OAAO,qBAAqB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,iBAAiB,2BAA2B;AAE9C,MAAM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AACpC,iBAAa,OAAO,MAAM;AAAA,EAC5B,GAAG,CAAC,YAAY,CAAC;AAEjB,oBAAkB,KAAK,WAAW,aAAa,KAAK,QAAQ;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,cAAc,mBAAmB;AAAA,MAC9C,UAAU,KAAK;AAAA,MACf;AAAA,MACA,mBAAmB,qBAAqB;AAAA,MACvC,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,cAAW;AAAA,QACZ,oBAAC,YAAS;AAAA,QAET,aAAa,SAAS,oBAAC,YAAS,IAAK;AAAA,QACrC,aAAa,CAAC,UAAU,KAAK,YAC5B;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf;AAAA,YACA,QAAQ;AAAA,YACR;AAAA,YACC,GAAG;AAAA,YACJ,KAAK,GAAG,SAAS,GAAG,UAAU;AAAA;AAAA,UAE9B;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,aAAa;AAAA,cACb,mBAAmB,qBAAqB;AAAA,cACxC;AAAA,cACA;AAAA,cAEA,8BAAC,YAAS;AAAA;AAAA,UACZ;AAAA,QACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable consistent-return */\n/* eslint-disable complexity */\nimport { FloatingWrapper, useFloatingContext } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes, useGetXstyledProps, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useContext, useEffect, useMemo } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport { useOnClickOutside } from '../../config/useClickOutside.js';\nimport { Controls } from '../controls/index.js';\nimport { LiveRegion } from '../LiveRegion.js';\nimport { MenuList } from '../menu-list/index.js';\nimport { StyledContainer, StyledPopperWrapper } from './styled.js';\n\nexport const Container = (): JSX.Element => {\n const { props, internalRef, setMenuState, menuState } = useContext(ComboBoxContext);\n\n const {\n inline,\n startPlacementPreference,\n placementOrderPreference,\n isLoading,\n isSkeleton,\n applyAriaDisabled,\n popperProps,\n } = props;\n const globalAttributes = useGetGlobalAttributes(props) as ReturnType<typeof useGetGlobalAttributes> & {\n 'data-testid'?: string;\n };\n const { zIndex, ...xStyledProps } = useGetXstyledProps(props);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n const correctZIndex = zIndex ? parseInt(zIndex as string, 10) : undefined;\n // Removing possible collisionable props\n const { className, 'data-testid': dataTestId } = globalAttributes;\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setMenuState(false, 'blur');\n if (internalRef?.current) internalRef.current.blur();\n }, [internalRef, setMenuState]);\n\n useEffect(() => {\n const closeMenuOnWindowBlur = () => {\n if (menuState) setMenuState(false, 'blur');\n };\n\n window.addEventListener('blur', closeMenuOnWindowBlur);\n\n return () => {\n window.removeEventListener('blur', closeMenuOnWindowBlur);\n };\n }, [menuState, setMenuState]);\n\n const config = useMemo(\n () => ({\n placement: startPlacementPreference,\n withoutAnimation: true,\n placementOrderPreference,\n zIndex: correctZIndex,\n customOffset: [0, 5] as [number, number],\n handleCloseMenu,\n externallyControlledIsOpen: menuState,\n }),\n [startPlacementPreference, placementOrderPreference, correctZIndex, handleCloseMenu, menuState],\n );\n\n const { refs, floatingStyles, context } = useFloatingContext(config);\n\n const hideTooltip = useCallback(() => {\n if (inline) return;\n setMenuState(false, 'blur');\n }, [setMenuState, inline]);\n\n useOnClickOutside(inline ? null : refs.reference, hideTooltip, refs.floating);\n\n return (\n <StyledContainer\n data-testid={dataTestId ?? ComboboxDataTestid.CONTAINER}\n innerRef={refs.setReference}\n className={className}\n applyAriaDisabled={applyAriaDisabled ?? false}\n {...xStyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LiveRegion />\n <Controls />\n\n {menuState && inline ? <MenuList /> : null}\n {menuState && !inline && refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n floatingStyles={floatingStyles}\n isOpen={menuState}\n context={context}\n {...popperProps}\n key={`${isLoading}${isSkeleton}`} // to force remount when loading/skeleton changes\n >\n <StyledPopperWrapper\n tabIndex={-1}\n onMouseDown={handleMouseDown}\n applyAriaDisabled={applyAriaDisabled ?? false}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuList />\n </StyledPopperWrapper>\n </FloatingWrapper>\n ) : null}\n </StyledContainer>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8EnB,SASE,KATF;AAcI;AA1FR,SAAS,iBAAiB,0BAA0B;AACpD,SAAS,wBAAwB,oBAAoB,qBAAqB;AAC1E,SAAgB,aAAa,YAAY,WAAW,eAAe;AACnE,OAAO,qBAAqB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,iBAAiB,2BAA2B;AAE9C,MAAM,YAAY,MAAmB;AAC1C,QAAM,EAAE,OAAO,aAAa,cAAc,UAAU,IAAI,WAAW,eAAe;AAElF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,mBAAmB,uBAAuB,KAAK;AAGrD,QAAM,EAAE,QAAQ,GAAG,aAAa,IAAI,mBAAmB,KAAK;AAC5D,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAc,KAAK;AAErE,QAAM,gBAAgB,SAAS,SAAS,QAAkB,EAAE,IAAI;AAEhE,QAAM,EAAE,WAAW,eAAe,WAAW,IAAI;AACjD,QAAM,kBAAkB,YAAY,CAAC,MAAwB;AAC3D,MAAE,eAAe;AAAA,EACnB,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K;AAAA,YACf;AAAA,YACA,QAAQ;AAAA,YACR;AAAA,YACC,GAAG;AAAA,YACJ,KAAK,GAAG,SAAS,GAAG,UAAU;AAAA;AAAA,UAE9B;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,aAAa;AAAA,cACb,mBAAmB,qBAAqB;AAAA,cACxC;AAAA,cACA;AAAA,cAEA,8BAAC,YAAS;AAAA;AAAA,UACZ;AAAA,QACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-combobox",
3
- "version": "3.70.0-next.8",
3
+ "version": "3.70.0-next.9",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Combobox",
6
6
  "files": [
@@ -37,25 +37,25 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "uid": "^2.0.2",
40
- "@elliemae/ds-button-v2": "3.70.0-next.8",
41
- "@elliemae/ds-circular-progress-indicator": "3.70.0-next.8",
42
- "@elliemae/ds-fast-list": "3.70.0-next.8",
43
- "@elliemae/ds-floating-context": "3.70.0-next.8",
44
- "@elliemae/ds-grid": "3.70.0-next.8",
45
- "@elliemae/ds-menu-items": "3.70.0-next.8",
46
- "@elliemae/ds-icons": "3.70.0-next.8",
47
- "@elliemae/ds-pills-v2": "3.70.0-next.8",
48
- "@elliemae/ds-props-helpers": "3.70.0-next.8",
49
- "@elliemae/ds-system": "3.70.0-next.8"
40
+ "@elliemae/ds-button-v2": "3.70.0-next.9",
41
+ "@elliemae/ds-floating-context": "3.70.0-next.9",
42
+ "@elliemae/ds-grid": "3.70.0-next.9",
43
+ "@elliemae/ds-fast-list": "3.70.0-next.9",
44
+ "@elliemae/ds-menu-items": "3.70.0-next.9",
45
+ "@elliemae/ds-icons": "3.70.0-next.9",
46
+ "@elliemae/ds-circular-progress-indicator": "3.70.0-next.9",
47
+ "@elliemae/ds-pills-v2": "3.70.0-next.9",
48
+ "@elliemae/ds-props-helpers": "3.70.0-next.9",
49
+ "@elliemae/ds-system": "3.70.0-next.9"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@elliemae/pui-theme": "~2.13.0",
53
53
  "jest": "^30.0.0",
54
54
  "styled-components": "~5.3.9",
55
55
  "styled-system": "^5.1.5",
56
- "@elliemae/ds-form-helpers-mask-hooks": "3.70.0-next.8",
57
- "@elliemae/ds-monorepo-devops": "3.70.0-next.8",
58
- "@elliemae/ds-test-utils": "3.70.0-next.8"
56
+ "@elliemae/ds-form-helpers-mask-hooks": "3.70.0-next.9",
57
+ "@elliemae/ds-monorepo-devops": "3.70.0-next.9",
58
+ "@elliemae/ds-test-utils": "3.70.0-next.9"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@elliemae/pui-theme": "~2.13.0",