@elliemae/ds-global-header 3.70.0-next.7 → 3.70.0-next.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSGlobalHeader.js +16 -2
- package/dist/cjs/DSGlobalHeader.js.map +2 -2
- package/dist/cjs/DSGlobalHeaderContext.js.map +2 -2
- package/dist/cjs/config/useGlobalHeader.js +13 -2
- package/dist/cjs/config/useGlobalHeader.js.map +2 -2
- package/dist/cjs/constants/index.js +11 -5
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +3 -6
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/package.json +1 -4
- package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +33 -1
- package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +2 -2
- package/dist/cjs/parts/Logo/GlobalHeaderLogo.js +16 -2
- package/dist/cjs/parts/Logo/GlobalHeaderLogo.js.map +2 -2
- package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js +54 -16
- package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
- package/dist/cjs/{utils/useCallbackAfterRender.js → parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js} +7 -16
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js.map +7 -0
- package/dist/cjs/{hooks/useOnClickOutside.js → parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js} +13 -30
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js +53 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js +84 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js +50 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js +66 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +118 -71
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +3 -3
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js +27 -11
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js +52 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js +23 -15
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js +54 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js +28 -16
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js +61 -50
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js +58 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js +33 -25
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/index.js +12 -4
- package/dist/cjs/parts/Toolbar/outOfTheBox/index.js.map +2 -2
- package/dist/cjs/parts/Toolbar/styles.js +6 -1
- package/dist/cjs/parts/Toolbar/styles.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/sharedTypes.js.map +1 -1
- package/dist/cjs/typescript-testing/typescript-global-header-toolbar-types.js +52 -0
- package/dist/cjs/typescript-testing/typescript-global-header-toolbar-types.js.map +2 -2
- package/dist/esm/DSGlobalHeader.js +16 -2
- package/dist/esm/DSGlobalHeader.js.map +2 -2
- package/dist/esm/DSGlobalHeaderContext.js.map +2 -2
- package/dist/esm/config/useGlobalHeader.js +13 -2
- package/dist/esm/config/useGlobalHeader.js.map +2 -2
- package/dist/esm/constants/index.js +11 -5
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +3 -6
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/package.json +1 -4
- package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +34 -2
- package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +2 -2
- package/dist/esm/parts/Logo/GlobalHeaderLogo.js +16 -2
- package/dist/esm/parts/Logo/GlobalHeaderLogo.js.map +2 -2
- package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js +55 -17
- package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js +8 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js +13 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js +23 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js +54 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js +20 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js +36 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +119 -72
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js +28 -12
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js +22 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js +24 -16
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js +24 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js +34 -17
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js +61 -50
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js +28 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js +33 -25
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/index.js +8 -3
- package/dist/esm/parts/Toolbar/outOfTheBox/index.js.map +2 -2
- package/dist/esm/parts/Toolbar/styles.js +6 -1
- package/dist/esm/parts/Toolbar/styles.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-global-header-toolbar-types.js +52 -0
- package/dist/esm/typescript-testing/typescript-global-header-toolbar-types.js.map +2 -2
- package/dist/types/DSGlobalHeaderContext.d.ts +10 -2
- package/dist/types/config/useGlobalHeader.d.ts +3 -4
- package/dist/types/constants/index.d.ts +4 -3
- package/dist/types/index.d.ts +0 -2
- package/dist/types/parts/Breadcrumb/PureBreadcrumb.d.ts +1 -1
- package/dist/types/parts/Breadcrumb/styles.d.ts +1 -1
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.d.ts +4 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.d.ts +2 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.d.ts +1 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.d.ts +2 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.d.ts +23 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.d.ts +456 -0
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.d.ts +2 -2
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.d.ts +2 -2
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.d.ts +28 -0
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.d.ts +9 -1
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.d.ts +26 -0
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.d.ts +2 -2
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.d.ts +3 -1
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.d.ts +26 -0
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.d.ts +2 -3
- package/dist/types/parts/Toolbar/outOfTheBox/index.d.ts +3 -3
- package/dist/types/parts/Toolbar/styles.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +63 -72
- package/dist/types/sharedTypes.d.ts +16 -6
- package/package.json +20 -17
- package/dist/cjs/hooks/useOnClickOutside.js.map +0 -7
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js +0 -127
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
- package/dist/cjs/utils/useCallbackAfterRender.js.map +0 -7
- package/dist/esm/hooks/useOnClickOutside.js +0 -30
- package/dist/esm/hooks/useOnClickOutside.js.map +0 -7
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js +0 -97
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
- package/dist/esm/utils/useCallbackAfterRender.js +0 -17
- package/dist/esm/utils/useCallbackAfterRender.js.map +0 -7
- package/dist/types/hooks/useOnClickOutside.d.ts +0 -1
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.d.ts +0 -6
- package/dist/types/tests/GlobalHeader.a11y.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.callback.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.getOwnerProps.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.keyboard.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.setup.test.d.ts +0 -113
- package/dist/types/typescript-testing/typescript-global-header-breadcrumb-types.d.ts +0 -3
- package/dist/types/typescript-testing/typescript-global-header-deprecated.d.ts +0 -1
- package/dist/types/typescript-testing/typescript-global-header-toolbar-types.d.ts +0 -3
- package/dist/types/typescript-testing/typescript-global-header-valid.d.ts +0 -1
- package/dist/types/utils/useCallbackAfterRender.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useContext } from 'react';\nimport { DSGlobalHeaderContext } from '../../../../../DSGlobalHeaderContext.js';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../../constants/index.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getGlobalAttributes, getXstyledProps } from '@elliemae/ds-props-helpers';\nimport React, { useContext } from 'react';\nimport { DSGlobalHeaderContext } from '../../../../../DSGlobalHeaderContext.js';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../../constants/index.js';\nimport { StyledItemButton, StyledItemContainer, StyledLabel, StyledList, StyledSeparator } from './styles.js';\nimport type { PopupMenuContentT } from './react-desc-prop-types.js';\nimport { usePopupMenuContent } from './usePopupMenuContent.js';\n\nexport const PopupMenuContent = React.memo(\n ({\n options,\n onItemClick,\n openIntent,\n popupOnKeyPress,\n setIsOpen,\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n // The part-level global attribute + xstyled layers, forwarded onto the list root below.\n ...restGlobalAndXstyled\n }: PopupMenuContentT.Props): JSX.Element => {\n const { instanceUID } = useContext(DSGlobalHeaderContext);\n\n // Separators are rendered as `role=\"none\"` and carry no ref, so they are excluded from the count the\n // seeding compares against.\n const focusableItemsCount = options.filter((option) => option.type !== 'separator').length;\n\n const { menuRef, setRef, keyboardNavigation } = usePopupMenuContent({\n setIsOpen,\n openIntent,\n focusableItemsCount,\n });\n\n /*\n * Explicit and empty at every slot render site below. `getOwnerPropsArguments` hydrates function-form\n * slot props and nothing else, so \"no arguments\" is worth stating rather than leaving to inference.\n *\n * The per-option sites (item container, item button, label, separator) are where a real payload would\n * go \u2014 ds-fast-list hands its rows `{ index: getId(index) }` for exactly this. What a per-option payload\n * should contain is a consumer-facing contract decision, so adding one is a deliberate API change, not\n * a fill-in-the-blank.\n */\n const noSlotArguments = () => ({});\n\n return (\n <StyledList\n innerRef={menuRef}\n role=\"menu\"\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_LIST}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n {...getGlobalAttributes(restGlobalAndXstyled)}\n {...getXstyledProps(restGlobalAndXstyled)}\n >\n {options.map((option) => {\n const { type, Icon, label = '', onClick, Content, ...rest } = option;\n\n const globalAttrs = getGlobalAttributes(rest);\n\n const handleClick = (e: React.MouseEvent) => {\n onItemClick();\n if (onClick) onClick(e);\n };\n\n /*\n * No Escape branch here on purpose. Escape is the floating context's, via `closeOnEscape` +\n * `returnFocusToReference` \u2014 it closes the menu AND returns focus to the trigger, which this\n * part used to hand-roll. Re-adding a local Escape would close it twice and fight that focus\n * return.\n */\n const handleKeyDown = (e: React.KeyboardEvent) => {\n keyboardNavigation(e);\n if (popupOnKeyPress) popupOnKeyPress(e);\n };\n\n switch (type) {\n case 'separator':\n return (\n <StyledSeparator\n key={`${instanceUID}-separator-${label}`}\n role=\"none\"\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_SEPARATOR}\n {...globalAttrs}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n />\n );\n case 'custom':\n return (\n <StyledItemContainer\n key={`${instanceUID}-popup-${label}`}\n role=\"menuitem\"\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <StyledItemButton\n innerRef={setRef}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_ITEM_BUTTON}\n {...globalAttrs}\n type=\"button\"\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {Content && <Content />}\n </StyledItemButton>\n </StyledItemContainer>\n );\n default:\n return (\n <StyledItemContainer\n key={`${instanceUID}-popup-${label}`}\n role=\"menuitem\"\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <StyledItemButton\n innerRef={setRef}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_ITEM_BUTTON}\n {...globalAttrs}\n type=\"button\"\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {Icon && <Icon />}\n {label && (\n <StyledLabel\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_POPUP_MENU_ITEM_BUTTON_LABEL}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {label}\n </StyledLabel>\n )}\n </StyledItemButton>\n </StyledItemContainer>\n );\n }\n })}\n </StyledList>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4EP,cAyCE,YAzCF;AA5EhB,SAAS,qBAAqB,uBAAuB;AACrD,OAAOA,UAAS,kBAAkB;AAClC,SAAS,6BAA6B;AACtC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB,qBAAqB,aAAa,YAAY,uBAAuB;AAEhG,SAAS,2BAA2B;AAE7B,MAAM,mBAAmBA,OAAM;AAAA,EACpC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA,GAAG;AAAA,EACL,MAA4C;AAC1C,UAAM,EAAE,YAAY,IAAI,WAAW,qBAAqB;AAIxD,UAAM,sBAAsB,QAAQ,OAAO,CAAC,WAAW,OAAO,SAAS,WAAW,EAAE;AAEpF,UAAM,EAAE,SAAS,QAAQ,mBAAmB,IAAI,oBAAoB;AAAA,MAClE;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAWD,UAAM,kBAAkB,OAAO,CAAC;AAEhC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,MAAK;AAAA,QACL,eAAa,0BAA0B;AAAA,QACvC,eAAe;AAAA,QACf,wBAAwB;AAAA,QACvB,GAAG,oBAAoB,oBAAoB;AAAA,QAC3C,GAAG,gBAAgB,oBAAoB;AAAA,QAEvC,kBAAQ,IAAI,CAAC,WAAW;AACvB,gBAAM,EAA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MAAK;AAAA,sBACL,eAAe;AAAA,sBACf,wBAAwB;AAAA,sBAEvB;AAAA,gCAAQ,oBAAC,QAAK;AAAA,wBACd,SACC;AAAA,0BAAC;AAAA;AAAA,4BACC,eAAa,0BAA0B;AAAA,4BACvC,eAAe;AAAA,4BACf,wBAAwB;AAAA,4BAEvB;AAAA;AAAA,wBACH;AAAA;AAAA;AAAA,kBAEJ;AAAA;AAAA,gBA1BK,GAAG,WAAW,UAAU,KAAK;AAAA,cA2BpC;AAAA,UAEN;AAAA,QACF,CAAC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
+
const PopupMenuContentPropTypes = {
|
|
4
|
+
...globalAttributesPropTypes,
|
|
5
|
+
...xstyledPropTypes,
|
|
6
|
+
options: PropTypes.array.description(
|
|
7
|
+
"Consumer-authored menu entries. Format: [{ type?, Icon?, label?, onClick?, Content?, ...globalAttributes }]"
|
|
8
|
+
).isRequired,
|
|
9
|
+
onItemClick: PropTypes.func.description("Invoked after a menu item click so the wrapper can apply its closeOnClick policy").signature("(() => void )").isRequired,
|
|
10
|
+
openIntent: PropTypes.string.description('Which end of the menu this open lands on: "first" or "last"').isRequired,
|
|
11
|
+
setIsOpen: PropTypes.func.description("The floating context's hide function").signature("(() => void )").isRequired,
|
|
12
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader: PropTypes.func.description(
|
|
13
|
+
"Returns the props passed to DSGlobalHeader, so getPartProps can look up this slot consumer-supplied props. Must come from DSGlobalHeader; the function-form hydrator is supplied per slot render site instead"
|
|
14
|
+
).signature("(() => Partial<DSGlobalHeaderT.DefaultProps> )").isRequired,
|
|
15
|
+
popupOnKeyPress: PropTypes.func.description("Consumer key handler, invoked on menu items alongside the internal keyboard navigation").signature("(( event: React.KeyboardEvent ) => void )")
|
|
16
|
+
};
|
|
17
|
+
const PopupMenuContentPropTypesSchema = PopupMenuContentPropTypes;
|
|
18
|
+
export {
|
|
19
|
+
PopupMenuContentPropTypes,
|
|
20
|
+
PopupMenuContentPropTypesSchema
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type React from 'react';\nimport type { DSGlobalHeaderT } from '../../../../../react-desc-prop-types.js';\n\n/*\n * Relocated here from DSGlobalHeaderT.PopupMenuContentProps, per the convention every other part in the\n * repo follows. Consumed by PopupMenuContent.tsx.\n *\n * This is the innermost of the three Popup* contracts and the one least likely to be a consumer's\n * business: it is what the PopupMenu wrapper hands to its own menu-content renderer. Every prop except\n * `options` is machinery the wrapper generated. `options` is the one consumer-authored value on it,\n * and it arrives already unwrapped from DSGlobalHeaderT.PopupMenuComponentProps \u2014 which is exactly why\n * having both `PopupMenuComponentProps` and `PopupMenuContentProps` visible side by side in the public\n * namespace was misleading: they look like a pair a developer chooses between, and they are not.\n *\n * IoC layers: the slot layer via `getOwnerPropsAwareOfPropsPassedToGlobalHeader` (fully wired \u2014 this part\n * passes it to the list, items, item buttons, labels and separators, each with its own explicit empty\n * hydrator), per-entry global attributes via `options` items, and the part-level global attribute /\n * xstyled layer below.\n *\n * KNOWN GAP \u2014 the part-level global attribute + xstyled layer is the one thing in this file that was an\n * addition rather than a transcription: the old DSGlobalHeaderT.PopupMenuContentProps did not extend\n * GlobalAttributesT at all, which made this the only out-of-the-box part missing that layer and left its\n * PropTypes unable to spread globalAttributesPropTypes coherently. Nothing forwards either to the root\n * list yet, so for this part both remain a statement of the intended contract rather than of behaviour.\n * Per-entry attributes on `options` items DO reach the DOM and are covered by the pillar tests.\n *\n * No slots of its own \u2014 see the AppPicker sibling file for why.\n */\nexport declare namespace PopupMenuContentT {\n export interface RequiredProps {\n /** The consumer-authored menu entries, unwrapped from componentProps by the PopupMenu wrapper. */\n options: DSGlobalHeaderT.PopupMenuContentItem[];\n /** Wrapper callback: applies the item's closeOnClick policy after a menu item is clicked. */\n onItemClick: () => void;\n /** Wrapper callback: closes the menu and returns focus to the trigger. */\n /** Which end of the menu this open lands on \u2014 see usePopupMenuContent. */\n openIntent: 'first' | 'last';\n /** Wrapper callback: the floating context's hide function. */\n setIsOpen: () => void;\n /*\n * The slot lookup table, and the only half of the slot IoC layer that may be drilled down \u2014 the\n * function-form hydrator is supplied per slot render site instead. See the AppPicker sibling for the\n * full reasoning and the getPartProps mechanics behind the name.\n */\n getOwnerPropsAwareOfPropsPassedToGlobalHeader: () => Partial<DSGlobalHeaderT.DefaultProps>;\n }\n\n /*\n * Intentionally empty, and intentionally still declared \u2014 \"this part has no default props, do not\n * expect them\". See the AppPicker sibling for the full reasoning.\n */\n export interface DefaultProps {}\n\n export interface OptionalProps {\n /*\n * Optional, matching the runtime: PopupMenuContent guards it (`if (popupOnKeyPress)`) and consumers\n * routinely omit it. It was declared required, which was simply wrong \u2014 the type claimed a guarantee\n * the code never relied on, and every consumer omitting it was type-lying to satisfy the compiler.\n */\n popupOnKeyPress?: (event: React.KeyboardEvent) => void;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLUListElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n keyof RequiredProps | keyof DefaultProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLUListElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n keyof RequiredProps | keyof DefaultProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const PopupMenuContentPropTypes: DSPropTypesSchema<PopupMenuContentT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n options: PropTypes.array.description(\n 'Consumer-authored menu entries. Format: [{ type?, Icon?, label?, onClick?, Content?, ...globalAttributes }]',\n ).isRequired,\n onItemClick: PropTypes.func\n .description('Invoked after a menu item click so the wrapper can apply its closeOnClick policy')\n .signature('(() => void )').isRequired,\n openIntent: PropTypes.string.description('Which end of the menu this open lands on: \"first\" or \"last\"').isRequired,\n setIsOpen: PropTypes.func.description(\"The floating context's hide function\").signature('(() => void )').isRequired,\n getOwnerPropsAwareOfPropsPassedToGlobalHeader: PropTypes.func\n .description(\n 'Returns the props passed to DSGlobalHeader, so getPartProps can look up this slot consumer-supplied props. Must come from DSGlobalHeader; the function-form hydrator is supplied per slot render site instead',\n )\n .signature('(() => Partial<DSGlobalHeaderT.DefaultProps> )').isRequired,\n popupOnKeyPress: PropTypes.func\n .description('Consumer key handler, invoked on menu items alongside the internal keyboard navigation')\n .signature('(( event: React.KeyboardEvent ) => void )'),\n};\n\nexport const PopupMenuContentPropTypesSchema =\n PopupMenuContentPropTypes as unknown as ValidationMap<PopupMenuContentT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAwFhE,MAAM,4BAAwE;AAAA,EACnF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,SAAS,UAAU,MAAM;AAAA,IACvB;AAAA,EACF,EAAE;AAAA,EACF,aAAa,UAAU,KACpB,YAAY,kFAAkF,EAC9F,UAAU,eAAe,EAAE;AAAA,EAC9B,YAAY,UAAU,OAAO,YAAY,6DAA6D,EAAE;AAAA,EACxG,WAAW,UAAU,KAAK,YAAY,sCAAsC,EAAE,UAAU,eAAe,EAAE;AAAA,EACzG,+CAA+C,UAAU,KACtD;AAAA,IACC;AAAA,EACF,EACC,UAAU,gDAAgD,EAAE;AAAA,EAC/D,iBAAiB,UAAU,KACxB,YAAY,wFAAwF,EACpG,UAAU,2CAA2C;AAC1D;AAEO,MAAM,kCACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useRef, useCallback
|
|
3
|
-
const usePopupMenuContent = ({ setIsOpen }) => {
|
|
2
|
+
import { useRef, useCallback } from "react";
|
|
3
|
+
const usePopupMenuContent = ({ setIsOpen, openIntent, focusableItemsCount }) => {
|
|
4
4
|
const menuRef = useRef(null);
|
|
5
5
|
const allMenuItemsRef = useRef([]);
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
const hasSeededFocusRef = useRef(false);
|
|
7
|
+
const setRef = useCallback(
|
|
8
|
+
(ref) => {
|
|
9
|
+
if (ref && !allMenuItemsRef.current.includes(ref)) {
|
|
10
|
+
allMenuItemsRef.current.push(ref);
|
|
11
|
+
}
|
|
12
|
+
allMenuItemsRef.current.forEach((item, index) => {
|
|
13
|
+
if (index === 0) {
|
|
14
|
+
item?.setAttribute?.("tabindex", "0");
|
|
15
|
+
} else {
|
|
16
|
+
item?.setAttribute?.("tabindex", "-1");
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
if (!ref || hasSeededFocusRef.current) return;
|
|
20
|
+
const hasReachedSeedTarget = openIntent === "last" ? allMenuItemsRef.current.length === focusableItemsCount : allMenuItemsRef.current[0] === ref;
|
|
21
|
+
if (hasReachedSeedTarget) {
|
|
22
|
+
hasSeededFocusRef.current = true;
|
|
23
|
+
const target = openIntent === "last" ? allMenuItemsRef.current[focusableItemsCount - 1] : ref;
|
|
24
|
+
target?.focus();
|
|
15
25
|
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
setTimeout(() => allMenuItemsRef.current?.[0]?.focus(), 0);
|
|
20
|
-
}, []);
|
|
26
|
+
},
|
|
27
|
+
[openIntent, focusableItemsCount]
|
|
28
|
+
);
|
|
21
29
|
const keyboardNavigation = useCallback(
|
|
22
30
|
(e) => {
|
|
23
31
|
if (e.code === "Tab") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef, useCallback
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef, useCallback } from 'react';\n\ninterface UsePopupMenuContentT {\n setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;\n /**\n * Which end of the menu this open should land on. Mirrors DSAppPicker's open-intent mechanism, scoped\n * to this part: the trigger records WHICH key opened the menu and the seeding below reads it \u2014 ArrowUp\n * lands on the last item, everything else on the first.\n */\n openIntent: 'first' | 'last';\n /** How many focusable items the menu mounts. Separators are not focusable and are excluded. */\n focusableItemsCount: number;\n}\n\nexport const usePopupMenuContent = ({ setIsOpen, openIntent, focusableItemsCount }: UsePopupMenuContentT) => {\n const menuRef = useRef<HTMLUListElement>(null);\n const allMenuItemsRef = useRef<HTMLButtonElement[]>([]);\n // Seeded once per mount of the menu content. A ref rather than state because nothing renders from it.\n const hasSeededFocusRef = useRef(false);\n\n const setRef = useCallback(\n (ref: HTMLButtonElement) => {\n if (ref && !allMenuItemsRef.current.includes(ref)) {\n allMenuItemsRef.current.push(ref);\n }\n\n allMenuItemsRef.current.forEach((item, index) => {\n if (index === 0) {\n item?.setAttribute?.('tabindex', '0');\n } else {\n item?.setAttribute?.('tabindex', '-1');\n }\n });\n\n /*\n * Initial focus, seeded from this ref callback \u2014 the correct place for it, because the callback is\n * guaranteed to run once the node exists. Do not move this into an effect or wrap it in a timer; per\n * antipattern_focus_management.md there is nothing left to wait for, and both reintroduce a race this\n * has no need for.\n *\n * `first` can seed the moment item 0 attaches. `last` cannot: the ref callbacks fire one per item and\n * nothing else here knows when the set is complete, which is why the count is passed in rather than\n * inferred. Comparing against it keeps the decision inside the callback instead of deferring it.\n *\n * Seeds once per mount of the menu content, which is why the guard ref exists.\n */\n if (!ref || hasSeededFocusRef.current) return;\n\n const hasReachedSeedTarget =\n openIntent === 'last'\n ? allMenuItemsRef.current.length === focusableItemsCount\n : allMenuItemsRef.current[0] === ref;\n\n if (hasReachedSeedTarget) {\n hasSeededFocusRef.current = true;\n const target = openIntent === 'last' ? allMenuItemsRef.current[focusableItemsCount - 1] : ref;\n target?.focus();\n }\n },\n [openIntent, focusableItemsCount],\n );\n\n const keyboardNavigation = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'Tab') {\n setIsOpen(false);\n } else {\n const currentIndex = allMenuItemsRef.current.indexOf(e.target as HTMLButtonElement);\n const allRefsLength = allMenuItemsRef.current.length;\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n if (currentIndex < allRefsLength - 1) {\n allMenuItemsRef.current[currentIndex + 1]?.focus?.();\n } else {\n allMenuItemsRef.current[0]?.focus?.();\n }\n }\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n if (currentIndex === 0) {\n allMenuItemsRef.current[allRefsLength - 1]?.focus?.();\n } else {\n allMenuItemsRef.current[currentIndex - 1]?.focus?.();\n }\n }\n }\n },\n [setIsOpen],\n );\n\n return {\n menuRef,\n setRef,\n keyboardNavigation,\n };\n};\n"],
|
|
5
|
+
"mappings":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AAQ,CAAC,GAAG,QAAQ;AAAA,UACtC;AAAA,QACF;AACA,YAAI,EAAE,QAAQ,WAAW;AACvB,YAAE,eAAe;AACjB,cAAI,iBAAiB,GAAG;AACtB,4BAAgB,QAAQ,gBAAgB,CAAC,GAAG,QAAQ;AAAA,UACtD,OAAO;AACL,4BAAgB,QAAQ,eAAe,CAAC,GAAG,QAAQ;AAAA,UACrD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,SAAS;AAAA,EACZ;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
+
const PopupMenuPropTypes = {
|
|
4
|
+
...globalAttributesPropTypes,
|
|
5
|
+
...xstyledPropTypes,
|
|
6
|
+
componentProps: PropTypes.object.description(
|
|
7
|
+
"The consumer-authored popup menu configuration: options, isOpen, closeOnClick and the key handlers"
|
|
8
|
+
).isRequired,
|
|
9
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader: PropTypes.func.description(
|
|
10
|
+
"Returns the props passed to DSGlobalHeader, so getPartProps can look up this slot consumer-supplied props. Must come from DSGlobalHeader; the function-form hydrator is supplied per slot render site instead"
|
|
11
|
+
).signature("(() => Partial<DSGlobalHeaderT.DefaultProps> )").isRequired,
|
|
12
|
+
setRef: PropTypes.func.description("Registers the trigger node with the toolbar focus management for arrow-key navigation").signature("(( ref: HTMLElement ) => void )").isRequired,
|
|
13
|
+
Icon: PropTypes.func.description("Icon rendered inside the trigger button"),
|
|
14
|
+
onClick: PropTypes.func.description("Consumer click handler for the trigger, invoked alongside the internal open/close toggle").signature("(( event: React.MouseEvent ) => void )"),
|
|
15
|
+
title: PropTypes.string.description(
|
|
16
|
+
"Receives the toolbar item label; printed as the HTML title attribute on the trigger"
|
|
17
|
+
)
|
|
18
|
+
};
|
|
19
|
+
const PopupMenuPropTypesSchema = PopupMenuPropTypes;
|
|
20
|
+
export {
|
|
21
|
+
PopupMenuPropTypes,
|
|
22
|
+
PopupMenuPropTypesSchema
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport type React from 'react';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\n\n/*\n * Relocated here from DSGlobalHeaderT.PopupProps, per the convention every other part in the repo\n * follows. Consumed by PopupMenu.tsx.\n *\n * This namespace describes what DSGlobalHeader passes DOWN to its own out-of-the-box Popup Menu\n * wrapper. It is NOT the shape an application developer authors \u2014 that is\n * DSGlobalHeaderT.PopupMenuItem (the toolbar config entry) and, inside it,\n * DSGlobalHeaderT.PopupMenuComponentProps. `setRef` and\n * `getOwnerPropsAwareOfPropsPassedToGlobalHeader` are generated by the widget and the developer is not\n * meant to know about them.\n *\n * The old name is worth losing on the way: `PopupProps` sat a word away from `PopupMenuItem`,\n * `PopupMenuComponentProps` and `PopupMenuContentProps` in the same namespace \u2014 the first two of which\n * ARE consumer-authored, while the third was internal and has been relocated to menuContent/ alongside\n * this one. `PopupMenuT.Props`, scoped to this directory, cannot be mistaken for any of them.\n *\n * All three IoC layers present: item-level global attributes onto the trigger, the slot layer via\n * `getOwnerPropsAwareOfPropsPassedToGlobalHeader`, and `componentProps` for the menu's own contract.\n *\n * No slots of its own \u2014 see the AppPicker sibling file for why (published slot surface stays under the\n * parent's name).\n *\n * KNOWN GAP \u2014 xstyled props are declared and not forwarded, as in every sibling part. See the AppPicker\n * file for the full statement; this part is additionally the one with no styled root to forward them to,\n * because PopupMenu.tsx's outermost element is a bare <div>.\n */\nexport declare namespace PopupMenuT {\n export interface RequiredProps {\n /** The consumer-authored configuration object for this toolbar item. */\n componentProps: DSGlobalHeaderT.PopupMenuComponentProps;\n /*\n * The slot lookup table, and the only half of the slot IoC layer that may be drilled down \u2014 the\n * function-form hydrator is supplied per slot render site instead. See the AppPicker sibling for the\n * full reasoning and the getPartProps mechanics behind the name.\n */\n getOwnerPropsAwareOfPropsPassedToGlobalHeader: () => Partial<DSGlobalHeaderT.DefaultProps>;\n /** Focus-management registration, supplied by useGlobalHeaderToolbar for arrow-key navigation. */\n setRef: (ref: HTMLElement) => void;\n }\n\n /*\n * Intentionally empty, and intentionally still declared \u2014 \"this part has no default props, do not\n * expect them\". See the AppPicker sibling for the full reasoning.\n */\n export interface DefaultProps {}\n\n export interface OptionalProps {\n Icon?: React.ComponentType<SvgIconT.Props>;\n onClick?: (event: React.MouseEvent) => void;\n /*\n * Carries the toolbar item's `label`: GlobalHeaderToolbar renders <PopupMenu title={label} .../>.\n * Faithful to the current declaration, including its standing note that landing this in the HTML\n * `title` attribute was probably not intended but is kept to avoid a breaking change.\n */\n title?: string;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const PopupMenuPropTypes: DSPropTypesSchema<PopupMenuT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n componentProps: PropTypes.object.description(\n 'The consumer-authored popup menu configuration: options, isOpen, closeOnClick and the key handlers',\n ).isRequired,\n getOwnerPropsAwareOfPropsPassedToGlobalHeader: PropTypes.func\n .description(\n 'Returns the props passed to DSGlobalHeader, so getPartProps can look up this slot consumer-supplied props. Must come from DSGlobalHeader; the function-form hydrator is supplied per slot render site instead',\n )\n .signature('(() => Partial<DSGlobalHeaderT.DefaultProps> )').isRequired,\n setRef: PropTypes.func\n .description('Registers the trigger node with the toolbar focus management for arrow-key navigation')\n .signature('(( ref: HTMLElement ) => void )').isRequired,\n Icon: PropTypes.func.description('Icon rendered inside the trigger button'),\n onClick: PropTypes.func\n .description('Consumer click handler for the trigger, invoked alongside the internal open/close toggle')\n .signature('(( event: React.MouseEvent ) => void )'),\n title: PropTypes.string.description(\n 'Receives the toolbar item label; printed as the HTML title attribute on the trigger',\n ),\n};\n\nexport const PopupMenuPropTypesSchema = PopupMenuPropTypes as unknown as ValidationMap<PopupMenuT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAuFhE,MAAM,qBAA0D;AAAA,EACrE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,gBAAgB,UAAU,OAAO;AAAA,IAC/B;AAAA,EACF,EAAE;AAAA,EACF,+CAA+C,UAAU,KACtD;AAAA,IACC;AAAA,EACF,EACC,UAAU,gDAAgD,EAAE;AAAA,EAC/D,QAAQ,UAAU,KACf,YAAY,uFAAuF,EACnG,UAAU,iCAAiC,EAAE;AAAA,EAChD,MAAM,UAAU,KAAK,YAAY,yCAAyC;AAAA,EAC1E,SAAS,UAAU,KAChB,YAAY,0FAA0F,EACtG,UAAU,wCAAwC;AAAA,EACrD,OAAO,UAAU,OAAO;AAAA,IACtB;AAAA,EACF;AACF;AAEO,MAAM,2BAA2B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -4,11 +4,17 @@ import { DSButtonV3 } from "@elliemae/ds-button-v2";
|
|
|
4
4
|
import { DSInputText } from "@elliemae/ds-form-input-text";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
6
|
import { Search } from "@elliemae/ds-icons";
|
|
7
|
+
import { getGlobalAttributes, getXstyledProps } from "@elliemae/ds-props-helpers";
|
|
7
8
|
import { css, mergeRefs, styled } from "@elliemae/ds-system";
|
|
8
9
|
import React2 from "react";
|
|
9
|
-
import {
|
|
10
|
-
|
|
10
|
+
import {
|
|
11
|
+
DSGlobalHeaderName,
|
|
12
|
+
GLOBAL_HEADER_DATA_TESTID,
|
|
13
|
+
GLOBAL_HEADER_SLOTS,
|
|
14
|
+
SEARCH_TOGGLE_DEFAULT_ARIA_LABEL
|
|
15
|
+
} from "../../../../constants/index.js";
|
|
11
16
|
import { SearchToggleSpinButton } from "./SearchToggleSpinButton.js";
|
|
17
|
+
import { defaultProps } from "./react-desc-prop-types.js";
|
|
12
18
|
import { useSearchToggle } from "./useSearchToggle.js";
|
|
13
19
|
const StyledNavSearchBoxContainer = styled("div", {
|
|
14
20
|
name: DSGlobalHeaderName,
|
|
@@ -93,10 +99,17 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
93
99
|
const {
|
|
94
100
|
componentProps,
|
|
95
101
|
label,
|
|
102
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
96
103
|
// added in https://jira.elliemae.io/browse/PUI-17852
|
|
97
104
|
// keeping the default value as "Close search" for backward compatibility
|
|
98
105
|
// we expect authors to provide descriptive aria-labels that fit their specific context, we do so in our example stories.
|
|
99
|
-
|
|
106
|
+
// The default now comes from this part's own defaultProps rather than being repeated inline, so the
|
|
107
|
+
// documented contract and the runtime behaviour cannot drift apart.
|
|
108
|
+
ariaLabelExpanded = defaultProps.ariaLabelExpanded,
|
|
109
|
+
// Everything else the toolbar drilled down, which is where item-level global attributes arrive.
|
|
110
|
+
// `setRef` and `instanceUID` ride along in here too and are filtered out by getGlobalAttributes'
|
|
111
|
+
// own whitelist, so they never reach the DOM.
|
|
112
|
+
...restIncludingItemLevelGlobalAttributes
|
|
100
113
|
} = outOfTheBoxDrilledDownProps;
|
|
101
114
|
const {
|
|
102
115
|
isOpenUncontrolled,
|
|
@@ -104,12 +117,10 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
104
117
|
handleToggleSearch,
|
|
105
118
|
handleContainerKeyDown,
|
|
106
119
|
handleChange,
|
|
107
|
-
handleInputKeyDown,
|
|
108
120
|
handleTriggerRefs,
|
|
109
121
|
inputId,
|
|
110
122
|
panelId
|
|
111
123
|
} = useSearchToggle(outOfTheBoxDrilledDownProps);
|
|
112
|
-
const { props: propsWithDefault } = React2.useContext(DSGlobalHeaderContext);
|
|
113
124
|
const {
|
|
114
125
|
onNext,
|
|
115
126
|
onPrevious,
|
|
@@ -122,14 +133,19 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
122
133
|
isOpen: userIsOpen,
|
|
123
134
|
searchContainerRef
|
|
124
135
|
} = componentProps;
|
|
125
|
-
const
|
|
126
|
-
const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
|
|
136
|
+
const noSlotArguments = React2.useCallback(() => ({}), []);
|
|
127
137
|
const isOpen = userIsOpen ?? isOpenUncontrolled;
|
|
138
|
+
const itemLevelGlobalAttributes = getGlobalAttributes(
|
|
139
|
+
restIncludingItemLevelGlobalAttributes
|
|
140
|
+
);
|
|
128
141
|
return /* @__PURE__ */ jsxs(
|
|
129
142
|
StyledNavSearchBoxContainer,
|
|
130
143
|
{
|
|
131
|
-
|
|
132
|
-
|
|
144
|
+
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_SEARCH_TOGGLE_CONTAINER,
|
|
145
|
+
...itemLevelGlobalAttributes,
|
|
146
|
+
...getXstyledProps(restIncludingItemLevelGlobalAttributes),
|
|
147
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
148
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
133
149
|
onKeyDown: handleContainerKeyDown,
|
|
134
150
|
innerRef: mergeRefs(searchContainerRef, containerRef),
|
|
135
151
|
isOpen,
|
|
@@ -137,8 +153,8 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
137
153
|
/* @__PURE__ */ jsx(
|
|
138
154
|
StyledToggleBtn,
|
|
139
155
|
{
|
|
140
|
-
getOwnerProps,
|
|
141
|
-
getOwnerPropsArguments,
|
|
156
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
157
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
142
158
|
buttonType: "icon",
|
|
143
159
|
innerRef: handleTriggerRefs,
|
|
144
160
|
"aria-label": isOpen ? ariaLabelExpanded : label,
|
|
@@ -153,8 +169,8 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
153
169
|
isOpen ? /* @__PURE__ */ jsxs(
|
|
154
170
|
StyledSearchNavContainer,
|
|
155
171
|
{
|
|
156
|
-
getOwnerProps,
|
|
157
|
-
getOwnerPropsArguments,
|
|
172
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
173
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
158
174
|
id: panelId,
|
|
159
175
|
alignItems: "center",
|
|
160
176
|
cols: ["1fr", "1fr"],
|
|
@@ -162,15 +178,15 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
162
178
|
/* @__PURE__ */ jsx(
|
|
163
179
|
StyledSearchInput,
|
|
164
180
|
{
|
|
165
|
-
getOwnerProps,
|
|
166
|
-
getOwnerPropsArguments,
|
|
181
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
182
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
167
183
|
id: inputId,
|
|
184
|
+
"aria-label": SEARCH_TOGGLE_DEFAULT_ARIA_LABEL,
|
|
168
185
|
placeholder: placeholder || "Search...",
|
|
169
186
|
value,
|
|
170
187
|
clearable: true,
|
|
171
188
|
...onBlur && { onBlur },
|
|
172
189
|
onChange: handleChange,
|
|
173
|
-
onKeyDown: handleInputKeyDown,
|
|
174
190
|
onClear
|
|
175
191
|
}
|
|
176
192
|
),
|
|
@@ -180,7 +196,8 @@ const SearchToggle = (outOfTheBoxDrilledDownProps) => {
|
|
|
180
196
|
onNext,
|
|
181
197
|
onPrevious,
|
|
182
198
|
currentResultIndex,
|
|
183
|
-
totalResults
|
|
199
|
+
totalResults,
|
|
200
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader
|
|
184
201
|
}
|
|
185
202
|
)
|
|
186
203
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Search } from '@elliemae/ds-icons';\nimport { css, mergeRefs, styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Search } from '@elliemae/ds-icons';\nimport { getGlobalAttributes, getXstyledProps } from '@elliemae/ds-props-helpers';\nimport { css, mergeRefs, styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport {\n DSGlobalHeaderName,\n GLOBAL_HEADER_DATA_TESTID,\n GLOBAL_HEADER_SLOTS,\n SEARCH_TOGGLE_DEFAULT_ARIA_LABEL,\n} from '../../../../constants/index.js';\nimport { SearchToggleSpinButton } from './SearchToggleSpinButton.js';\nimport { defaultProps, type SearchToggleT } from './react-desc-prop-types.js';\nimport { useSearchToggle } from './useSearchToggle.js';\n\nconst StyledNavSearchBoxContainer = styled('div', {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.MENUBAR_SEARCH_TOGGLE_CONTAINER,\n})<{ isOpen: boolean }>`\n background: ${({ theme, isOpen }) => (isOpen ? theme.colors.neutral['000'] : 'transparent')};\n position: relative;\n display: flex;\n align-items: center;\n width: ${({ isOpen }) => (isOpen ? '260px' : 'auto')};\n & .em-ds-button {\n margin-right: 2px;\n height: 24px;\n width: 24px;\n }\n`;\n\nconst StyledSearchNavContainer = styled(Grid, {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_EXPANDED_CONTENT_WRAPPER,\n})`\n background: ${({ theme }) => theme.colors.neutral['000']};\n position: relative;\n padding: 2px;\n`;\n\nconst StyledSearchInput = styled(DSInputText, {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_TEXTINPUT,\n})``;\n\nconst ExpandedToggleBtnStyles = css`\n margin-left: 2px;\n`;\nconst CollapsedToggleBtnStyles = css`\n height: 3.077rem;\n width: 3.077rem;\n border: none;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n\n // we want to avoid the pseudo-border in the nested buttons\n & button:focus .pseudo-border {\n outline: none;\n border: none;\n }\n && span.pseudo-border {\n display: none;\n }\n\n // our \"ad-hoc\" styling of the DSButtonV3 that re-implement changed colors/focus-borders\n & .em-ds-icon svg {\n fill: ${({ theme }) => theme.colors.neutral['000']};\n }\n\n &&:hover {\n background-color: ${({ theme }) => theme.colors.brand[700]};\n }\n\n &&:focus-visible {\n background-color: transparent;\n }\n\n &&:focus-visible::before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: 2px;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n pointer-events: none;\n }\n`;\n\nconst StyledToggleBtn = styled(DSButtonV3, {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_TRIGGER_BUTTON,\n})<{ isOpen: boolean }>`\n ${({ isOpen }) => (!isOpen ? CollapsedToggleBtnStyles : ExpandedToggleBtnStyles)}\n`;\n\nexport const SearchToggle = (outOfTheBoxDrilledDownProps: SearchToggleT.Props): JSX.Element => {\n const {\n componentProps,\n label,\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n // added in https://jira.elliemae.io/browse/PUI-17852\n // keeping the default value as \"Close search\" for backward compatibility\n // we expect authors to provide descriptive aria-labels that fit their specific context, we do so in our example stories.\n // The default now comes from this part's own defaultProps rather than being repeated inline, so the\n // documented contract and the runtime behaviour cannot drift apart.\n ariaLabelExpanded = defaultProps.ariaLabelExpanded,\n // Everything else the toolbar drilled down, which is where item-level global attributes arrive.\n // `setRef` and `instanceUID` ride along in here too and are filtered out by getGlobalAttributes'\n // own whitelist, so they never reach the DOM.\n ...restIncludingItemLevelGlobalAttributes\n } = outOfTheBoxDrilledDownProps;\n\n const {\n isOpenUncontrolled,\n containerRef,\n handleToggleSearch,\n handleContainerKeyDown,\n handleChange,\n handleTriggerRefs,\n inputId,\n panelId,\n } = useSearchToggle(outOfTheBoxDrilledDownProps);\n\n const {\n onNext,\n onPrevious,\n currentResultIndex,\n totalResults,\n placeholder,\n value,\n onBlur,\n onClear,\n isOpen: userIsOpen,\n searchContainerRef,\n } = componentProps;\n\n /*\n * Explicit and empty hydrator, shared by this part's slot render sites: `getOwnerPropsArguments` feeds\n * function-form slot props and nothing else, and none of the elements below carry render-time values\n * worth passing. Stated so \"what arguments does this slot get?\" is always answerable at the call site.\n */\n const noSlotArguments = React.useCallback(() => ({}), []);\n const isOpen = userIsOpen ?? isOpenUncontrolled;\n /*\n * Item-level global attributes, forwarded onto this part's ROOT container \u2014 NOT onto its trigger button,\n * which is where the sibling item types put theirs. Two reasons, and both matter if you move it:\n *\n * - The trigger is a DSButtonV3, whose own prop vocabulary collides with the HTML global set: `shape`\n * is `ButtonShapesT` there and the `<area>` attribute in GlobalAttributesT, and `onClick` takes a\n * wider event union. Spreading the whole set onto it does not type-check, and narrowing it would\n * forward less than the siblings do.\n * - The container is what this item type renders AS; the button is a child of it. Attributes describing\n * the toolbar item belong on the item's root.\n *\n * Consequence for selector authors: `data-public` lands on the element wrapping the whole search area,\n * not on the icon button.\n */\n const itemLevelGlobalAttributes = getGlobalAttributes<typeof restIncludingItemLevelGlobalAttributes, HTMLDivElement>(\n restIncludingItemLevelGlobalAttributes,\n );\n\n return (\n <StyledNavSearchBoxContainer\n // Legacy data-testid \u2014 breaking change if removed/changed (see project_compatibility.md)\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_SEARCH_TOGGLE_CONTAINER}\n // Spread FIRST, so the props below win on the keys they own \u2014 the opposite order from PopupMenu and\n // AppPicker, which spread theirs last. Here the internal keys are live state rather than defaults:\n // `onKeyDown` carries Escape-collapses and `innerRef` carries the consumer's own searchContainerRef.\n // An item-level attribute overwriting either is a regression, not an override. Everything a consumer\n // legitimately sets at this level \u2014 data attributes, id, title \u2014 is unaffected, since nothing below\n // claims those keys.\n {...itemLevelGlobalAttributes}\n // The part-level xstyled layer, which the contract advertises \u2014 this is the element that serves it.\n {...getXstyledProps(restIncludingItemLevelGlobalAttributes)}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n onKeyDown={handleContainerKeyDown}\n innerRef={mergeRefs(searchContainerRef, containerRef)}\n isOpen={isOpen}\n >\n <StyledToggleBtn\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n buttonType=\"icon\"\n innerRef={handleTriggerRefs}\n aria-label={isOpen ? ariaLabelExpanded : label}\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={handleToggleSearch}\n isOpen={isOpen}\n data-testid={GLOBAL_HEADER_DATA_TESTID.SEARCH_TOGGLE_TRIGGER_BUTTON}\n >\n <Search color={isOpen ? ['brand-primary', '800'] : ['neutral', '0']} />\n </StyledToggleBtn>\n\n {isOpen ? (\n <StyledSearchNavContainer\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n id={panelId}\n alignItems=\"center\"\n cols={['1fr', '1fr']}\n >\n <StyledSearchInput\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n id={inputId}\n // PUI-17973 \u2014 default accessible name guiding users to the result navigation; a\n // consumer-supplied aria-label (via the textinput slot) overrides this.\n aria-label={SEARCH_TOGGLE_DEFAULT_ARIA_LABEL}\n placeholder={placeholder || 'Search...'}\n value={value}\n clearable\n // passing onBlur as {undefined} breaks the input text focus ring management\n // if onBlur is not provided, we don't pass the prop at all\n // this is not expected as confirmed in conversation with Gerardo\n // we are not going to implement the fix right now to avoid potential breaking changes,\n // but we will keep an eye on this behavior and consider a fix in the future if needed.\n {...(onBlur && { onBlur })}\n onChange={handleChange}\n onClear={onClear}\n />\n <SearchToggleSpinButton\n onNext={onNext}\n onPrevious={onPrevious}\n currentResultIndex={currentResultIndex}\n totalResults={totalResults}\n getOwnerPropsAwareOfPropsPassedToGlobalHeader={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n />\n </StyledSearchNavContainer>\n ) : null}\n </StyledNavSearchBoxContainer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsMf,cAIA,YAJA;AAtMR,SAAS,kBAA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e;AAAA,YACf,SAAS;AAAA,YACT;AAAA,YACA,eAAa,0BAA0B;AAAA,YAEvC,8BAAC,UAAO,OAAO,SAAS,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,GAAG,GAAG;AAAA;AAAA,QACvE;AAAA,QAEC,SACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAe;AAAA,YACf,wBAAwB;AAAA,YACxB,IAAI;AAAA,YACJ,YAAW;AAAA,YACX,MAAM,CAAC,OAAO,KAAK;AAAA,YAEnB;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAe;AAAA,kBACf,wBAAwB;AAAA,kBACxB,IAAI;AAAA,kBAGJ,cAAY;AAAA,kBACZ,aAAa,eAAe;AAAA,kBAC5B;AAAA,kBACA,WAAS;AAAA,kBAMR,GAAI,UAAU,EAAE,OAAO;AAAA,kBACxB,UAAU;AAAA,kBACV;AAAA;AAAA,cACF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA;AAAA,cACF;AAAA;AAAA;AAAA,QACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -4,7 +4,6 @@ import { DSButtonV3 } from "@elliemae/ds-button-v2";
|
|
|
4
4
|
import { ChevronDown, ChevronUp } from "@elliemae/ds-icons";
|
|
5
5
|
import { styled } from "@elliemae/ds-system";
|
|
6
6
|
import React2 from "react";
|
|
7
|
-
import { DSGlobalHeaderContext } from "../../../../DSGlobalHeaderContext.js";
|
|
8
7
|
import { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from "../../../../constants/index.js";
|
|
9
8
|
const StyledToolbarRightAddonsWrapper = styled("div", {
|
|
10
9
|
name: DSGlobalHeaderName,
|
|
@@ -36,7 +35,7 @@ const StyledResultTracker = styled("div", {
|
|
|
36
35
|
slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_TEXT
|
|
37
36
|
})`
|
|
38
37
|
padding: 0 8px;
|
|
39
|
-
color:
|
|
38
|
+
color: ${({ theme }) => theme.colors.neutral["500"]};
|
|
40
39
|
white-space: nowrap;
|
|
41
40
|
word-spacing: 2px;
|
|
42
41
|
outline: none;
|
|
@@ -48,17 +47,16 @@ const StyledVerticalSeparator = styled("div", {
|
|
|
48
47
|
height: 20px;
|
|
49
48
|
border-right: 1px solid #a2a9b6;
|
|
50
49
|
`;
|
|
51
|
-
const
|
|
50
|
+
const StyledSpinbuttonPrevSlotBtn = styled(DSButtonV3, {
|
|
52
51
|
name: DSGlobalHeaderName,
|
|
53
52
|
slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_PREV
|
|
54
53
|
})``;
|
|
55
|
-
const
|
|
54
|
+
const StyledSpinbuttonNextSlotBtn = styled(DSButtonV3, {
|
|
56
55
|
name: DSGlobalHeaderName,
|
|
57
56
|
slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_NEXT
|
|
58
57
|
})``;
|
|
59
58
|
const SearchToggleSpinButton = React2.memo((props) => {
|
|
60
|
-
const { onNext, onPrevious, currentResultIndex, totalResults } = props;
|
|
61
|
-
const { props: propsWithDefault } = React2.useContext(DSGlobalHeaderContext);
|
|
59
|
+
const { onNext, onPrevious, currentResultIndex, totalResults, getOwnerPropsAwareOfPropsPassedToGlobalHeader } = props;
|
|
62
60
|
const shouldShowNoResearchOngoing = currentResultIndex === -1 && !totalResults;
|
|
63
61
|
const canShowFullResults = !shouldShowNoResearchOngoing && currentResultIndex !== -1;
|
|
64
62
|
const shouldFallbackToTotalResultsOnly = !shouldShowNoResearchOngoing && !canShowFullResults;
|
|
@@ -84,50 +82,63 @@ const SearchToggleSpinButton = React2.memo((props) => {
|
|
|
84
82
|
},
|
|
85
83
|
[onNext, onPrevious]
|
|
86
84
|
);
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
85
|
+
const noSlotArguments = React2.useCallback(() => ({}), []);
|
|
86
|
+
return /* @__PURE__ */ jsxs(
|
|
87
|
+
StyledToolbarRightAddonsWrapper,
|
|
88
|
+
{
|
|
89
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
90
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
StyledResultTracker,
|
|
94
|
+
{
|
|
95
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
96
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
97
|
+
role: "spinbutton",
|
|
98
|
+
"aria-label": "Search results",
|
|
99
|
+
"aria-valuenow": currentResultIndex + 1,
|
|
100
|
+
"aria-valuemin": 1,
|
|
101
|
+
"aria-valuemax": totalResults,
|
|
102
|
+
"aria-valuetext": ariaResultsText,
|
|
103
|
+
tabIndex: 0,
|
|
104
|
+
onKeyDown: handleKeyDown,
|
|
105
|
+
children: resultText
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
StyledVerticalSeparator,
|
|
110
|
+
{
|
|
111
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
112
|
+
getOwnerPropsArguments: noSlotArguments
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
StyledSpinbuttonNextSlotBtn,
|
|
117
|
+
{
|
|
118
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
119
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
120
|
+
buttonType: "icon",
|
|
121
|
+
onClick: onNext,
|
|
122
|
+
"aria-label": "Next search result",
|
|
123
|
+
tabIndex: -1,
|
|
124
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { color: ["brand-primary", "800"] })
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ jsx(
|
|
128
|
+
StyledSpinbuttonPrevSlotBtn,
|
|
129
|
+
{
|
|
130
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
131
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
132
|
+
buttonType: "icon",
|
|
133
|
+
onClick: onPrevious,
|
|
134
|
+
"aria-label": "Previous search result",
|
|
135
|
+
tabIndex: -1,
|
|
136
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { color: ["brand-primary", "800"] })
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
);
|
|
131
142
|
});
|
|
132
143
|
SearchToggleSpinButton.displayName = "SearchToggleSpinButton";
|
|
133
144
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { ChevronDown, ChevronUp } from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { ChevronDown, ChevronUp } from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from '../../../../constants/index.js';\nimport type { SearchToggleT } from './react-desc-prop-types.js';\n\nconst StyledToolbarRightAddonsWrapper = styled('div', {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_WRAPPER,\n})`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n position: relative; // to position the focus-within outline\n :focus-within {\n ::after {\n content: '';\n position: absolute;\n width: calc(100% - 2px);\n height: 100%;\n border: brand-700 2px solid;\n margin: -1px;\n pointer-events: none;\n }\n }\n // we want to avoid the pseudo-border in the nested buttons\n & button:focus .pseudo-border {\n outline: none;\n border: none;\n }\n`;\nconst StyledResultTracker = styled('div', {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_TEXT,\n})`\n padding: 0 8px;\n color: ${({ theme }) => theme.colors.neutral['500']};\n white-space: nowrap;\n word-spacing: 2px;\n outline: none;\n`;\nconst StyledVerticalSeparator = styled('div', {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_SEPARATOR,\n})`\n height: 20px;\n border-right: 1px solid #a2a9b6;\n`;\n// why? because when we add slots support, this should be a slot too, to customize aria-labels\nconst StyledSpinbuttonPrevSlotBtn = styled(DSButtonV3, {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_PREV,\n})``;\nconst StyledSpinbuttonNextSlotBtn = styled(DSButtonV3, {\n name: DSGlobalHeaderName,\n slot: GLOBAL_HEADER_SLOTS.SEARCH_TOGGLE_SPINBUTTON_NEXT,\n})``;\n\ninterface SearchToggleSpinButtonPropsT {\n onNext: () => void;\n onPrevious: () => void;\n currentResultIndex: number;\n totalResults: number;\n // Drilled through SearchToggle from DSGlobalHeader \u2014 the slot lookup table, never the hydrator.\n getOwnerPropsAwareOfPropsPassedToGlobalHeader: SearchToggleT.Props['getOwnerPropsAwareOfPropsPassedToGlobalHeader'];\n}\n\nexport const SearchToggleSpinButton = React.memo((props: SearchToggleSpinButtonPropsT) => {\n const { onNext, onPrevious, currentResultIndex, totalResults, getOwnerPropsAwareOfPropsPassedToGlobalHeader } = props;\n\n const shouldShowNoResearchOngoing = currentResultIndex === -1 && !totalResults;\n const canShowFullResults = !shouldShowNoResearchOngoing && currentResultIndex !== -1;\n const shouldFallbackToTotalResultsOnly = !shouldShowNoResearchOngoing && !canShowFullResults;\n let resultText = 'n/a';\n let ariaResultsText = 'no research ongoing';\n if (canShowFullResults) {\n resultText = `${currentResultIndex + 1} / ${totalResults}`;\n ariaResultsText = `result ${currentResultIndex + 1} of ${totalResults}`;\n }\n if (shouldFallbackToTotalResultsOnly) {\n resultText = `${totalResults}`;\n ariaResultsText = `${totalResults} total results`;\n }\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (event) => {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n onNext();\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n onPrevious();\n }\n },\n [onNext, onPrevious],\n );\n // Explicit and empty: none of the spinbutton elements have render-time values worth handing to a\n // function-form slot prop. Stated rather than omitted.\n const noSlotArguments = React.useCallback(() => ({}), []);\n\n return (\n <StyledToolbarRightAddonsWrapper\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <StyledResultTracker\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n role=\"spinbutton\"\n aria-label=\"Search results\"\n aria-valuenow={currentResultIndex + 1}\n aria-valuemin={1}\n aria-valuemax={totalResults}\n aria-valuetext={ariaResultsText}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n >\n {resultText}\n </StyledResultTracker>\n <StyledVerticalSeparator\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n />\n <StyledSpinbuttonNextSlotBtn\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n buttonType=\"icon\"\n onClick={onNext}\n aria-label=\"Next search result\"\n tabIndex={-1} // part of a spinbutton, so remove from tab order\n >\n <ChevronDown color={['brand-primary', '800']} />\n </StyledSpinbuttonNextSlotBtn>\n <StyledSpinbuttonPrevSlotBtn\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n buttonType=\"icon\"\n onClick={onPrevious}\n aria-label=\"Previous search result\"\n tabIndex={-1} // part of a spinbutton, so remove from tab order\n >\n <ChevronUp color={['brand-primary', '800']} />\n </StyledSpinbuttonPrevSlotBtn>\n </StyledToolbarRightAddonsWrapper>\n );\n});\n\nSearchToggleSpinButton.displayName = 'SearchToggleSpinButton';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsGnB,SAIE,KAJF;AAtGJ,SAAS,kBAAkB;AAC3B,SAAS,aAAa,iBAAiB;AACvC,SAAS,cAAc;AACvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,2BAA2B;AAGxD,MAAM,kCAAkC,OAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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