@elliemae/ds-filter-bar 3.60.0-next.39

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 (145) hide show
  1. package/dist/cjs/DSFilterBar.js +83 -0
  2. package/dist/cjs/DSFilterBar.js.map +7 -0
  3. package/dist/cjs/config/useFilterBar.js +58 -0
  4. package/dist/cjs/config/useFilterBar.js.map +7 -0
  5. package/dist/cjs/config/useValidateProps.js +40 -0
  6. package/dist/cjs/config/useValidateProps.js.map +7 -0
  7. package/dist/cjs/constants/index.js +46 -0
  8. package/dist/cjs/constants/index.js.map +7 -0
  9. package/dist/cjs/hooks/react-desc-prop-types.js +44 -0
  10. package/dist/cjs/hooks/react-desc-prop-types.js.map +7 -0
  11. package/dist/cjs/hooks/useFilterBarPrevNextFocus.js +97 -0
  12. package/dist/cjs/hooks/useFilterBarPrevNextFocus.js.map +7 -0
  13. package/dist/cjs/index.js +52 -0
  14. package/dist/cjs/index.js.map +7 -0
  15. package/dist/cjs/package.json +10 -0
  16. package/dist/cjs/parts/DSFilterBarActions/DSFilterBarActions.js +60 -0
  17. package/dist/cjs/parts/DSFilterBarActions/DSFilterBarActions.js.map +7 -0
  18. package/dist/cjs/parts/DSFilterBarActions/config/useFilterBarActions.js +66 -0
  19. package/dist/cjs/parts/DSFilterBarActions/config/useFilterBarActions.js.map +7 -0
  20. package/dist/cjs/parts/DSFilterBarActions/config/useValidateProps.js +40 -0
  21. package/dist/cjs/parts/DSFilterBarActions/config/useValidateProps.js.map +7 -0
  22. package/dist/cjs/parts/DSFilterBarActions/constants/index.js +45 -0
  23. package/dist/cjs/parts/DSFilterBarActions/constants/index.js.map +7 -0
  24. package/dist/cjs/parts/DSFilterBarActions/index.js +37 -0
  25. package/dist/cjs/parts/DSFilterBarActions/index.js.map +7 -0
  26. package/dist/cjs/parts/DSFilterBarActions/react-desc-prop-types.js +47 -0
  27. package/dist/cjs/parts/DSFilterBarActions/react-desc-prop-types.js.map +7 -0
  28. package/dist/cjs/parts/DSFilterBarContent/DSFilterBarContent.js +61 -0
  29. package/dist/cjs/parts/DSFilterBarContent/DSFilterBarContent.js.map +7 -0
  30. package/dist/cjs/parts/DSFilterBarContent/config/useFilterBarContent.js +66 -0
  31. package/dist/cjs/parts/DSFilterBarContent/config/useFilterBarContent.js.map +7 -0
  32. package/dist/cjs/parts/DSFilterBarContent/config/useValidateProps.js +40 -0
  33. package/dist/cjs/parts/DSFilterBarContent/config/useValidateProps.js.map +7 -0
  34. package/dist/cjs/parts/DSFilterBarContent/constants/index.js +45 -0
  35. package/dist/cjs/parts/DSFilterBarContent/constants/index.js.map +7 -0
  36. package/dist/cjs/parts/DSFilterBarContent/index.js +37 -0
  37. package/dist/cjs/parts/DSFilterBarContent/index.js.map +7 -0
  38. package/dist/cjs/parts/DSFilterBarContent/react-desc-prop-types.js +47 -0
  39. package/dist/cjs/parts/DSFilterBarContent/react-desc-prop-types.js.map +7 -0
  40. package/dist/cjs/parts/DSFilterBarMenuButton/DSFilterBarMenuButton.js +115 -0
  41. package/dist/cjs/parts/DSFilterBarMenuButton/DSFilterBarMenuButton.js.map +7 -0
  42. package/dist/cjs/parts/DSFilterBarMenuButton/config/useFilterBarMenuButton.js +69 -0
  43. package/dist/cjs/parts/DSFilterBarMenuButton/config/useFilterBarMenuButton.js.map +7 -0
  44. package/dist/cjs/parts/DSFilterBarMenuButton/config/useValidateProps.js +40 -0
  45. package/dist/cjs/parts/DSFilterBarMenuButton/config/useValidateProps.js.map +7 -0
  46. package/dist/cjs/parts/DSFilterBarMenuButton/constants/index.js +48 -0
  47. package/dist/cjs/parts/DSFilterBarMenuButton/constants/index.js.map +7 -0
  48. package/dist/cjs/parts/DSFilterBarMenuButton/index.js +37 -0
  49. package/dist/cjs/parts/DSFilterBarMenuButton/index.js.map +7 -0
  50. package/dist/cjs/parts/DSFilterBarMenuButton/react-desc-prop-types.js +69 -0
  51. package/dist/cjs/parts/DSFilterBarMenuButton/react-desc-prop-types.js.map +7 -0
  52. package/dist/cjs/react-desc-prop-types.js +50 -0
  53. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  54. package/dist/cjs/typescript-testing/DSFilterBarNamespace.js +112 -0
  55. package/dist/cjs/typescript-testing/DSFilterBarNamespace.js.map +7 -0
  56. package/dist/esm/DSFilterBar.js +53 -0
  57. package/dist/esm/DSFilterBar.js.map +7 -0
  58. package/dist/esm/config/useFilterBar.js +33 -0
  59. package/dist/esm/config/useFilterBar.js.map +7 -0
  60. package/dist/esm/config/useValidateProps.js +10 -0
  61. package/dist/esm/config/useValidateProps.js.map +7 -0
  62. package/dist/esm/constants/index.js +16 -0
  63. package/dist/esm/constants/index.js.map +7 -0
  64. package/dist/esm/hooks/react-desc-prop-types.js +14 -0
  65. package/dist/esm/hooks/react-desc-prop-types.js.map +7 -0
  66. package/dist/esm/hooks/useFilterBarPrevNextFocus.js +69 -0
  67. package/dist/esm/hooks/useFilterBarPrevNextFocus.js.map +7 -0
  68. package/dist/esm/index.js +22 -0
  69. package/dist/esm/index.js.map +7 -0
  70. package/dist/esm/package.json +10 -0
  71. package/dist/esm/parts/DSFilterBarActions/DSFilterBarActions.js +30 -0
  72. package/dist/esm/parts/DSFilterBarActions/DSFilterBarActions.js.map +7 -0
  73. package/dist/esm/parts/DSFilterBarActions/config/useFilterBarActions.js +41 -0
  74. package/dist/esm/parts/DSFilterBarActions/config/useFilterBarActions.js.map +7 -0
  75. package/dist/esm/parts/DSFilterBarActions/config/useValidateProps.js +10 -0
  76. package/dist/esm/parts/DSFilterBarActions/config/useValidateProps.js.map +7 -0
  77. package/dist/esm/parts/DSFilterBarActions/constants/index.js +15 -0
  78. package/dist/esm/parts/DSFilterBarActions/constants/index.js.map +7 -0
  79. package/dist/esm/parts/DSFilterBarActions/index.js +7 -0
  80. package/dist/esm/parts/DSFilterBarActions/index.js.map +7 -0
  81. package/dist/esm/parts/DSFilterBarActions/react-desc-prop-types.js +22 -0
  82. package/dist/esm/parts/DSFilterBarActions/react-desc-prop-types.js.map +7 -0
  83. package/dist/esm/parts/DSFilterBarContent/DSFilterBarContent.js +31 -0
  84. package/dist/esm/parts/DSFilterBarContent/DSFilterBarContent.js.map +7 -0
  85. package/dist/esm/parts/DSFilterBarContent/config/useFilterBarContent.js +41 -0
  86. package/dist/esm/parts/DSFilterBarContent/config/useFilterBarContent.js.map +7 -0
  87. package/dist/esm/parts/DSFilterBarContent/config/useValidateProps.js +10 -0
  88. package/dist/esm/parts/DSFilterBarContent/config/useValidateProps.js.map +7 -0
  89. package/dist/esm/parts/DSFilterBarContent/constants/index.js +15 -0
  90. package/dist/esm/parts/DSFilterBarContent/constants/index.js.map +7 -0
  91. package/dist/esm/parts/DSFilterBarContent/index.js +7 -0
  92. package/dist/esm/parts/DSFilterBarContent/index.js.map +7 -0
  93. package/dist/esm/parts/DSFilterBarContent/react-desc-prop-types.js +22 -0
  94. package/dist/esm/parts/DSFilterBarContent/react-desc-prop-types.js.map +7 -0
  95. package/dist/esm/parts/DSFilterBarMenuButton/DSFilterBarMenuButton.js +85 -0
  96. package/dist/esm/parts/DSFilterBarMenuButton/DSFilterBarMenuButton.js.map +7 -0
  97. package/dist/esm/parts/DSFilterBarMenuButton/config/useFilterBarMenuButton.js +47 -0
  98. package/dist/esm/parts/DSFilterBarMenuButton/config/useFilterBarMenuButton.js.map +7 -0
  99. package/dist/esm/parts/DSFilterBarMenuButton/config/useValidateProps.js +10 -0
  100. package/dist/esm/parts/DSFilterBarMenuButton/config/useValidateProps.js.map +7 -0
  101. package/dist/esm/parts/DSFilterBarMenuButton/constants/index.js +18 -0
  102. package/dist/esm/parts/DSFilterBarMenuButton/constants/index.js.map +7 -0
  103. package/dist/esm/parts/DSFilterBarMenuButton/index.js +7 -0
  104. package/dist/esm/parts/DSFilterBarMenuButton/index.js.map +7 -0
  105. package/dist/esm/parts/DSFilterBarMenuButton/react-desc-prop-types.js +39 -0
  106. package/dist/esm/parts/DSFilterBarMenuButton/react-desc-prop-types.js.map +7 -0
  107. package/dist/esm/react-desc-prop-types.js +25 -0
  108. package/dist/esm/react-desc-prop-types.js.map +7 -0
  109. package/dist/esm/typescript-testing/DSFilterBarNamespace.js +89 -0
  110. package/dist/esm/typescript-testing/DSFilterBarNamespace.js.map +7 -0
  111. package/dist/types/DSFilterBar.d.ts +5 -0
  112. package/dist/types/config/useFilterBar.d.ts +378 -0
  113. package/dist/types/config/useValidateProps.d.ts +3 -0
  114. package/dist/types/constants/index.d.ts +13 -0
  115. package/dist/types/hooks/react-desc-prop-types.d.ts +17 -0
  116. package/dist/types/hooks/useFilterBarPrevNextFocus.d.ts +9 -0
  117. package/dist/types/index.d.ts +8 -0
  118. package/dist/types/parts/DSFilterBarActions/DSFilterBarActions.d.ts +5 -0
  119. package/dist/types/parts/DSFilterBarActions/config/useFilterBarActions.d.ts +377 -0
  120. package/dist/types/parts/DSFilterBarActions/config/useValidateProps.d.ts +3 -0
  121. package/dist/types/parts/DSFilterBarActions/constants/index.d.ts +9 -0
  122. package/dist/types/parts/DSFilterBarActions/index.d.ts +1 -0
  123. package/dist/types/parts/DSFilterBarActions/react-desc-prop-types.d.ts +19 -0
  124. package/dist/types/parts/DSFilterBarActions/tests/DSFilterBarActions.test.d.ts +1 -0
  125. package/dist/types/parts/DSFilterBarContent/DSFilterBarContent.d.ts +5 -0
  126. package/dist/types/parts/DSFilterBarContent/config/useFilterBarContent.d.ts +377 -0
  127. package/dist/types/parts/DSFilterBarContent/config/useValidateProps.d.ts +3 -0
  128. package/dist/types/parts/DSFilterBarContent/constants/index.d.ts +9 -0
  129. package/dist/types/parts/DSFilterBarContent/index.d.ts +1 -0
  130. package/dist/types/parts/DSFilterBarContent/react-desc-prop-types.d.ts +19 -0
  131. package/dist/types/parts/DSFilterBarContent/tests/DSFilterBarContent.test.d.ts +1 -0
  132. package/dist/types/parts/DSFilterBarMenuButton/DSFilterBarMenuButton.d.ts +5 -0
  133. package/dist/types/parts/DSFilterBarMenuButton/config/useFilterBarMenuButton.d.ts +378 -0
  134. package/dist/types/parts/DSFilterBarMenuButton/config/useValidateProps.d.ts +3 -0
  135. package/dist/types/parts/DSFilterBarMenuButton/constants/index.d.ts +9 -0
  136. package/dist/types/parts/DSFilterBarMenuButton/index.d.ts +1 -0
  137. package/dist/types/parts/DSFilterBarMenuButton/react-desc-prop-types.d.ts +32 -0
  138. package/dist/types/parts/DSFilterBarMenuButton/tests/DSFilterBarMenuButton.test.d.ts +1 -0
  139. package/dist/types/react-desc-prop-types.d.ts +20 -0
  140. package/dist/types/tests/DSFilterBar.axe.test.d.ts +1 -0
  141. package/dist/types/tests/DSFilterBar.data-testid.test.d.ts +1 -0
  142. package/dist/types/tests/DSFilterBar.exports.test.d.ts +1 -0
  143. package/dist/types/tests/DSFilterBar.test.d.ts +1 -0
  144. package/dist/types/typescript-testing/DSFilterBarNamespace.d.ts +1 -0
  145. package/package.json +76 -0
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import {
3
+ PropTypes,
4
+ getPropsPerSlotPropTypes,
5
+ globalAttributesPropTypes,
6
+ xstyledPropTypes
7
+ } from "@elliemae/ds-props-helpers";
8
+ import { DSFilterBarName, FILTER_BAR_ACTIONS_SLOTS } from "./constants/index.js";
9
+ const defaultProps = {};
10
+ const DSFilterBarActionsPropTypes = {
11
+ ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_ACTIONS_SLOTS),
12
+ ...globalAttributesPropTypes,
13
+ ...xstyledPropTypes,
14
+ children: PropTypes.node.isRequired.description("The content of the filter bar actions, typically action buttons")
15
+ };
16
+ const DSFilterBarActionsPropTypesSchema = DSFilterBarActionsPropTypes;
17
+ export {
18
+ DSFilterBarActionsPropTypes,
19
+ DSFilterBarActionsPropTypesSchema,
20
+ defaultProps
21
+ };
22
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarActions/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\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 { DSFilterBarName, FILTER_BAR_ACTIONS_SLOTS } from './constants/index.js';\n\nexport declare namespace DSFilterBarActionsT {\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFilterBarName, typeof FILTER_BAR_ACTIONS_SLOTS> {}\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps | 'children'>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps | 'children'>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSFilterBarActionsT.DefaultProps = {};\n\nexport const DSFilterBarActionsPropTypes: DSPropTypesSchema<DSFilterBarActionsT.Props> = {\n ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_ACTIONS_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.isRequired.description('The content of the filter bar actions, typically action buttons'),\n};\n\nexport const DSFilterBarActionsPropTypesSchema =\n DSFilterBarActionsPropTypes as unknown as ValidationMap<DSFilterBarActionsT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB,gCAAgC;AA0BnD,MAAM,eAAiD,CAAC;AAExD,MAAM,8BAA4E;AAAA,EACvF,GAAG,yBAAyB,iBAAiB,wBAAwB;AAAA,EACrE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,KAAK,WAAW,YAAY,iEAAiE;AACnH;AAEO,MAAM,oCACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { describe } from "@elliemae/ds-props-helpers";
4
+ import { styled } from "@elliemae/ds-system";
5
+ import { DSFilterBarContentPropTypesSchema } from "./react-desc-prop-types.js";
6
+ import { useFilterBarContent } from "./config/useFilterBarContent.js";
7
+ import { FILTER_BAR_CONTENT_SLOTS, DSFilterBarContentName, DSFilterBarName } from "./constants/index.js";
8
+ const StyledWrapper = styled("div", { name: DSFilterBarName, slot: FILTER_BAR_CONTENT_SLOTS.CONTENT })`
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ gap: 8px;
12
+ align-items: center;
13
+ min-width: 0;
14
+ `;
15
+ const DSFilterBarContent = (props) => {
16
+ const {
17
+ propsWithDefault: { children },
18
+ xstyledProps,
19
+ globalProps,
20
+ ownerProps
21
+ } = useFilterBarContent(props);
22
+ return /* @__PURE__ */ jsx(StyledWrapper, { ...xstyledProps, ...globalProps, ...ownerProps, children });
23
+ };
24
+ DSFilterBarContent.displayName = DSFilterBarContentName;
25
+ const DSFilterBarContentWithSchema = describe(DSFilterBarContent);
26
+ DSFilterBarContentWithSchema.propTypes = DSFilterBarContentPropTypesSchema;
27
+ export {
28
+ DSFilterBarContent,
29
+ DSFilterBarContentWithSchema
30
+ };
31
+ //# sourceMappingURL=DSFilterBarContent.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarContent/DSFilterBarContent.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { type DSFilterBarContentT, DSFilterBarContentPropTypesSchema } from './react-desc-prop-types.js';\nimport { useFilterBarContent } from './config/useFilterBarContent.js';\nimport { FILTER_BAR_CONTENT_SLOTS, DSFilterBarContentName, DSFilterBarName } from './constants/index.js';\n\nconst StyledWrapper = styled('div', { name: DSFilterBarName, slot: FILTER_BAR_CONTENT_SLOTS.CONTENT })`\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: center;\n min-width: 0;\n`;\n\nconst DSFilterBarContent: React.ComponentType<DSFilterBarContentT.Props> = (props) => {\n const {\n propsWithDefault: { children },\n xstyledProps,\n globalProps,\n ownerProps,\n } = useFilterBarContent(props);\n\n return (\n <StyledWrapper {...xstyledProps} {...globalProps} {...ownerProps}>\n {children}\n </StyledWrapper>\n );\n};\n\nDSFilterBarContent.displayName = DSFilterBarContentName;\nconst DSFilterBarContentWithSchema = describe(DSFilterBarContent);\nDSFilterBarContentWithSchema.propTypes = DSFilterBarContentPropTypesSchema;\n\nexport { DSFilterBarContent, DSFilterBarContentWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACwBnB;AAvBJ,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAmC,yCAAyC;AAC5E,SAAS,2BAA2B;AACpC,SAAS,0BAA0B,wBAAwB,uBAAuB;AAElF,MAAM,gBAAgB,OAAO,OAAO,EAAE,MAAM,iBAAiB,MAAM,yBAAyB,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQrG,MAAM,qBAAqE,CAAC,UAAU;AACpF,QAAM;AAAA,IACJ,kBAAkB,EAAE,SAAS;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,oBAAoB,KAAK;AAE7B,SACE,oBAAC,iBAAe,GAAG,cAAe,GAAG,aAAc,GAAG,YACnD,UACH;AAEJ;AAEA,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,41 @@
1
+ import * as React from "react";
2
+ import {
3
+ useGetGlobalAttributes,
4
+ useGetXstyledProps,
5
+ useMemoMergePropsWithDefault,
6
+ useOwnerProps
7
+ } from "@elliemae/ds-props-helpers";
8
+ import React2 from "react";
9
+ import { uid } from "uid";
10
+ import { DSFilterBarContentPropTypesSchema, defaultProps } from "../react-desc-prop-types.js";
11
+ import { useValidateProps } from "./useValidateProps.js";
12
+ const useFilterBarContent = (propsFromUser) => {
13
+ const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
14
+ useValidateProps(propsWithDefault, DSFilterBarContentPropTypesSchema);
15
+ const globalProps = useGetGlobalAttributes(propsWithDefault);
16
+ const xstyledProps = useGetXstyledProps(propsWithDefault);
17
+ const ownerProps = useOwnerProps(propsWithDefault);
18
+ const instanceUid = React2.useMemo(() => `ds-filter-bar-content-${uid(5)}`, []);
19
+ return React2.useMemo(
20
+ () => ({
21
+ propsWithDefault,
22
+ xstyledProps,
23
+ globalProps,
24
+ instanceUid,
25
+ ownerProps
26
+ // ...eventHandlers,
27
+ }),
28
+ [
29
+ propsWithDefault,
30
+ xstyledProps,
31
+ globalProps,
32
+ instanceUid,
33
+ ownerProps
34
+ // eventHandlers,
35
+ ]
36
+ );
37
+ };
38
+ export {
39
+ useFilterBarContent
40
+ };
41
+ //# sourceMappingURL=useFilterBarContent.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarContent/config/useFilterBarContent.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { type DSFilterBarContentT, DSFilterBarContentPropTypesSchema, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useFilterBarContent = (propsFromUser: DSFilterBarContentT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFilterBarContentT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSFilterBarContentPropTypesSchema);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSFilterBarContentT.InternalProps, HTMLElement>(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const ownerProps = useOwnerProps<DSFilterBarContentT.InternalProps>(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-filter-bar-content-${uid(5)}`, []);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n ownerProps,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n ownerProps,\n // eventHandlers,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAOA,YAAW;AAClB,SAAS,WAAW;AACpB,SAAmC,mCAAmC,oBAAoB;AAC1F,SAAS,wBAAwB;AAE1B,MAAM,sBAAsB,CAAC,kBAA6C;AAI/E,QAAM,mBAAmB,6BAAgE,eAAe,YAAY;AACpH,mBAAiB,kBAAkB,iCAAiC;AAIpE,QAAM,cAAc,uBAAuE,gBAAgB;AAC3G,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,aAAa,cAAiD,gBAAgB;AAKpF,QAAM,cAAcA,OAAM,QAAQ,MAAM,yBAAyB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAO7E,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
3
+ import { DSFilterBarContentName } from "../constants/index.js";
4
+ const useValidateProps = (props, propTypes) => {
5
+ useValidateTypescriptPropTypes(props, propTypes, DSFilterBarContentName);
6
+ };
7
+ export {
8
+ useValidateProps
9
+ };
10
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarContent/config/useValidateProps.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSFilterBarContentT } from '../react-desc-prop-types.js';\nimport { DSFilterBarContentName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSFilterBarContentT.InternalProps,\n propTypes: ValidationMap<DSFilterBarContentT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFilterBarContentName);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,8BAA8B;AAEhC,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,sBAAsB;AACzE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ import { DSFilterBarName } from "../../../constants/index.js";
4
+ const DSFilterBarContentName = "DSFilterBarContent";
5
+ const FILTER_BAR_CONTENT_SLOTS = {
6
+ CONTENT: "content"
7
+ };
8
+ const FILTER_BAR_CONTENT_DATA_TESTID = slotObjectToDataTestIds(DSFilterBarName, FILTER_BAR_CONTENT_SLOTS);
9
+ export {
10
+ DSFilterBarContentName,
11
+ DSFilterBarName,
12
+ FILTER_BAR_CONTENT_DATA_TESTID,
13
+ FILTER_BAR_CONTENT_SLOTS
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarContent/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSFilterBarName } from '../../../constants/index.js';\nexport { DSFilterBarName };\n\n// This should be used only for displayName, and useValidateProps.\n// For slots definition, use parent component name\nexport const DSFilterBarContentName = 'DSFilterBarContent';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FILTER_BAR_CONTENT_SLOTS = {\n CONTENT: 'content',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FILTER_BAR_CONTENT_DATA_TESTID = slotObjectToDataTestIds(DSFilterBarName, FILTER_BAR_CONTENT_SLOTS);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AACxC,SAAS,uBAAuB;AAKzB,MAAM,yBAAyB;AAG/B,MAAM,2BAA2B;AAAA,EACtC,SAAS;AACX;AAGO,MAAM,iCAAiC,wBAAwB,iBAAiB,wBAAwB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { DSFilterBarContent, DSFilterBarContentWithSchema } from "./DSFilterBarContent.js";
3
+ export {
4
+ DSFilterBarContent,
5
+ DSFilterBarContentWithSchema
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarContent/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSFilterBarContent, DSFilterBarContentWithSchema } from './DSFilterBarContent.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oBAAoB,oCAAoC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import {
3
+ PropTypes,
4
+ getPropsPerSlotPropTypes,
5
+ globalAttributesPropTypes,
6
+ xstyledPropTypes
7
+ } from "@elliemae/ds-props-helpers";
8
+ import { DSFilterBarName, FILTER_BAR_CONTENT_SLOTS } from "./constants/index.js";
9
+ const defaultProps = {};
10
+ const DSFilterBarContentPropTypes = {
11
+ ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_CONTENT_SLOTS),
12
+ ...globalAttributesPropTypes,
13
+ ...xstyledPropTypes,
14
+ children: PropTypes.node.isRequired.description("The content of the filter bar, typically Pills components")
15
+ };
16
+ const DSFilterBarContentPropTypesSchema = DSFilterBarContentPropTypes;
17
+ export {
18
+ DSFilterBarContentPropTypes,
19
+ DSFilterBarContentPropTypesSchema,
20
+ defaultProps
21
+ };
22
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarContent/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\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 { DSFilterBarName, FILTER_BAR_CONTENT_SLOTS } from './constants/index.js';\n\nexport declare namespace DSFilterBarContentT {\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFilterBarName, typeof FILTER_BAR_CONTENT_SLOTS> {}\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps | 'children'>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps | 'children'>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSFilterBarContentT.DefaultProps = {};\n\nexport const DSFilterBarContentPropTypes: DSPropTypesSchema<DSFilterBarContentT.Props> = {\n ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_CONTENT_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.isRequired.description('The content of the filter bar, typically Pills components'),\n};\n\nexport const DSFilterBarContentPropTypesSchema =\n DSFilterBarContentPropTypes as unknown as ValidationMap<DSFilterBarContentT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB,gCAAgC;AA0BnD,MAAM,eAAiD,CAAC;AAExD,MAAM,8BAA4E;AAAA,EACvF,GAAG,yBAAyB,iBAAiB,wBAAwB;AAAA,EACrE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,KAAK,WAAW,YAAY,2DAA2D;AAC7G;AAEO,MAAM,oCACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,85 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { DSMenuButton, MENU_ITEMS_TYPES } from "@elliemae/ds-menu-button";
4
+ import { describe } from "@elliemae/ds-props-helpers";
5
+ import { styled } from "@elliemae/ds-system";
6
+ import { useMemo } from "react";
7
+ import { MoreOptionsVert } from "@elliemae/ds-icons";
8
+ import { useFilterBarMenuButton } from "./config/useFilterBarMenuButton.js";
9
+ import { DSFilterBarMenuButtonName, DSFilterBarName, FILTER_BAR_MENU_BUTTON_SLOTS } from "./constants/index.js";
10
+ import { DSFilterBarMenuButtonPropTypesSchema } from "./react-desc-prop-types.js";
11
+ const StyledDSMenuButton = styled(DSMenuButton, {
12
+ name: DSFilterBarName,
13
+ slot: FILTER_BAR_MENU_BUTTON_SLOTS.MENU_BUTTON
14
+ })``;
15
+ const DSFilterBarMenuButton = (props) => {
16
+ const {
17
+ propsWithDefault: { onClearFilters, options = [], innerRef, onItemSelected, onActivateItem, selectedItems },
18
+ globalProps,
19
+ ownerProps
20
+ } = useFilterBarMenuButton(props);
21
+ const menuButtonOptions = useMemo(
22
+ () => [
23
+ {
24
+ type: MENU_ITEMS_TYPES.ACTIVABLE_ITEM,
25
+ dsId: "__internal__option__clear__filters",
26
+ label: "Clear Filters",
27
+ value: "clear",
28
+ onClick: onClearFilters,
29
+ onKeyDown: (e) => {
30
+ if (["Enter", "Space"].includes(e.code)) {
31
+ e.preventDefault();
32
+ onClearFilters();
33
+ }
34
+ return null;
35
+ }
36
+ },
37
+ ...options.map((option) => {
38
+ if (option.type !== MENU_ITEMS_TYPES.SEPARATOR && option.type !== MENU_ITEMS_TYPES.GROUP && option.type !== MENU_ITEMS_TYPES.SKELETON_ITEM) {
39
+ return {
40
+ ...option,
41
+ onKeyDown: (e) => {
42
+ if (["Enter", "Space"].includes(e.code)) {
43
+ e.preventDefault();
44
+ if (typeof option?.onClick === "function") {
45
+ option.onClick(e);
46
+ }
47
+ }
48
+ return null;
49
+ }
50
+ };
51
+ }
52
+ return option;
53
+ })
54
+ ],
55
+ [options, onClearFilters]
56
+ );
57
+ return /* @__PURE__ */ jsx(
58
+ StyledDSMenuButton,
59
+ {
60
+ buttonType: "icon",
61
+ options: menuButtonOptions,
62
+ innerRef,
63
+ "aria-label": "Filter bar actions",
64
+ onClose: () => {
65
+ innerRef?.current?.focus?.();
66
+ },
67
+ onActivateItem: onActivateItem ?? (() => {
68
+ }),
69
+ onItemSelected: onItemSelected ?? (() => {
70
+ }),
71
+ selectedItems: selectedItems ?? [],
72
+ ...globalProps,
73
+ ...ownerProps,
74
+ children: /* @__PURE__ */ jsx(MoreOptionsVert, {})
75
+ }
76
+ );
77
+ };
78
+ DSFilterBarMenuButton.displayName = DSFilterBarMenuButtonName;
79
+ const DSFilterBarMenuButtonWithSchema = describe(DSFilterBarMenuButton);
80
+ DSFilterBarMenuButtonWithSchema.propTypes = DSFilterBarMenuButtonPropTypesSchema;
81
+ export {
82
+ DSFilterBarMenuButton,
83
+ DSFilterBarMenuButtonWithSchema
84
+ };
85
+ //# sourceMappingURL=DSFilterBarMenuButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarMenuButton/DSFilterBarMenuButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSMenuButton, MENU_ITEMS_TYPES, type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport React, { useMemo } from 'react';\n\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { useFilterBarMenuButton } from './config/useFilterBarMenuButton.js';\nimport { DSFilterBarMenuButtonName, DSFilterBarName, FILTER_BAR_MENU_BUTTON_SLOTS } from './constants/index.js';\nimport { DSFilterBarMenuButtonPropTypesSchema, type DSFilterBarMenuButtonT } from './react-desc-prop-types.js';\n\nconst StyledDSMenuButton = styled(DSMenuButton, {\n name: DSFilterBarName,\n slot: FILTER_BAR_MENU_BUTTON_SLOTS.MENU_BUTTON,\n})``;\n\nconst DSFilterBarMenuButton: React.ComponentType<DSFilterBarMenuButtonT.Props> = (props) => {\n const {\n propsWithDefault: { onClearFilters, options = [], innerRef, onItemSelected, onActivateItem, selectedItems },\n globalProps,\n ownerProps,\n } = useFilterBarMenuButton(props);\n const menuButtonOptions: DSMenuButtonT.MenuItemInterface[] = useMemo(\n () => [\n {\n type: MENU_ITEMS_TYPES.ACTIVABLE_ITEM,\n dsId: '__internal__option__clear__filters',\n label: 'Clear Filters',\n value: 'clear',\n onClick: onClearFilters,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (['Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n onClearFilters();\n }\n return null;\n },\n },\n ...options.map((option) => {\n if (\n option.type !== MENU_ITEMS_TYPES.SEPARATOR &&\n option.type !== MENU_ITEMS_TYPES.GROUP &&\n option.type !== MENU_ITEMS_TYPES.SKELETON_ITEM\n ) {\n return {\n ...option,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (['Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n if (typeof option?.onClick === 'function') {\n option.onClick(e);\n }\n }\n return null;\n },\n };\n }\n return option;\n }),\n ],\n [options, onClearFilters],\n );\n return (\n <StyledDSMenuButton\n buttonType=\"icon\"\n options={menuButtonOptions}\n innerRef={innerRef}\n aria-label=\"Filter bar actions\"\n onClose={() => {\n innerRef?.current?.focus?.();\n }}\n onActivateItem={onActivateItem ?? (() => {})}\n onItemSelected={onItemSelected ?? (() => {})}\n selectedItems={selectedItems ?? []}\n {...globalProps}\n {...ownerProps}\n >\n <MoreOptionsVert />\n </StyledDSMenuButton>\n );\n};\n\nDSFilterBarMenuButton.displayName = DSFilterBarMenuButtonName;\nconst DSFilterBarMenuButtonWithSchema = describe(DSFilterBarMenuButton);\nDSFilterBarMenuButtonWithSchema.propTypes = DSFilterBarMenuButtonPropTypesSchema;\n\nexport { DSFilterBarMenuButton, DSFilterBarMenuButtonWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4EjB;AA5EN,SAAS,cAAc,wBAA4C;AACnE,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAgB,eAAe;AAE/B,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,2BAA2B,iBAAiB,oCAAoC;AACzF,SAAS,4CAAyE;AAElF,MAAM,qBAAqB,OAAO,cAAc;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,6BAA6B;AACrC,CAAC;AAED,MAAM,wBAA2E,CAAC,UAAU;AAC1F,QAAM;AAAA,IACJ,kBAAkB,EAAE,gBAAgB,UAAU,CAAC,GAAG,UAAU,gBAAgB,gBAAgB,cAAc;AAAA,IAC1G;AAAA,IACA;AAAA,EACF,IAAI,uBAAuB,KAAK;AAChC,QAAM,oBAAuD;AAAA,IAC3D,MAAM;AAAA,MACJ;AAAA,QACE,MAAM,iBAAiB;AAAA,QACvB,MAAM;AAAA,QACN,OAAO;AAAA,QACP,OAAO;AAAA,QACP,SAAS;AAAA,QACT,WAAW,CAAC,MAA2B;AACrC,cAAI,CAAC,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG;AACvC,cAAE,eAAe;AACjB,2BAAe;AAAA,UACjB;AACA,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,MACA,GAAG,QAAQ,IAAI,CAAC,WAAW;AACzB,YACE,OAAO,SAAS,iBAAiB,aACjC,OAAO,SAAS,iBAAiB,SACjC,OAAO,SAAS,iBAAiB,eACjC;AACA,iBAAO;AAAA,YACL,GAAG;AAAA,YACH,WAAW,CAAC,MAA2B;AACrC,kBAAI,CAAC,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG;AACvC,kBAAE,eAAe;AACjB,oBAAI,OAAO,QAAQ,YAAY,YAAY;AACzC,yBAAO,QAAQ,CAAC;AAAA,gBAClB;AAAA,cACF;AACA,qBAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AACA,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAC,SAAS,cAAc;AAAA,EAC1B;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,cAAW;AAAA,MACX,SAAS,MAAM;AACb,kBAAU,SAAS,QAAQ;AAAA,MAC7B;AAAA,MACA,gBAAgB,mBAAmB,MAAM;AAAA,MAAC;AAAA,MAC1C,gBAAgB,mBAAmB,MAAM;AAAA,MAAC;AAAA,MAC1C,eAAe,iBAAiB,CAAC;AAAA,MAChC,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ,8BAAC,mBAAgB;AAAA;AAAA,EACnB;AAEJ;AAEA,sBAAsB,cAAc;AACpC,MAAM,kCAAkC,SAAS,qBAAqB;AACtE,gCAAgC,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import {
3
+ useGetGlobalAttributes,
4
+ useGetXstyledProps,
5
+ useMemoMergePropsWithDefault,
6
+ useOwnerProps
7
+ } from "@elliemae/ds-props-helpers";
8
+ import React2 from "react";
9
+ import { uid } from "uid";
10
+ import {
11
+ DSFilterBarMenuButtonPropTypesSchema,
12
+ defaultProps
13
+ } from "../react-desc-prop-types.js";
14
+ import { useValidateProps } from "./useValidateProps.js";
15
+ const useFilterBarMenuButton = (propsFromUser) => {
16
+ const propsWithDefault = useMemoMergePropsWithDefault(
17
+ propsFromUser,
18
+ defaultProps
19
+ );
20
+ useValidateProps(propsWithDefault, DSFilterBarMenuButtonPropTypesSchema);
21
+ const globalProps = useGetGlobalAttributes(propsWithDefault);
22
+ const xstyledProps = useGetXstyledProps(propsWithDefault);
23
+ const ownerProps = useOwnerProps(propsWithDefault);
24
+ const instanceUid = React2.useMemo(() => `ds-filter-bar-menu-button-${uid(5)}`, []);
25
+ return React2.useMemo(
26
+ () => ({
27
+ propsWithDefault,
28
+ xstyledProps,
29
+ globalProps,
30
+ instanceUid,
31
+ ownerProps
32
+ // ...eventHandlers,
33
+ }),
34
+ [
35
+ propsWithDefault,
36
+ xstyledProps,
37
+ globalProps,
38
+ instanceUid,
39
+ ownerProps
40
+ // eventHandlers,
41
+ ]
42
+ );
43
+ };
44
+ export {
45
+ useFilterBarMenuButton
46
+ };
47
+ //# sourceMappingURL=useFilterBarMenuButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarMenuButton/config/useFilterBarMenuButton.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSButtonV3T } from '@elliemae/ds-button-v2';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport {\n type DSFilterBarMenuButtonT,\n DSFilterBarMenuButtonPropTypesSchema,\n defaultProps,\n} from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useFilterBarMenuButton = (propsFromUser: DSFilterBarMenuButtonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFilterBarMenuButtonT.InternalProps>(\n propsFromUser,\n defaultProps,\n );\n useValidateProps(propsWithDefault, DSFilterBarMenuButtonPropTypesSchema);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<\n DSFilterBarMenuButtonT.InternalProps,\n HTMLButtonElement,\n DSButtonV3T.Props\n >(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const ownerProps = useOwnerProps<DSFilterBarMenuButtonT.InternalProps>(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-filter-bar-menu-button-${uid(5)}`, []);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n ownerProps,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n ownerProps,\n // eventHandlers,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAOA,YAAW;AAClB,SAAS,WAAW;AACpB;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AAE1B,MAAM,yBAAyB,CAAC,kBAAgD;AAIrF,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,mBAAiB,kBAAkB,oCAAoC;AAIvE,QAAM,cAAc,uBAIlB,gBAAgB;AAClB,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,aAAa,cAAoD,gBAAgB;AAKvF,QAAM,cAAcA,OAAM,QAAQ,MAAM,6BAA6B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAOjF,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
3
+ import { DSFilterBarMenuButtonName } from "../constants/index.js";
4
+ const useValidateProps = (props, propTypes) => {
5
+ useValidateTypescriptPropTypes(props, propTypes, DSFilterBarMenuButtonName);
6
+ };
7
+ export {
8
+ useValidateProps
9
+ };
10
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarMenuButton/config/useValidateProps.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSFilterBarMenuButtonT } from '../react-desc-prop-types.js';\nimport { DSFilterBarMenuButtonName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSFilterBarMenuButtonT.InternalProps,\n propTypes: ValidationMap<DSFilterBarMenuButtonT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFilterBarMenuButtonName);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,iCAAiC;AAEnC,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,yBAAyB;AAC5E;",
6
+ "names": []
7
+ }
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ import { DSFilterBarName } from "../../../constants/index.js";
4
+ const DSFilterBarMenuButtonName = "DSFilterBarMenuButton";
5
+ const FILTER_BAR_MENU_BUTTON_SLOTS = {
6
+ MENU_BUTTON: "menu-button"
7
+ };
8
+ const FILTER_BAR_MENU_BUTTON_DATA_TESTID = slotObjectToDataTestIds(
9
+ DSFilterBarName,
10
+ FILTER_BAR_MENU_BUTTON_SLOTS
11
+ );
12
+ export {
13
+ DSFilterBarMenuButtonName,
14
+ DSFilterBarName,
15
+ FILTER_BAR_MENU_BUTTON_DATA_TESTID,
16
+ FILTER_BAR_MENU_BUTTON_SLOTS
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarMenuButton/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSFilterBarName } from '../../../constants/index.js';\nexport { DSFilterBarName };\n\n// This should be used only for displayName, and useValidateProps.\n// For slots definition, use parent component name\nexport const DSFilterBarMenuButtonName = 'DSFilterBarMenuButton';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FILTER_BAR_MENU_BUTTON_SLOTS = {\n MENU_BUTTON: 'menu-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FILTER_BAR_MENU_BUTTON_DATA_TESTID = slotObjectToDataTestIds(\n DSFilterBarName,\n FILTER_BAR_MENU_BUTTON_SLOTS,\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AACxC,SAAS,uBAAuB;AAKzB,MAAM,4BAA4B;AAGlC,MAAM,+BAA+B;AAAA,EAC1C,aAAa;AACf;AAGO,MAAM,qCAAqC;AAAA,EAChD;AAAA,EACA;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { DSFilterBarMenuButton, DSFilterBarMenuButtonWithSchema } from "./DSFilterBarMenuButton.js";
3
+ export {
4
+ DSFilterBarMenuButton,
5
+ DSFilterBarMenuButtonWithSchema
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarMenuButton/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSFilterBarMenuButton, DSFilterBarMenuButtonWithSchema } from './DSFilterBarMenuButton.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,uBAAuB,uCAAuC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,39 @@
1
+ import * as React from "react";
2
+ import { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
3
+ import { DSFilterBarName, FILTER_BAR_MENU_BUTTON_SLOTS } from "./constants/index.js";
4
+ const defaultProps = {
5
+ options: []
6
+ };
7
+ const DSFilterBarMenuButtonPropTypes = {
8
+ ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_MENU_BUTTON_SLOTS),
9
+ ...globalAttributesPropTypes,
10
+ onClearFilters: PropTypes.func.isRequired.description(
11
+ 'Callback function to clear all filters, triggered by the "Clear Filters" option in the menu'
12
+ ),
13
+ options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).description(
14
+ "The options to display in the menu, following the same structure as DSMenuButton options"
15
+ ),
16
+ innerRef: PropTypes.object.description("Ref to the menu button element, used for focus management"),
17
+ selectedItems: PropTypes.arrayOf(PropTypes.object).description(
18
+ "an array of tree-nodes or tree-items that have to be marked as selected in the GUI, required if the menu has selectionable items"
19
+ ),
20
+ onItemSelected: PropTypes.func.description(
21
+ "IoC function in charge of handling the selection of a menu item, required if the menu has selectionable items"
22
+ ).signature(`((
23
+ newSelection: DSMenuButtonT.PseudoFocusableMenuNodes[],
24
+ metainfo: { itemNode: DSMenuButtonT.PseudoFocusableMenuNodes; event?: React.SyntheticEvent },
25
+ ) => void)`),
26
+ onActivateItem: PropTypes.func.description(
27
+ "IoC function in charge of handling the activation (NOT INVOKED ON SELECTION) of a menu item, required if the menu has activable items"
28
+ ).signature(`((
29
+ itemNode: DSMenuButtonT.PseudoFocusableMenuNodes,
30
+ metainfo: { itemNode: DSMenuButtonT.PseudoFocusableMenuNodes; event?: React.SyntheticEvent },
31
+ ) => void)`)
32
+ };
33
+ const DSFilterBarMenuButtonPropTypesSchema = DSFilterBarMenuButtonPropTypes;
34
+ export {
35
+ DSFilterBarMenuButtonPropTypes,
36
+ DSFilterBarMenuButtonPropTypesSchema,
37
+ defaultProps
38
+ };
39
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarMenuButton/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSFilterBarName, FILTER_BAR_MENU_BUTTON_SLOTS } from './constants/index.js';\n\nexport declare namespace DSFilterBarMenuButtonT {\n export interface RequiredProps {\n onClearFilters: TypescriptHelpersT.GenericFunc;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFilterBarName, typeof FILTER_BAR_MENU_BUTTON_SLOTS> {\n options?: DSMenuButtonT.MenuItemInterface[];\n innerRef?: React.RefObject<HTMLButtonElement>;\n onItemSelected?: (\n newSelection: DSMenuButtonT.SelectionableMenuNodes[],\n metainfo: { itemNode: DSMenuButtonT.SelectionableMenuNodes; event?: React.SyntheticEvent },\n ) => void | TypescriptHelpersT.StateSetter<DSMenuButtonT.SelectionableMenuNodes[]>;\n onActivateItem?: (\n itemNode: DSMenuButtonT.PseudoFocusableMenuNodes,\n metainfo: { itemNode: DSMenuButtonT.PseudoFocusableMenuNodes; event?: React.SyntheticEvent },\n ) => void;\n [key: string]: unknown;\n selectedItems?: DSMenuButtonT.SelectionableMenuNodes[] | DSMenuButtonT.SelectionableMenuItemInterface[];\n }\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof XstyledProps | 'type'>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof XstyledProps | 'type'>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSFilterBarMenuButtonT.DefaultProps = {\n options: [],\n};\n\nexport const DSFilterBarMenuButtonPropTypes: DSPropTypesSchema<DSFilterBarMenuButtonT.Props> = {\n ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_MENU_BUTTON_SLOTS),\n ...globalAttributesPropTypes,\n onClearFilters: PropTypes.func.isRequired.description(\n 'Callback function to clear all filters, triggered by the \"Clear Filters\" option in the menu',\n ),\n options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).description(\n 'The options to display in the menu, following the same structure as DSMenuButton options',\n ),\n innerRef: PropTypes.object.description('Ref to the menu button element, used for focus management'),\n selectedItems: PropTypes.arrayOf(PropTypes.object).description(\n 'an array of tree-nodes or tree-items that have to be marked as selected in the GUI, required if the menu has selectionable items',\n ),\n onItemSelected: PropTypes.func.description(\n 'IoC function in charge of handling the selection of a menu item, required if the menu has selectionable items',\n ).signature(`((\n newSelection: DSMenuButtonT.PseudoFocusableMenuNodes[],\n metainfo: { itemNode: DSMenuButtonT.PseudoFocusableMenuNodes; event?: React.SyntheticEvent },\n ) => void)`),\n onActivateItem: PropTypes.func.description(\n 'IoC function in charge of handling the activation (NOT INVOKED ON SELECTION) of a menu item, required if the menu has activable items',\n ).signature(`((\n itemNode: DSMenuButtonT.PseudoFocusableMenuNodes,\n metainfo: { itemNode: DSMenuButtonT.PseudoFocusableMenuNodes; event?: React.SyntheticEvent },\n ) => void)`),\n};\n\nexport const DSFilterBarMenuButtonPropTypesSchema =\n DSFilterBarMenuButtonPropTypes as unknown as ValidationMap<DSFilterBarMenuButtonT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,0BAA0B,iCAAiC;AAE/E,SAAS,iBAAiB,oCAAoC;AAqCvD,MAAM,eAAoD;AAAA,EAC/D,SAAS,CAAC;AACZ;AAEO,MAAM,iCAAkF;AAAA,EAC7F,GAAG,yBAAyB,iBAAiB,4BAA4B;AAAA,EACzE,GAAG;AAAA,EACH,gBAAgB,UAAU,KAAK,WAAW;AAAA,IACxC;AAAA,EACF;AAAA,EACA,SAAS,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC,EAAE;AAAA,IAChE;AAAA,EACF;AAAA,EACA,UAAU,UAAU,OAAO,YAAY,2DAA2D;AAAA,EAClG,eAAe,UAAU,QAAQ,UAAU,MAAM,EAAE;AAAA,IACjD;AAAA,EACF;AAAA,EACA,gBAAgB,UAAU,KAAK;AAAA,IAC7B;AAAA,EACF,EAAE,UAAU;AAAA;AAAA;AAAA,eAGC;AAAA,EACb,gBAAgB,UAAU,KAAK;AAAA,IAC7B;AAAA,EACF,EAAE,UAAU;AAAA;AAAA;AAAA,eAGC;AACf;AAEO,MAAM,uCACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import {
3
+ getPropsPerSlotPropTypes,
4
+ globalAttributesPropTypes,
5
+ PropTypes,
6
+ xstyledPropTypes
7
+ } from "@elliemae/ds-props-helpers";
8
+ import { DSFilterBarName, FILTER_BAR_SLOTS } from "./constants/index.js";
9
+ const defaultProps = {};
10
+ const DSFilterBarPropTypes = {
11
+ ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_SLOTS),
12
+ ...globalAttributesPropTypes,
13
+ ...xstyledPropTypes,
14
+ children: PropTypes.node.isRequired.description(
15
+ "The content of the filter bar, typically composed with DSFilterBarContent and DSFilterBarActions"
16
+ ),
17
+ filterBarRef: PropTypes.object.isRequired.description("Ref to the filter bar element, used for focus management")
18
+ };
19
+ const DSFilterBarPropTypesSchema = DSFilterBarPropTypes;
20
+ export {
21
+ DSFilterBarPropTypes,
22
+ DSFilterBarPropTypesSchema,
23
+ defaultProps
24
+ };
25
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n PropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSFilterBarName, FILTER_BAR_SLOTS } from './constants/index.js';\n\nexport declare namespace DSFilterBarT {\n export interface RequiredProps {\n children: React.ReactNode;\n filterBarRef: React.MutableRefObject<HTMLElement | null>;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFilterBarName, typeof FILTER_BAR_SLOTS> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps | 'children'>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps | 'children'>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSFilterBarT.DefaultProps = {};\n\nexport const DSFilterBarPropTypes: DSPropTypesSchema<DSFilterBarT.Props> = {\n ...getPropsPerSlotPropTypes(DSFilterBarName, FILTER_BAR_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.isRequired.description(\n 'The content of the filter bar, typically composed with DSFilterBarContent and DSFilterBarActions',\n ),\n filterBarRef: PropTypes.object.isRequired.description('Ref to the filter bar element, used for focus management'),\n};\n\nexport const DSFilterBarPropTypesSchema = DSFilterBarPropTypes as unknown as ValidationMap<DSFilterBarT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB,wBAAwB;AA4B3C,MAAM,eAA0C,CAAC;AAEjD,MAAM,uBAA8D;AAAA,EACzE,GAAG,yBAAyB,iBAAiB,gBAAgB;AAAA,EAC7D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,KAAK,WAAW;AAAA,IAClC;AAAA,EACF;AAAA,EACA,cAAc,UAAU,OAAO,WAAW,YAAY,0DAA0D;AAClH;AAEO,MAAM,6BAA6B;",
6
+ "names": []
7
+ }