@elliemae/ds-pills 2.3.0-next.3 → 3.0.0-alpha.0

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 (216) hide show
  1. package/dist/cjs/components/Pill.js +60 -0
  2. package/dist/cjs/components/Pill.js.map +7 -0
  3. package/dist/cjs/components/PillButton.js +58 -0
  4. package/dist/cjs/components/PillButton.js.map +7 -0
  5. package/dist/cjs/components/PillGroup.js +72 -0
  6. package/dist/cjs/components/PillGroup.js.map +7 -0
  7. package/dist/cjs/components/index.js +30 -0
  8. package/dist/cjs/components/index.js.map +7 -0
  9. package/dist/cjs/components/styled.js +235 -0
  10. package/dist/cjs/components/styled.js.map +7 -0
  11. package/dist/cjs/components/types/DropdownPill.js +88 -0
  12. package/dist/cjs/components/types/DropdownPill.js.map +7 -0
  13. package/dist/cjs/components/types/InputPill.js +84 -0
  14. package/dist/cjs/components/types/InputPill.js.map +7 -0
  15. package/dist/cjs/components/types/LabelPill.js +52 -0
  16. package/dist/cjs/components/types/LabelPill.js.map +7 -0
  17. package/dist/cjs/components/types/ReadOnlyPill.js +55 -0
  18. package/dist/cjs/components/types/ReadOnlyPill.js.map +7 -0
  19. package/dist/cjs/components/types/RemovablePill.js +79 -0
  20. package/dist/cjs/components/types/RemovablePill.js.map +7 -0
  21. package/dist/cjs/components/types/ValuePill.js +59 -0
  22. package/dist/cjs/components/types/ValuePill.js.map +7 -0
  23. package/dist/cjs/components/types/index.js +33 -0
  24. package/dist/cjs/components/types/index.js.map +7 -0
  25. package/dist/cjs/deprecated/DropdownPill.js +92 -0
  26. package/dist/cjs/deprecated/DropdownPill.js.map +7 -0
  27. package/dist/cjs/deprecated/InputPill.js +82 -0
  28. package/dist/cjs/deprecated/InputPill.js.map +7 -0
  29. package/dist/cjs/deprecated/LabeledDropdownPills.js +102 -0
  30. package/dist/cjs/deprecated/LabeledDropdownPills.js.map +7 -0
  31. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +131 -0
  32. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
  33. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +145 -0
  34. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
  35. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +154 -0
  36. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
  37. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js +44 -0
  38. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
  39. package/dist/cjs/deprecated/LabeledPills.js +75 -0
  40. package/dist/cjs/deprecated/LabeledPills.js.map +7 -0
  41. package/dist/cjs/deprecated/OverflowPill.js +79 -0
  42. package/dist/cjs/deprecated/OverflowPill.js.map +7 -0
  43. package/dist/cjs/deprecated/Pill.js +73 -0
  44. package/dist/cjs/deprecated/Pill.js.map +7 -0
  45. package/dist/cjs/deprecated/PillGroup.js +72 -0
  46. package/dist/cjs/deprecated/PillGroup.js.map +7 -0
  47. package/dist/cjs/deprecated/ReadOnlyPill.js +100 -0
  48. package/dist/cjs/deprecated/ReadOnlyPill.js.map +7 -0
  49. package/dist/cjs/deprecated/RemovablePill.js +78 -0
  50. package/dist/cjs/deprecated/RemovablePill.js.map +7 -0
  51. package/dist/cjs/deprecated/index.js +43 -0
  52. package/dist/cjs/deprecated/index.js.map +7 -0
  53. package/dist/cjs/index.d.js +27 -0
  54. package/dist/cjs/index.d.js.map +7 -0
  55. package/dist/cjs/index.js +37 -0
  56. package/dist/cjs/index.js.map +7 -0
  57. package/dist/cjs/props.js +95 -0
  58. package/dist/cjs/props.js.map +7 -0
  59. package/dist/cjs/utils.js +46 -0
  60. package/dist/cjs/utils.js.map +7 -0
  61. package/dist/esm/components/Pill.js +31 -0
  62. package/dist/esm/components/Pill.js.map +7 -0
  63. package/dist/esm/components/PillButton.js +29 -0
  64. package/dist/esm/components/PillButton.js.map +7 -0
  65. package/dist/esm/components/PillGroup.js +43 -0
  66. package/dist/esm/components/PillGroup.js.map +7 -0
  67. package/dist/esm/components/index.js +5 -0
  68. package/dist/esm/components/index.js.map +7 -0
  69. package/dist/esm/components/styled.js +206 -0
  70. package/dist/esm/components/styled.js.map +7 -0
  71. package/dist/esm/components/types/DropdownPill.js +59 -0
  72. package/dist/esm/components/types/DropdownPill.js.map +7 -0
  73. package/dist/esm/components/types/InputPill.js +55 -0
  74. package/dist/esm/components/types/InputPill.js.map +7 -0
  75. package/dist/esm/components/types/LabelPill.js +23 -0
  76. package/dist/esm/components/types/LabelPill.js.map +7 -0
  77. package/dist/esm/components/types/ReadOnlyPill.js +26 -0
  78. package/dist/esm/components/types/ReadOnlyPill.js.map +7 -0
  79. package/dist/esm/components/types/RemovablePill.js +50 -0
  80. package/dist/esm/components/types/RemovablePill.js.map +7 -0
  81. package/dist/esm/components/types/ValuePill.js +30 -0
  82. package/dist/esm/components/types/ValuePill.js.map +7 -0
  83. package/dist/esm/components/types/index.js +8 -0
  84. package/dist/esm/components/types/index.js.map +7 -0
  85. package/dist/esm/deprecated/DropdownPill.js +63 -0
  86. package/dist/esm/deprecated/DropdownPill.js.map +7 -0
  87. package/dist/esm/deprecated/InputPill.js +53 -0
  88. package/dist/esm/deprecated/InputPill.js.map +7 -0
  89. package/dist/esm/deprecated/LabeledDropdownPills.js +73 -0
  90. package/dist/esm/deprecated/LabeledDropdownPills.js.map +7 -0
  91. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +102 -0
  92. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
  93. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +116 -0
  94. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
  95. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +125 -0
  96. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
  97. package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js +15 -0
  98. package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
  99. package/dist/esm/deprecated/LabeledPills.js +46 -0
  100. package/dist/esm/deprecated/LabeledPills.js.map +7 -0
  101. package/dist/esm/deprecated/OverflowPill.js +50 -0
  102. package/dist/esm/deprecated/OverflowPill.js.map +7 -0
  103. package/dist/esm/deprecated/Pill.js +44 -0
  104. package/dist/esm/deprecated/Pill.js.map +7 -0
  105. package/dist/esm/deprecated/PillGroup.js +43 -0
  106. package/dist/esm/deprecated/PillGroup.js.map +7 -0
  107. package/dist/esm/deprecated/ReadOnlyPill.js +71 -0
  108. package/dist/esm/deprecated/ReadOnlyPill.js.map +7 -0
  109. package/dist/esm/deprecated/RemovablePill.js +49 -0
  110. package/dist/esm/deprecated/RemovablePill.js.map +7 -0
  111. package/dist/esm/deprecated/index.js +14 -0
  112. package/dist/esm/deprecated/index.js.map +7 -0
  113. package/dist/esm/index.d.js +2 -0
  114. package/dist/esm/index.d.js.map +7 -0
  115. package/dist/esm/index.js +8 -0
  116. package/dist/esm/index.js.map +7 -0
  117. package/dist/esm/props.js +66 -0
  118. package/dist/esm/props.js.map +7 -0
  119. package/dist/esm/utils.js +17 -0
  120. package/dist/esm/utils.js.map +7 -0
  121. package/{types → dist/types}/components/Pill.d.ts +0 -0
  122. package/{types → dist/types}/components/PillButton.d.ts +0 -0
  123. package/{types → dist/types}/components/PillGroup.d.ts +0 -0
  124. package/{types → dist/types}/components/index.d.ts +0 -0
  125. package/{types → dist/types}/components/styled.d.ts +8 -8
  126. package/{types → dist/types}/components/types/DropdownPill.d.ts +0 -0
  127. package/{types → dist/types}/components/types/InputPill.d.ts +0 -0
  128. package/{types → dist/types}/components/types/LabelPill.d.ts +0 -0
  129. package/{types → dist/types}/components/types/ReadOnlyPill.d.ts +0 -0
  130. package/{types → dist/types}/components/types/RemovablePill.d.ts +0 -0
  131. package/{types → dist/types}/components/types/ValuePill.d.ts +0 -0
  132. package/{types → dist/types}/components/types/index.d.ts +0 -0
  133. package/{types → dist/types}/deprecated/DropdownPill.d.ts +0 -0
  134. package/{types → dist/types}/deprecated/InputPill.d.ts +0 -0
  135. package/{types → dist/types}/deprecated/LabeledDropdownPills.d.ts +1 -1
  136. package/{types → dist/types}/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.d.ts +3 -1
  137. package/{types → dist/types}/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.d.ts +3 -1
  138. package/{types → dist/types}/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.d.ts +1 -0
  139. package/{types → dist/types}/deprecated/LabeledDropdownPillsTypes/utils.d.ts +0 -0
  140. package/{types → dist/types}/deprecated/LabeledPills.d.ts +0 -0
  141. package/{types → dist/types}/deprecated/OverflowPill.d.ts +0 -0
  142. package/{types → dist/types}/deprecated/Pill.d.ts +0 -0
  143. package/{types → dist/types}/deprecated/PillGroup.d.ts +0 -0
  144. package/{types → dist/types}/deprecated/ReadOnlyPill.d.ts +0 -0
  145. package/{types → dist/types}/deprecated/RemovablePill.d.ts +0 -0
  146. package/{types → dist/types}/deprecated/index.d.ts +0 -0
  147. package/{types → dist/types}/index.d.ts +0 -0
  148. package/{types → dist/types}/props.d.ts +0 -0
  149. package/{types → dist/types}/tests/DSPill.test.d.ts +0 -0
  150. package/{types → dist/types}/tests/DSPillGroup.test.d.ts +0 -0
  151. package/{types → dist/types}/tests/events/DSPill.events.keyboard.test.d.ts +0 -0
  152. package/{types → dist/types}/tests/events/DSPill.events.test.d.ts +0 -0
  153. package/{types → dist/types}/tests/events/DSPillGroup.events.keyboard.test.d.ts +0 -0
  154. package/{types → dist/types}/tests/events/DSPillGroup.events.test.d.ts +0 -0
  155. package/{types → dist/types}/utils.d.ts +0 -0
  156. package/package.json +93 -85
  157. package/cjs/components/Pill.js +0 -53
  158. package/cjs/components/PillButton.js +0 -56
  159. package/cjs/components/PillGroup.js +0 -64
  160. package/cjs/components/index.js +0 -17
  161. package/cjs/components/styled.js +0 -85
  162. package/cjs/components/types/DropdownPill.js +0 -86
  163. package/cjs/components/types/InputPill.js +0 -74
  164. package/cjs/components/types/LabelPill.js +0 -46
  165. package/cjs/components/types/ReadOnlyPill.js +0 -50
  166. package/cjs/components/types/RemovablePill.js +0 -72
  167. package/cjs/components/types/ValuePill.js +0 -54
  168. package/cjs/components/types/index.js +0 -19
  169. package/cjs/deprecated/DropdownPill.js +0 -113
  170. package/cjs/deprecated/InputPill.js +0 -84
  171. package/cjs/deprecated/LabeledDropdownPills.js +0 -106
  172. package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +0 -134
  173. package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +0 -153
  174. package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +0 -162
  175. package/cjs/deprecated/LabeledDropdownPillsTypes/utils.js +0 -20
  176. package/cjs/deprecated/LabeledPills.js +0 -62
  177. package/cjs/deprecated/OverflowPill.js +0 -73
  178. package/cjs/deprecated/Pill.js +0 -88
  179. package/cjs/deprecated/PillGroup.js +0 -72
  180. package/cjs/deprecated/ReadOnlyPill.js +0 -101
  181. package/cjs/deprecated/RemovablePill.js +0 -74
  182. package/cjs/deprecated/index.js +0 -33
  183. package/cjs/index.d.js +0 -2
  184. package/cjs/index.js +0 -43
  185. package/cjs/props.js +0 -69
  186. package/cjs/utils.js +0 -28
  187. package/esm/components/Pill.js +0 -44
  188. package/esm/components/PillButton.js +0 -46
  189. package/esm/components/PillGroup.js +0 -53
  190. package/esm/components/index.js +0 -3
  191. package/esm/components/styled.js +0 -67
  192. package/esm/components/types/DropdownPill.js +0 -76
  193. package/esm/components/types/InputPill.js +0 -65
  194. package/esm/components/types/LabelPill.js +0 -37
  195. package/esm/components/types/ReadOnlyPill.js +0 -41
  196. package/esm/components/types/RemovablePill.js +0 -63
  197. package/esm/components/types/ValuePill.js +0 -45
  198. package/esm/components/types/index.js +0 -6
  199. package/esm/deprecated/DropdownPill.js +0 -100
  200. package/esm/deprecated/InputPill.js +0 -74
  201. package/esm/deprecated/LabeledDropdownPills.js +0 -95
  202. package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +0 -126
  203. package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +0 -145
  204. package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +0 -154
  205. package/esm/deprecated/LabeledDropdownPillsTypes/utils.js +0 -16
  206. package/esm/deprecated/LabeledPills.js +0 -53
  207. package/esm/deprecated/OverflowPill.js +0 -62
  208. package/esm/deprecated/Pill.js +0 -76
  209. package/esm/deprecated/PillGroup.js +0 -60
  210. package/esm/deprecated/ReadOnlyPill.js +0 -90
  211. package/esm/deprecated/RemovablePill.js +0 -64
  212. package/esm/deprecated/index.js +0 -8
  213. package/esm/index.d.js +0 -1
  214. package/esm/index.js +0 -11
  215. package/esm/props.js +0 -60
  216. package/esm/utils.js +0 -24
@@ -0,0 +1,43 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var deprecated_exports = {};
29
+ __export(deprecated_exports, {
30
+ default: () => import_Pill.default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ __reExport(deprecated_exports, require("./Pill"));
34
+ __reExport(deprecated_exports, require("./PillGroup"));
35
+ __reExport(deprecated_exports, require("./LabeledDropdownPills"));
36
+ __reExport(deprecated_exports, require("./LabeledPills"));
37
+ __reExport(deprecated_exports, require("./DropdownPill"));
38
+ __reExport(deprecated_exports, require("./RemovablePill"));
39
+ __reExport(deprecated_exports, require("./ReadOnlyPill"));
40
+ __reExport(deprecated_exports, require("./OverflowPill"));
41
+ var import_Pill = __toESM(require("./Pill"));
42
+ module.exports = __toCommonJS(deprecated_exports);
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/deprecated/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './Pill';\nexport * from './PillGroup';\nexport * from './LabeledDropdownPills';\nexport * from './LabeledPills';\nexport * from './DropdownPill';\nexport * from './RemovablePill';\nexport * from './ReadOnlyPill';\nexport * from './OverflowPill';\n\nexport { default } from './Pill';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc;AACd,+BAAc;AACd,+BAAc;AACd,+BAAc;AACd,+BAAc;AACd,+BAAc;AACd,+BAAc;AACd,+BAAc;AAEd,kBAAwB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,27 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, copyDefault, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
11
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
12
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
+ }
14
+ return target;
15
+ };
16
+ var __toESM = (module2, isNodeMode) => {
17
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ };
19
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
20
+ return (module2, temp) => {
21
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
22
+ };
23
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
24
+ var index_d_exports = {};
25
+ var React = __toESM(require("react"));
26
+ module.exports = __toCommonJS(index_d_exports);
27
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.d.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport type { DSDropdownMenuProps } from '@elliemae/ds-dropdownmenu';\n\nexport interface DSPillProps {\n label: string;\n type: 'label' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly';\n innerRef?: React.MutableRefObject<HTMLElement> | ((_ref: HTMLElement) => void);\n ariaLabel?: string;\n labelTruncated?: boolean;\n size: 'm' | 's';\n // ---------------------------------------------------------------------------\n // Value props\n // ---------------------------------------------------------------------------\n tooltipValue?: string;\n // ---------------------------------------------------------------------------\n // Readonly props\n // ---------------------------------------------------------------------------\n iconLeft?: JSX.Element;\n iconRight?: JSX.Element;\n // ---------------------------------------------------------------------------\n // Removable props\n // ---------------------------------------------------------------------------\n onRemove?: (e: React.KeyboardEvent & React.MouseEvent) => void;\n // ---------------------------------------------------------------------------\n // Input props\n // ---------------------------------------------------------------------------\n inputPlaceholder?: string;\n onInputChange?: (e: React.ChangeEvent, newValue: string) => void;\n onInputClear?: (e: React.KeyboardEvent & React.MouseEvent) => void;\n inputWidth?: number;\n inputRender?: React.ComponentType<any>;\n // ---------------------------------------------------------------------------\n // Dropdown props\n // ---------------------------------------------------------------------------\n dropdownProps?: DSDropdownMenuProps;\n onDropdownClick?: (e: React.KeyboardEvent & React.MouseEvent) => void;\n}\n\nexport interface DSLabeledDropdownPillProps {\n label: string;\n value?: { id: string; label: string }[];\n onValuesChange?: (values: DSLabeledDropdownPillProps['values']) => void;\n type: 'label-is-value' | 'single-value' | 'multi-value' | 'input-value' | 'required-value';\n dropdownOptions?: any[];\n}\n\nexport interface DSPillGroupProps {\n width?: string;\n innerRef?: React.MutableRefObject<HTMLElement> | ((_ref: HTMLElement) => void);\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,37 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var src_exports = {};
29
+ __export(src_exports, {
30
+ default: () => import_deprecated.default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ __reExport(src_exports, require("./deprecated"));
34
+ __reExport(src_exports, require("./components"));
35
+ var import_deprecated = __toESM(require("./deprecated"));
36
+ module.exports = __toCommonJS(src_exports);
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './deprecated';\nexport * from './components';\nexport { default } from './deprecated';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;AACd,wBAAwB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,95 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var props_exports = {};
29
+ __export(props_exports, {
30
+ DSPillButtonDefaultProps: () => DSPillButtonDefaultProps,
31
+ DSPillButtonPropTypes: () => DSPillButtonPropTypes,
32
+ DSPillGroupDefaultProps: () => DSPillGroupDefaultProps,
33
+ DSPillGroupPropTypes: () => DSPillGroupPropTypes,
34
+ DSPillV2DefaultProps: () => DSPillV2DefaultProps,
35
+ DSPillV2PropTypes: () => DSPillV2PropTypes
36
+ });
37
+ var React = __toESM(require("react"));
38
+ var import_react_desc = require("react-desc");
39
+ var import_ds_form = require("@elliemae/ds-form");
40
+ const pillTypes = import_react_desc.PropTypes.oneOf(["label", "value", "input", "dropdown", "removable", "readonly"]);
41
+ const DSPillV2PropTypes = {
42
+ label: import_react_desc.PropTypes.string.description("Label to show in the pill").isRequired,
43
+ type: pillTypes.description("The type of pill that you want to render").isRequired,
44
+ innerRef: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.object, import_react_desc.PropTypes.func]).description("Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)").defaultValue(() => null),
45
+ size: import_react_desc.PropTypes.oneOf(["s", "m"]).description("Vertical pill size").defaultValue("m"),
46
+ ariaLabel: import_react_desc.PropTypes.string.description("Aria label for the pill. If not provided we will use the label").defaultValue(""),
47
+ labelTruncated: import_react_desc.PropTypes.bool.description("Whether to truncate the pills label").defaultValue(true),
48
+ tooltipValue: import_react_desc.PropTypes.string.description("String to show as a tooltip in the value pill").defaultValue(""),
49
+ iconLeft: import_react_desc.PropTypes.node.description("A component to show int the left of a readonly pill").defaultValue(null),
50
+ iconRight: import_react_desc.PropTypes.node.description("A component to show in the right of a readonly pill").defaultValue(null),
51
+ onRemove: import_react_desc.PropTypes.func.description("Callback triggered when removing a pill with the close icon").defaultValue(() => null),
52
+ inputPlaceholder: import_react_desc.PropTypes.string.description("Placeholder for the input pill").defaultValue(""),
53
+ onInputChange: import_react_desc.PropTypes.func.description("Callback triggered when user provides input to the input pill").defaultValue(() => null),
54
+ onInputClear: import_react_desc.PropTypes.func.description("Callback triggered when the user clears an input pill").defaultValue(() => null),
55
+ inputWidth: import_react_desc.PropTypes.number.description("Width in pixels for the input tag in the input pill").defaultValue(150),
56
+ dropdownProps: import_react_desc.PropTypes.object.description("Properties that will be used for the dropdown-menu").defaultValue({}),
57
+ onDropdownClick: import_react_desc.PropTypes.func.description("Callback when dropdown button is clicked or pressed").defaultValue(() => null)
58
+ };
59
+ const DSPillButtonPropTypes = {
60
+ type: import_react_desc.PropTypes.oneOf(["only", "left", "right"]).description("The position in which this button will be placed. Only used for css styling internally").defaultValue("right"),
61
+ width: import_react_desc.PropTypes.string.description("Width of the button").defaultValue("100%"),
62
+ height: import_react_desc.PropTypes.string.description("Height of the button").defaultValue("100%")
63
+ };
64
+ const DSPillGroupPropTypes = {
65
+ width: import_react_desc.PropTypes.string.description("Width of the group").defaultValue("fit-content"),
66
+ innerRef: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.object, import_react_desc.PropTypes.func]).description("Reference to the pill group wrapper").defaultValue(() => null)
67
+ };
68
+ const DSPillV2DefaultProps = {
69
+ innerRef: () => null,
70
+ ariaLabel: "",
71
+ size: "m",
72
+ labelTruncated: true,
73
+ tooltipValue: "",
74
+ iconLeft: null,
75
+ iconRight: null,
76
+ onRemove: () => null,
77
+ inputPlaceholder: "",
78
+ onInputChange: () => null,
79
+ onInputClear: () => null,
80
+ inputWidth: 72,
81
+ inputRender: import_ds_form.DSInput,
82
+ dropdownProps: {},
83
+ onDropdownClick: () => null
84
+ };
85
+ const DSPillButtonDefaultProps = {
86
+ type: "right",
87
+ width: "100%",
88
+ height: "100%"
89
+ };
90
+ const DSPillGroupDefaultProps = {
91
+ width: "fit-content",
92
+ innerRef: () => null
93
+ };
94
+ module.exports = __toCommonJS(props_exports);
95
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { PropTypes } from 'react-desc';\nimport { DSInput } from '@elliemae/ds-form';\n\nconst pillTypes = PropTypes.oneOf(['label', 'value', 'input', 'dropdown', 'removable', 'readonly']);\n\nexport const DSPillV2PropTypes = {\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n size: PropTypes.oneOf(['s', 'm']).description('Vertical pill size').defaultValue('m'),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(true),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node.description('A component to show int the left of a readonly pill').defaultValue(null),\n iconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n dropdownProps: PropTypes.object.description('Properties that will be used for the dropdown-menu').defaultValue({}),\n onDropdownClick: PropTypes.func\n .description('Callback when dropdown button is clicked or pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPillButtonPropTypes = {\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n};\n\nexport const DSPillGroupPropTypes = {\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n};\n\nexport const DSPillV2DefaultProps = {\n innerRef: () => null,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: DSInput,\n dropdownProps: {},\n onDropdownClick: () => null,\n};\n\nexport const DSPillButtonDefaultProps = {\n type: 'right',\n width: '100%',\n height: '100%',\n};\n\nexport const DSPillGroupDefaultProps = {\n width: 'fit-content',\n innerRef: () => null,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAA0B;AAC1B,qBAAwB;AAExB,MAAM,YAAY,4BAAU,MAAM,CAAC,SAAS,SAAS,SAAS,YAAY,aAAa;AAEhF,MAAM,oBAAoB;AAAA,EAC/B,OAAO,4BAAU,OAAO,YAAY,6BAA6B;AAAA,EACjE,MAAM,UAAU,YAAY,4CAA4C;AAAA,EACxE,UAAU,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,OACxD,YAAY,oGACZ,aAAa,MAAM;AAAA,EACtB,MAAM,4BAAU,MAAM,CAAC,KAAK,MAAM,YAAY,sBAAsB,aAAa;AAAA,EACjF,WAAW,4BAAU,OAClB,YAAY,kEACZ,aAAa;AAAA,EAChB,gBAAgB,4BAAU,KAAK,YAAY,uCAAuC,aAAa;AAAA,EAC/F,cAAc,4BAAU,OAAO,YAAY,iDAAiD,aAAa;AAAA,EACzG,UAAU,4BAAU,KAAK,YAAY,uDAAuD,aAAa;AAAA,EACzG,WAAW,4BAAU,KAAK,YAAY,uDAAuD,aAAa;AAAA,EAC1G,UAAU,4BAAU,KACjB,YAAY,+DACZ,aAAa,MAAM;AAAA,EACtB,kBAAkB,4BAAU,OAAO,YAAY,kCAAkC,aAAa;AAAA,EAC9F,eAAe,4BAAU,KACtB,YAAY,iEACZ,aAAa,MAAM;AAAA,EACtB,cAAc,4BAAU,KACrB,YAAY,yDACZ,aAAa,MAAM;AAAA,EACtB,YAAY,4BAAU,OAAO,YAAY,uDAAuD,aAAa;AAAA,EAC7G,eAAe,4BAAU,OAAO,YAAY,sDAAsD,aAAa;AAAA,EAC/G,iBAAiB,4BAAU,KACxB,YAAY,uDACZ,aAAa,MAAM;AAAA;AAGjB,MAAM,wBAAwB;AAAA,EACnC,MAAM,4BAAU,MAAM,CAAC,QAAQ,QAAQ,UACpC,YAAY,0FACZ,aAAa;AAAA,EAChB,OAAO,4BAAU,OAAO,YAAY,uBAAuB,aAAa;AAAA,EACxE,QAAQ,4BAAU,OAAO,YAAY,wBAAwB,aAAa;AAAA;AAGrE,MAAM,uBAAuB;AAAA,EAClC,OAAO,4BAAU,OAAO,YAAY,sBAAsB,aAAa;AAAA,EACvE,UAAU,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,OACxD,YAAY,uCACZ,aAAa,MAAM;AAAA;AAGjB,MAAM,uBAAuB;AAAA,EAClC,UAAU,MAAM;AAAA,EAChB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU,MAAM;AAAA,EAChB,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,cAAc,MAAM;AAAA,EACpB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,iBAAiB,MAAM;AAAA;AAGlB,MAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA;AAGH,MAAM,0BAA0B;AAAA,EACrC,OAAO;AAAA,EACP,UAAU,MAAM;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,46 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var utils_exports = {};
29
+ __export(utils_exports, {
30
+ setMultipleRefs: () => setMultipleRefs
31
+ });
32
+ var React = __toESM(require("react"));
33
+ const setMultipleRefs = (...refs) => (_ref) => {
34
+ refs.forEach((ref) => {
35
+ if (!ref || !_ref)
36
+ return;
37
+ if (typeof ref === "function") {
38
+ ref(_ref);
39
+ return;
40
+ }
41
+ if (ref)
42
+ ref.current = _ref;
43
+ });
44
+ };
45
+ module.exports = __toCommonJS(utils_exports);
46
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["type refInterfaceType = React.MutableRefObject<HTMLElement> | ((_ref: HTMLElement) => void);\n\nexport const setMultipleRefs =\n (...refs: refInterfaceType[]) =>\n (_ref: HTMLElement): void => {\n refs.forEach((ref) => {\n if (!ref || !_ref) return;\n if (typeof ref === 'function') {\n ref(_ref);\n return;\n }\n if (ref) ref.current = _ref;\n });\n };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,kBACX,IAAI,SACJ,CAAC,SAA4B;AAC3B,OAAK,QAAQ,CAAC,QAAQ;AACpB,QAAI,CAAC,OAAO,CAAC;AAAM;AACnB,QAAI,OAAO,QAAQ,YAAY;AAC7B,UAAI;AACJ;AAAA;AAEF,QAAI;AAAK,UAAI,UAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe } from "react-desc";
4
+ import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
5
+ import { DSPillV2DefaultProps, DSPillV2PropTypes } from "../props";
6
+ import { DropdownPill, LabelPill, ValuePill, InputPill, ReadOnlyPill, RemovablePill } from "./types";
7
+ const pillComponentGetter = {
8
+ dropdown: DropdownPill,
9
+ input: InputPill,
10
+ label: LabelPill,
11
+ readonly: ReadOnlyPill,
12
+ removable: RemovablePill,
13
+ value: ValuePill
14
+ };
15
+ const DSPillV2 = (props) => {
16
+ const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillV2DefaultProps);
17
+ useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypes);
18
+ const { type } = propsWithDefaults;
19
+ const PillComponent = pillComponentGetter[type];
20
+ return /* @__PURE__ */ React2.createElement(PillComponent, {
21
+ ...propsWithDefaults
22
+ });
23
+ };
24
+ DSPillV2.propTypes = DSPillV2PropTypes;
25
+ const DSPillV2WithSchema = describe(DSPillV2).description("Pill");
26
+ DSPillV2WithSchema.propTypes = DSPillV2PropTypes;
27
+ export {
28
+ DSPillV2,
29
+ DSPillV2WithSchema
30
+ };
31
+ //# sourceMappingURL=Pill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Pill.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSPillProps } from '../index.d';\nimport { DSPillV2DefaultProps, DSPillV2PropTypes } from '../props';\nimport { DropdownPill, LabelPill, ValuePill, InputPill, ReadOnlyPill, RemovablePill } from './types';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillProps>> = {\n dropdown: DropdownPill,\n input: InputPill,\n label: LabelPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillV2DefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypes);\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.propTypes = DSPillV2PropTypes;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypes;\n\nexport { DSPillV2, DSPillV2WithSchema };\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AAEA;AACA;AAEA,MAAM,sBAAwE;AAAA,EAC5E,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AAAA;AAGT,MAAM,WAA6C,CAAC,UAAU;AAC5D,QAAM,oBAAoB,6BAA6B,OAAO;AAC9D,iCAA+B,mBAAmB;AAClD,QAAM,EAAE,SAAS;AACjB,QAAM,gBAAgB,oBAAoB;AAE1C,SAAO,qCAAC,eAAD;AAAA,OAAmB;AAAA;AAAA;AAG5B,SAAS,YAAY;AACrB,MAAM,qBAAqB,SAAS,UAAU,YAAY;AAC1D,mBAAmB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe } from "react-desc";
4
+ import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
5
+ import { StyledPillButton } from "./styled";
6
+ import { DSPillButtonDefaultProps, DSPillButtonPropTypes } from "../props";
7
+ const typeToClassName = {
8
+ only: "ds-pill-button-only",
9
+ left: "ds-pill-button-left",
10
+ right: "ds-pill-button-right"
11
+ };
12
+ const DSPillButton = (props) => {
13
+ const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillButtonDefaultProps);
14
+ useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonPropTypes);
15
+ const { type, children, ...rest } = propsWithDefaults;
16
+ return /* @__PURE__ */ React2.createElement(StyledPillButton, {
17
+ ...rest,
18
+ buttonType: "raw",
19
+ className: `${typeToClassName[type]} ${rest.className}`
20
+ }, children);
21
+ };
22
+ DSPillButton.propTypes = DSPillButtonPropTypes;
23
+ const DSPillButtonWithSchema = describe(DSPillButton).description("Pill button");
24
+ DSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;
25
+ export {
26
+ DSPillButton,
27
+ DSPillButtonWithSchema
28
+ };
29
+ //# sourceMappingURL=PillButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/PillButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe } from 'react-desc';\nimport { DSButtonPropsT } from '@elliemae/ds-button';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { StyledPillButton } from './styled';\nimport { DSPillButtonDefaultProps, DSPillButtonPropTypes } from '../props';\n\nconst typeToClassName = {\n only: 'ds-pill-button-only',\n left: 'ds-pill-button-left',\n right: 'ds-pill-button-right',\n};\n\nconst DSPillButton: React.ComponentType<DSButtonPropsT> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillButtonDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonPropTypes);\n\n const { type, children, ...rest } = propsWithDefaults;\n\n return (\n <StyledPillButton {...rest} buttonType=\"raw\" className={`${typeToClassName[type]} ${rest.className}`}>\n {children}\n </StyledPillButton>\n );\n};\n\nDSPillButton.propTypes = DSPillButtonPropTypes;\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AAEA;AACA;AACA;AAEA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA;AAGT,MAAM,eAAoD,CAAC,UAAU;AACnE,QAAM,oBAAoB,6BAA6B,OAAO;AAC9D,iCAA+B,mBAAmB;AAElD,QAAM,EAAE,MAAM,aAAa,SAAS;AAEpC,SACE,qCAAC,kBAAD;AAAA,OAAsB;AAAA,IAAM,YAAW;AAAA,IAAM,WAAW,GAAG,gBAAgB,SAAS,KAAK;AAAA,KACtF;AAAA;AAKP,aAAa,YAAY;AACzB,MAAM,yBAAyB,SAAS,cAAc,YAAY;AAClE,uBAAuB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import React2, { createContext, useCallback, useMemo } from "react";
3
+ import { describe } from "react-desc";
4
+ import { uid } from "uid";
5
+ import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
6
+ import { DSPillGroupDefaultProps, DSPillGroupPropTypes } from "../props";
7
+ import { StyledPillGroup } from "./styled";
8
+ const DSPillGroupV2Context = createContext({
9
+ onKeyboardRemove: () => null
10
+ });
11
+ const DSPillGroupV2 = (props) => {
12
+ const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);
13
+ useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes);
14
+ const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);
15
+ const { children, width, innerRef } = propsWithDefaults;
16
+ const onKeyboardRemove = useCallback((pillUid) => {
17
+ const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
18
+ const pillIndex = elems.findIndex((elem) => elem.id === pillUid);
19
+ if (pillIndex > 0) {
20
+ elems[pillIndex - 1].focus();
21
+ } else if (pillIndex + 1 < elems.length) {
22
+ elems[pillIndex + 1].focus();
23
+ }
24
+ }, [pillGroupUid]);
25
+ return /* @__PURE__ */ React2.createElement(DSPillGroupV2Context.Provider, {
26
+ value: { onKeyboardRemove }
27
+ }, /* @__PURE__ */ React2.createElement(StyledPillGroup, {
28
+ width,
29
+ id: pillGroupUid,
30
+ cols: React2.Children.map(children, () => "auto"),
31
+ gutter: "2px",
32
+ ref: innerRef
33
+ }, children));
34
+ };
35
+ DSPillGroupV2.propTypes = DSPillGroupPropTypes;
36
+ const DSPillGroupV2WithSchema = describe(DSPillGroupV2);
37
+ DSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes;
38
+ export {
39
+ DSPillGroupV2,
40
+ DSPillGroupV2Context,
41
+ DSPillGroupV2WithSchema
42
+ };
43
+ //# sourceMappingURL=PillGroup.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/PillGroup.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSPillGroupProps } from '../index.d';\nimport { DSPillGroupDefaultProps, DSPillGroupPropTypes } from '../props';\nimport { StyledPillGroup } from './styled';\n\nexport const DSPillGroupV2Context = createContext<{ onKeyboardRemove: (pillUid: string) => void }>({\n onKeyboardRemove: () => null,\n});\n\nconst DSPillGroupV2: React.ComponentType<DSPillGroupProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes);\n\n const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);\n const { children, width, innerRef } = propsWithDefaults;\n const onKeyboardRemove = useCallback(\n (pillUid: string) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex > 0) {\n elems[pillIndex - 1].focus();\n } else if (pillIndex + 1 < elems.length) {\n elems[pillIndex + 1].focus();\n }\n },\n [pillGroupUid],\n );\n\n return (\n <DSPillGroupV2Context.Provider value={{ onKeyboardRemove }}>\n <StyledPillGroup\n width={width}\n id={pillGroupUid}\n cols={React.Children.map(children, () => 'auto')}\n gutter=\"2px\"\n ref={innerRef}\n >\n {children}\n </StyledPillGroup>\n </DSPillGroupV2Context.Provider>\n );\n};\n\nDSPillGroupV2.propTypes = DSPillGroupPropTypes;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA;AACA;AAEO,MAAM,uBAAuB,cAA+D;AAAA,EACjG,kBAAkB,MAAM;AAAA;AAG1B,MAAM,gBAAuD,CAAC,UAAU;AACtE,QAAM,oBAAoB,6BAA6B,OAAO;AAC9D,iCAA+B,mBAAmB;AAElD,QAAM,eAAe,QAAQ,MAAM,iBAAiB,SAAS;AAC7D,QAAM,EAAE,UAAU,OAAO,aAAa;AACtC,QAAM,mBAAmB,YACvB,CAAC,YAAoB;AACnB,UAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI;AAEhD,UAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO;AAExD,QAAI,YAAY,GAAG;AACjB,YAAM,YAAY,GAAG;AAAA,eACZ,YAAY,IAAI,MAAM,QAAQ;AACvC,YAAM,YAAY,GAAG;AAAA;AAAA,KAGzB,CAAC;AAGH,SACE,qCAAC,qBAAqB,UAAtB;AAAA,IAA+B,OAAO,EAAE;AAAA,KACtC,qCAAC,iBAAD;AAAA,IACE;AAAA,IACA,IAAI;AAAA,IACJ,MAAM,OAAM,SAAS,IAAI,UAAU,MAAM;AAAA,IACzC,QAAO;AAAA,IACP,KAAK;AAAA,KAEJ;AAAA;AAMT,cAAc,YAAY;AAC1B,MAAM,0BAA0B,SAAS;AACzC,wBAAwB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export * from "./Pill";
3
+ export * from "./PillGroup";
4
+ export * from "./PillButton";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Pill';\nexport * from './PillGroup';\nexport * from './PillButton';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;",
6
+ "names": []
7
+ }