@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.
- package/dist/cjs/deprecated/DropdownPill.js +103 -0
- package/dist/cjs/deprecated/DropdownPill.js.map +7 -0
- package/dist/cjs/deprecated/InputPill.js +87 -0
- package/dist/cjs/deprecated/InputPill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPills.js +112 -0
- package/dist/cjs/deprecated/LabeledDropdownPills.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +134 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +154 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +169 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js +45 -0
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
- package/dist/cjs/deprecated/LabeledPills.js +86 -0
- package/dist/cjs/deprecated/LabeledPills.js.map +7 -0
- package/dist/cjs/deprecated/OverflowPill.js +93 -0
- package/dist/cjs/deprecated/OverflowPill.js.map +7 -0
- package/dist/cjs/deprecated/Pill.js +83 -0
- package/dist/cjs/deprecated/Pill.js.map +7 -0
- package/dist/cjs/deprecated/PillGroup.js +74 -0
- package/dist/cjs/deprecated/PillGroup.js.map +7 -0
- package/dist/cjs/deprecated/ReadOnlyPill.js +124 -0
- package/dist/cjs/deprecated/ReadOnlyPill.js.map +7 -0
- package/dist/cjs/deprecated/RemovablePill.js +86 -0
- package/dist/cjs/deprecated/RemovablePill.js.map +7 -0
- package/dist/cjs/deprecated/index.js +45 -0
- package/dist/cjs/deprecated/index.js.map +7 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/esm/deprecated/DropdownPill.js +73 -0
- package/dist/esm/deprecated/DropdownPill.js.map +7 -0
- package/dist/esm/deprecated/InputPill.js +57 -0
- package/dist/esm/deprecated/InputPill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPills.js +82 -0
- package/dist/esm/deprecated/LabeledDropdownPills.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js +104 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js +124 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js +139 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +7 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js +15 -0
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js.map +7 -0
- package/dist/esm/deprecated/LabeledPills.js +56 -0
- package/dist/esm/deprecated/LabeledPills.js.map +7 -0
- package/dist/esm/deprecated/OverflowPill.js +63 -0
- package/dist/esm/deprecated/OverflowPill.js.map +7 -0
- package/dist/esm/deprecated/Pill.js +53 -0
- package/dist/esm/deprecated/Pill.js.map +7 -0
- package/dist/esm/deprecated/PillGroup.js +44 -0
- package/dist/esm/deprecated/PillGroup.js.map +7 -0
- package/dist/esm/deprecated/ReadOnlyPill.js +94 -0
- package/dist/esm/deprecated/ReadOnlyPill.js.map +7 -0
- package/dist/esm/deprecated/RemovablePill.js +56 -0
- package/dist/esm/deprecated/RemovablePill.js.map +7 -0
- package/dist/esm/deprecated/index.js +14 -0
- package/dist/esm/deprecated/index.js.map +7 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/types/deprecated/DropdownPill.d.ts +40 -0
- package/dist/types/deprecated/InputPill.d.ts +9 -0
- package/dist/types/deprecated/LabeledDropdownPills.d.ts +52 -0
- package/dist/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.d.ts +16 -0
- package/dist/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.d.ts +13 -0
- package/dist/types/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.d.ts +28 -0
- package/dist/types/deprecated/LabeledDropdownPillsTypes/utils.d.ts +1 -0
- package/dist/types/deprecated/LabeledPills.d.ts +38 -0
- package/dist/types/deprecated/OverflowPill.d.ts +26 -0
- package/dist/types/deprecated/Pill.d.ts +37 -0
- package/dist/types/deprecated/PillGroup.d.ts +32 -0
- package/dist/types/deprecated/ReadOnlyPill.d.ts +33 -0
- package/dist/types/deprecated/RemovablePill.d.ts +34 -0
- package/dist/types/deprecated/index.d.ts +9 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +195 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState, useEffect } from "react";
|
|
4
|
+
import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
|
|
5
|
+
import { useFocusGroupItem } from "@elliemae/ds-legacy-shared";
|
|
6
|
+
import { DSTooltip } from "@elliemae/ds-legacy-tooltip";
|
|
7
|
+
import { Pill } from "./Pill.js";
|
|
8
|
+
const OverflowPill = ({ containerProps = {}, label = "", options = [], className = "" }) => {
|
|
9
|
+
const ref = useRef(null);
|
|
10
|
+
const [tooltipIsOpen, setTooltipIsOpen] = useState(false);
|
|
11
|
+
const [tooltipText, setTooltipText] = useState("");
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
let text = "";
|
|
14
|
+
options.forEach((option) => {
|
|
15
|
+
if (!tooltipText || option === options[0]) {
|
|
16
|
+
text = `${option.label}`;
|
|
17
|
+
} else {
|
|
18
|
+
text = text.concat(`, ${option.label}`);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
setTooltipText(text);
|
|
22
|
+
}, [options]);
|
|
23
|
+
useFocusGroupItem(ref);
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
DSTooltip,
|
|
26
|
+
{
|
|
27
|
+
isOpen: tooltipIsOpen,
|
|
28
|
+
title: tooltipText,
|
|
29
|
+
zIndex: 11,
|
|
30
|
+
triggerComponent: /* @__PURE__ */ jsx(
|
|
31
|
+
Pill,
|
|
32
|
+
{
|
|
33
|
+
className: `${"overflow-pill"} ${className}`,
|
|
34
|
+
containerProps,
|
|
35
|
+
innerRef: ref,
|
|
36
|
+
label,
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
onMouseEnter: () => setTooltipIsOpen(true),
|
|
39
|
+
onMouseLeave: () => setTooltipIsOpen(false)
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
const props = {
|
|
46
|
+
/** props to inject to pill wrapper */
|
|
47
|
+
containerProps: PropTypes.object.description("props to inject to pill wrapper"),
|
|
48
|
+
/** pill text label */
|
|
49
|
+
label: PropTypes.string.isRequired.description("pill text label"),
|
|
50
|
+
/** overflow pills options */
|
|
51
|
+
options: PropTypes.array.description("overflow pills options"),
|
|
52
|
+
/** additional className */
|
|
53
|
+
className: PropTypes.string.description("Additional className")
|
|
54
|
+
};
|
|
55
|
+
OverflowPill.propTypes = props;
|
|
56
|
+
OverflowPill.displayName = "OverflowPill";
|
|
57
|
+
const DSOverflowPillWithSchema = describe(OverflowPill);
|
|
58
|
+
DSOverflowPillWithSchema.propTypes = props;
|
|
59
|
+
export {
|
|
60
|
+
DSOverflowPillWithSchema,
|
|
61
|
+
OverflowPill
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=OverflowPill.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/OverflowPill.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, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { useFocusGroupItem } from '@elliemae/ds-legacy-shared';\nimport { DSTooltip } from '@elliemae/ds-legacy-tooltip';\nimport { Pill } from './Pill.js';\n\nconst OverflowPill = ({ containerProps = {}, label = '', options = [], className = '' }) => {\n const ref = useRef(null);\n const [tooltipIsOpen, setTooltipIsOpen] = useState(false);\n const [tooltipText, setTooltipText] = useState('');\n\n useEffect(() => {\n let text = '';\n options.forEach((option) => {\n if (!tooltipText || option === options[0]) {\n text = `${option.label}`;\n } else {\n text = text.concat(`, ${option.label}`);\n }\n });\n setTooltipText(text);\n }, [options]);\n\n useFocusGroupItem(ref);\n\n return (\n <DSTooltip\n isOpen={tooltipIsOpen}\n title={tooltipText}\n zIndex={11}\n triggerComponent={\n <Pill\n className={`${'overflow-pill'} ${className}`}\n containerProps={containerProps}\n innerRef={ref}\n label={label}\n tabIndex={-1}\n onMouseEnter={() => setTooltipIsOpen(true)}\n onMouseLeave={() => setTooltipIsOpen(false)}\n />\n }\n />\n );\n};\n\nconst props = {\n /** props to inject to pill wrapper */\n containerProps: PropTypes.object.description('props to inject to pill wrapper'),\n /** pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** overflow pills options */\n options: PropTypes.array.description('overflow pills options'),\n /** additional className */\n className: PropTypes.string.description('Additional className'),\n};\n\nOverflowPill.propTypes = props;\nOverflowPill.displayName = 'OverflowPill';\nconst DSOverflowPillWithSchema = describe(OverflowPill);\nDSOverflowPillWithSchema.propTypes = props;\n\nexport { OverflowPill, DSOverflowPillWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmCf;AA/BR,SAAgB,QAAQ,UAAU,iBAAiB;AACnD,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,MAAM,eAAe,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,CAAC,GAAG,YAAY,GAAG,MAAM;AAC1F,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AACxD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,EAAE;AAEjD,YAAU,MAAM;AACd,QAAI,OAAO;AACX,YAAQ,QAAQ,CAAC,WAAW;AAC1B,UAAI,CAAC,eAAe,WAAW,QAAQ,CAAC,GAAG;AACzC,eAAO,GAAG,OAAO;AAAA,MACnB,OAAO;AACL,eAAO,KAAK,OAAO,KAAK,OAAO,OAAO;AAAA,MACxC;AAAA,IACF,CAAC;AACD,mBAAe,IAAI;AAAA,EACrB,GAAG,CAAC,OAAO,CAAC;AAEZ,oBAAkB,GAAG;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,GAAG,mBAAmB;AAAA,UACjC;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA,UAAU;AAAA,UACV,cAAc,MAAM,iBAAiB,IAAI;AAAA,UACzC,cAAc,MAAM,iBAAiB,KAAK;AAAA;AAAA,MAC5C;AAAA;AAAA,EAEJ;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,iCAAiC;AAAA;AAAA,EAE9E,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,SAAS,UAAU,MAAM,YAAY,wBAAwB;AAAA;AAAA,EAE7D,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAChE;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useDeprecateComponent } from "@elliemae/ds-legacy-utilities";
|
|
4
|
+
import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
|
|
5
|
+
import { aggregatedClasses } from "@elliemae/ds-legacy-classnames";
|
|
6
|
+
const pillBlockName = "pill";
|
|
7
|
+
const PillWrapper = aggregatedClasses("div")(pillBlockName, null, ({ size, variant }) => ({
|
|
8
|
+
[variant]: !!variant,
|
|
9
|
+
[size]: !!size
|
|
10
|
+
}));
|
|
11
|
+
const PillLabel = aggregatedClasses("span")(pillBlockName, "label");
|
|
12
|
+
const PillAddon = aggregatedClasses("div")(pillBlockName, "addon");
|
|
13
|
+
const Pill = ({
|
|
14
|
+
containerProps = {},
|
|
15
|
+
label = "",
|
|
16
|
+
leftAddon,
|
|
17
|
+
rightAddon,
|
|
18
|
+
variant = "value",
|
|
19
|
+
size = "m",
|
|
20
|
+
...otherProps
|
|
21
|
+
}) => {
|
|
22
|
+
useDeprecateComponent({ componentName: "ds-pills", version: "TBD Date: 2023 Q3" });
|
|
23
|
+
return /* @__PURE__ */ jsxs(PillWrapper, { ...containerProps, classProps: { variant, size }, ...otherProps, children: [
|
|
24
|
+
leftAddon && /* @__PURE__ */ jsx(PillAddon, { children: leftAddon }),
|
|
25
|
+
/* @__PURE__ */ jsx(PillLabel, { children: label }),
|
|
26
|
+
rightAddon && /* @__PURE__ */ jsx(PillAddon, { children: rightAddon })
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
const props = {
|
|
30
|
+
/** props to inject to pill wrapper */
|
|
31
|
+
containerProps: PropTypes.object.description("props to inject to pill wrapper"),
|
|
32
|
+
/** pill text label */
|
|
33
|
+
label: PropTypes.string.isRequired.description("pill text label"),
|
|
34
|
+
/** pill size */
|
|
35
|
+
size: PropTypes.oneOf(["m", "l"]).description("pill size"),
|
|
36
|
+
/** pill variant */
|
|
37
|
+
variant: PropTypes.oneOf(["value", "title"]).description("pill variant"),
|
|
38
|
+
/** addon component to left */
|
|
39
|
+
leftAddon: PropTypes.node.description("addon component to left"),
|
|
40
|
+
/** addon component to right */
|
|
41
|
+
rightAddon: PropTypes.node.description("addon component to right")
|
|
42
|
+
};
|
|
43
|
+
Pill.propTypes = props;
|
|
44
|
+
Pill.displayName = "Pill";
|
|
45
|
+
const DSPillWithSchema = describe(Pill);
|
|
46
|
+
DSPillWithSchema.propTypes = props;
|
|
47
|
+
var Pill_default = Pill;
|
|
48
|
+
export {
|
|
49
|
+
DSPillWithSchema,
|
|
50
|
+
Pill,
|
|
51
|
+
Pill_default as default
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=Pill.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/Pill.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';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-legacy-classnames';\n\nconst pillBlockName = 'pill';\n\nconst PillWrapper = aggregatedClasses('div')(pillBlockName, null, ({ size, variant }) => ({\n [variant]: !!variant,\n [size]: !!size,\n}));\nconst PillLabel = aggregatedClasses('span')(pillBlockName, 'label');\nconst PillAddon = aggregatedClasses('div')(pillBlockName, 'addon');\n\nconst Pill = ({\n containerProps = {},\n label = '',\n leftAddon,\n rightAddon,\n variant = 'value',\n size = 'm',\n ...otherProps\n}) => {\n useDeprecateComponent({ componentName: 'ds-pills', version: 'TBD Date: 2023 Q3' });\n\n return (\n <PillWrapper {...containerProps} classProps={{ variant, size }} {...otherProps}>\n {leftAddon && <PillAddon>{leftAddon}</PillAddon>}\n <PillLabel>{label}</PillLabel>\n {rightAddon && <PillAddon>{rightAddon}</PillAddon>}\n </PillWrapper>\n );\n};\n\nconst props = {\n /** props to inject to pill wrapper */\n containerProps: PropTypes.object.description('props to inject to pill wrapper'),\n /** pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** pill size */\n size: PropTypes.oneOf(['m', 'l']).description('pill size'),\n /** pill variant */\n variant: PropTypes.oneOf(['value', 'title']).description('pill variant'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** addon component to right */\n rightAddon: PropTypes.node.description('addon component to right'),\n};\n\nPill.propTypes = props;\nPill.displayName = 'Pill';\nconst DSPillWithSchema = describe(Pill);\nDSPillWithSchema.propTypes = props;\n\nexport { Pill, DSPillWithSchema };\nexport default Pill;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8BnB,SACgB,KADhB;AAzBJ,SAAS,6BAA6B;AACtC,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAElC,MAAM,gBAAgB;AAEtB,MAAM,cAAc,kBAAkB,KAAK,EAAE,eAAe,MAAM,CAAC,EAAE,MAAM,QAAQ,OAAO;AAAA,EACxF,CAAC,OAAO,GAAG,CAAC,CAAC;AAAA,EACb,CAAC,IAAI,GAAG,CAAC,CAAC;AACZ,EAAE;AACF,MAAM,YAAY,kBAAkB,MAAM,EAAE,eAAe,OAAO;AAClE,MAAM,YAAY,kBAAkB,KAAK,EAAE,eAAe,OAAO;AAEjE,MAAM,OAAO,CAAC;AAAA,EACZ,iBAAiB,CAAC;AAAA,EAClB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,MAAM;AACJ,wBAAsB,EAAE,eAAe,YAAY,SAAS,oBAAoB,CAAC;AAEjF,SACE,qBAAC,eAAa,GAAG,gBAAgB,YAAY,EAAE,SAAS,KAAK,GAAI,GAAG,YACjE;AAAA,iBAAa,oBAAC,aAAW,qBAAU;AAAA,IACpC,oBAAC,aAAW,iBAAM;AAAA,IACjB,cAAc,oBAAC,aAAW,sBAAW;AAAA,KACxC;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,iCAAiC;AAAA;AAAA,EAE9E,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,WAAW;AAAA;AAAA,EAEzD,SAAS,UAAU,MAAM,CAAC,SAAS,OAAO,CAAC,EAAE,YAAY,cAAc;AAAA;AAAA,EAEvE,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,YAAY,UAAU,KAAK,YAAY,0BAA0B;AACnE;AAEA,KAAK,YAAY;AACjB,KAAK,cAAc;AACnB,MAAM,mBAAmB,SAAS,IAAI;AACtC,iBAAiB,YAAY;AAG7B,IAAO,eAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { describe, PropTypes } from "@elliemae/ds-legacy-props-helpers";
|
|
4
|
+
import { aggregatedClasses } from "@elliemae/ds-legacy-classnames";
|
|
5
|
+
import { FocusGroupProvider } from "@elliemae/ds-legacy-shared";
|
|
6
|
+
const pillGroupBlockName = "pill-group";
|
|
7
|
+
const Container = aggregatedClasses("div")(pillGroupBlockName);
|
|
8
|
+
const PillGroup = ({ containerProps = {}, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, children }) => /* @__PURE__ */ jsx(
|
|
9
|
+
FocusGroupProvider,
|
|
10
|
+
{
|
|
11
|
+
keyBindings: {
|
|
12
|
+
Tab: "next"
|
|
13
|
+
},
|
|
14
|
+
onFocusGroupSet,
|
|
15
|
+
onFocusNextGroup,
|
|
16
|
+
onFocusPreviousGroup,
|
|
17
|
+
orientation: "horizontal",
|
|
18
|
+
children: /* @__PURE__ */ jsx(Container, { ...containerProps, children })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
const props = {
|
|
22
|
+
/** props injected to component wrapper */
|
|
23
|
+
containerProps: PropTypes.object.description("props injected to component wrapper"),
|
|
24
|
+
/** focus next group callback */
|
|
25
|
+
onFocusNextGroup: PropTypes.func.description("focus next group callback"),
|
|
26
|
+
/** focus prev group callback */
|
|
27
|
+
onFocusPreviousGroup: PropTypes.func.description("focus prev group callback"),
|
|
28
|
+
/** focus group set callback */
|
|
29
|
+
onFocusGroupSet: PropTypes.func.description("focus group set callback"),
|
|
30
|
+
/** pill components */
|
|
31
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired.description(
|
|
32
|
+
"pill components"
|
|
33
|
+
)
|
|
34
|
+
};
|
|
35
|
+
PillGroup.propTypes = props;
|
|
36
|
+
PillGroup.displayName = "PillGroup";
|
|
37
|
+
const DSPillGroupWithSchema = describe(PillGroup);
|
|
38
|
+
DSPillGroupWithSchema.propTypes = props;
|
|
39
|
+
export {
|
|
40
|
+
Container,
|
|
41
|
+
DSPillGroupWithSchema,
|
|
42
|
+
PillGroup
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=PillGroup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/PillGroup.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 { 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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuBnB;AAlBJ,SAAS,UAAU,iBAAiB;AACpC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AAEnC,MAAM,qBAAqB;AAEpB,MAAM,YAAY,kBAAkB,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,8BAAC,aAAW,GAAG,gBAAiB,UAAS;AAAA;AAC3C;AAGF,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,kBAAkB,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAExE,sBAAsB,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAE5E,iBAAiB,UAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAEtE,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,GAAG,UAAU,IAAI,CAAC,EAAE,WAAW;AAAA,IAC5F;AAAA,EACF;AACF;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,wBAAwB,SAAS,SAAS;AAChD,sBAAsB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
|
+
import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
|
|
5
|
+
import { InfoCircleSmall } from "@elliemae/ds-legacy-icons";
|
|
6
|
+
import { DSModal, MODAL_TYPE_V2 } from "@elliemae/ds-legacy-modal";
|
|
7
|
+
import { DSPopover } from "@elliemae/ds-legacy-popover";
|
|
8
|
+
import { Pill } from "./Pill.js";
|
|
9
|
+
const ReadOnlyPill = ({
|
|
10
|
+
containerProps = {},
|
|
11
|
+
modalContent = "",
|
|
12
|
+
label = "",
|
|
13
|
+
leftAddon,
|
|
14
|
+
modalTitle = "",
|
|
15
|
+
tooltipText = ""
|
|
16
|
+
}) => {
|
|
17
|
+
const ref = useRef(null);
|
|
18
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
19
|
+
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
|
|
20
|
+
const toggle = () => {
|
|
21
|
+
setIsModalOpen(!isModalOpen);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Pill,
|
|
26
|
+
{
|
|
27
|
+
"data-testid": "read-only-pill",
|
|
28
|
+
className: "removable-pill",
|
|
29
|
+
containerProps,
|
|
30
|
+
innerRef: ref,
|
|
31
|
+
label,
|
|
32
|
+
leftAddon,
|
|
33
|
+
rightAddon: /* @__PURE__ */ jsx(
|
|
34
|
+
DSPopover,
|
|
35
|
+
{
|
|
36
|
+
isOpen: tooltipText && isTooltipOpen,
|
|
37
|
+
content: tooltipText,
|
|
38
|
+
placement: "top",
|
|
39
|
+
showArrow: true,
|
|
40
|
+
renderTrigger: ({ ref: ref2 }) => /* @__PURE__ */ jsx(
|
|
41
|
+
InfoCircleSmall,
|
|
42
|
+
{
|
|
43
|
+
role: "button",
|
|
44
|
+
"data-testid": "read-only-info-btn",
|
|
45
|
+
className: "remove-pill-button",
|
|
46
|
+
onClick: toggle,
|
|
47
|
+
onMouseEnter: () => setIsTooltipOpen(true),
|
|
48
|
+
onMouseLeave: () => setIsTooltipOpen(false),
|
|
49
|
+
color: ["brand-primary", "600"],
|
|
50
|
+
innerRef: ref2
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
tabIndex: -1
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
DSModal,
|
|
60
|
+
{
|
|
61
|
+
isOpen: isModalOpen,
|
|
62
|
+
showClose: true,
|
|
63
|
+
shouldCloseOnOverlayClick: true,
|
|
64
|
+
modalTitle,
|
|
65
|
+
modalType: MODAL_TYPE_V2.INFORMATION,
|
|
66
|
+
onClose: toggle,
|
|
67
|
+
version: 2,
|
|
68
|
+
children: modalContent
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
72
|
+
};
|
|
73
|
+
const props = {
|
|
74
|
+
/** props injected to component wrapper */
|
|
75
|
+
containerProps: PropTypes.object.description("props injected to component wrapper"),
|
|
76
|
+
/** labeled pill text label */
|
|
77
|
+
label: PropTypes.string.isRequired.description("pill text label"),
|
|
78
|
+
/** addon component to left */
|
|
79
|
+
leftAddon: PropTypes.node.description("addon component to left"),
|
|
80
|
+
/** read only pill modal content */
|
|
81
|
+
modalContent: PropTypes.string.description("read only pill modal content"),
|
|
82
|
+
/** read only pill modal title */
|
|
83
|
+
modalTitle: PropTypes.string.description("read only pill modal title"),
|
|
84
|
+
tooltipText: PropTypes.string.description("text to display in tooltip")
|
|
85
|
+
};
|
|
86
|
+
ReadOnlyPill.propTypes = props;
|
|
87
|
+
ReadOnlyPill.displayName = "ReadOnlyPill";
|
|
88
|
+
const DSReadOnlyPillWithSchema = describe(ReadOnlyPill);
|
|
89
|
+
DSReadOnlyPillWithSchema.propTypes = props;
|
|
90
|
+
export {
|
|
91
|
+
DSReadOnlyPillWithSchema,
|
|
92
|
+
ReadOnlyPill
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=ReadOnlyPill.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/ReadOnlyPill.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 { 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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4BnB,mBAeU,KAfV;AAxBJ,SAAgB,QAAQ,gBAAgB;AACxC,SAAS,WAAW,gBAAgB;AACpC,SAAS,uBAAuB;AAChC,SAAS,SAAS,qBAAqB;AACvC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;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,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AAExD,QAAM,SAAS,MAAM;AACnB,mBAAe,CAAC,WAAW;AAAA,EAC7B;AAEA,SACE,iCACE;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,cAAc;AAAA,QACzB,SAAS;AAAA,QACT,SAAS;AAAA,QAER;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,cAAc,UAAU,OAAO,YAAY,8BAA8B;AAAA;AAAA,EAEzE,YAAY,UAAU,OAAO,YAAY,4BAA4B;AAAA,EACrE,aAAa,UAAU,OAAO,YAAY,4BAA4B;AACxE;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
|
|
6
|
+
"names": ["ref"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { isFunction } from "@elliemae/ds-legacy-utilities";
|
|
5
|
+
import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
|
|
6
|
+
import { CloseXsmall } from "@elliemae/ds-legacy-icons";
|
|
7
|
+
import { useFocusGroupItem } from "@elliemae/ds-legacy-shared";
|
|
8
|
+
import { Pill } from "./Pill.js";
|
|
9
|
+
const RemovablePill = ({ containerProps = {}, label = "", onRemove, size = "m", leftAddon, className = "" }) => {
|
|
10
|
+
const ref = useRef(null);
|
|
11
|
+
const { focusPrevious } = useFocusGroupItem(ref);
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Pill,
|
|
14
|
+
{
|
|
15
|
+
className: `${"removable-pill"} ${className}`,
|
|
16
|
+
"data-testid": "removable-pill",
|
|
17
|
+
containerProps,
|
|
18
|
+
innerRef: ref,
|
|
19
|
+
size,
|
|
20
|
+
label,
|
|
21
|
+
leftAddon,
|
|
22
|
+
onKeyDown: (e) => {
|
|
23
|
+
if (e.key === "Backspace" && isFunction(onRemove)) {
|
|
24
|
+
onRemove();
|
|
25
|
+
if (isFunction(focusPrevious))
|
|
26
|
+
focusPrevious();
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
rightAddon: /* @__PURE__ */ jsx(CloseXsmall, { role: "button", "data-testid": "remove-pill-button", className: "remove-pill-button", onClick: onRemove }),
|
|
30
|
+
tabIndex: -1
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
const props = {
|
|
35
|
+
/** props injected to component wrapper */
|
|
36
|
+
containerProps: PropTypes.object.description("props injected to component wrapper"),
|
|
37
|
+
/** labeled pill text label */
|
|
38
|
+
label: PropTypes.string.isRequired.description("pill text label"),
|
|
39
|
+
/** remove click callback */
|
|
40
|
+
onRemove: PropTypes.func.description("remove click callback"),
|
|
41
|
+
/** pill size */
|
|
42
|
+
size: PropTypes.oneOf(["m", "l"]).description("pill size"),
|
|
43
|
+
/** addon component to left */
|
|
44
|
+
leftAddon: PropTypes.node.description("addon component to left"),
|
|
45
|
+
/** additional className */
|
|
46
|
+
className: PropTypes.string.description("Additional className")
|
|
47
|
+
};
|
|
48
|
+
RemovablePill.propTypes = props;
|
|
49
|
+
RemovablePill.displayName = "RemovablePill";
|
|
50
|
+
const DSRemovablePillWithSchema = describe(RemovablePill);
|
|
51
|
+
DSRemovablePillWithSchema.propTypes = props;
|
|
52
|
+
export {
|
|
53
|
+
DSRemovablePillWithSchema,
|
|
54
|
+
RemovablePill
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=RemovablePill.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/RemovablePill.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 } 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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8Bf;AA1BR,SAAgB,cAAc;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,WAAW,gBAAgB;AACpC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAErB,MAAM,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,OAAO,KAAK,WAAW,YAAY,GAAG,MAAM;AAC9G,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,EAAE,cAAc,IAAI,kBAAkB,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,eAAe,WAAW,QAAQ,GAAG;AACjD,mBAAS;AACT,cAAI,WAAW,aAAa;AAAG,0BAAc;AAAA,QAC/C;AAAA,MACF;AAAA,MACA,YACE,oBAAC,eAAY,MAAK,UAAS,eAAY,sBAAqB,WAAU,sBAAqB,SAAS,UAAU;AAAA,MAEhH,UAAU;AAAA;AAAA,EACZ;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,UAAU,UAAU,KAAK,YAAY,uBAAuB;AAAA;AAAA,EAE5D,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,WAAW;AAAA;AAAA,EAEzD,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAChE;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,4BAA4B,SAAS,aAAa;AACxD,0BAA0B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export * from "./Pill.js";
|
|
3
|
+
export * from "./PillGroup.js";
|
|
4
|
+
export * from "./LabeledDropdownPills.js";
|
|
5
|
+
export * from "./LabeledPills.js";
|
|
6
|
+
export * from "./DropdownPill.js";
|
|
7
|
+
export * from "./RemovablePill.js";
|
|
8
|
+
export * from "./ReadOnlyPill.js";
|
|
9
|
+
export * from "./OverflowPill.js";
|
|
10
|
+
import { default as default2 } from "./Pill.js";
|
|
11
|
+
export {
|
|
12
|
+
default2 as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './deprecated/index.js';\nexport { default } from './deprecated/index.js';\nexport * from '@elliemae/ds-legacy-pills-v2';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;AACxB,cAAc;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const DropdownPill: {
|
|
2
|
+
({ containerProps, label, variant, tabIndex, closeMenuOnItemSelection, maxWidth, minWidth, ...dropdownProps }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
containerProps?: {} | undefined;
|
|
5
|
+
label?: string | undefined;
|
|
6
|
+
variant: any;
|
|
7
|
+
tabIndex?: number | undefined;
|
|
8
|
+
closeMenuOnItemSelection?: boolean | undefined;
|
|
9
|
+
maxWidth: any;
|
|
10
|
+
minWidth: any;
|
|
11
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
12
|
+
propTypes: {
|
|
13
|
+
/** props injected to component wrapper */
|
|
14
|
+
containerProps: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
|
+
/** labeled pill text label */
|
|
16
|
+
label: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
17
|
+
/** pill variant */
|
|
18
|
+
variant: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
19
|
+
/** html focus border */
|
|
20
|
+
tabIndex: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
21
|
+
/** close menu on item selection */
|
|
22
|
+
closeMenuOnItemSelection: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
|
+
/** pill max width */
|
|
24
|
+
maxWidth: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
25
|
+
/** pill min width */
|
|
26
|
+
minWidth: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
};
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
declare const DSDropdownPillWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
containerProps?: {} | undefined;
|
|
33
|
+
label?: string | undefined;
|
|
34
|
+
variant: any;
|
|
35
|
+
tabIndex?: number | undefined;
|
|
36
|
+
closeMenuOnItemSelection?: boolean | undefined;
|
|
37
|
+
maxWidth: any;
|
|
38
|
+
minWidth: any;
|
|
39
|
+
}>;
|
|
40
|
+
export { DropdownPill, DSDropdownPillWithSchema };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const InputPill: ({ containerProps, placeholder, onChange, onRemove, value, type, ...otherProps }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
containerProps?: {} | undefined;
|
|
4
|
+
placeholder?: string | undefined;
|
|
5
|
+
onChange?: (() => void) | undefined;
|
|
6
|
+
onRemove: any;
|
|
7
|
+
value: any;
|
|
8
|
+
type: any;
|
|
9
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const LabeledDropdownPills: {
|
|
2
|
+
({ label, value, type, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, maxWidth, minWidth, fixed, className, ...menuProps }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
label?: string | undefined;
|
|
5
|
+
value: any;
|
|
6
|
+
type: any;
|
|
7
|
+
onFocusNextGroup: any;
|
|
8
|
+
onFocusPreviousGroup: any;
|
|
9
|
+
onFocusGroupSet: any;
|
|
10
|
+
maxWidth: any;
|
|
11
|
+
minWidth: any;
|
|
12
|
+
fixed: any;
|
|
13
|
+
className: any;
|
|
14
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
15
|
+
propTypes: {
|
|
16
|
+
/** pill type */
|
|
17
|
+
type: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
18
|
+
/** focus next group callback */
|
|
19
|
+
onFocusNextGroup: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
20
|
+
/** focus prev group callback */
|
|
21
|
+
onFocusPreviousGroup: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
22
|
+
/** focus group set callback */
|
|
23
|
+
onFocusGroupSet: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
|
+
/** pill max width */
|
|
25
|
+
maxWidth: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
|
+
/** pill min width */
|
|
27
|
+
minWidth: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
|
+
/** fixed pill */
|
|
29
|
+
fixed: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
|
+
/** pill label text */
|
|
31
|
+
label: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
+
/** additional className */
|
|
33
|
+
className: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
34
|
+
/** pill value */
|
|
35
|
+
value: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
|
+
};
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
declare const DSLabeledDropdownPillsWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
label?: string | undefined;
|
|
42
|
+
value: any;
|
|
43
|
+
type: any;
|
|
44
|
+
onFocusNextGroup: any;
|
|
45
|
+
onFocusPreviousGroup: any;
|
|
46
|
+
onFocusGroupSet: any;
|
|
47
|
+
maxWidth: any;
|
|
48
|
+
minWidth: any;
|
|
49
|
+
fixed: any;
|
|
50
|
+
className: any;
|
|
51
|
+
}>;
|
|
52
|
+
export { LabeledDropdownPills, DSLabeledDropdownPillsWithSchema };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const LabeledDropdownCascadeMenuPill: ({ label, options, value: optionValue, onChange, onRemove, value: selection, placeholder, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, maxWidth, minWidth, ...menuProps }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
label: any;
|
|
4
|
+
options: any;
|
|
5
|
+
value?: {} | undefined;
|
|
6
|
+
onChange: any;
|
|
7
|
+
onRemove: any;
|
|
8
|
+
placeholder?: string | undefined;
|
|
9
|
+
onFocusNextGroup: any;
|
|
10
|
+
onFocusPreviousGroup: any;
|
|
11
|
+
onFocusGroupSet: any;
|
|
12
|
+
maxWidth: any;
|
|
13
|
+
minWidth: any;
|
|
14
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
15
|
+
export { LabeledDropdownCascadeMenuPill };
|
|
16
|
+
export default LabeledDropdownCascadeMenuPill;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const LabeledDropdownMultiPills: ({ label, options, value, onSelect, onRemove, onChange, maxWidth, minWidth, ...menuProps }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
label: any;
|
|
4
|
+
options?: never[] | undefined;
|
|
5
|
+
value?: never[] | undefined;
|
|
6
|
+
onSelect?: (() => null) | undefined;
|
|
7
|
+
onRemove?: (() => null) | undefined;
|
|
8
|
+
onChange: any;
|
|
9
|
+
maxWidth: any;
|
|
10
|
+
minWidth: any;
|
|
11
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
12
|
+
export { LabeledDropdownMultiPills };
|
|
13
|
+
export default LabeledDropdownMultiPills;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const LabeledDropdownSinglePill: {
|
|
3
|
+
({ label, labelIsValue, options, value, onSelect, onChange, maxWidth, minWidth, fixed, ...menuProps }: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
label: any;
|
|
6
|
+
labelIsValue?: boolean | undefined;
|
|
7
|
+
options: any;
|
|
8
|
+
value: any;
|
|
9
|
+
onSelect?: (() => null) | undefined;
|
|
10
|
+
onChange: any;
|
|
11
|
+
maxWidth: any;
|
|
12
|
+
minWidth: any;
|
|
13
|
+
fixed?: boolean | undefined;
|
|
14
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
15
|
+
propTypes: {
|
|
16
|
+
label: PropTypes.Requireable<string>;
|
|
17
|
+
labelIsValue: PropTypes.Requireable<boolean>;
|
|
18
|
+
options: PropTypes.Requireable<any[]>;
|
|
19
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
20
|
+
onSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
+
maxWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
23
|
+
minWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
24
|
+
fixed: PropTypes.Requireable<boolean>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export { LabeledDropdownSinglePill };
|
|
28
|
+
export default LabeledDropdownSinglePill;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hasOptionChanged: (prevOptions: any, options: any) => boolean;
|