@elliemae/ds-shuttle-v2 3.20.2 → 3.20.4

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type {} from 'react-virtual';\nexport { DSShuttleV2Name, DSShuttleV2Slots, DSShuttleV2DataTestIds } from './config/DSShuttleV2Definitions.js';\nexport { DSShuttleV2, DSShuttleV2WithSchema } from './DSShuttleV2.js';\nexport { ShuttleItem, type ShuttleItemProps } from './exported-related/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oCAA0E;AAC1E,yBAAmD;AACnD,8BAAmD;",
4
+ "sourcesContent": ["export { DSShuttleV2Name, DSShuttleV2Slots, DSShuttleV2DataTestIds } from './config/DSShuttleV2Definitions.js';\nexport { DSShuttleV2, DSShuttleV2WithSchema } from './DSShuttleV2.js';\nexport { ShuttleItem, type ShuttleItemProps } from './exported-related/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oCAA0E;AAC1E,yBAAmD;AACnD,8BAAmD;",
6
6
  "names": []
7
7
  }
@@ -36,29 +36,29 @@ var React = __toESM(require("react"));
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_ds_system = require("@elliemae/ds-system");
38
38
  var DropIndicatorPosition = /* @__PURE__ */ ((DropIndicatorPosition2) => {
39
- DropIndicatorPosition2[DropIndicatorPosition2["None"] = 0] = "None";
40
- DropIndicatorPosition2[DropIndicatorPosition2["Before"] = 1] = "Before";
41
- DropIndicatorPosition2[DropIndicatorPosition2["After"] = 2] = "After";
39
+ DropIndicatorPosition2["None"] = "none";
40
+ DropIndicatorPosition2["Before"] = "before";
41
+ DropIndicatorPosition2["After"] = "after";
42
42
  return DropIndicatorPosition2;
43
43
  })(DropIndicatorPosition || {});
44
44
  const getPositionStyles = ({ dropIndicatorPosition, vertical }) => {
45
45
  if (vertical) {
46
46
  return `
47
- left: ${dropIndicatorPosition === 1 /* Before */ ? "0" : "unset"};
48
- right: ${dropIndicatorPosition === 2 /* After */ ? "0" : "unset"};
47
+ left: ${dropIndicatorPosition === "before" /* Before */ ? "0" : "unset"};
48
+ right: ${dropIndicatorPosition === "after" /* After */ ? "0" : "unset"};
49
49
  `;
50
50
  }
51
51
  return `
52
- top: ${dropIndicatorPosition === 1 /* Before */ ? "0" : "unset"};
53
- bottom: ${dropIndicatorPosition === 2 /* After */ ? "0" : "unset"};
52
+ top: ${dropIndicatorPosition === "before" /* Before */ ? "0" : "unset"};
53
+ bottom: ${dropIndicatorPosition === "after" /* After */ ? "0" : "unset"};
54
54
  `;
55
55
  };
56
56
  const getCircleStyles = ({ dropIndicatorPosition, vertical }) => ({
57
57
  position: "absolute",
58
- top: vertical || dropIndicatorPosition === 2 /* After */ ? "unset" : "-2px",
59
- bottom: vertical || dropIndicatorPosition === 1 /* Before */ ? "unset" : "-2px",
60
- left: !vertical || dropIndicatorPosition === 2 /* After */ ? "unset" : "-2px",
61
- right: !vertical || dropIndicatorPosition === 1 /* Before */ ? "unset" : "-2px",
58
+ top: vertical || dropIndicatorPosition === "after" /* After */ ? "unset" : "-2px",
59
+ bottom: vertical || dropIndicatorPosition === "before" /* Before */ ? "unset" : "-2px",
60
+ left: !vertical || dropIndicatorPosition === "after" /* After */ ? "unset" : "-2px",
61
+ right: !vertical || dropIndicatorPosition === "before" /* Before */ ? "unset" : "-2px",
62
62
  opacity: 1
63
63
  });
64
64
  const StyledIndicator = import_ds_system.styled.div`
@@ -72,10 +72,10 @@ const StyledIndicator = import_ds_system.styled.div`
72
72
  const CircleIndicator = (style, isDropValid) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { height: "6", width: "6", style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "3", cy: "3", r: "3", strokeWidth: "0", fill: isDropValid ? "#1E79C2" : "#C64252" }) });
73
73
  const DropIndicator = (props) => {
74
74
  const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;
75
- if (dropIndicatorPosition === false || ![2 /* After */, 1 /* Before */].includes(dropIndicatorPosition)) {
75
+ if (dropIndicatorPosition === false || !["after" /* After */, "before" /* Before */].includes(dropIndicatorPosition)) {
76
76
  return null;
77
77
  }
78
- const safeDropIndicatorPosition = isLast ? 1 /* Before */ : dropIndicatorPosition;
78
+ const safeDropIndicatorPosition = isLast ? "before" /* Before */ : dropIndicatorPosition;
79
79
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
80
80
  CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid),
81
81
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Dnd/DropIndicator.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nenum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n}\n\ninterface DropIndicatorProps {\n vertical: boolean;\n dropIndicatorPosition: false | DropIndicatorPosition;\n isDropValid: boolean;\n isLast?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => {\n if (vertical) {\n return `\n left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n right: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n }\n return `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n};\n\nconst getCircleStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => ({\n position: 'absolute',\n top: vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: !vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n right: !vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = (props) => {\n const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;\n if (\n dropIndicatorPosition === false ||\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(dropIndicatorPosition)\n ) {\n return null;\n }\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n return (\n <>\n {CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator\n vertical={vertical}\n dropIndicatorPosition={safeDropIndicatorPosition}\n isDropValid={isDropValid}\n />\n </>\n );\n};\n\nexport { DropIndicator };\nexport default DropIndicator;\n", "import * as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GAAE,KAAI,aAAY,KAAI,MAAM,cAAc,YAAY,WAAW,GACzF;AAGF,MAAM,gBAAyD,CAAC,UAAU;AACxE,QAAM,EAAE,UAAU,uBAAuB,QAAQ,YAAY,IAAI;AACjE,MACE,0BAA0B,SAC1B,CAAC,CAAC,eAA6B,cAA4B,EAAE,SAAS,qBAAqB,GAC3F;AACA,WAAO;AAAA,EACT;AAEA,QAAM,4BAA4B,SAAS,iBAA+B;AAC1E,SACE,4EACG;AAAA,oBAAgB,gBAAgB,EAAE,GAAG,OAAO,uBAAuB,0BAA0B,CAAC,GAAG,WAAW;AAAA,IAC7G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,uBAAuB;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nenum DropIndicatorPosition {\n None = 'none',\n Before = 'before',\n After = 'after',\n}\n\ninterface DropIndicatorProps {\n vertical: boolean;\n dropIndicatorPosition: false | DropIndicatorPosition;\n isDropValid: boolean;\n isLast?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => {\n if (vertical) {\n return `\n left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n right: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n }\n return `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n};\n\nconst getCircleStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => ({\n position: 'absolute',\n top: vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: !vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n right: !vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = (props) => {\n const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;\n if (\n dropIndicatorPosition === false ||\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(dropIndicatorPosition)\n ) {\n return null;\n }\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n return (\n <>\n {CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator\n vertical={vertical}\n dropIndicatorPosition={safeDropIndicatorPosition}\n isDropValid={isDropValid}\n />\n </>\n );\n};\n\nexport { DropIndicator };\nexport default DropIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiDnB;AAhDJ,uBAAuB;AAEvB,IAAK,wBAAL,kBAAKA,2BAAL;AACE,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,YAAS;AACT,EAAAA,uBAAA,WAAQ;AAHL,SAAAA;AAAA,GAAA;AAaL,MAAM,oBAAoB,CAAC,EAAE,uBAAuB,SAAS,MAA0B;AACrF,MAAI,UAAU;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W;AAAA,IAC7G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,uBAAuB;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,wBAAQ;",
6
6
  "names": ["DropIndicatorPosition"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from 'react-virtual';\nexport { DSShuttleV2Name, DSShuttleV2Slots, DSShuttleV2DataTestIds } from './config/DSShuttleV2Definitions.js';\nexport { DSShuttleV2, DSShuttleV2WithSchema } from './DSShuttleV2.js';\nexport { ShuttleItem, type ShuttleItemProps } from './exported-related/index.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB,kBAAkB,8BAA8B;AAC1E,SAAS,aAAa,6BAA6B;AACnD,SAAS,mBAA0C;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSShuttleV2Name, DSShuttleV2Slots, DSShuttleV2DataTestIds } from './config/DSShuttleV2Definitions.js';\nexport { DSShuttleV2, DSShuttleV2WithSchema } from './DSShuttleV2.js';\nexport { ShuttleItem, type ShuttleItemProps } from './exported-related/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB,kBAAkB,8BAA8B;AAC1E,SAAS,aAAa,6BAA6B;AACnD,SAAS,mBAA0C;",
6
6
  "names": []
7
7
  }
@@ -2,29 +2,29 @@ import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { styled } from "@elliemae/ds-system";
4
4
  var DropIndicatorPosition = /* @__PURE__ */ ((DropIndicatorPosition2) => {
5
- DropIndicatorPosition2[DropIndicatorPosition2["None"] = 0] = "None";
6
- DropIndicatorPosition2[DropIndicatorPosition2["Before"] = 1] = "Before";
7
- DropIndicatorPosition2[DropIndicatorPosition2["After"] = 2] = "After";
5
+ DropIndicatorPosition2["None"] = "none";
6
+ DropIndicatorPosition2["Before"] = "before";
7
+ DropIndicatorPosition2["After"] = "after";
8
8
  return DropIndicatorPosition2;
9
9
  })(DropIndicatorPosition || {});
10
10
  const getPositionStyles = ({ dropIndicatorPosition, vertical }) => {
11
11
  if (vertical) {
12
12
  return `
13
- left: ${dropIndicatorPosition === 1 /* Before */ ? "0" : "unset"};
14
- right: ${dropIndicatorPosition === 2 /* After */ ? "0" : "unset"};
13
+ left: ${dropIndicatorPosition === "before" /* Before */ ? "0" : "unset"};
14
+ right: ${dropIndicatorPosition === "after" /* After */ ? "0" : "unset"};
15
15
  `;
16
16
  }
17
17
  return `
18
- top: ${dropIndicatorPosition === 1 /* Before */ ? "0" : "unset"};
19
- bottom: ${dropIndicatorPosition === 2 /* After */ ? "0" : "unset"};
18
+ top: ${dropIndicatorPosition === "before" /* Before */ ? "0" : "unset"};
19
+ bottom: ${dropIndicatorPosition === "after" /* After */ ? "0" : "unset"};
20
20
  `;
21
21
  };
22
22
  const getCircleStyles = ({ dropIndicatorPosition, vertical }) => ({
23
23
  position: "absolute",
24
- top: vertical || dropIndicatorPosition === 2 /* After */ ? "unset" : "-2px",
25
- bottom: vertical || dropIndicatorPosition === 1 /* Before */ ? "unset" : "-2px",
26
- left: !vertical || dropIndicatorPosition === 2 /* After */ ? "unset" : "-2px",
27
- right: !vertical || dropIndicatorPosition === 1 /* Before */ ? "unset" : "-2px",
24
+ top: vertical || dropIndicatorPosition === "after" /* After */ ? "unset" : "-2px",
25
+ bottom: vertical || dropIndicatorPosition === "before" /* Before */ ? "unset" : "-2px",
26
+ left: !vertical || dropIndicatorPosition === "after" /* After */ ? "unset" : "-2px",
27
+ right: !vertical || dropIndicatorPosition === "before" /* Before */ ? "unset" : "-2px",
28
28
  opacity: 1
29
29
  });
30
30
  const StyledIndicator = styled.div`
@@ -38,10 +38,10 @@ const StyledIndicator = styled.div`
38
38
  const CircleIndicator = (style, isDropValid) => /* @__PURE__ */ jsx("svg", { height: "6", width: "6", style, children: /* @__PURE__ */ jsx("circle", { cx: "3", cy: "3", r: "3", strokeWidth: "0", fill: isDropValid ? "#1E79C2" : "#C64252" }) });
39
39
  const DropIndicator = (props) => {
40
40
  const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;
41
- if (dropIndicatorPosition === false || ![2 /* After */, 1 /* Before */].includes(dropIndicatorPosition)) {
41
+ if (dropIndicatorPosition === false || !["after" /* After */, "before" /* Before */].includes(dropIndicatorPosition)) {
42
42
  return null;
43
43
  }
44
- const safeDropIndicatorPosition = isLast ? 1 /* Before */ : dropIndicatorPosition;
44
+ const safeDropIndicatorPosition = isLast ? "before" /* Before */ : dropIndicatorPosition;
45
45
  return /* @__PURE__ */ jsxs(Fragment, { children: [
46
46
  CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid),
47
47
  /* @__PURE__ */ jsx(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Dnd/DropIndicator.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nenum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n}\n\ninterface DropIndicatorProps {\n vertical: boolean;\n dropIndicatorPosition: false | DropIndicatorPosition;\n isDropValid: boolean;\n isLast?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => {\n if (vertical) {\n return `\n left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n right: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n }\n return `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n};\n\nconst getCircleStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => ({\n position: 'absolute',\n top: vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: !vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n right: !vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = (props) => {\n const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;\n if (\n dropIndicatorPosition === false ||\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(dropIndicatorPosition)\n ) {\n return null;\n }\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n return (\n <>\n {CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator\n vertical={vertical}\n dropIndicatorPosition={safeDropIndicatorPosition}\n isDropValid={isDropValid}\n />\n </>\n );\n};\n\nexport { DropIndicator };\nexport default DropIndicator;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiDnB,SAeA,UAfA,KAeA,YAfA;AAhDJ,SAAS,cAAc;AAEvB,IAAK,wBAAL,kBAAKA,2BAAL;AACE,EA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AA4B,EAAE,SAAS,qBAAqB,GAC3F;AACA,WAAO;AAAA,EACT;AAEA,QAAM,4BAA4B,SAAS,iBAA+B;AAC1E,SACE,iCACG;AAAA,oBAAgB,gBAAgB,EAAE,GAAG,OAAO,uBAAuB,0BAA0B,CAAC,GAAG,WAAW;AAAA,IAC7G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,uBAAuB;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nenum DropIndicatorPosition {\n None = 'none',\n Before = 'before',\n After = 'after',\n}\n\ninterface DropIndicatorProps {\n vertical: boolean;\n dropIndicatorPosition: false | DropIndicatorPosition;\n isDropValid: boolean;\n isLast?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => {\n if (vertical) {\n return `\n left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n right: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n }\n return `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n};\n\nconst getCircleStyles = ({ dropIndicatorPosition, vertical }: DropIndicatorProps) => ({\n position: 'absolute',\n top: vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: !vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n right: !vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = (props) => {\n const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;\n if (\n dropIndicatorPosition === false ||\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(dropIndicatorPosition)\n ) {\n return null;\n }\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n return (\n <>\n {CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator\n vertical={vertical}\n dropIndicatorPosition={safeDropIndicatorPosition}\n isDropValid={isDropValid}\n />\n </>\n );\n};\n\nexport { DropIndicator };\nexport default DropIndicator;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACiDnB,SAeA,UAfA,KAeA,YAfA;AAhDJ,SAAS,cAAc;AAEvB,IAAK,wBAAL,kBAAKA,2BAAL;AACE,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,YAAS;AACT,EAAAA,uBAAA,WAAQ;AAHL,SAAAA;AAAA,GAAA;AAaL,MAAM,oBAAoB,CAAC,EAAE,uBAAuB,SAAS,MAA0B;AACrF,MAAI,UAAU;AACZ,WAAO;AAAA,cACG,0BAA0B,wBAA+B,MAAM;AAAA,eAC9D,0BAA0B,sBAA8B,MAAM;AAAA;AAAA,EAE3E;AACA,SAAO;AAAA,aACI,0BAA0B,wBAA+B,MAAM;AAAA,gBAC5D,0BAA0B,sBAA8B,MAAM;AAAA;AAE9E;AAEA,MAAM,kBAAkB,CAAC,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Position {
3
- None = 0,
4
- Before = 1,
5
- After = 2
3
+ None = "none",
4
+ Before = "before",
5
+ After = "after"
6
6
  }
7
7
  interface DropIndicatorProps {
8
8
  vertical: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-shuttle-v2",
3
- "version": "3.20.2",
3
+ "version": "3.20.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Shuttle v2",
6
6
  "files": [
@@ -37,22 +37,22 @@
37
37
  "dependencies": {
38
38
  "fast-deep-equal": "~3.1.3",
39
39
  "uid": "~2.0.1",
40
- "@elliemae/ds-button-v2": "3.20.2",
41
- "@elliemae/ds-circular-progress-indicator": "3.20.2",
42
- "@elliemae/ds-drag-and-drop": "3.20.2",
43
- "@elliemae/ds-fast-list": "3.20.2",
44
- "@elliemae/ds-form-checkbox": "3.20.2",
45
- "@elliemae/ds-form-input-text": "3.20.2",
46
- "@elliemae/ds-grid": "3.20.2",
47
- "@elliemae/ds-hooks-fontsize-detector": "3.20.2",
48
- "@elliemae/ds-icons": "3.20.2",
49
- "@elliemae/ds-indeterminate-progress-indicator": "3.20.2",
50
- "@elliemae/ds-popperjs": "3.20.2",
51
- "@elliemae/ds-props-helpers": "3.20.2",
52
- "@elliemae/ds-system": "3.20.2",
53
- "@elliemae/ds-typography": "3.20.2",
54
- "@elliemae/ds-zustand-helpers": "3.20.2",
55
- "@elliemae/ds-utilities": "3.20.2"
40
+ "@elliemae/ds-button-v2": "3.20.4",
41
+ "@elliemae/ds-circular-progress-indicator": "3.20.4",
42
+ "@elliemae/ds-drag-and-drop": "3.20.4",
43
+ "@elliemae/ds-fast-list": "3.20.4",
44
+ "@elliemae/ds-form-checkbox": "3.20.4",
45
+ "@elliemae/ds-form-input-text": "3.20.4",
46
+ "@elliemae/ds-grid": "3.20.4",
47
+ "@elliemae/ds-popperjs": "3.20.4",
48
+ "@elliemae/ds-indeterminate-progress-indicator": "3.20.4",
49
+ "@elliemae/ds-icons": "3.20.4",
50
+ "@elliemae/ds-hooks-fontsize-detector": "3.20.4",
51
+ "@elliemae/ds-system": "3.20.4",
52
+ "@elliemae/ds-utilities": "3.20.4",
53
+ "@elliemae/ds-props-helpers": "3.20.4",
54
+ "@elliemae/ds-typography": "3.20.4",
55
+ "@elliemae/ds-zustand-helpers": "3.20.4"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@testing-library/dom": "~8.19.0",
@@ -60,8 +60,8 @@
60
60
  "@testing-library/user-event": "~13.5.0",
61
61
  "lodash": "^4.17.21",
62
62
  "styled-components": "~5.3.9",
63
- "@elliemae/ds-breadcrumb": "3.20.2",
64
- "@elliemae/ds-tree-model": "3.20.2"
63
+ "@elliemae/ds-breadcrumb": "3.20.4",
64
+ "@elliemae/ds-tree-model": "3.20.4"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "lodash": "^4.17.21",