@elliemae/ds-legacy-pills 1.0.0-rc.1

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 (78) hide show
  1. package/dist/cjs/deprecated/DropdownPill.js +103 -0
  2. package/dist/cjs/deprecated/DropdownPill.js.map +7 -0
  3. package/dist/cjs/deprecated/InputPill.js +87 -0
  4. package/dist/cjs/deprecated/InputPill.js.map +7 -0
  5. package/dist/cjs/deprecated/LabeledDropdownPills.js +112 -0
  6. package/dist/cjs/deprecated/LabeledDropdownPills.js.map +7 -0
  7. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +134 -0
  8. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
  9. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +154 -0
  10. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
  11. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +169 -0
  12. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
  13. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js +45 -0
  14. package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
  15. package/dist/cjs/deprecated/LabeledPills.js +86 -0
  16. package/dist/cjs/deprecated/LabeledPills.js.map +7 -0
  17. package/dist/cjs/deprecated/OverflowPill.js +93 -0
  18. package/dist/cjs/deprecated/OverflowPill.js.map +7 -0
  19. package/dist/cjs/deprecated/Pill.js +83 -0
  20. package/dist/cjs/deprecated/Pill.js.map +7 -0
  21. package/dist/cjs/deprecated/PillGroup.js +74 -0
  22. package/dist/cjs/deprecated/PillGroup.js.map +7 -0
  23. package/dist/cjs/deprecated/ReadOnlyPill.js +124 -0
  24. package/dist/cjs/deprecated/ReadOnlyPill.js.map +7 -0
  25. package/dist/cjs/deprecated/RemovablePill.js +86 -0
  26. package/dist/cjs/deprecated/RemovablePill.js.map +7 -0
  27. package/dist/cjs/deprecated/index.js +45 -0
  28. package/dist/cjs/deprecated/index.js.map +7 -0
  29. package/dist/cjs/index.js +39 -0
  30. package/dist/cjs/index.js.map +7 -0
  31. package/dist/cjs/package.json +7 -0
  32. package/dist/esm/deprecated/DropdownPill.js +73 -0
  33. package/dist/esm/deprecated/DropdownPill.js.map +7 -0
  34. package/dist/esm/deprecated/InputPill.js +57 -0
  35. package/dist/esm/deprecated/InputPill.js.map +7 -0
  36. package/dist/esm/deprecated/LabeledDropdownPills.js +82 -0
  37. package/dist/esm/deprecated/LabeledDropdownPills.js.map +7 -0
  38. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +104 -0
  39. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
  40. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +124 -0
  41. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
  42. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +139 -0
  43. package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
  44. package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js +15 -0
  45. package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
  46. package/dist/esm/deprecated/LabeledPills.js +56 -0
  47. package/dist/esm/deprecated/LabeledPills.js.map +7 -0
  48. package/dist/esm/deprecated/OverflowPill.js +63 -0
  49. package/dist/esm/deprecated/OverflowPill.js.map +7 -0
  50. package/dist/esm/deprecated/Pill.js +53 -0
  51. package/dist/esm/deprecated/Pill.js.map +7 -0
  52. package/dist/esm/deprecated/PillGroup.js +44 -0
  53. package/dist/esm/deprecated/PillGroup.js.map +7 -0
  54. package/dist/esm/deprecated/ReadOnlyPill.js +94 -0
  55. package/dist/esm/deprecated/ReadOnlyPill.js.map +7 -0
  56. package/dist/esm/deprecated/RemovablePill.js +56 -0
  57. package/dist/esm/deprecated/RemovablePill.js.map +7 -0
  58. package/dist/esm/deprecated/index.js +14 -0
  59. package/dist/esm/deprecated/index.js.map +7 -0
  60. package/dist/esm/index.js +8 -0
  61. package/dist/esm/index.js.map +7 -0
  62. package/dist/esm/package.json +7 -0
  63. package/dist/types/deprecated/DropdownPill.d.ts +40 -0
  64. package/dist/types/deprecated/InputPill.d.ts +9 -0
  65. package/dist/types/deprecated/LabeledDropdownPills.d.ts +52 -0
  66. package/dist/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.d.ts +16 -0
  67. package/dist/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.d.ts +13 -0
  68. package/dist/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.d.ts +28 -0
  69. package/dist/types/deprecated/LabeledDropdownPillsTypes/utils.d.ts +1 -0
  70. package/dist/types/deprecated/LabeledPills.d.ts +38 -0
  71. package/dist/types/deprecated/OverflowPill.d.ts +26 -0
  72. package/dist/types/deprecated/Pill.d.ts +37 -0
  73. package/dist/types/deprecated/PillGroup.d.ts +32 -0
  74. package/dist/types/deprecated/ReadOnlyPill.d.ts +33 -0
  75. package/dist/types/deprecated/RemovablePill.d.ts +34 -0
  76. package/dist/types/deprecated/index.d.ts +9 -0
  77. package/dist/types/index.d.ts +3 -0
  78. package/package.json +195 -0
@@ -0,0 +1,74 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var PillGroup_exports = {};
30
+ __export(PillGroup_exports, {
31
+ Container: () => Container,
32
+ DSPillGroupWithSchema: () => DSPillGroupWithSchema,
33
+ PillGroup: () => PillGroup
34
+ });
35
+ module.exports = __toCommonJS(PillGroup_exports);
36
+ var React = __toESM(require("react"));
37
+ var import_jsx_runtime = require("react/jsx-runtime");
38
+ var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
39
+ var import_ds_legacy_classnames = require("@elliemae/ds-legacy-classnames");
40
+ var import_ds_legacy_shared = require("@elliemae/ds-legacy-shared");
41
+ const pillGroupBlockName = "pill-group";
42
+ const Container = (0, import_ds_legacy_classnames.aggregatedClasses)("div")(pillGroupBlockName);
43
+ const PillGroup = ({ containerProps = {}, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ import_ds_legacy_shared.FocusGroupProvider,
45
+ {
46
+ keyBindings: {
47
+ Tab: "next"
48
+ },
49
+ onFocusGroupSet,
50
+ onFocusNextGroup,
51
+ onFocusPreviousGroup,
52
+ orientation: "horizontal",
53
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Container, { ...containerProps, children })
54
+ }
55
+ );
56
+ const props = {
57
+ /** props injected to component wrapper */
58
+ containerProps: import_ds_legacy_props_helpers.PropTypes.object.description("props injected to component wrapper"),
59
+ /** focus next group callback */
60
+ onFocusNextGroup: import_ds_legacy_props_helpers.PropTypes.func.description("focus next group callback"),
61
+ /** focus prev group callback */
62
+ onFocusPreviousGroup: import_ds_legacy_props_helpers.PropTypes.func.description("focus prev group callback"),
63
+ /** focus group set callback */
64
+ onFocusGroupSet: import_ds_legacy_props_helpers.PropTypes.func.description("focus group set callback"),
65
+ /** pill components */
66
+ children: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.arrayOf(import_ds_legacy_props_helpers.PropTypes.node), import_ds_legacy_props_helpers.PropTypes.node]).isRequired.description(
67
+ "pill components"
68
+ )
69
+ };
70
+ PillGroup.propTypes = props;
71
+ PillGroup.displayName = "PillGroup";
72
+ const DSPillGroupWithSchema = (0, import_ds_legacy_props_helpers.describe)(PillGroup);
73
+ DSPillGroupWithSchema.propTypes = props;
74
+ //# sourceMappingURL=PillGroup.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/deprecated/PillGroup.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-legacy-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-legacy-classnames';\nimport { FocusGroupProvider } from '@elliemae/ds-legacy-shared';\n\nconst pillGroupBlockName = 'pill-group';\n\nexport const Container = aggregatedClasses('div')(pillGroupBlockName);\n\nconst PillGroup = ({ containerProps = {}, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, children }) => (\n <FocusGroupProvider\n keyBindings={{\n Tab: 'next',\n }}\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n orientation=\"horizontal\"\n >\n <Container {...containerProps}>{children}</Container>\n </FocusGroupProvider>\n);\n\nconst props = {\n /** props injected to component wrapper */\n containerProps: PropTypes.object.description('props injected to component wrapper'),\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 components */\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired.description(\n 'pill components',\n ),\n};\n\nPillGroup.propTypes = props;\nPillGroup.displayName = 'PillGroup';\nconst DSPillGroupWithSchema = describe(PillGroup);\nDSPillGroupWithSchema.propTypes = props;\n\nexport { PillGroup, DSPillGroupWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBnB;AAlBJ,qCAAoC;AACpC,kCAAkC;AAClC,8BAAmC;AAEnC,MAAM,qBAAqB;AAEpB,MAAM,gBAAY,+CAAkB,KAAK,EAAE,kBAAkB;AAEpE,MAAM,YAAY,CAAC,EAAE,iBAAiB,CAAC,GAAG,kBAAkB,sBAAsB,iBAAiB,SAAS,MAC1G;AAAA,EAAC;AAAA;AAAA,IACC,aAAa;AAAA,MACX,KAAK;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAY;AAAA,IAEZ,sDAAC,aAAW,GAAG,gBAAiB,UAAS;AAAA;AAC3C;AAGF,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,yCAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,kBAAkB,yCAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAExE,sBAAsB,yCAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAE5E,iBAAiB,yCAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAEtE,UAAU,yCAAU,UAAU,CAAC,yCAAU,QAAQ,yCAAU,IAAI,GAAG,yCAAU,IAAI,CAAC,EAAE,WAAW;AAAA,IAC5F;AAAA,EACF;AACF;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,4BAAwB,yCAAS,SAAS;AAChD,sBAAsB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,124 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var ReadOnlyPill_exports = {};
30
+ __export(ReadOnlyPill_exports, {
31
+ DSReadOnlyPillWithSchema: () => DSReadOnlyPillWithSchema,
32
+ ReadOnlyPill: () => ReadOnlyPill
33
+ });
34
+ module.exports = __toCommonJS(ReadOnlyPill_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_react = require("react");
38
+ var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
39
+ var import_ds_legacy_icons = require("@elliemae/ds-legacy-icons");
40
+ var import_ds_legacy_modal = require("@elliemae/ds-legacy-modal");
41
+ var import_ds_legacy_popover = require("@elliemae/ds-legacy-popover");
42
+ var import_Pill = require("./Pill.js");
43
+ const ReadOnlyPill = ({
44
+ containerProps = {},
45
+ modalContent = "",
46
+ label = "",
47
+ leftAddon,
48
+ modalTitle = "",
49
+ tooltipText = ""
50
+ }) => {
51
+ const ref = (0, import_react.useRef)(null);
52
+ const [isModalOpen, setIsModalOpen] = (0, import_react.useState)(false);
53
+ const [isTooltipOpen, setIsTooltipOpen] = (0, import_react.useState)(false);
54
+ const toggle = () => {
55
+ setIsModalOpen(!isModalOpen);
56
+ };
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ import_Pill.Pill,
60
+ {
61
+ "data-testid": "read-only-pill",
62
+ className: "removable-pill",
63
+ containerProps,
64
+ innerRef: ref,
65
+ label,
66
+ leftAddon,
67
+ rightAddon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ import_ds_legacy_popover.DSPopover,
69
+ {
70
+ isOpen: tooltipText && isTooltipOpen,
71
+ content: tooltipText,
72
+ placement: "top",
73
+ showArrow: true,
74
+ renderTrigger: ({ ref: ref2 }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ import_ds_legacy_icons.InfoCircleSmall,
76
+ {
77
+ role: "button",
78
+ "data-testid": "read-only-info-btn",
79
+ className: "remove-pill-button",
80
+ onClick: toggle,
81
+ onMouseEnter: () => setIsTooltipOpen(true),
82
+ onMouseLeave: () => setIsTooltipOpen(false),
83
+ color: ["brand-primary", "600"],
84
+ innerRef: ref2
85
+ }
86
+ )
87
+ }
88
+ ),
89
+ tabIndex: -1
90
+ }
91
+ ),
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ import_ds_legacy_modal.DSModal,
94
+ {
95
+ isOpen: isModalOpen,
96
+ showClose: true,
97
+ shouldCloseOnOverlayClick: true,
98
+ modalTitle,
99
+ modalType: import_ds_legacy_modal.MODAL_TYPE_V2.INFORMATION,
100
+ onClose: toggle,
101
+ version: 2,
102
+ children: modalContent
103
+ }
104
+ )
105
+ ] });
106
+ };
107
+ const props = {
108
+ /** props injected to component wrapper */
109
+ containerProps: import_ds_legacy_props_helpers.PropTypes.object.description("props injected to component wrapper"),
110
+ /** labeled pill text label */
111
+ label: import_ds_legacy_props_helpers.PropTypes.string.isRequired.description("pill text label"),
112
+ /** addon component to left */
113
+ leftAddon: import_ds_legacy_props_helpers.PropTypes.node.description("addon component to left"),
114
+ /** read only pill modal content */
115
+ modalContent: import_ds_legacy_props_helpers.PropTypes.string.description("read only pill modal content"),
116
+ /** read only pill modal title */
117
+ modalTitle: import_ds_legacy_props_helpers.PropTypes.string.description("read only pill modal title"),
118
+ tooltipText: import_ds_legacy_props_helpers.PropTypes.string.description("text to display in tooltip")
119
+ };
120
+ ReadOnlyPill.propTypes = props;
121
+ ReadOnlyPill.displayName = "ReadOnlyPill";
122
+ const DSReadOnlyPillWithSchema = (0, import_ds_legacy_props_helpers.describe)(ReadOnlyPill);
123
+ DSReadOnlyPillWithSchema.propTypes = props;
124
+ //# sourceMappingURL=ReadOnlyPill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/deprecated/ReadOnlyPill.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { InfoCircleSmall } from '@elliemae/ds-legacy-icons';\nimport { DSModal, MODAL_TYPE_V2 } from '@elliemae/ds-legacy-modal';\nimport { DSPopover } from '@elliemae/ds-legacy-popover';\nimport { Pill } from './Pill.js';\n\nconst ReadOnlyPill = ({\n containerProps = {},\n modalContent = '',\n label = '',\n leftAddon,\n modalTitle = '',\n tooltipText = '',\n}) => {\n const ref = useRef(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n\n const toggle = () => {\n setIsModalOpen(!isModalOpen);\n };\n\n return (\n <>\n <Pill\n data-testid=\"read-only-pill\"\n className=\"removable-pill\"\n containerProps={containerProps}\n innerRef={ref}\n label={label}\n leftAddon={leftAddon}\n rightAddon={\n <DSPopover\n isOpen={tooltipText && isTooltipOpen}\n content={tooltipText}\n placement=\"top\"\n showArrow\n renderTrigger={({ ref }) => (\n <InfoCircleSmall\n role=\"button\"\n data-testid=\"read-only-info-btn\"\n className=\"remove-pill-button\"\n onClick={toggle}\n onMouseEnter={() => setIsTooltipOpen(true)}\n onMouseLeave={() => setIsTooltipOpen(false)}\n color={['brand-primary', '600']}\n innerRef={ref}\n />\n )}\n />\n }\n tabIndex={-1}\n />\n <DSModal\n isOpen={isModalOpen}\n showClose\n shouldCloseOnOverlayClick\n modalTitle={modalTitle}\n modalType={MODAL_TYPE_V2.INFORMATION}\n onClose={toggle}\n version={2}\n >\n {modalContent}\n </DSModal>\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 /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** read only pill modal content */\n modalContent: PropTypes.string.description('read only pill modal content'),\n /** read only pill modal title */\n modalTitle: PropTypes.string.description('read only pill modal title'),\n tooltipText: PropTypes.string.description('text to display in tooltip'),\n};\n\nReadOnlyPill.propTypes = props;\nReadOnlyPill.displayName = 'ReadOnlyPill';\nconst DSReadOnlyPillWithSchema = describe(ReadOnlyPill);\nDSReadOnlyPillWithSchema.propTypes = props;\n\nexport { ReadOnlyPill, DSReadOnlyPillWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BnB;AAxBJ,mBAAwC;AACxC,qCAAoC;AACpC,6BAAgC;AAChC,6BAAuC;AACvC,+BAA0B;AAC1B,kBAAqB;AAErB,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,eAAe;AAAA,EACf,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb,cAAc;AAChB,MAAM;AACJ,QAAM,UAAM,qBAAO,IAAI;AACvB,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AACpD,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAS,KAAK;AAExD,QAAM,SAAS,MAAM;AACnB,mBAAe,CAAC,WAAW;AAAA,EAC7B;AAEA,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACZ,WAAU;AAAA,QACV;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,YACE;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ,eAAe;AAAA,YACvB,SAAS;AAAA,YACT,WAAU;AAAA,YACV,WAAS;AAAA,YACT,eAAe,CAAC,EAAE,KAAAA,KAAI,MACpB;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAc,MAAM,iBAAiB,IAAI;AAAA,gBACzC,cAAc,MAAM,iBAAiB,KAAK;AAAA,gBAC1C,OAAO,CAAC,iBAAiB,KAAK;AAAA,gBAC9B,UAAUA;AAAA;AAAA,YACZ;AAAA;AAAA,QAEJ;AAAA,QAEF,UAAU;AAAA;AAAA,IACZ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,WAAS;AAAA,QACT,2BAAyB;AAAA,QACzB;AAAA,QACA,WAAW,qCAAc;AAAA,QACzB,SAAS;AAAA,QACT,SAAS;AAAA,QAER;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,yCAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,yCAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,WAAW,yCAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,cAAc,yCAAU,OAAO,YAAY,8BAA8B;AAAA;AAAA,EAEzE,YAAY,yCAAU,OAAO,YAAY,4BAA4B;AAAA,EACrE,aAAa,yCAAU,OAAO,YAAY,4BAA4B;AACxE;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,+BAA2B,yCAAS,YAAY;AACtD,yBAAyB,YAAY;",
6
+ "names": ["ref"]
7
+ }
@@ -0,0 +1,86 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var RemovablePill_exports = {};
30
+ __export(RemovablePill_exports, {
31
+ DSRemovablePillWithSchema: () => DSRemovablePillWithSchema,
32
+ RemovablePill: () => RemovablePill
33
+ });
34
+ module.exports = __toCommonJS(RemovablePill_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_react = require("react");
38
+ var import_ds_legacy_utilities = require("@elliemae/ds-legacy-utilities");
39
+ var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
40
+ var import_ds_legacy_icons = require("@elliemae/ds-legacy-icons");
41
+ var import_ds_legacy_shared = require("@elliemae/ds-legacy-shared");
42
+ var import_Pill = require("./Pill.js");
43
+ const RemovablePill = ({ containerProps = {}, label = "", onRemove, size = "m", leftAddon, className = "" }) => {
44
+ const ref = (0, import_react.useRef)(null);
45
+ const { focusPrevious } = (0, import_ds_legacy_shared.useFocusGroupItem)(ref);
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
+ import_Pill.Pill,
48
+ {
49
+ className: `${"removable-pill"} ${className}`,
50
+ "data-testid": "removable-pill",
51
+ containerProps,
52
+ innerRef: ref,
53
+ size,
54
+ label,
55
+ leftAddon,
56
+ onKeyDown: (e) => {
57
+ if (e.key === "Backspace" && (0, import_ds_legacy_utilities.isFunction)(onRemove)) {
58
+ onRemove();
59
+ if ((0, import_ds_legacy_utilities.isFunction)(focusPrevious))
60
+ focusPrevious();
61
+ }
62
+ },
63
+ rightAddon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_icons.CloseXsmall, { role: "button", "data-testid": "remove-pill-button", className: "remove-pill-button", onClick: onRemove }),
64
+ tabIndex: -1
65
+ }
66
+ );
67
+ };
68
+ const props = {
69
+ /** props injected to component wrapper */
70
+ containerProps: import_ds_legacy_props_helpers.PropTypes.object.description("props injected to component wrapper"),
71
+ /** labeled pill text label */
72
+ label: import_ds_legacy_props_helpers.PropTypes.string.isRequired.description("pill text label"),
73
+ /** remove click callback */
74
+ onRemove: import_ds_legacy_props_helpers.PropTypes.func.description("remove click callback"),
75
+ /** pill size */
76
+ size: import_ds_legacy_props_helpers.PropTypes.oneOf(["m", "l"]).description("pill size"),
77
+ /** addon component to left */
78
+ leftAddon: import_ds_legacy_props_helpers.PropTypes.node.description("addon component to left"),
79
+ /** additional className */
80
+ className: import_ds_legacy_props_helpers.PropTypes.string.description("Additional className")
81
+ };
82
+ RemovablePill.propTypes = props;
83
+ RemovablePill.displayName = "RemovablePill";
84
+ const DSRemovablePillWithSchema = (0, import_ds_legacy_props_helpers.describe)(RemovablePill);
85
+ DSRemovablePillWithSchema.propTypes = props;
86
+ //# sourceMappingURL=RemovablePill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/deprecated/RemovablePill.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef } from 'react';\nimport { isFunction } from '@elliemae/ds-legacy-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { CloseXsmall } from '@elliemae/ds-legacy-icons';\nimport { useFocusGroupItem } from '@elliemae/ds-legacy-shared';\nimport { Pill } from './Pill.js';\n\nconst RemovablePill = ({ containerProps = {}, label = '', onRemove, size = 'm', leftAddon, className = '' }) => {\n const ref = useRef(null);\n const { focusPrevious } = useFocusGroupItem(ref);\n return (\n <Pill\n className={`${'removable-pill'} ${className}`}\n data-testid=\"removable-pill\"\n containerProps={containerProps}\n innerRef={ref}\n size={size}\n label={label}\n leftAddon={leftAddon}\n onKeyDown={(e) => {\n if (e.key === 'Backspace' && isFunction(onRemove)) {\n onRemove();\n if (isFunction(focusPrevious)) focusPrevious();\n }\n }}\n rightAddon={\n <CloseXsmall role=\"button\" data-testid=\"remove-pill-button\" className=\"remove-pill-button\" onClick={onRemove} />\n }\n tabIndex={-1}\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 /** remove click callback */\n onRemove: PropTypes.func.description('remove click callback'),\n /** pill size */\n size: PropTypes.oneOf(['m', 'l']).description('pill size'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** additional className */\n className: PropTypes.string.description('Additional className'),\n};\n\nRemovablePill.propTypes = props;\nRemovablePill.displayName = 'RemovablePill';\nconst DSRemovablePillWithSchema = describe(RemovablePill);\nDSRemovablePillWithSchema.propTypes = props;\n\nexport { RemovablePill, DSRemovablePillWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8Bf;AA1BR,mBAA8B;AAC9B,iCAA2B;AAC3B,qCAAoC;AACpC,6BAA4B;AAC5B,8BAAkC;AAClC,kBAAqB;AAErB,MAAM,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,OAAO,KAAK,WAAW,YAAY,GAAG,MAAM;AAC9G,QAAM,UAAM,qBAAO,IAAI;AACvB,QAAM,EAAE,cAAc,QAAI,2CAAkB,GAAG;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,oBAAoB;AAAA,MAClC,eAAY;AAAA,MACZ;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,CAAC,MAAM;AAChB,YAAI,EAAE,QAAQ,mBAAe,uCAAW,QAAQ,GAAG;AACjD,mBAAS;AACT,kBAAI,uCAAW,aAAa;AAAG,0BAAc;AAAA,QAC/C;AAAA,MACF;AAAA,MACA,YACE,4CAAC,sCAAY,MAAK,UAAS,eAAY,sBAAqB,WAAU,sBAAqB,SAAS,UAAU;AAAA,MAEhH,UAAU;AAAA;AAAA,EACZ;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,yCAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,yCAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,UAAU,yCAAU,KAAK,YAAY,uBAAuB;AAAA;AAAA,EAE5D,MAAM,yCAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,WAAW;AAAA;AAAA,EAEzD,WAAW,yCAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,WAAW,yCAAU,OAAO,YAAY,sBAAsB;AAChE;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,gCAA4B,yCAAS,aAAa;AACxD,0BAA0B,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,45 @@
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var deprecated_exports = {};
31
+ __export(deprecated_exports, {
32
+ default: () => import_Pill.default
33
+ });
34
+ module.exports = __toCommonJS(deprecated_exports);
35
+ var React = __toESM(require("react"));
36
+ __reExport(deprecated_exports, require("./Pill.js"), module.exports);
37
+ __reExport(deprecated_exports, require("./PillGroup.js"), module.exports);
38
+ __reExport(deprecated_exports, require("./LabeledDropdownPills.js"), module.exports);
39
+ __reExport(deprecated_exports, require("./LabeledPills.js"), module.exports);
40
+ __reExport(deprecated_exports, require("./DropdownPill.js"), module.exports);
41
+ __reExport(deprecated_exports, require("./RemovablePill.js"), module.exports);
42
+ __reExport(deprecated_exports, require("./ReadOnlyPill.js"), module.exports);
43
+ __reExport(deprecated_exports, require("./OverflowPill.js"), module.exports);
44
+ var import_Pill = __toESM(require("./Pill.js"));
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/deprecated/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './Pill.js';\nexport * from './PillGroup.js';\nexport * from './LabeledDropdownPills.js';\nexport * from './LabeledPills.js';\nexport * from './DropdownPill.js';\nexport * from './RemovablePill.js';\nexport * from './ReadOnlyPill.js';\nexport * from './OverflowPill.js';\n\nexport { default } from './Pill.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,sBAAd;AACA,+BAAc,2BADd;AAEA,+BAAc,sCAFd;AAGA,+BAAc,8BAHd;AAIA,+BAAc,8BAJd;AAKA,+BAAc,+BALd;AAMA,+BAAc,8BANd;AAOA,+BAAc,8BAPd;AASA,kBAAwB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,39 @@
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var src_exports = {};
31
+ __export(src_exports, {
32
+ default: () => import_deprecated.default
33
+ });
34
+ module.exports = __toCommonJS(src_exports);
35
+ var React = __toESM(require("react"));
36
+ __reExport(src_exports, require("./deprecated/index.js"), module.exports);
37
+ var import_deprecated = __toESM(require("./deprecated/index.js"));
38
+ __reExport(src_exports, require("@elliemae/ds-legacy-pills-v2"), module.exports);
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './deprecated/index.js';\nexport { default } from './deprecated/index.js';\nexport * from '@elliemae/ds-legacy-pills-v2';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,kCAAd;AACA,wBAAwB;AACxB,wBAAc,yCAFd;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -0,0 +1,73 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useRef, useState } from "react";
4
+ import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
5
+ import { DSDropdownMenu } from "@elliemae/ds-legacy-dropdownmenu";
6
+ import { ChevronDown } from "@elliemae/ds-legacy-icons";
7
+ import { useFocusGroupItem } from "@elliemae/ds-legacy-shared";
8
+ import { Pill } from "./Pill.js";
9
+ const DropdownPill = ({
10
+ containerProps = {},
11
+ label = "",
12
+ variant,
13
+ tabIndex = -1,
14
+ closeMenuOnItemSelection = false,
15
+ maxWidth,
16
+ minWidth,
17
+ ...dropdownProps
18
+ }) => {
19
+ const ref = useRef(null);
20
+ const [chevronEl, chevronRef] = useState();
21
+ const { focusFirst } = useFocusGroupItem(ref);
22
+ return /* @__PURE__ */ jsx(
23
+ DSDropdownMenu,
24
+ {
25
+ ...dropdownProps,
26
+ closeMenuOnItemSelection,
27
+ maxWidth,
28
+ hideIfNotVisible: true,
29
+ menuProps: { className: "dropdown-pill-menu", zIndex: 100 },
30
+ minWidth,
31
+ onClose: focusFirst,
32
+ referenceNode: chevronEl,
33
+ triggerComponent: /* @__PURE__ */ jsx(
34
+ Pill,
35
+ {
36
+ "data-testid": "dropdown-pill",
37
+ className: "dropdown-pill",
38
+ containerProps: { role: "listbox", ...containerProps },
39
+ innerRef: ref,
40
+ label,
41
+ rightAddon: /* @__PURE__ */ jsx("div", { ref: chevronRef, children: /* @__PURE__ */ jsx(ChevronDown, { className: "dropdown-pill-chevron-down", "data-testid": "dropdown-pill-button" }) }),
42
+ tabIndex,
43
+ variant
44
+ }
45
+ )
46
+ }
47
+ );
48
+ };
49
+ const props = {
50
+ /** props injected to component wrapper */
51
+ containerProps: PropTypes.object.description("props injected to component wrapper"),
52
+ /** labeled pill text label */
53
+ label: PropTypes.string.isRequired.description("pill text label"),
54
+ /** pill variant */
55
+ variant: PropTypes.oneOf(["value", "title"]).description("pill variant"),
56
+ /** html focus border */
57
+ tabIndex: PropTypes.number.description("html focus order"),
58
+ /** close menu on item selection */
59
+ closeMenuOnItemSelection: PropTypes.bool.description("close menu on item selection"),
60
+ /** pill max width */
61
+ maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("pill max width"),
62
+ /** pill min width */
63
+ minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("pill min width")
64
+ };
65
+ DropdownPill.propTypes = props;
66
+ DropdownPill.displayName = "DropdownPill";
67
+ const DSDropdownPillWithSchema = describe(DropdownPill);
68
+ DSDropdownPillWithSchema.propTypes = props;
69
+ export {
70
+ DSDropdownPillWithSchema,
71
+ DropdownPill
72
+ };
73
+ //# sourceMappingURL=DropdownPill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/DropdownPill.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { DSDropdownMenu } from '@elliemae/ds-legacy-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-legacy-icons';\nimport { useFocusGroupItem } from '@elliemae/ds-legacy-shared';\nimport { Pill } from './Pill.js';\n\nconst 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,YAAY,WAAW;AC2CT;AAvCd,SAAgB,QAAQ,gBAAgB;AACxC,SAAS,WAAW,gBAAgB;AACpC,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAErB,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,QAAQ;AAAA,EACR;AAAA,EACA,WAAW;AAAA,EACX,2BAA2B;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,WAAW,UAAU,IAAI,SAAS;AACzC,QAAM,EAAE,WAAW,IAAI,kBAAkB,GAAG;AAC5C,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,kBAAgB;AAAA,MAChB,WAAW,EAAE,WAAW,sBAAsB,QAAQ,IAAI;AAAA,MAC1D;AAAA,MACA,SAAS;AAAA,MACT,eAAe;AAAA,MACf,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAY;AAAA,UACZ,WAAU;AAAA,UACV,gBAAgB,EAAE,MAAM,WAAW,GAAG,eAAe;AAAA,UACrD,UAAU;AAAA,UACV;AAAA,UACA,YACE,oBAAC,SAAI,KAAK,YACR,8BAAC,eAAY,WAAU,8BAA6B,eAAY,wBAAuB,GACzF;AAAA,UAEF;AAAA,UACA;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,SAAS,UAAU,MAAM,CAAC,SAAS,OAAO,CAAC,EAAE,YAAY,cAAc;AAAA;AAAA,EAEvE,UAAU,UAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA,EAEzD,0BAA0B,UAAU,KAAK,YAAY,8BAA8B;AAAA;AAAA,EAEnF,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,gBAAgB;AAAA;AAAA,EAEhG,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,gBAAgB;AAClG;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,57 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useDeprecateComponent } from "@elliemae/ds-legacy-utilities";
4
+ import { CloseXsmall } from "@elliemae/ds-legacy-icons";
5
+ import { aggregatedClasses } from "@elliemae/ds-legacy-classnames";
6
+ import { DSInput, DSInputMask } from "@elliemae/ds-legacy-form";
7
+ import { Pill } from "./Pill.js";
8
+ const StyledInputPill = aggregatedClasses(Pill)("input-pill", null, ({ value }) => ({
9
+ value
10
+ }));
11
+ const InputPill = ({
12
+ containerProps = {},
13
+ placeholder = "Enter Value",
14
+ onChange = () => {
15
+ },
16
+ onRemove,
17
+ value,
18
+ type,
19
+ ...otherProps
20
+ }) => {
21
+ useDeprecateComponent({ componentName: "ds-pills", version: "TBD Date: 2023 Q3" });
22
+ let TypeOfInput = DSInput;
23
+ switch (type) {
24
+ case "inputText":
25
+ TypeOfInput = DSInput;
26
+ break;
27
+ case "inputMask":
28
+ TypeOfInput = DSInputMask;
29
+ break;
30
+ default:
31
+ break;
32
+ }
33
+ return /* @__PURE__ */ jsx(
34
+ StyledInputPill,
35
+ {
36
+ className: "input-pill",
37
+ classProps: { value },
38
+ containerProps,
39
+ label: /* @__PURE__ */ jsx(
40
+ TypeOfInput,
41
+ {
42
+ "data-testid": "input-pill",
43
+ onChange,
44
+ placeholder,
45
+ value,
46
+ ...otherProps
47
+ }
48
+ ),
49
+ rightAddon: value && /* @__PURE__ */ jsx(CloseXsmall, { className: "remove-pill-button", "data-testid": "remove-pill-button", onClick: onRemove }),
50
+ tabIndex: -1
51
+ }
52
+ );
53
+ };
54
+ export {
55
+ InputPill
56
+ };
57
+ //# sourceMappingURL=InputPill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/InputPill.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-legacy-utilities';\n\nimport { CloseXsmall } from '@elliemae/ds-legacy-icons';\nimport { aggregatedClasses } from '@elliemae/ds-legacy-classnames';\nimport { DSInput, DSInputMask } from '@elliemae/ds-legacy-form';\nimport { Pill } from './Pill.js';\n\nconst StyledInputPill = aggregatedClasses(Pill)('input-pill', null, ({ value }) => ({\n value,\n}));\n\nexport const InputPill = ({\n containerProps = {},\n placeholder = 'Enter Value',\n onChange = () => {},\n onRemove,\n value,\n type,\n ...otherProps\n}) => {\n useDeprecateComponent({ componentName: 'ds-pills', version: 'TBD Date: 2023 Q3' });\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,YAAY,WAAW;AC+Cf;AA1CR,SAAS,6BAA6B;AAEtC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,SAAS,mBAAmB;AACrC,SAAS,YAAY;AAErB,MAAM,kBAAkB,kBAAkB,IAAI,EAAE,cAAc,MAAM,CAAC,EAAE,MAAM,OAAO;AAAA,EAClF;AACF,EAAE;AAEK,MAAM,YAAY,CAAC;AAAA,EACxB,iBAAiB,CAAC;AAAA,EAClB,cAAc;AAAA,EACd,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,wBAAsB,EAAE,eAAe,YAAY,SAAS,oBAAoB,CAAC;AAEjF,MAAI,cAAc;AAGlB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,oBAAc;AACd;AAAA,IACF,KAAK;AACH,oBAAc;AACd;AAAA,IACF;AACE;AAAA,EACJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAY,EAAE,MAAM;AAAA,MACpB;AAAA,MACA,OACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAY;AAAA,UACZ;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAG;AAAA;AAAA,MACN;AAAA,MAEF,YACE,SAAS,oBAAC,eAAY,WAAU,sBAAqB,eAAY,sBAAqB,SAAS,UAAU;AAAA,MAE3G,UAAU;AAAA;AAAA,EACZ;AAEJ;",
6
+ "names": []
7
+ }