@hashicorp/mds-react 0.9.6 → 0.9.7
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/components/accordion/index.d.ts +1 -1
- package/components/accordion/item/index.d.ts +1 -1
- package/components/card/index.d.ts +2 -2
- package/components/code-block/index.d.ts +1 -1
- package/components/form/radio-card/index.d.ts +2 -2
- package/components/text/index.d.ts +7 -7
- package/components/text/index.js.map +1 -1
- package/components/visualizations/bar-chart/horizontal-chart/index.d.ts +0 -1
- package/components/visualizations/bar-chart/index.d.ts +1 -1
- package/package.json +1 -1
- package/patterns/card/newsroom-card/index.d.ts +1 -1
- package/patterns/card/partner-card/index.d.ts +2 -2
- package/patterns/card/person-card/index.d.ts +1 -1
- package/patterns/card/primitives.d.ts +5 -5
- package/patterns/card/promo-card/index.d.ts +1 -1
- package/patterns/card/resource-card/index.d.ts +1 -1
- package/patterns/card/thumbnails/index.d.ts +1 -1
- package/patterns/card/types.d.ts +6 -6
- package/patterns/card/unified-card/index.d.ts +1 -1
- package/patterns/product-logo/index.d.ts +15 -15
- package/patterns/related-content/index.d.ts +1 -1
- package/patterns/related-content/types.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CardContentProps, CardProps } from './types';
|
|
2
|
-
declare const Card: import(
|
|
1
|
+
import type { CardContentProps, CardProps } from './types';
|
|
2
|
+
declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export declare const CardContent: ({ badges, description, eyebrow, heading, thumbnail, subheading, cta, children, showArrow, }: CardContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Card };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RadioCardGroup } from './group';
|
|
2
|
-
import { HTMLProps, ReactNode } from 'react';
|
|
3
|
-
import { BadgeProps } from '../../badge';
|
|
2
|
+
import type { HTMLProps, ReactNode } from 'react';
|
|
3
|
+
import type { BadgeProps } from '../../badge';
|
|
4
4
|
export declare const DEFAULT_CONTROL_POSITION = "bottom";
|
|
5
5
|
export declare const DEFAULT_ALIGNMENT = "left";
|
|
6
6
|
export declare const CONTROL_POSITIONS: readonly ["bottom", "left"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithRef, ElementType } from 'react';
|
|
1
|
+
import { type ComponentPropsWithRef, type ElementType } from 'react';
|
|
2
2
|
declare const TEXT_COLORS: readonly ["primary", "strong", "faint", "disabled", "high-contrast", "action", "action-hover", "action-active", "highlight", "highlight-on-surface", "highlight-high-contrast", "success", "success-on-surface", "success-high-contrast", "warning", "warning-on-surface", "warning-high-contrast", "critical", "critical-on-surface", "critical-high-contrast"];
|
|
3
3
|
declare const TEXT_GROUPS: readonly ["hds-body", "code", "body", "display-expressive", "label"];
|
|
4
4
|
declare const TEXT_SIZES: readonly ["100", "200", "300", "400", "500", "600", "700", "800"];
|
|
@@ -10,7 +10,7 @@ type TextSize = (typeof TEXT_SIZES)[number];
|
|
|
10
10
|
type HexColor = string & {
|
|
11
11
|
hexish?: unknown;
|
|
12
12
|
};
|
|
13
|
-
interface BaseTextProps<T extends ElementType> {
|
|
13
|
+
interface BaseTextProps<T extends ElementType> extends React.PropsWithChildren {
|
|
14
14
|
tag?: T;
|
|
15
15
|
size?: TextSize;
|
|
16
16
|
weight?: TextWeight;
|
|
@@ -35,10 +35,10 @@ interface CodeProps<T extends ElementType> extends BaseTextProps<T> {
|
|
|
35
35
|
size?: '100' | '200' | '300';
|
|
36
36
|
}
|
|
37
37
|
declare const Text: {
|
|
38
|
-
Body: <T extends ElementType
|
|
39
|
-
DisplayExpressive: <
|
|
40
|
-
Label: <
|
|
41
|
-
HDSBody: <
|
|
42
|
-
Code: <
|
|
38
|
+
Body: <T extends ElementType>({ size, ...rest }: BodyProps<T> & Omit<ComponentPropsWithRef<T>, keyof BodyProps<T>>) => import("react").FunctionComponentElement<TextImplProps<ElementType> & Omit<any, keyof TextImplProps<T_1>>>;
|
|
39
|
+
DisplayExpressive: <T extends ElementType>({ size, ...rest }: DisplayExpressiveProps<T> & Omit<ComponentPropsWithRef<T>, keyof DisplayExpressiveProps<T>>) => import("react").FunctionComponentElement<TextImplProps<ElementType> & Omit<any, keyof TextImplProps<T_1>>>;
|
|
40
|
+
Label: <T extends ElementType>(props: LabelProps<T> & Omit<ComponentPropsWithRef<T>, keyof LabelProps<T>>) => import("react").FunctionComponentElement<TextImplProps<ElementType> & Omit<any, keyof TextImplProps<T_1>>>;
|
|
41
|
+
HDSBody: <T extends ElementType>({ size, weight, ...rest }: HDSBodyProps<T> & Omit<ComponentPropsWithRef<T>, keyof HDSBodyProps<T>>) => import("react").FunctionComponentElement<TextImplProps<ElementType> & Omit<any, keyof TextImplProps<T_1>>>;
|
|
42
|
+
Code: <T extends ElementType>({ size, weight, ...rest }: CodeProps<T> & Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>) => import("react").FunctionComponentElement<TextImplProps<ElementType> & Omit<any, keyof TextImplProps<T_1>>>;
|
|
43
43
|
};
|
|
44
44
|
export { Text, TEXT_COLORS, TEXT_WEIGHTS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/text/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport {\n\tcreateElement,\n\ttype ComponentPropsWithRef,\n\ttype ElementType,\n} from 'react'\nimport s from './style.module.scss'\n\nconst TEXT_COLORS = [\n\t'primary',\n\t'strong',\n\t'faint',\n\t'disabled',\n\t'high-contrast',\n\t'action',\n\t'action-hover',\n\t'action-active',\n\t'highlight',\n\t'highlight-on-surface',\n\t'highlight-high-contrast',\n\t'success',\n\t'success-on-surface',\n\t'success-high-contrast',\n\t'warning',\n\t'warning-on-surface',\n\t'warning-high-contrast',\n\t'critical',\n\t'critical-on-surface',\n\t'critical-high-contrast',\n] as const\n\nconst TEXT_GROUPS = [\n\t'hds-body',\n\t'code',\n\t'body',\n\t'display-expressive',\n\t'label',\n] as const\n\nconst TEXT_SIZES = [\n\t'100',\n\t'200',\n\t'300',\n\t'400',\n\t'500',\n\t'600',\n\t'700',\n\t'800',\n] as const\n\nconst TEXT_WEIGHTS = ['regular', 'medium', 'semibold', 'bold'] as const\n\ntype TextColor = (typeof TEXT_COLORS)[number]\ntype TextWeight = (typeof TEXT_WEIGHTS)[number]\ntype TextGroup = (typeof TEXT_GROUPS)[number]\ntype TextSize = (typeof TEXT_SIZES)[number]\n\n// small typescript hack to support autocomplete and arbitrary strings\ntype HexColor = string & { hexish?: unknown }\n\ninterface BaseTextProps<T extends ElementType> {\n\ttag?: T\n\tsize?: TextSize\n\tweight?: TextWeight\n\talign?: 'left' | 'center' | 'right'\n\tcolor?: TextColor | HexColor\n\tclassName?: string\n}\n\ninterface TextImplProps<T extends ElementType> extends BaseTextProps<T> {\n\tgroup: TextGroup\n}\n\nfunction getTypographyToken(group: TextGroup, size: TextSize): string {\n\tconst groupToTokenMap: Record<TextGroup, string> = {\n\t\t'hds-body': `mds-typography-legacy-body-${size}`,\n\t\tcode: `mds-typography-code-${size}`,\n\t\t'display-expressive': `mds-typography-display-expressive-${size}`,\n\t\tlabel: `mds-typography-label`,\n\t\tbody: `mds-typography-body-${size}`,\n\t}\n\n\treturn groupToTokenMap[group]\n}\n\nconst TextImpl = <T extends ElementType = 'span'>({\n\ttag,\n\tgroup,\n\tsize = '200',\n\tweight,\n\talign,\n\tcolor,\n\tchildren,\n\tclassName,\n\t...rest\n}: TextImplProps<T> &\n\tOmit<ComponentPropsWithRef<T>, keyof TextImplProps<T>>) => {\n\tconst Component = tag ?? 'span'\n\tconst variant = getTypographyToken(group, size)\n\n\tconst usesPredefinedColor = TEXT_COLORS.includes(color as TextColor)\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={classNames(\n\t\t\t\tvariant,\n\t\t\t\t{\n\t\t\t\t\t[s[`align-${align}`]]: align,\n\t\t\t\t\t[`mds-typography-font-weight-${weight}`]: weight,\n\t\t\t\t\t[`mds-foreground-${color}`]: color && usesPredefinedColor,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={color && !usesPredefinedColor ? { color } : {}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t)\n}\n\ninterface BodyProps<T extends ElementType> extends BaseTextProps<T> {\n\tsize?: '200' | '300' | '400'\n}\n\nconst Body = <T extends ElementType>({\n\tsize = '300',\n\t...rest\n}: BodyProps<T> & Omit<ComponentPropsWithRef<T>, keyof BodyProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tgroup: 'body',\n\t})\n}\n\ninterface DisplayExpressiveProps<T extends ElementType>\n\textends BaseTextProps<T> {\n\tsize?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800'\n}\n\nconst DisplayExpressive = <T extends ElementType>({\n\tsize = '200',\n\t...rest\n}: DisplayExpressiveProps<T> &\n\tOmit<ComponentPropsWithRef<T>, keyof DisplayExpressiveProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tgroup: 'display-expressive',\n\t})\n}\n\ntype LabelProps<T extends ElementType> = Omit<BaseTextProps<T>, 'size'>\n\nconst Label = <T extends ElementType>(\n\tprops: LabelProps<T> & Omit<ComponentPropsWithRef<T>, keyof LabelProps<T>>\n) => {\n\treturn createElement(TextImpl, {\n\t\t...props,\n\t\tgroup: 'label',\n\t})\n}\n\ninterface HDSBodyProps<T extends ElementType> extends BaseTextProps<T> {\n\tsize?: '100' | '200' | '300'\n}\n\nconst HDSBody = <T extends ElementType>({\n\tsize = '200',\n\tweight = 'regular',\n\t...rest\n}: HDSBodyProps<T> & Omit<ComponentPropsWithRef<T>, keyof HDSBodyProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tweight,\n\t\tgroup: 'hds-body',\n\t})\n}\n\ninterface CodeProps<T extends ElementType> extends BaseTextProps<T> {\n\tsize?: '100' | '200' | '300'\n}\n\nconst Code = <T extends ElementType>({\n\tsize = '200',\n\tweight = 'regular',\n\t...rest\n}: CodeProps<T> & Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tweight,\n\t\tgroup: 'code',\n\t})\n}\n\nconst Text = {\n\tBody,\n\tDisplayExpressive,\n\tLabel,\n\tHDSBody,\n\tCode,\n}\n\nexport { Text, TEXT_COLORS, TEXT_WEIGHTS }\n"],"names":["TEXT_COLORS","TEXT_WEIGHTS","getTypographyToken","group","size","TextImpl","tag","weight","align","color","children","className","rest","Component","variant","usesPredefinedColor","jsx","classNames","s","Body","createElement","DisplayExpressive","Label","props","HDSBody","Code","Text"],"mappings":";;;;AAQA,MAAMA,IAAc;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAqBMC,IAAe,CAAC,WAAW,UAAU,YAAY,MAAM;AAuB7D,SAASC,EAAmBC,GAAkBC,GAAwB;AASrE,SARmD;AAAA,IAClD,YAAY,8BAA8BA,CAAI;AAAA,IAC9C,MAAM,uBAAuBA,CAAI;AAAA,IACjC,sBAAsB,qCAAqCA,CAAI;AAAA,IAC/D,OAAO;AAAA,IACP,MAAM,uBAAuBA,CAAI;AAAA,EAAA,EAGXD,CAAK;AAC7B;AAEA,MAAME,IAAW,CAAiC;AAAA,EACjD,KAAAC;AAAA,EACA,OAAAH;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,QAAAG;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACJ,MAC4D;AAC3D,Q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AAU;AAAA,EAC9B,GAAGO;AAAA,EACH,MAAAR;AAAA,EACA,QAAAG;AAAA,EACA,OAAO;AAAA,CACP,GAGImB,IAAO;AAAA,EACZ,MAAAP;AAAA,EACA,mBAAAE;AAAA,EACA,OAAAC;AAAA,EACA,SAAAE;AAAA,EACA,MAAAC;AACD;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/text/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport {\n\tcreateElement,\n\ttype ComponentPropsWithRef,\n\ttype ElementType,\n} from 'react'\nimport s from './style.module.scss'\n\nconst TEXT_COLORS = [\n\t'primary',\n\t'strong',\n\t'faint',\n\t'disabled',\n\t'high-contrast',\n\t'action',\n\t'action-hover',\n\t'action-active',\n\t'highlight',\n\t'highlight-on-surface',\n\t'highlight-high-contrast',\n\t'success',\n\t'success-on-surface',\n\t'success-high-contrast',\n\t'warning',\n\t'warning-on-surface',\n\t'warning-high-contrast',\n\t'critical',\n\t'critical-on-surface',\n\t'critical-high-contrast',\n] as const\n\nconst TEXT_GROUPS = [\n\t'hds-body',\n\t'code',\n\t'body',\n\t'display-expressive',\n\t'label',\n] as const\n\nconst TEXT_SIZES = [\n\t'100',\n\t'200',\n\t'300',\n\t'400',\n\t'500',\n\t'600',\n\t'700',\n\t'800',\n] as const\n\nconst TEXT_WEIGHTS = ['regular', 'medium', 'semibold', 'bold'] as const\n\ntype TextColor = (typeof TEXT_COLORS)[number]\ntype TextWeight = (typeof TEXT_WEIGHTS)[number]\ntype TextGroup = (typeof TEXT_GROUPS)[number]\ntype TextSize = (typeof TEXT_SIZES)[number]\n\n// small typescript hack to support autocomplete and arbitrary strings\ntype HexColor = string & { hexish?: unknown }\n\ninterface BaseTextProps<T extends ElementType> extends React.PropsWithChildren {\n\ttag?: T\n\tsize?: TextSize\n\tweight?: TextWeight\n\talign?: 'left' | 'center' | 'right'\n\tcolor?: TextColor | HexColor\n\tclassName?: string\n}\n\ninterface TextImplProps<T extends ElementType> extends BaseTextProps<T> {\n\tgroup: TextGroup\n}\n\nfunction getTypographyToken(group: TextGroup, size: TextSize): string {\n\tconst groupToTokenMap: Record<TextGroup, string> = {\n\t\t'hds-body': `mds-typography-legacy-body-${size}`,\n\t\tcode: `mds-typography-code-${size}`,\n\t\t'display-expressive': `mds-typography-display-expressive-${size}`,\n\t\tlabel: `mds-typography-label`,\n\t\tbody: `mds-typography-body-${size}`,\n\t}\n\n\treturn groupToTokenMap[group]\n}\n\nconst TextImpl = <T extends ElementType = 'span'>({\n\ttag,\n\tgroup,\n\tsize = '200',\n\tweight,\n\talign,\n\tcolor,\n\tchildren,\n\tclassName,\n\t...rest\n}: TextImplProps<T> &\n\tOmit<ComponentPropsWithRef<T>, keyof TextImplProps<T>>) => {\n\tconst Component = tag ?? 'span'\n\tconst variant = getTypographyToken(group, size)\n\n\tconst usesPredefinedColor = TEXT_COLORS.includes(color as TextColor)\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={classNames(\n\t\t\t\tvariant,\n\t\t\t\t{\n\t\t\t\t\t[s[`align-${align}`]]: align,\n\t\t\t\t\t[`mds-typography-font-weight-${weight}`]: weight,\n\t\t\t\t\t[`mds-foreground-${color}`]: color && usesPredefinedColor,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={color && !usesPredefinedColor ? { color } : {}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t)\n}\n\ninterface BodyProps<T extends ElementType> extends BaseTextProps<T> {\n\tsize?: '200' | '300' | '400'\n}\n\nconst Body = <T extends ElementType>({\n\tsize = '300',\n\t...rest\n}: BodyProps<T> & Omit<ComponentPropsWithRef<T>, keyof BodyProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tgroup: 'body',\n\t})\n}\n\ninterface DisplayExpressiveProps<T extends ElementType>\n\textends BaseTextProps<T> {\n\tsize?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800'\n}\n\nconst DisplayExpressive = <T extends ElementType>({\n\tsize = '200',\n\t...rest\n}: DisplayExpressiveProps<T> &\n\tOmit<ComponentPropsWithRef<T>, keyof DisplayExpressiveProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tgroup: 'display-expressive',\n\t})\n}\n\ntype LabelProps<T extends ElementType> = Omit<BaseTextProps<T>, 'size'>\n\nconst Label = <T extends ElementType>(\n\tprops: LabelProps<T> & Omit<ComponentPropsWithRef<T>, keyof LabelProps<T>>\n) => {\n\treturn createElement(TextImpl, {\n\t\t...props,\n\t\tgroup: 'label',\n\t})\n}\n\ninterface HDSBodyProps<T extends ElementType> extends BaseTextProps<T> {\n\tsize?: '100' | '200' | '300'\n}\n\nconst HDSBody = <T extends ElementType>({\n\tsize = '200',\n\tweight = 'regular',\n\t...rest\n}: HDSBodyProps<T> & Omit<ComponentPropsWithRef<T>, keyof HDSBodyProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tweight,\n\t\tgroup: 'hds-body',\n\t})\n}\n\ninterface CodeProps<T extends ElementType> extends BaseTextProps<T> {\n\tsize?: '100' | '200' | '300'\n}\n\nconst Code = <T extends ElementType>({\n\tsize = '200',\n\tweight = 'regular',\n\t...rest\n}: CodeProps<T> & Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>) => {\n\treturn createElement(TextImpl, {\n\t\t...rest,\n\t\tsize,\n\t\tweight,\n\t\tgroup: 'code',\n\t})\n}\n\nconst Text = {\n\tBody,\n\tDisplayExpressive,\n\tLabel,\n\tHDSBody,\n\tCode,\n}\n\nexport { Text, TEXT_COLORS, TEXT_WEIGHTS }\n"],"names":["TEXT_COLORS","TEXT_WEIGHTS","getTypographyToken","group","size","TextImpl","tag","weight","align","color","children","className","rest","Component","variant","usesPredefinedColor","jsx","classNames","s","Body","createElement","DisplayExpressive","Label","props","HDSBody","Code","Text"],"mappings":";;;;AAQA,MAAMA,IAAc;AAAA,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MS,IAAO,CAAwB;AAAA,EACpC,MAAAf,IAAO;AAAA,EACP,GAAGQ;AACJ,MACQQ,EAAcf,GAAU;AAAA,EAC9B,GAAGO;AAAA,EACH,MAAAR;AAAA,EACA,OAAO;AAAA,CACP,GAQIiB,IAAoB,CAAwB;AAAA,EACjD,MAAAjB,IAAO;AAAA,EACP,GAAGQ;AACJ,MAEQQ,EAAcf,GAAU;AAAA,EAC9B,GAAGO;AAAA,EACH,MAAAR;AAAA,EACA,OAAO;AAAA,CACP,GAKIkB,IAAQ,CACbC,MAEOH,EAAcf,GAAU;AAAA,EAC9B,GAAGkB;AAAA,EACH,OAAO;AAAA,CACP,GAOIC,IAAU,CAAwB;AAAA,EACvC,MAAApB,IAAO;AAAA,EACP,QAAAG,IAAS;AAAA,EACT,GAAGK;AACJ,MACQQ,EAAcf,GAAU;AAAA,EAC9B,GAAGO;AAAA,EACH,MAAAR;AAAA,EACA,QAAAG;AAAA,EACA,OAAO;AAAA,CACP,GAOIkB,IAAO,CAAwB;AAAA,EACpC,MAAArB,IAAO;AAAA,EACP,QAAAG,IAAS;AAAA,EACT,GAAGK;AACJ,MACQQ,EAAcf,GAAU;AAAA,EAC9B,GAAGO;AAAA,EACH,MAAAR;AAAA,EACA,QAAAG;AAAA,EACA,OAAO;AAAA,CACP,GAGImB,IAAO;AAAA,EACZ,MAAAP;AAAA,EACA,mBAAAE;AAAA,EACA,OAAAC;AAAA,EACA,SAAAE;AAAA,EACA,MAAAC;AACD;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import HorizontalBarChart, { type HorizontalBarChartProps } from './horizontal-chart';
|
|
2
2
|
interface HorizontalBarChart extends HorizontalBarChartProps {
|
|
3
3
|
name: string;
|
|
4
4
|
caption: string;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MDSImageProps } from '../../../utils/mds-context';
|
|
2
|
-
import { CardPatternProps } from '../types';
|
|
1
|
+
import type { MDSImageProps } from '../../../utils/mds-context';
|
|
2
|
+
import type { CardPatternProps } from '../types';
|
|
3
3
|
interface PartnerCardProps {
|
|
4
4
|
heading: string;
|
|
5
5
|
description: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CardPrimitiveProps, MetaProps, ContentProps, HeadingProps, ProductBadgesProps, DescriptionProps } from './types';
|
|
1
|
+
import type { CardPrimitiveProps, MetaProps, ContentProps, HeadingProps, ProductBadgesProps, DescriptionProps } from './types';
|
|
2
2
|
declare const CardPrimitives: {
|
|
3
|
-
Root: import(
|
|
3
|
+
Root: import("react").ForwardRefExoticComponent<CardPrimitiveProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
Thumbnail: {
|
|
5
|
-
({ src, alt }: import(
|
|
5
|
+
({ src, alt }: import("./types").ThumbnailProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
8
8
|
PersonThumbnail: {
|
|
9
|
-
({ src, alt }: import(
|
|
9
|
+
({ src, alt }: import("./types").ThumbnailProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
LogoThumbnail: {
|
|
13
|
-
({ src, alt }: import(
|
|
13
|
+
({ src, alt }: import("./types").ThumbnailProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
16
16
|
Meta: {
|
package/patterns/card/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { ProductBadgeProps } from '../../patterns/product-badge';
|
|
3
|
-
import { NewsroomCardProps } from './newsroom-card';
|
|
4
|
-
import { PersonCardProps } from './person-card';
|
|
5
|
-
import { ResourceCardProps } from './resource-card';
|
|
6
|
-
import { UnifiedCardProps } from './unified-card';
|
|
1
|
+
import type { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import type { ProductBadgeProps } from '../../patterns/product-badge';
|
|
3
|
+
import type { NewsroomCardProps } from './newsroom-card';
|
|
4
|
+
import type { PersonCardProps } from './person-card';
|
|
5
|
+
import type { ResourceCardProps } from './resource-card';
|
|
6
|
+
import type { UnifiedCardProps } from './unified-card';
|
|
7
7
|
interface BaseCardProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-label'> {
|
|
8
8
|
withArrow?: boolean;
|
|
9
9
|
link: string;
|
|
@@ -9,32 +9,32 @@ export declare const normalizeProductLogoProps: ((input: {
|
|
|
9
9
|
color?: unknown;
|
|
10
10
|
product?: unknown;
|
|
11
11
|
}, opts?: {
|
|
12
|
-
all?: Pick<import(
|
|
12
|
+
all?: Pick<import("../../utils/make-normalizer").NormalizerOpts<string>, "transform">;
|
|
13
13
|
each?: {
|
|
14
|
-
size?: import(
|
|
15
|
-
color?: import(
|
|
16
|
-
product?: import(
|
|
14
|
+
size?: import("../../utils/make-normalizer").NormalizerOpts<"medium" | "small" | "large"> | undefined;
|
|
15
|
+
color?: import("../../utils/make-normalizer").NormalizerOpts<"primary" | "strong"> | undefined;
|
|
16
|
+
product?: import("../../utils/make-normalizer").NormalizerOpts<"boundary" | "consul" | "nomad" | "packer" | "terraform" | "vagrant" | "vault" | "vault-radar" | "vault-secrets" | "waypoint" | "hashicorp" | "hcp" | "vault-dedicated" | "vault-enterprise"> | undefined;
|
|
17
17
|
} | undefined;
|
|
18
18
|
} | undefined) => {
|
|
19
|
-
size: "small";
|
|
20
|
-
color: "primary";
|
|
21
|
-
product: "hcp";
|
|
19
|
+
size: "medium" | "small" | "large";
|
|
20
|
+
color: "primary" | "strong";
|
|
21
|
+
product: "boundary" | "consul" | "nomad" | "packer" | "terraform" | "vagrant" | "vault" | "vault-radar" | "vault-secrets" | "waypoint" | "hashicorp" | "hcp" | "vault-dedicated" | "vault-enterprise";
|
|
22
22
|
}) & {
|
|
23
|
-
with(all: Pick<import(
|
|
23
|
+
with(all: Pick<import("../../utils/make-normalizer").NormalizerOpts<string>, "transform">): (input: {
|
|
24
24
|
size?: unknown;
|
|
25
25
|
color?: unknown;
|
|
26
26
|
product?: unknown;
|
|
27
27
|
}, opts?: {
|
|
28
|
-
all?: Pick<import(
|
|
28
|
+
all?: Pick<import("../../utils/make-normalizer").NormalizerOpts<string>, "transform">;
|
|
29
29
|
each?: {
|
|
30
|
-
size?: import(
|
|
31
|
-
color?: import(
|
|
32
|
-
product?: import(
|
|
30
|
+
size?: import("../../utils/make-normalizer").NormalizerOpts<"medium" | "small" | "large"> | undefined;
|
|
31
|
+
color?: import("../../utils/make-normalizer").NormalizerOpts<"primary" | "strong"> | undefined;
|
|
32
|
+
product?: import("../../utils/make-normalizer").NormalizerOpts<"boundary" | "consul" | "nomad" | "packer" | "terraform" | "vagrant" | "vault" | "vault-radar" | "vault-secrets" | "waypoint" | "hashicorp" | "hcp" | "vault-dedicated" | "vault-enterprise"> | undefined;
|
|
33
33
|
} | undefined;
|
|
34
34
|
} | undefined) => {
|
|
35
|
-
size: "small";
|
|
36
|
-
color: "primary";
|
|
37
|
-
product: "hcp";
|
|
35
|
+
size: "medium" | "small" | "large";
|
|
36
|
+
color: "primary" | "strong";
|
|
37
|
+
product: "boundary" | "consul" | "nomad" | "packer" | "terraform" | "vagrant" | "vault" | "vault-radar" | "vault-secrets" | "waypoint" | "hashicorp" | "hcp" | "vault-dedicated" | "vault-enterprise";
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
export interface ProductLogoProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelatedContentProps } from './types';
|
|
1
|
+
import type { RelatedContentProps } from './types';
|
|
2
2
|
declare const RelatedContent: {
|
|
3
3
|
({ appearance, headline, description, cards, cta, }: RelatedContentProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|