@elliemae/ds-app-picker 3.70.0-next.6 → 3.70.0-next.60

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.
Files changed (119) hide show
  1. package/dist/cjs/DSAppPicker.js +10 -141
  2. package/dist/cjs/DSAppPicker.js.map +3 -3
  3. package/dist/cjs/{utils.js → DSAppPickerCTX.js} +8 -25
  4. package/dist/cjs/DSAppPickerCTX.js.map +7 -0
  5. package/dist/cjs/config/useAppPicker.js +25 -8
  6. package/dist/cjs/config/useAppPicker.js.map +3 -3
  7. package/dist/cjs/config/useFocusTracker.js +104 -0
  8. package/dist/cjs/config/useFocusTracker.js.map +7 -0
  9. package/dist/cjs/config/useValidateProps.js +45 -0
  10. package/dist/cjs/config/useValidateProps.js.map +7 -0
  11. package/dist/cjs/constants/index.js +11 -1
  12. package/dist/cjs/constants/index.js.map +2 -2
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/package.json +1 -4
  15. package/dist/cjs/parts/AppPanel.js +152 -0
  16. package/dist/cjs/parts/AppPanel.js.map +7 -0
  17. package/dist/cjs/parts/AppPickerFloatingContext/AppPickerContent.js +94 -0
  18. package/dist/cjs/parts/AppPickerFloatingContext/AppPickerContent.js.map +7 -0
  19. package/dist/cjs/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js +171 -0
  20. package/dist/cjs/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js.map +7 -0
  21. package/dist/cjs/parts/AppPickerItem.js +104 -0
  22. package/dist/cjs/parts/AppPickerItem.js.map +7 -0
  23. package/dist/cjs/parts/AppSection.js +94 -0
  24. package/dist/cjs/parts/AppSection.js.map +7 -0
  25. package/dist/cjs/parts/Trigger.js +81 -0
  26. package/dist/cjs/parts/Trigger.js.map +7 -0
  27. package/dist/cjs/parts/shared-styles.js +44 -0
  28. package/dist/cjs/parts/shared-styles.js.map +7 -0
  29. package/dist/cjs/react-desc-prop-types.js +23 -7
  30. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  31. package/dist/cjs/typescript-testing/slot-props.js +48 -0
  32. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  33. package/dist/cjs/typescript-testing/typescript-app-picker-valid.js +13 -1
  34. package/dist/cjs/typescript-testing/typescript-app-picker-valid.js.map +2 -2
  35. package/dist/cjs/util/getChipId.js +36 -0
  36. package/dist/cjs/util/getChipId.js.map +7 -0
  37. package/dist/cjs/util/getChipRegionId.js +37 -0
  38. package/dist/cjs/util/getChipRegionId.js.map +7 -0
  39. package/dist/esm/DSAppPicker.js +10 -141
  40. package/dist/esm/DSAppPicker.js.map +3 -3
  41. package/dist/esm/DSAppPickerCTX.js +8 -0
  42. package/dist/esm/DSAppPickerCTX.js.map +7 -0
  43. package/dist/esm/config/useAppPicker.js +29 -13
  44. package/dist/esm/config/useAppPicker.js.map +3 -3
  45. package/dist/esm/config/useFocusTracker.js +74 -0
  46. package/dist/esm/config/useFocusTracker.js.map +7 -0
  47. package/dist/esm/config/useValidateProps.js +15 -0
  48. package/dist/esm/config/useValidateProps.js.map +7 -0
  49. package/dist/esm/constants/index.js +11 -1
  50. package/dist/esm/constants/index.js.map +2 -2
  51. package/dist/esm/index.js.map +1 -1
  52. package/dist/esm/package.json +1 -4
  53. package/dist/esm/parts/AppPanel.js +127 -0
  54. package/dist/esm/parts/AppPanel.js.map +7 -0
  55. package/dist/esm/parts/AppPickerFloatingContext/AppPickerContent.js +64 -0
  56. package/dist/esm/parts/AppPickerFloatingContext/AppPickerContent.js.map +7 -0
  57. package/dist/esm/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js +141 -0
  58. package/dist/esm/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js.map +7 -0
  59. package/dist/esm/parts/AppPickerItem.js +74 -0
  60. package/dist/esm/parts/AppPickerItem.js.map +7 -0
  61. package/dist/esm/parts/AppSection.js +64 -0
  62. package/dist/esm/parts/AppSection.js.map +7 -0
  63. package/dist/esm/parts/Trigger.js +51 -0
  64. package/dist/esm/parts/Trigger.js.map +7 -0
  65. package/dist/esm/parts/shared-styles.js +14 -0
  66. package/dist/esm/parts/shared-styles.js.map +7 -0
  67. package/dist/esm/react-desc-prop-types.js +29 -8
  68. package/dist/esm/react-desc-prop-types.js.map +2 -2
  69. package/dist/esm/typescript-testing/slot-props.js +25 -0
  70. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  71. package/dist/esm/typescript-testing/typescript-app-picker-valid.js +13 -1
  72. package/dist/esm/typescript-testing/typescript-app-picker-valid.js.map +2 -2
  73. package/dist/esm/util/getChipId.js +6 -0
  74. package/dist/esm/util/getChipId.js.map +7 -0
  75. package/dist/esm/util/getChipRegionId.js +7 -0
  76. package/dist/esm/util/getChipRegionId.js.map +7 -0
  77. package/dist/types/DSAppPicker.d.ts +1 -2
  78. package/dist/types/DSAppPickerCTX.d.ts +6 -0
  79. package/dist/types/config/useAppPicker.d.ts +111 -92
  80. package/dist/types/config/useFocusTracker.d.ts +19 -0
  81. package/dist/types/config/useValidateProps.d.ts +3 -0
  82. package/dist/types/constants/index.d.ts +17 -7
  83. package/dist/types/parts/AppPanel.d.ts +2 -0
  84. package/dist/types/parts/AppPickerFloatingContext/AppPickerContent.d.ts +3 -0
  85. package/dist/types/parts/AppPickerFloatingContext/useAppPickerFloatingContext.d.ts +170 -0
  86. package/dist/types/parts/AppPickerItem.d.ts +11 -0
  87. package/dist/types/parts/AppSection.d.ts +6 -0
  88. package/dist/types/parts/Trigger.d.ts +13 -0
  89. package/dist/types/parts/shared-styles.d.ts +2 -0
  90. package/dist/types/react-desc-prop-types.d.ts +80 -9
  91. package/dist/types/util/getChipId.d.ts +2 -0
  92. package/dist/types/util/getChipRegionId.d.ts +1 -0
  93. package/package.json +19 -17
  94. package/dist/cjs/AppPickerImpl.js +0 -204
  95. package/dist/cjs/AppPickerImpl.js.map +0 -7
  96. package/dist/cjs/hooks/useKeepTrackButtons.js +0 -69
  97. package/dist/cjs/hooks/useKeepTrackButtons.js.map +0 -7
  98. package/dist/cjs/styles.js +0 -76
  99. package/dist/cjs/styles.js.map +0 -7
  100. package/dist/cjs/utils.js.map +0 -7
  101. package/dist/esm/AppPickerImpl.js +0 -174
  102. package/dist/esm/AppPickerImpl.js.map +0 -7
  103. package/dist/esm/hooks/useKeepTrackButtons.js +0 -39
  104. package/dist/esm/hooks/useKeepTrackButtons.js.map +0 -7
  105. package/dist/esm/styles.js +0 -46
  106. package/dist/esm/styles.js.map +0 -7
  107. package/dist/esm/utils.js +0 -25
  108. package/dist/esm/utils.js.map +0 -7
  109. package/dist/types/AppPickerImpl.d.ts +0 -11
  110. package/dist/types/hooks/useKeepTrackButtons.d.ts +0 -13
  111. package/dist/types/styles.d.ts +0 -7
  112. package/dist/types/tests/app-picker.a11y.test.d.ts +0 -1
  113. package/dist/types/tests/app-picker.data-testid.test.d.ts +0 -1
  114. package/dist/types/tests/app-picker.events.test.d.ts +0 -1
  115. package/dist/types/tests/app-picker.exports.test.d.ts +0 -1
  116. package/dist/types/tests/app-picker.get-owner-props.test.d.ts +0 -1
  117. package/dist/types/tests/app-picker.keyboard.test.d.ts +0 -1
  118. package/dist/types/typescript-testing/typescript-app-picker-valid.d.ts +0 -1
  119. package/dist/types/utils.d.ts +0 -14
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/AppPanel.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { useFocusTrap } from '@elliemae/ds-hooks-focus-trap';\nimport { styled } from '@elliemae/ds-system';\nimport React, { memo, useCallback, useContext, useEffect } from 'react';\nimport {\n APP_PICKER_REGION_FOCUSES,\n DSAppPickerDataTestIds,\n DSAppPickerName,\n DSAppPickerSlots,\n} from '../constants/index.js';\nimport { DSAppPickerContext } from '../DSAppPickerCTX.js';\nimport { AppSection } from './AppSection.js';\nimport { StyledListItemFullRow } from './shared-styles.js';\n\nconst StyledWrapper = styled(Grid, { name: DSAppPickerName, slot: DSAppPickerSlots.ROOT })`\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n min-width: 308px;\n min-height: 110px;\n max-height: 449px;\n width: 308px;\n overflow-y: auto;\n overflow-x: hidden;\n /* Baseline 2024: reserve scrollbar gutter so the layout doesn't shift between overflow/no-overflow.\n Replaces a JS isOverflow detection effect that toggled right padding. */\n scrollbar-gutter: stable;\n margin: 0;\n padding: 0 0 8px 16px;\n &:focus {\n outline: none;\n }\n`;\n\nconst StyledSeparator = styled('hr', { name: DSAppPickerName, slot: DSAppPickerSlots.SEPARATOR })`\n border-top: 1px solid ${({ theme }) => theme.colors.neutral[300]};\n border-bottom: none;\n width: 100%;\n margin: 8px 0 0 0;\n`;\n\nconst wrapperGridLayout = {\n cols: ['repeat(3, 92px)'],\n // Row tracks are intentionally auto-sized:\n // - title row picks up its own typography height\n // - chip rows expand when `wrapText` causes a chip to wrap onto a second line (Reflow story)\n // - separator row picks up its own 1px height + margin\n rows: ['auto'],\n};\n\nconst useExecOnceAfterFirstRender = (callback: () => void) => {\n const hasExecutedRef = React.useRef(false);\n const executeInitialFocusRef = React.useRef(callback);\n executeInitialFocusRef.current = callback;\n useEffect(() => {\n if (!hasExecutedRef.current) {\n executeInitialFocusRef.current();\n hasExecutedRef.current = true;\n }\n }, []);\n};\n\ntype MountedOpenAutofocusNuanceConfig = {\n pendingRef: React.MutableRefObject<boolean>;\n triggerIsInternal: boolean;\n trackFocusPanel: () => void;\n trackFocusFirstItem: () => void;\n};\n\n/**\n * NUANCE \u2014 the single case that initial-focus-on-open (useAppPickerFloatingContext's onOpen) cannot\n * cover: DSAppPicker rendered ALREADY open (declarative `isOpen` at mount, no user interaction).\n * That open is not a transition, so `onOpen` never fires for it. This mount-time hook seeds the same\n * initial focus a user-driven open would (panel wrapper for the internal trigger, first item for an\n * external renderTrigger). `pendingRef` is true only when the component started open and is flipped\n * false on first consume, so a later controlled reopen \u2014 a real transition handled by `onOpen` \u2014\n * does not double-seed. Every user-driven open (click/keyboard) is a transition handled by `onOpen`,\n * NOT here.\n *\n * REMOVABILITY: if the team decides declarative-open should not autofocus, delete this hook and its\n * call, and flip the \"rendered already-open \u2026 focuses the panel wrapper\" assertion in\n * DSAppPicker.keyboard.test.js. Nothing else depends on it.\n */\nconst useMountedOpenAutofocusNuance = ({\n pendingRef,\n triggerIsInternal,\n trackFocusPanel,\n trackFocusFirstItem,\n}: MountedOpenAutofocusNuanceConfig) => {\n useExecOnceAfterFirstRender(() => {\n if (!pendingRef.current) return;\n pendingRef.current = false;\n if (triggerIsInternal) trackFocusPanel();\n else trackFocusFirstItem();\n });\n};\n\nconst AppPanelBase = () => {\n const {\n propsWithDefault: { customApps, renderTrigger, onKeyDown },\n ownerPropsConfig,\n globalAttributes,\n xstyledProps,\n mountedOpenAutofocusPendingRef,\n focusTrackers: { focusRegion, firstFocusableRef, lastFocusableRef, trackFocusPanel, trackFocusFirstItem },\n } = useContext(DSAppPickerContext);\n const triggerIsInternal = !renderTrigger;\n\n // Global attributes are spread onto the panel root because there is no shared wrapper that\n // contains both the floating panel and the trigger. `wrap`, `onClick`, and `onKeyDown` are\n // filtered out because they collide with the public component API (which uses these for\n // different semantics).\n const { wrap, onClick, onKeyDown: onKeyDownGlobal, ...safeGlobalAttributes } = globalAttributes;\n\n // ---------------------------------------------------------------------------\n // Initial focus on panel open.\n // ---------------------------------------------------------------------------\n // User-driven opens (click/keyboard) are open transitions, seeded by\n // useAppPickerFloatingContext's onOpen. The one case that isn't a transition \u2014 being rendered\n // already-open (declarative `isOpen` at mount) \u2014 is covered here, scoped to exactly that.\n useMountedOpenAutofocusNuance({\n pendingRef: mountedOpenAutofocusPendingRef,\n triggerIsInternal,\n trackFocusPanel,\n trackFocusFirstItem,\n });\n\n // ---------------------------------------------------------------------------\n // Panel wrapper \u2014 tracker-driven focus for the mouse-open announcement path.\n // handleWrapperRef gets a new reference when isWrapperFocused changes \u2192 React\n // re-invokes the callback with the DOM node \u2192 node.focus() fires.\n // ---------------------------------------------------------------------------\n const isWrapperFocused = focusRegion === APP_PICKER_REGION_FOCUSES.PANEL;\n\n const handleWrapperRef = useCallback(\n (node: HTMLElement | null) => {\n if (node && isWrapperFocused) node.focus();\n },\n [isWrapperFocused],\n );\n\n // Default Escape-close/refocus is handled declaratively by useFloatingContext\n // (see useAppPickerFloatingContext's closeOnEscape/onEscape wiring) whenever there is no consumer\n // onKeyDown \u2014 a consumer-provided onKeyDown takes over keydown handling entirely.\n const handleOnKeyDown = useFocusTrap({\n firstElementRef: firstFocusableRef,\n lastElementRef: lastFocusableRef,\n onKeyDown,\n });\n\n // The panel root carries NO aria-label: it is a roleless element (generic role does not support\n // an accessible name, so any label here is dropped by assistive tech). The component's accessible\n // name lives on the dialog \u2014 see AppPickerContent's role=\"dialog\" + aria-labelledby.\n return (\n <StyledWrapper\n innerRef={handleWrapperRef}\n data-testid={DSAppPickerDataTestIds.ROOT}\n cols={wrapperGridLayout.cols}\n rows={wrapperGridLayout.rows}\n // when opening the dialog via mouse, the focus is programmatically assigned here via handleWrapperRef, -1 allows .focus() to work\n tabIndex={-1}\n {...ownerPropsConfig}\n {...safeGlobalAttributes}\n {...xstyledProps}\n onKeyDown={handleOnKeyDown}\n >\n <AppSection />\n {customApps.length > 0 && (\n <>\n <StyledListItemFullRow data-testid={DSAppPickerDataTestIds.ROW} {...ownerPropsConfig}>\n <StyledSeparator data-testid={DSAppPickerDataTestIds.SEPARATOR} {...ownerPropsConfig} />\n </StyledListItemFullRow>\n <AppSection isCustomApps />\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport const AppPanel = memo(AppPanelBase);\nAppPanel.displayName = 'DSAppPicker.AppPanel';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoKjB,SAEE,UAFF,KAEE,YAFF;AApKN,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB,OAAOA,UAAS,MAAM,aAAa,YAAY,iBAAiB;AAChE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,SAAS,kBAAkB;AAC3B,SAAS,6BAA6B;AAEtC,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,KAAK,CAAC;AAAA,sBACnE,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBhE,MAAM,kBAAkB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,UAAU,CAAC;AAAA,0BACtE,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAMlE,MAAM,oBAAoB;AAAA,EACxB,MAAM,CAAC,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKxB,MAAM,CAAC,MAAM;AACf;AAEA,MAAM,8BAA8B,CAAC,aAAyB;AAC5D,QAAM,iBAAiBA,OAAM,OAAO,KAAK;AACzC,QAAM,yBAAyBA,OAAM,OAAO,QAAQ;AACpD,yBAAuB,UAAU;AACjC,YAAU,MAAM;AACd,QAAI,CAAC,eAAe,SAAS;AAC3B,6BAAuB,QAAQ;AAC/B,qBAAe,UAAU;AAAA,IAC3B;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAuBA,MAAM,gCAAgC,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAwC;AACtC,8BAA4B,MAAM;AAChC,QAAI,CAAC,WAAW,QAAS;AACzB,eAAW,UAAU;AACrB,QAAI,kBAAmB,iBAAgB;AAAA,QAClC,qBAAoB;AAAA,EAC3B,CAAC;AACH;AAEA,MAAM,eAAe,MAAM;AACzB,QAAM;AAAA,IACJ,kBAAkB,EAAE,YAAY,eAAe,UAAU;AAAA,IACzD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,EAAE,aAAa,mBAAmB,kBAAkB,iBAAiB,oBAAoB;AAAA,EAC1G,IAAI,WAAW,kBAAkB;AACjC,QAAM,oBAAoB,CAAC;AAM3B,QAAM,EAAE,MAAM,SAAS,WAAW,iBAAiB,GAAG,qBAAqB,IAAI;AAQ/E,gCAA8B;AAAA,IAC5B,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAOD,QAAM,mBAAmB,gBAAgB,0BAA0B;AAEnE,QAAM,mBAAmB;AAAA,IACvB,CAAC,SAA6B;AAC5B,UAAI,QAAQ,iBAAkB,MAAK,MAAM;AAAA,IAC3C;AAAA,IACA,CAAC,gBAAgB;AAAA,EACnB;AAKA,QAAM,kBAAkB,aAAa;AAAA,IACnC,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB;AAAA,EACF,CAAC;AAKD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,eAAa,uBAAuB;AAAA,MACpC,MAAM,kBAAkB;AAAA,MACxB,MAAM,kBAAkB;AAAA,MAExB,UAAU;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,WAAW;AAAA,MAEX;AAAA,4BAAC,cAAW;AAAA,QACX,WAAW,SAAS,KACnB,iCACE;AAAA,8BAAC,yBAAsB,eAAa,uBAAuB,KAAM,GAAG,kBAClE,8BAAC,mBAAgB,eAAa,uBAAuB,WAAY,GAAG,kBAAkB,GACxF;AAAA,UACA,oBAAC,cAAW,cAAY,MAAC;AAAA,WAC3B;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEO,MAAM,WAAW,KAAK,YAAY;AACzC,SAAS,cAAc;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,64 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { FloatingWrapper, PopoverArrow } from "@elliemae/ds-floating-context";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import { useContext } from "react";
6
+ import { DSAppPickerName, DSAppPickerSlots } from "../../constants/index.js";
7
+ import { DSAppPickerContext } from "../../DSAppPickerCTX.js";
8
+ import { AppPanel } from "../AppPanel.js";
9
+ import { Trigger } from "../Trigger.js";
10
+ import { useAppPickerFloatingContext } from "./useAppPickerFloatingContext.js";
11
+ const StyledAppPickerFloating = styled(FloatingWrapper, {
12
+ name: DSAppPickerName,
13
+ slot: DSAppPickerSlots.FLOATING_WRAPPER
14
+ })``;
15
+ const AppPickerContent = () => {
16
+ const {
17
+ ownerPropsConfig,
18
+ propsWithDefault,
19
+ focusTrackers,
20
+ wasOpenedByKeyboardRef,
21
+ resolvedIsOpen,
22
+ setInternalIsOpen,
23
+ instanceUid
24
+ } = useContext(DSAppPickerContext);
25
+ const { floatingStyles, arrowStyles, floatingContext, floatingInnerRef, handleTriggerRef, handleTriggerClick } = useAppPickerFloatingContext({
26
+ propsWithDefault,
27
+ focusTrackers,
28
+ wasOpenedByKeyboardRef,
29
+ resolvedIsOpen,
30
+ setInternalIsOpen
31
+ });
32
+ const dialogLabelId = `${instanceUid}-dialog-trigger-btn`;
33
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
34
+ /* @__PURE__ */ jsx(
35
+ Trigger,
36
+ {
37
+ handleTriggerRef,
38
+ handleTriggerClick,
39
+ dialogLabelId
40
+ }
41
+ ),
42
+ /* @__PURE__ */ jsxs(
43
+ StyledAppPickerFloating,
44
+ {
45
+ innerRef: floatingInnerRef,
46
+ isOpen: resolvedIsOpen,
47
+ floatingStyles,
48
+ context: floatingContext,
49
+ getOwnerProps: ownerPropsConfig.getOwnerProps,
50
+ getOwnerPropsArguments: ownerPropsConfig.getOwnerPropsArguments,
51
+ role: "dialog",
52
+ "aria-labelledby": dialogLabelId,
53
+ children: [
54
+ /* @__PURE__ */ jsx(AppPanel, {}),
55
+ /* @__PURE__ */ jsx(PopoverArrow, { ...arrowStyles })
56
+ ]
57
+ }
58
+ )
59
+ ] });
60
+ };
61
+ export {
62
+ AppPickerContent
63
+ };
64
+ //# sourceMappingURL=AppPickerContent.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/AppPickerFloatingContext/AppPickerContent.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { FloatingWrapper, PopoverArrow } from '@elliemae/ds-floating-context';\nimport { styled } from '@elliemae/ds-system';\nimport React, { useContext } from 'react';\nimport { DSAppPickerName, DSAppPickerSlots } from '../../constants/index.js';\nimport { DSAppPickerContext } from '../../DSAppPickerCTX.js';\nimport type { DSAppPickerT } from '../../react-desc-prop-types.js';\nimport { AppPanel } from '../AppPanel.js';\nimport { Trigger } from '../Trigger.js';\nimport { useAppPickerFloatingContext } from './useAppPickerFloatingContext.js';\n\nconst StyledAppPickerFloating = styled(FloatingWrapper, {\n name: DSAppPickerName,\n slot: DSAppPickerSlots.FLOATING_WRAPPER,\n})``;\n\nexport const AppPickerContent: React.ComponentType<DSAppPickerT.Props> = () => {\n const {\n ownerPropsConfig,\n propsWithDefault,\n focusTrackers,\n wasOpenedByKeyboardRef,\n resolvedIsOpen,\n setInternalIsOpen,\n instanceUid,\n } = useContext(DSAppPickerContext);\n const { floatingStyles, arrowStyles, floatingContext, floatingInnerRef, handleTriggerRef, handleTriggerClick } =\n useAppPickerFloatingContext({\n propsWithDefault,\n focusTrackers,\n wasOpenedByKeyboardRef,\n resolvedIsOpen,\n setInternalIsOpen,\n });\n\n const dialogLabelId = `${instanceUid}-dialog-trigger-btn`;\n\n return (\n <>\n <Trigger\n handleTriggerRef={handleTriggerRef}\n handleTriggerClick={handleTriggerClick}\n dialogLabelId={dialogLabelId}\n />\n <StyledAppPickerFloating\n innerRef={floatingInnerRef}\n isOpen={resolvedIsOpen}\n floatingStyles={floatingStyles}\n context={floatingContext}\n getOwnerProps={ownerPropsConfig.getOwnerProps}\n getOwnerPropsArguments={ownerPropsConfig.getOwnerPropsArguments}\n role=\"dialog\"\n aria-labelledby={dialogLabelId}\n >\n <AppPanel />\n <PopoverArrow {...arrowStyles} />\n </StyledAppPickerFloating>\n </>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACqCnB,mBACE,KAKA,YANF;AArCJ,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,cAAc;AACvB,SAAgB,kBAAkB;AAClC,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,0BAA0B;AAEnC,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,mCAAmC;AAE5C,MAAM,0BAA0B,OAAO,iBAAiB;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAEM,MAAM,mBAA4D,MAAM;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,kBAAkB;AACjC,QAAM,EAAE,gBAAgB,aAAa,iBAAiB,kBAAkB,kBAAkB,mBAAmB,IAC3G,4BAA4B;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAEH,QAAM,gBAAgB,GAAG,WAAW;AAEpC,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,QAAQ;AAAA,QACR;AAAA,QACA,SAAS;AAAA,QACT,eAAe,iBAAiB;AAAA,QAChC,wBAAwB,iBAAiB;AAAA,QACzC,MAAK;AAAA,QACL,mBAAiB;AAAA,QAEjB;AAAA,8BAAC,YAAS;AAAA,UACV,oBAAC,gBAAc,GAAG,aAAa;AAAA;AAAA;AAAA,IACjC;AAAA,KACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,141 @@
1
+ import * as React from "react";
2
+ import { useFloatingContext } from "@elliemae/ds-floating-context";
3
+ import { useCallback, useMemo, useRef } from "react";
4
+ const useAppPickerFloatingContext = (appPickerConfig) => {
5
+ const { propsWithDefault, focusTrackers, wasOpenedByKeyboardRef, resolvedIsOpen, setInternalIsOpen } = appPickerConfig;
6
+ const { onOpen, onClose, actionRef, onClick, onClickOutside, onKeyDown, triggerRef, renderTrigger, isOpen } = propsWithDefault;
7
+ const triggerIsInternal = !renderTrigger;
8
+ const isControlled = typeof isOpen === "boolean";
9
+ const { trackFocusSelectedItem, trackFocusItemAtIndex, trackFocusPanel, trackFocusFirstItem } = focusTrackers;
10
+ const defaultTriggerRef = useRef(null);
11
+ const handleClickOutside = useCallback(
12
+ (e) => {
13
+ if (!isControlled) onClose?.({ reason: "click-outside", event: e });
14
+ setInternalIsOpen(false);
15
+ onClickOutside?.(e);
16
+ },
17
+ [isControlled, onClose, setInternalIsOpen, onClickOutside]
18
+ );
19
+ const handleScopedEscape = useCallback(
20
+ (event) => {
21
+ if (!isControlled) onClose?.({ reason: "escape", event });
22
+ setInternalIsOpen(false);
23
+ },
24
+ [isControlled, onClose, setInternalIsOpen]
25
+ );
26
+ const handleFloatingClose = useCallback(
27
+ (info) => {
28
+ if (info.reason === "controlled-flip" && isControlled) onClose?.({ reason: "controlled" });
29
+ },
30
+ [isControlled, onClose]
31
+ );
32
+ const handleFloatingOpen = useCallback(
33
+ (info) => {
34
+ if (wasOpenedByKeyboardRef.current && triggerIsInternal) trackFocusSelectedItem();
35
+ else if (triggerIsInternal) trackFocusPanel();
36
+ else trackFocusFirstItem();
37
+ if (info.reason === "controlled-flip" && isControlled) onOpen?.({ reason: "controlled" });
38
+ },
39
+ [
40
+ wasOpenedByKeyboardRef,
41
+ triggerIsInternal,
42
+ trackFocusSelectedItem,
43
+ trackFocusPanel,
44
+ trackFocusFirstItem,
45
+ isControlled,
46
+ onOpen
47
+ ]
48
+ );
49
+ const floatingContextConfig = useMemo(
50
+ () => ({
51
+ placement: "bottom",
52
+ // Arrow tip is ~6.1px above the panel top (arrowPlacementBase16 ≈ 17.5px, tip at 11.4px from box top).
53
+ // 4px spec gap → 4 + 6.1 ≈ 10px offset.
54
+ customOffset: [0, 10],
55
+ externallyControlledIsOpen: resolvedIsOpen,
56
+ withoutAnimation: true,
57
+ onClickOutside: handleClickOutside,
58
+ // closeOnEscape = !onKeyDown: with a consumer onKeyDown, useFloatingContext neither routes
59
+ // the Escape to onEscape (see handleScopedEscape) nor returns focus to the trigger — the
60
+ // consumer's onKeyDown owns the key entirely.
61
+ closeOnEscape: !onKeyDown,
62
+ onClose: handleFloatingClose,
63
+ onEscape: handleScopedEscape,
64
+ onOpen: handleFloatingOpen,
65
+ returnFocusToReference: true,
66
+ externalReferenceElement: triggerRef?.current || defaultTriggerRef.current
67
+ }),
68
+ [
69
+ handleClickOutside,
70
+ handleScopedEscape,
71
+ handleFloatingClose,
72
+ handleFloatingOpen,
73
+ onKeyDown,
74
+ resolvedIsOpen,
75
+ triggerRef
76
+ ]
77
+ );
78
+ const {
79
+ refs: floatingRefs,
80
+ floatingStyles,
81
+ arrowStyles,
82
+ context: floatingContext
83
+ } = useFloatingContext(floatingContextConfig);
84
+ const handleTriggerRef = useCallback(
85
+ (node) => {
86
+ defaultTriggerRef.current = node;
87
+ floatingRefs.setReference(node);
88
+ if (triggerRef) {
89
+ triggerRef.current = node;
90
+ }
91
+ },
92
+ [floatingRefs, triggerRef]
93
+ );
94
+ const handleActionRef = useCallback(
95
+ (node) => {
96
+ if (node && actionRef?.current) {
97
+ actionRef.current.focusToIndex = (index) => {
98
+ trackFocusItemAtIndex(index);
99
+ };
100
+ actionRef.current.focusWrapper = () => {
101
+ trackFocusPanel();
102
+ };
103
+ actionRef.current.focusSelectedOrFirstAvailable = () => {
104
+ trackFocusSelectedItem();
105
+ };
106
+ }
107
+ },
108
+ [actionRef, trackFocusItemAtIndex, trackFocusPanel, trackFocusSelectedItem]
109
+ );
110
+ const floatingInnerRef = useCallback(
111
+ (node) => {
112
+ floatingRefs.setFloating(node);
113
+ handleActionRef(node);
114
+ },
115
+ [floatingRefs.setFloating, handleActionRef]
116
+ );
117
+ const handleTriggerClick = useCallback(
118
+ (e) => {
119
+ wasOpenedByKeyboardRef.current = e.detail === 0;
120
+ onClick?.(e);
121
+ if (!isControlled) {
122
+ if (resolvedIsOpen) onClose?.({ reason: "trigger-toggle", event: e });
123
+ else onOpen?.({ reason: "trigger", event: e });
124
+ }
125
+ setInternalIsOpen((prev) => !prev);
126
+ },
127
+ [onClick, wasOpenedByKeyboardRef, setInternalIsOpen, isControlled, resolvedIsOpen, onClose, onOpen]
128
+ );
129
+ return {
130
+ floatingStyles,
131
+ arrowStyles,
132
+ floatingContext,
133
+ handleTriggerRef,
134
+ handleTriggerClick,
135
+ floatingInnerRef
136
+ };
137
+ };
138
+ export {
139
+ useAppPickerFloatingContext
140
+ };
141
+ //# sourceMappingURL=useAppPickerFloatingContext.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/AppPickerFloatingContext/useAppPickerFloatingContext.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useFloatingContext, type DSHookFloatingContextT } from '@elliemae/ds-floating-context';\nimport type React from 'react';\nimport { useCallback, useMemo, useRef } from 'react';\nimport type { useAppPicker } from '../../config/useAppPicker.js';\nimport type { DSAppPickerT } from '../../react-desc-prop-types.js';\n\n/**\n * useAppPickerFloatingContext \u2014 the single point that wires DSAppPicker to\n * `@elliemae/ds-floating-context`'s `useFloatingContext`.\n *\n * WHAT IT DOES (as a black box):\n * AppPicker can be used in two very different ways:\n * - Controlled: the consumer supplies `isOpen` and drives the open/close transition.\n * \u2514\u2192 AppPicker can't be event-based as the flip might originate from any cause and we don't own the business logic\n * \u2514\u2192 we need to ensure WCAG embedded behaviours (focus, Escape, click-outside) are wired to the consumer's `isOpen` flip.\n * - Uncontrolled: the consumer does not supply `isOpen` and AppPicker owns the full flows, we only notify the consumer of the transition and its cause.\n *\n * The AppPicker and this file in particular serves as the one place that coordinates the two different ways to use the component and wires with the useFloatingContext hook.\n * This files owns:\n * - Focus management relative to open/close transitions (initial focus on open, return focus to trigger on close)\n * - Escape key handling (scoped to the panel and trigger)\n * - Click-outside handling (panel and trigger)\n * - Imperative focus API via actionRef\n * - Controlled/Uncontrolled forks and differences in event notification (eager vs controlled-flip)\n * - OnOpen and OnClose notification to the consumer with the correct reason and event (if any)\n *\n * IMPORTANT:\n * Parts of the flow/logic required in this file is offloaded to useFloatingContext internal assumptions and logics.\n * Changes to useFloatingContext may break the flows in this file, or alter them in ways that are not obvious, the two are closely coupled.\n *\n * DATA / EVENT FLOW\n *\n * Two concerns run in parallel and must not be conflated: (A) what makes the panel show/hide and take\n * focus, and (B) how the consumer is told it opened/closed. They have different origins.\n *\n * (A) PANEL VISIBILITY + FOCUS \u2014 useFloatingContext internal co-ownership of the flow.\n *\n * a user action \u2502 \u2502 isOpen prop flip\n * (trigger click / scoped Escape / click outside) \u2502 \u2502 (not a traceable user action, but the consumer's own flip)\n * uncontrolled - flips the internal flag \u2502 \u2502 controlled - AppPicker's own flip is inert, consumer drives it\n * \u2502\n * \u25BC\n * resolvedIsOpen changes\n * \u2502\n * \u25BC\n * useFloatingContext (externallyControlledIsOpen) detects the transition\n * \u2502\n * \u25BC\n * on open \u2502 \u2502 on close\n * handleFloatingOpen \u2502 \u2502 focus is only restored after a SCOPED ESCAPE:\n * AppPicker business logic seeds initial focus \u2502 \u2502 useFloatingContext returns focus to the trigger\n * \u2502 \u2502 (returnFocusToReference). Click-outside / toggle\n * \u2502 \u2502 / controlled closes do NOT move focus, and\n * \u2502 \u2502 handleFloatingClose only NOTIFIES (see (B)).\n * \u2502\n * \u25BC\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 visibility + focus are delivered to final user as expected \u2502\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n *\n * (B) CONSUMER NOTIFICATION\n * Each flow below is the UNCONTROLLED path, where AppPicker owns the transition and can name the true cause.\n * The controlled equivalent for every trigger is stated once at the end.\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 OPENING TRIGGERS FLOWS \u2502\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n * TRIGGER CLICK (uncontrolled)\n * trigger click\n * user clicks the internal trigger, panel closed\n * \u2502\n * \u25BC\n * handleTriggerClick\n * ( flips the flag and wires the visual and focus Flow (A) above )\n * \u2502\n * \u25BC\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 onOpen { reason: 'trigger', event } \u2502 fired EAGERLY, when the event is triggered\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n * ------------------------------------------------------------------------------------------------------------------------\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 CLOSING TRIGGERS FLOWS \u2502\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n * KEYBOARD ESCAPE (uncontrolled)\n * Escape within the panel DOM tree or the trigger\n * scoped Escape (routed only while closeOnEscape, i.e. no consumer onKeyDown)\n * \u2502\n * \u25BC\n * onEscape \u2192 handleScopedEscape\n * ( flips the flag and wires the visual and focus Flow (A) above )\n * \u2502\n * \u25BC\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 onClose { reason: 'escape', event } \u2502 fired EAGERLY, when the event is triggered\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n *\n * CLICK OUTSIDE (uncontrolled)\n * Click outside the panel DOM tree and the trigger\n * useFloatingContext detects a pointer press outside the panel + trigger\n * \u2502\n * \u25BC\n * handleClickOutside\n * ( flips the flag and wires the visual and focus Flow (A) above )\n * \u2502\n * \u25BC\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 onClose { reason: 'click-outside', event } \u2502 fired EAGERLY, when the event is triggered\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n *\n * CLICK ON TRIGGER (uncontrolled, while internal state is open)\n * trigger click while open\n * user clicks the internal trigger, panel open\n * \u2502\n * \u25BC\n * handleTriggerClick\n * ( flips the flag and wires the visual and focus Flow (A) above )\n * \u2502\n * \u25BC\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 onClose { reason: 'trigger-toggle', event } \u2502 fired EAGERLY, when the event is triggered\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n * ------------------------------------------------------------------------------------------------------------------------\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 CONTROLLED OPEN & CLOSE FLOWS \u2502\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n * AppPicker's own flip is inert;\n * We can't fire EAGERLY and we can't track an originating event, there may be NONE\n * The consumer's `isOpen` flip is reacted to by useFloatingContext, which fires onOpen / onClose with reason 'controlled-flip'\n * We wire the visual and focus Flow (A) above, and then notify the consumer with reason 'controlled' (no event)\n * \u2502\n * \u25BC\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n * \u2502 onOpen { reason: 'controlled' } \u2502 no event\n * \u2502 onClose { reason: 'controlled' } \u2502 a prop flip is not a traceable user action\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n * ------------------------------------------------------------------------------------------------------------------------\n *\n * Eager (uncontrolled) and controlled-flip paths are mutually exclusive on `isControlled`.\n * the consumer is notified exactly once per transition \u2014 never twice.\n * On Escape specifically\n * a controlled consumer supplies onKeyDown, so closeOnEscape is false in useFloatingContext\n * \u2514\u2192 AppPicker's onEscape never runs \u2014\n * \u2514\u2192 the close arrives purely by listening to the flag transition\n * ------------------------------------------------------------------------------------------------------------------------\n * A nuance for an edge case:\n *\n * Declarative mount-open (rendered already-open).\n * useFloatingContext fires no onOpen for it (it did not transition to open, it started open),\n * \u2514\u2192 neither the focus-seed (A) nor the notification (B) runs\n * AppPanel compensates this locally via useMountedOpenAutofocusNuance, it needs to be seen if this is even desired or should be removed\n * ------------------------------------------------------------------------------------------------------------------------\n */\n\ntype ConfiguredAppPickerCtx = ReturnType<typeof useAppPicker>;\n\ntype AppPickerFloatingContextConfig = {\n propsWithDefault: DSAppPickerT.InternalProps;\n focusTrackers: ConfiguredAppPickerCtx['focusTrackers'];\n wasOpenedByKeyboardRef: ConfiguredAppPickerCtx['wasOpenedByKeyboardRef'];\n // Open state is owned by useAppPicker (lifted so useFocusTracker can seed focus in the same fiber).\n // This hook reads the resolved value for positioning and flips it through the setter to close/toggle.\n resolvedIsOpen: ConfiguredAppPickerCtx['resolvedIsOpen'];\n setInternalIsOpen: ConfiguredAppPickerCtx['setInternalIsOpen'];\n};\n\nexport const useAppPickerFloatingContext = (appPickerConfig: AppPickerFloatingContextConfig) => {\n const { propsWithDefault, focusTrackers, wasOpenedByKeyboardRef, resolvedIsOpen, setInternalIsOpen } =\n appPickerConfig;\n const { onOpen, onClose, actionRef, onClick, onClickOutside, onKeyDown, triggerRef, renderTrigger, isOpen } =\n propsWithDefault;\n const triggerIsInternal = !renderTrigger;\n // Controlled when the consumer supplies `isOpen`. This decides who owns a transition: uncontrolled,\n // AppPicker's own handlers own it and report the specific event-carrying reason eagerly; controlled,\n // AppPicker's own flips are inert and the consumer drives open/close via the prop (reason 'controlled').\n const isControlled = typeof isOpen === 'boolean';\n\n const { trackFocusSelectedItem, trackFocusItemAtIndex, trackFocusPanel, trackFocusFirstItem } = focusTrackers;\n\n const defaultTriggerRef = useRef<HTMLButtonElement>(null);\n\n // Uncontrolled close \u2014 see file header (B) \"CLICK OUTSIDE\". Also forwards the raw event to onClickOutside.\n const handleClickOutside = useCallback(\n (e: MouseEvent | TouchEvent) => {\n if (!isControlled) onClose?.({ reason: 'click-outside', event: e });\n setInternalIsOpen(false);\n onClickOutside?.(e as MouseEvent);\n },\n [isControlled, onClose, setInternalIsOpen, onClickOutside],\n );\n\n // onEscape target \u2014 see file header (B) \"KEYBOARD ESCAPE\". Scoped Escape only; gated by closeOnEscape\n // (`!onKeyDown`, see the config below).\n const handleScopedEscape = useCallback(\n (event: KeyboardEvent) => {\n if (!isControlled) onClose?.({ reason: 'escape', event });\n setInternalIsOpen(false);\n },\n [isControlled, onClose, setInternalIsOpen],\n );\n\n // Controlled close notify \u2014 see file header \"CONTROLLED OPEN & CLOSE FLOWS\". The guard also filters\n // out a non-scoped Escape, which reaches here as reason 'interaction' (not 'controlled-flip').\n const handleFloatingClose = useCallback(\n (info: DSHookFloatingContextT.OpenChange) => {\n if (info.reason === 'controlled-flip' && isControlled) onClose?.({ reason: 'controlled' });\n },\n [isControlled, onClose],\n );\n\n // Open transition \u2014 see file header (A) (focus) + \"CONTROLLED OPEN & CLOSE FLOWS\" (notify). Seeds\n // initial focus (targets per the CONSUMER CONFIGURATION table) and, when controlled, notifies the\n // consumer. Mount-open is not a transition, so this never fires for it (AppPanel's\n // useMountedOpenAutofocusNuance handles that one case).\n const handleFloatingOpen = useCallback(\n (info: DSHookFloatingContextT.OpenChange) => {\n if (wasOpenedByKeyboardRef.current && triggerIsInternal) trackFocusSelectedItem();\n else if (triggerIsInternal) trackFocusPanel();\n else trackFocusFirstItem();\n if (info.reason === 'controlled-flip' && isControlled) onOpen?.({ reason: 'controlled' });\n },\n [\n wasOpenedByKeyboardRef,\n triggerIsInternal,\n trackFocusSelectedItem,\n trackFocusPanel,\n trackFocusFirstItem,\n isControlled,\n onOpen,\n ],\n );\n\n const floatingContextConfig = useMemo(\n () =>\n ({\n placement: 'bottom',\n // Arrow tip is ~6.1px above the panel top (arrowPlacementBase16 \u2248 17.5px, tip at 11.4px from box top).\n // 4px spec gap \u2192 4 + 6.1 \u2248 10px offset.\n customOffset: [0, 10],\n externallyControlledIsOpen: resolvedIsOpen,\n withoutAnimation: true,\n onClickOutside: handleClickOutside,\n // closeOnEscape = !onKeyDown: with a consumer onKeyDown, useFloatingContext neither routes\n // the Escape to onEscape (see handleScopedEscape) nor returns focus to the trigger \u2014 the\n // consumer's onKeyDown owns the key entirely.\n closeOnEscape: !onKeyDown,\n onClose: handleFloatingClose,\n onEscape: handleScopedEscape,\n onOpen: handleFloatingOpen,\n returnFocusToReference: true,\n externalReferenceElement: triggerRef?.current || defaultTriggerRef.current,\n }) as DSHookFloatingContextT.Props,\n [\n handleClickOutside,\n handleScopedEscape,\n handleFloatingClose,\n handleFloatingOpen,\n onKeyDown,\n resolvedIsOpen,\n triggerRef,\n ],\n );\n\n const {\n refs: floatingRefs,\n floatingStyles,\n arrowStyles,\n context: floatingContext,\n } = useFloatingContext(floatingContextConfig);\n\n const handleTriggerRef = useCallback<React.RefCallback<HTMLButtonElement>>(\n (node) => {\n (defaultTriggerRef as React.MutableRefObject<HTMLButtonElement | null>).current = node;\n floatingRefs.setReference(node);\n if (triggerRef) {\n (triggerRef as React.MutableRefObject<HTMLButtonElement | null>).current = node;\n }\n },\n [floatingRefs, triggerRef],\n );\n\n // Populates the consumer's actionRef with imperative focus methods. Fires on mount with the panel\n // node. Every method routes through the focus tracker \u2014 no DOM queries.\n const handleActionRef = useCallback<React.RefCallback<HTMLDivElement>>(\n (node) => {\n if (node && actionRef?.current) {\n actionRef.current.focusToIndex = (index: number) => {\n trackFocusItemAtIndex(index);\n };\n actionRef.current.focusWrapper = () => {\n trackFocusPanel();\n };\n actionRef.current.focusSelectedOrFirstAvailable = () => {\n trackFocusSelectedItem();\n };\n }\n },\n [actionRef, trackFocusItemAtIndex, trackFocusPanel, trackFocusSelectedItem],\n );\n\n const floatingInnerRef = useCallback<React.RefCallback<HTMLDivElement>>(\n (node) => {\n (floatingRefs.setFloating as React.RefCallback<HTMLDivElement>)(node);\n handleActionRef(node);\n },\n [floatingRefs.setFloating, handleActionRef],\n );\n\n const handleTriggerClick = useCallback(\n (e: React.MouseEvent | React.KeyboardEvent) => {\n // detail === 0 \u21D2 keyboard activation (Enter/Space), not a pointer. handleFloatingOpen reads\n // this on the next open transition to pick keyboard-vs-pointer initial focus.\n wasOpenedByKeyboardRef.current = (e as React.MouseEvent).detail === 0;\n onClick?.(e);\n // Uncontrolled eager notify \u2014 see file header (B) \"TRIGGER CLICK\" / \"CLICK ON TRIGGER\".\n // `resolvedIsOpen` is the pre-flip value: open \u21D2 this click closes (trigger-toggle), else opens.\n if (!isControlled) {\n if (resolvedIsOpen) onClose?.({ reason: 'trigger-toggle', event: e });\n else onOpen?.({ reason: 'trigger', event: e });\n }\n setInternalIsOpen((prev) => !prev);\n },\n [onClick, wasOpenedByKeyboardRef, setInternalIsOpen, isControlled, resolvedIsOpen, onClose, onOpen],\n );\n\n return {\n floatingStyles,\n arrowStyles,\n floatingContext,\n handleTriggerRef,\n handleTriggerClick,\n floatingInnerRef,\n };\n};\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -0,0 +1,74 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { DSChip } from "@elliemae/ds-chip";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import React2, { useContext } from "react";
6
+ import { DSAppPickerDataTestIds, DSAppPickerName, DSAppPickerSlots } from "../constants/index.js";
7
+ import { DSAppPickerContext } from "../DSAppPickerCTX.js";
8
+ import { getChipRegionId } from "../util/getChipRegionId.js";
9
+ const StyledListItem = styled("div", { name: DSAppPickerName, slot: DSAppPickerSlots.ITEM })`
10
+ display: flex;
11
+ `;
12
+ const StyledChip = styled(DSChip, { name: DSAppPickerName, slot: DSAppPickerSlots.CHIP })``;
13
+ const AppIcon = ({ icon: Icon }) => /* @__PURE__ */ jsx(Icon, { className: "app-picker__icon", size: "m" });
14
+ const AppPickerItem = React2.memo(
15
+ ({ app, positionAnnouncement, chipId, isFirstFocusable, isLastFocusable }) => {
16
+ const { label, disabled, applyAriaDisabled, selected, icon, id, wrapText } = app;
17
+ const {
18
+ focusTrackers: { focusRegion, firstFocusableRef, lastFocusableRef, trackFocusChip, trackFocusRegionReset },
19
+ ownerPropsConfig: { getOwnerProps }
20
+ } = useContext(DSAppPickerContext);
21
+ const isFocused = focusRegion === getChipRegionId(chipId);
22
+ const getOwnerPropsArguments = React2.useCallback(() => app, [app]);
23
+ const renderIcon = React2.useCallback(() => /* @__PURE__ */ jsx(AppIcon, { icon }), [icon]);
24
+ const handleClick = React2.useCallback(
25
+ (e) => {
26
+ if (app.onClick) app.onClick(e, app);
27
+ },
28
+ [app]
29
+ );
30
+ const handleFocus = React2.useCallback(() => trackFocusChip(chipId), [chipId, trackFocusChip]);
31
+ const handleChipRef = React2.useCallback(
32
+ (node) => {
33
+ if (isFirstFocusable) firstFocusableRef.current = node;
34
+ if (isLastFocusable) lastFocusableRef.current = node;
35
+ if (node && isFocused) node.focus();
36
+ },
37
+ [isFirstFocusable, isLastFocusable, isFocused, firstFocusableRef, lastFocusableRef]
38
+ );
39
+ return /* @__PURE__ */ jsx(
40
+ StyledListItem,
41
+ {
42
+ "data-testid": DSAppPickerDataTestIds.ITEM,
43
+ getOwnerProps,
44
+ getOwnerPropsArguments,
45
+ children: /* @__PURE__ */ jsx(
46
+ StyledChip,
47
+ {
48
+ onClick: handleClick,
49
+ "data-testid": DSAppPickerDataTestIds.CHIP,
50
+ disabled,
51
+ applyAriaDisabled,
52
+ selected,
53
+ "aria-current": selected ? "true" : void 0,
54
+ "aria-label": `${label} ${positionAnnouncement}`,
55
+ id,
56
+ icon: renderIcon,
57
+ label,
58
+ getOwnerProps,
59
+ getOwnerPropsArguments,
60
+ wrapText,
61
+ innerRef: handleChipRef,
62
+ onBlur: trackFocusRegionReset,
63
+ onFocus: handleFocus
64
+ }
65
+ )
66
+ }
67
+ );
68
+ }
69
+ );
70
+ AppPickerItem.displayName = "DSAppPicker.AppPickerItem";
71
+ export {
72
+ AppPickerItem
73
+ };
74
+ //# sourceMappingURL=AppPickerItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/AppPickerItem.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSChip } from '@elliemae/ds-chip';\nimport { styled } from '@elliemae/ds-system';\nimport React, { useContext } from 'react';\nimport { DSAppPickerDataTestIds, DSAppPickerName, DSAppPickerSlots } from '../constants/index.js';\nimport { DSAppPickerContext } from '../DSAppPickerCTX.js';\nimport type { DSAppPickerT } from '../react-desc-prop-types.js';\nimport { getChipRegionId } from '../util/getChipRegionId.js';\n\n// Grid items stretch to their row height, but the chip inside would not follow: DSChip's root is a\n// block-level box with `height: auto` under `wrapText`, so a single-line chip stayed short next to a\n// chip whose label wrapped onto two lines (uneven tiles \u2014 PUI ticket \"Chips don't keep a consistent\n// height\"). Making this a flex container hands the stretched row height down to the chip root; the\n// chip's own button already carries `min-height: 100%`, so it fills from there.\nconst StyledListItem = styled('div', { name: DSAppPickerName, slot: DSAppPickerSlots.ITEM })`\n display: flex;\n`;\nconst StyledChip = styled(DSChip, { name: DSAppPickerName, slot: DSAppPickerSlots.CHIP })``;\n\ninterface AppIconProps {\n icon: DSAppPickerT.AppItem['icon'];\n}\n\nconst AppIcon: React.FC<AppIconProps> = ({ icon: Icon }) => <Icon className=\"app-picker__icon\" size=\"m\" />;\n\ninterface AppPickerItemProps {\n app: DSAppPickerT.AppItem;\n // Chip identity assigned by the parent (AppSection, via getChipId) and read here \u2014 never\n // generated locally, so the focus tracker can address this chip without it reporting back up.\n chipId: string;\n isFirstFocusable: boolean;\n isLastFocusable: boolean;\n positionAnnouncement: string;\n}\n\nexport const AppPickerItem: React.FC<AppPickerItemProps> = React.memo(\n ({ app, positionAnnouncement, chipId, isFirstFocusable, isLastFocusable }) => {\n const { label, disabled, applyAriaDisabled, selected, icon, id, wrapText } = app;\n const {\n focusTrackers: { focusRegion, firstFocusableRef, lastFocusableRef, trackFocusChip, trackFocusRegionReset },\n ownerPropsConfig: { getOwnerProps },\n } = useContext(DSAppPickerContext);\n\n const isFocused = focusRegion === getChipRegionId(chipId);\n\n const getOwnerPropsArguments = React.useCallback(() => app, [app]);\n const renderIcon = React.useCallback(() => <AppIcon icon={icon} />, [icon]);\n const handleClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (app.onClick) app.onClick(e, app);\n },\n [app],\n );\n const handleFocus = React.useCallback(() => trackFocusChip(chipId), [chipId, trackFocusChip]);\n\n // Single ref callback: registers focus-trap edges and drives tracker-seeded focus.\n // New reference when isFocused or edge membership changes \u2014 React re-invokes with the DOM node.\n const handleChipRef = React.useCallback(\n (node: HTMLElement | null) => {\n if (isFirstFocusable) firstFocusableRef.current = node;\n if (isLastFocusable) lastFocusableRef.current = node;\n if (node && isFocused) node.focus();\n },\n [isFirstFocusable, isLastFocusable, isFocused, firstFocusableRef, lastFocusableRef],\n );\n\n return (\n <StyledListItem\n data-testid={DSAppPickerDataTestIds.ITEM}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledChip\n onClick={handleClick}\n data-testid={DSAppPickerDataTestIds.CHIP}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n selected={selected}\n // Only the consumer knows what \"selected\" means in context (current item, toggled, or option in a listbox).\n // AppPicker is both a consumer and consumed, it owes the programmatic state.\n // `true` rather than `page`:\n // `page` claims a set of pages,\n // AppPicker cannot know whether a tile is an anchor, a route push, or an in-place context switch.\n // A consumer who does know can upgrade the token through the CHIP slot (`dsApppickerChip`), which overrides anything set here.\n // Omitted when unselected \u2014 `false` is the default and is not exposed either way.\n aria-current={selected ? 'true' : undefined}\n // discussed with Juan (A11y SME), the position announcement is best kept to give \"aria-current\" the meaing of \"current within a set\"\n // it's not strictly required, but given both apps and customApps are part of the same \"set\" and there is no other semantic tie between the individual chips\n // announcing X of Y gives a reasonable context to the user that they are navigating a set of items, and not just a single item even with the button role.\n // with this X of Y announcement we can also keep the two `role=\"group\"` sections for apps and customApps separate,\n // improving the announcement experience as they don't get bombarded with the section title every focus on a button, but only when they first enter the section.\n aria-label={`${label} ${positionAnnouncement}`}\n id={id}\n icon={renderIcon}\n label={label}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n wrapText={wrapText}\n innerRef={handleChipRef}\n onBlur={trackFocusRegionReset}\n onFocus={handleFocus}\n />\n </StyledListItem>\n );\n },\n);\n\nAppPickerItem.displayName = 'DSAppPicker.AppPickerItem';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsBqC;AAtB5D,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,OAAOA,UAAS,kBAAkB;AAClC,SAAS,wBAAwB,iBAAiB,wBAAwB;AAC1E,SAAS,0BAA0B;AAEnC,SAAS,uBAAuB;AAOhC,MAAM,iBAAiB,OAAO,OAAO,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,KAAK,CAAC;AAAA;AAAA;AAG3F,MAAM,aAAa,OAAO,QAAQ,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,KAAK,CAAC;AAMxF,MAAM,UAAkC,CAAC,EAAE,MAAM,KAAK,MAAM,oBAAC,QAAK,WAAU,oBAAmB,MAAK,KAAI;AAYjG,MAAM,gBAA8CA,OAAM;AAAA,EAC/D,CAAC,EAAE,KAAK,sBAAsB,QAAQ,kBAAkB,gBAAgB,MAAM;AAC5E,UAAM,EAAE,OAAO,UAAU,mBAAmB,UAAU,MAAM,IAAI,SAAS,IAAI;AAC7E,UAAM;AAAA,MACJ,eAAe,EAAE,aAAa,mBAAmB,kBAAkB,gBAAgB,sBAAsB;AAAA,MACzG,kBAAkB,EAAE,cAAc;AAAA,IACpC,IAAI,WAAW,kBAAkB;AAEjC,UAAM,YAAY,gBAAgB,gBAAgB,MAAM;AAExD,UAAM,yBAAyBA,OAAM,YAAY,MAAM,KAAK,CAAC,GAAG,CAAC;AACjE,UAAM,aAAaA,OAAM,YAAY,MAAM,oBAAC,WAAQ,MAAY,GAAI,CAAC,IAAI,CAAC;AAC1E,UAAM,cAAcA,OAAM;AAAA,MACxB,CAAC,MAAwB;AACvB,YAAI,IAAI,QAAS,KAAI,QAAQ,GAAG,GAAG;AAAA,MACrC;AAAA,MACA,CAAC,GAAG;AAAA,IACN;AACA,UAAM,cAAcA,OAAM,YAAY,MAAM,eAAe,MAAM,GAAG,CAAC,QAAQ,cAAc,CAAC;AAI5F,UAAM,gBAAgBA,OAAM;AAAA,MAC1B,CAAC,SAA6B;AAC5B,YAAI,iBAAkB,mBAAkB,UAAU;AAClD,YAAI,gBAAiB,kBAAiB,UAAU;AAChD,YAAI,QAAQ,UAAW,MAAK,MAAM;AAAA,MACpC;AAAA,MACA,CAAC,kBAAkB,iBAAiB,WAAW,mBAAmB,gBAAgB;AAAA,IACpF;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAa,uBAAuB;AAAA,QACpC;AAAA,QACA;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT,eAAa,uBAAuB;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YAQA,gBAAc,WAAW,SAAS;AAAA,YAMlC,cAAY,GAAG,KAAK,IAAI,oBAAoB;AAAA,YAC5C;AAAA,YACA,MAAM;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA;AAAA,QACX;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,64 @@
1
+ import * as React from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { styled } from "@elliemae/ds-system";
4
+ import { DSTypography } from "@elliemae/ds-typography";
5
+ import { useContext } from "react";
6
+ import { DSAppPickerDataTestIds, DSAppPickerName, DSAppPickerSlots } from "../constants/index.js";
7
+ import { DSAppPickerContext } from "../DSAppPickerCTX.js";
8
+ import { getChipId } from "../util/getChipId.js";
9
+ import { AppPickerItem } from "./AppPickerItem.js";
10
+ import { StyledListItemFullRow, StyledSection } from "./shared-styles.js";
11
+ const StyledTitle = styled(DSTypography, { name: DSAppPickerName, slot: DSAppPickerSlots.TITLE })`
12
+ color: ${({ theme }) => theme.colors.neutral[700]};
13
+ font-size: ${({ theme }) => theme.fontSizes.value[400]};
14
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
15
+ margin: 12px 0 8px 0;
16
+ line-height: 1.385;
17
+ text-transform: uppercase;
18
+ text-align: center;
19
+ `;
20
+ const AppSection = ({ isCustomApps = false }) => {
21
+ const {
22
+ propsWithDefault: { apps, customApps, sectionTitle, customSectionTitle },
23
+ instanceUid,
24
+ focusTrackers: { firstFocusableIdx, lastFocusableIdx },
25
+ ownerPropsConfig
26
+ } = useContext(DSAppPickerContext);
27
+ const items = isCustomApps ? customApps : apps;
28
+ const titleId = isCustomApps ? `${instanceUid}-custom-section-title` : `${instanceUid}-section-title`;
29
+ const title = isCustomApps ? customSectionTitle : sectionTitle;
30
+ const totalCount = (apps?.length ?? 0) + (customApps?.length ?? 0);
31
+ const initialPositionOffset = isCustomApps ? apps.length : 0;
32
+ return /* @__PURE__ */ jsxs(
33
+ StyledSection,
34
+ {
35
+ "data-testid": DSAppPickerDataTestIds.GROUP,
36
+ role: "group",
37
+ "aria-labelledby": titleId,
38
+ ...ownerPropsConfig,
39
+ children: [
40
+ /* @__PURE__ */ jsx(StyledListItemFullRow, { "data-testid": DSAppPickerDataTestIds.ROW, ...ownerPropsConfig, children: /* @__PURE__ */ jsx(StyledTitle, { "data-testid": DSAppPickerDataTestIds.TITLE, id: titleId, variant: "h3-strong", ...ownerPropsConfig, children: title }) }),
41
+ items.map((app, index) => {
42
+ const flatIndex = initialPositionOffset + index;
43
+ const positionAnnouncement = `${flatIndex + 1} of ${totalCount}`;
44
+ return /* @__PURE__ */ jsx(
45
+ AppPickerItem,
46
+ {
47
+ positionAnnouncement,
48
+ app,
49
+ chipId: getChipId(app, flatIndex),
50
+ isFirstFocusable: flatIndex === firstFocusableIdx,
51
+ isLastFocusable: flatIndex === lastFocusableIdx
52
+ },
53
+ app.id ?? `${app.label}-${isCustomApps ? "custom" : "main"}-${index}`
54
+ );
55
+ })
56
+ ]
57
+ }
58
+ );
59
+ };
60
+ AppSection.displayName = "DSAppPicker.AppSection";
61
+ export {
62
+ AppSection
63
+ };
64
+ //# sourceMappingURL=AppSection.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/AppSection.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport React, { useContext } from 'react';\nimport { DSAppPickerDataTestIds, DSAppPickerName, DSAppPickerSlots } from '../constants/index.js';\nimport { DSAppPickerContext } from '../DSAppPickerCTX.js';\nimport { getChipId } from '../util/getChipId.js';\nimport { AppPickerItem } from './AppPickerItem.js';\nimport { StyledListItemFullRow, StyledSection } from './shared-styles.js';\n\nconst StyledTitle = styled(DSTypography, { name: DSAppPickerName, slot: DSAppPickerSlots.TITLE })`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => theme.fontSizes.value[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n margin: 12px 0 8px 0;\n line-height: 1.385;\n text-transform: uppercase;\n text-align: center;\n`;\n\ninterface AppSectionProps {\n isCustomApps?: boolean;\n}\n\nexport const AppSection: React.FC<AppSectionProps> = ({ isCustomApps = false }) => {\n const {\n propsWithDefault: { apps, customApps, sectionTitle, customSectionTitle },\n instanceUid,\n focusTrackers: { firstFocusableIdx, lastFocusableIdx },\n ownerPropsConfig,\n } = useContext(DSAppPickerContext);\n\n const items = isCustomApps ? customApps : apps;\n const titleId = isCustomApps ? `${instanceUid}-custom-section-title` : `${instanceUid}-section-title`;\n const title = isCustomApps ? customSectionTitle : sectionTitle;\n\n const totalCount = (apps?.length ?? 0) + (customApps?.length ?? 0);\n const initialPositionOffset = isCustomApps ? apps.length : 0;\n return (\n <StyledSection\n data-testid={DSAppPickerDataTestIds.GROUP}\n role=\"group\"\n aria-labelledby={titleId}\n {...ownerPropsConfig}\n >\n <StyledListItemFullRow data-testid={DSAppPickerDataTestIds.ROW} {...ownerPropsConfig}>\n <StyledTitle data-testid={DSAppPickerDataTestIds.TITLE} id={titleId} variant=\"h3-strong\" {...ownerPropsConfig}>\n {title}\n </StyledTitle>\n </StyledListItemFullRow>\n {items.map((app, index) => {\n const flatIndex = initialPositionOffset + index;\n const positionAnnouncement = `${flatIndex + 1} of ${totalCount}`;\n return (\n <AppPickerItem\n key={app.id ?? `${app.label}-${isCustomApps ? 'custom' : 'main'}-${index}`}\n positionAnnouncement={positionAnnouncement}\n app={app}\n chipId={getChipId(app, flatIndex)}\n isFirstFocusable={flatIndex === firstFocusableIdx}\n isLastFocusable={flatIndex === lastFocusableIdx}\n />\n );\n })}\n </StyledSection>\n );\n};\n\nAppSection.displayName = 'DSAppPicker.AppSection';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsCnB,SAOI,KAPJ;AAtCJ,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAgB,kBAAkB;AAClC,SAAS,wBAAwB,iBAAiB,wBAAwB;AAC1E,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB,qBAAqB;AAErD,MAAM,cAAc,OAAO,cAAc,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,CAAC;AAAA,WACrF,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,eACpC,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG,CAAC;AAAA,iBACvC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAWnD,MAAM,aAAwC,CAAC,EAAE,eAAe,MAAM,MAAM;AACjF,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,YAAY,cAAc,mBAAmB;AAAA,IACvE;AAAA,IACA,eAAe,EAAE,mBAAmB,iBAAiB;AAAA,IACrD;AAAA,EACF,IAAI,WAAW,kBAAkB;AAEjC,QAAM,QAAQ,eAAe,aAAa;AAC1C,QAAM,UAAU,eAAe,GAAG,WAAW,0BAA0B,GAAG,WAAW;AACrF,QAAM,QAAQ,eAAe,qBAAqB;AAElD,QAAM,cAAc,MAAM,UAAU,MAAM,YAAY,UAAU;AAChE,QAAM,wBAAwB,eAAe,KAAK,SAAS;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,uBAAuB;AAAA,MACpC,MAAK;AAAA,MACL,mBAAiB;AAAA,MAChB,GAAG;AAAA,MAEJ;AAAA,4BAAC,yBAAsB,eAAa,uBAAuB,KAAM,GAAG,kBAClE,8BAAC,eAAY,eAAa,uBAAuB,OAAO,IAAI,SAAS,SAAQ,aAAa,GAAG,kBAC1F,iBACH,GACF;AAAA,QACC,MAAM,IAAI,CAAC,KAAK,UAAU;AACzB,gBAAM,YAAY,wBAAwB;AAC1C,gBAAM,uBAAuB,GAAG,YAAY,CAAC,OAAO,UAAU;AAC9D,iBACE;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA;AAAA,cACA,QAAQ,UAAU,KAAK,SAAS;AAAA,cAChC,kBAAkB,cAAc;AAAA,cAChC,iBAAiB,cAAc;AAAA;AAAA,YAL1B,IAAI,MAAM,GAAG,IAAI,KAAK,IAAI,eAAe,WAAW,MAAM,IAAI,KAAK;AAAA,UAM1E;AAAA,QAEJ,CAAC;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,WAAW,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,51 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { DSButtonV3 } from "@elliemae/ds-button-v2";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import { useContext } from "react";
6
+ import { DSAppPickerDataTestIds, DSAppPickerName, DSAppPickerSlots } from "../constants/index.js";
7
+ import { DSAppPickerContext } from "../DSAppPickerCTX.js";
8
+ const StyledButton = styled(DSButtonV3, { name: DSAppPickerName, slot: DSAppPickerSlots.BUTTON })`
9
+ height: fit-content;
10
+ `;
11
+ const Trigger = (PropsFromFloatingContext) => {
12
+ const { handleTriggerRef, handleTriggerClick, dialogLabelId } = PropsFromFloatingContext;
13
+ const {
14
+ propsWithDefault: { icon: Icon, renderTrigger, TriggerComponent },
15
+ ownerPropsConfig
16
+ } = useContext(DSAppPickerContext);
17
+ if (TriggerComponent) {
18
+ return /* @__PURE__ */ jsx(
19
+ TriggerComponent,
20
+ {
21
+ innerRef: handleTriggerRef,
22
+ id: dialogLabelId,
23
+ onClick: handleTriggerClick,
24
+ "aria-haspopup": "dialog"
25
+ }
26
+ );
27
+ }
28
+ if (renderTrigger) {
29
+ return renderTrigger({ ref: handleTriggerRef });
30
+ }
31
+ return /* @__PURE__ */ jsx(
32
+ StyledButton,
33
+ {
34
+ "data-testid": DSAppPickerDataTestIds.BUTTON,
35
+ id: dialogLabelId,
36
+ buttonType: "icon",
37
+ "aria-haspopup": "dialog",
38
+ "aria-label": "Application picker",
39
+ innerRef: handleTriggerRef,
40
+ onClick: handleTriggerClick,
41
+ getOwnerProps: ownerPropsConfig.getOwnerProps,
42
+ getOwnerPropsArguments: ownerPropsConfig.getOwnerPropsArguments,
43
+ children: /* @__PURE__ */ jsx(Icon, {})
44
+ }
45
+ );
46
+ };
47
+ Trigger.displayName = "DSAppPicker.Trigger";
48
+ export {
49
+ Trigger
50
+ };
51
+ //# sourceMappingURL=Trigger.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/Trigger.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { styled } from '@elliemae/ds-system';\nimport React, { useContext } from 'react';\nimport { DSAppPickerDataTestIds, DSAppPickerName, DSAppPickerSlots } from '../constants/index.js';\nimport { DSAppPickerContext } from '../DSAppPickerCTX.js';\nimport type { useAppPickerFloatingContext } from './AppPickerFloatingContext/useAppPickerFloatingContext.js';\n\n// DSButtonV3 sizes itself with `min-height` (height stays `auto`) so multi-line labels can grow.\n// As a side effect, when the trigger is a direct grid/flex child of a consumer layout with the\n// default `align-items: stretch`, it stretches to fill the container height (PUI-18354 regression:\n// the legacy DSButtonV2 trigger used a fixed `height` and did not stretch). `height: fit-content`\n// pins the trigger to its intrinsic size \u2014 mirroring the button's own `width: fit-content` \u2014 so it\n// stays ~28px regardless of layout context.\nconst StyledButton = styled(DSButtonV3, { name: DSAppPickerName, slot: DSAppPickerSlots.BUTTON })`\n height: fit-content;\n`;\n\ntype UseAppPickerFloatingContextT = ReturnType<typeof useAppPickerFloatingContext>;\ntype FloatingContextDictatedProps = {\n handleTriggerRef: UseAppPickerFloatingContextT['handleTriggerRef'];\n handleTriggerClick: UseAppPickerFloatingContextT['handleTriggerClick'];\n dialogLabelId: string;\n};\n\nexport const Trigger = (PropsFromFloatingContext: FloatingContextDictatedProps) => {\n const { handleTriggerRef, handleTriggerClick, dialogLabelId } = PropsFromFloatingContext;\n const {\n propsWithDefault: { icon: Icon, renderTrigger, TriggerComponent },\n ownerPropsConfig,\n } = useContext(DSAppPickerContext);\n\n // Precedence: TriggerComponent > renderTrigger > the built-in button. TriggerComponent wins when\n // both custom APIs are supplied \u2014 it is the one that receives `dialogLabelId`, so preferring\n // renderTrigger here would drop the dialog's accessible name.\n if (TriggerComponent) {\n return (\n <TriggerComponent\n innerRef={handleTriggerRef}\n id={dialogLabelId}\n onClick={handleTriggerClick}\n aria-haspopup=\"dialog\"\n />\n );\n }\n\n if (renderTrigger) {\n // DEPRECATED (v4.x) \u2014 see DEV-002. Plain function call (not a React element) preserves the\n // legacy DSPopover render-prop contract: consumers receive `ref` as a regular prop, no\n // forwardRef required. The contract has no channel for `dialogLabelId`, so on this path naming\n // the dialog is the consumer's: put an id on the trigger element and inject the matching\n // aria-labelledby through the FLOATING_WRAPPER slot (or pass `id` to DSAppPicker, which makes\n // the generated id predictable). Covered by DSAppPicker.renderTrigger-ioc-aria-labelledby.test.js.\n return renderTrigger({ ref: handleTriggerRef });\n }\n return (\n <StyledButton\n data-testid={DSAppPickerDataTestIds.BUTTON}\n id={dialogLabelId}\n buttonType=\"icon\"\n aria-haspopup=\"dialog\"\n aria-label=\"Application picker\"\n innerRef={handleTriggerRef}\n onClick={handleTriggerClick}\n getOwnerProps={ownerPropsConfig.getOwnerProps}\n getOwnerPropsArguments={ownerPropsConfig.getOwnerPropsArguments}\n >\n <Icon />\n </StyledButton>\n );\n};\n\nTrigger.displayName = 'DSAppPicker.Trigger';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoCjB;AApCN,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAgB,kBAAkB;AAClC,SAAS,wBAAwB,iBAAiB,wBAAwB;AAC1E,SAAS,0BAA0B;AASnC,MAAM,eAAe,OAAO,YAAY,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,OAAO,CAAC;AAAA;AAAA;AAWzF,MAAM,UAAU,CAAC,6BAA2D;AACjF,QAAM,EAAE,kBAAkB,oBAAoB,cAAc,IAAI;AAChE,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,MAAM,eAAe,iBAAiB;AAAA,IAChE;AAAA,EACF,IAAI,WAAW,kBAAkB;AAKjC,MAAI,kBAAkB;AACpB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,iBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AAEA,MAAI,eAAe;AAOjB,WAAO,cAAc,EAAE,KAAK,iBAAiB,CAAC;AAAA,EAChD;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,uBAAuB;AAAA,MACpC,IAAI;AAAA,MACJ,YAAW;AAAA,MACX,iBAAc;AAAA,MACd,cAAW;AAAA,MACX,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe,iBAAiB;AAAA,MAChC,wBAAwB,iBAAiB;AAAA,MAEzC,8BAAC,QAAK;AAAA;AAAA,EACR;AAEJ;AAEA,QAAQ,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { styled } from "@elliemae/ds-system";
3
+ import { DSAppPickerName, DSAppPickerSlots } from "../constants/index.js";
4
+ const StyledListItemFullRow = styled("div", { name: DSAppPickerName, slot: DSAppPickerSlots.ROW })`
5
+ grid-column: 1/4;
6
+ `;
7
+ const StyledSection = styled("div", { name: DSAppPickerName, slot: DSAppPickerSlots.GROUP })`
8
+ display: contents;
9
+ `;
10
+ export {
11
+ StyledListItemFullRow,
12
+ StyledSection
13
+ };
14
+ //# sourceMappingURL=shared-styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/shared-styles.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport { styled } from '@elliemae/ds-system';\nimport { DSAppPickerName, DSAppPickerSlots } from '../constants/index.js';\n\nexport const StyledListItemFullRow = styled('div', { name: DSAppPickerName, slot: DSAppPickerSlots.ROW })`\n grid-column: 1/4;\n`;\n\n// The ARIA group that associates a section title with the chips belonging to it (role=\"group\" +\n// aria-labelledby \u2192 the title's id). It must NOT become a grid item: the panel root owns the\n// 3-column track and the title row / chips are its children. `display: contents` keeps this\n// element out of the layout while leaving it in the accessibility tree, so the grid is unchanged.\nexport const StyledSection = styled('div', { name: DSAppPickerName, slot: DSAppPickerSlots.GROUP })`\n display: contents;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,cAAc;AACvB,SAAS,iBAAiB,wBAAwB;AAE3C,MAAM,wBAAwB,OAAO,OAAO,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,IAAI,CAAC;AAAA;AAAA;AAQjG,MAAM,gBAAgB,OAAO,OAAO,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,CAAC;AAAA;AAAA;",
6
+ "names": []
7
+ }