@elliemae/ds-app-picker 3.70.0-next.2 → 3.70.0-next.21

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 (94) hide show
  1. package/dist/cjs/DSAppPicker.js +59 -132
  2. package/dist/cjs/DSAppPicker.js.map +3 -3
  3. package/dist/cjs/{utils.js → DSAppPickerCTX.js} +26 -23
  4. package/dist/cjs/DSAppPickerCTX.js.map +7 -0
  5. package/dist/cjs/config/useAppPicker.js +3 -3
  6. package/dist/cjs/config/useAppPicker.js.map +3 -3
  7. package/dist/cjs/config/useAppPickerBehavior.js +156 -0
  8. package/dist/cjs/config/useAppPickerBehavior.js.map +7 -0
  9. package/dist/cjs/config/useFocusTracker.js +115 -0
  10. package/dist/cjs/config/useFocusTracker.js.map +7 -0
  11. package/dist/cjs/config/useValidateProps.js +45 -0
  12. package/dist/cjs/config/useValidateProps.js.map +7 -0
  13. package/dist/cjs/constants/index.js +8 -1
  14. package/dist/cjs/constants/index.js.map +2 -2
  15. package/dist/cjs/index.js.map +1 -1
  16. package/dist/cjs/parts/AppPanel.js +159 -0
  17. package/dist/cjs/parts/AppPanel.js.map +7 -0
  18. package/dist/cjs/parts/AppPickerItem.js +102 -0
  19. package/dist/cjs/parts/AppPickerItem.js.map +7 -0
  20. package/dist/cjs/parts/AppSection.js +68 -0
  21. package/dist/cjs/parts/AppSection.js.map +7 -0
  22. package/dist/cjs/parts/Trigger.js +62 -0
  23. package/dist/cjs/parts/Trigger.js.map +7 -0
  24. package/dist/cjs/{styles.js → parts/style.js} +21 -9
  25. package/dist/cjs/parts/style.js.map +7 -0
  26. package/dist/cjs/react-desc-prop-types.js +6 -7
  27. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  28. package/dist/cjs/typescript-testing/typescript-app-picker-valid.js +5 -0
  29. package/dist/cjs/typescript-testing/typescript-app-picker-valid.js.map +2 -2
  30. package/dist/esm/DSAppPicker.js +62 -135
  31. package/dist/esm/DSAppPicker.js.map +2 -2
  32. package/dist/esm/DSAppPickerCTX.js +28 -0
  33. package/dist/esm/DSAppPickerCTX.js.map +7 -0
  34. package/dist/esm/config/useAppPicker.js +4 -5
  35. package/dist/esm/config/useAppPicker.js.map +3 -3
  36. package/dist/esm/config/useAppPickerBehavior.js +126 -0
  37. package/dist/esm/config/useAppPickerBehavior.js.map +7 -0
  38. package/dist/esm/config/useFocusTracker.js +85 -0
  39. package/dist/esm/config/useFocusTracker.js.map +7 -0
  40. package/dist/esm/config/useValidateProps.js +15 -0
  41. package/dist/esm/config/useValidateProps.js.map +7 -0
  42. package/dist/esm/constants/index.js +8 -1
  43. package/dist/esm/constants/index.js.map +2 -2
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/parts/AppPanel.js +129 -0
  46. package/dist/esm/parts/AppPanel.js.map +7 -0
  47. package/dist/esm/parts/AppPickerItem.js +72 -0
  48. package/dist/esm/parts/AppPickerItem.js.map +7 -0
  49. package/dist/esm/parts/AppSection.js +38 -0
  50. package/dist/esm/parts/AppSection.js.map +7 -0
  51. package/dist/esm/parts/Trigger.js +32 -0
  52. package/dist/esm/parts/Trigger.js.map +7 -0
  53. package/dist/esm/{styles.js → parts/style.js} +18 -6
  54. package/dist/esm/parts/style.js.map +7 -0
  55. package/dist/esm/react-desc-prop-types.js +12 -8
  56. package/dist/esm/react-desc-prop-types.js.map +2 -2
  57. package/dist/esm/typescript-testing/typescript-app-picker-valid.js +5 -0
  58. package/dist/esm/typescript-testing/typescript-app-picker-valid.js.map +2 -2
  59. package/dist/types/DSAppPicker.d.ts +0 -1
  60. package/dist/types/DSAppPickerCTX.d.ts +17 -0
  61. package/dist/types/config/useAppPicker.d.ts +5 -5
  62. package/dist/types/config/useAppPickerBehavior.d.ts +39 -0
  63. package/dist/types/config/useFocusTracker.d.ts +15 -0
  64. package/dist/types/config/useValidateProps.d.ts +3 -0
  65. package/dist/types/constants/index.d.ts +14 -7
  66. package/dist/types/parts/AppPanel.d.ts +9 -0
  67. package/dist/types/parts/AppPickerItem.d.ts +14 -0
  68. package/dist/types/parts/AppSection.d.ts +17 -0
  69. package/dist/types/parts/Trigger.d.ts +15 -0
  70. package/dist/types/{styles.d.ts → parts/style.d.ts} +3 -4
  71. package/dist/types/react-desc-prop-types.d.ts +21 -8
  72. package/dist/types/tests/app-picker.get-owner-props-arguments-18354.test.d.ts +1 -0
  73. package/dist/types/tests/app-picker.proptype-schema.test.d.ts +1 -0
  74. package/dist/types/tests/app-picker.pui-18354.test.d.ts +1 -0
  75. package/dist/types/tests/playwright/DSAppPicker.slot-contracts-dynamic.test.playwright.d.ts +1 -0
  76. package/dist/types/tests/playwright/DSAppPickerSlotContractRenderer.d.ts +1 -0
  77. package/package.json +16 -14
  78. package/dist/cjs/AppPickerImpl.js +0 -204
  79. package/dist/cjs/AppPickerImpl.js.map +0 -7
  80. package/dist/cjs/hooks/useKeepTrackButtons.js +0 -69
  81. package/dist/cjs/hooks/useKeepTrackButtons.js.map +0 -7
  82. package/dist/cjs/styles.js.map +0 -7
  83. package/dist/cjs/utils.js.map +0 -7
  84. package/dist/esm/AppPickerImpl.js +0 -174
  85. package/dist/esm/AppPickerImpl.js.map +0 -7
  86. package/dist/esm/hooks/useKeepTrackButtons.js +0 -39
  87. package/dist/esm/hooks/useKeepTrackButtons.js.map +0 -7
  88. package/dist/esm/styles.js.map +0 -7
  89. package/dist/esm/utils.js +0 -25
  90. package/dist/esm/utils.js.map +0 -7
  91. package/dist/types/AppPickerImpl.d.ts +0 -11
  92. package/dist/types/hooks/useKeepTrackButtons.d.ts +0 -13
  93. package/dist/types/utils.d.ts +0 -14
  94. /package/dist/types/tests/{app-picker.get-owner-props.test.d.ts → app-picker.api.test.d.ts} +0 -0
@@ -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 React from 'react';\nimport { StyledListItemFullRow, StyledTitle } from './style.js';\nimport { DSAppPickerDataTestIds } from '../constants/index.js';\nimport type { DSAppPickerT } from '../react-desc-prop-types.js';\nimport { AppPickerItem } from './AppPickerItem.js';\n\ninterface AppSectionProps {\n items: DSAppPickerT.AppItem[];\n title: string;\n positionOffset: number;\n totalCount: number;\n ownerProps: { getOwnerProps: () => object };\n onItemClick: (e: React.MouseEvent, app: DSAppPickerT.AppItem) => void;\n keyPrefix?: string;\n firstFocusableIdx: number;\n lastFocusableIdx: number;\n}\n\nexport const AppSection: React.FC<AppSectionProps> = ({\n items,\n title,\n positionOffset,\n totalCount,\n ownerProps,\n onItemClick,\n keyPrefix = '',\n firstFocusableIdx,\n lastFocusableIdx,\n}) => (\n <>\n <StyledListItemFullRow data-testid={DSAppPickerDataTestIds.ROW} aria-hidden role=\"group\" {...ownerProps}>\n <StyledTitle data-testid={DSAppPickerDataTestIds.TITLE} role=\"presentation\" variant=\"h3-strong\" {...ownerProps}>\n {title}\n </StyledTitle>\n </StyledListItemFullRow>\n {items.map((app, index) => {\n const flatIndex = positionOffset + index;\n return (\n <AppPickerItem\n key={app.id ?? `${app.label}-${keyPrefix}${index}`}\n app={app}\n positionLabel={`${title} (${flatIndex + 1} of ${totalCount})`}\n ownerProps={ownerProps}\n onClick={onItemClick}\n isFirstFocusable={flatIndex === firstFocusableIdx}\n isLastFocusable={flatIndex === lastFocusableIdx}\n />\n );\n })}\n </>\n);\n\nAppSection.displayName = 'DSAppPicker.AppSection';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC6BrB,mBAEI,KAFJ;AA5BF,SAAS,uBAAuB,mBAAmB;AACnD,SAAS,8BAA8B;AAEvC,SAAS,qBAAqB;AAcvB,MAAM,aAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MACE,iCACE;AAAA,sBAAC,yBAAsB,eAAa,uBAAuB,KAAK,eAAW,MAAC,MAAK,SAAS,GAAG,YAC3F,8BAAC,eAAY,eAAa,uBAAuB,OAAO,MAAK,gBAAe,SAAQ,aAAa,GAAG,YACjG,iBACH,GACF;AAAA,EACC,MAAM,IAAI,CAAC,KAAK,UAAU;AACzB,UAAM,YAAY,iBAAiB;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QAEC;AAAA,QACA,eAAe,GAAG,KAAK,KAAK,YAAY,CAAC,OAAO,UAAU;AAAA,QAC1D;AAAA,QACA,SAAS;AAAA,QACT,kBAAkB,cAAc;AAAA,QAChC,iBAAiB,cAAc;AAAA;AAAA,MAN1B,IAAI,MAAM,GAAG,IAAI,KAAK,IAAI,SAAS,GAAG,KAAK;AAAA,IAOlD;AAAA,EAEJ,CAAC;AAAA,GACH;AAGF,WAAW,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,32 @@
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 { DSAppPickerName, DSAppPickerSlots, DSAppPickerDataTestIds } from "../constants/index.js";
6
+ const StyledButton = styled(DSButtonV3, { name: DSAppPickerName, slot: DSAppPickerSlots.BUTTON })``;
7
+ const Trigger = ({ Icon, isOpen, setRef, ownerProps, onClick, renderTrigger }) => {
8
+ if (renderTrigger) {
9
+ return renderTrigger({ ref: setRef });
10
+ }
11
+ return /* @__PURE__ */ jsx(
12
+ StyledButton,
13
+ {
14
+ "data-testid": DSAppPickerDataTestIds.BUTTON,
15
+ id: "app-picker__button",
16
+ buttonType: "icon",
17
+ "aria-haspopup": "true",
18
+ "aria-expanded": isOpen,
19
+ "aria-label": "Application picker",
20
+ innerRef: setRef,
21
+ onClick,
22
+ getOwnerProps: ownerProps.getOwnerProps,
23
+ getOwnerPropsArguments: ownerProps.getOwnerPropsArguments,
24
+ children: /* @__PURE__ */ jsx(Icon, {})
25
+ }
26
+ );
27
+ };
28
+ Trigger.displayName = "DSAppPicker.Trigger";
29
+ export {
30
+ Trigger
31
+ };
32
+ //# 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 React from 'react';\nimport { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSAppPickerT } from '../react-desc-prop-types.js';\nimport { DSAppPickerName, DSAppPickerSlots, DSAppPickerDataTestIds } from '../constants/index.js';\n\nconst StyledButton = styled(DSButtonV3, { name: DSAppPickerName, slot: DSAppPickerSlots.BUTTON })``;\n\ninterface TriggerProps {\n Icon: DSAppPickerT.InternalProps['icon'];\n isOpen: boolean;\n setRef: React.RefCallback<HTMLButtonElement>;\n ownerProps: { getOwnerProps: () => object; getOwnerPropsArguments: () => object };\n onClick: (e: React.MouseEvent | React.KeyboardEvent) => void;\n renderTrigger?: DSAppPickerT.OptionalProps['renderTrigger'];\n}\n\nexport const Trigger: React.FC<TriggerProps> = ({ Icon, isOpen, setRef, ownerProps, onClick, renderTrigger }) => {\n if (renderTrigger) {\n // Plain function call (not React element) preserves the legacy DSPopover render-prop contract:\n // consumers receive `ref` as a regular prop, no forwardRef required.\n return renderTrigger({ ref: setRef });\n }\n return (\n <StyledButton\n data-testid={DSAppPickerDataTestIds.BUTTON}\n id=\"app-picker__button\"\n buttonType=\"icon\"\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n aria-label=\"Application picker\"\n innerRef={setRef}\n onClick={onClick}\n getOwnerProps={ownerProps.getOwnerProps}\n getOwnerPropsArguments={ownerProps.getOwnerPropsArguments}\n >\n <Icon />\n </StyledButton>\n );\n};\n\nTrigger.displayName = 'DSAppPicker.Trigger';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoCjB;AAnCN,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEvB,SAAS,iBAAiB,kBAAkB,8BAA8B;AAE1E,MAAM,eAAe,OAAO,YAAY,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,OAAO,CAAC;AAWzF,MAAM,UAAkC,CAAC,EAAE,MAAM,QAAQ,QAAQ,YAAY,SAAS,cAAc,MAAM;AAC/G,MAAI,eAAe;AAGjB,WAAO,cAAc,EAAE,KAAK,OAAO,CAAC;AAAA,EACtC;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,uBAAuB;AAAA,MACpC,IAAG;AAAA,MACH,YAAW;AAAA,MACX,iBAAc;AAAA,MACd,iBAAe;AAAA,MACf,cAAW;AAAA,MACX,UAAU;AAAA,MACV;AAAA,MACA,eAAe,WAAW;AAAA,MAC1B,wBAAwB,WAAW;AAAA,MAEnC,8BAAC,QAAK;AAAA;AAAA,EACR;AAEJ;AAEA,QAAQ,cAAc;",
6
+ "names": []
7
+ }
@@ -1,16 +1,26 @@
1
1
  import * as React from "react";
2
2
  import { styled } from "@elliemae/ds-system";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
- import { DSAppPickerName, DSAppPickerSlots } from "./constants/index.js";
4
+ import { DSTypography } from "@elliemae/ds-typography";
5
+ import { FloatingWrapper } from "@elliemae/ds-floating-context";
6
+ import { DSAppPickerName, DSAppPickerSlots } from "../constants/index.js";
7
+ const StyledAppPickerFloating = styled(FloatingWrapper, {
8
+ name: DSAppPickerName,
9
+ slot: DSAppPickerSlots.FLOATING_WRAPPER
10
+ })``;
5
11
  const StyledWrapper = styled(Grid, { name: DSAppPickerName, slot: DSAppPickerSlots.ROOT })`
12
+ background-color: ${({ theme }) => theme.colors.neutral["000"]};
6
13
  min-width: 308px;
7
14
  min-height: 110px;
8
15
  max-height: 449px;
9
16
  width: 308px;
10
17
  overflow-y: auto;
11
18
  overflow-x: hidden;
19
+ /* Baseline 2024: reserve scrollbar gutter so the layout doesn't shift between overflow/no-overflow.
20
+ Replaces a JS isOverflow detection effect that toggled right padding. */
21
+ scrollbar-gutter: stable;
12
22
  margin: 0;
13
- padding: ${({ isOverflow }) => isOverflow ? "0 0 8px 16px" : "0 16px 8px 16px"};
23
+ padding: 0 0 8px 16px;
14
24
  &:focus {
15
25
  outline: none;
16
26
  }
@@ -22,25 +32,27 @@ const StyledListItemFullRow = styled("li", { name: DSAppPickerName, slot: DSAppP
22
32
  list-style: none;
23
33
  grid-column: 1/4;
24
34
  `;
25
- const StyledTitle = styled("h3", { name: DSAppPickerName, slot: DSAppPickerSlots.TITLE })`
35
+ const StyledTitle = styled(DSTypography, { name: DSAppPickerName, slot: DSAppPickerSlots.TITLE })`
26
36
  color: ${({ theme }) => theme.colors.neutral[700]};
27
37
  font-size: ${({ theme }) => theme.fontSizes.value[400]};
28
38
  font-weight: ${({ theme }) => theme.fontWeights.semibold};
29
39
  margin: 12px 0 8px 0;
30
40
  line-height: 1.385;
31
41
  text-transform: uppercase;
42
+ text-align: center;
32
43
  `;
33
44
  const StyledSeparator = styled("hr", { name: DSAppPickerName, slot: DSAppPickerSlots.SEPARATOR })`
34
- border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
45
+ border-top: 1px solid ${({ theme }) => theme.colors.neutral[300]};
35
46
  border-bottom: none;
36
- width: 99%;
47
+ width: 100%;
37
48
  margin: 8px 0 0 0;
38
49
  `;
39
50
  export {
51
+ StyledAppPickerFloating,
40
52
  StyledListItem,
41
53
  StyledListItemFullRow,
42
54
  StyledSeparator,
43
55
  StyledTitle,
44
56
  StyledWrapper
45
57
  };
46
- //# sourceMappingURL=styles.js.map
58
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/style.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 { Grid } from '@elliemae/ds-grid';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { DSAppPickerName, DSAppPickerSlots } from '../constants/index.js';\n\nexport const StyledAppPickerFloating = styled(FloatingWrapper, {\n name: DSAppPickerName,\n slot: DSAppPickerSlots.FLOATING_WRAPPER,\n})``;\n\nexport const 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\nexport const StyledListItem = styled('li', { name: DSAppPickerName, slot: DSAppPickerSlots.ITEM })`\n list-style: none;\n`;\n\nexport const StyledListItemFullRow = styled('li', { name: DSAppPickerName, slot: DSAppPickerSlots.ROW })`\n list-style: none;\n grid-column: 1/4;\n`;\n\nexport const 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\nexport const 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"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB,wBAAwB;AAE3C,MAAM,0BAA0B,OAAO,iBAAiB;AAAA,EAC7D,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAEM,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,KAAK,CAAC;AAAA,sBAC1E,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBzD,MAAM,iBAAiB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,KAAK,CAAC;AAAA;AAAA;AAI1F,MAAM,wBAAwB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,IAAI,CAAC;AAAA;AAAA;AAAA;AAKhG,MAAM,cAAc,OAAO,cAAc,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,CAAC;AAAA,WAC5F,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;AAOnD,MAAM,kBAAkB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,UAAU,CAAC;AAAA,0BAC7E,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,10 +1,14 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { MenuPicker } from "@elliemae/ds-icons";
4
- import { PropTypes, getPropsPerSlotPropTypes } from "@elliemae/ds-props-helpers";
4
+ import {
5
+ PropTypes,
6
+ getPropsPerSlotPropTypes,
7
+ globalAttributesPropTypes,
8
+ xstyledPropTypes
9
+ } from "@elliemae/ds-props-helpers";
5
10
  import { DSAppPickerName, DSAppPickerSlots } from "./constants/index.js";
6
11
  const defaultProps = {
7
- // export const defaultProps: DSAppPickerT.DefaultProps = {
8
12
  apps: [],
9
13
  customApps: [],
10
14
  sectionTitle: "APPLICATIONS",
@@ -13,12 +17,10 @@ const defaultProps = {
13
17
  };
14
18
  const DSAppPickerPropTypes = {
15
19
  ...getPropsPerSlotPropTypes(DSAppPickerName, DSAppPickerSlots),
16
- apps: PropTypes.array.description(
17
- "Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]"
18
- ).isRequired,
19
- customApps: PropTypes.array.description(
20
- "Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]"
21
- ),
20
+ ...globalAttributesPropTypes,
21
+ ...xstyledPropTypes,
22
+ apps: PropTypes.array.description("Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]").defaultValue([]),
23
+ customApps: PropTypes.array.description("Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]").defaultValue([]),
22
24
  sectionTitle: PropTypes.string.description("main section title").defaultValue("APPLICATIONS"),
23
25
  customSectionTitle: PropTypes.string.description("custom section title").defaultValue("CUSTOM APPLICATIONS"),
24
26
  icon: PropTypes.func.description("trigger button s icon").defaultValue(MenuPicker),
@@ -35,8 +37,10 @@ const DSAppPickerPropTypes = {
35
37
  "Ref to the trigger button."
36
38
  )
37
39
  };
40
+ const DSAppPickerPropTypesSchema = DSAppPickerPropTypes;
38
41
  export {
39
42
  DSAppPickerPropTypes,
43
+ DSAppPickerPropTypesSchema,
40
44
  defaultProps
41
45
  };
42
46
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSAppPickerName, DSAppPickerSlots } from './constants/index.js';\n\nexport declare namespace DSAppPickerT {\n export interface AppItem {\n label: string;\n icon: React.ComponentType<{ className: string; size: string }>;\n onClick?: (e: React.MouseEvent, item: AppItem) => void | null;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n id?: string;\n selected?: boolean;\n wrapText?: boolean;\n }\n\n export type ActionRef = React.MutableRefObject<{\n focusToIndex?: (index: number) => void;\n focusSelectedOrFirstAvailable?: () => void;\n focusWrapper: () => void;\n }>;\n\n export interface DefaultProps {\n apps: AppItem[];\n customApps: AppItem[];\n sectionTitle: string;\n customSectionTitle: string;\n icon: React.ComponentType<SvgIconT.Props>;\n }\n\n interface RenderTriggerProp {\n ref: React.MutableRefObject<HTMLButtonElement>;\n [key: string]: unknown;\n }\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSAppPickerName, typeof DSAppPickerSlots> {\n onClose?: () => void;\n onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;\n onClickOutside?: (e: React.MouseEvent) => void;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n actionRef?: ActionRef;\n renderTrigger?: React.ComponentType<RenderTriggerProp>;\n isOpen?: boolean;\n triggerRef?: React.RefObject<HTMLButtonElement>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps {}\n}\n\nexport const defaultProps: Omit<DSAppPickerT.DefaultProps, `dsAppPicker${Capitalize<string>}`> = {\n // export const defaultProps: DSAppPickerT.DefaultProps = {\n apps: [],\n customApps: [],\n sectionTitle: 'APPLICATIONS',\n customSectionTitle: 'CUSTOM APPLICATIONS',\n icon: () => <MenuPicker color={['brand-primary', '700']} size=\"m\" />,\n};\n\n// =============================================================================\n// PropTypes\n// =============================================================================\n\nexport const DSAppPickerPropTypes = {\n ...getPropsPerSlotPropTypes(DSAppPickerName, DSAppPickerSlots),\n apps: PropTypes.array.description(\n 'Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]',\n ).isRequired,\n customApps: PropTypes.array.description(\n 'Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]',\n ),\n sectionTitle: PropTypes.string.description('main section title').defaultValue('APPLICATIONS'),\n customSectionTitle: PropTypes.string.description('custom section title').defaultValue('CUSTOM APPLICATIONS'),\n icon: PropTypes.func.description('trigger button s icon').defaultValue(MenuPicker),\n renderTrigger: PropTypes.func.description('Custom trigger component.'),\n actionRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker.',\n ),\n isOpen: PropTypes.bool.description('Wether the AppPicker should be open or not.'),\n onClose: PropTypes.func.description('Callback function when the AppPicker closes'),\n onKeyDown: PropTypes.func.description('OnKeyDown handler callback.'),\n onClick: PropTypes.func.description('Custom onClick for Trigger component.'),\n onClickOutside: PropTypes.func.description('Callback event when the user clicks outside the App Picker.'),\n triggerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Ref to the trigger button.',\n ),\n} as ValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACqET;AApEd,SAAS,kBAAkB;AAG3B,SAAS,WAAW,gCAAgC;AAEpD,SAAS,iBAAiB,wBAAwB;AAyD3C,MAAM,eAAoF;AAAA;AAAA,EAE/F,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM,oBAAC,cAAW,OAAO,CAAC,iBAAiB,KAAK,GAAG,MAAK,KAAI;AACpE;AAMO,MAAM,uBAAuB;AAAA,EAClC,GAAG,yBAAyB,iBAAiB,gBAAgB;AAAA,EAC7D,MAAM,UAAU,MAAM;AAAA,IACpB;AAAA,EACF,EAAE;AAAA,EACF,YAAY,UAAU,MAAM;AAAA,IAC1B;AAAA,EACF;AAAA,EACA,cAAc,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,cAAc;AAAA,EAC5F,oBAAoB,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,qBAAqB;AAAA,EAC3G,MAAM,UAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,UAAU;AAAA,EACjF,eAAe,UAAU,KAAK,YAAY,2BAA2B;AAAA,EACrE,WAAW,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC5F;AAAA,EACF;AAAA,EACA,QAAQ,UAAU,KAAK,YAAY,6CAA6C;AAAA,EAChF,SAAS,UAAU,KAAK,YAAY,6CAA6C;AAAA,EACjF,WAAW,UAAU,KAAK,YAAY,6BAA6B;AAAA,EACnE,SAAS,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAC3E,gBAAgB,UAAU,KAAK,YAAY,6DAA6D;AAAA,EACxG,YAAY,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC7F;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport React from 'react';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSAppPickerName, DSAppPickerSlots } from './constants/index.js';\n\nexport declare namespace DSAppPickerT {\n export interface AppItem {\n label: string;\n icon: React.ComponentType<{ className: string; size: string }>;\n onClick?: (e: React.MouseEvent, item: AppItem) => void | null;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n id?: string;\n selected?: boolean;\n wrapText?: boolean;\n }\n\n export type ActionRef = React.MutableRefObject<{\n focusToIndex?: (index: number) => void;\n focusSelectedOrFirstAvailable?: () => void;\n focusWrapper: () => void;\n }>;\n\n export interface RequiredProps {}\n\n export type SlotFunctionArguments = {\n dsApppickerRoot: () => object;\n dsApppickerItem: () => object;\n dsApppickerTitle: () => object;\n dsApppickerSeparator: () => object;\n dsApppickerRow: () => object;\n dsApppickerChip: () => object;\n dsApppickerButton: () => object;\n dsApppickerFloatingWrapper: () => object;\n };\n\n export interface DefaultProps {\n apps: AppItem[];\n customApps: AppItem[];\n sectionTitle: string;\n customSectionTitle: string;\n icon: React.ComponentType<SvgIconT.Props>;\n }\n\n interface RenderTriggerProp {\n ref: React.RefCallback<HTMLButtonElement>;\n [key: string]: unknown;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSAppPickerName, typeof DSAppPickerSlots> {\n onClose?: () => void;\n onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;\n onClickOutside?: (e: MouseEvent | React.MouseEvent) => void;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n actionRef?: ActionRef;\n renderTrigger?: (props: RenderTriggerProp) => React.ReactElement | null;\n isOpen?: boolean;\n triggerRef?: React.RefObject<HTMLButtonElement>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSAppPickerT.DefaultProps = {\n apps: [],\n customApps: [],\n sectionTitle: 'APPLICATIONS',\n customSectionTitle: 'CUSTOM APPLICATIONS',\n icon: () => <MenuPicker color={['brand-primary', '700']} size=\"m\" />,\n};\n\n// =============================================================================\n// PropTypes\n// =============================================================================\n\nexport const DSAppPickerPropTypes: DSPropTypesSchema<DSAppPickerT.Props> = {\n ...getPropsPerSlotPropTypes(DSAppPickerName, DSAppPickerSlots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n apps: PropTypes.array\n .description('Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]')\n .defaultValue([]),\n customApps: PropTypes.array\n .description('Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]')\n .defaultValue([]),\n sectionTitle: PropTypes.string.description('main section title').defaultValue('APPLICATIONS'),\n customSectionTitle: PropTypes.string.description('custom section title').defaultValue('CUSTOM APPLICATIONS'),\n icon: PropTypes.func.description('trigger button s icon').defaultValue(MenuPicker),\n renderTrigger: PropTypes.func.description('Custom trigger component.'),\n actionRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker.',\n ),\n isOpen: PropTypes.bool.description('Wether the AppPicker should be open or not.'),\n onClose: PropTypes.func.description('Callback function when the AppPicker closes'),\n onKeyDown: PropTypes.func.description('OnKeyDown handler callback.'),\n onClick: PropTypes.func.description('Custom onClick for Trigger component.'),\n onClickOutside: PropTypes.func.description('Callback event when the user clicks outside the App Picker.'),\n triggerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Ref to the trigger button.',\n ),\n};\n\nexport const DSAppPickerPropTypesSchema = DSAppPickerPropTypes as unknown as ValidationMap<DSAppPickerT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0FT;AAxFd,SAAS,kBAAkB;AAG3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB,wBAAwB;AAyE3C,MAAM,eAA0C;AAAA,EACrD,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM,oBAAC,cAAW,OAAO,CAAC,iBAAiB,KAAK,GAAG,MAAK,KAAI;AACpE;AAMO,MAAM,uBAA8D;AAAA,EACzE,GAAG,yBAAyB,iBAAiB,gBAAgB;AAAA,EAC7D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,MACb,YAAY,oGAAoG,EAChH,aAAa,CAAC,CAAC;AAAA,EAClB,YAAY,UAAU,MACnB,YAAY,sGAAsG,EAClH,aAAa,CAAC,CAAC;AAAA,EAClB,cAAc,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,cAAc;AAAA,EAC5F,oBAAoB,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,qBAAqB;AAAA,EAC3G,MAAM,UAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,UAAU;AAAA,EACjF,eAAe,UAAU,KAAK,YAAY,2BAA2B;AAAA,EACrE,WAAW,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC5F;AAAA,EACF;AAAA,EACA,QAAQ,UAAU,KAAK,YAAY,6CAA6C;AAAA,EAChF,SAAS,UAAU,KAAK,YAAY,6CAA6C;AAAA,EACjF,WAAW,UAAU,KAAK,YAAY,6BAA6B;AAAA,EACnE,SAAS,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAC3E,gBAAgB,UAAU,KAAK,YAAY,6DAA6D;AAAA,EACxG,YAAY,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC7F;AAAA,EACF;AACF;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { DSAppPicker } from "../index.js";
4
4
  const testOptionalProps = {};
5
+ const testRequiredProps = {};
5
6
  const testPartialDefaults = {
6
7
  apps: [],
7
8
  customApps: [],
@@ -11,10 +12,12 @@ const testPartialDefaults = {
11
12
  };
12
13
  const testProps = {
13
14
  ...testOptionalProps,
15
+ ...testRequiredProps,
14
16
  ...testPartialDefaults
15
17
  };
16
18
  const testPropsAsSyntax = {
17
19
  ...testOptionalProps,
20
+ ...testRequiredProps,
18
21
  ...testPartialDefaults
19
22
  };
20
23
  const testCompleteDefaults = {
@@ -26,10 +29,12 @@ const testCompleteDefaults = {
26
29
  };
27
30
  const testInternalProps = {
28
31
  ...testOptionalProps,
32
+ ...testRequiredProps,
29
33
  ...testCompleteDefaults
30
34
  };
31
35
  const testInternalPropsAsSyntax = {
32
36
  ...testOptionalProps,
37
+ ...testRequiredProps,
33
38
  ...testCompleteDefaults
34
39
  };
35
40
  const testExplicitDefinition = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-app-picker-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSAppPicker } from '../index.js';\nimport type { DSAppPickerT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSAppPickerT.Props;\ntype ComponentPropsInternals = DSAppPickerT.InternalProps;\ntype ComponentPropsDefaultProps = DSAppPickerT.DefaultProps;\ntype ComponentPropsOptionalProps = DSAppPickerT.OptionalProps;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n} as ComponentPropsForApp;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSAppPicker {...testExplicitDefinition} />\n <DSAppPicker {...testInferedTypeCompatibility} />\n {/* works with inline values */}\n <DSAppPicker apps={[]} customApps={[]} sectionTitle=\"\" customSectionTitle=\"\" icon={() => null} />\n {/* multiple auto inference works */}\n <DSAppPicker apps={[]} customApps={[]} sectionTitle=\"\" customSectionTitle=\"\" icon={() => null} />\n {/* works with partial defaults */}\n </>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmErB,mBAEE,KAFF;AAlEF,SAAS,mBAAmB;AAS5B,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D;AAAA,EAC/D,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,uBAA6D;AAAA,EACjE,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,eAAa,GAAG,wBAAwB;AAAA,EACzC,oBAAC,eAAa,GAAG,8BAA8B;AAAA,EAE/C,oBAAC,eAAY,MAAM,CAAC,GAAG,YAAY,CAAC,GAAG,cAAa,IAAG,oBAAmB,IAAG,MAAM,MAAM,MAAM;AAAA,EAE/F,oBAAC,eAAY,MAAM,CAAC,GAAG,YAAY,CAAC,GAAG,cAAa,IAAG,oBAAmB,IAAG,MAAM,MAAM,MAAM;AAAA,GAEjG;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSAppPicker } from '../index.js';\nimport type { DSAppPickerT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSAppPickerT.Props;\ntype ComponentPropsInternals = DSAppPickerT.InternalProps;\ntype ComponentPropsDefaultProps = DSAppPickerT.DefaultProps;\ntype ComponentPropsOptionalProps = DSAppPickerT.OptionalProps;\ntype ComponentPropsRequiredProps = DSAppPickerT.RequiredProps;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testRequiredProps,\n ...testPartialDefaults,\n};\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testRequiredProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testRequiredProps,\n ...testCompleteDefaults,\n};\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testRequiredProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n apps: [],\n customApps: [],\n sectionTitle: '',\n customSectionTitle: '',\n icon: () => null,\n} as ComponentPropsForApp;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSAppPicker {...testExplicitDefinition} />\n <DSAppPicker {...testInferedTypeCompatibility} />\n {/* works with inline values */}\n <DSAppPicker apps={[]} customApps={[]} sectionTitle=\"\" customSectionTitle=\"\" icon={() => null} />\n {/* multiple auto inference works */}\n <DSAppPicker apps={[]} customApps={[]} sectionTitle=\"\" customSectionTitle=\"\" icon={() => null} />\n {/* works with partial defaults */}\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACyErB,mBAEE,KAFF;AAxEF,SAAS,mBAAmB;AAU5B,MAAM,oBAAiD,CAAC;AACxD,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D;AAAA,EAC/D,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,uBAA6D;AAAA,EACjE,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM,CAAC;AAAA,EACP,YAAY,CAAC;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,MAAM,MAAM;AACd;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,eAAa,GAAG,wBAAwB;AAAA,EACzC,oBAAC,eAAa,GAAG,8BAA8B;AAAA,EAE/C,oBAAC,eAAY,MAAM,CAAC,GAAG,YAAY,CAAC,GAAG,cAAa,IAAG,oBAAmB,IAAG,MAAM,MAAM,MAAM;AAAA,EAE/F,oBAAC,eAAY,MAAM,CAAC,GAAG,YAAY,CAAC,GAAG,cAAa,IAAG,oBAAmB,IAAG,MAAM,MAAM,MAAM;AAAA,GAEjG;",
6
6
  "names": []
7
7
  }
@@ -3,4 +3,3 @@ import type { DSAppPickerT } from './react-desc-prop-types.js';
3
3
  declare const DSAppPicker: React.ComponentType<DSAppPickerT.Props>;
4
4
  declare const AppPickerWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSAppPickerT.Props>;
5
5
  export { DSAppPicker, AppPickerWithSchema };
6
- export default DSAppPicker;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { useFocusTracker } from './config/useFocusTracker.js';
3
+ export type AppPickerFocusCTX = ReturnType<typeof useFocusTracker>;
4
+ /** Focus tracker context for chip-level focus management inside DSAppPicker. */
5
+ export declare const DSAppPickerContext: React.Context<{
6
+ focusRegion: string;
7
+ firstFocusableRef: React.MutableRefObject<HTMLElement | null>;
8
+ lastFocusableRef: React.MutableRefObject<HTMLElement | null>;
9
+ registerChip: (app: import("./react-desc-prop-types.js").DSAppPickerT.AppItem, chipId: string) => void;
10
+ trackFocusChip: (chipId: string) => void;
11
+ trackFocusRegionReset: () => void;
12
+ trackFocusTrigger: () => void;
13
+ trackFocusPanel: () => void;
14
+ trackFocusSelectedItem: (apps: import("./react-desc-prop-types.js").DSAppPickerT.AppItem[], customApps: import("./react-desc-prop-types.js").DSAppPickerT.AppItem[]) => void;
15
+ trackFocusFirstItem: (apps: import("./react-desc-prop-types.js").DSAppPickerT.AppItem[], customApps: import("./react-desc-prop-types.js").DSAppPickerT.AppItem[]) => void;
16
+ trackFocusItemAtIndex: (apps: import("./react-desc-prop-types.js").DSAppPickerT.AppItem[], customApps: import("./react-desc-prop-types.js").DSAppPickerT.AppItem[], index: number) => void;
17
+ }>;
@@ -6,7 +6,8 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
6
6
  getOwnerProps: () => DSAppPickerT.InternalProps;
7
7
  getOwnerPropsArguments: () => {};
8
8
  };
9
- globalAttributes: Partial<Pick<object, "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "type" | "name" | "suppressHydrationWarning" | "className" | "color" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "width" | "role" | "tabIndex" | "crossOrigin" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classID" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "download" | "hrefLang" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "dateTime" | "open" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "sizes" | "srcSet" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "placeholder" | "readOnly" | "required" | "size" | "step" | "htmlFor" | "integrity" | "charSet" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "start" | "selected" | "async" | "defer" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "wrap" | "default" | "kind" | "srcLang" | "poster" | "challenge" | "keyType" | "keyParams"> & Omit<{
9
+ globalAttributes: Partial<Pick<object, "title" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "type" | "name" | "suppressHydrationWarning" | "className" | "color" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "width" | "role" | "tabIndex" | "crossOrigin" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classID" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "download" | "hrefLang" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "dateTime" | "open" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "sizes" | "srcSet" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "placeholder" | "readOnly" | "required" | "size" | "step" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "integrity" | "charSet" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "start" | "selected" | "async" | "defer" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "wrap" | "default" | "kind" | "srcLang" | "poster"> & Omit<{
10
+ title?: string | undefined | undefined;
10
11
  cite?: string | undefined | undefined;
11
12
  data?: string | undefined | undefined;
12
13
  form?: string | undefined | undefined;
@@ -15,7 +16,6 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
15
16
  span?: number | undefined | undefined;
16
17
  style?: React.CSSProperties | undefined;
17
18
  summary?: string | undefined | undefined;
18
- title?: string | undefined | undefined;
19
19
  pattern?: string | undefined | undefined;
20
20
  type?: string | undefined | undefined;
21
21
  name?: string | undefined | undefined;
@@ -342,6 +342,9 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
342
342
  required?: boolean | undefined | undefined;
343
343
  size?: number | undefined | undefined;
344
344
  step?: number | string | undefined | undefined;
345
+ challenge?: string | undefined | undefined;
346
+ keyType?: string | undefined | undefined;
347
+ keyParams?: string | undefined | undefined;
345
348
  htmlFor?: string | undefined | undefined;
346
349
  integrity?: string | undefined | undefined;
347
350
  charSet?: string | undefined | undefined;
@@ -368,9 +371,6 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
368
371
  kind?: string | undefined | undefined;
369
372
  srcLang?: string | undefined | undefined;
370
373
  poster?: string | undefined | undefined;
371
- challenge?: string | undefined | undefined;
372
- keyType?: string | undefined | undefined;
373
- keyParams?: string | undefined | undefined;
374
374
  }, never>>;
375
375
  xstyledProps: import("@elliemae/ds-props-helpers").XstyledProps;
376
376
  };
@@ -0,0 +1,39 @@
1
+ import type React from 'react';
2
+ import type { useAppPicker } from './useAppPicker.js';
3
+ export declare const useAppPickerBehavior: (appPickerConfig: ReturnType<typeof useAppPicker>) => {
4
+ Icon: React.ComponentType<import("@elliemae/ds-icons").SvgIconT.Props>;
5
+ renderTrigger: ((props: import("../react-desc-prop-types.js").DSAppPickerT.RenderTriggerProp) => React.ReactElement | null) | undefined;
6
+ resolvedIsOpen: boolean;
7
+ floatingStyles: React.CSSProperties;
8
+ arrowStyles: import("@elliemae/ds-floating-context/dist/types/parts/PopoverArrow.js").PopoverArrowT;
9
+ floatingContext: {
10
+ withoutPortal: boolean;
11
+ withoutAnimation: boolean;
12
+ portalDOMContainer: HTMLElement | undefined;
13
+ animationDuration: number;
14
+ };
15
+ ownerPropsConfig: {
16
+ getOwnerProps: () => import("../react-desc-prop-types.js").DSAppPickerT.InternalProps;
17
+ getOwnerPropsArguments: () => {};
18
+ };
19
+ defaultTriggerRef: React.RefObject<HTMLButtonElement>;
20
+ triggerRef: React.RefObject<HTMLButtonElement> | undefined;
21
+ wasOpenedByKeyboardRef: React.MutableRefObject<boolean>;
22
+ handleClose: () => void;
23
+ handleTriggerRef: (instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES];
24
+ handleTriggerClick: (e: React.MouseEvent | React.KeyboardEvent) => void;
25
+ floatingInnerRef: (instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES];
26
+ focusTracker: {
27
+ focusRegion: string;
28
+ firstFocusableRef: React.MutableRefObject<HTMLElement | null>;
29
+ lastFocusableRef: React.MutableRefObject<HTMLElement | null>;
30
+ registerChip: (app: import("../react-desc-prop-types.js").DSAppPickerT.AppItem, chipId: string) => void;
31
+ trackFocusChip: (chipId: string) => void;
32
+ trackFocusRegionReset: () => void;
33
+ trackFocusTrigger: () => void;
34
+ trackFocusPanel: () => void;
35
+ trackFocusSelectedItem: (apps: import("../react-desc-prop-types.js").DSAppPickerT.AppItem[], customApps: import("../react-desc-prop-types.js").DSAppPickerT.AppItem[]) => void;
36
+ trackFocusFirstItem: (apps: import("../react-desc-prop-types.js").DSAppPickerT.AppItem[], customApps: import("../react-desc-prop-types.js").DSAppPickerT.AppItem[]) => void;
37
+ trackFocusItemAtIndex: (apps: import("../react-desc-prop-types.js").DSAppPickerT.AppItem[], customApps: import("../react-desc-prop-types.js").DSAppPickerT.AppItem[], index: number) => void;
38
+ };
39
+ };
@@ -0,0 +1,15 @@
1
+ import type { DSAppPickerT } from '../react-desc-prop-types.js';
2
+ export declare const getChipRegionId: (chipId: string) => string;
3
+ export declare const useFocusTracker: () => {
4
+ focusRegion: string;
5
+ firstFocusableRef: import("react").MutableRefObject<HTMLElement | null>;
6
+ lastFocusableRef: import("react").MutableRefObject<HTMLElement | null>;
7
+ registerChip: (app: DSAppPickerT.AppItem, chipId: string) => void;
8
+ trackFocusChip: (chipId: string) => void;
9
+ trackFocusRegionReset: () => void;
10
+ trackFocusTrigger: () => void;
11
+ trackFocusPanel: () => void;
12
+ trackFocusSelectedItem: (apps: DSAppPickerT.AppItem[], customApps: DSAppPickerT.AppItem[]) => void;
13
+ trackFocusFirstItem: (apps: DSAppPickerT.AppItem[], customApps: DSAppPickerT.AppItem[]) => void;
14
+ trackFocusItemAtIndex: (apps: DSAppPickerT.AppItem[], customApps: DSAppPickerT.AppItem[], index: number) => void;
15
+ };
@@ -0,0 +1,3 @@
1
+ import type { ValidationMap } from '@elliemae/ds-props-helpers';
2
+ import { type DSAppPickerT } from '../react-desc-prop-types.js';
3
+ export declare const useValidateProps: (props: DSAppPickerT.InternalProps, propTypes: ValidationMap<unknown>) => void;
@@ -1,12 +1,18 @@
1
1
  export declare const DSAppPickerName = "DSApppicker";
2
+ export declare const APP_PICKER_REGION_FOCUSES: {
3
+ readonly RESET: "";
4
+ readonly TRIGGER: "trigger";
5
+ readonly PANEL: "panel";
6
+ };
2
7
  export declare const DSAppPickerSlots: {
3
- ROOT: string;
4
- ITEM: string;
5
- TITLE: string;
6
- SEPARATOR: string;
7
- ROW: string;
8
- CHIP: string;
9
- BUTTON: string;
8
+ readonly ROOT: "root";
9
+ readonly ITEM: "item";
10
+ readonly TITLE: "title";
11
+ readonly SEPARATOR: "separator";
12
+ readonly ROW: "row";
13
+ readonly CHIP: "chip";
14
+ readonly BUTTON: "button";
15
+ readonly FLOATING_WRAPPER: "floating-wrapper";
10
16
  };
11
17
  export declare const DSAppPickerDataTestIds: {
12
18
  CHIP: string;
@@ -16,4 +22,5 @@ export declare const DSAppPickerDataTestIds: {
16
22
  TITLE: string;
17
23
  SEPARATOR: string;
18
24
  ROW: string;
25
+ FLOATING_WRAPPER: string;
19
26
  };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { DSAppPickerT } from '../react-desc-prop-types.js';
3
+ import type { useAppPicker } from '../config/useAppPicker.js';
4
+ export declare const AppPanel: React.MemoExoticComponent<(props: DSAppPickerT.InternalProps & Pick<ReturnType<typeof useAppPicker>, "ownerPropsConfig" | "globalAttributes" | "xstyledProps"> & {
5
+ close: () => void;
6
+ wasOpenedByKeyboardRef: React.MutableRefObject<boolean>;
7
+ triggerIsInternal: boolean;
8
+ triggerRef: React.RefObject<HTMLButtonElement>;
9
+ }) => import("react/jsx-runtime.js").JSX.Element>;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { DSAppPickerT } from '../react-desc-prop-types.js';
3
+ interface AppPickerItemProps {
4
+ app: DSAppPickerT.AppItem;
5
+ positionLabel: string;
6
+ ownerProps: {
7
+ getOwnerProps: () => object;
8
+ };
9
+ onClick: (e: React.MouseEvent, app: DSAppPickerT.AppItem) => void;
10
+ isFirstFocusable: boolean;
11
+ isLastFocusable: boolean;
12
+ }
13
+ export declare const AppPickerItem: React.FC<AppPickerItemProps>;
14
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { DSAppPickerT } from '../react-desc-prop-types.js';
3
+ interface AppSectionProps {
4
+ items: DSAppPickerT.AppItem[];
5
+ title: string;
6
+ positionOffset: number;
7
+ totalCount: number;
8
+ ownerProps: {
9
+ getOwnerProps: () => object;
10
+ };
11
+ onItemClick: (e: React.MouseEvent, app: DSAppPickerT.AppItem) => void;
12
+ keyPrefix?: string;
13
+ firstFocusableIdx: number;
14
+ lastFocusableIdx: number;
15
+ }
16
+ export declare const AppSection: React.FC<AppSectionProps>;
17
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { DSAppPickerT } from '../react-desc-prop-types.js';
3
+ interface TriggerProps {
4
+ Icon: DSAppPickerT.InternalProps['icon'];
5
+ isOpen: boolean;
6
+ setRef: React.RefCallback<HTMLButtonElement>;
7
+ ownerProps: {
8
+ getOwnerProps: () => object;
9
+ getOwnerPropsArguments: () => object;
10
+ };
11
+ onClick: (e: React.MouseEvent | React.KeyboardEvent) => void;
12
+ renderTrigger?: DSAppPickerT.OptionalProps['renderTrigger'];
13
+ }
14
+ export declare const Trigger: React.FC<TriggerProps>;
15
+ export {};
@@ -1,7 +1,6 @@
1
- export declare const StyledWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
2
- isOverflow: boolean;
3
- } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
1
+ export declare const StyledAppPickerFloating: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-floating-context").DSFloatingWrapperT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-floating-context").DSFloatingWrapperT.Props>>, never>;
2
+ export declare const StyledWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
4
3
  export declare const StyledListItem: import("styled-components").StyledComponent<"li", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"li">, never>;
5
4
  export declare const StyledListItemFullRow: import("styled-components").StyledComponent<"li", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"li">, never>;
6
- export declare const StyledTitle: import("styled-components").StyledComponent<"h3", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"h3">, never>;
5
+ export declare const StyledTitle: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
7
6
  export declare const StyledSeparator: import("styled-components").StyledComponent<"hr", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"hr">, never>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { SvgIconT } from '@elliemae/ds-icons';
3
- import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';
3
+ import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
4
4
  import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
5
5
  import { DSAppPickerName, DSAppPickerSlots } from './constants/index.js';
6
6
  export declare namespace DSAppPickerT {
@@ -22,6 +22,18 @@ export declare namespace DSAppPickerT {
22
22
  focusSelectedOrFirstAvailable?: () => void;
23
23
  focusWrapper: () => void;
24
24
  }>;
25
+ interface RequiredProps {
26
+ }
27
+ type SlotFunctionArguments = {
28
+ dsApppickerRoot: () => object;
29
+ dsApppickerItem: () => object;
30
+ dsApppickerTitle: () => object;
31
+ dsApppickerSeparator: () => object;
32
+ dsApppickerRow: () => object;
33
+ dsApppickerChip: () => object;
34
+ dsApppickerButton: () => object;
35
+ dsApppickerFloatingWrapper: () => object;
36
+ };
25
37
  interface DefaultProps {
26
38
  apps: AppItem[];
27
39
  customApps: AppItem[];
@@ -30,23 +42,24 @@ export declare namespace DSAppPickerT {
30
42
  icon: React.ComponentType<SvgIconT.Props>;
31
43
  }
32
44
  interface RenderTriggerProp {
33
- ref: React.MutableRefObject<HTMLButtonElement>;
45
+ ref: React.RefCallback<HTMLButtonElement>;
34
46
  [key: string]: unknown;
35
47
  }
36
48
  interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSAppPickerName, typeof DSAppPickerSlots> {
37
49
  onClose?: () => void;
38
50
  onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
39
- onClickOutside?: (e: React.MouseEvent) => void;
51
+ onClickOutside?: (e: MouseEvent | React.MouseEvent) => void;
40
52
  onKeyDown?: (e: React.KeyboardEvent) => void;
41
53
  actionRef?: ActionRef;
42
- renderTrigger?: React.ComponentType<RenderTriggerProp>;
54
+ renderTrigger?: (props: RenderTriggerProp) => React.ReactElement | null;
43
55
  isOpen?: boolean;
44
56
  triggerRef?: React.RefObject<HTMLButtonElement>;
45
57
  }
46
- interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps {
58
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
47
59
  }
48
- interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps {
60
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
49
61
  }
50
62
  }
51
- export declare const defaultProps: Omit<DSAppPickerT.DefaultProps, `dsAppPicker${Capitalize<string>}`>;
52
- export declare const DSAppPickerPropTypes: ValidationMap<unknown>;
63
+ export declare const defaultProps: DSAppPickerT.DefaultProps;
64
+ export declare const DSAppPickerPropTypes: DSPropTypesSchema<DSAppPickerT.Props>;
65
+ export declare const DSAppPickerPropTypesSchema: ValidationMap<DSAppPickerT.Props>;