@elliemae/ds-app-picker 3.62.1 → 3.70.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSAppPicker.js +10 -141
- package/dist/cjs/DSAppPicker.js.map +3 -3
- package/dist/cjs/{utils.js → DSAppPickerCTX.js} +8 -25
- package/dist/cjs/DSAppPickerCTX.js.map +7 -0
- package/dist/cjs/config/useAppPicker.js +25 -8
- package/dist/cjs/config/useAppPicker.js.map +3 -3
- package/dist/cjs/config/useFocusTracker.js +104 -0
- package/dist/cjs/config/useFocusTracker.js.map +7 -0
- package/dist/cjs/config/useValidateProps.js +63 -0
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +11 -1
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/parts/AppPanel.js +143 -0
- package/dist/cjs/parts/AppPanel.js.map +7 -0
- package/dist/cjs/parts/AppPickerFloatingContext/AppPickerContent.js +104 -0
- package/dist/cjs/parts/AppPickerFloatingContext/AppPickerContent.js.map +7 -0
- package/dist/cjs/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js +195 -0
- package/dist/cjs/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js.map +7 -0
- package/dist/cjs/parts/AppPickerItem.js +104 -0
- package/dist/cjs/parts/AppPickerItem.js.map +7 -0
- package/dist/cjs/parts/AppSection.js +95 -0
- package/dist/cjs/parts/AppSection.js.map +7 -0
- package/dist/cjs/parts/Trigger.js +83 -0
- package/dist/cjs/parts/Trigger.js.map +7 -0
- package/dist/cjs/parts/shared-styles.js +44 -0
- package/dist/cjs/parts/shared-styles.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +28 -8
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +48 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-app-picker-valid.js +15 -2
- package/dist/cjs/typescript-testing/typescript-app-picker-valid.js.map +2 -2
- package/dist/cjs/util/getChipId.js +36 -0
- package/dist/cjs/util/getChipId.js.map +7 -0
- package/dist/cjs/util/getChipRegionId.js +37 -0
- package/dist/cjs/util/getChipRegionId.js.map +7 -0
- package/dist/cjs/util/getDSAppPickerContractProps.js +38 -0
- package/dist/cjs/util/getDSAppPickerContractProps.js.map +7 -0
- package/dist/cjs/util/instanceIds.js +42 -0
- package/dist/cjs/util/instanceIds.js.map +7 -0
- package/dist/esm/DSAppPicker.js +10 -141
- package/dist/esm/DSAppPicker.js.map +3 -3
- package/dist/esm/DSAppPickerCTX.js +8 -0
- package/dist/esm/DSAppPickerCTX.js.map +7 -0
- package/dist/esm/config/useAppPicker.js +29 -13
- package/dist/esm/config/useAppPicker.js.map +3 -3
- package/dist/esm/config/useFocusTracker.js +74 -0
- package/dist/esm/config/useFocusTracker.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +33 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +11 -1
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +13 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/parts/AppPanel.js +118 -0
- package/dist/esm/parts/AppPanel.js.map +7 -0
- package/dist/esm/parts/AppPickerFloatingContext/AppPickerContent.js +74 -0
- package/dist/esm/parts/AppPickerFloatingContext/AppPickerContent.js.map +7 -0
- package/dist/esm/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js +165 -0
- package/dist/esm/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js.map +7 -0
- package/dist/esm/parts/AppPickerItem.js +74 -0
- package/dist/esm/parts/AppPickerItem.js.map +7 -0
- package/dist/esm/parts/AppSection.js +65 -0
- package/dist/esm/parts/AppSection.js.map +7 -0
- package/dist/esm/parts/Trigger.js +53 -0
- package/dist/esm/parts/Trigger.js.map +7 -0
- package/dist/esm/parts/shared-styles.js +14 -0
- package/dist/esm/parts/shared-styles.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +34 -9
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +25 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-app-picker-valid.js +15 -2
- package/dist/esm/typescript-testing/typescript-app-picker-valid.js.map +2 -2
- package/dist/esm/util/getChipId.js +6 -0
- package/dist/esm/util/getChipId.js.map +7 -0
- package/dist/esm/util/getChipRegionId.js +7 -0
- package/dist/esm/util/getChipRegionId.js.map +7 -0
- package/dist/esm/util/getDSAppPickerContractProps.js +8 -0
- package/dist/esm/util/getDSAppPickerContractProps.js.map +7 -0
- package/dist/esm/util/instanceIds.js +12 -0
- package/dist/esm/util/instanceIds.js.map +7 -0
- package/dist/types/DSAppPicker.d.ts +1 -2
- package/dist/types/DSAppPickerCTX.d.ts +6 -0
- package/dist/types/config/useAppPicker.d.ts +111 -92
- package/dist/types/config/useFocusTracker.d.ts +19 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +17 -7
- package/dist/types/index.d.ts +2 -0
- package/dist/types/parts/AppPanel.d.ts +2 -0
- package/dist/types/parts/AppPickerFloatingContext/AppPickerContent.d.ts +3 -0
- package/dist/types/parts/AppPickerFloatingContext/useAppPickerFloatingContext.d.ts +171 -0
- package/dist/types/parts/AppPickerItem.d.ts +11 -0
- package/dist/types/parts/AppSection.d.ts +6 -0
- package/dist/types/parts/Trigger.d.ts +14 -0
- package/dist/types/parts/shared-styles.d.ts +2 -0
- package/dist/types/react-desc-prop-types.d.ts +112 -9
- package/dist/types/util/getChipId.d.ts +2 -0
- package/dist/types/util/getChipRegionId.d.ts +1 -0
- package/dist/types/util/getDSAppPickerContractProps.d.ts +37 -0
- package/dist/types/util/instanceIds.d.ts +11 -0
- package/package.json +21 -18
- package/dist/cjs/AppPickerImpl.js +0 -204
- package/dist/cjs/AppPickerImpl.js.map +0 -7
- package/dist/cjs/hooks/useKeepTrackButtons.js +0 -69
- package/dist/cjs/hooks/useKeepTrackButtons.js.map +0 -7
- package/dist/cjs/styles.js +0 -76
- package/dist/cjs/styles.js.map +0 -7
- package/dist/cjs/utils.js.map +0 -7
- package/dist/esm/AppPickerImpl.js +0 -174
- package/dist/esm/AppPickerImpl.js.map +0 -7
- package/dist/esm/hooks/useKeepTrackButtons.js +0 -39
- package/dist/esm/hooks/useKeepTrackButtons.js.map +0 -7
- package/dist/esm/styles.js +0 -46
- package/dist/esm/styles.js.map +0 -7
- package/dist/esm/utils.js +0 -25
- package/dist/esm/utils.js.map +0 -7
- package/dist/types/AppPickerImpl.d.ts +0 -11
- package/dist/types/hooks/useKeepTrackButtons.d.ts +0 -13
- package/dist/types/styles.d.ts +0 -7
- package/dist/types/tests/app-picker.a11y.test.d.ts +0 -1
- package/dist/types/tests/app-picker.data-testid.test.d.ts +0 -1
- package/dist/types/tests/app-picker.events.test.d.ts +0 -1
- package/dist/types/tests/app-picker.exports.test.d.ts +0 -1
- package/dist/types/tests/app-picker.get-owner-props.test.d.ts +0 -1
- package/dist/types/tests/app-picker.keyboard.test.d.ts +0 -1
- package/dist/types/typescript-testing/typescript-app-picker-valid.d.ts +0 -1
- package/dist/types/utils.d.ts +0 -14
|
@@ -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;
|
|
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 openAndFocusOnArrowKeys: false,\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\n// TriggerComponent is typed as a real component, so its props arrive through the fiber. The exported\n// TriggerComponentProps type is what a consumer annotates their own trigger with \u2014 if that type stops\n// being reachable from the namespace, or its members change shape, this stops compiling.\nconst CustomTrigger: React.ComponentType<DSAppPickerT.TriggerComponentProps> = ({ innerRef, id, onClick, ...rest }) => (\n <button ref={innerRef} id={id} onClick={onClick} type=\"button\" {...rest}>\n Open apps\n </button>\n);\n\n// A consumer may also declare the trigger inline without naming the props type; both must compile.\nconst testTriggerComponentProp: ComponentPropsOptionalProps = {\n TriggerComponent: CustomTrigger,\n};\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 {/* TriggerComponent \u2014 the supported custom trigger API */}\n <DSAppPicker apps={[]} TriggerComponent={CustomTrigger} />\n <DSAppPicker {...testTriggerComponentProp} apps={[]} />\n {/* renderTrigger \u2014 deprecated (v4.x) but must still type-check until removal */}\n <DSAppPicker apps={[]} renderTrigger={({ ref }) => <button ref={ref} type=\"button\" aria-label=\"banana\" />} />\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6ErB,SAWA,UAXA,KAWA,YAXA;AA5EF,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;AAAA,EACZ,yBAAyB;AAC3B;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;AAKA,MAAM,gBAAyE,CAAC,EAAE,UAAU,IAAI,SAAS,GAAG,KAAK,MAC/G,oBAAC,YAAO,KAAK,UAAU,IAAQ,SAAkB,MAAK,UAAU,GAAG,MAAM,uBAEzE;AAIF,MAAM,2BAAwD;AAAA,EAC5D,kBAAkB;AACpB;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,EAG/F,oBAAC,eAAY,MAAM,CAAC,GAAG,kBAAkB,eAAe;AAAA,EACxD,oBAAC,eAAa,GAAG,0BAA0B,MAAM,CAAC,GAAG;AAAA,EAErD,oBAAC,eAAY,MAAM,CAAC,GAAG,eAAe,CAAC,EAAE,IAAI,MAAM,oBAAC,YAAO,KAAU,MAAK,UAAS,cAAW,UAAS,GAAI;AAAA,GAC7G;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/util/getChipId.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSAppPickerT } from '../react-desc-prop-types.js';\n\n// Chip identity, assigned top-down from data the parent already holds: the app's own `id`, or a\n// deterministic `${label}-${flatIndex}` fallback for id-less apps (the flat index disambiguates\n// duplicate labels). Both the parent (the focus tracker's track* handlers) and the child\n// (AppPickerItem, via the `chipId` prop threaded through AppSection) derive identity through THIS\n// single function, so the parent can compute the exact region string a chip will match without the\n// chip generating an id and reporting it back up. That determinism removes the child\u2192parent\n// dependency entirely: focus can be addressed by identity alone, with no registry to keep in sync\n// and no wait for the child to mount and register.\n//\n// Kept as a standalone leaf util (depends only on a type) so both the hook and the parts can import\n// it without routing through the hook module \u2014 avoids any import cycle risk.\nexport const getChipId = (app: DSAppPickerT.AppItem, flatIndex: number): string =>\n app.id ?? `${app.label}-${flatIndex}`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACahB,MAAM,YAAY,CAAC,KAA2B,cACnD,IAAI,MAAM,GAAG,IAAI,KAAK,IAAI,SAAS;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/util/getChipRegionId.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { CHIP_REGION_PREFIX } from '../constants/index.js';\n\n// Maps a chipId (see getChipId) to its focus-region identifier. Standalone leaf util \u2014 depends only\n// on the constants module \u2014 so the hook and the parts can share it without importing through the\n// hook, keeping the dependency graph acyclic.\nexport const getChipRegionId = (chipId: string): string => `${CHIP_REGION_PREFIX}${chipId}`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,0BAA0B;AAK5B,MAAM,kBAAkB,CAAC,WAA2B,GAAG,kBAAkB,GAAG,MAAM;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { getContractProps } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { DSAppPickerPropTypes } from "../react-desc-prop-types.js";
|
|
4
|
+
const getDSAppPickerContractProps = (props) => getContractProps(props, DSAppPickerPropTypes);
|
|
5
|
+
export {
|
|
6
|
+
getDSAppPickerContractProps
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=getDSAppPickerContractProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/util/getDSAppPickerContractProps.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getContractProps } from '@elliemae/ds-props-helpers';\nimport { DSAppPickerPropTypes, type DSAppPickerT } from '../react-desc-prop-types.js';\n\n/**\n * Filters an arbitrary object down to the props DSAppPicker actually accepts.\n *\n * **Who this is for.** Components that wrap DSAppPicker and receive its props indirectly \u2014 as a\n * configuration object from their own consumer rather than as JSX props.\n *\n * The canonical case is `ds-global-header`, whose `toolbar` config carries a `componentProps` object for\n * the `ds-app-picker` item type. Such a wrapper cannot spread that object blindly: its config type is\n * DSAppPicker's props *plus* the wrapper's own \u2014 `triggerOnClick` there \u2014 and those must not leak into\n * DSAppPicker.\n *\n * Do not swap this for a hand-listed set of forwardable keys. A hand-list has no way to fail when the\n * contract grows: the new prop type-checks at the call site, is dropped silently at runtime, and nothing\n * reports it. Deriving the set from the contract is what makes that class of bug impossible.\n *\n * **Why a utility instead of exporting the schema.** `DSAppPickerPropTypes` is internal. It exists to\n * drive prop validation and the Storybook props table; that it also happens to describe the exact set\n * of forwardable props is a convenience today, not a promise. Exposing the schema would weld those\n * concerns together and make every future change to it a public API change. Exposing this utility\n * instead means the public commitment is only \"you get the props DSAppPicker accepts\" \u2014 if the two\n * ever need to diverge, only this function changes.\n *\n * Anything the contract does not declare is discarded. Arbitrary `data-*` attributes are kept (a\n * supported consumer surface no schema can enumerate).\n *\n * `undefined` vs `null` \u2014 see `getContractProps` for the implemented rule and the React precedent it\n * follows. In short: `undefined` is dropped (\"I am not defining this, you decide\" \u2014 the wrapper's\n * default stands), `null` is forwarded (\"I am explicitly asking for nothing\") and is then judged by\n * DSAppPicker's own strictly-typed contract, which rejects it for props whose declared type does not\n * admit null. To disable a handler, pass an explicit no-op (`() => {}`) \u2014 it honours the type and\n * states the intent unambiguously.\n *\n * @param props - the object to filter, typically a wrapper's `componentProps` configuration\n * @returns a new object containing only props DSAppPicker declares\n */\nexport const getDSAppPickerContractProps = (props: object): Partial<DSAppPickerT.Props> =>\n getContractProps<DSAppPickerT.Props>(props, DSAppPickerPropTypes);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB;AACjC,SAAS,4BAA+C;AAqCjD,MAAM,8BAA8B,CAAC,UAC1C,iBAAqC,OAAO,oBAAoB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const getIdForAppPickerRoot = (id) => id;
|
|
3
|
+
const getIdForAppPickerTrigger = (id) => `${id}-dialog-trigger-btn`;
|
|
4
|
+
const getIdForAppPickerSectionTitle = (id) => `${id}-section-title`;
|
|
5
|
+
const getIdForAppPickerCustomSectionTitle = (id) => `${id}-custom-section-title`;
|
|
6
|
+
export {
|
|
7
|
+
getIdForAppPickerCustomSectionTitle,
|
|
8
|
+
getIdForAppPickerRoot,
|
|
9
|
+
getIdForAppPickerSectionTitle,
|
|
10
|
+
getIdForAppPickerTrigger
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=instanceIds.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/util/instanceIds.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/*\n * The single place that owns every id suffix DSAppPicker appends.\n *\n * The component receives one `id` and has to put several distinct ids into the DOM. The id the consumer\n * gave lands, unmodified, on the ROOT \u2014 that one is theirs. Every other element gets that same value\n * with a suffix, which is what keeps a picker's ids from colliding with each other, with a second picker\n * on the page, or with the consumer's own markup.\n *\n * A suffix is only useful to a consumer if they can compute it, and it is only safe for us to change if\n * they never wrote it down. So the rule this module encodes is: EVERY suffix we invent gets an exported\n * helper here, and nothing anywhere else \u2014 inside the package or outside it \u2014 composes one by hand. A\n * consumer who needs the trigger writes `getIdForAppPickerTrigger(myId)`; if we rename the suffix\n * tomorrow, their call site keeps working and the rename is not a breaking change. A hardcoded\n * `${myId}-dialog-trigger-btn` in consumer code turns that same rename into one.\n *\n * `getIdForAppPickerRoot` appends nothing today and is exported anyway, for the same reason: it makes\n * \"your id lands on the root\" a call instead of a convention, so the day the root does need a suffix, the\n * consumers who used it are already correct.\n *\n * The names carry `AppPicker` even though the module does not need the disambiguation internally. These\n * are package-level named exports, and the next component to need the same treatment will want the same\n * four names \u2014 a consumer importing both should never have to alias one of them at the import site.\n *\n * Suffix values are frozen published surface \u2014 change them only under the breaking-change protocol, even\n * though this module is what makes such a change survivable.\n */\n\n/** The element the consumer's own `id` lands on, unchanged. */\nexport const getIdForAppPickerRoot = (id: string): string => id;\n\n/**\n * The trigger button. This is the id the panel's `aria-labelledby` points at, so it is also the answer to\n * \"what names the dialog\" \u2014 see `TriggerComponent` in the Custom Triggers documentation.\n */\nexport const getIdForAppPickerTrigger = (id: string): string => `${id}-dialog-trigger-btn`;\n\n/** The `sectionTitle` heading, which labels the `apps` group. */\nexport const getIdForAppPickerSectionTitle = (id: string): string => `${id}-section-title`;\n\n/** The `customSectionTitle` heading, which labels the `customApps` group. */\nexport const getIdForAppPickerCustomSectionTitle = (id: string): string => `${id}-custom-section-title`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4BhB,MAAM,wBAAwB,CAAC,OAAuB;AAMtD,MAAM,2BAA2B,CAAC,OAAuB,GAAG,EAAE;AAG9D,MAAM,gCAAgC,CAAC,OAAuB,GAAG,EAAE;AAGnE,MAAM,sCAAsC,CAAC,OAAuB,GAAG,EAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,5 +2,4 @@ import React from 'react';
|
|
|
2
2
|
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
|
-
export {
|
|
6
|
-
export default DSAppPicker;
|
|
5
|
+
export { AppPickerWithSchema, DSAppPicker };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { useAppPicker } from './config/useAppPicker.js';
|
|
2
|
+
export interface DSAppPickerCTX extends ReturnType<typeof useAppPicker> {
|
|
3
|
+
}
|
|
4
|
+
/** Single source of truth for DSAppPicker's parts — props, owner-props config, floating-context
|
|
5
|
+
* render state, and focus tracker. Replaces per-part prop drilling. */
|
|
6
|
+
export declare const DSAppPickerContext: import("react").Context<DSAppPickerCTX>;
|
|
@@ -1,40 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSAppPickerT } from '../react-desc-prop-types.js';
|
|
3
3
|
export declare const useAppPicker: (props: DSAppPickerT.Props) => {
|
|
4
|
+
focusTrackers: {
|
|
5
|
+
firstFocusableIdx: number;
|
|
6
|
+
lastFocusableIdx: number;
|
|
7
|
+
focusRegion: string;
|
|
8
|
+
firstFocusableRef: React.MutableRefObject<HTMLElement | null>;
|
|
9
|
+
lastFocusableRef: React.MutableRefObject<HTMLElement | null>;
|
|
10
|
+
trackFocusChip: (chipId: string) => void;
|
|
11
|
+
trackFocusRegionReset: () => void;
|
|
12
|
+
trackFocusTrigger: () => void;
|
|
13
|
+
trackFocusPanel: () => void;
|
|
14
|
+
trackFocusSelectedItem: () => void;
|
|
15
|
+
trackFocusSelectedOrLastItem: () => void;
|
|
16
|
+
trackFocusItemAtIndex: (index: number) => void;
|
|
17
|
+
};
|
|
4
18
|
propsWithDefault: DSAppPickerT.InternalProps;
|
|
5
19
|
ownerPropsConfig: {
|
|
6
20
|
getOwnerProps: () => DSAppPickerT.InternalProps;
|
|
7
21
|
getOwnerPropsArguments: () => {};
|
|
8
22
|
};
|
|
9
|
-
globalAttributes: Partial<Pick<object, "
|
|
10
|
-
cite?: string | undefined | undefined;
|
|
11
|
-
data?: string | undefined | undefined;
|
|
12
|
-
form?: string | undefined | undefined;
|
|
13
|
-
label?: string | undefined | undefined;
|
|
14
|
-
slot?: string | undefined | undefined;
|
|
15
|
-
span?: number | undefined | undefined;
|
|
16
|
-
style?: React.CSSProperties | undefined;
|
|
17
|
-
summary?: string | undefined | undefined;
|
|
23
|
+
globalAttributes: Partial<Pick<object, "title" | "onClick" | "onKeyDown" | "form" | "list" | "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" | "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" | "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" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
|
|
18
24
|
title?: string | undefined | undefined;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className?: string | undefined | undefined;
|
|
24
|
-
color?: string | undefined | undefined;
|
|
25
|
-
height?: number | string | undefined | undefined;
|
|
26
|
-
id?: string | undefined | undefined;
|
|
27
|
-
lang?: string | undefined | undefined;
|
|
28
|
-
max?: number | string | undefined | undefined;
|
|
29
|
-
media?: string | undefined | undefined;
|
|
30
|
-
method?: string | undefined | undefined;
|
|
31
|
-
min?: number | string | undefined | undefined;
|
|
32
|
-
target?: string | undefined | undefined;
|
|
33
|
-
width?: number | string | undefined | undefined;
|
|
34
|
-
role?: React.AriaRole | undefined;
|
|
35
|
-
tabIndex?: 0 | -1 | undefined;
|
|
36
|
-
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
37
|
-
href?: string | undefined | undefined;
|
|
25
|
+
onClick?: React.MouseEventHandler<Element> | undefined;
|
|
26
|
+
onKeyDown?: React.KeyboardEventHandler<Element> | undefined;
|
|
27
|
+
form?: string | undefined | undefined;
|
|
28
|
+
list?: string | undefined | undefined;
|
|
38
29
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
39
30
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
40
31
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
@@ -121,7 +112,6 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
|
|
|
121
112
|
onLoadCapture?: React.ReactEventHandler<Element> | undefined;
|
|
122
113
|
onError?: React.ReactEventHandler<Element> | undefined;
|
|
123
114
|
onErrorCapture?: React.ReactEventHandler<Element> | undefined;
|
|
124
|
-
onKeyDown?: React.KeyboardEventHandler<Element> | undefined;
|
|
125
115
|
onKeyDownCapture?: React.KeyboardEventHandler<Element> | undefined;
|
|
126
116
|
onKeyPress?: React.KeyboardEventHandler<Element> | undefined;
|
|
127
117
|
onKeyPressCapture?: React.KeyboardEventHandler<Element> | undefined;
|
|
@@ -173,7 +163,6 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
|
|
|
173
163
|
onWaitingCapture?: React.ReactEventHandler<Element> | undefined;
|
|
174
164
|
onAuxClick?: React.MouseEventHandler<Element> | undefined;
|
|
175
165
|
onAuxClickCapture?: React.MouseEventHandler<Element> | undefined;
|
|
176
|
-
onClick?: React.MouseEventHandler<Element> | undefined;
|
|
177
166
|
onClickCapture?: React.MouseEventHandler<Element> | undefined;
|
|
178
167
|
onContextMenu?: React.MouseEventHandler<Element> | undefined;
|
|
179
168
|
onContextMenuCapture?: React.MouseEventHandler<Element> | undefined;
|
|
@@ -247,25 +236,30 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
|
|
|
247
236
|
onAnimationIterationCapture?: React.AnimationEventHandler<Element> | undefined;
|
|
248
237
|
onTransitionEnd?: React.TransitionEventHandler<Element> | undefined;
|
|
249
238
|
onTransitionEndCapture?: React.TransitionEventHandler<Element> | undefined;
|
|
250
|
-
classID?: string | undefined | undefined;
|
|
251
|
-
useMap?: string | undefined | undefined;
|
|
252
|
-
wmode?: string | undefined | undefined;
|
|
253
239
|
defaultChecked?: boolean | undefined | undefined;
|
|
254
240
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
255
241
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
242
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
256
243
|
accessKey?: string | undefined | undefined;
|
|
257
244
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
258
245
|
autoFocus?: boolean | undefined | undefined;
|
|
246
|
+
className?: string | undefined | undefined;
|
|
259
247
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
260
248
|
contextMenu?: string | undefined | undefined;
|
|
261
249
|
dir?: string | undefined | undefined;
|
|
262
250
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
263
251
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
264
252
|
hidden?: boolean | undefined | undefined;
|
|
253
|
+
id?: string | undefined | undefined;
|
|
254
|
+
lang?: string | undefined | undefined;
|
|
265
255
|
nonce?: string | undefined | undefined;
|
|
256
|
+
slot?: string | undefined | undefined;
|
|
266
257
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
258
|
+
style?: React.CSSProperties | undefined;
|
|
259
|
+
tabIndex?: 0 | -1 | undefined;
|
|
267
260
|
translate?: "yes" | "no" | undefined | undefined;
|
|
268
261
|
radioGroup?: string | undefined | undefined;
|
|
262
|
+
role?: React.AriaRole | undefined;
|
|
269
263
|
about?: string | undefined | undefined;
|
|
270
264
|
content?: string | undefined | undefined;
|
|
271
265
|
datatype?: string | undefined | undefined;
|
|
@@ -279,6 +273,7 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
|
|
|
279
273
|
vocab?: string | undefined | undefined;
|
|
280
274
|
autoCorrect?: string | undefined | undefined;
|
|
281
275
|
autoSave?: string | undefined | undefined;
|
|
276
|
+
color?: string | undefined | undefined;
|
|
282
277
|
itemProp?: string | undefined | undefined;
|
|
283
278
|
itemScope?: boolean | undefined | undefined;
|
|
284
279
|
itemType?: string | undefined | undefined;
|
|
@@ -291,86 +286,110 @@ export declare const useAppPicker: (props: DSAppPickerT.Props) => {
|
|
|
291
286
|
is?: string | undefined | undefined;
|
|
292
287
|
exportparts?: string | undefined | undefined;
|
|
293
288
|
part?: string | undefined | undefined;
|
|
289
|
+
accept?: string | undefined | undefined;
|
|
290
|
+
acceptCharset?: string | undefined | undefined;
|
|
291
|
+
action?: string | undefined;
|
|
292
|
+
allowFullScreen?: boolean | undefined | undefined;
|
|
293
|
+
allowTransparency?: boolean | undefined | undefined;
|
|
294
|
+
alt?: string | undefined | undefined;
|
|
295
|
+
async?: boolean | undefined | undefined;
|
|
296
|
+
autoComplete?: string | undefined | undefined;
|
|
297
|
+
autoPlay?: boolean | undefined | undefined;
|
|
298
|
+
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
299
|
+
cellPadding?: number | string | undefined | undefined;
|
|
300
|
+
cellSpacing?: number | string | undefined | undefined;
|
|
301
|
+
charSet?: string | undefined | undefined;
|
|
302
|
+
challenge?: string | undefined | undefined;
|
|
303
|
+
checked?: boolean | undefined | undefined;
|
|
304
|
+
cite?: string | undefined | undefined;
|
|
305
|
+
classID?: string | undefined | undefined;
|
|
306
|
+
cols?: number | undefined | undefined;
|
|
307
|
+
colSpan?: number | undefined | undefined;
|
|
308
|
+
controls?: boolean | undefined | undefined;
|
|
309
|
+
coords?: string | undefined | undefined;
|
|
310
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
311
|
+
data?: string | undefined | undefined;
|
|
312
|
+
dateTime?: string | undefined | undefined;
|
|
313
|
+
default?: boolean | undefined | undefined;
|
|
314
|
+
defer?: boolean | undefined | undefined;
|
|
294
315
|
disabled?: boolean | undefined | undefined;
|
|
316
|
+
download?: any;
|
|
317
|
+
encType?: string | undefined | undefined;
|
|
295
318
|
formAction?: string | undefined;
|
|
296
319
|
formEncType?: string | undefined | undefined;
|
|
297
320
|
formMethod?: string | undefined | undefined;
|
|
298
321
|
formNoValidate?: boolean | undefined | undefined;
|
|
299
322
|
formTarget?: string | undefined | undefined;
|
|
300
|
-
|
|
301
|
-
|
|
323
|
+
frameBorder?: number | string | undefined | undefined;
|
|
324
|
+
headers?: string | undefined | undefined;
|
|
325
|
+
height?: number | string | undefined | undefined;
|
|
326
|
+
high?: number | undefined | undefined;
|
|
327
|
+
href?: string | undefined | undefined;
|
|
302
328
|
hrefLang?: string | undefined | undefined;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
329
|
+
htmlFor?: string | undefined | undefined;
|
|
330
|
+
httpEquiv?: string | undefined | undefined;
|
|
331
|
+
integrity?: string | undefined | undefined;
|
|
332
|
+
keyParams?: string | undefined | undefined;
|
|
333
|
+
keyType?: string | undefined | undefined;
|
|
334
|
+
kind?: string | undefined | undefined;
|
|
335
|
+
label?: string | undefined | undefined;
|
|
308
336
|
loop?: boolean | undefined | undefined;
|
|
309
|
-
|
|
310
|
-
muted?: boolean | undefined | undefined;
|
|
311
|
-
playsInline?: boolean | undefined | undefined;
|
|
312
|
-
preload?: string | undefined | undefined;
|
|
313
|
-
src?: string | undefined | undefined;
|
|
314
|
-
dateTime?: string | undefined | undefined;
|
|
315
|
-
open?: boolean | undefined | undefined;
|
|
316
|
-
acceptCharset?: string | undefined | undefined;
|
|
317
|
-
action?: string | undefined;
|
|
318
|
-
autoComplete?: string | undefined | undefined;
|
|
319
|
-
encType?: string | undefined | undefined;
|
|
320
|
-
noValidate?: boolean | undefined | undefined;
|
|
337
|
+
low?: number | undefined | undefined;
|
|
321
338
|
manifest?: string | undefined | undefined;
|
|
322
|
-
allowFullScreen?: boolean | undefined | undefined;
|
|
323
|
-
allowTransparency?: boolean | undefined | undefined;
|
|
324
|
-
frameBorder?: number | string | undefined | undefined;
|
|
325
339
|
marginHeight?: number | undefined | undefined;
|
|
326
340
|
marginWidth?: number | undefined | undefined;
|
|
327
|
-
|
|
328
|
-
scrolling?: string | undefined | undefined;
|
|
329
|
-
seamless?: boolean | undefined | undefined;
|
|
330
|
-
srcDoc?: string | undefined | undefined;
|
|
331
|
-
sizes?: string | undefined | undefined;
|
|
332
|
-
srcSet?: string | undefined | undefined;
|
|
333
|
-
accept?: string | undefined | undefined;
|
|
334
|
-
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
335
|
-
checked?: boolean | undefined | undefined;
|
|
336
|
-
list?: string | undefined | undefined;
|
|
341
|
+
max?: number | string | undefined | undefined;
|
|
337
342
|
maxLength?: number | undefined | undefined;
|
|
343
|
+
media?: string | undefined | undefined;
|
|
344
|
+
mediaGroup?: string | undefined | undefined;
|
|
345
|
+
method?: string | undefined | undefined;
|
|
346
|
+
min?: number | string | undefined | undefined;
|
|
338
347
|
minLength?: number | undefined | undefined;
|
|
339
348
|
multiple?: boolean | undefined | undefined;
|
|
349
|
+
muted?: boolean | undefined | undefined;
|
|
350
|
+
name?: string | undefined | undefined;
|
|
351
|
+
noValidate?: boolean | undefined | undefined;
|
|
352
|
+
open?: boolean | undefined | undefined;
|
|
353
|
+
optimum?: number | undefined | undefined;
|
|
354
|
+
pattern?: string | undefined | undefined;
|
|
340
355
|
placeholder?: string | undefined | undefined;
|
|
356
|
+
playsInline?: boolean | undefined | undefined;
|
|
357
|
+
poster?: string | undefined | undefined;
|
|
358
|
+
preload?: string | undefined | undefined;
|
|
341
359
|
readOnly?: boolean | undefined | undefined;
|
|
342
360
|
required?: boolean | undefined | undefined;
|
|
343
|
-
size?: number | undefined | undefined;
|
|
344
|
-
step?: number | string | undefined | undefined;
|
|
345
|
-
htmlFor?: string | undefined | undefined;
|
|
346
|
-
integrity?: string | undefined | undefined;
|
|
347
|
-
charSet?: string | undefined | undefined;
|
|
348
|
-
httpEquiv?: string | undefined | undefined;
|
|
349
|
-
high?: number | undefined | undefined;
|
|
350
|
-
low?: number | undefined | undefined;
|
|
351
|
-
optimum?: number | undefined | undefined;
|
|
352
361
|
reversed?: boolean | undefined | undefined;
|
|
353
|
-
|
|
354
|
-
selected?: boolean | undefined | undefined;
|
|
355
|
-
async?: boolean | undefined | undefined;
|
|
356
|
-
defer?: boolean | undefined | undefined;
|
|
357
|
-
scoped?: boolean | undefined | undefined;
|
|
358
|
-
cellPadding?: number | string | undefined | undefined;
|
|
359
|
-
cellSpacing?: number | string | undefined | undefined;
|
|
360
|
-
colSpan?: number | undefined | undefined;
|
|
361
|
-
headers?: string | undefined | undefined;
|
|
362
|
+
rows?: number | undefined | undefined;
|
|
362
363
|
rowSpan?: number | undefined | undefined;
|
|
364
|
+
sandbox?: string | undefined | undefined;
|
|
363
365
|
scope?: string | undefined | undefined;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
scoped?: boolean | undefined | undefined;
|
|
367
|
+
scrolling?: string | undefined | undefined;
|
|
368
|
+
seamless?: boolean | undefined | undefined;
|
|
369
|
+
selected?: boolean | undefined | undefined;
|
|
370
|
+
shape?: string | undefined | undefined;
|
|
371
|
+
size?: number | undefined | undefined;
|
|
372
|
+
sizes?: string | undefined | undefined;
|
|
373
|
+
span?: number | undefined | undefined;
|
|
374
|
+
src?: string | undefined | undefined;
|
|
375
|
+
srcDoc?: string | undefined | undefined;
|
|
369
376
|
srcLang?: string | undefined | undefined;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
377
|
+
srcSet?: string | undefined | undefined;
|
|
378
|
+
start?: number | undefined | undefined;
|
|
379
|
+
step?: number | string | undefined | undefined;
|
|
380
|
+
summary?: string | undefined | undefined;
|
|
381
|
+
target?: string | undefined | undefined;
|
|
382
|
+
type?: string | undefined | undefined;
|
|
383
|
+
useMap?: string | undefined | undefined;
|
|
384
|
+
value?: string | number | readonly string[] | undefined;
|
|
385
|
+
width?: number | string | undefined | undefined;
|
|
386
|
+
wmode?: string | undefined | undefined;
|
|
387
|
+
wrap?: string | undefined | undefined;
|
|
374
388
|
}, never>>;
|
|
375
389
|
xstyledProps: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
390
|
+
openIntentRef: React.MutableRefObject<DSAppPickerT.OpenIntent>;
|
|
391
|
+
mountedOpenAutofocusPendingRef: React.MutableRefObject<boolean>;
|
|
392
|
+
resolvedIsOpen: boolean;
|
|
393
|
+
setInternalIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
394
|
+
instanceUid: string;
|
|
376
395
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DSAppPickerT } from '../react-desc-prop-types.js';
|
|
2
|
+
type FocusTrackerConfigT = {
|
|
3
|
+
allApps: DSAppPickerT.AppItem[];
|
|
4
|
+
};
|
|
5
|
+
export declare const useFocusTracker: (config: FocusTrackerConfigT) => {
|
|
6
|
+
firstFocusableIdx: number;
|
|
7
|
+
lastFocusableIdx: number;
|
|
8
|
+
focusRegion: string;
|
|
9
|
+
firstFocusableRef: import("react").MutableRefObject<HTMLElement | null>;
|
|
10
|
+
lastFocusableRef: import("react").MutableRefObject<HTMLElement | null>;
|
|
11
|
+
trackFocusChip: (chipId: string) => void;
|
|
12
|
+
trackFocusRegionReset: () => void;
|
|
13
|
+
trackFocusTrigger: () => void;
|
|
14
|
+
trackFocusPanel: () => void;
|
|
15
|
+
trackFocusSelectedItem: () => void;
|
|
16
|
+
trackFocusSelectedOrLastItem: () => void;
|
|
17
|
+
trackFocusItemAtIndex: (index: number) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,19 +1,29 @@
|
|
|
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
|
+
};
|
|
7
|
+
export declare const CHIP_REGION_PREFIX = "chip-";
|
|
2
8
|
export declare const DSAppPickerSlots: {
|
|
3
|
-
ROOT:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
readonly ROOT: "root";
|
|
10
|
+
readonly GROUP: "group";
|
|
11
|
+
readonly ITEM: "item";
|
|
12
|
+
readonly TITLE: "title";
|
|
13
|
+
readonly SEPARATOR: "separator";
|
|
14
|
+
readonly ROW: "row";
|
|
15
|
+
readonly CHIP: "chip";
|
|
16
|
+
readonly BUTTON: "button";
|
|
17
|
+
readonly FLOATING_WRAPPER: "floating-wrapper";
|
|
10
18
|
};
|
|
11
19
|
export declare const DSAppPickerDataTestIds: {
|
|
12
20
|
CHIP: string;
|
|
13
21
|
BUTTON: string;
|
|
14
22
|
ROOT: string;
|
|
23
|
+
GROUP: string;
|
|
15
24
|
ITEM: string;
|
|
16
25
|
TITLE: string;
|
|
17
26
|
SEPARATOR: string;
|
|
18
27
|
ROW: string;
|
|
28
|
+
FLOATING_WRAPPER: string;
|
|
19
29
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { DSAppPicker, AppPickerWithSchema } from './DSAppPicker.js';
|
|
2
2
|
export { DSAppPickerName, DSAppPickerSlots, DSAppPickerDataTestIds } from './constants/index.js';
|
|
3
|
+
export { getDSAppPickerContractProps } from './util/getDSAppPickerContractProps.js';
|
|
4
|
+
export { getIdForAppPickerRoot, getIdForAppPickerTrigger, getIdForAppPickerSectionTitle, getIdForAppPickerCustomSectionTitle, } from './util/instanceIds.js';
|
|
3
5
|
export type { DSAppPickerT } from './react-desc-prop-types.js';
|