@elliemae/ds-square-indicator 3.80.0-next.36 → 3.80.0-next.39

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 (36) hide show
  1. package/dist/cjs/DSSquareIndicator.js +31 -5
  2. package/dist/cjs/DSSquareIndicator.js.map +2 -2
  3. package/dist/cjs/{constants.js → constants/index.js} +14 -1
  4. package/dist/cjs/constants/index.js.map +7 -0
  5. package/dist/cjs/index.js +5 -1
  6. package/dist/cjs/index.js.map +2 -2
  7. package/dist/cjs/react-desc-prop-types.js +6 -2
  8. package/dist/cjs/react-desc-prop-types.js.map +3 -3
  9. package/dist/cjs/styled.js +21 -6
  10. package/dist/cjs/styled.js.map +2 -2
  11. package/dist/cjs/typescript-testing/slot-props.js +41 -0
  12. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  13. package/dist/cjs/typescript-testing/typescript-square-indicator-valid.js +25 -1
  14. package/dist/cjs/typescript-testing/typescript-square-indicator-valid.js.map +2 -2
  15. package/dist/esm/DSSquareIndicator.js +37 -6
  16. package/dist/esm/DSSquareIndicator.js.map +2 -2
  17. package/dist/esm/constants/index.js +49 -0
  18. package/dist/esm/constants/index.js.map +7 -0
  19. package/dist/esm/index.js +5 -1
  20. package/dist/esm/index.js.map +2 -2
  21. package/dist/esm/react-desc-prop-types.js +7 -3
  22. package/dist/esm/react-desc-prop-types.js.map +3 -3
  23. package/dist/esm/styled.js +21 -6
  24. package/dist/esm/styled.js.map +2 -2
  25. package/dist/esm/typescript-testing/slot-props.js +18 -0
  26. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  27. package/dist/esm/typescript-testing/typescript-square-indicator-valid.js +25 -1
  28. package/dist/esm/typescript-testing/typescript-square-indicator-valid.js.map +2 -2
  29. package/dist/types/constants/index.d.ts +43 -0
  30. package/dist/types/index.d.ts +1 -0
  31. package/dist/types/react-desc-prop-types.d.ts +18 -4
  32. package/package.json +9 -8
  33. package/dist/cjs/constants.js.map +0 -7
  34. package/dist/esm/constants.js +0 -36
  35. package/dist/esm/constants.js.map +0 -7
  36. package/dist/types/constants.d.ts +0 -28
@@ -40,12 +40,13 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
40
  var import_uid = require("uid");
41
41
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
42
42
  var import_styled = require("./styled.js");
43
- var import_constants = require("./constants.js");
43
+ var import_constants = require("./constants/index.js");
44
44
  const EmptyComp = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });
45
45
  const DSSquareIndicator = (props) => {
46
46
  const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
47
47
  const { height, width, cols, rows, wrap, ...globalAttributes } = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault);
48
48
  const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;
49
+ const ownerPropsConfig = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
49
50
  const Wrapper = (0, import_react.useMemo)(() => withTooltip ? import_ds_tooltip_v3.DSTooltipV3 : EmptyComp, [withTooltip]);
50
51
  const uniqueId = (0, import_react.useMemo)(() => (0, import_uid.uid)(16), []);
51
52
  const paddedCoordinate = (0, import_react.useMemo)(() => `calc(100% - ${import_constants.sizeToWeight[size]})`, [size]);
@@ -57,6 +58,7 @@ const DSSquareIndicator = (props) => {
57
58
  justifyContent: "center",
58
59
  role: "status",
59
60
  "aria-label": text || "Loading...",
61
+ ...ownerPropsConfig,
60
62
  ...globalAttributes,
61
63
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Wrapper, { text, textAlign: "center", startPlacementPreference: tooltipStartPlacementPreference, children: [
62
64
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -91,10 +93,34 @@ const DSSquareIndicator = (props) => {
91
93
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: `${uniqueId}-lcp2`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: paddedCoordinate, y: import_constants.sizeToWeight[size], width: import_constants.sizeToWeight[size], height: "100%" }) }),
92
94
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: `${uniqueId}-lcp3`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: 0, y: paddedCoordinate, width: paddedCoordinate, height: import_constants.sizeToWeight[size] }) })
93
95
  ] }),
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineLeft, { size, fill: `url(#${uniqueId}-lg1)` }),
95
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineTop, { size, fill: `url(#${uniqueId}-lg2)`, clipPath: `url(#${uniqueId}-lcp1)` }),
96
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineRight, { size, fill: `url(#${uniqueId}-lg3)`, clipPath: `url(#${uniqueId}-lcp2)` }),
97
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineBottom, { size, fill: `url(#${uniqueId}-lg4)`, clipPath: `url(#${uniqueId}-lcp3)` })
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineLeft, { size, fill: `url(#${uniqueId}-lg1)`, ...ownerPropsConfig }),
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ import_styled.StyledLineTop,
99
+ {
100
+ size,
101
+ fill: `url(#${uniqueId}-lg2)`,
102
+ clipPath: `url(#${uniqueId}-lcp1)`,
103
+ ...ownerPropsConfig
104
+ }
105
+ ),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
+ import_styled.StyledLineRight,
108
+ {
109
+ size,
110
+ fill: `url(#${uniqueId}-lg3)`,
111
+ clipPath: `url(#${uniqueId}-lcp2)`,
112
+ ...ownerPropsConfig
113
+ }
114
+ ),
115
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ import_styled.StyledLineBottom,
117
+ {
118
+ size,
119
+ fill: `url(#${uniqueId}-lg4)`,
120
+ clipPath: `url(#${uniqueId}-lcp3)`,
121
+ ...ownerPropsConfig
122
+ }
123
+ )
98
124
  ]
99
125
  }
100
126
  ),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSSquareIndicator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useMemo } from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { defaultProps, SquareIndicatorPropTypes } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled.js';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants.js';\n\n// eslint-disable-next-line react/jsx-no-useless-fragment\nconst EmptyComp: React.ComponentType<React.PropsWithChildren> = (props) => <>{props.children}</>;\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSSquareIndicatorT.InternalProps>(props, defaultProps);\n // eslint-disable-next-line no-unused-vars\n const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;\n\n const Wrapper = useMemo(() => (withTooltip ? DSTooltipV3 : EmptyComp), [withTooltip]);\n\n const uniqueId = useMemo(() => uid(16), []);\n const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);\n\n const hexColor = useMemo(() => colorToHex[color], [color]);\n\n return (\n <StyledContainer\n gutter=\"xs\"\n justifyContent=\"center\"\n role=\"status\"\n aria-label={text || 'Loading...'}\n {...globalAttributes}\n >\n <Wrapper text={text} textAlign=\"center\" startPlacementPreference={tooltipStartPlacementPreference}>\n <svg\n width={sizeToPx[size]}\n height={sizeToPx[size]}\n style={{\n display: 'block',\n margin: 'auto',\n }}\n aria-hidden=\"true\"\n >\n <defs>\n <linearGradient id={`${uniqueId}-lg1`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"20%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"80%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg2`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg3`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg4`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"90%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <clipPath id={`${uniqueId}-lcp1`}>\n <rect x={sizeToWeight[size]} y={0} width=\"100%\" height={sizeToWeight[size]} />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp2`}>\n <rect x={paddedCoordinate} y={sizeToWeight[size]} width={sizeToWeight[size]} height=\"100%\" />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp3`}>\n <rect x={0} y={paddedCoordinate} width={paddedCoordinate} height={sizeToWeight[size]} />\n </clipPath>\n </defs>\n <StyledLineLeft size={size} fill={`url(#${uniqueId}-lg1)`} />\n <StyledLineTop size={size} fill={`url(#${uniqueId}-lg2)`} clipPath={`url(#${uniqueId}-lcp1)`} />\n <StyledLineRight size={size} fill={`url(#${uniqueId}-lg3)`} clipPath={`url(#${uniqueId}-lcp2)`} />\n <StyledLineBottom size={size} fill={`url(#${uniqueId}-lg4)`} clipPath={`url(#${uniqueId}-lcp3)`} />\n </svg>\n {text !== '' && showText && (\n <span style={{ color: colorToHex[color], fontSize: sizeToTextSize[size] }}>{text}</span>\n )}\n </Wrapper>\n </StyledContainer>\n );\n};\n\nDSSquareIndicator.displayName = 'DSSquareIndicator';\nexport const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);\nDSSquareIndicatorWithSchema.propTypes = SquareIndicatorPropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUoD;AAV3E,mBAA+B;AAC/B,2BAA4B;AAC5B,8BAA+E;AAC/E,iBAAoB;AAEpB,mCAAuD;AACvD,oBAAkG;AAClG,uBAAmE;AAGnE,MAAM,YAA0D,CAAC,UAAU,2EAAG,gBAAM,UAAS;AAEtF,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,uBAAmB,sDAA+D,OAAO,yCAAY;AAE3G,QAAM,EAAE,QAAQ,OAAO,MAAM,MAAM,MAAM,GAAG,iBAAiB,QAAI,gDAAuB,gBAAgB;AAExG,QAAM,EAAE,MAAM,OAAO,MAAM,UAAU,aAAa,gCAAgC,IAAI;AAEtF,QAAM,cAAU,sBAAQ,MAAO,cAAc,mCAAc,WAAY,CAAC,WAAW,CAAC;AAEpF,QAAM,eAAW,sBAAQ,UAAM,gBAAI,EAAE,GAAG,CAAC,CAAC;AAC1C,QAAM,uBAAmB,sBAAQ,MAAM,eAAe,8BAAa,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AAEnF,QAAM,eAAW,sBAAQ,MAAM,4BAAW,KAAK,GAAG,CAAC,KAAK,CAAC;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAO;AAAA,MACP,gBAAe;AAAA,M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MAAM;AAAA,mBACjD;AAAA,gBACA,4CAAC,cAAS,IAAI,GAAG,QAAQ,SACvB,sDAAC,UAAK,GAAG,8BAAa,IAAI,GAAG,GAAG,GAAG,OAAM,QAAO,QAAQ,8BAAa,IAAI,GAAG,GAC9E;AAAA,gBACA,4CAAC,cAAS,IAAI,GAAG,QAAQ,SACvB,sDAAC,UAAK,GAAG,kBAAkB,GAAG,8BAAa,IAAI,GAAG,OAAO,8BAAa,IAAI,GAAG,QAAO,QAAO,GAC7F;AAAA,gBACA,4CAAC,cAAS,IAAI,GAAG,QAAQ,SACvB,sDAAC,UAAK,GAAG,GAAG,GAAG,kBAAkB,OAAO,kBAAkB,QAAQ,8BAAa,IAAI,GAAG,GACxF;AAAA,iBACF;AAAA,cACA,4CAAC,gCAAe,MAAY,MAAM,QAAQ,QAAQ,SAAS;AAAA,cAC3D,4CAAC,+BAAc,MAAY,MAAM,QAAQ,QAAQ,SAAS,UAAU,QAAQ,QAAQ,UAAU;AAAA,cAC9F,4CAAC,iCAAgB,MAAY,MAAM,QAAQ,QAAQ,SAAS,UAAU,QAAQ,QAAQ,UAAU;AAAA,cAChG,4CAAC,kCAAiB,MAAY,MAAM,QAAQ,QAAQ,SAAS,UAAU,QAAQ,QAAQ,UAAU;AAAA;AAAA;AAAA,QACnG;AAAA,QACC,SAAS,MAAM,YACd,4CAAC,UAAK,OAAO,EAAE,OAAO,4BAAW,KAAK,GAAG,UAAU,gCAAe,IAAI,EAAE,GAAI,gBAAK;AAAA,SAErF;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;AACzB,MAAM,kCAA8B,kCAAS,iBAAiB;AACrE,4BAA4B,YAAY;",
4
+ "sourcesContent": ["import React, { useMemo } from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport {\n describe,\n useGetGlobalAttributes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { defaultProps, SquareIndicatorPropTypes } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled.js';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants/index.js';\n\n// eslint-disable-next-line react/jsx-no-useless-fragment\nconst EmptyComp: React.ComponentType<React.PropsWithChildren> = (props) => <>{props.children}</>;\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSSquareIndicatorT.InternalProps>(props, defaultProps);\n // eslint-disable-next-line no-unused-vars\n const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n\n const Wrapper = useMemo(() => (withTooltip ? DSTooltipV3 : EmptyComp), [withTooltip]);\n\n const uniqueId = useMemo(() => uid(16), []);\n const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);\n\n const hexColor = useMemo(() => colorToHex[color], [color]);\n\n return (\n <StyledContainer\n gutter=\"xs\"\n justifyContent=\"center\"\n role=\"status\"\n aria-label={text || 'Loading...'}\n {...ownerPropsConfig}\n {...globalAttributes}\n >\n <Wrapper text={text} textAlign=\"center\" startPlacementPreference={tooltipStartPlacementPreference}>\n <svg\n width={sizeToPx[size]}\n height={sizeToPx[size]}\n style={{\n display: 'block',\n margin: 'auto',\n }}\n aria-hidden=\"true\"\n >\n <defs>\n <linearGradient id={`${uniqueId}-lg1`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"20%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"80%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg2`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg3`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg4`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"90%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <clipPath id={`${uniqueId}-lcp1`}>\n <rect x={sizeToWeight[size]} y={0} width=\"100%\" height={sizeToWeight[size]} />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp2`}>\n <rect x={paddedCoordinate} y={sizeToWeight[size]} width={sizeToWeight[size]} height=\"100%\" />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp3`}>\n <rect x={0} y={paddedCoordinate} width={paddedCoordinate} height={sizeToWeight[size]} />\n </clipPath>\n </defs>\n <StyledLineLeft size={size} fill={`url(#${uniqueId}-lg1)`} {...ownerPropsConfig} />\n <StyledLineTop\n size={size}\n fill={`url(#${uniqueId}-lg2)`}\n clipPath={`url(#${uniqueId}-lcp1)`}\n {...ownerPropsConfig}\n />\n <StyledLineRight\n size={size}\n fill={`url(#${uniqueId}-lg3)`}\n clipPath={`url(#${uniqueId}-lcp2)`}\n {...ownerPropsConfig}\n />\n <StyledLineBottom\n size={size}\n fill={`url(#${uniqueId}-lg4)`}\n clipPath={`url(#${uniqueId}-lcp3)`}\n {...ownerPropsConfig}\n />\n </svg>\n {text !== '' && showText && (\n <span style={{ color: colorToHex[color], fontSize: sizeToTextSize[size] }}>{text}</span>\n )}\n </Wrapper>\n </StyledContainer>\n );\n};\n\nDSSquareIndicator.displayName = 'DSSquareIndicator';\nexport const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);\nD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AAI,GAAG,OAAO,8BAAa,IAAI,GAAG,QAAO,QAAO,GAC7F;AAAA,gBACA,4CAAC,cAAS,IAAI,GAAG,QAAQ,SACvB,sDAAC,UAAK,GAAG,GAAG,GAAG,kBAAkB,OAAO,kBAAkB,QAAQ,8BAAa,IAAI,GAAG,GACxF;AAAA,iBACF;AAAA,cACA,4CAAC,gCAAe,MAAY,MAAM,QAAQ,QAAQ,SAAU,GAAG,kBAAkB;AAAA,cACjF;AAAA,gBAAC;AAAA;AAAA,kBACC;AAAA,kBACA,MAAM,QAAQ,QAAQ;AAAA,kBACtB,UAAU,QAAQ,QAAQ;AAAA,kBACzB,GAAG;AAAA;AAAA,cACN;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC;AAAA,kBACA,MAAM,QAAQ,QAAQ;AAAA,kBACtB,UAAU,QAAQ,QAAQ;AAAA,kBACzB,GAAG;AAAA;AAAA,cACN;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC;AAAA,kBACA,MAAM,QAAQ,QAAQ;AAAA,kBACtB,UAAU,QAAQ,QAAQ;AAAA,kBACzB,GAAG;AAAA;AAAA,cACN;AAAA;AAAA;AAAA,QACF;AAAA,QACC,SAAS,MAAM,YACd,4CAAC,UAAK,OAAO,EAAE,OAAO,4BAAW,KAAK,GAAG,UAAU,gCAAe,IAAI,EAAE,GAAI,gBAAK;AAAA,SAErF;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,cAAc;AACzB,MAAM,kCAA8B,kCAAS,iBAAiB;AACrE,4BAA4B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -28,6 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var constants_exports = {};
30
30
  __export(constants_exports, {
31
+ DSSquareIndicatorName: () => DSSquareIndicatorName,
32
+ SQUARE_INDICATOR_DATA_TESTID: () => SQUARE_INDICATOR_DATA_TESTID,
33
+ SQUARE_INDICATOR_SLOTS: () => SQUARE_INDICATOR_SLOTS,
31
34
  colorToHex: () => colorToHex,
32
35
  sizeToPx: () => sizeToPx,
33
36
  sizeToTextSize: () => sizeToTextSize,
@@ -35,6 +38,16 @@ __export(constants_exports, {
35
38
  });
36
39
  module.exports = __toCommonJS(constants_exports);
37
40
  var React = __toESM(require("react"));
41
+ var import_ds_system = require("@elliemae/ds-system");
42
+ const DSSquareIndicatorName = "DSSquareindicator";
43
+ const SQUARE_INDICATOR_SLOTS = {
44
+ ROOT: "root",
45
+ LINE_LEFT: "line-left",
46
+ LINE_TOP: "line-top",
47
+ LINE_RIGHT: "line-right",
48
+ LINE_BOTTOM: "line-bottom"
49
+ };
50
+ const SQUARE_INDICATOR_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS);
38
51
  const sizeToPx = {
39
52
  xs: "16px",
40
53
  s: "24px",
@@ -63,4 +76,4 @@ const sizeToTextSize = {
63
76
  xl: "14px",
64
77
  xxl: "16px"
65
78
  };
66
- //# sourceMappingURL=constants.js.map
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSSquareIndicatorName = 'DSSquareindicator';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const SQUARE_INDICATOR_SLOTS = {\n ROOT: 'root',\n LINE_LEFT: 'line-left',\n LINE_TOP: 'line-top',\n LINE_RIGHT: 'line-right',\n LINE_BOTTOM: 'line-bottom',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const SQUARE_INDICATOR_DATA_TESTID = slotObjectToDataTestIds(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS);\n\nexport const sizeToPx = {\n xs: '16px',\n s: '24px',\n m: '32px',\n l: '48px',\n xl: '56px',\n xxl: '64px',\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#FFFFFF',\n dark: '#0F364A',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,wBAAwB;AAG9B,MAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AACf;AAGO,MAAM,mCAA+B,0CAAwB,uBAAuB,sBAAsB;AAE1G,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;",
6
+ "names": []
7
+ }
package/dist/cjs/index.js CHANGED
@@ -29,9 +29,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var index_exports = {};
30
30
  __export(index_exports, {
31
31
  DSSquareIndicator: () => import_DSSquareIndicator.DSSquareIndicator,
32
- DSSquareIndicatorWithSchema: () => import_DSSquareIndicator.DSSquareIndicatorWithSchema
32
+ DSSquareIndicatorName: () => import_constants.DSSquareIndicatorName,
33
+ DSSquareIndicatorWithSchema: () => import_DSSquareIndicator.DSSquareIndicatorWithSchema,
34
+ SQUARE_INDICATOR_DATA_TESTID: () => import_constants.SQUARE_INDICATOR_DATA_TESTID,
35
+ SQUARE_INDICATOR_SLOTS: () => import_constants.SQUARE_INDICATOR_SLOTS
33
36
  });
34
37
  module.exports = __toCommonJS(index_exports);
35
38
  var React = __toESM(require("react"));
36
39
  var import_DSSquareIndicator = require("./DSSquareIndicator.js");
40
+ var import_constants = require("./constants/index.js");
37
41
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';\nexport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAA+D;",
4
+ "sourcesContent": ["export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';\nexport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nexport { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, SQUARE_INDICATOR_DATA_TESTID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAA+D;AAE/D,uBAA4F;",
6
6
  "names": []
7
7
  }
@@ -28,12 +28,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
+ DSSquareIndicatorPropTypes: () => DSSquareIndicatorPropTypes,
31
32
  SquareIndicatorPropTypes: () => SquareIndicatorPropTypes,
32
33
  defaultProps: () => defaultProps
33
34
  });
34
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
35
36
  var React = __toESM(require("react"));
36
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_constants = require("./constants/index.js");
37
39
  const defaultProps = {
38
40
  size: "m",
39
41
  color: "dark",
@@ -42,7 +44,8 @@ const defaultProps = {
42
44
  withTooltip: false,
43
45
  tooltipStartPlacementPreference: "bottom"
44
46
  };
45
- const SquareIndicatorPropTypes = {
47
+ const DSSquareIndicatorPropTypes = {
48
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSSquareIndicatorName, import_constants.SQUARE_INDICATOR_SLOTS),
46
49
  ...import_ds_props_helpers.globalAttributesPropTypes,
47
50
  size: import_ds_props_helpers.PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl"]).description("Size of the indicator").defaultValue("m"),
48
51
  color: import_ds_props_helpers.PropTypes.oneOf(["light", "dark"]).description("Color mode for the indicator").defaultValue("dark"),
@@ -62,6 +65,7 @@ const SquareIndicatorPropTypes = {
62
65
  "left-end",
63
66
  "left",
64
67
  "left-start"
65
- ]).description("start placement preference for the tooltip").defaultValue("center")
68
+ ]).description("start placement preference for the tooltip").defaultValue("bottom")
66
69
  };
70
+ const SquareIndicatorPropTypes = DSSquareIndicatorPropTypes;
67
71
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\n\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSSquareIndicatorT {\n export interface DefaultProps {\n size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n color: 'light' | 'dark';\n text: string;\n showText: boolean;\n withTooltip: boolean;\n tooltipStartPlacementPreference:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n }\n\n export interface Props extends Partial<DefaultProps> {}\n\n export interface InternalProps extends DefaultProps {}\n}\n\nexport const defaultProps: DSSquareIndicatorT.DefaultProps = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nexport const SquareIndicatorPropTypes = {\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),\n color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),\n text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),\n showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),\n withTooltip: PropTypes.bool\n .description('Whether to include a tooltip that shows the optional text on hover')\n .defaultValue(false),\n tooltipStartPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preference for the tooltip')\n .defaultValue('center'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAqD;AA8B9C,MAAM,eAAgD;AAAA,EAC3D,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEO,MAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,kCAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,kCAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,kCAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,kCAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,kCAAU,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,4CAA4C,EACxD,aAAa,QAAQ;AAC1B;",
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS } from './constants/index.js';\n\nexport declare namespace DSSquareIndicatorT {\n export type SlotFunctionArguments = {\n dsSquareindicatorRoot: () => object;\n dsSquareindicatorLineLeft: () => object;\n dsSquareindicatorLineTop: () => object;\n dsSquareindicatorLineRight: () => object;\n dsSquareindicatorLineBottom: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n color: 'light' | 'dark';\n text: string;\n showText: boolean;\n withTooltip: boolean;\n tooltipStartPlacementPreference:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSSquareIndicatorName,\n typeof SQUARE_INDICATOR_SLOTS\n > {}\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSSquareIndicatorT.DefaultProps = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nexport const DSSquareIndicatorPropTypes: DSPropTypesSchema<DSSquareIndicatorT.Props> = {\n ...getPropsPerSlotPropTypes(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS),\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),\n color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),\n text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),\n showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),\n withTooltip: PropTypes.bool\n .description('Whether to include a tooltip that shows the optional text on hover')\n .defaultValue(false),\n tooltipStartPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preference for the tooltip')\n .defaultValue('bottom'),\n};\n\nexport const SquareIndicatorPropTypes =\n DSSquareIndicatorPropTypes as unknown as ValidationMap<DSSquareIndicatorT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA+E;AAE/E,uBAA8D;AAsDvD,MAAM,eAAgD;AAAA,EAC3D,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEO,MAAM,6BAA0E;AAAA,EACrF,OAAG,kDAAyB,wCAAuB,uCAAsB;AAAA,EACzE,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,kCAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,kCAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,kCAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,kCAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,kCAAU,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,4CAA4C,EACxD,aAAa,QAAQ;AAC1B;AAEO,MAAM,2BACX;",
6
6
  "names": []
7
7
  }
@@ -38,7 +38,7 @@ module.exports = __toCommonJS(styled_exports);
38
38
  var React = __toESM(require("react"));
39
39
  var import_ds_system = require("@elliemae/ds-system");
40
40
  var import_ds_grid = require("@elliemae/ds-grid");
41
- var import_constants = require("./constants.js");
41
+ var import_constants = require("./constants/index.js");
42
42
  const lineLeftAnimation = import_ds_system.kfrm`
43
43
  0% {
44
44
  y: 100%;
@@ -95,31 +95,46 @@ const lineBottomAnimation = import_ds_system.kfrm`
95
95
  width: 200%;
96
96
  }
97
97
  `;
98
- const StyledContainer = (0, import_ds_system.styled)(import_ds_grid.Grid)`
98
+ const StyledContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
99
+ name: import_constants.DSSquareIndicatorName,
100
+ slot: import_constants.SQUARE_INDICATOR_SLOTS.ROOT
101
+ })`
99
102
  z-index: ${({ theme }) => theme.zIndex.loader};
100
103
  `;
101
- const StyledLineLeft = import_ds_system.styled.rect`
104
+ const StyledLineLeft = (0, import_ds_system.styled)("rect", {
105
+ name: import_constants.DSSquareIndicatorName,
106
+ slot: import_constants.SQUARE_INDICATOR_SLOTS.LINE_LEFT
107
+ })`
102
108
  x: 0;
103
109
  y: 0%;
104
110
  width: ${({ size }) => import_constants.sizeToWeight[size]};
105
111
  height: 100%;
106
112
  animation: ${lineLeftAnimation} 2.5s linear 0s infinite;
107
113
  `;
108
- const StyledLineTop = import_ds_system.styled.rect`
114
+ const StyledLineTop = (0, import_ds_system.styled)("rect", {
115
+ name: import_constants.DSSquareIndicatorName,
116
+ slot: import_constants.SQUARE_INDICATOR_SLOTS.LINE_TOP
117
+ })`
109
118
  x: -100%;
110
119
  y: 0;
111
120
  width: 200%;
112
121
  height: ${({ size }) => import_constants.sizeToWeight[size]};
113
122
  animation: ${lineTopAnimation} 2.5s linear 0s infinite;
114
123
  `;
115
- const StyledLineRight = import_ds_system.styled.rect`
124
+ const StyledLineRight = (0, import_ds_system.styled)("rect", {
125
+ name: import_constants.DSSquareIndicatorName,
126
+ slot: import_constants.SQUARE_INDICATOR_SLOTS.LINE_RIGHT
127
+ })`
116
128
  x: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
117
129
  y: -100%;
118
130
  width: ${({ size }) => import_constants.sizeToWeight[size]};
119
131
  height: 200%;
120
132
  animation: ${lineRightAnimation} 2.5s linear 0s infinite;
121
133
  `;
122
- const StyledLineBottom = import_ds_system.styled.rect`
134
+ const StyledLineBottom = (0, import_ds_system.styled)("rect", {
135
+ name: import_constants.DSSquareIndicatorName,
136
+ slot: import_constants.SQUARE_INDICATOR_SLOTS.LINE_BOTTOM
137
+ })`
123
138
  x: 0%;
124
139
  y: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
125
140
  width: 200%;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { kfrm, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { sizeToWeight } from './constants.js';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n}\n\nconst lineLeftAnimation = kfrm`\n 0% {\n y: 100%;\n height: 100%;\n }\n 12.5%, 50% {\n y: 0;\n height: 100%;\n }\n 62.5%, 100% {\n y: -100%;\n height: 100%;\n }\n`;\n\nconst lineTopAnimation = kfrm`\n 0% {\n x: -100%;\n width: 0%;\n }\n 25%, 50% {\n x: -100%;\n width: 200%;\n }\n 75%, 100% {\n x: 100%;\n width: 200%;\n }\n`;\n\nconst lineRightAnimation = kfrm`\n 0%, 12.5% {\n y: -100%;\n height: 0%;\n }\n 37.5%, 62.5% {\n y: -100%;\n height: 200%;\n }\n 87.5%, 100% {\n y: 100%;\n height: 200%;\n }\n`;\n\nconst lineBottomAnimation = kfrm`\n 0%, 25% {\n x: 200%;\n width: 200%;\n }\n 50%, 75% {\n x: 0%;\n width: 200%;\n }\n 100% {\n x: -200%;\n width: 200%;\n }\n`;\n\nexport const StyledContainer = styled(Grid)`\n z-index: ${({ theme }) => theme.zIndex.loader};\n`;\n\nexport const StyledLineLeft = styled.rect<RectProps>`\n x: 0;\n y: 0%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 100%;\n animation: ${lineLeftAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineTop = styled.rect<RectProps>`\n x: -100%;\n y: 0;\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineTopAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineRight = styled.rect<RectProps>`\n x: calc(100% - ${({ size }) => sizeToWeight[size]});\n y: -100%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 200%;\n animation: ${lineRightAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineBottom = styled.rect<RectProps>`\n x: 0%;\n y: calc(100% - ${({ size }) => sizeToWeight[size]});\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineBottomAnimation} 2.5s linear 0s infinite;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA6B;AAC7B,qBAAqB;AAErB,uBAA6B;AAM7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe1B,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezB,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe3B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAerB,MAAM,sBAAkB,yBAAO,mBAAI;AAAA,aAC7B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAGxC,MAAM,iBAAiB,wBAAO;AAAA;AAAA;AAAA,WAG1B,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,eAE5B,iBAAiB;AAAA;AAGzB,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA,eAC7B,gBAAgB;AAAA;AAGxB,MAAM,kBAAkB,wBAAO;AAAA,mBACnB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,WAExC,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,eAE5B,kBAAkB;AAAA;AAG1B,MAAM,mBAAmB,wBAAO;AAAA;AAAA,mBAEpB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,YAEvC,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA,eAC7B,mBAAmB;AAAA;",
4
+ "sourcesContent": ["import { kfrm, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, sizeToWeight } from './constants/index.js';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n}\n\nconst lineLeftAnimation = kfrm`\n 0% {\n y: 100%;\n height: 100%;\n }\n 12.5%, 50% {\n y: 0;\n height: 100%;\n }\n 62.5%, 100% {\n y: -100%;\n height: 100%;\n }\n`;\n\nconst lineTopAnimation = kfrm`\n 0% {\n x: -100%;\n width: 0%;\n }\n 25%, 50% {\n x: -100%;\n width: 200%;\n }\n 75%, 100% {\n x: 100%;\n width: 200%;\n }\n`;\n\nconst lineRightAnimation = kfrm`\n 0%, 12.5% {\n y: -100%;\n height: 0%;\n }\n 37.5%, 62.5% {\n y: -100%;\n height: 200%;\n }\n 87.5%, 100% {\n y: 100%;\n height: 200%;\n }\n`;\n\nconst lineBottomAnimation = kfrm`\n 0%, 25% {\n x: 200%;\n width: 200%;\n }\n 50%, 75% {\n x: 0%;\n width: 200%;\n }\n 100% {\n x: -200%;\n width: 200%;\n }\n`;\n\nexport const StyledContainer = styled(Grid, {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.ROOT,\n})`\n z-index: ${({ theme }) => theme.zIndex.loader};\n`;\n\nexport const StyledLineLeft = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_LEFT,\n})<RectProps>`\n x: 0;\n y: 0%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 100%;\n animation: ${lineLeftAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineTop = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_TOP,\n})<RectProps>`\n x: -100%;\n y: 0;\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineTopAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineRight = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_RIGHT,\n})<RectProps>`\n x: calc(100% - ${({ size }) => sizeToWeight[size]});\n y: -100%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 200%;\n animation: ${lineRightAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineBottom = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_BOTTOM,\n})<RectProps>`\n x: 0%;\n y: calc(100% - ${({ size }) => sizeToWeight[size]});\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineBottomAnimation} 2.5s linear 0s infinite;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA6B;AAC7B,qBAAqB;AAErB,uBAA4E;AAM5E,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe1B,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezB,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe3B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAerB,MAAM,sBAAkB,yBAAO,qBAAM;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA,aACY,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAGxC,MAAM,qBAAiB,yBAAO,QAAQ;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA,WAGU,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,eAE5B,iBAAiB;AAAA;AAGzB,MAAM,oBAAgB,yBAAO,QAAQ;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA;AAAA,YAIW,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA,eAC7B,gBAAgB;AAAA;AAGxB,MAAM,sBAAkB,yBAAO,QAAQ;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA,mBACkB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,WAExC,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,eAE5B,kBAAkB;AAAA;AAG1B,MAAM,uBAAmB,yBAAO,QAAQ;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA;AAAA,mBAEkB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA;AAAA,YAEvC,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI,CAAC;AAAA,eAC7B,mBAAmB;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,41 @@
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ const SlotPropsAsObject = {
26
+ dsSquareindicatorRoot: { "aria-label": "just a typescript test" },
27
+ dsSquareindicatorLineLeft: { "aria-label": "just a typescript test" },
28
+ dsSquareindicatorLineTop: { "aria-label": "just a typescript test" },
29
+ dsSquareindicatorLineRight: { "aria-label": "just a typescript test" },
30
+ dsSquareindicatorLineBottom: { "aria-label": "just a typescript test" }
31
+ };
32
+ const SlotPropsAsFunctions = {
33
+ dsSquareindicatorRoot: () => ({ "aria-label": "just a typescript test" }),
34
+ dsSquareindicatorLineLeft: () => ({ "aria-label": "just a typescript test" }),
35
+ dsSquareindicatorLineTop: () => ({ "aria-label": "just a typescript test" }),
36
+ dsSquareindicatorLineRight: () => ({ "aria-label": "just a typescript test" }),
37
+ dsSquareindicatorLineBottom: () => ({ "aria-label": "just a typescript test" })
38
+ };
39
+ const SlotFunctionsAreValidProps = SlotPropsAsFunctions;
40
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
41
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS } from '../constants/index.js';\nimport type { DSSquareIndicatorT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSSquareIndicatorT.Props> = {\n dsSquareindicatorRoot: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineLeft: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineTop: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineRight: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineBottom: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSSquareIndicatorT.SlotFunctionArguments = {\n dsSquareindicatorRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineLeft: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineTop: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineRight: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineBottom: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// The function form must also be accepted by the public Props, slot by slot\nconst SlotFunctionsAreValidProps: Partial<DSSquareIndicatorT.Props> = SlotPropsAsFunctions;\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSSquareIndicatorName, typeof SQUARE_INDICATOR_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACKvB,MAAM,oBAAuD;AAAA,EAC3D,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,6BAA6B,EAAE,cAAc,yBAAyB;AACxE;AAEA,MAAM,uBAAiE;AAAA,EACrE,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAC/E;AAGA,MAAM,6BAAgE;AAGtE,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -73,10 +73,34 @@ const testDefinitionAsConst = {
73
73
  withTooltip: false,
74
74
  tooltipStartPlacementPreference: "bottom"
75
75
  };
76
+ const testGlobalAttributesAndSlots = {
77
+ text: "Loading",
78
+ id: "documents-loader",
79
+ className: "custom-class",
80
+ "aria-label": "Loading the loan documents",
81
+ dsSquareindicatorRoot: { "aria-describedby": "loader-help" },
82
+ dsSquareindicatorLineLeft: () => ({ "data-custom": "left" })
83
+ };
84
+ const testGlobalAttributesAndSlotsAsConst = {
85
+ id: "documents-loader",
86
+ "aria-label": "Loading the loan documents",
87
+ dsSquareindicatorLineBottom: { "data-custom": "bottom" }
88
+ };
76
89
  const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
77
90
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { ...testExplicitDefinition }),
78
91
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { ...testInferedTypeCompatibility }),
79
92
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { ...testDefinitionAsConst }),
80
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { size: "m", color: "dark", text: "", showText: true, withTooltip: true, tooltipStartPlacementPreference: "bottom" })
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { ...testGlobalAttributesAndSlots }),
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { ...testGlobalAttributesAndSlotsAsConst }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSquareIndicator, { size: "m", color: "dark", text: "", showText: true, withTooltip: true, tooltipStartPlacementPreference: "bottom" }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
97
+ import__.DSSquareIndicator,
98
+ {
99
+ "data-testid": "ds-squareindicator",
100
+ "aria-label": "Loading the loan documents",
101
+ dsSquareindicatorRoot: { "aria-describedby": "loader-help" },
102
+ dsSquareindicatorLineTop: () => ({ "data-custom": "top" })
103
+ }
104
+ )
81
105
  ] });
82
106
  //# sourceMappingURL=typescript-square-indicator-valid.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-square-indicator-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSSquareIndicator } from '../index.js';\nimport type { DSSquareIndicatorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSSquareIndicatorT.Props;\ntype ComponentPropsInternals = DSSquareIndicatorT.InternalProps;\ntype ComponentPropsDefaultProps = DSSquareIndicatorT.DefaultProps;\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n color: 'dark',\n size: 'm',\n text: '',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSSquareIndicator {...testExplicitDefinition} />\n <DSSquareIndicator {...testInferedTypeCompatibility} />\n <DSSquareIndicator {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSSquareIndicator size=\"m\" color=\"dark\" text=\"\" showText withTooltip tooltipStartPlacementPreference=\"bottom\" />\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACyErB;AAxEF,eAAkC;AAUlC,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,8BAAmB,GAAG,wBAAwB;AAAA,EAC/C,4CAAC,8BAAmB,GAAG,8BAA8B;AAAA,EACrD,4CAAC,8BAAmB,GAAG,uBAAuB;AAAA,EAE9C,4CAAC,8BAAkB,MAAK,KAAI,OAAM,QAAO,MAAK,IAAG,UAAQ,MAAC,aAAW,MAAC,iCAAgC,UAAS;AAAA,GACjH;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSSquareIndicator } from '../index.js';\nimport type { DSSquareIndicatorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSSquareIndicatorT.Props;\ntype ComponentPropsInternals = DSSquareIndicatorT.InternalProps;\ntype ComponentPropsDefaultProps = DSSquareIndicatorT.DefaultProps;\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n color: 'dark',\n size: 'm',\n text: '',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as const;\n\n// global attributes are forwarded to the root, slot props accept both the object and the function form\nconst testGlobalAttributesAndSlots: ComponentPropsForApp = {\n text: 'Loading',\n id: 'documents-loader',\n className: 'custom-class',\n 'aria-label': 'Loading the loan documents',\n dsSquareindicatorRoot: { 'aria-describedby': 'loader-help' },\n dsSquareindicatorLineLeft: () => ({ 'data-custom': 'left' }),\n};\n\nconst testGlobalAttributesAndSlotsAsConst = {\n id: 'documents-loader',\n 'aria-label': 'Loading the loan documents',\n dsSquareindicatorLineBottom: { 'data-custom': 'bottom' },\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSSquareIndicator {...testExplicitDefinition} />\n <DSSquareIndicator {...testInferedTypeCompatibility} />\n <DSSquareIndicator {...testDefinitionAsConst} />\n <DSSquareIndicator {...testGlobalAttributesAndSlots} />\n <DSSquareIndicator {...testGlobalAttributesAndSlotsAsConst} />\n {/* works with inline values */}\n <DSSquareIndicator size=\"m\" color=\"dark\" text=\"\" showText withTooltip tooltipStartPlacementPreference=\"bottom\" />\n <DSSquareIndicator\n data-testid=\"ds-squareindicator\"\n aria-label=\"Loading the loan documents\"\n dsSquareindicatorRoot={{ 'aria-describedby': 'loader-help' }}\n dsSquareindicatorLineTop={() => ({ 'data-custom': 'top' })}\n />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACyFrB;AAxFF,eAAkC;AAUlC,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAC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EAE5D,4CAAC,8BAAkB,MAAK,KAAI,OAAM,QAAO,MAAK,IAAG,UAAQ,MAAC,aAAW,MAAC,iCAAgC,UAAS;AAAA,EAC/G;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,cAAW;AAAA,MACX,uBAAuB,EAAE,oBAAoB,cAAc;AAAA,MAC3D,0BAA0B,OAAO,EAAE,eAAe,MAAM;AAAA;AAAA,EAC1D;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -2,16 +2,22 @@ import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { DSTooltipV3 } from "@elliemae/ds-tooltip-v3";
5
- import { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
5
+ import {
6
+ describe,
7
+ useGetGlobalAttributes,
8
+ useMemoMergePropsWithDefault,
9
+ useOwnerProps
10
+ } from "@elliemae/ds-props-helpers";
6
11
  import { uid } from "uid";
7
12
  import { defaultProps, SquareIndicatorPropTypes } from "./react-desc-prop-types.js";
8
13
  import { StyledContainer, StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from "./styled.js";
9
- import { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from "./constants.js";
14
+ import { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from "./constants/index.js";
10
15
  const EmptyComp = (props) => /* @__PURE__ */ jsx(Fragment, { children: props.children });
11
16
  const DSSquareIndicator = (props) => {
12
17
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
13
18
  const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);
14
19
  const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;
20
+ const ownerPropsConfig = useOwnerProps(propsWithDefault);
15
21
  const Wrapper = useMemo(() => withTooltip ? DSTooltipV3 : EmptyComp, [withTooltip]);
16
22
  const uniqueId = useMemo(() => uid(16), []);
17
23
  const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);
@@ -23,6 +29,7 @@ const DSSquareIndicator = (props) => {
23
29
  justifyContent: "center",
24
30
  role: "status",
25
31
  "aria-label": text || "Loading...",
32
+ ...ownerPropsConfig,
26
33
  ...globalAttributes,
27
34
  children: /* @__PURE__ */ jsxs(Wrapper, { text, textAlign: "center", startPlacementPreference: tooltipStartPlacementPreference, children: [
28
35
  /* @__PURE__ */ jsxs(
@@ -57,10 +64,34 @@ const DSSquareIndicator = (props) => {
57
64
  /* @__PURE__ */ jsx("clipPath", { id: `${uniqueId}-lcp2`, children: /* @__PURE__ */ jsx("rect", { x: paddedCoordinate, y: sizeToWeight[size], width: sizeToWeight[size], height: "100%" }) }),
58
65
  /* @__PURE__ */ jsx("clipPath", { id: `${uniqueId}-lcp3`, children: /* @__PURE__ */ jsx("rect", { x: 0, y: paddedCoordinate, width: paddedCoordinate, height: sizeToWeight[size] }) })
59
66
  ] }),
60
- /* @__PURE__ */ jsx(StyledLineLeft, { size, fill: `url(#${uniqueId}-lg1)` }),
61
- /* @__PURE__ */ jsx(StyledLineTop, { size, fill: `url(#${uniqueId}-lg2)`, clipPath: `url(#${uniqueId}-lcp1)` }),
62
- /* @__PURE__ */ jsx(StyledLineRight, { size, fill: `url(#${uniqueId}-lg3)`, clipPath: `url(#${uniqueId}-lcp2)` }),
63
- /* @__PURE__ */ jsx(StyledLineBottom, { size, fill: `url(#${uniqueId}-lg4)`, clipPath: `url(#${uniqueId}-lcp3)` })
67
+ /* @__PURE__ */ jsx(StyledLineLeft, { size, fill: `url(#${uniqueId}-lg1)`, ...ownerPropsConfig }),
68
+ /* @__PURE__ */ jsx(
69
+ StyledLineTop,
70
+ {
71
+ size,
72
+ fill: `url(#${uniqueId}-lg2)`,
73
+ clipPath: `url(#${uniqueId}-lcp1)`,
74
+ ...ownerPropsConfig
75
+ }
76
+ ),
77
+ /* @__PURE__ */ jsx(
78
+ StyledLineRight,
79
+ {
80
+ size,
81
+ fill: `url(#${uniqueId}-lg3)`,
82
+ clipPath: `url(#${uniqueId}-lcp2)`,
83
+ ...ownerPropsConfig
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsx(
87
+ StyledLineBottom,
88
+ {
89
+ size,
90
+ fill: `url(#${uniqueId}-lg4)`,
91
+ clipPath: `url(#${uniqueId}-lcp3)`,
92
+ ...ownerPropsConfig
93
+ }
94
+ )
64
95
  ]
65
96
  }
66
97
  ),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSSquareIndicator.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { defaultProps, SquareIndicatorPropTypes } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled.js';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants.js';\n\n// eslint-disable-next-line react/jsx-no-useless-fragment\nconst EmptyComp: React.ComponentType<React.PropsWithChildren> = (props) => <>{props.children}</>;\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSSquareIndicatorT.InternalProps>(props, defaultProps);\n // eslint-disable-next-line no-unused-vars\n const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;\n\n const Wrapper = useMemo(() => (withTooltip ? DSTooltipV3 : EmptyComp), [withTooltip]);\n\n const uniqueId = useMemo(() => uid(16), []);\n const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);\n\n const hexColor = useMemo(() => colorToHex[color], [color]);\n\n return (\n <StyledContainer\n gutter=\"xs\"\n justifyContent=\"center\"\n role=\"status\"\n aria-label={text || 'Loading...'}\n {...globalAttributes}\n >\n <Wrapper text={text} textAlign=\"center\" startPlacementPreference={tooltipStartPlacementPreference}>\n <svg\n width={sizeToPx[size]}\n height={sizeToPx[size]}\n style={{\n display: 'block',\n margin: 'auto',\n }}\n aria-hidden=\"true\"\n >\n <defs>\n <linearGradient id={`${uniqueId}-lg1`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"20%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"80%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg2`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg3`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg4`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"90%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <clipPath id={`${uniqueId}-lcp1`}>\n <rect x={sizeToWeight[size]} y={0} width=\"100%\" height={sizeToWeight[size]} />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp2`}>\n <rect x={paddedCoordinate} y={sizeToWeight[size]} width={sizeToWeight[size]} height=\"100%\" />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp3`}>\n <rect x={0} y={paddedCoordinate} width={paddedCoordinate} height={sizeToWeight[size]} />\n </clipPath>\n </defs>\n <StyledLineLeft size={size} fill={`url(#${uniqueId}-lg1)`} />\n <StyledLineTop size={size} fill={`url(#${uniqueId}-lg2)`} clipPath={`url(#${uniqueId}-lcp1)`} />\n <StyledLineRight size={size} fill={`url(#${uniqueId}-lg3)`} clipPath={`url(#${uniqueId}-lcp2)`} />\n <StyledLineBottom size={size} fill={`url(#${uniqueId}-lg4)`} clipPath={`url(#${uniqueId}-lcp3)`} />\n </svg>\n {text !== '' && showText && (\n <span style={{ color: colorToHex[color], fontSize: sizeToTextSize[size] }}>{text}</span>\n )}\n </Wrapper>\n </StyledContainer>\n );\n};\n\nDSSquareIndicator.displayName = 'DSSquareIndicator';\nexport const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);\nDSSquareIndicatorWithSchema.propTypes = SquareIndicatorPropTypes;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACUoD,wBAmC/D,YAnC+D;AAV3E,SAAgB,eAAe;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,UAAU,wBAAwB,oCAAoC;AAC/E,SAAS,WAAW;AAEpB,SAAS,cAAc,gCAAgC;AACvD,SAAS,iBAAiB,gBAAgB,eAAe,iBAAiB,wBAAwB;AAClG,SAAS,YAAY,UAAU,gBAAgB,oBAAoB;AAGnE,MAAM,YAA0D,CAAC,UAAU,gCAAG,gBAAM,UAAS;AAEtF,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,mBAAmB,6BAA+D,OAAO,YAAY;AAE3G,QAAM,EAAE,QAAQ,OAAO,MAAM,MAAM,MAAM,GAAG,iBAAiB,IAAI,uBAAuB,gBAAgB;AAExG,QAAM,EAAE,MAAM,OAAO,MAAM,UAAU,aAAa,gCAAgC,IAAI;AAEtF,QAAM,UAAU,QAAQ,MAAO,cAAc,cAAc,WAAY,CAAC,WAAW,CAAC;AAEpF,QAAM,WAAW,QAAQ,MAAM,IAAI,EAAE,GAAG,CAAC,CAAC;AAC1C,QAAM,mBAAmB,QAAQ,MAAM,eAAe,aAAa,IAAI,C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\n", "import React, { useMemo } from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport {\n describe,\n useGetGlobalAttributes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { defaultProps, SquareIndicatorPropTypes } from './react-desc-prop-types.js';\nimport { StyledContainer, StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled.js';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants/index.js';\n\n// eslint-disable-next-line react/jsx-no-useless-fragment\nconst EmptyComp: React.ComponentType<React.PropsWithChildren> = (props) => <>{props.children}</>;\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSSquareIndicatorT.InternalProps>(props, defaultProps);\n // eslint-disable-next-line no-unused-vars\n const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n\n const Wrapper = useMemo(() => (withTooltip ? DSTooltipV3 : EmptyComp), [withTooltip]);\n\n const uniqueId = useMemo(() => uid(16), []);\n const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);\n\n const hexColor = useMemo(() => colorToHex[color], [color]);\n\n return (\n <StyledContainer\n gutter=\"xs\"\n justifyContent=\"center\"\n role=\"status\"\n aria-label={text || 'Loading...'}\n {...ownerPropsConfig}\n {...globalAttributes}\n >\n <Wrapper text={text} textAlign=\"center\" startPlacementPreference={tooltipStartPlacementPreference}>\n <svg\n width={sizeToPx[size]}\n height={sizeToPx[size]}\n style={{\n display: 'block',\n margin: 'auto',\n }}\n aria-hidden=\"true\"\n >\n <defs>\n <linearGradient id={`${uniqueId}-lg1`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"20%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"80%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg2`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg3`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg4`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"90%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <clipPath id={`${uniqueId}-lcp1`}>\n <rect x={sizeToWeight[size]} y={0} width=\"100%\" height={sizeToWeight[size]} />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp2`}>\n <rect x={paddedCoordinate} y={sizeToWeight[size]} width={sizeToWeight[size]} height=\"100%\" />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp3`}>\n <rect x={0} y={paddedCoordinate} width={paddedCoordinate} height={sizeToWeight[size]} />\n </clipPath>\n </defs>\n <StyledLineLeft size={size} fill={`url(#${uniqueId}-lg1)`} {...ownerPropsConfig} />\n <StyledLineTop\n size={size}\n fill={`url(#${uniqueId}-lg2)`}\n clipPath={`url(#${uniqueId}-lcp1)`}\n {...ownerPropsConfig}\n />\n <StyledLineRight\n size={size}\n fill={`url(#${uniqueId}-lg3)`}\n clipPath={`url(#${uniqueId}-lcp2)`}\n {...ownerPropsConfig}\n />\n <StyledLineBottom\n size={size}\n fill={`url(#${uniqueId}-lg4)`}\n clipPath={`url(#${uniqueId}-lcp3)`}\n {...ownerPropsConfig}\n />\n </svg>\n {text !== '' && showText && (\n <span style={{ color: colorToHex[color], fontSize: sizeToTextSize[size] }}>{text}</span>\n )}\n </Wrapper>\n </StyledContainer>\n );\n};\n\nDSSquareIndicator.displayName = 'DSSquareIndicator';\nexport const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);\nDSSquareIndicatorWithSchema.propTypes = SquareIndicatorPropTypes;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACeoD,wBAqC/D,YArC+D;AAf3E,SAAgB,eAAe;AAC/B,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW;AAEpB,SAAS,cAAc,gCAAgC;AACvD,SAAS,iBAAiB,gBAAgB,eAAe,iBAAiB,wBAAwB;AAClG,SAAS,YAAY,UAAU,gBAAgB,oBAAoB;AAGnE,MAAM,YAA0D,CAAC,UAAU,gCAAG,gBAAM,UAAS;AAEtF,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,mBAAmB,6BAA+D,OAAO,YAAY;AAE3G,QAAM,EAAE,QAAQ,OAAO,MAAM,MAAM,MAAM,GAAG,iBAAiB,IAAI,uBAAuB,gBAAgB;AAExG,QAAM,EAAE,MAAM,OAAO,MAAM,UAAU,aAAa,gCAAgC,IAAI;AACtF,QAAM,mBAAmB,cAAc,gBAAgB;AAEvD,QAAM,UAAU,QAAQ,MAAO,cAAc,cAAc,WAAY,CAAC,WAAW,CAAC;AAEpF,QAAM,WAAW,QAAQ,MAAM,IAAI,EAAE,GAAG,CAAC,CAAC;AAC1C,QAAM,mBAAmB,QAAQ,MAAM,eAAe,aAAa,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AAEnF,QAAM,WAAW,QAAQ,MAAM,WAAW,KAAK,GAAG,CAAC,KAAK,CAAC;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAO;AAAA,MACP,gBAAe;AAAA,MACf,MAAK;AAAA,MACL,cAAY,QAAQ;AAAA,M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 import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSSquareIndicatorName = "DSSquareindicator";
4
+ const SQUARE_INDICATOR_SLOTS = {
5
+ ROOT: "root",
6
+ LINE_LEFT: "line-left",
7
+ LINE_TOP: "line-top",
8
+ LINE_RIGHT: "line-right",
9
+ LINE_BOTTOM: "line-bottom"
10
+ };
11
+ const SQUARE_INDICATOR_DATA_TESTID = slotObjectToDataTestIds(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS);
12
+ const sizeToPx = {
13
+ xs: "16px",
14
+ s: "24px",
15
+ m: "32px",
16
+ l: "48px",
17
+ xl: "56px",
18
+ xxl: "64px"
19
+ };
20
+ const sizeToWeight = {
21
+ xs: "3px",
22
+ s: "3px",
23
+ m: "3px",
24
+ l: "4px",
25
+ xl: "5px",
26
+ xxl: "6px"
27
+ };
28
+ const colorToHex = {
29
+ light: "#FFFFFF",
30
+ dark: "#0F364A"
31
+ };
32
+ const sizeToTextSize = {
33
+ xs: "12px",
34
+ s: "12px",
35
+ m: "12px",
36
+ l: "13px",
37
+ xl: "14px",
38
+ xxl: "16px"
39
+ };
40
+ export {
41
+ DSSquareIndicatorName,
42
+ SQUARE_INDICATOR_DATA_TESTID,
43
+ SQUARE_INDICATOR_SLOTS,
44
+ colorToHex,
45
+ sizeToPx,
46
+ sizeToTextSize,
47
+ sizeToWeight
48
+ };
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSSquareIndicatorName = 'DSSquareindicator';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const SQUARE_INDICATOR_SLOTS = {\n ROOT: 'root',\n LINE_LEFT: 'line-left',\n LINE_TOP: 'line-top',\n LINE_RIGHT: 'line-right',\n LINE_BOTTOM: 'line-bottom',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const SQUARE_INDICATOR_DATA_TESTID = slotObjectToDataTestIds(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS);\n\nexport const sizeToPx = {\n xs: '16px',\n s: '24px',\n m: '32px',\n l: '48px',\n xl: '56px',\n xxl: '64px',\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#FFFFFF',\n dark: '#0F364A',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,wBAAwB;AAG9B,MAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AACf;AAGO,MAAM,+BAA+B,wBAAwB,uBAAuB,sBAAsB;AAE1G,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;",
6
+ "names": []
7
+ }
package/dist/esm/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  import * as React from "react";
2
2
  import { DSSquareIndicator, DSSquareIndicatorWithSchema } from "./DSSquareIndicator.js";
3
+ import { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, SQUARE_INDICATOR_DATA_TESTID } from "./constants/index.js";
3
4
  export {
4
5
  DSSquareIndicator,
5
- DSSquareIndicatorWithSchema
6
+ DSSquareIndicatorName,
7
+ DSSquareIndicatorWithSchema,
8
+ SQUARE_INDICATOR_DATA_TESTID,
9
+ SQUARE_INDICATOR_SLOTS
6
10
  };
7
11
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';\nexport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,mBAAmB,mCAAmC;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';\nexport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nexport { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, SQUARE_INDICATOR_DATA_TESTID } from './constants/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,mBAAmB,mCAAmC;AAE/D,SAAS,uBAAuB,wBAAwB,oCAAoC;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
- import { PropTypes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
2
+ import { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
3
+ import { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS } from "./constants/index.js";
3
4
  const defaultProps = {
4
5
  size: "m",
5
6
  color: "dark",
@@ -8,7 +9,8 @@ const defaultProps = {
8
9
  withTooltip: false,
9
10
  tooltipStartPlacementPreference: "bottom"
10
11
  };
11
- const SquareIndicatorPropTypes = {
12
+ const DSSquareIndicatorPropTypes = {
13
+ ...getPropsPerSlotPropTypes(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS),
12
14
  ...globalAttributesPropTypes,
13
15
  size: PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl"]).description("Size of the indicator").defaultValue("m"),
14
16
  color: PropTypes.oneOf(["light", "dark"]).description("Color mode for the indicator").defaultValue("dark"),
@@ -28,9 +30,11 @@ const SquareIndicatorPropTypes = {
28
30
  "left-end",
29
31
  "left",
30
32
  "left-start"
31
- ]).description("start placement preference for the tooltip").defaultValue("center")
33
+ ]).description("start placement preference for the tooltip").defaultValue("bottom")
32
34
  };
35
+ const SquareIndicatorPropTypes = DSSquareIndicatorPropTypes;
33
36
  export {
37
+ DSSquareIndicatorPropTypes,
34
38
  SquareIndicatorPropTypes,
35
39
  defaultProps
36
40
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSSquareIndicatorT {\n export interface DefaultProps {\n size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n color: 'light' | 'dark';\n text: string;\n showText: boolean;\n withTooltip: boolean;\n tooltipStartPlacementPreference:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n }\n\n export interface Props extends Partial<DefaultProps> {}\n\n export interface InternalProps extends DefaultProps {}\n}\n\nexport const defaultProps: DSSquareIndicatorT.DefaultProps = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nexport const SquareIndicatorPropTypes = {\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),\n color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),\n text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),\n showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),\n withTooltip: PropTypes.bool\n .description('Whether to include a tooltip that shows the optional text on hover')\n .defaultValue(false),\n tooltipStartPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preference for the tooltip')\n .defaultValue('center'),\n} as WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,iCAAiC;AA8B9C,MAAM,eAAgD;AAAA,EAC3D,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEO,MAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH,MAAM,UAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,UAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,UAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,UAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,UAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,UAAU,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,4CAA4C,EACxD,aAAa,QAAQ;AAC1B;",
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS } from './constants/index.js';\n\nexport declare namespace DSSquareIndicatorT {\n export type SlotFunctionArguments = {\n dsSquareindicatorRoot: () => object;\n dsSquareindicatorLineLeft: () => object;\n dsSquareindicatorLineTop: () => object;\n dsSquareindicatorLineRight: () => object;\n dsSquareindicatorLineBottom: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n color: 'light' | 'dark';\n text: string;\n showText: boolean;\n withTooltip: boolean;\n tooltipStartPlacementPreference:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSSquareIndicatorName,\n typeof SQUARE_INDICATOR_SLOTS\n > {}\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSSquareIndicatorT.DefaultProps = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nexport const DSSquareIndicatorPropTypes: DSPropTypesSchema<DSSquareIndicatorT.Props> = {\n ...getPropsPerSlotPropTypes(DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS),\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),\n color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),\n text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),\n showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),\n withTooltip: PropTypes.bool\n .description('Whether to include a tooltip that shows the optional text on hover')\n .defaultValue(false),\n tooltipStartPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preference for the tooltip')\n .defaultValue('bottom'),\n};\n\nexport const SquareIndicatorPropTypes =\n DSSquareIndicatorPropTypes as unknown as ValidationMap<DSSquareIndicatorT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,0BAA0B,iCAAiC;AAE/E,SAAS,uBAAuB,8BAA8B;AAsDvD,MAAM,eAAgD;AAAA,EAC3D,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEO,MAAM,6BAA0E;AAAA,EACrF,GAAG,yBAAyB,uBAAuB,sBAAsB;AAAA,EACzE,GAAG;AAAA,EACH,MAAM,UAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,UAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,UAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,UAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,UAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,UAAU,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,4CAA4C,EACxD,aAAa,QAAQ;AAC1B;AAEO,MAAM,2BACX;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { kfrm, styled } from "@elliemae/ds-system";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
- import { sizeToWeight } from "./constants.js";
4
+ import { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, sizeToWeight } from "./constants/index.js";
5
5
  const lineLeftAnimation = kfrm`
6
6
  0% {
7
7
  y: 100%;
@@ -58,31 +58,46 @@ const lineBottomAnimation = kfrm`
58
58
  width: 200%;
59
59
  }
60
60
  `;
61
- const StyledContainer = styled(Grid)`
61
+ const StyledContainer = styled(Grid, {
62
+ name: DSSquareIndicatorName,
63
+ slot: SQUARE_INDICATOR_SLOTS.ROOT
64
+ })`
62
65
  z-index: ${({ theme }) => theme.zIndex.loader};
63
66
  `;
64
- const StyledLineLeft = styled.rect`
67
+ const StyledLineLeft = styled("rect", {
68
+ name: DSSquareIndicatorName,
69
+ slot: SQUARE_INDICATOR_SLOTS.LINE_LEFT
70
+ })`
65
71
  x: 0;
66
72
  y: 0%;
67
73
  width: ${({ size }) => sizeToWeight[size]};
68
74
  height: 100%;
69
75
  animation: ${lineLeftAnimation} 2.5s linear 0s infinite;
70
76
  `;
71
- const StyledLineTop = styled.rect`
77
+ const StyledLineTop = styled("rect", {
78
+ name: DSSquareIndicatorName,
79
+ slot: SQUARE_INDICATOR_SLOTS.LINE_TOP
80
+ })`
72
81
  x: -100%;
73
82
  y: 0;
74
83
  width: 200%;
75
84
  height: ${({ size }) => sizeToWeight[size]};
76
85
  animation: ${lineTopAnimation} 2.5s linear 0s infinite;
77
86
  `;
78
- const StyledLineRight = styled.rect`
87
+ const StyledLineRight = styled("rect", {
88
+ name: DSSquareIndicatorName,
89
+ slot: SQUARE_INDICATOR_SLOTS.LINE_RIGHT
90
+ })`
79
91
  x: calc(100% - ${({ size }) => sizeToWeight[size]});
80
92
  y: -100%;
81
93
  width: ${({ size }) => sizeToWeight[size]};
82
94
  height: 200%;
83
95
  animation: ${lineRightAnimation} 2.5s linear 0s infinite;
84
96
  `;
85
- const StyledLineBottom = styled.rect`
97
+ const StyledLineBottom = styled("rect", {
98
+ name: DSSquareIndicatorName,
99
+ slot: SQUARE_INDICATOR_SLOTS.LINE_BOTTOM
100
+ })`
86
101
  x: 0%;
87
102
  y: calc(100% - ${({ size }) => sizeToWeight[size]});
88
103
  width: 200%;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { kfrm, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { sizeToWeight } from './constants.js';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n}\n\nconst lineLeftAnimation = kfrm`\n 0% {\n y: 100%;\n height: 100%;\n }\n 12.5%, 50% {\n y: 0;\n height: 100%;\n }\n 62.5%, 100% {\n y: -100%;\n height: 100%;\n }\n`;\n\nconst lineTopAnimation = kfrm`\n 0% {\n x: -100%;\n width: 0%;\n }\n 25%, 50% {\n x: -100%;\n width: 200%;\n }\n 75%, 100% {\n x: 100%;\n width: 200%;\n }\n`;\n\nconst lineRightAnimation = kfrm`\n 0%, 12.5% {\n y: -100%;\n height: 0%;\n }\n 37.5%, 62.5% {\n y: -100%;\n height: 200%;\n }\n 87.5%, 100% {\n y: 100%;\n height: 200%;\n }\n`;\n\nconst lineBottomAnimation = kfrm`\n 0%, 25% {\n x: 200%;\n width: 200%;\n }\n 50%, 75% {\n x: 0%;\n width: 200%;\n }\n 100% {\n x: -200%;\n width: 200%;\n }\n`;\n\nexport const StyledContainer = styled(Grid)`\n z-index: ${({ theme }) => theme.zIndex.loader};\n`;\n\nexport const StyledLineLeft = styled.rect<RectProps>`\n x: 0;\n y: 0%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 100%;\n animation: ${lineLeftAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineTop = styled.rect<RectProps>`\n x: -100%;\n y: 0;\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineTopAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineRight = styled.rect<RectProps>`\n x: calc(100% - ${({ size }) => sizeToWeight[size]});\n y: -100%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 200%;\n animation: ${lineRightAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineBottom = styled.rect<RectProps>`\n x: 0%;\n y: calc(100% - ${({ size }) => sizeToWeight[size]});\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineBottomAnimation} 2.5s linear 0s infinite;\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAv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ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, sizeToWeight } from './constants/index.js';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n}\n\nconst lineLeftAnimation = kfrm`\n 0% {\n y: 100%;\n height: 100%;\n }\n 12.5%, 50% {\n y: 0;\n height: 100%;\n }\n 62.5%, 100% {\n y: -100%;\n height: 100%;\n }\n`;\n\nconst lineTopAnimation = kfrm`\n 0% {\n x: -100%;\n width: 0%;\n }\n 25%, 50% {\n x: -100%;\n width: 200%;\n }\n 75%, 100% {\n x: 100%;\n width: 200%;\n }\n`;\n\nconst lineRightAnimation = kfrm`\n 0%, 12.5% {\n y: -100%;\n height: 0%;\n }\n 37.5%, 62.5% {\n y: -100%;\n height: 200%;\n }\n 87.5%, 100% {\n y: 100%;\n height: 200%;\n }\n`;\n\nconst lineBottomAnimation = kfrm`\n 0%, 25% {\n x: 200%;\n width: 200%;\n }\n 50%, 75% {\n x: 0%;\n width: 200%;\n }\n 100% {\n x: -200%;\n width: 200%;\n }\n`;\n\nexport const StyledContainer = styled(Grid, {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.ROOT,\n})`\n z-index: ${({ theme }) => theme.zIndex.loader};\n`;\n\nexport const StyledLineLeft = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_LEFT,\n})<RectProps>`\n x: 0;\n y: 0%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 100%;\n animation: ${lineLeftAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineTop = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_TOP,\n})<RectProps>`\n x: -100%;\n y: 0;\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineTopAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineRight = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_RIGHT,\n})<RectProps>`\n x: calc(100% - ${({ size }) => sizeToWeight[size]});\n y: -100%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 200%;\n animation: ${lineRightAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineBottom = styled('rect', {\n name: DSSquareIndicatorName,\n slot: SQUARE_INDICATOR_SLOTS.LINE_BOTTOM,\n})<RectProps>`\n x: 0%;\n y: calc(100% - ${({ size }) => sizeToWeight[size]});\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineBottomAnimation} 2.5s linear 0s infinite;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,MAAM,cAAc;AAC7B,SAAS,YAAY;AAErB,SAAS,uBAAuB,wBAAwB,oBAAoB;AAM5E,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe1B,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezB,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe3B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAerB,MAAM,kBAAkB,OAAO,MAAM;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA,aACY,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAGxC,MAAM,iBAAiB,OAAO,QAAQ;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA,WAGU,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI,CAAC;AAAA;AAAA,eAE5B,iBAAiB;AAAA;AAGzB,MAAM,gBAAgB,OAAO,QAAQ;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA;AAAA,YAIW,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI,CAAC;AAAA,eAC7B,gBAAgB;AAAA;AAGxB,MAAM,kBAAkB,OAAO,QAAQ;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA,mBACkB,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI,CAAC;AAAA;AAAA,WAExC,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI,CAAC;AAAA;AAAA,eAE5B,kBAAkB;AAAA;AAG1B,MAAM,mBAAmB,OAAO,QAAQ;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA,mBAEkB,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI,CAAC;AAAA;AAAA,YAEvC,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI,CAAC;AAAA,eAC7B,mBAAmB;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ const SlotPropsAsObject = {
3
+ dsSquareindicatorRoot: { "aria-label": "just a typescript test" },
4
+ dsSquareindicatorLineLeft: { "aria-label": "just a typescript test" },
5
+ dsSquareindicatorLineTop: { "aria-label": "just a typescript test" },
6
+ dsSquareindicatorLineRight: { "aria-label": "just a typescript test" },
7
+ dsSquareindicatorLineBottom: { "aria-label": "just a typescript test" }
8
+ };
9
+ const SlotPropsAsFunctions = {
10
+ dsSquareindicatorRoot: () => ({ "aria-label": "just a typescript test" }),
11
+ dsSquareindicatorLineLeft: () => ({ "aria-label": "just a typescript test" }),
12
+ dsSquareindicatorLineTop: () => ({ "aria-label": "just a typescript test" }),
13
+ dsSquareindicatorLineRight: () => ({ "aria-label": "just a typescript test" }),
14
+ dsSquareindicatorLineBottom: () => ({ "aria-label": "just a typescript test" })
15
+ };
16
+ const SlotFunctionsAreValidProps = SlotPropsAsFunctions;
17
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
18
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS } from '../constants/index.js';\nimport type { DSSquareIndicatorT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSSquareIndicatorT.Props> = {\n dsSquareindicatorRoot: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineLeft: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineTop: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineRight: { 'aria-label': 'just a typescript test' },\n dsSquareindicatorLineBottom: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSSquareIndicatorT.SlotFunctionArguments = {\n dsSquareindicatorRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineLeft: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineTop: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineRight: () => ({ 'aria-label': 'just a typescript test' }),\n dsSquareindicatorLineBottom: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// The function form must also be accepted by the public Props, slot by slot\nconst SlotFunctionsAreValidProps: Partial<DSSquareIndicatorT.Props> = SlotPropsAsFunctions;\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSSquareIndicatorName, typeof SQUARE_INDICATOR_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACKvB,MAAM,oBAAuD;AAAA,EAC3D,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,6BAA6B,EAAE,cAAc,yBAAyB;AACxE;AAEA,MAAM,uBAAiE;AAAA,EACrE,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAC/E;AAGA,MAAM,6BAAgE;AAGtE,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -50,10 +50,34 @@ const testDefinitionAsConst = {
50
50
  withTooltip: false,
51
51
  tooltipStartPlacementPreference: "bottom"
52
52
  };
53
+ const testGlobalAttributesAndSlots = {
54
+ text: "Loading",
55
+ id: "documents-loader",
56
+ className: "custom-class",
57
+ "aria-label": "Loading the loan documents",
58
+ dsSquareindicatorRoot: { "aria-describedby": "loader-help" },
59
+ dsSquareindicatorLineLeft: () => ({ "data-custom": "left" })
60
+ };
61
+ const testGlobalAttributesAndSlotsAsConst = {
62
+ id: "documents-loader",
63
+ "aria-label": "Loading the loan documents",
64
+ dsSquareindicatorLineBottom: { "data-custom": "bottom" }
65
+ };
53
66
  const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
54
67
  /* @__PURE__ */ jsx(DSSquareIndicator, { ...testExplicitDefinition }),
55
68
  /* @__PURE__ */ jsx(DSSquareIndicator, { ...testInferedTypeCompatibility }),
56
69
  /* @__PURE__ */ jsx(DSSquareIndicator, { ...testDefinitionAsConst }),
57
- /* @__PURE__ */ jsx(DSSquareIndicator, { size: "m", color: "dark", text: "", showText: true, withTooltip: true, tooltipStartPlacementPreference: "bottom" })
70
+ /* @__PURE__ */ jsx(DSSquareIndicator, { ...testGlobalAttributesAndSlots }),
71
+ /* @__PURE__ */ jsx(DSSquareIndicator, { ...testGlobalAttributesAndSlotsAsConst }),
72
+ /* @__PURE__ */ jsx(DSSquareIndicator, { size: "m", color: "dark", text: "", showText: true, withTooltip: true, tooltipStartPlacementPreference: "bottom" }),
73
+ /* @__PURE__ */ jsx(
74
+ DSSquareIndicator,
75
+ {
76
+ "data-testid": "ds-squareindicator",
77
+ "aria-label": "Loading the loan documents",
78
+ dsSquareindicatorRoot: { "aria-describedby": "loader-help" },
79
+ dsSquareindicatorLineTop: () => ({ "data-custom": "top" })
80
+ }
81
+ )
58
82
  ] });
59
83
  //# sourceMappingURL=typescript-square-indicator-valid.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-square-indicator-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSSquareIndicator } from '../index.js';\nimport type { DSSquareIndicatorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSSquareIndicatorT.Props;\ntype ComponentPropsInternals = DSSquareIndicatorT.InternalProps;\ntype ComponentPropsDefaultProps = DSSquareIndicatorT.DefaultProps;\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n color: 'dark',\n size: 'm',\n text: '',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSSquareIndicator {...testExplicitDefinition} />\n <DSSquareIndicator {...testInferedTypeCompatibility} />\n <DSSquareIndicator {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSSquareIndicator size=\"m\" color=\"dark\" text=\"\" showText withTooltip tooltipStartPlacementPreference=\"bottom\" />\n </>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACyErB,mBAEE,KAFF;AAxEF,SAAS,yBAAyB;AAUlC,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,qBAAmB,GAAG,wBAAwB;AAAA,EAC/C,oBAAC,qBAAmB,GAAG,8BAA8B;AAAA,EACrD,oBAAC,qBAAmB,GAAG,uBAAuB;AAAA,EAE9C,oBAAC,qBAAkB,MAAK,KAAI,OAAM,QAAO,MAAK,IAAG,UAAQ,MAAC,aAAW,MAAC,iCAAgC,UAAS;AAAA,GACjH;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSSquareIndicator } from '../index.js';\nimport type { DSSquareIndicatorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSSquareIndicatorT.Props;\ntype ComponentPropsInternals = DSSquareIndicatorT.InternalProps;\ntype ComponentPropsDefaultProps = DSSquareIndicatorT.DefaultProps;\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n color: 'dark',\n size: 'm',\n text: '',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n} as const;\n\n// global attributes are forwarded to the root, slot props accept both the object and the function form\nconst testGlobalAttributesAndSlots: ComponentPropsForApp = {\n text: 'Loading',\n id: 'documents-loader',\n className: 'custom-class',\n 'aria-label': 'Loading the loan documents',\n dsSquareindicatorRoot: { 'aria-describedby': 'loader-help' },\n dsSquareindicatorLineLeft: () => ({ 'data-custom': 'left' }),\n};\n\nconst testGlobalAttributesAndSlotsAsConst = {\n id: 'documents-loader',\n 'aria-label': 'Loading the loan documents',\n dsSquareindicatorLineBottom: { 'data-custom': 'bottom' },\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSSquareIndicator {...testExplicitDefinition} />\n <DSSquareIndicator {...testInferedTypeCompatibility} />\n <DSSquareIndicator {...testDefinitionAsConst} />\n <DSSquareIndicator {...testGlobalAttributesAndSlots} />\n <DSSquareIndicator {...testGlobalAttributesAndSlotsAsConst} />\n {/* works with inline values */}\n <DSSquareIndicator size=\"m\" color=\"dark\" text=\"\" showText withTooltip tooltipStartPlacementPreference=\"bottom\" />\n <DSSquareIndicator\n data-testid=\"ds-squareindicator\"\n aria-label=\"Loading the loan documents\"\n dsSquareindicatorRoot={{ 'aria-describedby': 'loader-help' }}\n dsSquareindicatorLineTop={() => ({ 'data-custom': 'top' })}\n />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACyFrB,mBAEE,KAFF;AAxFF,SAAS,yBAAyB;AAUlC,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;AAGA,MAAM,+BAAqD;AAAA,EACzD,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,cAAc;AAAA,EACd,uBAAuB,EAAE,oBAAoB,cAAc;AAAA,EAC3D,2BAA2B,OAAO,EAAE,eAAe,OAAO;AAC5D;AAEA,MAAM,sCAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,cAAc;AAAA,EACd,6BAA6B,EAAE,eAAe,SAAS;AACzD;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,qBAAmB,GAAG,wBAAwB;AAAA,EAC/C,oBAAC,qBAAmB,GAAG,8BAA8B;AAAA,EACrD,oBAAC,qBAAmB,GAAG,uBAAuB;AAAA,EAC9C,oBAAC,qBAAmB,GAAG,8BAA8B;AAAA,EACrD,oBAAC,qBAAmB,GAAG,qCAAqC;AAAA,EAE5D,oBAAC,qBAAkB,MAAK,KAAI,OAAM,QAAO,MAAK,IAAG,UAAQ,MAAC,aAAW,MAAC,iCAAgC,UAAS;AAAA,EAC/G;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,cAAW;AAAA,MACX,uBAAuB,EAAE,oBAAoB,cAAc;AAAA,MAC3D,0BAA0B,OAAO,EAAE,eAAe,MAAM;AAAA;AAAA,EAC1D;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,43 @@
1
+ export declare const DSSquareIndicatorName = "DSSquareindicator";
2
+ export declare const SQUARE_INDICATOR_SLOTS: {
3
+ readonly ROOT: "root";
4
+ readonly LINE_LEFT: "line-left";
5
+ readonly LINE_TOP: "line-top";
6
+ readonly LINE_RIGHT: "line-right";
7
+ readonly LINE_BOTTOM: "line-bottom";
8
+ };
9
+ export declare const SQUARE_INDICATOR_DATA_TESTID: {
10
+ readonly ROOT: "ds-squareindicator-root";
11
+ readonly LINE_LEFT: "ds-squareindicator-line-left";
12
+ readonly LINE_TOP: "ds-squareindicator-line-top";
13
+ readonly LINE_RIGHT: "ds-squareindicator-line-right";
14
+ readonly LINE_BOTTOM: "ds-squareindicator-line-bottom";
15
+ };
16
+ export declare const sizeToPx: {
17
+ xs: string;
18
+ s: string;
19
+ m: string;
20
+ l: string;
21
+ xl: string;
22
+ xxl: string;
23
+ };
24
+ export declare const sizeToWeight: {
25
+ xs: string;
26
+ s: string;
27
+ m: string;
28
+ l: string;
29
+ xl: string;
30
+ xxl: string;
31
+ };
32
+ export declare const colorToHex: {
33
+ light: string;
34
+ dark: string;
35
+ };
36
+ export declare const sizeToTextSize: {
37
+ xs: string;
38
+ s: string;
39
+ m: string;
40
+ l: string;
41
+ xl: string;
42
+ xxl: string;
43
+ };
@@ -1,2 +1,3 @@
1
1
  export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';
2
2
  export type { DSSquareIndicatorT } from './react-desc-prop-types.js';
3
+ export { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS, SQUARE_INDICATOR_DATA_TESTID } from './constants/index.js';
@@ -1,5 +1,16 @@
1
- import type { WeakValidationMap } from 'react';
1
+ import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap } from '@elliemae/ds-props-helpers';
2
+ import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
3
+ import { DSSquareIndicatorName, SQUARE_INDICATOR_SLOTS } from './constants/index.js';
2
4
  export declare namespace DSSquareIndicatorT {
5
+ type SlotFunctionArguments = {
6
+ dsSquareindicatorRoot: () => object;
7
+ dsSquareindicatorLineLeft: () => object;
8
+ dsSquareindicatorLineTop: () => object;
9
+ dsSquareindicatorLineRight: () => object;
10
+ dsSquareindicatorLineBottom: () => object;
11
+ };
12
+ interface RequiredProps {
13
+ }
3
14
  interface DefaultProps {
4
15
  size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
5
16
  color: 'light' | 'dark';
@@ -8,10 +19,13 @@ export declare namespace DSSquareIndicatorT {
8
19
  withTooltip: boolean;
9
20
  tooltipStartPlacementPreference: 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
10
21
  }
11
- interface Props extends Partial<DefaultProps> {
22
+ interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSSquareIndicatorName, typeof SQUARE_INDICATOR_SLOTS> {
23
+ }
24
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>, RequiredProps {
12
25
  }
13
- interface InternalProps extends DefaultProps {
26
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>, RequiredProps {
14
27
  }
15
28
  }
16
29
  export declare const defaultProps: DSSquareIndicatorT.DefaultProps;
17
- export declare const SquareIndicatorPropTypes: WeakValidationMap<unknown>;
30
+ export declare const DSSquareIndicatorPropTypes: DSPropTypesSchema<DSSquareIndicatorT.Props>;
31
+ export declare const SquareIndicatorPropTypes: ValidationMap<DSSquareIndicatorT.Props>;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@elliemae/ds-square-indicator",
3
- "version": "3.80.0-next.36",
3
+ "version": "3.80.0-next.39",
4
4
  "license": "MIT",
5
- "description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
5
+ "description": "ICE MT - Dimsum - Square Indicator",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -36,16 +36,17 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-grid": "3.80.0-next.36",
40
- "@elliemae/ds-props-helpers": "3.80.0-next.36",
41
- "@elliemae/ds-system": "3.80.0-next.36",
42
- "@elliemae/ds-tooltip-v3": "3.80.0-next.36",
39
+ "@elliemae/ds-grid": "3.80.0-next.39",
40
+ "@elliemae/ds-props-helpers": "3.80.0-next.39",
41
+ "@elliemae/ds-system": "3.80.0-next.39",
42
+ "@elliemae/ds-tooltip-v3": "3.80.0-next.39",
43
+ "@elliemae/ds-typescript-helpers": "3.80.0-next.39",
43
44
  "styled-components": "~5.3.11",
44
45
  "uid": "^2.0.2"
45
46
  },
46
47
  "devDependencies": {
47
- "@elliemae/ds-monorepo-devops": "3.80.0-next.36",
48
- "@elliemae/ds-test-utils": "3.80.0-next.36",
48
+ "@elliemae/ds-monorepo-devops": "3.80.0-next.39",
49
+ "@elliemae/ds-test-utils": "3.80.0-next.39",
49
50
  "jest": "^30.0.0",
50
51
  "styled-components": "~5.3.11"
51
52
  },
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/constants.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const sizeToPx = {\n xs: '16px',\n s: '24px',\n m: '32px',\n l: '48px',\n xl: '56px',\n xxl: '64px',\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#FFFFFF',\n dark: '#0F364A',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;",
6
- "names": []
7
- }
@@ -1,36 +0,0 @@
1
- import * as React from "react";
2
- const sizeToPx = {
3
- xs: "16px",
4
- s: "24px",
5
- m: "32px",
6
- l: "48px",
7
- xl: "56px",
8
- xxl: "64px"
9
- };
10
- const sizeToWeight = {
11
- xs: "3px",
12
- s: "3px",
13
- m: "3px",
14
- l: "4px",
15
- xl: "5px",
16
- xxl: "6px"
17
- };
18
- const colorToHex = {
19
- light: "#FFFFFF",
20
- dark: "#0F364A"
21
- };
22
- const sizeToTextSize = {
23
- xs: "12px",
24
- s: "12px",
25
- m: "12px",
26
- l: "13px",
27
- xl: "14px",
28
- xxl: "16px"
29
- };
30
- export {
31
- colorToHex,
32
- sizeToPx,
33
- sizeToTextSize,
34
- sizeToWeight
35
- };
36
- //# sourceMappingURL=constants.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/constants.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const sizeToPx = {\n xs: '16px',\n s: '24px',\n m: '32px',\n l: '48px',\n xl: '56px',\n xxl: '64px',\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#FFFFFF',\n dark: '#0F364A',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;",
6
- "names": []
7
- }
@@ -1,28 +0,0 @@
1
- export declare const sizeToPx: {
2
- xs: string;
3
- s: string;
4
- m: string;
5
- l: string;
6
- xl: string;
7
- xxl: string;
8
- };
9
- export declare const sizeToWeight: {
10
- xs: string;
11
- s: string;
12
- m: string;
13
- l: string;
14
- xl: string;
15
- xxl: string;
16
- };
17
- export declare const colorToHex: {
18
- light: string;
19
- dark: string;
20
- };
21
- export declare const sizeToTextSize: {
22
- xs: string;
23
- s: string;
24
- m: string;
25
- l: string;
26
- xl: string;
27
- xxl: string;
28
- };