@elliemae/ds-chip 3.1.4-rc.2 → 3.1.5-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSChip.js +3 -1
- package/dist/cjs/DSChip.js.map +2 -2
- package/dist/esm/DSChip.js +4 -2
- package/dist/esm/DSChip.js.map +2 -2
- package/package.json +5 -5
package/dist/cjs/DSChip.js
CHANGED
|
@@ -54,6 +54,7 @@ var React = __toESM(require("react"));
|
|
|
54
54
|
var import_react = __toESM(require("react"));
|
|
55
55
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
56
56
|
var import_ds_tooltip = require("@elliemae/ds-tooltip");
|
|
57
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
57
58
|
var import_useConfig = require("./config/useConfig");
|
|
58
59
|
var import_styles = require("./styles");
|
|
59
60
|
var import_constants = require("./constants");
|
|
@@ -62,13 +63,14 @@ const DSChip = (props) => {
|
|
|
62
63
|
const { size, shape, selected, innerRef, icon: Icon, globalAttrs, xStyledAttrs } = (0, import_useConfig.useConfig)(props);
|
|
63
64
|
const _a = globalAttrs, { shape: shapeGlobal, label, type, disabled } = _a, restGlobals = __objRest(_a, ["shape", "label", "type", "disabled"]);
|
|
64
65
|
const { setElement, isShowingEllipsis } = (0, import_ds_utilities.useIsShowingEllipsis)();
|
|
66
|
+
const theme = (0, import_react.useContext)(import_ds_system.ThemeContext);
|
|
65
67
|
const ConditionalTooltip = (0, import_react.useMemo)(() => isShowingEllipsis ? import_ds_tooltip.DSTooltipV3 : ({ children }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, children), [isShowingEllipsis]);
|
|
66
68
|
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledWrapper, {
|
|
67
69
|
buttonShape: shape,
|
|
68
70
|
buttonSize: size
|
|
69
71
|
}, /* @__PURE__ */ import_react.default.createElement(ConditionalTooltip, {
|
|
70
72
|
text: label,
|
|
71
|
-
zIndex:
|
|
73
|
+
zIndex: theme.zIndex.popper
|
|
72
74
|
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChip, __spreadValues(__spreadValues({
|
|
73
75
|
"aria-disabled": disabled,
|
|
74
76
|
disabled,
|
package/dist/cjs/DSChip.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSChip.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { useConfig } from './config/useConfig';\nimport { StyledChip, StyledChipLabel, StyledWrapper, StyledRoundShape, StyledSpanWithEllipsis } from './styles';\nimport { CHIP_SHAPES } from './constants';\nimport { DSChipT, DSChipPropTypes } from './react-desc-prop-types';\n\nconst DSChip: React.ComponentType<DSChipT.Props> = (props) => {\n const { size, shape, selected, innerRef, icon: Icon, globalAttrs, xStyledAttrs } = useConfig(props);\n\n const { shape: shapeGlobal, label, type, disabled, ...restGlobals } = globalAttrs;\n\n const { setElement, isShowingEllipsis } = useIsShowingEllipsis();\n\n const ConditionalTooltip = useMemo(\n () => (isShowingEllipsis ? DSTooltipV3 : ({ children }) => <>{children}</>),\n [isShowingEllipsis],\n );\n return (\n <StyledWrapper buttonShape={shape} buttonSize={size}>\n <ConditionalTooltip text={label} zIndex={
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import React, { useMemo, useContext } from 'react';\nimport { describe, useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { useConfig } from './config/useConfig';\nimport { StyledChip, StyledChipLabel, StyledWrapper, StyledRoundShape, StyledSpanWithEllipsis } from './styles';\nimport { CHIP_SHAPES } from './constants';\nimport { DSChipT, DSChipPropTypes } from './react-desc-prop-types';\n\nconst DSChip: React.ComponentType<DSChipT.Props> = (props) => {\n const { size, shape, selected, innerRef, icon: Icon, globalAttrs, xStyledAttrs } = useConfig(props);\n\n const { shape: shapeGlobal, label, type, disabled, ...restGlobals } = globalAttrs;\n\n const { setElement, isShowingEllipsis } = useIsShowingEllipsis();\n const theme = useContext(ThemeContext);\n\n const ConditionalTooltip = useMemo(\n () => (isShowingEllipsis ? DSTooltipV3 : ({ children }) => <>{children}</>),\n [isShowingEllipsis],\n );\n return (\n <StyledWrapper buttonShape={shape} buttonSize={size}>\n <ConditionalTooltip text={label} zIndex={theme.zIndex.popper}>\n <StyledChip\n aria-disabled={disabled}\n disabled={disabled}\n ref={innerRef}\n selected={selected}\n {...restGlobals}\n {...xStyledAttrs}\n >\n {shape === CHIP_SHAPES.ROUND ? (\n <StyledRoundShape disabled={disabled} size={size}>\n <Icon />\n </StyledRoundShape>\n ) : (\n <Icon />\n )}\n <StyledChipLabel>\n <StyledSpanWithEllipsis ref={setElement}>{label}</StyledSpanWithEllipsis>\n </StyledChipLabel>\n </StyledChip>\n </ConditionalTooltip>\n </StyledWrapper>\n );\n};\n\nDSChip.propTypes = DSChipPropTypes;\nDSChip.displayName = 'DSChip';\nconst DSChipWithSchema = describe(DSChip);\nDSChipWithSchema.propTypes = DSChipPropTypes;\n\nexport { DSChip, DSChipWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2C;AAC3C,0BAA+C;AAC/C,wBAA4B;AAC5B,uBAA6B;AAC7B,uBAA0B;AAC1B,oBAAqG;AACrG,uBAA4B;AAC5B,mCAAyC;AAEzC,MAAM,SAA6C,CAAC,UAAU;AAC5D,QAAM,EAAE,MAAM,OAAO,UAAU,UAAU,MAAM,MAAM,aAAa,iBAAiB,gCAAU,KAAK;AAElG,QAAsE,kBAA9D,SAAO,aAAa,OAAO,MAAM,aAA6B,IAAhB,wBAAgB,IAAhB,CAA9C,SAAoB,SAAO,QAAM;AAEzC,QAAM,EAAE,YAAY,sBAAsB,8CAAqB;AAC/D,QAAM,QAAQ,6BAAW,6BAAY;AAErC,QAAM,qBAAqB,0BACzB,MAAO,oBAAoB,gCAAc,CAAC,EAAE,eAAe,wFAAG,QAAS,GACvE,CAAC,iBAAiB,CACpB;AACA,SACE,mDAAC;AAAA,IAAc,aAAa;AAAA,IAAO,YAAY;AAAA,KAC7C,mDAAC;AAAA,IAAmB,MAAM;AAAA,IAAO,QAAQ,MAAM,OAAO;AAAA,KACpD,mDAAC;AAAA,IACC,iBAAe;AAAA,IACf;AAAA,IACA,KAAK;AAAA,IACL;AAAA,KACI,cACA,eAEH,UAAU,6BAAY,QACrB,mDAAC;AAAA,IAAiB;AAAA,IAAoB;AAAA,KACpC,mDAAC,UAAK,CACR,IAEA,mDAAC,UAAK,GAER,mDAAC,qCACC,mDAAC;AAAA,IAAuB,KAAK;AAAA,KAAa,KAAM,CAClD,CACF,CACF,CACF;AAEJ;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,MAAM,mBAAmB,kCAAS,MAAM;AACxC,iBAAiB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSChip.js
CHANGED
|
@@ -27,9 +27,10 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import * as React from "react";
|
|
30
|
-
import React2, { useMemo } from "react";
|
|
30
|
+
import React2, { useMemo, useContext } from "react";
|
|
31
31
|
import { describe, useIsShowingEllipsis } from "@elliemae/ds-utilities";
|
|
32
32
|
import { DSTooltipV3 } from "@elliemae/ds-tooltip";
|
|
33
|
+
import { ThemeContext } from "@elliemae/ds-system";
|
|
33
34
|
import { useConfig } from "./config/useConfig";
|
|
34
35
|
import { StyledChip, StyledChipLabel, StyledWrapper, StyledRoundShape, StyledSpanWithEllipsis } from "./styles";
|
|
35
36
|
import { CHIP_SHAPES } from "./constants";
|
|
@@ -38,13 +39,14 @@ const DSChip = (props) => {
|
|
|
38
39
|
const { size, shape, selected, innerRef, icon: Icon, globalAttrs, xStyledAttrs } = useConfig(props);
|
|
39
40
|
const _a = globalAttrs, { shape: shapeGlobal, label, type, disabled } = _a, restGlobals = __objRest(_a, ["shape", "label", "type", "disabled"]);
|
|
40
41
|
const { setElement, isShowingEllipsis } = useIsShowingEllipsis();
|
|
42
|
+
const theme = useContext(ThemeContext);
|
|
41
43
|
const ConditionalTooltip = useMemo(() => isShowingEllipsis ? DSTooltipV3 : ({ children }) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, children), [isShowingEllipsis]);
|
|
42
44
|
return /* @__PURE__ */ React2.createElement(StyledWrapper, {
|
|
43
45
|
buttonShape: shape,
|
|
44
46
|
buttonSize: size
|
|
45
47
|
}, /* @__PURE__ */ React2.createElement(ConditionalTooltip, {
|
|
46
48
|
text: label,
|
|
47
|
-
zIndex:
|
|
49
|
+
zIndex: theme.zIndex.popper
|
|
48
50
|
}, /* @__PURE__ */ React2.createElement(StyledChip, __spreadValues(__spreadValues({
|
|
49
51
|
"aria-disabled": disabled,
|
|
50
52
|
disabled,
|
package/dist/esm/DSChip.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSChip.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { describe, useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { useConfig } from './config/useConfig';\nimport { StyledChip, StyledChipLabel, StyledWrapper, StyledRoundShape, StyledSpanWithEllipsis } from './styles';\nimport { CHIP_SHAPES } from './constants';\nimport { DSChipT, DSChipPropTypes } from './react-desc-prop-types';\n\nconst DSChip: React.ComponentType<DSChipT.Props> = (props) => {\n const { size, shape, selected, innerRef, icon: Icon, globalAttrs, xStyledAttrs } = useConfig(props);\n\n const { shape: shapeGlobal, label, type, disabled, ...restGlobals } = globalAttrs;\n\n const { setElement, isShowingEllipsis } = useIsShowingEllipsis();\n\n const ConditionalTooltip = useMemo(\n () => (isShowingEllipsis ? DSTooltipV3 : ({ children }) => <>{children}</>),\n [isShowingEllipsis],\n );\n return (\n <StyledWrapper buttonShape={shape} buttonSize={size}>\n <ConditionalTooltip text={label} zIndex={
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,SAA6C,CAAC,UAAU;AAC5D,QAAM,EAAE,MAAM,OAAO,UAAU,UAAU,MAAM,MAAM,aAAa,iBAAiB,UAAU,KAAK;AAElG,QAAsE,kBAA9D,SAAO,aAAa,OAAO,MAAM,aAA6B,IAAhB,wBAAgB,IAAhB,CAA9C,SAAoB,SAAO,QAAM;AAEzC,QAAM,EAAE,YAAY,sBAAsB,qBAAqB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo, useContext } from 'react';\nimport { describe, useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { useConfig } from './config/useConfig';\nimport { StyledChip, StyledChipLabel, StyledWrapper, StyledRoundShape, StyledSpanWithEllipsis } from './styles';\nimport { CHIP_SHAPES } from './constants';\nimport { DSChipT, DSChipPropTypes } from './react-desc-prop-types';\n\nconst DSChip: React.ComponentType<DSChipT.Props> = (props) => {\n const { size, shape, selected, innerRef, icon: Icon, globalAttrs, xStyledAttrs } = useConfig(props);\n\n const { shape: shapeGlobal, label, type, disabled, ...restGlobals } = globalAttrs;\n\n const { setElement, isShowingEllipsis } = useIsShowingEllipsis();\n const theme = useContext(ThemeContext);\n\n const ConditionalTooltip = useMemo(\n () => (isShowingEllipsis ? DSTooltipV3 : ({ children }) => <>{children}</>),\n [isShowingEllipsis],\n );\n return (\n <StyledWrapper buttonShape={shape} buttonSize={size}>\n <ConditionalTooltip text={label} zIndex={theme.zIndex.popper}>\n <StyledChip\n aria-disabled={disabled}\n disabled={disabled}\n ref={innerRef}\n selected={selected}\n {...restGlobals}\n {...xStyledAttrs}\n >\n {shape === CHIP_SHAPES.ROUND ? (\n <StyledRoundShape disabled={disabled} size={size}>\n <Icon />\n </StyledRoundShape>\n ) : (\n <Icon />\n )}\n <StyledChipLabel>\n <StyledSpanWithEllipsis ref={setElement}>{label}</StyledSpanWithEllipsis>\n </StyledChipLabel>\n </StyledChip>\n </ConditionalTooltip>\n </StyledWrapper>\n );\n};\n\nDSChip.propTypes = DSChipPropTypes;\nDSChip.displayName = 'DSChip';\nconst DSChipWithSchema = describe(DSChip);\nDSChipWithSchema.propTypes = DSChipPropTypes;\n\nexport { DSChip, DSChipWithSchema };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,SAA6C,CAAC,UAAU;AAC5D,QAAM,EAAE,MAAM,OAAO,UAAU,UAAU,MAAM,MAAM,aAAa,iBAAiB,UAAU,KAAK;AAElG,QAAsE,kBAA9D,SAAO,aAAa,OAAO,MAAM,aAA6B,IAAhB,wBAAgB,IAAhB,CAA9C,SAAoB,SAAO,QAAM;AAEzC,QAAM,EAAE,YAAY,sBAAsB,qBAAqB;AAC/D,QAAM,QAAQ,WAAW,YAAY;AAErC,QAAM,qBAAqB,QACzB,MAAO,oBAAoB,cAAc,CAAC,EAAE,eAAe,4DAAG,QAAS,GACvE,CAAC,iBAAiB,CACpB;AACA,SACE,qCAAC;AAAA,IAAc,aAAa;AAAA,IAAO,YAAY;AAAA,KAC7C,qCAAC;AAAA,IAAmB,MAAM;AAAA,IAAO,QAAQ,MAAM,OAAO;AAAA,KACpD,qCAAC;AAAA,IACC,iBAAe;AAAA,IACf;AAAA,IACA,KAAK;AAAA,IACL;AAAA,KACI,cACA,eAEH,UAAU,YAAY,QACrB,qCAAC;AAAA,IAAiB;AAAA,IAAoB;AAAA,KACpC,qCAAC,UAAK,CACR,IAEA,qCAAC,UAAK,GAER,qCAAC,uBACC,qCAAC;AAAA,IAAuB,KAAK;AAAA,KAAa,KAAM,CAClD,CACF,CACF,CACF;AAEJ;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,MAAM,mBAAmB,SAAS,MAAM;AACxC,iBAAiB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chip",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chip",
|
|
6
6
|
"files": [
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"indent": 4
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@elliemae/ds-system": "3.1.
|
|
67
|
-
"@elliemae/ds-tooltip": "3.1.
|
|
68
|
-
"@elliemae/ds-utilities": "3.1.
|
|
66
|
+
"@elliemae/ds-system": "3.1.5-rc.2",
|
|
67
|
+
"@elliemae/ds-tooltip": "3.1.5-rc.2",
|
|
68
|
+
"@elliemae/ds-utilities": "3.1.5-rc.2"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@elliemae/ds-icons": "3.1.
|
|
71
|
+
"@elliemae/ds-icons": "3.1.5-rc.2",
|
|
72
72
|
"@testing-library/jest-dom": "~5.16.2",
|
|
73
73
|
"@testing-library/react": "~12.1.2",
|
|
74
74
|
"styled-components": "~5.3.3"
|