@elliemae/ds-pills 3.12.0-rc.2 → 3.12.0-rc.3

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 (89) hide show
  1. package/dist/cjs/DSPillDefinitions.js +36 -0
  2. package/dist/cjs/DSPillDefinitions.js.map +7 -0
  3. package/dist/cjs/components/Pill.js +4 -5
  4. package/dist/cjs/components/Pill.js.map +2 -2
  5. package/dist/cjs/components/PillButton.js +4 -8
  6. package/dist/cjs/components/PillButton.js.map +2 -2
  7. package/dist/cjs/components/PillGroup.js +8 -7
  8. package/dist/cjs/components/PillGroup.js.map +2 -2
  9. package/dist/cjs/components/types/DropdownPill.js +51 -50
  10. package/dist/cjs/components/types/DropdownPill.js.map +1 -1
  11. package/dist/cjs/components/types/InputPill.js +42 -36
  12. package/dist/cjs/components/types/InputPill.js.map +1 -1
  13. package/dist/cjs/components/types/LabelPill.js +18 -19
  14. package/dist/cjs/components/types/LabelPill.js.map +1 -1
  15. package/dist/cjs/components/types/ReadOnlyPill.js +20 -21
  16. package/dist/cjs/components/types/ReadOnlyPill.js.map +1 -1
  17. package/dist/cjs/components/types/RemovablePill.js +39 -36
  18. package/dist/cjs/components/types/RemovablePill.js.map +1 -1
  19. package/dist/cjs/components/types/ValuePill.js +19 -27
  20. package/dist/cjs/components/types/ValuePill.js.map +1 -1
  21. package/dist/cjs/deprecated/DropdownPill.js +26 -26
  22. package/dist/cjs/deprecated/DropdownPill.js.map +1 -1
  23. package/dist/cjs/deprecated/InputPill.js +20 -18
  24. package/dist/cjs/deprecated/InputPill.js.map +1 -1
  25. package/dist/cjs/deprecated/LabeledDropdownPills.js +9 -13
  26. package/dist/cjs/deprecated/LabeledDropdownPills.js.map +1 -1
  27. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +40 -42
  28. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
  29. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +15 -20
  30. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
  31. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +20 -17
  32. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
  33. package/dist/cjs/deprecated/LabeledPills.js +12 -14
  34. package/dist/cjs/deprecated/LabeledPills.js.map +1 -1
  35. package/dist/cjs/deprecated/OverflowPill.js +20 -14
  36. package/dist/cjs/deprecated/OverflowPill.js.map +1 -1
  37. package/dist/cjs/deprecated/Pill.js +5 -16
  38. package/dist/cjs/deprecated/Pill.js.map +1 -1
  39. package/dist/cjs/deprecated/PillGroup.js +13 -13
  40. package/dist/cjs/deprecated/PillGroup.js.map +1 -1
  41. package/dist/cjs/deprecated/ReadOnlyPill.js +34 -24
  42. package/dist/cjs/deprecated/ReadOnlyPill.js.map +1 -1
  43. package/dist/cjs/deprecated/RemovablePill.js +21 -23
  44. package/dist/cjs/deprecated/RemovablePill.js.map +1 -1
  45. package/dist/esm/DSPillDefinitions.js +10 -0
  46. package/dist/esm/DSPillDefinitions.js.map +7 -0
  47. package/dist/esm/components/Pill.js +4 -5
  48. package/dist/esm/components/Pill.js.map +2 -2
  49. package/dist/esm/components/PillButton.js +4 -8
  50. package/dist/esm/components/PillButton.js.map +2 -2
  51. package/dist/esm/components/PillGroup.js +8 -7
  52. package/dist/esm/components/PillGroup.js.map +2 -2
  53. package/dist/esm/components/types/DropdownPill.js +51 -50
  54. package/dist/esm/components/types/DropdownPill.js.map +1 -1
  55. package/dist/esm/components/types/InputPill.js +42 -36
  56. package/dist/esm/components/types/InputPill.js.map +1 -1
  57. package/dist/esm/components/types/LabelPill.js +18 -19
  58. package/dist/esm/components/types/LabelPill.js.map +1 -1
  59. package/dist/esm/components/types/ReadOnlyPill.js +20 -21
  60. package/dist/esm/components/types/ReadOnlyPill.js.map +1 -1
  61. package/dist/esm/components/types/RemovablePill.js +39 -36
  62. package/dist/esm/components/types/RemovablePill.js.map +1 -1
  63. package/dist/esm/components/types/ValuePill.js +19 -27
  64. package/dist/esm/components/types/ValuePill.js.map +1 -1
  65. package/dist/esm/deprecated/DropdownPill.js +26 -26
  66. package/dist/esm/deprecated/DropdownPill.js.map +1 -1
  67. package/dist/esm/deprecated/InputPill.js +20 -18
  68. package/dist/esm/deprecated/InputPill.js.map +1 -1
  69. package/dist/esm/deprecated/LabeledDropdownPills.js +9 -13
  70. package/dist/esm/deprecated/LabeledDropdownPills.js.map +1 -1
  71. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +40 -42
  72. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
  73. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +15 -20
  74. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
  75. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +20 -17
  76. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
  77. package/dist/esm/deprecated/LabeledPills.js +12 -14
  78. package/dist/esm/deprecated/LabeledPills.js.map +1 -1
  79. package/dist/esm/deprecated/OverflowPill.js +20 -14
  80. package/dist/esm/deprecated/OverflowPill.js.map +1 -1
  81. package/dist/esm/deprecated/Pill.js +5 -16
  82. package/dist/esm/deprecated/Pill.js.map +1 -1
  83. package/dist/esm/deprecated/PillGroup.js +13 -13
  84. package/dist/esm/deprecated/PillGroup.js.map +1 -1
  85. package/dist/esm/deprecated/ReadOnlyPill.js +34 -24
  86. package/dist/esm/deprecated/ReadOnlyPill.js.map +1 -1
  87. package/dist/esm/deprecated/RemovablePill.js +21 -23
  88. package/dist/esm/deprecated/RemovablePill.js.map +1 -1
  89. package/package.json +14 -14
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var DSPillDefinitions_exports = {};
26
+ __export(DSPillDefinitions_exports, {
27
+ DSPillButtonName: () => DSPillButtonName,
28
+ DSPillGroupName: () => DSPillGroupName,
29
+ DSPillName: () => DSPillName
30
+ });
31
+ module.exports = __toCommonJS(DSPillDefinitions_exports);
32
+ var React = __toESM(require("react"));
33
+ const DSPillName = "DSPill";
34
+ const DSPillButtonName = "DSPillButton";
35
+ const DSPillGroupName = "DSPillGroup";
36
+ //# sourceMappingURL=DSPillDefinitions.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSPillDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const DSPillName = 'DSPill';\n\nexport const DSPillButtonName = 'DSPillButton';\n\nexport const DSPillGroupName = 'DSPillGroup';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAEnB,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;",
6
+ "names": []
7
+ }
@@ -33,6 +33,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
33
33
  var import_ds_utilities = require("@elliemae/ds-utilities");
34
34
  var import_props = require("../props");
35
35
  var import_types = require("./types");
36
+ var import_DSPillDefinitions = require("../DSPillDefinitions");
36
37
  const pillComponentGetter = {
37
38
  dropdown: import_types.DropdownPill,
38
39
  input: import_types.InputPill,
@@ -43,15 +44,13 @@ const pillComponentGetter = {
43
44
  };
44
45
  const DSPillV2 = (props) => {
45
46
  const propsWithDefaults = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_props.DSPillV2DefaultProps);
46
- (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillV2PropTypes);
47
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillV2PropTypes, import_DSPillDefinitions.DSPillName);
47
48
  const { type } = propsWithDefaults;
48
49
  const PillComponent = pillComponentGetter[type];
49
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PillComponent, {
50
- ...propsWithDefaults
51
- });
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PillComponent, { ...propsWithDefaults });
52
51
  };
53
52
  DSPillV2.propTypes = import_props.DSPillV2PropTypes;
54
- DSPillV2.displayName = "DSPillV2";
53
+ DSPillV2.displayName = import_DSPillDefinitions.DSPillName;
55
54
  const DSPillV2WithSchema = (0, import_ds_utilities.describe)(DSPillV2).description("Pill");
56
55
  DSPillV2WithSchema.propTypes = import_props.DSPillV2PropTypes;
57
56
  //# sourceMappingURL=Pill.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Pill.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBd;AApBT,0BAAuF;AAEvF,mBAAwD;AACxD,mBAA2F;AAE3F,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,wBAAoB,kDAA6B,OAAO,iCAAoB;AAClF,0DAA+B,mBAAmB,8BAAiB;AACnE,QAAM,EAAE,KAAK,IAAI;AACjB,QAAM,gBAAgB,oBAAoB;AAE1C,SAAO,4CAAC;AAAA,IAAe,GAAG;AAAA,GAAmB;AAC/C;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,8BAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
4
+ "sourcesContent": ["/* 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';\nimport { DSPillName } from '../DSPillDefinitions';\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, DSPillName);\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.propTypes = DSPillV2PropTypes;\nDSPillV2.displayName = DSPillName;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypes;\n\nexport { DSPillV2, DSPillV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBd;AArBT,0BAAuF;AAEvF,mBAAwD;AACxD,mBAA2F;AAC3F,+BAA2B;AAE3B,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,wBAAoB,kDAA6B,OAAO,iCAAoB;AAClF,0DAA+B,mBAAmB,gCAAmB,mCAAU;AAC/E,QAAM,EAAE,KAAK,IAAI;AACjB,QAAM,gBAAgB,oBAAoB;AAE1C,SAAO,4CAAC,iBAAe,GAAG,mBAAmB;AAC/C;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,8BAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -33,6 +33,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
33
33
  var import_ds_utilities = require("@elliemae/ds-utilities");
34
34
  var import_styled = require("./styled");
35
35
  var import_props = require("../props");
36
+ var import_DSPillDefinitions = require("../DSPillDefinitions");
36
37
  const typeToClassName = {
37
38
  only: "ds-pill-button-only",
38
39
  left: "ds-pill-button-left",
@@ -40,17 +41,12 @@ const typeToClassName = {
40
41
  };
41
42
  const DSPillButton = (props) => {
42
43
  const propsWithDefaults = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_props.DSPillButtonDefaultProps);
43
- (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillButtonPropTypes);
44
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillButtonPropTypes, import_DSPillDefinitions.DSPillButtonName);
44
45
  const { type, children, ...rest } = propsWithDefaults;
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledPillButton, {
46
- ...rest,
47
- buttonType: "raw",
48
- className: `${typeToClassName[type]} ${rest.className}`,
49
- children
50
- });
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledPillButton, { ...rest, buttonType: "raw", className: `${typeToClassName[type]} ${rest.className}`, children });
51
47
  };
52
48
  DSPillButton.propTypes = import_props.DSPillButtonPropTypes;
53
- DSPillButton.displayName = "DSPillButton";
49
+ DSPillButton.displayName = import_DSPillDefinitions.DSPillButtonName;
54
50
  const DSPillButtonWithSchema = (0, import_ds_utilities.describe)(DSPillButton).description("Pill button");
55
51
  DSPillButtonWithSchema.propTypes = import_props.DSPillButtonPropTypes;
56
52
  //# sourceMappingURL=PillButton.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/PillButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport type { 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoBnB;AAjBJ,0BAAuF;AACvF,oBAAiC;AACjC,mBAAgE;AAEhE,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAoD,CAAC,UAAU;AACnE,QAAM,wBAAoB,kDAA6B,OAAO,qCAAwB;AACtF,0DAA+B,mBAAmB,kCAAqB;AAEvE,QAAM,EAAE,MAAM,aAAa,KAAK,IAAI;AAEpC,SACE,4CAAC;AAAA,IAAkB,GAAG;AAAA,IAAM,YAAW;AAAA,IAAM,WAAW,GAAG,gBAAgB,SAAS,KAAK;AAAA,IACtF;AAAA,GACH;AAEJ;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY,EAAE,YAAY,aAAa;AAC/E,uBAAuB,YAAY;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport type { DSButtonPropsT } from '@elliemae/ds-button';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { StyledPillButton } from './styled';\nimport { DSPillButtonDefaultProps, DSPillButtonPropTypes } from '../props';\nimport { DSPillButtonName } from '../DSPillDefinitions';\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, DSPillButtonName);\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 = DSPillButtonName;\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AAlBJ,0BAAuF;AACvF,oBAAiC;AACjC,mBAAgE;AAChE,+BAAiC;AAEjC,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAoD,CAAC,UAAU;AACnE,QAAM,wBAAoB,kDAA6B,OAAO,qCAAwB;AACtF,0DAA+B,mBAAmB,oCAAuB,yCAAgB;AAEzF,QAAM,EAAE,MAAM,aAAa,KAAK,IAAI;AAEpC,SACE,4CAAC,kCAAkB,GAAG,MAAM,YAAW,OAAM,WAAW,GAAG,gBAAgB,SAAS,KAAK,aACtF,UACH;AAEJ;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY,EAAE,YAAY,aAAa;AAC/E,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -36,13 +36,14 @@ var import_uid = require("uid");
36
36
  var import_ds_utilities = require("@elliemae/ds-utilities");
37
37
  var import_props = require("../props");
38
38
  var import_styled = require("./styled");
39
+ var import_DSPillDefinitions = require("../DSPillDefinitions");
39
40
  const DSPillGroupV2Context = (0, import_react.createContext)({
40
41
  onKeyboardRemove: () => null,
41
42
  onKeyboardNavigation: () => null
42
43
  });
43
44
  const DSPillGroupV2 = (props) => {
44
45
  const propsWithDefaults = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_props.DSPillGroupDefaultProps);
45
- (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillGroupPropTypes);
46
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillGroupPropTypes, import_DSPillDefinitions.DSPillGroupName);
46
47
  const globalAttrs = (0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefaults);
47
48
  const pillGroupUid = (0, import_react.useMemo)(() => `ds-pill-group-${(0, import_uid.uid)()}`, []);
48
49
  const { children, width, innerRef } = propsWithDefaults;
@@ -71,9 +72,9 @@ const DSPillGroupV2 = (props) => {
71
72
  },
72
73
  [pillGroupUid]
73
74
  );
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DSPillGroupV2Context.Provider, {
75
- value: { onKeyboardRemove, onKeyboardNavigation },
76
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledPillGroup, {
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DSPillGroupV2Context.Provider, { value: { onKeyboardRemove, onKeyboardNavigation }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ import_styled.StyledPillGroup,
77
+ {
77
78
  ...globalAttrs,
78
79
  width,
79
80
  id: pillGroupUid,
@@ -81,11 +82,11 @@ const DSPillGroupV2 = (props) => {
81
82
  gutter: "2px",
82
83
  ref: innerRef,
83
84
  children
84
- })
85
- });
85
+ }
86
+ ) });
86
87
  };
87
88
  DSPillGroupV2.propTypes = import_props.DSPillGroupPropTypes;
88
- DSPillGroupV2.displayName = "DSPillGroupV2";
89
+ DSPillGroupV2.displayName = import_DSPillDefinitions.DSPillGroupName;
89
90
  const DSPillGroupV2WithSchema = (0, import_ds_utilities.describe)(DSPillGroupV2);
90
91
  DSPillGroupV2WithSchema.propTypes = import_props.DSPillGroupPropTypes;
91
92
  //# sourceMappingURL=PillGroup.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/PillGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport type { WeakValidationMap } from 'react';\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-utilities';\nimport type { 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6DjB;AA3DN,mBAA2D;AAC3D,iBAAoB;AACpB,0BAKO;AAEP,mBAA8D;AAC9D,oBAAgC;AAEzB,MAAM,2BAAuB,4BAGjC;AAAA,EACD,kBAAkB,MAAM;AAAA,EACxB,sBAAsB,MAAM;AAC9B,CAAC;AAED,MAAM,gBAAuD,CAAC,UAAU;AACtE,QAAM,wBAAoB,kDAA6B,OAAO,oCAAuB;AACrF,0DAA+B,mBAAmB,iCAAoB;AAEtE,QAAM,kBAAc,4CAAuB,iBAAiB;AAC5D,QAAM,mBAAe,sBAAQ,MAAM,qBAAiB,gBAAI,KAAK,CAAC,CAAC;AAC/D,QAAM,EAAE,UAAU,OAAO,SAAS,IAAI;AACtC,QAAM,uBAAmB;AAAA,IACvB,CAAC,YAAoB;AACnB,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,YAAY,GAAG;AACjB,cAAM,YAAY,GAAG,MAAM;AAAA,MAC7B,WAAW,YAAY,IAAI,MAAM,QAAQ;AACvC,cAAM,YAAY,GAAG,MAAM;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AACA,QAAM,2BAAuB;AAAA,IAC3B,CAAC,SAAiB,MAAc,MAAqB;AACnD,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,aAAa,GAAG;AAClB,YAAI,MAAM,YAAY,OAAO;AAC3B,YAAE,gBAAgB;AAClB,gBAAM,YAAY,MAAM,MAAM;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AAEA,SACE,4CAAC,qBAAqB,UAArB;AAAA,IAA8B,OAAO,EAAE,kBAAkB,qBAAqB;AAAA,IAC7E,sDAAC;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,IAAI;AAAA,MACJ,MAAM,aAAAA,QAAM,SAAS,IAAI,UAAU,MAAM,MAAM;AAAA,MAC/C,QAAO;AAAA,MACP,KAAK;AAAA,MAEJ;AAAA,KACH;AAAA,GACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport type { WeakValidationMap } from 'react';\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-utilities';\nimport type { DSPillGroupProps } from '../index.d';\nimport { DSPillGroupDefaultProps, DSPillGroupPropTypes } from '../props';\nimport { StyledPillGroup } from './styled';\nimport { DSPillGroupName } from '../DSPillDefinitions';\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, DSPillGroupName);\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 = DSPillGroupName;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes as WeakValidationMap<unknown>;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;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AAC,YAAY;AAAA,EACf;AAEA,SACE,4CAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,kBAAkB,qBAAqB,GAC7E;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,IAAI;AAAA,MACJ,MAAM,aAAAA,QAAM,SAAS,IAAI,UAAU,MAAM,MAAM;AAAA,MAC/C,QAAO;AAAA,MACP,KAAK;AAAA,MAEJ;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -41,56 +41,57 @@ const DropdownPill = import_react.default.memo(
41
41
  ({ label, size, labelTruncated, dropdownProps, innerRef, ariaLabel, onDropdownClick }) => {
42
42
  const chevronRef = (0, import_react.useRef)(null);
43
43
  const pillUid = (0, import_react.useMemo)(() => `ds-pill-${(0, import_uid.uid)()}`, []);
44
- const TextComponent = labelTruncated ? ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
45
- value: children
46
- }) : import_react.default.Fragment;
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledDropdownPillWrapper, {
48
- size,
49
- id: pillUid,
50
- className: "ds-pill-wrapper ds-pill-wrapper-dropdown",
51
- "data-testid": "ds-pill-wrapper",
52
- cols: ["auto", "24px"],
53
- gutter: "2px",
54
- alignItems: "center",
55
- justifyItems: "center",
56
- children: [
57
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {
58
- children: label
59
- }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dropdownmenu.DSDropdownMenuV2, {
61
- placementOrderPreference: [
62
- "bottom-start",
63
- "bottom",
64
- "bottom-end",
65
- "right-end",
66
- "top-start",
67
- "top",
68
- "top-end"
69
- ],
70
- ...dropdownProps,
71
- onClickOutside: (e) => {
72
- if (e.code === "Escape")
73
- chevronRef.current.focus();
74
- if (dropdownProps.onClickOutside)
75
- dropdownProps.onClickOutside(e);
76
- },
77
- wrapperStyles: { w: "100%", h: "100%" },
78
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PillButton.DSPillButton, {
79
- className: "ds-pill-focus-point",
80
- "data-testid": "ds-pill-dropdown-chevron",
81
- innerRef: (0, import_utils.setMultipleRefs)(chevronRef, innerRef),
82
- "aria-label": ariaLabel || label,
83
- type: "right",
84
- onClick: onDropdownClick,
85
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
86
- color: ["brand-primary", "800"],
87
- width: 20,
88
- height: 20
89
- })
90
- })
91
- })
92
- ]
93
- });
44
+ const TextComponent = labelTruncated ? ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: children }) : import_react.default.Fragment;
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
46
+ import_styled.StyledDropdownPillWrapper,
47
+ {
48
+ size,
49
+ id: pillUid,
50
+ className: "ds-pill-wrapper ds-pill-wrapper-dropdown",
51
+ "data-testid": "ds-pill-wrapper",
52
+ cols: ["auto", "24px"],
53
+ gutter: "2px",
54
+ alignItems: "center",
55
+ justifyItems: "center",
56
+ children: [
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, { children: label }),
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ import_ds_dropdownmenu.DSDropdownMenuV2,
60
+ {
61
+ placementOrderPreference: [
62
+ "bottom-start",
63
+ "bottom",
64
+ "bottom-end",
65
+ "right-end",
66
+ "top-start",
67
+ "top",
68
+ "top-end"
69
+ ],
70
+ ...dropdownProps,
71
+ onClickOutside: (e) => {
72
+ if (e.code === "Escape")
73
+ chevronRef.current.focus();
74
+ if (dropdownProps.onClickOutside)
75
+ dropdownProps.onClickOutside(e);
76
+ },
77
+ wrapperStyles: { w: "100%", h: "100%" },
78
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
79
+ import_PillButton.DSPillButton,
80
+ {
81
+ className: "ds-pill-focus-point",
82
+ "data-testid": "ds-pill-dropdown-chevron",
83
+ innerRef: (0, import_utils.setMultipleRefs)(chevronRef, innerRef),
84
+ "aria-label": ariaLabel || label,
85
+ type: "right",
86
+ onClick: onDropdownClick,
87
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, { color: ["brand-primary", "800"], width: 20, height: 20 })
88
+ }
89
+ )
90
+ }
91
+ )
92
+ ]
93
+ }
94
+ );
94
95
  }
95
96
  );
96
97
  //# sourceMappingURL=DropdownPill.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/types/DropdownPill.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useMemo, useRef, useCallback } from 'react';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBG;AAjB1B,mBAAoD;AACpD,6BAAiC;AACjC,iBAAoB;AACpB,sBAAiC;AACjC,uCAA2C;AAC3C,oBAA0C;AAE1C,mBAAgC;AAChC,wBAA6B;AAEtB,MAAM,eAAe,aAAAA,QAAM;AAAA,EAChC,CAAC,EAAE,OAAO,MAAM,gBAAgB,eAAe,UAAU,WAAW,gBAAgB,MAAM;AACxF,UAAM,iBAAa,qBAAO,IAAI;AAE9B,UAAM,cAAU,sBAAQ,MAAM,eAAW,gBAAI,KAAK,CAAC,CAAC;AAEpD,UAAM,gBAAgB,iBAClB,CAAC,EAAE,SAAS,MAAM,4CAAC;AAAA,MAA2B,OAAO;AAAA,KAAU,IAC/D,aAAAA,QAAM;AAEV,WACE,6CAAC;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,WAAU;AAAA,MACV,eAAY;AAAA,MACZ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CAAC,EAAE,SAAS,MAAM,4CAAC,+DAA2B,OAAO,UAAU,IAC/D,aAAAA,QAAM;AAEV,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,IAAI;AAAA,QACJ,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,MAAM,CAAC,QAAQ,MAAM;AAAA,QACrB,QAAO;AAAA,QACP,YAAW;AAAA,QACX,cAAa;AAAA,QAEb;AAAA,sDAAC,iBAAe,iBAAM;AAAA,UACtB;AAAA,YAAC;AAAA;AAAA,cACC,0BAA0B;AAAA,gBACxB;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cACF;AAAA,cACC,GAAG;AAAA,cACJ,gBAAgB,CAAC,MAAM;AACrB,oBAAI,EAAE,SAAS;AAAU,6BAAW,QAAQ,MAAM;AAClD,oBAAI,cAAc;AAAgB,gCAAc,eAAe,CAAC;AAAA,cAClE;AAAA,cACA,eAAe,EAAE,GAAG,QAAQ,GAAG,OAAO;AAAA,cAEtC;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,eAAY;AAAA,kBACZ,cAAU,8BAAgB,YAAY,QAAQ;AAAA,kBAC9C,cAAY,aAAa;AAAA,kBACzB,MAAK;AAAA,kBACL,SAAS;AAAA,kBAET,sDAAC,oCAAiB,OAAO,CAAC,iBAAiB,KAAK,GAAG,OAAO,IAAI,QAAQ,IAAI;AAAA;AAAA,cAC5E;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -62,42 +62,48 @@ const InputPill = import_react.default.memo(
62
62
  [onInputClear]
63
63
  );
64
64
  const [inputHasFocus, setInputHasFocus] = (0, import_react.useState)(false);
65
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledInputPillWrapper, {
66
- size,
67
- className: "ds-pill-wrapper",
68
- "data-testid": "ds-pill-wrapper",
69
- cols: label === "" ? ["auto"] : ["auto", "24px"],
70
- inputWidth,
71
- value: label,
72
- inputHasFocus,
73
- hasError,
74
- children: [
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputComponent, {
76
- id: pillUid,
77
- className: "ds-pill-focus-point",
78
- "data-testid": "ds-pill-input",
79
- innerRef: (0, import_utils.setMultipleRefs)(ref, innerRef),
80
- value: label,
81
- onChange: onInputChange,
82
- placeholder: inputPlaceholder,
83
- onFocus: () => setInputHasFocus(true),
84
- onBlur: () => setInputHasFocus(false),
85
- disableTooltip: false
86
- }),
87
- label !== "" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PillButton.DSPillButton, {
88
- id: pillUid,
89
- "data-testid": "ds-pill-clear-icon",
90
- innerRef,
91
- onClick: onCloseIconClick,
92
- "aria-label": "Clear input",
93
- type: "right",
94
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.CloseXsmall, {
95
- size: "s",
96
- color: ["brand-primary", "700"]
97
- })
98
- })
99
- ]
100
- });
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
+ import_styled.StyledInputPillWrapper,
67
+ {
68
+ size,
69
+ className: "ds-pill-wrapper",
70
+ "data-testid": "ds-pill-wrapper",
71
+ cols: label === "" ? ["auto"] : ["auto", "24px"],
72
+ inputWidth,
73
+ value: label,
74
+ inputHasFocus,
75
+ hasError,
76
+ children: [
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
+ InputComponent,
79
+ {
80
+ id: pillUid,
81
+ className: "ds-pill-focus-point",
82
+ "data-testid": "ds-pill-input",
83
+ innerRef: (0, import_utils.setMultipleRefs)(ref, innerRef),
84
+ value: label,
85
+ onChange: onInputChange,
86
+ placeholder: inputPlaceholder,
87
+ onFocus: () => setInputHasFocus(true),
88
+ onBlur: () => setInputHasFocus(false),
89
+ disableTooltip: false
90
+ }
91
+ ),
92
+ label !== "" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ import_PillButton.DSPillButton,
94
+ {
95
+ id: pillUid,
96
+ "data-testid": "ds-pill-clear-icon",
97
+ innerRef,
98
+ onClick: onCloseIconClick,
99
+ "aria-label": "Clear input",
100
+ type: "right",
101
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.CloseXsmall, { size: "s", color: ["brand-primary", "700"] })
102
+ }
103
+ )
104
+ ]
105
+ }
106
+ );
101
107
  }
102
108
  );
103
109
  //# sourceMappingURL=InputPill.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/types/InputPill.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { uid } from 'uid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledInputPillWrapper } from '../styled';\nimport { setMultipleRefs } from '../../utils';\nimport { DSPillButton } from '../PillButton';\n\nexport const InputPill = React.memo<DSPillProps>(\n ({\n label,\n size,\n inputPlaceholder,\n inputWidth,\n inputRender,\n onInputChange,\n onInputClear,\n innerRef,\n hasError,\n inputId,\n }) => {\n const ref = useRef<HTMLElement>(null);\n\n const InputComponent = useMemo(() => inputRender, [inputRender]);\n\n const pillUid = useMemo(() => inputId ?? `ds-pill-${uid()}`, []);\n\n const onCloseIconClick: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(\n (e) => {\n if ([undefined, 'Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n onInputClear(e);\n ref.current.focus();\n }\n },\n [onInputClear],\n );\n\n const [inputHasFocus, setInputHasFocus] = useState(false);\n\n return (\n <StyledInputPillWrapper\n size={size}\n className=\"ds-pill-wrapper\"\n data-testid=\"ds-pill-wrapper\"\n cols={label === '' ? ['auto'] : ['auto', '24px']}\n inputWidth={inputWidth}\n value={label}\n inputHasFocus={inputHasFocus}\n hasError={hasError}\n >\n <InputComponent\n id={pillUid}\n className=\"ds-pill-focus-point\"\n data-testid=\"ds-pill-input\"\n innerRef={setMultipleRefs(ref, innerRef)}\n value={label}\n onChange={onInputChange}\n placeholder={inputPlaceholder}\n onFocus={() => setInputHasFocus(true)}\n onBlur={() => setInputHasFocus(false)}\n disableTooltip={false}\n />\n {label !== '' && (\n <DSPillButton\n id={pillUid}\n data-testid=\"ds-pill-clear-icon\"\n innerRef={innerRef}\n onClick={onCloseIconClick}\n // onKeyDown={onCloseIconClick} // button v2 now triggers click on key down already\n aria-label=\"Clear input\"\n type=\"right\"\n >\n <CloseXsmall size=\"s\" color={['brand-primary', '700']} />\n </DSPillButton>\n )}\n </StyledInputPillWrapper>\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0CjB;AAzCN,mBAA8D;AAC9D,iBAAoB;AACpB,sBAA4B;AAE5B,oBAAuC;AACvC,mBAAgC;AAChC,wBAA6B;AAEtB,MAAM,YAAY,aAAAA,QAAM;AAAA,EAC7B,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAM;AACJ,UAAM,UAAM,qBAAoB,IAAI;AAEpC,UAAM,qBAAiB,sBAAQ,MAAM,aAAa,CAAC,WAAW,CAAC;AAE/D,UAAM,cAAU,sBAAQ,MAAM,WAAW,eAAW,gBAAI,KAAK,CAAC,CAAC;AAE/D,UAAM,uBAAyE;AAAA,MAC7E,CAAC,MAAM;AACL,YAAI,CAAC,QAAW,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG;AAClD,YAAE,eAAe;AACjB,uBAAa,CAAC;AACd,cAAI,QAAQ,MAAM;AAAA,QACpB;AAAA,MACF;AAAA,MACA,CAAC,YAAY;AAAA,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C;AAE/D,UAAM,cAAU,sBAAQ,MAAM,WAAW,eAAW,gBAAI,KAAK,CAAC,CAAC;AAE/D,UAAM,uBAAyE;AAAA,MAC7E,CAAC,MAAM;AACL,YAAI,CAAC,QAAW,SAAS,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG;AAClD,YAAE,eAAe;AACjB,uBAAa,CAAC;AACd,cAAI,QAAQ,MAAM;AAAA,QACpB;AAAA,MACF;AAAA,MACA,CAAC,YAAY;AAAA,IACf;AAEA,UAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAS,KAAK;AAExD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,MAAM,UAAU,KAAK,CAAC,MAAM,IAAI,CAAC,QAAQ,MAAM;AAAA,QAC/C;AAAA,QACA,OAAO;AAAA,QACP;AAAA,QACA;AAAA,QAEA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,WAAU;AAAA,cACV,eAAY;AAAA,cACZ,cAAU,8BAAgB,KAAK,QAAQ;AAAA,cACvC,OAAO;AAAA,cACP,UAAU;AAAA,cACV,aAAa;AAAA,cACb,SAAS,MAAM,iBAAiB,IAAI;AAAA,cACpC,QAAQ,MAAM,iBAAiB,KAAK;AAAA,cACpC,gBAAgB;AAAA;AAAA,UAClB;AAAA,UACC,UAAU,MACT;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,eAAY;AAAA,cACZ;AAAA,cACA,SAAS;AAAA,cAET,cAAW;AAAA,cACX,MAAK;AAAA,cAEL,sDAAC,+BAAY,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,UACzD;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -33,24 +33,23 @@ var import_react = __toESM(require("react"));
33
33
  var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
34
34
  var import_styled = require("../styled");
35
35
  const LabelPill = import_react.default.memo(({ label, size, labelTruncated, iconLeft, ariaLabel }) => {
36
- const TextComponent = labelTruncated ? ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
37
- value: children
38
- }) : import_react.default.Fragment;
39
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledLabelPillWrapper, {
40
- size,
41
- alignItems: "center",
42
- className: "ds-pill-wrapper ds-pill-wrapper-label",
43
- "data-testid": "ds-pill-wrapper",
44
- "aria-label": ariaLabel || label,
45
- cols: [iconLeft && "min-content", "auto"].filter((notFalse) => notFalse),
46
- gutter: "xxxs",
47
- hasIcon: iconLeft !== null,
48
- children: [
49
- iconLeft,
50
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {
51
- children: label
52
- })
53
- ]
54
- });
36
+ const TextComponent = labelTruncated ? ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: children }) : import_react.default.Fragment;
37
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
38
+ import_styled.StyledLabelPillWrapper,
39
+ {
40
+ size,
41
+ alignItems: "center",
42
+ className: "ds-pill-wrapper ds-pill-wrapper-label",
43
+ "data-testid": "ds-pill-wrapper",
44
+ "aria-label": ariaLabel || label,
45
+ cols: [iconLeft && "min-content", "auto"].filter((notFalse) => notFalse),
46
+ gutter: "xxxs",
47
+ hasIcon: iconLeft !== null,
48
+ children: [
49
+ iconLeft,
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, { children: label })
51
+ ]
52
+ }
53
+ );
55
54
  });
56
55
  //# sourceMappingURL=LabelPill.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/types/LabelPill.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledLabelPillWrapper } from '../styled';\n\nexport const LabelPill = React.memo<DSPillProps>(({ label, size, labelTruncated, iconLeft, ariaLabel }) => {\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n return (\n <StyledLabelPillWrapper\n size={size}\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-label\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n >\n {iconLeft}\n <TextComponent>{label}</TextComponent>\n </StyledLabelPillWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQC;AAPxB,mBAAkB;AAClB,uCAA2C;AAE3C,oBAAuC;AAEhC,MAAM,YAAY,aAAAA,QAAM,KAAkB,CAAC,EAAE,OAAO,MAAM,gBAAgB,UAAU,UAAU,MAAM;AACzG,QAAM,gBAAgB,iBAClB,CAAC,EAAE,SAAS,MAAM,4CAAC;AAAA,IAA2B,OAAO;AAAA,GAAU,IAC/D,aAAAA,QAAM;AACV,SACE,6CAAC;AAAA,IACC;AAAA,IACA,YAAW;AAAA,IACX,WAAU;AAAA,IACV,eAAY;AAAA,IACZ,cAAY,aAAa;AAAA,IACzB,MAAM,CAAC,YAAY,eAAe,MAAM,EAAE,OAAO,CAAC,aAAa,QAAQ;AAAA,IACvE,QAAO;AAAA,IACP,SAAS,aAAa;AAAA,IAErB;AAAA;AAAA,MACD,4CAAC;AAAA,QAAe;AAAA,OAAM;AAAA;AAAA,GACxB;AAEJ,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQC;AAPxB,mBAAkB;AAClB,uCAA2C;AAE3C,oBAAuC;AAEhC,MAAM,YAAY,aAAAA,QAAM,KAAkB,CAAC,EAAE,OAAO,MAAM,gBAAgB,UAAU,UAAU,MAAM;AACzG,QAAM,gBAAgB,iBAClB,CAAC,EAAE,SAAS,MAAM,4CAAC,+DAA2B,OAAO,UAAU,IAC/D,aAAAA,QAAM;AACV,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,cAAY,aAAa;AAAA,MACzB,MAAM,CAAC,YAAY,eAAe,MAAM,EAAE,OAAO,CAAC,aAAa,QAAQ;AAAA,MACvE,QAAO;AAAA,MACP,SAAS,aAAa;AAAA,MAErB;AAAA;AAAA,QACD,4CAAC,iBAAe,iBAAM;AAAA;AAAA;AAAA,EACxB;AAEJ,CAAC;",
6
6
  "names": ["React"]
7
7
  }
@@ -36,27 +36,26 @@ const ReadOnlyPill = import_react.default.memo(
36
36
  ({ label, size, labelTruncated, iconLeft, iconRight, ariaLabel }) => {
37
37
  const hasIconLeft = iconLeft !== null || iconRight !== null && label === "";
38
38
  const hasIconRight = iconRight !== null || iconLeft !== null && label === "";
39
- const TextComponent = labelTruncated ? ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
40
- value: children
41
- }) : import_react.default.Fragment;
42
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledReadonlyPillWrapper, {
43
- size,
44
- alignItems: "center",
45
- className: "ds-pill-wrapper ds-pill-wrapper-readonly",
46
- "data-testid": "ds-pill-wrapper",
47
- "aria-label": ariaLabel || label,
48
- cols: [iconLeft && "min-content", label && "auto", iconRight && "min-content"].filter((notFalse) => notFalse),
49
- gutter: "xxxs",
50
- hasIconRight,
51
- hasIconLeft,
52
- children: [
53
- iconLeft,
54
- label ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, {
55
- children: label
56
- }) : null,
57
- iconRight
58
- ]
59
- });
39
+ const TextComponent = labelTruncated ? ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: children }) : import_react.default.Fragment;
40
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
41
+ import_styled.StyledReadonlyPillWrapper,
42
+ {
43
+ size,
44
+ alignItems: "center",
45
+ className: "ds-pill-wrapper ds-pill-wrapper-readonly",
46
+ "data-testid": "ds-pill-wrapper",
47
+ "aria-label": ariaLabel || label,
48
+ cols: [iconLeft && "min-content", label && "auto", iconRight && "min-content"].filter((notFalse) => notFalse),
49
+ gutter: "xxxs",
50
+ hasIconRight,
51
+ hasIconLeft,
52
+ children: [
53
+ iconLeft,
54
+ label ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextComponent, { children: label }) : null,
55
+ iconRight
56
+ ]
57
+ }
58
+ );
60
59
  }
61
60
  );
62
61
  //# sourceMappingURL=ReadOnlyPill.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/types/ReadOnlyPill.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledReadonlyPillWrapper } from '../styled';\n\nexport const ReadOnlyPill = React.memo<DSPillProps>(\n ({ label, size, labelTruncated, iconLeft, iconRight, ariaLabel }) => {\n const hasIconLeft = iconLeft !== null || (iconRight !== null && label === '');\n const hasIconRight = iconRight !== null || (iconLeft !== null && label === '');\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledReadonlyPillWrapper\n size={size}\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-readonly\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', label && 'auto', iconRight && 'min-content'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIconRight={hasIconRight}\n hasIconLeft={hasIconLeft}\n >\n {iconLeft}\n {label ? <TextComponent>{label}</TextComponent> : null}\n {iconRight}\n </StyledReadonlyPillWrapper>\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADaG;AAX1B,mBAAkB;AAClB,uCAA2C;AAE3C,oBAA0C;AAEnC,MAAM,eAAe,aAAAA,QAAM;AAAA,EAChC,CAAC,EAAE,OAAO,MAAM,gBAAgB,UAAU,WAAW,UAAU,MAAM;AACnE,UAAM,cAAc,aAAa,QAAS,cAAc,QAAQ,UAAU;AAC1E,UAAM,eAAe,cAAc,QAAS,aAAa,QAAQ,UAAU;AAE3E,UAAM,gBAAgB,iBAClB,CAAC,EAAE,SAAS,MAAM,4CAAC;AAAA,MAA2B,OAAO;AAAA,KAAU,IAC/D,aAAAA,QAAM;AAEV,WACE,6CAAC;AAAA,MACC;AAAA,MACA,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,cAAY,aAAa;AAAA,MACzB,MAAM,CAAC,YAAY,eAAe,SAAS,QAAQ,aAAa,aAAa,EAAE,OAAO,CAAC,aAAa,QAAQ;AAAA,MAC5G,QAAO;AAAA,MACP;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA,QAAQ,4CAAC;AAAA,UAAe;AAAA,SAAM,IAAmB;AAAA,QACjD;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;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