@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,112 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import__ = require("../index.js");
27
+ const testRequiredProps = {
28
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "test" }),
29
+ filterBarRef: { current: null }
30
+ };
31
+ const testOptionalProps = {
32
+ dsFilterbarRoot: {
33
+ onClick: () => {
34
+ },
35
+ "data-testid": "over-ride-test-id",
36
+ "aria-label": "over-ride-aria-label"
37
+ }
38
+ };
39
+ const testPartialDefaults = {};
40
+ const testProps = {
41
+ ...testRequiredProps,
42
+ ...testOptionalProps,
43
+ ...testPartialDefaults
44
+ };
45
+ const testPropsAsSyntax = {
46
+ ...testRequiredProps,
47
+ ...testOptionalProps,
48
+ ...testPartialDefaults
49
+ };
50
+ const testCompleteDefaults = {};
51
+ const testInternalProps = {
52
+ ...testRequiredProps,
53
+ ...testOptionalProps,
54
+ ...testCompleteDefaults
55
+ };
56
+ const testInternalPropsAsSyntax = {
57
+ ...testRequiredProps,
58
+ ...testOptionalProps,
59
+ ...testCompleteDefaults
60
+ };
61
+ const testExplicitDefinition = {
62
+ className: "string",
63
+ dsFilterbarRoot: {
64
+ onClick: () => {
65
+ },
66
+ "data-testid": "over-ride-test-id",
67
+ "aria-label": "over-ride-aria-label"
68
+ },
69
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "test" }),
70
+ filterBarRef: { current: null }
71
+ };
72
+ const testInferedTypeCompatibility = {
73
+ className: "string",
74
+ dsFilterbarRoot: {
75
+ onClick: () => {
76
+ },
77
+ "data-testid": "over-ride-test-id",
78
+ "aria-label": "over-ride-aria-label"
79
+ },
80
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "test" })
81
+ };
82
+ const testDefinitionAsConst = {
83
+ className: "string",
84
+ dsFilterbarRoot: {
85
+ onClick: () => {
86
+ },
87
+ "data-testid": "over-ride-test-id",
88
+ "aria-label": "over-ride-aria-label"
89
+ },
90
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "test" }),
91
+ filterBarRef: { current: null }
92
+ };
93
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFilterBar, { ...testExplicitDefinition }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFilterBar, { ...testInferedTypeCompatibility }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFilterBar, { ...testDefinitionAsConst }),
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ import__.DSFilterBar,
99
+ {
100
+ className: "string",
101
+ dsFilterbarRoot: {
102
+ onClick: () => {
103
+ },
104
+ "data-testid": "over-ride-test-id",
105
+ "aria-label": "over-ride-aria-label"
106
+ },
107
+ filterBarRef: { current: null },
108
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "test" })
109
+ }
110
+ )
111
+ ] });
112
+ //# sourceMappingURL=DSFilterBarNamespace.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/DSFilterBarNamespace.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSFilterBar, type DSFilterBarT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFilterBarT.Props;\ntype ComponentPropsInternals = DSFilterBarT.InternalProps;\ntype ComponentPropsDefaultProps = DSFilterBarT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFilterBarT.OptionalProps;\ntype ComponentPropsRequiredProps = DSFilterBarT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: <div>test</div>,\n filterBarRef: { current: null },\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n dsFilterbarRoot: {\n onClick: () => {},\n 'data-testid': 'over-ride-test-id',\n 'aria-label': 'over-ride-aria-label',\n },\n};\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\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\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 className: 'string',\n dsFilterbarRoot: {\n onClick: () => {},\n 'data-testid': 'over-ride-test-id',\n 'aria-label': 'over-ride-aria-label',\n },\n children: <div>test</div>,\n filterBarRef: { current: 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 className: 'string',\n dsFilterbarRoot: {\n onClick: () => {},\n 'data-testid': 'over-ride-test-id',\n 'aria-label': 'over-ride-aria-label',\n },\n children: <div>test</div>,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n className: 'string',\n dsFilterbarRoot: {\n onClick: () => {},\n 'data-testid': 'over-ride-test-id',\n 'aria-label': 'over-ride-aria-label',\n },\n children: <div>test</div>,\n filterBarRef: { current: null },\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFilterBar {...testExplicitDefinition} />\n <DSFilterBar {...testInferedTypeCompatibility} />\n <DSFilterBar {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSFilterBar\n className=\"string\"\n dsFilterbarRoot={{\n onClick: () => {},\n 'data-testid': 'over-ride-test-id',\n 'aria-label': 'over-ride-aria-label',\n }}\n filterBarRef={{ current: null }}\n >\n <div>test</div>\n </DSFilterBar>\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACWX;AAVZ,eAA+C;AAS/C,MAAM,oBAAiD;AAAA,EACrD,UAAU,4CAAC,SAAI,kBAAI;AAAA,EACnB,cAAc,EAAE,SAAS,KAAK;AAChC;AAEA,MAAM,oBAAiD;AAAA,EACrD,iBAAiB;AAAA,IACf,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,EAChB;AACF;AAIA,MAAM,sBAA2D,CAAC;AAElE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D,CAAC;AAEpE,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,WAAW;AAAA,EACX,iBAAiB;AAAA,IACf,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,EAChB;AAAA,EACA,UAAU,4CAAC,SAAI,kBAAI;AAAA,EACnB,cAAc,EAAE,SAAS,KAAK;AAChC;AAGA,MAAM,+BAA+B;AAAA,EACnC,WAAW;AAAA,EACX,iBAAiB;AAAA,IACf,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,EAChB;AAAA,EACA,UAAU,4CAAC,SAAI,kBAAI;AACrB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,WAAW;AAAA,EACX,iBAAiB;AAAA,IACf,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,EAChB;AAAA,EACA,UAAU,4CAAC,SAAI,kBAAI;AAAA,EACnB,cAAc,EAAE,SAAS,KAAK;AAChC;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,wBAAa,GAAG,wBAAwB;AAAA,EACzC,4CAAC,wBAAa,GAAG,8BAA8B;AAAA,EAC/C,4CAAC,wBAAa,GAAG,uBAAuB;AAAA,EAExC;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,iBAAiB;AAAA,QACf,SAAS,MAAM;AAAA,QAAC;AAAA,QAChB,eAAe;AAAA,QACf,cAAc;AAAA,MAChB;AAAA,MACA,cAAc,EAAE,SAAS,KAAK;AAAA,MAE9B,sDAAC,SAAI,kBAAI;AAAA;AAAA,EACX;AAAA,GACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import React2 from "react";
4
+ import { describe } from "@elliemae/ds-props-helpers";
5
+ import { styled } from "@elliemae/ds-system";
6
+ import { Grid } from "@elliemae/ds-grid";
7
+ import { DSFilterBarPropTypesSchema } from "./react-desc-prop-types.js";
8
+ import { useFilterBar } from "./config/useFilterBar.js";
9
+ import { FILTER_BAR_SLOTS, DSFilterBarName } from "./constants/index.js";
10
+ const StyledWrapper = styled(Grid, { name: DSFilterBarName, slot: FILTER_BAR_SLOTS.ROOT })`
11
+ gap: 12px;
12
+ padding: 4px;
13
+ min-height: 33px;
14
+ `;
15
+ const mainContentCols = ["1fr", "auto"];
16
+ const DSFilterBar = (props) => {
17
+ const {
18
+ propsWithDefault: { children, filterBarRef },
19
+ xstyledProps,
20
+ ownerProps,
21
+ globalProps
22
+ } = useFilterBar(props);
23
+ const handleInnerRef = React2.useCallback(
24
+ (node) => {
25
+ if (!filterBarRef) return;
26
+ filterBarRef.current = node;
27
+ },
28
+ [filterBarRef]
29
+ );
30
+ return /* @__PURE__ */ jsx(
31
+ StyledWrapper,
32
+ {
33
+ cols: mainContentCols,
34
+ role: "region",
35
+ "aria-label": "Active filters",
36
+ "aria-live": "polite",
37
+ "aria-relevant": "additions removals",
38
+ ...globalProps,
39
+ ...xstyledProps,
40
+ ...ownerProps,
41
+ innerRef: handleInnerRef,
42
+ children
43
+ }
44
+ );
45
+ };
46
+ DSFilterBar.displayName = DSFilterBarName;
47
+ const DSFilterBarWithSchema = describe(DSFilterBar);
48
+ DSFilterBarWithSchema.propTypes = DSFilterBarPropTypesSchema;
49
+ export {
50
+ DSFilterBar,
51
+ DSFilterBarWithSchema
52
+ };
53
+ //# sourceMappingURL=DSFilterBar.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSFilterBar.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 { Grid } from '@elliemae/ds-grid';\nimport { type DSFilterBarT, DSFilterBarPropTypesSchema } from './react-desc-prop-types.js';\nimport { useFilterBar } from './config/useFilterBar.js';\nimport { FILTER_BAR_SLOTS, DSFilterBarName } from './constants/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSFilterBarName, slot: FILTER_BAR_SLOTS.ROOT })`\n gap: 12px;\n padding: 4px;\n min-height: 33px;\n`;\nconst mainContentCols = ['1fr', 'auto'];\n\nconst DSFilterBar: React.ComponentType<DSFilterBarT.Props> = (props) => {\n const {\n propsWithDefault: { children, filterBarRef },\n xstyledProps,\n ownerProps,\n globalProps,\n } = useFilterBar(props);\n\n const handleInnerRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n if (!filterBarRef) return;\n filterBarRef.current = node;\n },\n [filterBarRef],\n );\n\n return (\n <StyledWrapper\n cols={mainContentCols}\n role=\"region\"\n aria-label=\"Active filters\"\n aria-live=\"polite\"\n aria-relevant=\"additions removals\"\n {...globalProps}\n {...xstyledProps}\n {...ownerProps}\n innerRef={handleInnerRef}\n >\n {children}\n </StyledWrapper>\n );\n};\n\nDSFilterBar.displayName = DSFilterBarName;\nconst DSFilterBarWithSchema = describe(DSFilterBar);\nDSFilterBarWithSchema.propTypes = DSFilterBarPropTypesSchema;\n\nexport { DSFilterBar, DSFilterBarWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgCnB;AAhCJ,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAA4B,kCAAkC;AAC9D,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,uBAAuB;AAElD,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAKzF,MAAM,kBAAkB,CAAC,OAAO,MAAM;AAEtC,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM;AAAA,IACJ,kBAAkB,EAAE,UAAU,aAAa;AAAA,IAC3C;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,aAAa,KAAK;AAEtB,QAAM,iBAAiBA,OAAM;AAAA,IAC3B,CAAC,SAAgC;AAC/B,UAAI,CAAC,aAAc;AACnB,mBAAa,UAAU;AAAA,IACzB;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,MAAK;AAAA,MACL,cAAW;AAAA,MACX,aAAU;AAAA,MACV,iBAAc;AAAA,MACb,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,UAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,33 @@
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 { DSFilterBarPropTypes, defaultProps } from "../react-desc-prop-types.js";
11
+ import { useValidateProps } from "./useValidateProps.js";
12
+ const useFilterBar = (propsFromUser) => {
13
+ const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
14
+ useValidateProps(propsWithDefault, DSFilterBarPropTypes);
15
+ const globalProps = useGetGlobalAttributes(propsWithDefault);
16
+ const xstyledProps = useGetXstyledProps(propsWithDefault);
17
+ const ownerProps = useOwnerProps(propsWithDefault);
18
+ const instanceUid = React2.useMemo(() => `ds-filter-bar-${uid(5)}`, []);
19
+ return React2.useMemo(
20
+ () => ({
21
+ propsWithDefault,
22
+ xstyledProps,
23
+ globalProps,
24
+ instanceUid,
25
+ ownerProps
26
+ }),
27
+ [propsWithDefault, xstyledProps, globalProps, instanceUid, ownerProps]
28
+ );
29
+ };
30
+ export {
31
+ useFilterBar
32
+ };
33
+ //# sourceMappingURL=useFilterBar.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useFilterBar.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSGridT } from '@elliemae/ds-grid';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { type DSFilterBarT, DSFilterBarPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useFilterBar = (propsFromUser: DSFilterBarT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFilterBarT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSFilterBarPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSFilterBarT.InternalProps, HTMLElement, DSGridT.Props>(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const ownerProps = useOwnerProps(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-${uid(5)}`, []);\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 }),\n [propsWithDefault, xstyledProps, globalProps, instanceUid, ownerProps],\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,SAA4B,sBAAsB,oBAAoB;AACtE,SAAS,wBAAwB;AAE1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,mBAAmB,6BAAyD,eAAe,YAAY;AAC7G,mBAAiB,kBAAkB,oBAAoB;AAIvD,QAAM,cAAc,uBAA+E,gBAAgB;AACnH,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,aAAa,cAAc,gBAAgB;AAKjD,QAAM,cAAcA,OAAM,QAAQ,MAAM,iBAAiB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,cAAc,aAAa,aAAa,UAAU;AAAA,EACvE;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 { DSFilterBarName } from "../constants/index.js";
4
+ const useValidateProps = (props, propTypes) => {
5
+ useValidateTypescriptPropTypes(props, propTypes, DSFilterBarName);
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/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 DSFilterBarT } from '../react-desc-prop-types.js';\nimport { DSFilterBarName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSFilterBarT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFilterBarName);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,uBAAuB;AAEzB,MAAM,mBAAmB,CAAC,OAAmC,cAA4C;AAE9G,iCAA+B,OAAO,WAAW,eAAe;AAClE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSFilterBarName = "DSFilterbar";
4
+ const FILTER_BAR_SLOTS = {
5
+ ROOT: "root",
6
+ CONTENT: "content",
7
+ ACTIONS: "actions",
8
+ MENU_BUTTON: "menu-button"
9
+ };
10
+ const FILTER_BAR_DATA_TESTID = slotObjectToDataTestIds(DSFilterBarName, FILTER_BAR_SLOTS);
11
+ export {
12
+ DSFilterBarName,
13
+ FILTER_BAR_DATA_TESTID,
14
+ FILTER_BAR_SLOTS
15
+ };
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFilterBarName = 'DSFilterbar';\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_SLOTS = {\n ROOT: 'root',\n CONTENT: 'content',\n ACTIONS: 'actions',\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_DATA_TESTID = slotObjectToDataTestIds(DSFilterBarName, FILTER_BAR_SLOTS);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AAGxB,MAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,aAAa;AACf;AAGO,MAAM,yBAAyB,wBAAwB,iBAAiB,gBAAgB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { PropTypes } from "@elliemae/ds-props-helpers";
3
+ const DSHookUseFilterBarPrevNextFocusPropTypes = {
4
+ filterBarRef: PropTypes.object.isRequired.description("Ref to the filter bar element"),
5
+ fallbackRef: PropTypes.object.isRequired.description(
6
+ "Ref to the fallback element to focus when the filter bar is removed"
7
+ )
8
+ };
9
+ const DSHookUseFilterBarPrevNextFocusPropTypesSchema = DSHookUseFilterBarPrevNextFocusPropTypes;
10
+ export {
11
+ DSHookUseFilterBarPrevNextFocusPropTypes,
12
+ DSHookUseFilterBarPrevNextFocusPropTypesSchema
13
+ };
14
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { PropTypes, type DSPropTypesSchema, type ValidationMap } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSHookUseFilterBarPrevNextFocusT {\n export interface RequiredProps {\n filterBarRef: React.RefObject<HTMLElement | null>;\n fallbackRef: React.RefObject<HTMLElement | null>;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {}\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\nexport const DSHookUseFilterBarPrevNextFocusPropTypes: DSPropTypesSchema<DSHookUseFilterBarPrevNextFocusT.Props> = {\n filterBarRef: PropTypes.object.isRequired.description('Ref to the filter bar element'),\n fallbackRef: PropTypes.object.isRequired.description(\n 'Ref to the fallback element to focus when the filter bar is removed',\n ),\n};\n\nexport const DSHookUseFilterBarPrevNextFocusPropTypesSchema =\n DSHookUseFilterBarPrevNextFocusPropTypes as unknown as ValidationMap<DSHookUseFilterBarPrevNextFocusT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAA6D;AAgB/D,MAAM,2CAAsG;AAAA,EACjH,cAAc,UAAU,OAAO,WAAW,YAAY,+BAA+B;AAAA,EACrF,aAAa,UAAU,OAAO,WAAW;AAAA,IACvC;AAAA,EACF;AACF;AAEO,MAAM,iDACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,69 @@
1
+ import * as React from "react";
2
+ import { describe } from "@elliemae/ds-props-helpers";
3
+ import { useCallback } from "react";
4
+ import {
5
+ DSHookUseFilterBarPrevNextFocusPropTypes
6
+ } from "./react-desc-prop-types.js";
7
+ const FOCUSABLE_SELECTOR = [
8
+ "a[href]",
9
+ "button:not([disabled])",
10
+ "input:not([disabled])",
11
+ "select:not([disabled])",
12
+ "textarea:not([disabled])",
13
+ '[tabindex]:not([tabindex="-1"])'
14
+ ].join(",");
15
+ const getFocusablesIn = (container) => Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => {
16
+ if (el.getAttribute("aria-hidden") === "true") return false;
17
+ const style = window.getComputedStyle(el);
18
+ if (style.display === "none" || style.visibility === "hidden") return false;
19
+ if (el.disabled) return false;
20
+ return true;
21
+ });
22
+ const useFilterBarPrevNextFocus = ({ filterBarRef, fallbackRef }) => {
23
+ const runAfterRemoval = useCallback(
24
+ (removeFn) => {
25
+ const container = filterBarRef.current;
26
+ if (!container) {
27
+ removeFn();
28
+ requestAnimationFrame(() => fallbackRef.current?.focus?.());
29
+ return;
30
+ }
31
+ const before = getFocusablesIn(container);
32
+ const active = document.activeElement;
33
+ const activeIndex = before.indexOf(active);
34
+ removeFn();
35
+ requestAnimationFrame(() => {
36
+ const afterContainer = filterBarRef.current;
37
+ if (!afterContainer) {
38
+ fallbackRef.current?.focus?.();
39
+ return;
40
+ }
41
+ const after = getFocusablesIn(afterContainer);
42
+ if (after.length === 0) {
43
+ fallbackRef.current?.focus?.();
44
+ return;
45
+ }
46
+ const prevIndex = activeIndex - 1;
47
+ if (prevIndex >= 0 && after[prevIndex]) {
48
+ after[prevIndex].focus?.();
49
+ return;
50
+ }
51
+ if (activeIndex >= 0 && after[activeIndex]) {
52
+ after[activeIndex].focus?.();
53
+ return;
54
+ }
55
+ after[after.length - 1].focus?.();
56
+ });
57
+ },
58
+ [filterBarRef, fallbackRef]
59
+ );
60
+ return { runAfterRemoval };
61
+ };
62
+ useFilterBarPrevNextFocus.displayName = "useFilterBarPrevNextFocus";
63
+ const UseFilterBarPrevNextFocusWithSchema = describe(useFilterBarPrevNextFocus);
64
+ UseFilterBarPrevNextFocusWithSchema.propTypes = DSHookUseFilterBarPrevNextFocusPropTypes;
65
+ export {
66
+ UseFilterBarPrevNextFocusWithSchema,
67
+ useFilterBarPrevNextFocus
68
+ };
69
+ //# sourceMappingURL=useFilterBarPrevNextFocus.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useFilterBarPrevNextFocus.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { useCallback } from 'react';\nimport {\n DSHookUseFilterBarPrevNextFocusPropTypes,\n type DSHookUseFilterBarPrevNextFocusT,\n} from './react-desc-prop-types.js';\n\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nconst getFocusablesIn = (container: HTMLElement) =>\n Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter((el) => {\n if (el.getAttribute('aria-hidden') === 'true') return false;\n const style = window.getComputedStyle(el);\n if (style.display === 'none' || style.visibility === 'hidden') return false;\n if ((el as HTMLButtonElement).disabled) return false;\n return true;\n });\n\nconst useFilterBarPrevNextFocus = ({ filterBarRef, fallbackRef }: DSHookUseFilterBarPrevNextFocusT.Props) => {\n const runAfterRemoval = useCallback(\n (removeFn: () => void) => {\n const container = filterBarRef.current;\n\n if (!container) {\n removeFn();\n requestAnimationFrame(() => fallbackRef.current?.focus?.());\n return;\n }\n\n const before = getFocusablesIn(container);\n const active = document.activeElement as HTMLElement | null;\n const activeIndex = before.indexOf(active as HTMLElement);\n\n removeFn();\n\n requestAnimationFrame(() => {\n const afterContainer = filterBarRef.current;\n if (!afterContainer) {\n fallbackRef.current?.focus?.();\n return;\n }\n\n const after = getFocusablesIn(afterContainer);\n\n if (after.length === 0) {\n fallbackRef.current?.focus?.();\n return;\n }\n\n const prevIndex = activeIndex - 1;\n if (prevIndex >= 0 && after[prevIndex]) {\n after[prevIndex].focus?.();\n return;\n }\n\n if (activeIndex >= 0 && after[activeIndex]) {\n after[activeIndex].focus?.();\n return;\n }\n\n after[after.length - 1].focus?.();\n });\n },\n [filterBarRef, fallbackRef],\n );\n\n return { runAfterRemoval };\n};\n\nuseFilterBarPrevNextFocus.displayName = 'useFilterBarPrevNextFocus';\nconst UseFilterBarPrevNextFocusWithSchema = describe(useFilterBarPrevNextFocus);\nUseFilterBarPrevNextFocusWithSchema.propTypes =\n DSHookUseFilterBarPrevNextFocusPropTypes as unknown as ValidationMap<DSHookUseFilterBarPrevNextFocusT.Props>;\n\nexport { useFilterBarPrevNextFocus, UseFilterBarPrevNextFocusWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,gBAAoC;AAC7C,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,OAEK;AAEP,MAAM,qBAAqB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,GAAG;AAEV,MAAM,kBAAkB,CAAC,cACvB,MAAM,KAAK,UAAU,iBAA8B,kBAAkB,CAAC,EAAE,OAAO,CAAC,OAAO;AACrF,MAAI,GAAG,aAAa,aAAa,MAAM,OAAQ,QAAO;AACtD,QAAM,QAAQ,OAAO,iBAAiB,EAAE;AACxC,MAAI,MAAM,YAAY,UAAU,MAAM,eAAe,SAAU,QAAO;AACtE,MAAK,GAAyB,SAAU,QAAO;AAC/C,SAAO;AACT,CAAC;AAEH,MAAM,4BAA4B,CAAC,EAAE,cAAc,YAAY,MAA8C;AAC3G,QAAM,kBAAkB;AAAA,IACtB,CAAC,aAAyB;AACxB,YAAM,YAAY,aAAa;AAE/B,UAAI,CAAC,WAAW;AACd,iBAAS;AACT,8BAAsB,MAAM,YAAY,SAAS,QAAQ,CAAC;AAC1D;AAAA,MACF;AAEA,YAAM,SAAS,gBAAgB,SAAS;AACxC,YAAM,SAAS,SAAS;AACxB,YAAM,cAAc,OAAO,QAAQ,MAAqB;AAExD,eAAS;AAET,4BAAsB,MAAM;AAC1B,cAAM,iBAAiB,aAAa;AACpC,YAAI,CAAC,gBAAgB;AACnB,sBAAY,SAAS,QAAQ;AAC7B;AAAA,QACF;AAEA,cAAM,QAAQ,gBAAgB,cAAc;AAE5C,YAAI,MAAM,WAAW,GAAG;AACtB,sBAAY,SAAS,QAAQ;AAC7B;AAAA,QACF;AAEA,cAAM,YAAY,cAAc;AAChC,YAAI,aAAa,KAAK,MAAM,SAAS,GAAG;AACtC,gBAAM,SAAS,EAAE,QAAQ;AACzB;AAAA,QACF;AAEA,YAAI,eAAe,KAAK,MAAM,WAAW,GAAG;AAC1C,gBAAM,WAAW,EAAE,QAAQ;AAC3B;AAAA,QACF;AAEA,cAAM,MAAM,SAAS,CAAC,EAAE,QAAQ;AAAA,MAClC,CAAC;AAAA,IACH;AAAA,IACA,CAAC,cAAc,WAAW;AAAA,EAC5B;AAEA,SAAO,EAAE,gBAAgB;AAC3B;AAEA,0BAA0B,cAAc;AACxC,MAAM,sCAAsC,SAAS,yBAAyB;AAC9E,oCAAoC,YAClC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { DSFilterBar, DSFilterBarWithSchema } from "./DSFilterBar.js";
3
+ import { DSFilterBarContent, DSFilterBarContentWithSchema } from "./parts/DSFilterBarContent/index.js";
4
+ import { DSFilterBarActions, DSFilterBarActionsWithSchema } from "./parts/DSFilterBarActions/index.js";
5
+ import { DSFilterBarMenuButton, DSFilterBarMenuButtonWithSchema } from "./parts/DSFilterBarMenuButton/index.js";
6
+ import { FILTER_BAR_SLOTS, FILTER_BAR_DATA_TESTID } from "./constants/index.js";
7
+ import { useFilterBarPrevNextFocus, UseFilterBarPrevNextFocusWithSchema } from "./hooks/useFilterBarPrevNextFocus.js";
8
+ export {
9
+ DSFilterBar,
10
+ DSFilterBarActions,
11
+ DSFilterBarActionsWithSchema,
12
+ DSFilterBarContent,
13
+ DSFilterBarContentWithSchema,
14
+ DSFilterBarMenuButton,
15
+ DSFilterBarMenuButtonWithSchema,
16
+ DSFilterBarWithSchema,
17
+ FILTER_BAR_DATA_TESTID,
18
+ FILTER_BAR_SLOTS,
19
+ UseFilterBarPrevNextFocusWithSchema,
20
+ useFilterBarPrevNextFocus
21
+ };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSFilterBar, DSFilterBarWithSchema } from './DSFilterBar.js';\nexport { DSFilterBarContent, DSFilterBarContentWithSchema } from './parts/DSFilterBarContent/index.js';\nexport { DSFilterBarActions, DSFilterBarActionsWithSchema } from './parts/DSFilterBarActions/index.js';\nexport { DSFilterBarMenuButton, DSFilterBarMenuButtonWithSchema } from './parts/DSFilterBarMenuButton/index.js';\nexport { type DSFilterBarT } from './react-desc-prop-types.js';\nexport { FILTER_BAR_SLOTS, FILTER_BAR_DATA_TESTID } from './constants/index.js';\nexport { useFilterBarPrevNextFocus, UseFilterBarPrevNextFocusWithSchema } from './hooks/useFilterBarPrevNextFocus.js';\nexport { type DSHookUseFilterBarPrevNextFocusT } from './hooks/react-desc-prop-types.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,aAAa,6BAA6B;AACnD,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,uBAAuB,uCAAuC;AAEvE,SAAS,kBAAkB,8BAA8B;AACzD,SAAS,2BAA2B,2CAA2C;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ],
7
+ "publishConfig": {
8
+ "access": "public"
9
+ }
10
+ }
@@ -0,0 +1,30 @@
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 { DSFilterBarActionsPropTypesSchema } from "./react-desc-prop-types.js";
6
+ import { useFilterBarActions } from "./config/useFilterBarActions.js";
7
+ import { FILTER_BAR_ACTIONS_SLOTS, DSFilterBarActionsName, DSFilterBarName } from "./constants/index.js";
8
+ const StyledWrapper = styled("div", { name: DSFilterBarName, slot: FILTER_BAR_ACTIONS_SLOTS.ACTIONS })`
9
+ display: flex;
10
+ align-items: start;
11
+ flex-shrink: 0;
12
+ gap: 8px;
13
+ `;
14
+ const DSFilterBarActions = (props) => {
15
+ const {
16
+ propsWithDefault: { children },
17
+ xstyledProps,
18
+ globalProps,
19
+ ownerProps
20
+ } = useFilterBarActions(props);
21
+ return /* @__PURE__ */ jsx(StyledWrapper, { ...xstyledProps, ...globalProps, ...ownerProps, children });
22
+ };
23
+ DSFilterBarActions.displayName = DSFilterBarActionsName;
24
+ const DSFilterBarActionsWithSchema = describe(DSFilterBarActions);
25
+ DSFilterBarActionsWithSchema.propTypes = DSFilterBarActionsPropTypesSchema;
26
+ export {
27
+ DSFilterBarActions,
28
+ DSFilterBarActionsWithSchema
29
+ };
30
+ //# sourceMappingURL=DSFilterBarActions.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarActions/DSFilterBarActions.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 DSFilterBarActionsT, DSFilterBarActionsPropTypesSchema } from './react-desc-prop-types.js';\nimport { useFilterBarActions } from './config/useFilterBarActions.js';\nimport { FILTER_BAR_ACTIONS_SLOTS, DSFilterBarActionsName, DSFilterBarName } from './constants/index.js';\n\nconst StyledWrapper = styled('div', { name: DSFilterBarName, slot: FILTER_BAR_ACTIONS_SLOTS.ACTIONS })`\n display: flex;\n align-items: start;\n flex-shrink: 0;\n gap: 8px;\n`;\n\nconst DSFilterBarActions: React.ComponentType<DSFilterBarActionsT.Props> = (props) => {\n const {\n propsWithDefault: { children },\n xstyledProps,\n globalProps,\n ownerProps,\n } = useFilterBarActions(props);\n\n return (\n <StyledWrapper {...xstyledProps} {...globalProps} {...ownerProps}>\n {children}\n </StyledWrapper>\n );\n};\n\nDSFilterBarActions.displayName = DSFilterBarActionsName;\nconst DSFilterBarActionsWithSchema = describe(DSFilterBarActions);\nDSFilterBarActionsWithSchema.propTypes = DSFilterBarActionsPropTypesSchema;\n\nexport { DSFilterBarActions, DSFilterBarActionsWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACuBnB;AAtBJ,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;AAOrG,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 { DSFilterBarActionsPropTypesSchema, defaultProps } from "../react-desc-prop-types.js";
11
+ import { useValidateProps } from "./useValidateProps.js";
12
+ const useFilterBarActions = (propsFromUser) => {
13
+ const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
14
+ useValidateProps(propsWithDefault, DSFilterBarActionsPropTypesSchema);
15
+ const globalProps = useGetGlobalAttributes(propsWithDefault);
16
+ const xstyledProps = useGetXstyledProps(propsWithDefault);
17
+ const ownerProps = useOwnerProps(propsWithDefault);
18
+ const instanceUid = React2.useMemo(() => `ds-filter-bar-actions-${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
+ useFilterBarActions
40
+ };
41
+ //# sourceMappingURL=useFilterBarActions.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSFilterBarActions/config/useFilterBarActions.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 DSFilterBarActionsT, DSFilterBarActionsPropTypesSchema, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useFilterBarActions = (propsFromUser: DSFilterBarActionsT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFilterBarActionsT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSFilterBarActionsPropTypesSchema);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSFilterBarActionsT.InternalProps, HTMLElement>(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const ownerProps = useOwnerProps<DSFilterBarActionsT.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-actions-${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 { DSFilterBarActionsName } from "../constants/index.js";
4
+ const useValidateProps = (props, propTypes) => {
5
+ useValidateTypescriptPropTypes(props, propTypes, DSFilterBarActionsName);
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/DSFilterBarActions/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 DSFilterBarActionsT } from '../react-desc-prop-types.js';\nimport { DSFilterBarActionsName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSFilterBarActionsT.InternalProps,\n propTypes: ValidationMap<DSFilterBarActionsT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFilterBarActionsName);\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 DSFilterBarActionsName = "DSFilterBarActions";
5
+ const FILTER_BAR_ACTIONS_SLOTS = {
6
+ ACTIONS: "actions"
7
+ };
8
+ const FILTER_BAR_ACTIONS_DATA_TESTID = slotObjectToDataTestIds(DSFilterBarName, FILTER_BAR_ACTIONS_SLOTS);
9
+ export {
10
+ DSFilterBarActionsName,
11
+ DSFilterBarName,
12
+ FILTER_BAR_ACTIONS_DATA_TESTID,
13
+ FILTER_BAR_ACTIONS_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/DSFilterBarActions/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 DSFilterBarActionsName = 'DSFilterBarActions';\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_ACTIONS_SLOTS = {\n ACTIONS: 'actions',\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_ACTIONS_DATA_TESTID = slotObjectToDataTestIds(DSFilterBarName, FILTER_BAR_ACTIONS_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 { DSFilterBarActions, DSFilterBarActionsWithSchema } from "./DSFilterBarActions.js";
3
+ export {
4
+ DSFilterBarActions,
5
+ DSFilterBarActionsWithSchema
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSFilterBarActions/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSFilterBarActions, DSFilterBarActionsWithSchema } from './DSFilterBarActions.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oBAAoB,oCAAoC;",
6
+ "names": []
7
+ }