@elliemae/ds-pills-v2 3.22.0-next.15

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 (84) hide show
  1. package/dist/cjs/DSPillDefinitions.js +40 -0
  2. package/dist/cjs/DSPillDefinitions.js.map +7 -0
  3. package/dist/cjs/components/Pill.js +59 -0
  4. package/dist/cjs/components/Pill.js.map +7 -0
  5. package/dist/cjs/components/PillButton.js +68 -0
  6. package/dist/cjs/components/PillButton.js.map +7 -0
  7. package/dist/cjs/components/PillGroup.js +97 -0
  8. package/dist/cjs/components/PillGroup.js.map +7 -0
  9. package/dist/cjs/components/index.js +32 -0
  10. package/dist/cjs/components/index.js.map +7 -0
  11. package/dist/cjs/components/styled.js +246 -0
  12. package/dist/cjs/components/styled.js.map +7 -0
  13. package/dist/cjs/components/types/DropdownPill.js +101 -0
  14. package/dist/cjs/components/types/DropdownPill.js.map +7 -0
  15. package/dist/cjs/components/types/InputPill.js +114 -0
  16. package/dist/cjs/components/types/InputPill.js.map +7 -0
  17. package/dist/cjs/components/types/LabelPill.js +59 -0
  18. package/dist/cjs/components/types/LabelPill.js.map +7 -0
  19. package/dist/cjs/components/types/ReadOnlyPill.js +67 -0
  20. package/dist/cjs/components/types/ReadOnlyPill.js.map +7 -0
  21. package/dist/cjs/components/types/RemovablePill.js +108 -0
  22. package/dist/cjs/components/types/RemovablePill.js.map +7 -0
  23. package/dist/cjs/components/types/ValuePill.js +63 -0
  24. package/dist/cjs/components/types/ValuePill.js.map +7 -0
  25. package/dist/cjs/components/types/index.js +35 -0
  26. package/dist/cjs/components/types/index.js.map +7 -0
  27. package/dist/cjs/index.js +45 -0
  28. package/dist/cjs/index.js.map +7 -0
  29. package/dist/cjs/package.json +7 -0
  30. package/dist/cjs/react-desc-prop-types.js +121 -0
  31. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  32. package/dist/esm/DSPillDefinitions.js +10 -0
  33. package/dist/esm/DSPillDefinitions.js.map +7 -0
  34. package/dist/esm/components/Pill.js +29 -0
  35. package/dist/esm/components/Pill.js.map +7 -0
  36. package/dist/esm/components/PillButton.js +38 -0
  37. package/dist/esm/components/PillButton.js.map +7 -0
  38. package/dist/esm/components/PillGroup.js +72 -0
  39. package/dist/esm/components/PillGroup.js.map +7 -0
  40. package/dist/esm/components/index.js +5 -0
  41. package/dist/esm/components/index.js.map +7 -0
  42. package/dist/esm/components/styled.js +216 -0
  43. package/dist/esm/components/styled.js.map +7 -0
  44. package/dist/esm/components/types/DropdownPill.js +71 -0
  45. package/dist/esm/components/types/DropdownPill.js.map +7 -0
  46. package/dist/esm/components/types/InputPill.js +84 -0
  47. package/dist/esm/components/types/InputPill.js.map +7 -0
  48. package/dist/esm/components/types/LabelPill.js +29 -0
  49. package/dist/esm/components/types/LabelPill.js.map +7 -0
  50. package/dist/esm/components/types/ReadOnlyPill.js +37 -0
  51. package/dist/esm/components/types/ReadOnlyPill.js.map +7 -0
  52. package/dist/esm/components/types/RemovablePill.js +78 -0
  53. package/dist/esm/components/types/RemovablePill.js.map +7 -0
  54. package/dist/esm/components/types/ValuePill.js +33 -0
  55. package/dist/esm/components/types/ValuePill.js.map +7 -0
  56. package/dist/esm/components/types/index.js +8 -0
  57. package/dist/esm/components/types/index.js.map +7 -0
  58. package/dist/esm/index.js +22 -0
  59. package/dist/esm/index.js.map +7 -0
  60. package/dist/esm/package.json +7 -0
  61. package/dist/esm/react-desc-prop-types.js +91 -0
  62. package/dist/esm/react-desc-prop-types.js.map +7 -0
  63. package/dist/types/DSPillDefinitions.d.ts +3 -0
  64. package/dist/types/components/Pill.d.ts +5 -0
  65. package/dist/types/components/PillButton.d.ts +5 -0
  66. package/dist/types/components/PillGroup.d.ts +9 -0
  67. package/dist/types/components/index.d.ts +3 -0
  68. package/dist/types/components/styled.d.ts +37 -0
  69. package/dist/types/components/types/DropdownPill.d.ts +3 -0
  70. package/dist/types/components/types/InputPill.d.ts +3 -0
  71. package/dist/types/components/types/LabelPill.d.ts +3 -0
  72. package/dist/types/components/types/ReadOnlyPill.d.ts +3 -0
  73. package/dist/types/components/types/RemovablePill.d.ts +3 -0
  74. package/dist/types/components/types/ValuePill.d.ts +3 -0
  75. package/dist/types/components/types/index.d.ts +6 -0
  76. package/dist/types/index.d.ts +3 -0
  77. package/dist/types/react-desc-prop-types.d.ts +67 -0
  78. package/dist/types/tests/DSPill.test.d.ts +1 -0
  79. package/dist/types/tests/DSPillGroup.test.d.ts +1 -0
  80. package/dist/types/tests/events/DSPill.events.keyboard.test.d.ts +1 -0
  81. package/dist/types/tests/events/DSPill.events.test.d.ts +1 -0
  82. package/dist/types/tests/events/DSPillGroup.events.keyboard.test.d.ts +1 -0
  83. package/dist/types/tests/events/DSPillGroup.events.test.d.ts +1 -0
  84. package/package.json +131 -0
@@ -0,0 +1,40 @@
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 DSPillDefinitions_exports = {};
30
+ __export(DSPillDefinitions_exports, {
31
+ DSPillButtonName: () => DSPillButtonName,
32
+ DSPillGroupName: () => DSPillGroupName,
33
+ DSPillName: () => DSPillName
34
+ });
35
+ module.exports = __toCommonJS(DSPillDefinitions_exports);
36
+ var React = __toESM(require("react"));
37
+ const DSPillName = "DSPill";
38
+ const DSPillButtonName = "DSPillButton";
39
+ const DSPillGroupName = "DSPillGroup";
40
+ //# sourceMappingURL=DSPillDefinitions.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSPillDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const DSPillName = 'DSPill';\n\nexport const DSPillButtonName = 'DSPillButton';\n\nexport const DSPillGroupName = 'DSPillGroup';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAEnB,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,59 @@
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 Pill_exports = {};
30
+ __export(Pill_exports, {
31
+ DSPillV2: () => DSPillV2,
32
+ DSPillV2WithSchema: () => DSPillV2WithSchema
33
+ });
34
+ module.exports = __toCommonJS(Pill_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_types = require("./types/index.js");
39
+ var import_DSPillDefinitions = require("../DSPillDefinitions.js");
40
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
41
+ const pillComponentGetter = {
42
+ dropdown: import_types.DropdownPill,
43
+ input: import_types.InputPill,
44
+ label: import_types.LabelPill,
45
+ readonly: import_types.ReadOnlyPill,
46
+ removable: import_types.RemovablePill,
47
+ value: import_types.ValuePill
48
+ };
49
+ const DSPillV2 = (props) => {
50
+ const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.DSPillV2DefaultProps);
51
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_react_desc_prop_types.DSPillV2PropTypesSchema, import_DSPillDefinitions.DSPillName);
52
+ const { type } = propsWithDefaults;
53
+ const PillComponent = pillComponentGetter[type];
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PillComponent, { ...propsWithDefaults });
55
+ };
56
+ DSPillV2.displayName = import_DSPillDefinitions.DSPillName;
57
+ const DSPillV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillV2).description("Pill");
58
+ DSPillV2WithSchema.propTypes = import_react_desc_prop_types.DSPillV2PropTypesSchema;
59
+ //# sourceMappingURL=Pill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/Pill.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { DropdownPill, LabelPill, ValuePill, InputPill, ReadOnlyPill, RemovablePill } from './types/index.js';\nimport { DSPillName } from '../DSPillDefinitions.js';\nimport { type DSPillT, DSPillV2DefaultProps, DSPillV2PropTypesSchema } from '../react-desc-prop-types.js';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillT.InternalProps>> = {\n dropdown: DropdownPill,\n input: InputPill,\n label: LabelPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSPillT.InternalProps>(props, DSPillV2DefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2PropTypesSchema, DSPillName);\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.displayName = DSPillName;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypesSchema;\n\nexport { DSPillV2, DSPillV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBd;AApBT,8BAAuF;AACvF,mBAA2F;AAC3F,+BAA2B;AAC3B,mCAA4E;AAE5E,MAAM,sBAAkF;AAAA,EACtF,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,WAA+C,CAAC,UAAU;AAC9D,QAAM,wBAAoB,sDAAoD,OAAO,iDAAoB;AACzG,8DAA+B,mBAAmB,sDAAyB,mCAAU;AACrF,QAAM,EAAE,KAAK,IAAI;AACjB,QAAM,gBAAgB,oBAAoB,IAAI;AAE9C,SAAO,4CAAC,iBAAe,GAAG,mBAAmB;AAC/C;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ,EAAE,YAAY,MAAM;AAChE,mBAAmB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,68 @@
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 PillButton_exports = {};
30
+ __export(PillButton_exports, {
31
+ DSPillButton: () => DSPillButton,
32
+ DSPillButtonWithSchema: () => DSPillButtonWithSchema
33
+ });
34
+ module.exports = __toCommonJS(PillButton_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_styled = require("./styled.js");
39
+ var import_DSPillDefinitions = require("../DSPillDefinitions.js");
40
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
41
+ const typeToClassName = {
42
+ only: "ds-pill-button-only",
43
+ left: "ds-pill-button-left",
44
+ right: "ds-pill-button-right"
45
+ };
46
+ const DSPillButton = (props) => {
47
+ const { children, ...restProps } = props;
48
+ const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(
49
+ restProps,
50
+ import_react_desc_prop_types.DSPillButtonDefaultProps
51
+ );
52
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_react_desc_prop_types.DSPillButtonPropTypesSchema, import_DSPillDefinitions.DSPillButtonName);
53
+ const { type, ...rest } = propsWithDefaults;
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ import_styled.StyledPillButton,
56
+ {
57
+ ...rest,
58
+ buttonType: "raw",
59
+ className: `${typeToClassName[type]} ${rest.className ?? ""}`,
60
+ type: "button",
61
+ children
62
+ }
63
+ );
64
+ };
65
+ DSPillButton.displayName = import_DSPillDefinitions.DSPillButtonName;
66
+ const DSPillButtonWithSchema = (0, import_ds_props_helpers.describe)(DSPillButton).description("Pill button");
67
+ DSPillButtonWithSchema.propTypes = import_react_desc_prop_types.DSPillButtonPropTypesSchema;
68
+ //# sourceMappingURL=PillButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/PillButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { StyledPillButton } from './styled.js';\nimport { DSPillButtonName } from '../DSPillDefinitions.js';\nimport { type DSPillT, DSPillButtonDefaultProps, DSPillButtonPropTypesSchema } from '../react-desc-prop-types.js';\n\nconst typeToClassName = {\n only: 'ds-pill-button-only',\n left: 'ds-pill-button-left',\n right: 'ds-pill-button-right',\n};\n\nconst DSPillButton: React.ComponentType<DSPillT.ButtonProps> = (props) => {\n const { children, ...restProps } = props;\n const propsWithDefaults = useMemoMergePropsWithDefault<DSPillT.InternalButtonProps>(\n restProps,\n DSPillButtonDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonPropTypesSchema, DSPillButtonName);\n const { type, ...rest } = propsWithDefaults;\n\n return (\n <StyledPillButton\n {...rest}\n buttonType=\"raw\"\n className={`${typeToClassName[type]} ${rest.className ?? ''}`}\n type=\"button\"\n >\n {children}\n </StyledPillButton>\n );\n};\n\nDSPillButton.displayName = DSPillButtonName;\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypesSchema;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBnB;AArBJ,8BAAuF;AACvF,oBAAiC;AACjC,+BAAiC;AACjC,mCAAoF;AAEpF,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,eAAyD,CAAC,UAAU;AACxE,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,QAAM,wBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,EACF;AACA,8DAA+B,mBAAmB,0DAA6B,yCAAgB;AAC/F,QAAM,EAAE,MAAM,GAAG,KAAK,IAAI;AAE1B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,YAAW;AAAA,MACX,WAAW,GAAG,gBAAgB,IAAI,KAAK,KAAK,aAAa;AAAA,MACzD,MAAK;AAAA,MAEJ;AAAA;AAAA,EACH;AAEJ;AAEA,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY,EAAE,YAAY,aAAa;AAC/E,uBAAuB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,97 @@
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
+ DSPillGroupV2: () => DSPillGroupV2,
32
+ DSPillGroupV2Context: () => DSPillGroupV2Context,
33
+ DSPillGroupV2WithSchema: () => DSPillGroupV2WithSchema
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_react = __toESM(require("react"));
39
+ var import_uid = require("uid");
40
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
41
+ var import_styled = require("./styled.js");
42
+ var import_DSPillDefinitions = require("../DSPillDefinitions.js");
43
+ var import_lodash = require("lodash");
44
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
45
+ const DSPillGroupV2Context = (0, import_react.createContext)({
46
+ onKeyboardRemove: () => null,
47
+ onKeyboardNavigation: () => null
48
+ });
49
+ const DSPillGroupV2 = (props) => {
50
+ const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.DSPillGroupDefaultProps);
51
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_react_desc_prop_types.DSPillGroupPropTypes, import_DSPillDefinitions.DSPillGroupName);
52
+ const globalAttrs = (0, import_lodash.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefaults), ["rows", "wrap"]);
53
+ const pillGroupUid = (0, import_react.useMemo)(() => `ds-pill-group-${(0, import_uid.uid)()}`, []);
54
+ const { children, width, innerRef } = propsWithDefaults;
55
+ const onKeyboardRemove = (0, import_react.useCallback)(
56
+ (pillUid) => {
57
+ const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
58
+ const pillIndex = elems.findIndex((elem) => elem.id === pillUid);
59
+ if (pillIndex > 0) {
60
+ elems[pillIndex - 1].focus();
61
+ } else if (pillIndex + 1 < elems.length) {
62
+ elems[pillIndex + 1].focus();
63
+ }
64
+ },
65
+ [pillGroupUid]
66
+ );
67
+ const onKeyboardNavigation = (0, import_react.useCallback)(
68
+ (pillUid, step, e) => {
69
+ const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
70
+ const pillIndex = elems.findIndex((elem) => elem.id === pillUid);
71
+ if (pillIndex >= 0) {
72
+ if (elems[pillIndex + step]) {
73
+ e.stopPropagation();
74
+ elems[pillIndex + step].focus();
75
+ }
76
+ }
77
+ },
78
+ [pillGroupUid]
79
+ );
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DSPillGroupV2Context.Provider, { value: { onKeyboardRemove, onKeyboardNavigation }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_styled.StyledPillGroup,
82
+ {
83
+ ...globalAttrs,
84
+ width,
85
+ id: pillGroupUid,
86
+ cols: import_react.default.Children.map(children, () => "auto"),
87
+ gutter: "2px",
88
+ ref: innerRef,
89
+ children
90
+ }
91
+ ) });
92
+ };
93
+ DSPillGroupV2.propTypes = import_react_desc_prop_types.DSPillGroupPropTypes;
94
+ DSPillGroupV2.displayName = import_DSPillDefinitions.DSPillGroupName;
95
+ const DSPillGroupV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillGroupV2);
96
+ DSPillGroupV2WithSchema.propTypes = import_react_desc_prop_types.DSPillGroupPropTypes;
97
+ //# sourceMappingURL=PillGroup.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/PillGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport { StyledPillGroup } from './styled.js';\nimport { DSPillGroupName } from '../DSPillDefinitions.js';\nimport { omit } from 'lodash';\nimport { DSPillGroupDefaultProps, type DSPillT, DSPillGroupPropTypes } from '../react-desc-prop-types.js';\n\nexport const DSPillGroupV2Context = createContext<{\n onKeyboardRemove: (pillUid: string) => void;\n onKeyboardNavigation: (pillUid: string, step: number, e: React.KeyboardEvent) => void;\n}>({\n onKeyboardRemove: () => null,\n onKeyboardNavigation: () => null,\n});\n\nconst DSPillGroupV2: React.ComponentType<DSPillT.GroupProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSPillT.InternalGroupProps>(props, DSPillGroupDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupPropTypes, DSPillGroupName);\n\n const globalAttrs = omit(useGetGlobalAttributes(propsWithDefaults), ['rows', 'wrap']);\n const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);\n const { children, width, innerRef } = propsWithDefaults;\n const onKeyboardRemove = useCallback(\n (pillUid: string) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex > 0) {\n elems[pillIndex - 1].focus();\n } else if (pillIndex + 1 < elems.length) {\n elems[pillIndex + 1].focus();\n }\n },\n [pillGroupUid],\n );\n const onKeyboardNavigation = useCallback(\n (pillUid: string, step: number, e: React.KeyboardEvent) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex >= 0) {\n if (elems[pillIndex + step]) {\n e.stopPropagation();\n elems[pillIndex + step].focus();\n }\n }\n },\n [pillGroupUid],\n );\n\n return (\n <DSPillGroupV2Context.Provider value={{ onKeyboardRemove, onKeyboardNavigation }}>\n <StyledPillGroup\n {...globalAttrs}\n width={width}\n id={pillGroupUid}\n cols={React.Children.map(children, () => 'auto') as string[]}\n gutter=\"2px\"\n ref={innerRef}\n >\n {children}\n </StyledPillGroup>\n </DSPillGroupV2Context.Provider>\n );\n};\n\nDSPillGroupV2.propTypes = DSPillGroupPropTypes as WeakValidationMap<unknown>;\nDSPillGroupV2.displayName = DSPillGroupName;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes as WeakValidationMap<unknown>;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6DjB;AA5DN,mBAA2D;AAC3D,iBAAoB;AACpB,8BAKO;AACP,oBAAgC;AAChC,+BAAgC;AAChC,oBAAqB;AACrB,mCAA4E;AAErE,MAAM,2BAAuB,4BAGjC;AAAA,EACD,kBAAkB,MAAM;AAAA,EACxB,sBAAsB,MAAM;AAC9B,CAAC;AAED,MAAM,gBAAyD,CAAC,UAAU;AACxE,QAAM,wBAAoB,sDAAyD,OAAO,oDAAuB;AACjH,8DAA+B,mBAAmB,mDAAsB,wCAAe;AAEvF,QAAM,kBAAc,wBAAK,gDAAuB,iBAAiB,GAAG,CAAC,QAAQ,MAAM,CAAC;AACpF,QAAM,mBAAe,sBAAQ,MAAM,qBAAiB,gBAAI,KAAK,CAAC,CAAC;AAC/D,QAAM,EAAE,UAAU,OAAO,SAAS,IAAI;AACtC,QAAM,uBAAmB;AAAA,IACvB,CAAC,YAAoB;AACnB,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,YAAY,GAAG;AACjB,cAAM,YAAY,CAAC,EAAE,MAAM;AAAA,MAC7B,WAAW,YAAY,IAAI,MAAM,QAAQ;AACvC,cAAM,YAAY,CAAC,EAAE,MAAM;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AACA,QAAM,2BAAuB;AAAA,IAC3B,CAAC,SAAiB,MAAc,MAA2B;AACzD,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,mCAAmC,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,aAAa,GAAG;AAClB,YAAI,MAAM,YAAY,IAAI,GAAG;AAC3B,YAAE,gBAAgB;AAClB,gBAAM,YAAY,IAAI,EAAE,MAAM;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AAEA,SACE,4CAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,kBAAkB,qBAAqB,GAC7E;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,IAAI;AAAA,MACJ,MAAM,aAAAA,QAAM,SAAS,IAAI,UAAU,MAAM,MAAM;AAAA,MAC/C,QAAO;AAAA,MACP,KAAK;AAAA,MAEJ;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,32 @@
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 __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
+ var components_exports = {};
27
+ module.exports = __toCommonJS(components_exports);
28
+ var React = __toESM(require("react"));
29
+ __reExport(components_exports, require("./Pill.js"), module.exports);
30
+ __reExport(components_exports, require("./PillGroup.js"), module.exports);
31
+ __reExport(components_exports, require("./PillButton.js"), module.exports);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './Pill.js';\nexport * from './PillGroup.js';\nexport * from './PillButton.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,sBAAd;AACA,+BAAc,2BADd;AAEA,+BAAc,4BAFd;",
6
+ "names": []
7
+ }
@@ -0,0 +1,246 @@
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 styled_exports = {};
30
+ __export(styled_exports, {
31
+ StyledDropdownPillWrapper: () => StyledDropdownPillWrapper,
32
+ StyledInputPillWrapper: () => StyledInputPillWrapper,
33
+ StyledLabelPillWrapper: () => StyledLabelPillWrapper,
34
+ StyledPillButton: () => StyledPillButton,
35
+ StyledPillGroup: () => StyledPillGroup,
36
+ StyledReadonlyPillWrapper: () => StyledReadonlyPillWrapper,
37
+ StyledRemovablePillWrapper: () => StyledRemovablePillWrapper,
38
+ StyledSpanWithTooltip: () => StyledSpanWithTooltip,
39
+ StyledValuePillWrapper: () => StyledValuePillWrapper
40
+ });
41
+ module.exports = __toCommonJS(styled_exports);
42
+ var React = __toESM(require("react"));
43
+ var import_ds_system = require("@elliemae/ds-system");
44
+ var import_ds_grid = require("@elliemae/ds-grid");
45
+ var import_ds_button_v2 = require("@elliemae/ds-button-v2");
46
+ const borderOutside = ({
47
+ color,
48
+ size = 1,
49
+ zIndex = 0,
50
+ borderRadius = "12px"
51
+ }) => import_ds_system.css`
52
+ :after {
53
+ content: ' ';
54
+ position: absolute;
55
+ top: 0px;
56
+ left: 0px;
57
+ right: 0px;
58
+ bottom: 0px;
59
+ border: ${size}px solid ${({ disabled, theme }) => disabled ? theme.colors.neutral[400] : color};
60
+ border-top-left-radius: ${borderRadius};
61
+ border-top-right-radius: ${borderRadius};
62
+ border-bottom-left-radius: ${borderRadius};
63
+ border-bottom-right-radius: ${borderRadius};
64
+ pointer-events: none;
65
+ z-index: ${zIndex ? zIndex : ""};
66
+ }
67
+ `;
68
+ const commonPillWrapperCss = import_ds_system.css`
69
+ height: ${(props) => props?.pillSize === "m" ? "24px" : "18px"};
70
+
71
+ position: relative;
72
+
73
+ width: fit-content;
74
+
75
+ background-color: ${({ theme, disabled }) => disabled ? theme.colors.neutral["080"] : theme.colors.brand[200]};
76
+
77
+ outline: none;
78
+
79
+ white-space: nowrap;
80
+
81
+ padding: 0px 12px 0 12px;
82
+ border-radius: 12px;
83
+
84
+ font-size: 13px;
85
+ line-height: 1;
86
+ user-select: ${({ disabled }) => disabled ? "none" : "auto"};
87
+ cursor: ${({ disabled }) => disabled ? "not-allowed" : "default"};
88
+ color: ${({ theme, disabled }) => disabled ? theme.colors.neutral["400"] : theme.colors.brand["800"]};
89
+ ${(props) => borderOutside({ color: props.theme.colors.brand[300] })};
90
+ `;
91
+ const StyledLabelPillWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
92
+ ${commonPillWrapperCss}
93
+
94
+ font-weight: ${(props) => props.theme.fontWeights.semibold};
95
+ padding-left: ${(props) => props.hasIcon ? "0px !important" : "12px"};
96
+ `;
97
+ const StyledValuePillWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
98
+ ${commonPillWrapperCss}
99
+
100
+ font-weight: ${(props) => props.theme.fontWeights.regular};
101
+ padding-left: ${(props) => props.hasIcon ? "0px !important" : "12px"};
102
+ `;
103
+ const StyledInputPillWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
104
+ ${commonPillWrapperCss}
105
+
106
+ background: ${(props) => props.theme.colors.neutral["000"]};
107
+ padding: 0;
108
+
109
+ ${({ theme, hasError }) => {
110
+ if (hasError)
111
+ return borderOutside({ color: theme.colors.danger[900] });
112
+ return borderOutside({ color: theme.colors.brand[500] });
113
+ }}
114
+
115
+ :focus-within {
116
+ ${(props) => props.inputHasFocus ? borderOutside({ color: props.theme.colors.brand[700], size: 2 }) : ""}
117
+ }
118
+
119
+ :active {
120
+ ${(props) => props.inputHasFocus ? borderOutside({ color: props.theme.colors.brand[500] }) : ""}
121
+ }
122
+
123
+ & .em-ds-input {
124
+ outline: none !important;
125
+ border: none !important;
126
+ box-shadow: none !important;
127
+ border-radius: 0 !important;
128
+ height: 100%;
129
+ background: transparent;
130
+ width: ${(props) => `${props.inputWidth + (props.value === "" ? 24 : 0)}px`};
131
+ padding: 0;
132
+ margin: 0 0 0 8px;
133
+ }
134
+
135
+ & .em-ds-input__tooltip-ref {
136
+ height: 100%;
137
+ }
138
+ `;
139
+ const StyledDropdownPillWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
140
+ ${commonPillWrapperCss}
141
+ font-weight: ${(props) => props.theme.fontWeights.semibold};
142
+
143
+ padding: 0 0 0 12px;
144
+ `;
145
+ const StyledReadonlyPillWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
146
+ ${commonPillWrapperCss}
147
+ font-weight: ${(props) => props.theme.fontWeights.semibold};
148
+ padding-right: ${(props) => props.hasIconRight ? "0 !important" : "12px"};
149
+ padding-left: ${(props) => props.hasIconLeft ? "0 !important" : "12px"};
150
+ `;
151
+ const StyledRemovablePillWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
152
+ ${commonPillWrapperCss}
153
+ font-weight: ${(props) => props.theme.fontWeights.regular};
154
+ padding: 0 0 0 12px;
155
+ `;
156
+ const StyledPillGroup = (0, import_ds_system.styled)(import_ds_grid.Grid)`
157
+ width: ${({ width }) => width};
158
+
159
+ // Pill edges
160
+ & .ds-pill-wrapper {
161
+ &:not(:first-of-type) {
162
+ &,
163
+ :after,
164
+ :before,
165
+ .ds-pill-tooltip-value:after {
166
+ border-top-left-radius: 0px;
167
+ border-bottom-left-radius: 0px;
168
+ }
169
+ }
170
+ &:not(:last-of-type) {
171
+ &,
172
+ :after,
173
+ :before,
174
+ .ds-pill-tooltip-value:after {
175
+ border-top-right-radius: 0px;
176
+ border-bottom-right-radius: 0px;
177
+ }
178
+ }
179
+ }
180
+
181
+ // Pill paddings to the left / right
182
+ & .ds-pill-wrapper-label,
183
+ & .ds-pill-wrapper-value,
184
+ & .ds-pill-wrapper-readonly {
185
+ &:not(:first-of-type) {
186
+ padding-left: 8px;
187
+ }
188
+ &:not(:last-of-type) {
189
+ padding-right: 8px;
190
+ }
191
+ }
192
+
193
+ & .ds-pill-wrapper-removable:not(:first-of-type) {
194
+ padding-left: 8px;
195
+ }
196
+
197
+ & .ds-pill-wrapper-dropdown:not(:first-of-type) {
198
+ padding-left: 8px;
199
+ }
200
+
201
+ & .ds-pill-wrapper {
202
+ :not(:first-of-type) {
203
+ .ds-pill-button-left {
204
+ border-radius: 0px;
205
+ }
206
+ .ds-pill-button-only {
207
+ border-top-left-radius: 0px;
208
+ border-bottom-left-radius: 0px;
209
+ }
210
+ }
211
+ :not(:last-of-type) {
212
+ .ds-pill-button-right {
213
+ border-radius: 0px;
214
+ }
215
+ .ds-pill-button-only {
216
+ border-top-right-radius: 0px;
217
+ border-bottom-right-radius: 0px;
218
+ }
219
+ }
220
+ }
221
+ `;
222
+ const StyledSpanWithTooltip = import_ds_system.styled.span`
223
+ outline: none;
224
+ :focus {
225
+ ${(props) => borderOutside({ color: props.theme.colors.brand[700], size: 2, zIndex: 3 })}
226
+ }
227
+ `;
228
+ const StyledPillButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV2)`
229
+ display: grid;
230
+ place-items: center;
231
+
232
+ position: relative;
233
+
234
+ padding: 0;
235
+ width: ${(props) => props.width};
236
+ height: ${(props) => props.height};
237
+
238
+ border-radius: 12px;
239
+
240
+ :focus {
241
+ ${(props) => borderOutside({ color: props.theme.colors.brand[700], size: 2, zIndex: 1, borderRadius: "inherit" })}
242
+ }
243
+
244
+ cursor: pointer;
245
+ `;
246
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { css, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\n\ninterface InputPillWrapperProps {\n value: string;\n inputWidth: number;\n inputHasFocus: boolean;\n hasError: boolean;\n pillSize: 'm' | 's';\n disabled?: boolean;\n}\n\n// =============================================================================\n// Common CSS\n// =============================================================================\n\nconst borderOutside = ({\n color,\n size = 1,\n zIndex = 0,\n borderRadius = '12px',\n}: {\n color: string;\n size?: number;\n zIndex?: number;\n borderRadius?: string;\n}) => css<{ disabled?: boolean }>`\n :after {\n content: ' ';\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n border: ${size}px solid ${({ disabled, theme }) => (disabled ? theme.colors.neutral[400] : color)};\n border-top-left-radius: ${borderRadius};\n border-top-right-radius: ${borderRadius};\n border-bottom-left-radius: ${borderRadius};\n border-bottom-right-radius: ${borderRadius};\n pointer-events: none;\n z-index: ${zIndex ? zIndex : ''};\n }\n`;\n\nconst commonPillWrapperCss = css<{ pillSize: 'm' | 's'; disabled?: boolean }>`\n height: ${(props) => (props?.pillSize === 'm' ? '24px' : '18px')};\n\n position: relative;\n\n width: fit-content;\n\n background-color: ${({ theme, disabled }) => (disabled ? theme.colors.neutral['080'] : theme.colors.brand[200])};\n\n outline: none;\n\n white-space: nowrap;\n\n padding: 0px 12px 0 12px;\n border-radius: 12px;\n\n font-size: 13px;\n line-height: 1;\n user-select: ${({ disabled }) => (disabled ? 'none' : 'auto')};\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'default')};\n color: ${({ theme, disabled }) => (disabled ? theme.colors.neutral['400'] : theme.colors.brand['800'])};\n ${(props) => borderOutside({ color: props.theme.colors.brand[300] })};\n`;\n\n// =============================================================================\n// Pills wrappers\n// =============================================================================\n\nexport const StyledLabelPillWrapper = styled(Grid)<{ pillSize: 'm' | 's'; hasIcon: boolean }>`\n ${commonPillWrapperCss}\n\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n padding-left: ${(props) => (props.hasIcon ? '0px !important' : '12px')};\n`;\n\nexport const StyledValuePillWrapper = styled(Grid)<{ pillSize: 'm' | 's'; hasIcon: boolean }>`\n ${commonPillWrapperCss}\n\n font-weight: ${(props) => props.theme.fontWeights.regular};\n padding-left: ${(props) => (props.hasIcon ? '0px !important' : '12px')};\n`;\n\nexport const StyledInputPillWrapper = styled(Grid)<InputPillWrapperProps>`\n ${commonPillWrapperCss}\n\n background: ${(props) => props.theme.colors.neutral['000']};\n padding: 0;\n\n ${({ theme, hasError }) => {\n if (hasError) return borderOutside({ color: theme.colors.danger[900] });\n return borderOutside({ color: theme.colors.brand[500] });\n }}\n\n :focus-within {\n ${(props) => (props.inputHasFocus ? borderOutside({ color: props.theme.colors.brand[700], size: 2 }) : '')}\n }\n\n :active {\n ${(props) => (props.inputHasFocus ? borderOutside({ color: props.theme.colors.brand[500] }) : '')}\n }\n\n & .em-ds-input {\n outline: none !important;\n border: none !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n height: 100%;\n background: transparent;\n width: ${(props) => `${props.inputWidth + (props.value === '' ? 24 : 0)}px`};\n padding: 0;\n margin: 0 0 0 8px;\n }\n\n & .em-ds-input__tooltip-ref {\n height: 100%;\n }\n`;\n\nexport const StyledDropdownPillWrapper = styled(Grid)<{ pillSize: 'm' | 's' }>`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n\n padding: 0 0 0 12px;\n`;\n\nexport const StyledReadonlyPillWrapper = styled(Grid)<{\n pillSize: 'm' | 's';\n hasIconRight: boolean;\n hasIconLeft: boolean;\n disabled?: boolean;\n}>`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n padding-right: ${(props) => (props.hasIconRight ? '0 !important' : '12px')};\n padding-left: ${(props) => (props.hasIconLeft ? '0 !important' : '12px')};\n`;\n\nexport const StyledRemovablePillWrapper = styled(Grid)<{ pillSize: 'm' | 's' }>`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n padding: 0 0 0 12px;\n`;\n\n// =============================================================================\n// Pill group\n// =============================================================================\n\nexport const StyledPillGroup = styled(Grid)`\n width: ${({ width }) => width};\n\n // Pill edges\n & .ds-pill-wrapper {\n &:not(:first-of-type) {\n &,\n :after,\n :before,\n .ds-pill-tooltip-value:after {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n &:not(:last-of-type) {\n &,\n :after,\n :before,\n .ds-pill-tooltip-value:after {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n }\n\n // Pill paddings to the left / right\n & .ds-pill-wrapper-label,\n & .ds-pill-wrapper-value,\n & .ds-pill-wrapper-readonly {\n &:not(:first-of-type) {\n padding-left: 8px;\n }\n &:not(:last-of-type) {\n padding-right: 8px;\n }\n }\n\n & .ds-pill-wrapper-removable:not(:first-of-type) {\n padding-left: 8px;\n }\n\n & .ds-pill-wrapper-dropdown:not(:first-of-type) {\n padding-left: 8px;\n }\n\n & .ds-pill-wrapper {\n :not(:first-of-type) {\n .ds-pill-button-left {\n border-radius: 0px;\n }\n .ds-pill-button-only {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n :not(:last-of-type) {\n .ds-pill-button-right {\n border-radius: 0px;\n }\n .ds-pill-button-only {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n }\n`;\n\n// =============================================================================\n// Extra stuff\n// =============================================================================\n\nexport const StyledSpanWithTooltip = styled.span`\n outline: none;\n :focus {\n ${(props) => borderOutside({ color: props.theme.colors.brand[700], size: 2, zIndex: 3 })}\n }\n`;\n\nexport const StyledPillButton = styled(DSButtonV2)<{ width: string; height: string }>`\n display: grid;\n place-items: center;\n\n position: relative;\n\n padding: 0;\n width: ${(props) => props.width};\n height: ${(props) => props.height};\n\n border-radius: 12px;\n\n :focus {\n ${(props) => borderOutside({ color: props.theme.colors.brand[700], size: 2, zIndex: 1, borderRadius: 'inherit' })}\n }\n\n cursor: pointer;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA4B;AAC5B,qBAAqB;AACrB,0BAA2B;AAe3B,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,eAAe;AACjB,MAKM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQQ,gBAAgB,CAAC,EAAE,UAAU,MAAM,MAAO,WAAW,MAAM,OAAO,QAAQ,GAAG,IAAI;AAAA,8BACjE;AAAA,+BACC;AAAA,iCACE;AAAA,kCACC;AAAA;AAAA,eAEnB,SAAS,SAAS;AAAA;AAAA;AAIjC,MAAM,uBAAuB;AAAA,YACjB,CAAC,UAAW,OAAO,aAAa,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMrC,CAAC,EAAE,OAAO,SAAS,MAAO,WAAW,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAW9F,CAAC,EAAE,SAAS,MAAO,WAAW,SAAS;AAAA,YAC5C,CAAC,EAAE,SAAS,MAAO,WAAW,gBAAgB;AAAA,WAC/C,CAAC,EAAE,OAAO,SAAS,MAAO,WAAW,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,OAAO,MAAM,KAAK;AAAA,IAClG,CAAC,UAAU,cAAc,EAAE,OAAO,MAAM,MAAM,OAAO,MAAM,GAAG,EAAE,CAAC;AAAA;AAO9D,MAAM,6BAAyB,yBAAO,mBAAI;AAAA,IAC7C;AAAA;AAAA,iBAEa,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,kBAClC,CAAC,UAAW,MAAM,UAAU,mBAAmB;AAAA;AAG1D,MAAM,6BAAyB,yBAAO,mBAAI;AAAA,IAC7C;AAAA;AAAA,iBAEa,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,kBAClC,CAAC,UAAW,MAAM,UAAU,mBAAmB;AAAA;AAG1D,MAAM,6BAAyB,yBAAO,mBAAI;AAAA,IAC7C;AAAA;AAAA,gBAEY,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA,IAGvD,CAAC,EAAE,OAAO,SAAS,MAAM;AACzB,MAAI;AAAU,WAAO,cAAc,EAAE,OAAO,MAAM,OAAO,OAAO,GAAG,EAAE,CAAC;AACtE,SAAO,cAAc,EAAE,OAAO,MAAM,OAAO,MAAM,GAAG,EAAE,CAAC;AACzD;AAAA;AAAA;AAAA,MAGI,CAAC,UAAW,MAAM,gBAAgB,cAAc,EAAE,OAAO,MAAM,MAAM,OAAO,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,IAAI;AAAA;AAAA;AAAA;AAAA,MAIrG,CAAC,UAAW,MAAM,gBAAgB,cAAc,EAAE,OAAO,MAAM,MAAM,OAAO,MAAM,GAAG,EAAE,CAAC,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAUrF,CAAC,UAAU,GAAG,MAAM,cAAc,MAAM,UAAU,KAAK,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUlE,MAAM,gCAA4B,yBAAO,mBAAI;AAAA,IAChD;AAAA,iBACa,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAK7C,MAAM,gCAA4B,yBAAO,mBAAI;AAAA,IAMhD;AAAA,iBACa,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,mBACjC,CAAC,UAAW,MAAM,eAAe,iBAAiB;AAAA,kBACnD,CAAC,UAAW,MAAM,cAAc,iBAAiB;AAAA;AAG5D,MAAM,iCAA6B,yBAAO,mBAAI;AAAA,IACjD;AAAA,iBACa,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA;AAQ7C,MAAM,sBAAkB,yBAAO,mBAAI;AAAA,WAC/B,CAAC,EAAE,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsEnB,MAAM,wBAAwB,wBAAO;AAAA;AAAA;AAAA,MAGtC,CAAC,UAAU,cAAc,EAAE,OAAO,MAAM,MAAM,OAAO,MAAM,GAAG,GAAG,MAAM,GAAG,QAAQ,EAAE,CAAC;AAAA;AAAA;AAIpF,MAAM,uBAAmB,yBAAO,8BAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAOtC,CAAC,UAAU,MAAM;AAAA,YAChB,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,MAKvB,CAAC,UAAU,cAAc,EAAE,OAAO,MAAM,MAAM,OAAO,MAAM,GAAG,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }