@elliemae/ds-pills 3.3.0-next.2 → 3.3.0-next.5

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 (49) hide show
  1. package/dist/cjs/components/Pill.js +3 -15
  2. package/dist/cjs/components/Pill.js.map +1 -1
  3. package/dist/cjs/components/PillButton.js +4 -32
  4. package/dist/cjs/components/PillButton.js.map +1 -1
  5. package/dist/cjs/components/PillGroup.js +3 -19
  6. package/dist/cjs/components/PillGroup.js.map +1 -1
  7. package/dist/cjs/components/types/DropdownPill.js +4 -21
  8. package/dist/cjs/components/types/DropdownPill.js.map +1 -1
  9. package/dist/cjs/deprecated/DropdownPill.js +14 -50
  10. package/dist/cjs/deprecated/DropdownPill.js.map +1 -1
  11. package/dist/cjs/deprecated/InputPill.js +14 -46
  12. package/dist/cjs/deprecated/InputPill.js.map +1 -1
  13. package/dist/cjs/deprecated/LabeledDropdownPills.js +15 -53
  14. package/dist/cjs/deprecated/LabeledDropdownPills.js.map +1 -1
  15. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +26 -64
  16. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
  17. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +19 -55
  18. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
  19. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +24 -60
  20. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
  21. package/dist/cjs/deprecated/Pill.js +14 -48
  22. package/dist/cjs/deprecated/Pill.js.map +1 -1
  23. package/dist/cjs/deprecated/PillGroup.js +3 -15
  24. package/dist/cjs/deprecated/PillGroup.js.map +1 -1
  25. package/dist/esm/components/Pill.js +3 -17
  26. package/dist/esm/components/Pill.js.map +1 -1
  27. package/dist/esm/components/PillButton.js +4 -34
  28. package/dist/esm/components/PillButton.js.map +1 -1
  29. package/dist/esm/components/PillGroup.js +3 -21
  30. package/dist/esm/components/PillGroup.js.map +1 -1
  31. package/dist/esm/components/types/DropdownPill.js +4 -23
  32. package/dist/esm/components/types/DropdownPill.js.map +1 -1
  33. package/dist/esm/deprecated/DropdownPill.js +14 -52
  34. package/dist/esm/deprecated/DropdownPill.js.map +1 -1
  35. package/dist/esm/deprecated/InputPill.js +14 -48
  36. package/dist/esm/deprecated/InputPill.js.map +1 -1
  37. package/dist/esm/deprecated/LabeledDropdownPills.js +15 -55
  38. package/dist/esm/deprecated/LabeledDropdownPills.js.map +1 -1
  39. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +26 -66
  40. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
  41. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +19 -57
  42. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
  43. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +24 -62
  44. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
  45. package/dist/esm/deprecated/Pill.js +14 -50
  46. package/dist/esm/deprecated/Pill.js.map +1 -1
  47. package/dist/esm/deprecated/PillGroup.js +3 -17
  48. package/dist/esm/deprecated/PillGroup.js.map +1 -1
  49. package/package.json +15 -15
@@ -1,20 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
2
  import * as React from "react";
19
3
  import React2 from "react";
20
4
  import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-utilities";
@@ -33,7 +17,9 @@ const DSPillV2 = (props) => {
33
17
  useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypes);
34
18
  const { type } = propsWithDefaults;
35
19
  const PillComponent = pillComponentGetter[type];
36
- return /* @__PURE__ */ React2.createElement(PillComponent, __spreadValues({}, propsWithDefaults));
20
+ return /* @__PURE__ */ React2.createElement(PillComponent, {
21
+ ...propsWithDefaults
22
+ });
37
23
  };
38
24
  DSPillV2.propTypes = DSPillV2PropTypes;
39
25
  DSPillV2.displayName = "DSPillV2";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Pill.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\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;\nDSPillV2.displayName = 'DSPillV2';\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypes;\n\nexport { DSPillV2, DSPillV2WithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AAEA;AACA;AAEA,MAAM,sBAAwE;AAAA,EAC5E,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAA6C,CAAC,UAAU;AAC5D,QAAM,oBAAoB,6BAA6B,OAAO,oBAAoB;AAClF,iCAA+B,mBAAmB,iBAAiB;AACnE,QAAM,EAAE,SAAS;AACjB,QAAM,gBAAgB,oBAAoB;AAE1C,SAAO,qCAAC,kCAAkB,kBAAmB;AAC/C;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
5
+ "mappings": ";AAAA;ACCA;AACA;AAEA;AACA;AAEA,MAAM,sBAAwE;AAAA,EAC5E,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAA6C,CAAC,UAAU;AAC5D,QAAM,oBAAoB,6BAA6B,OAAO,oBAAoB;AAClF,iCAA+B,mBAAmB,iBAAiB;AACnE,QAAM,EAAE,SAAS;AACjB,QAAM,gBAAgB,oBAAoB;AAE1C,SAAO,qCAAC;AAAA,IAAe,GAAG;AAAA,GAAmB;AAC/C;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,35 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
- var __objRest = (source, exclude) => {
22
- var target = {};
23
- for (var prop in source)
24
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
- target[prop] = source[prop];
26
- if (source != null && __getOwnPropSymbols)
27
- for (var prop of __getOwnPropSymbols(source)) {
28
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
- target[prop] = source[prop];
30
- }
31
- return target;
32
- };
33
2
  import * as React from "react";
34
3
  import React2 from "react";
35
4
  import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-utilities";
@@ -43,11 +12,12 @@ const typeToClassName = {
43
12
  const DSPillButton = (props) => {
44
13
  const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillButtonDefaultProps);
45
14
  useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonPropTypes);
46
- const _a = propsWithDefaults, { type, children } = _a, rest = __objRest(_a, ["type", "children"]);
47
- return /* @__PURE__ */ React2.createElement(StyledPillButton, __spreadProps(__spreadValues({}, rest), {
15
+ const { type, children, ...rest } = propsWithDefaults;
16
+ return /* @__PURE__ */ React2.createElement(StyledPillButton, {
17
+ ...rest,
48
18
  buttonType: "raw",
49
19
  className: `${typeToClassName[type]} ${rest.className}`
50
- }), children);
20
+ }, children);
51
21
  };
52
22
  DSPillButton.propTypes = DSPillButtonPropTypes;
53
23
  DSPillButton.displayName = "DSPillButton";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/PillButton.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { DSButtonPropsT } from '@elliemae/ds-button';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\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;\nDSPillButton.displayName = 'DSPillButton';\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AAEA;AACA;AACA;AAEA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAoD,CAAC,UAAU;AACnE,QAAM,oBAAoB,6BAA6B,OAAO,wBAAwB;AACtF,iCAA+B,mBAAmB,qBAAqB;AAEvE,QAAoC,wBAA5B,QAAM,aAAsB,IAAT,iBAAS,IAAT,CAAnB,QAAM;AAEd,SACE,qCAAC,mDAAqB,OAArB;AAAA,IAA2B,YAAW;AAAA,IAAM,WAAW,GAAG,gBAAgB,SAAS,KAAK;AAAA,MACtF,QACH;AAEJ;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY,EAAE,YAAY,aAAa;AAC/E,uBAAuB,YAAY;",
5
+ "mappings": ";AAAA;ACCA;AAEA;AACA;AACA;AAEA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAoD,CAAC,UAAU;AACnE,QAAM,oBAAoB,6BAA6B,OAAO,wBAAwB;AACtF,iCAA+B,mBAAmB,qBAAqB;AAEvE,QAAM,EAAE,MAAM,aAAa,SAAS;AAEpC,SACE,qCAAC;AAAA,IAAkB,GAAG;AAAA,IAAM,YAAW;AAAA,IAAM,WAAW,GAAG,gBAAgB,SAAS,KAAK;AAAA,KACtF,QACH;AAEJ;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY,EAAE,YAAY,aAAa;AAC/E,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import React2, { createContext, useCallback, useMemo } from "react";
23
4
  import { uid } from "uid";
@@ -60,13 +41,14 @@ const DSPillGroupV2 = (props) => {
60
41
  }, [pillGroupUid]);
61
42
  return /* @__PURE__ */ React2.createElement(DSPillGroupV2Context.Provider, {
62
43
  value: { onKeyboardRemove, onKeyboardNavigation }
63
- }, /* @__PURE__ */ React2.createElement(StyledPillGroup, __spreadProps(__spreadValues({}, globalAttrs), {
44
+ }, /* @__PURE__ */ React2.createElement(StyledPillGroup, {
45
+ ...globalAttrs,
64
46
  width,
65
47
  id: pillGroupUid,
66
48
  cols: React2.Children.map(children, () => "auto"),
67
49
  gutter: "2px",
68
50
  ref: innerRef
69
- }), children));
51
+ }, children));
70
52
  };
71
53
  DSPillGroupV2.propTypes = DSPillGroupPropTypes;
72
54
  DSPillGroupV2.displayName = "DSPillGroupV2";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/PillGroup.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { createContext, useCallback, useMemo, WeakValidationMap } from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-utilities';\nimport { DSPillGroupProps } from '../index.d';\nimport { DSPillGroupDefaultProps, DSPillGroupPropTypes } from '../props';\nimport { StyledPillGroup } from './styled';\n\nexport const DSPillGroupV2Context = createContext<{\n onKeyboardRemove: (pillUid: string) => void;\n onKeyboardNavigation: (pillUid: string, step: number, e: KeyboardEvent) => void;\n}>({\n onKeyboardRemove: () => null,\n onKeyboardNavigation: () => null,\n});\n\nconst DSPillGroupV2: React.ComponentType<DSPillGroupProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes);\n\n const globalAttrs = useGetGlobalAttributes(propsWithDefaults);\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 const onKeyboardNavigation = useCallback(\n (pillUid: string, step: number, e: KeyboardEvent) => {\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 if (elems[pillIndex + step]) {\n e.stopPropagation();\n elems[pillIndex + step].focus();\n }\n }\n },\n [pillGroupUid],\n );\n\n return (\n <DSPillGroupV2Context.Provider value={{ onKeyboardRemove, onKeyboardNavigation }}>\n <StyledPillGroup\n {...globalAttrs}\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 as WeakValidationMap<unknown>;\nDSPillGroupV2.displayName = 'DSPillGroupV2';\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes as WeakValidationMap<unknown>;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AAEO,MAAM,uBAAuB,cAGjC;AAAA,EACD,kBAAkB,MAAM;AAAA,EACxB,sBAAsB,MAAM;AAC9B,CAAC;AAED,MAAM,gBAAuD,CAAC,UAAU;AACtE,QAAM,oBAAoB,6BAA6B,OAAO,uBAAuB;AACrF,iCAA+B,mBAAmB,oBAAoB;AAEtE,QAAM,cAAc,uBAAuB,iBAAiB;AAC5D,QAAM,eAAe,QAAQ,MAAM,iBAAiB,IAAI,KAAK,CAAC,CAAC;AAC/D,QAAM,EAAE,UAAU,OAAO,aAAa;AACtC,QAAM,mBAAmB,YACvB,CAAC,YAAoB;AACnB,UAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,UAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,QAAI,YAAY,GAAG;AACjB,YAAM,YAAY,GAAG,MAAM;AAAA,IAC7B,WAAW,YAAY,IAAI,MAAM,QAAQ;AACvC,YAAM,YAAY,GAAG,MAAM;AAAA,IAC7B;AAAA,EACF,GACA,CAAC,YAAY,CACf;AACA,QAAM,uBAAuB,YAC3B,CAAC,SAAiB,MAAc,MAAqB;AACnD,UAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,UAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,QAAI,aAAa,GAAG;AAClB,UAAI,MAAM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AM,uBAAuB,YAC3B,CAAC,SAAiB,MAAc,MAAqB;AACnD,UAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,UAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,QAAI,aAAa,GAAG;AAClB,UAAI,MAAM,YAAY,OAAO;AAC3B,UAAE,gBAAgB;AAClB,cAAM,YAAY,MAAM,MAAM;AAAA,MAChC;AAAA,IACF;AAAA,EACF,GACA,CAAC,YAAY,CACf;AAEA,SACE,qCAAC,qBAAqB,UAArB;AAAA,IAA8B,OAAO,EAAE,kBAAkB,qBAAqB;AAAA,KAC7E,qCAAC;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,IAAI;AAAA,IACJ,MAAM,OAAM,SAAS,IAAI,UAAU,MAAM,MAAM;AAAA,IAC/C,QAAO;AAAA,IACP,KAAK;AAAA,KAEJ,QACH,CACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import React2, { useMemo, useRef } from "react";
23
4
  import { DSDropdownMenuV2 } from "@elliemae/ds-common";
@@ -42,7 +23,7 @@ const DropdownPill = React2.memo(({ label, size, labelTruncated, dropdownProps,
42
23
  gutter: "2px",
43
24
  alignItems: "center",
44
25
  justifyItems: "center"
45
- }, /* @__PURE__ */ React2.createElement(TextComponent, null, label), /* @__PURE__ */ React2.createElement(DSDropdownMenuV2, __spreadProps(__spreadValues({
26
+ }, /* @__PURE__ */ React2.createElement(TextComponent, null, label), /* @__PURE__ */ React2.createElement(DSDropdownMenuV2, {
46
27
  placementOrderPreference: [
47
28
  "bottom-start",
48
29
  "bottom",
@@ -51,8 +32,8 @@ const DropdownPill = React2.memo(({ label, size, labelTruncated, dropdownProps,
51
32
  "top-start",
52
33
  "top",
53
34
  "top-end"
54
- ]
55
- }, dropdownProps), {
35
+ ],
36
+ ...dropdownProps,
56
37
  onClickOutside: (e) => {
57
38
  if (e.code === "Escape")
58
39
  chevronRef.current.focus();
@@ -60,7 +41,7 @@ const DropdownPill = React2.memo(({ label, size, labelTruncated, dropdownProps,
60
41
  dropdownProps.onClickOutside(e);
61
42
  },
62
43
  wrapperStyles: { w: "100%", h: "100%" }
63
- }), /* @__PURE__ */ React2.createElement(DSPillButton, {
44
+ }, /* @__PURE__ */ React2.createElement(DSPillButton, {
64
45
  className: "ds-pill-focus-point",
65
46
  "data-testid": "ds-pill-dropdown-chevron",
66
47
  innerRef: setMultipleRefs(chevronRef, innerRef),
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/types/DropdownPill.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { useMemo, useRef } from 'react';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-common';\nimport { uid } from 'uid';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { StyledDropdownPillWrapper } from '../styled';\nimport type { DSPillProps } from '../../index.d';\nimport { setMultipleRefs } from '../../utils';\nimport { DSPillButton } from '../PillButton';\n\nexport const DropdownPill = React.memo<DSPillProps>(\n ({ label, size, labelTruncated, dropdownProps, innerRef, ariaLabel, onDropdownClick }) => {\n const chevronRef = useRef(null);\n\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledDropdownPillWrapper\n size={size}\n id={pillUid}\n className=\"ds-pill-wrapper ds-pill-wrapper-dropdown\"\n data-testid=\"ds-pill-wrapper\"\n cols={['auto', '24px']}\n gutter=\"2px\"\n alignItems=\"center\"\n justifyItems=\"center\"\n >\n <TextComponent>{label}</TextComponent>\n <DSDropdownMenuV2\n placementOrderPreference={[\n 'bottom-start',\n 'bottom',\n 'bottom-end',\n 'right-end',\n 'top-start',\n 'top',\n 'top-end',\n ]}\n {...dropdownProps}\n onClickOutside={(e) => {\n if (e.code === 'Escape') chevronRef.current.focus();\n if (dropdownProps.onClickOutside) dropdownProps.onClickOutside(e);\n }}\n wrapperStyles={{ w: '100%', h: '100%' }}\n >\n <DSPillButton\n className=\"ds-pill-focus-point\"\n data-testid=\"ds-pill-dropdown-chevron\"\n innerRef={setMultipleRefs(chevronRef, innerRef)}\n aria-label={ariaLabel || label}\n type=\"right\"\n onClick={onDropdownClick}\n >\n <ChevronSmallDown color={['brand-primary', '800']} width={20} height={20} />\n </DSPillButton>\n </DSDropdownMenuV2>\n </StyledDropdownPillWrapper>\n );\n },\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEO,MAAM,eAAe,OAAM,KAChC,CAAC,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OAAO,IAAI;AAE9B,QAAM,UAAU,QAAQ,MAAM,WAAW,IAAI,KAAK,CAAC,CAAC;AAEpD,QAAM,gBAAgB,iBAClB,CAAC,EAAE,eAAe,qCAAC;AAAA,IAA2B,OAAO;AAAA,GAAU,IAC/D,OAAM;AAEV,SACE,qCAAC;AAAA,IACC;AAAA,IACA,IAAI;AAAA,IACJ,WAAU;AAAA,IACV,eAAY;AAAA,IACZ,MAAM,CAAC,QAAQ,MAAM;AAAA,IACrB,QAAO;AAAA,IACP,YAAW;AAAA,IACX,cAAa;AAAA,KAEb,qCAAC,qBAAe,KAAM,GACtB,qCAAC;AAAA,IACC,0BAA0B;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IACJ,gBAAgB,CAAC,MAAM;AACrB,UAAI,EAAE,SAAS;AAAU,mBAAW,QAAQ,MAAM;AAClD,UAAI,cAAc;AAAgB,sBAAc,eAAe,CAAC;AAAA,IAClE;AAAA,IACA,eAAe,EAAE,GAAG,QAAQ,GAAG,OAAO;AAAA,KAEtC,qCAAC;AAAA,IACC,WAAU;AAAA,IACV,eAAY;AAAA,IACZ,UAAU,gBAAgB,YAAY,QAAQ;AAAA,IAC9C,cAAY,aAAa;AAAA,IACzB,MAAK;AAAA,IACL,SAAS;AAAA,KAET,qCAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,KAAK;AAAA,IAAG,OAAO;AAAA,IAAI,QAAQ;AAAA,GAAI,CAC5E,CACF,CACF;AAEJ,CACF;",
6
6
  "names": []
7
7
  }
@@ -1,35 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
- var __objRest = (source, exclude) => {
22
- var target = {};
23
- for (var prop in source)
24
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
- target[prop] = source[prop];
26
- if (source != null && __getOwnPropSymbols)
27
- for (var prop of __getOwnPropSymbols(source)) {
28
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
- target[prop] = source[prop];
30
- }
31
- return target;
32
- };
33
2
  import * as React from "react";
34
3
  import React2, { useRef, useState } from "react";
35
4
  import { PropTypes, describe } from "@elliemae/ds-utilities";
@@ -37,28 +6,21 @@ import { DSDropdownMenu } from "@elliemae/ds-dropdownmenu";
37
6
  import { ChevronDown } from "@elliemae/ds-icons";
38
7
  import { useFocusGroupItem } from "@elliemae/ds-shared";
39
8
  import { Pill } from "./Pill";
40
- function DropdownPill(_a) {
41
- var _b = _a, {
42
- containerProps = {},
43
- label = "",
44
- variant,
45
- tabIndex = -1,
46
- closeMenuOnItemSelection = false,
47
- maxWidth,
48
- minWidth
49
- } = _b, dropdownProps = __objRest(_b, [
50
- "containerProps",
51
- "label",
52
- "variant",
53
- "tabIndex",
54
- "closeMenuOnItemSelection",
55
- "maxWidth",
56
- "minWidth"
57
- ]);
9
+ function DropdownPill({
10
+ containerProps = {},
11
+ label = "",
12
+ variant,
13
+ tabIndex = -1,
14
+ closeMenuOnItemSelection = false,
15
+ maxWidth,
16
+ minWidth,
17
+ ...dropdownProps
18
+ }) {
58
19
  const ref = useRef(null);
59
20
  const [chevronEl, chevronRef] = useState();
60
21
  const { focusFirst } = useFocusGroupItem(ref);
61
- return /* @__PURE__ */ React2.createElement(DSDropdownMenu, __spreadProps(__spreadValues({}, dropdownProps), {
22
+ return /* @__PURE__ */ React2.createElement(DSDropdownMenu, {
23
+ ...dropdownProps,
62
24
  closeMenuOnItemSelection,
63
25
  maxWidth,
64
26
  hideIfNotVisible: true,
@@ -69,7 +31,7 @@ function DropdownPill(_a) {
69
31
  triggerComponent: /* @__PURE__ */ React2.createElement(Pill, {
70
32
  "data-testid": "dropdown-pill",
71
33
  className: "dropdown-pill",
72
- containerProps: __spreadValues({ role: "listbox" }, containerProps),
34
+ containerProps: { role: "listbox", ...containerProps },
73
35
  innerRef: ref,
74
36
  label,
75
37
  rightAddon: /* @__PURE__ */ React2.createElement("div", {
@@ -81,7 +43,7 @@ function DropdownPill(_a) {
81
43
  tabIndex,
82
44
  variant
83
45
  })
84
- }));
46
+ });
85
47
  }
86
48
  const props = {
87
49
  containerProps: PropTypes.object.description("props injected to component wrapper"),
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/DropdownPill.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { useFocusGroupItem } from '@elliemae/ds-shared';\nimport { Pill } from './Pill';\n\nfunction DropdownPill({\n containerProps = {},\n label = '',\n variant,\n tabIndex = -1,\n closeMenuOnItemSelection = false,\n maxWidth,\n minWidth,\n ...dropdownProps\n}) {\n const ref = useRef(null);\n const [chevronEl, chevronRef] = useState();\n const { focusFirst } = useFocusGroupItem(ref);\n return (\n <DSDropdownMenu\n {...dropdownProps}\n closeMenuOnItemSelection={closeMenuOnItemSelection}\n maxWidth={maxWidth}\n hideIfNotVisible\n menuProps={{ className: 'dropdown-pill-menu', zIndex: 100 }}\n minWidth={minWidth}\n onClose={focusFirst}\n referenceNode={chevronEl}\n triggerComponent={\n <Pill\n data-testid=\"dropdown-pill\"\n className=\"dropdown-pill\"\n containerProps={{ role: 'listbox', ...containerProps }}\n innerRef={ref}\n label={label}\n rightAddon={\n <div ref={chevronRef}>\n <ChevronDown className=\"dropdown-pill-chevron-down\" data-testid=\"dropdown-pill-button\" />\n </div>\n }\n tabIndex={tabIndex}\n variant={variant}\n />\n }\n />\n );\n}\n\nconst props = {\n /** props injected to component wrapper */\n containerProps: PropTypes.object.description('props injected to component wrapper'),\n /** labeled pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** pill variant */\n variant: PropTypes.oneOf(['value', 'title']).description('pill variant'),\n /** html focus border */\n tabIndex: PropTypes.number.description('html focus order'),\n /** close menu on item selection */\n closeMenuOnItemSelection: PropTypes.bool.description('close menu on item selection'),\n /** pill max width */\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('pill max width'),\n /** pill min width */\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('pill min width'),\n};\n\nDropdownPill.propTypes = props;\nDropdownPill.displayName = 'DropdownPill';\nconst DSDropdownPillWithSchema = describe(DropdownPill);\nDSDropdownPillWithSchema.propTypes = props;\n\nexport { DropdownPill, DSDropdownPillWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,sBAAsB,IASnB;AATmB,eACpB;AAAA,qBAAiB,CAAC;AAAA,IAClB,QAAQ;AAAA,IACR;AAAA,IACA,WAAW;AAAA,IACX,2BAA2B;AAAA,IAC3B;AAAA,IACA;AAAA,MAPoB,IAQjB,0BARiB,IAQjB;AAAA,IAPH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAC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B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,32 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
- var __objRest = (source, exclude) => {
19
- var target = {};
20
- for (var prop in source)
21
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
22
- target[prop] = source[prop];
23
- if (source != null && __getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(source)) {
25
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
26
- target[prop] = source[prop];
27
- }
28
- return target;
29
- };
30
2
  import * as React from "react";
31
3
  import React2 from "react";
32
4
  import { CloseXsmall } from "@elliemae/ds-icons";
@@ -36,23 +8,16 @@ import { Pill } from "./Pill";
36
8
  const StyledInputPill = aggregatedClasses(Pill)("input-pill", null, ({ value }) => ({
37
9
  value
38
10
  }));
39
- function InputPill(_a) {
40
- var _b = _a, {
41
- containerProps = {},
42
- placeholder = "Enter Value",
43
- onChange = () => {
44
- },
45
- onRemove,
46
- value,
47
- type
48
- } = _b, otherProps = __objRest(_b, [
49
- "containerProps",
50
- "placeholder",
51
- "onChange",
52
- "onRemove",
53
- "value",
54
- "type"
55
- ]);
11
+ function InputPill({
12
+ containerProps = {},
13
+ placeholder = "Enter Value",
14
+ onChange = () => {
15
+ },
16
+ onRemove,
17
+ value,
18
+ type,
19
+ ...otherProps
20
+ }) {
56
21
  let TypeOfInput = DSInput;
57
22
  switch (type) {
58
23
  case "inputText":
@@ -68,12 +33,13 @@ function InputPill(_a) {
68
33
  className: "input-pill",
69
34
  classProps: { value },
70
35
  containerProps,
71
- label: /* @__PURE__ */ React2.createElement(TypeOfInput, __spreadValues({
36
+ label: /* @__PURE__ */ React2.createElement(TypeOfInput, {
72
37
  "data-testid": "input-pill",
73
38
  onChange,
74
39
  placeholder,
75
- value
76
- }, otherProps)),
40
+ value,
41
+ ...otherProps
42
+ }),
77
43
  rightAddon: value && /* @__PURE__ */ React2.createElement(CloseXsmall, {
78
44
  className: "remove-pill-button",
79
45
  "data-testid": "remove-pill-button",
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/InputPill.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSInput, DSInputMask } from '@elliemae/ds-form';\nimport { Pill } from './Pill';\n\nconst StyledInputPill = aggregatedClasses(Pill)('input-pill', null, ({ value }) => ({\n value,\n}));\n\nexport function InputPill({\n containerProps = {},\n placeholder = 'Enter Value',\n onChange = () => {},\n onRemove,\n value,\n type,\n ...otherProps\n}) {\n let TypeOfInput = DSInput;\n // TODO: implement the DSTimeInput, see how because it returns a moment()\n // TODO: implement the DSDateInput\n switch (type) {\n case 'inputText':\n TypeOfInput = DSInput;\n break;\n case 'inputMask':\n TypeOfInput = DSInputMask;\n break;\n default:\n break;\n }\n\n return (\n <StyledInputPill\n className=\"input-pill\"\n classProps={{ value }}\n containerProps={containerProps}\n label={\n <TypeOfInput\n data-testid=\"input-pill\"\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n {...otherProps}\n />\n }\n rightAddon={\n value && <CloseXsmall className=\"remove-pill-button\" data-testid=\"remove-pill-button\" onClick={onRemove} />\n }\n tabIndex={-1}\n />\n );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,kBAAkB,IAAI,EAAE,cAAc,MAAM,CAAC,EAAE,YAAa;AAAA,EAClF;AACF,EAAE;AAEK,mBAAmB,IAQvB;AARuB,eACxB;AAAA,qBAAiB,CAAC;AAAA,IAClB,cAAc;AAAA,IACd,WAAW,MAAM;AAAA,IAAC;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,MANwB,IAOrB,uBAPqB,IAOrB;AAAA,IANH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,MAAI,cAAc;AAGlB,UAAQ;AAAA,SACD;AACH,oBAAc;AACd;AAAA,SACG;AACH,oBAAc;AACd;AAAA;AAEA;AAAA;AAGJ,SACE,qCAAC;AAAA,IACC,WAAU;AAAA,IACV,YAAY,EAAE,MAAM;AAAA,IACpB;AAAA,IACA,OACE,qCAAC;AAAA,MACC,eAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,OACI,WACN;AAAA,IAEF,YACE,SAAS,qCAAC;AAAA,MAAY,WAAU;AAAA,MAAqB,eAAY;AAAA,MAAqB,SAAS;AAAA,KAAU;AAAA,IAE3G,UAAU;AAAA,GACZ;AAEJ;",
5
+ "mappings": ";AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,kBAAkB,IAAI,EAAE,cAAc,MAAM,CAAC,EAAE,YAAa;AAAA,EAClF;AACF,EAAE;AAEK,mBAAmB;AAAA,EACxB,iBAAiB,CAAC;AAAA,EAClB,cAAc;AAAA,EACd,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,GACF;AACD,MAAI,cAAc;AAGlB,UAAQ;AAAA,SACD;AACH,oBAAc;AACd;AAAA,SACG;AACH,oBAAc;AACd;AAAA;AAEA;AAAA;AAGJ,SACE,qCAAC;AAAA,IACC,WAAU;AAAA,IACV,YAAY,EAAE,MAAM;AAAA,IACpB;AAAA,IACA,OACE,qCAAC;AAAA,MACC,eAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,KACN;AAAA,IAEF,YACE,SAAS,qCAAC;AAAA,MAAY,WAAU;AAAA,MAAqB,eAAY;AAAA,MAAqB,SAAS;AAAA,KAAU;AAAA,IAE3G,UAAU;AAAA,GACZ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,35 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
- var __objRest = (source, exclude) => {
22
- var target = {};
23
- for (var prop in source)
24
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
- target[prop] = source[prop];
26
- if (source != null && __getOwnPropSymbols)
27
- for (var prop of __getOwnPropSymbols(source)) {
28
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
- target[prop] = source[prop];
30
- }
31
- return target;
32
- };
33
2
  import * as React from "react";
34
3
  import React2 from "react";
35
4
  import { PropTypes, describe } from "@elliemae/ds-utilities";
@@ -43,40 +12,31 @@ const DropdownPills = {
43
12
  cascaded: LabeledDropdownCascadeMenuPill
44
13
  };
45
14
  const createDropdownPill = (type) => DropdownPills[type] || DropdownPills.single;
46
- function LabeledDropdownPills(_a) {
47
- var _b = _a, {
48
- label = "",
49
- value,
50
- type,
51
- onFocusNextGroup,
52
- onFocusPreviousGroup,
53
- onFocusGroupSet,
54
- maxWidth,
55
- minWidth,
56
- fixed
57
- } = _b, menuProps = __objRest(_b, [
58
- "label",
59
- "value",
60
- "type",
61
- "onFocusNextGroup",
62
- "onFocusPreviousGroup",
63
- "onFocusGroupSet",
64
- "maxWidth",
65
- "minWidth",
66
- "fixed"
67
- ]);
15
+ function LabeledDropdownPills({
16
+ label = "",
17
+ value,
18
+ type,
19
+ onFocusNextGroup,
20
+ onFocusPreviousGroup,
21
+ onFocusGroupSet,
22
+ maxWidth,
23
+ minWidth,
24
+ fixed,
25
+ ...menuProps
26
+ }) {
68
27
  const Component = createDropdownPill(type);
69
28
  return /* @__PURE__ */ React2.createElement(PillGroup, {
70
29
  onFocusGroupSet,
71
30
  onFocusNextGroup,
72
31
  onFocusPreviousGroup
73
- }, /* @__PURE__ */ React2.createElement(Component, __spreadProps(__spreadValues({}, menuProps), {
32
+ }, /* @__PURE__ */ React2.createElement(Component, {
33
+ ...menuProps,
74
34
  label,
75
35
  maxWidth,
76
36
  minWidth,
77
37
  value,
78
38
  fixed
79
- })));
39
+ }));
80
40
  }
81
41
  const props = {
82
42
  type: PropTypes.oneOf(["single", "multi", "cascaded"]).description("pill type"),
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/LabeledDropdownPills.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { PillGroup } from './PillGroup';\nimport { LabeledDropdownSinglePill } from './LabeledDropdownPillsTypes/LabeledDropdownSinglePill';\nimport { LabeledDropdownMultiPills } from './LabeledDropdownPillsTypes/LabeledDropdownMultiPill';\nimport { LabeledDropdownCascadeMenuPill } from './LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill';\n\nconst DropdownPills = {\n single: LabeledDropdownSinglePill,\n multi: LabeledDropdownMultiPills,\n cascaded: LabeledDropdownCascadeMenuPill,\n};\n\nconst createDropdownPill = (type) =>\n DropdownPills[type] || DropdownPills.single;\n\nfunction LabeledDropdownPills({\n label = '',\n value,\n type,\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n maxWidth,\n minWidth,\n fixed,\n ...menuProps\n}) {\n const Component = createDropdownPill(type);\n\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Component\n {...menuProps}\n label={label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n value={value}\n fixed={fixed}\n />\n </PillGroup>\n );\n}\n\nconst props = {\n /** pill type */\n type: PropTypes.oneOf(['single', 'multi', 'cascaded']).description(\n 'pill type',\n ),\n /** focus next group callback */\n onFocusNextGroup: PropTypes.func.description('focus next group callback'),\n /** focus prev group callback */\n onFocusPreviousGroup: PropTypes.func.description('focus prev group callback'),\n /** focus group set callback */\n onFocusGroupSet: PropTypes.func.description('focus group set callback'),\n /** pill max width */\n maxWidth: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).description('pill max width'),\n /** pill min width */\n minWidth: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).description('pill min width'),\n /** fixed pill */\n fixed: PropTypes.bool.description('fixed pill'),\n /** pill label text */\n label: PropTypes.string.isRequired.description('pill label text'),\n /** pill value */\n value: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n }),\n ),\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n }),\n ]).description('pill value'),\n};\n\nLabeledDropdownPills.propTypes = props;\nLabeledDropdownPills.displayName = 'LabeledDropdownPills';\nconst DSLabeledDropdownPillsWithSchema = describe(LabeledDropdownPills);\nDSLabeledDropdownPillsWithSchema.propTypes = props;\n\nexport { LabeledDropdownPills, DSLabeledDropdownPillsWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,gBAAgB;AAAA,EACpB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACZ;AAEA,MAAM,qBAAqB,CAAC,SAC1B,cAAc,SAAS,cAAc;AAEvC,8BAA8B,IAW3B;AAX2B,eAC5B;AAAA,YAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAT4B,IAUzB,sBAVyB,IAUzB;AAAA,IATH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,YAAY,mBAAmB,IAAI;AAEzC,SACE,qCAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,KAEA,qCAAC,4CACK,YADL;AAAA,IAEC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACF,CACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EAEZ,MAAM,UAAU,MAAM,CAAC,UAAU,SAAS,UAAU,CAAC,EAAE,YACrD,WACF;AAAA,EAEA,kBAAkB,UAAU,KAAK,YAAY,2BAA2B;AAAA,EAExE,sBAAsB,UAAU,KAAK,YAAY,2BAA2B;AAAA,EAE5E,iBAAiB,UAAU,KAAK,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