@carto/meridian-ds 1.4.3-alpha-tag.2 → 1.4.3-alpha-tag.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1860,12 +1860,12 @@ const TagIcon = material.styled("div")(({ theme }) => ({
|
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
}));
|
|
1863
|
-
const TagLabel = material.styled("
|
|
1864
|
-
shouldForwardProp: (prop) => !["type"
|
|
1865
|
-
})(({ type,
|
|
1863
|
+
const TagLabel = material.styled("div", {
|
|
1864
|
+
shouldForwardProp: (prop) => !["type"].includes(prop)
|
|
1865
|
+
})(({ type, theme }) => ({
|
|
1866
1866
|
display: "flex",
|
|
1867
1867
|
alignItems: "center",
|
|
1868
|
-
paddingTop: type === "code"
|
|
1868
|
+
paddingTop: type === "code" ? theme.spacing(0.25) : void 0
|
|
1869
1869
|
}));
|
|
1870
1870
|
function _Tag({
|
|
1871
1871
|
label,
|
|
@@ -1895,7 +1895,7 @@ function _Tag({
|
|
|
1895
1895
|
...otherProps,
|
|
1896
1896
|
children: [
|
|
1897
1897
|
icon && /* @__PURE__ */ jsxRuntime.jsx(TagIcon, { children: icon }),
|
|
1898
|
-
/* @__PURE__ */ jsxRuntime.jsx(TagLabel, {
|
|
1898
|
+
/* @__PURE__ */ jsxRuntime.jsx(TagLabel, { type, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1899
1899
|
TablePaginationActions.Typography,
|
|
1900
1900
|
{
|
|
1901
1901
|
component: "span",
|
package/dist/components/index.js
CHANGED
|
@@ -1859,12 +1859,12 @@ const TagIcon = styled("div")(({ theme }) => ({
|
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
1861
|
}));
|
|
1862
|
-
const TagLabel = styled("
|
|
1863
|
-
shouldForwardProp: (prop) => !["type"
|
|
1864
|
-
})(({ type,
|
|
1862
|
+
const TagLabel = styled("div", {
|
|
1863
|
+
shouldForwardProp: (prop) => !["type"].includes(prop)
|
|
1864
|
+
})(({ type, theme }) => ({
|
|
1865
1865
|
display: "flex",
|
|
1866
1866
|
alignItems: "center",
|
|
1867
|
-
paddingTop: type === "code"
|
|
1867
|
+
paddingTop: type === "code" ? theme.spacing(0.25) : void 0
|
|
1868
1868
|
}));
|
|
1869
1869
|
function _Tag({
|
|
1870
1870
|
label,
|
|
@@ -1894,7 +1894,7 @@ function _Tag({
|
|
|
1894
1894
|
...otherProps,
|
|
1895
1895
|
children: [
|
|
1896
1896
|
icon && /* @__PURE__ */ jsx(TagIcon, { children: icon }),
|
|
1897
|
-
/* @__PURE__ */ jsx(TagLabel, {
|
|
1897
|
+
/* @__PURE__ */ jsx(TagLabel, { type, children: /* @__PURE__ */ jsx(
|
|
1898
1898
|
Typography,
|
|
1899
1899
|
{
|
|
1900
1900
|
component: "span",
|
|
@@ -3,7 +3,7 @@ import { TypographyProps } from '../atoms';
|
|
|
3
3
|
export type TagColor = 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'default';
|
|
4
4
|
export type TagVariant = 'filled' | 'outlined';
|
|
5
5
|
export type TagType = 'default' | 'code';
|
|
6
|
-
export type TagProps = Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size' | 'label' | 'type'> & {
|
|
6
|
+
export type TagProps = Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size' | 'label' | 'type' | 'ref'> & {
|
|
7
7
|
/** Label, main content of tag, by default displayed as `caption` type typography. */
|
|
8
8
|
label: ReactNode;
|
|
9
9
|
color?: TagColor;
|
|
@@ -15,6 +15,17 @@ export type TagProps = Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size' | 'la
|
|
|
15
15
|
noWrap?: boolean;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
};
|
|
18
|
-
declare const Tag: import('react').ForwardRefExoticComponent<Omit<
|
|
18
|
+
declare const Tag: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLProps<HTMLDivElement>, "label" | "ref" | "type" | "size" | "as"> & {
|
|
19
|
+
/** Label, main content of tag, by default displayed as `caption` type typography. */
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
color?: TagColor;
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
variant?: TagVariant;
|
|
24
|
+
type?: TagType;
|
|
25
|
+
/** Options passed for Typography, use to override default styles */
|
|
26
|
+
typographyProps?: TypographyProps;
|
|
27
|
+
noWrap?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
19
30
|
export default Tag;
|
|
20
31
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAA;AAG3D,OAAO,EAAc,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhE,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,CAAA;AAEb,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE9C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAGxC,MAAM,MAAM,QAAQ,GAAG,IAAI,CACzB,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAC/B,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAA;AAG3D,OAAO,EAAc,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhE,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,CAAA;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