@hashicorp/mds-react 0.9.2 → 0.9.3
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/alert/icon.d.ts +2 -2
- package/components/alert/index.d.ts +6 -6
- package/components/badge/index.d.ts +1 -1
- package/components/badge-count/index.d.ts +1 -1
- package/components/breadcrumbs/index.d.ts +2 -2
- package/components/breadcrumbs/item/index.d.ts +1 -1
- package/components/breadcrumbs/truncation-button/index.d.ts +1 -1
- package/components/breadcrumbs/types/index.d.ts +1 -1
- package/components/button/index.d.ts +2 -2
- package/components/card/card-thumbnail/index.d.ts +1 -1
- package/components/card/index.d.ts +2 -2
- package/components/card/types.d.ts +3 -3
- package/components/code-block/code-lines/index.d.ts +1 -8
- package/components/code-block/code-lines/utils/split-html-into-lines.d.ts +1 -1
- package/components/code-block/code-lines/utils/split-jsx-into-lines.d.ts +1 -1
- package/components/code-block/hidden-copy-content/index.d.ts +3 -3
- package/components/code-block/index.d.ts +1 -1
- package/components/combo-box-primitive/index.d.ts +1 -0
- package/components/dialog-primitive/index.d.ts +1 -1
- package/components/disclosure-primitive/index.d.ts +1 -2
- package/components/disclosure-primitive/use-disclosure-primitive.d.ts +2 -2
- package/components/dismiss-button/index.d.ts +1 -0
- package/components/dropdown/index.d.ts +6 -6
- package/components/dropdown/list-item/custom.d.ts +1 -1
- package/components/dropdown/list-item/index.d.ts +4 -4
- package/components/dropdown/list-item/interactive.d.ts +1 -1
- package/components/dropdown/list-item/separator.d.ts +1 -1
- package/components/dropdown/list-item/title.d.ts +1 -1
- package/components/dropdown/toggle-button/index.d.ts +2 -2
- package/components/flight-icon/index.d.ts +2 -2
- package/components/form/checkbox/index.d.ts +1 -1
- package/components/form/error/index.d.ts +1 -1
- package/components/form/field/index.d.ts +1 -1
- package/components/form/fieldset/index.d.ts +1 -1
- package/components/form/file-input/index.d.ts +1 -1
- package/components/form/helper-text/index.d.ts +1 -1
- package/components/form/label/index.d.ts +1 -1
- package/components/form/legend/index.d.ts +1 -1
- package/components/form/radio/index.d.ts +1 -1
- package/components/form/radio-card/group.d.ts +1 -1
- package/components/form/radio-card/index.d.ts +2 -2
- package/components/form/select/index.d.ts +1 -1
- package/components/form/super-select/index.d.ts +2 -2
- package/components/form/text-input/index.d.ts +1 -1
- package/components/form/textarea/index.d.ts +1 -1
- package/components/form/toggle/index.d.ts +1 -1
- package/components/hds/wrappers/tooltip.d.ts +3 -4
- package/components/icon-tile/index.d.ts +1 -1
- package/components/inline-link/index.d.ts +1 -1
- package/components/interactive/index.d.ts +3 -4
- package/components/legacy-button/index.d.ts +3 -3
- package/components/legacy-button/types.d.ts +1 -1
- package/components/legacy-button/utils.d.ts +1 -1
- package/components/menu-primitive/index.d.ts +1 -1
- package/components/menu-primitive/use-menu-primitive.d.ts +2 -2
- package/components/modal/index.d.ts +1 -1
- package/components/modal/use-modal.d.ts +2 -2
- package/components/separator/index.d.ts +1 -1
- package/components/standalone-link/index.d.ts +2 -2
- package/components/table/index.d.ts +5 -5
- package/components/table/td.d.ts +2 -2
- package/components/table/th.d.ts +2 -2
- package/components/table/tr.d.ts +1 -1
- package/components/tabs/index.d.ts +3 -3
- package/components/tabs/tab-panel.d.ts +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/use-tabs-context.d.ts +2 -2
- package/components/text/index.d.ts +6 -6
- package/components/visualizations/bar-chart/horizontal-chart/index.d.ts +1 -0
- package/components/visualizations/bar-chart/index.d.ts +1 -1
- package/components/visualizations/donut-chart/components/arc-tooltip/index.d.ts +2 -2
- package/components/visualizations/donut-chart/components/external-arc-label/index.d.ts +2 -2
- package/components/visualizations/donut-chart/components/internal-arc-label/index.d.ts +2 -2
- package/components/visualizations/donut-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/copy-button/clipboard.d.ts +1 -1
- package/patterns/copy-button/index.d.ts +1 -1
- package/patterns/layout/index.d.ts +20 -20
- 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
- package/style.css +1 -1
- package/styles/mixins/button.scss +1 -6
- package/utils/i18n/index.d.ts +1 -1
- package/utils/make-normalizer/index.d.ts +6 -6
- package/utils/mds-context/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { AlertColor, AlertProps } from '.';
|
|
2
|
+
import { FlightIconName } from '../flight-icon';
|
|
3
3
|
interface IconProps {
|
|
4
4
|
icon?: FlightIconName | false;
|
|
5
5
|
color: AlertColor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { StandaloneLinkProps } from '../standalone-link';
|
|
2
|
+
import { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
import { ButtonProps } from '../button';
|
|
4
|
+
import { FlightIconName } from '../flight-icon';
|
|
5
5
|
type AlertColor = 'neutral' | 'highlight' | 'success' | 'warning' | 'critical';
|
|
6
6
|
interface CommonAlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/**
|
|
@@ -51,11 +51,11 @@ declare const AlertActions: {
|
|
|
51
51
|
displayName: string;
|
|
52
52
|
};
|
|
53
53
|
declare const AlertButton: {
|
|
54
|
-
({ ...props }: Exclude<ButtonProps,
|
|
54
|
+
({ ...props }: Exclude<ButtonProps, 'size'>): import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
displayName: string;
|
|
56
56
|
};
|
|
57
57
|
declare const AlertStandaloneLink: {
|
|
58
|
-
({ ...props }: Exclude<StandaloneLinkProps,
|
|
58
|
+
({ ...props }: Exclude<StandaloneLinkProps, 'size'>): import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
61
|
export { Alert, AlertActions, AlertButton, AlertStandaloneLink };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FlightIconName } from '../flight-icon';
|
|
2
2
|
declare const BADGE_SIZES: readonly ["small", "medium", "large"];
|
|
3
3
|
type BadgeSize = (typeof BADGE_SIZES)[number];
|
|
4
4
|
declare const BADGE_TYPES: readonly ["filled", "inverted", "outlined"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BreadcrumbProps, BreadcrumbTruncationProps } from './types';
|
|
2
2
|
declare const Breadcrumbs: {
|
|
3
3
|
Root: ({ itemsCanWrap, ariaLabel, children, className, ...rest }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
Item: ({ maxWidth, current, icon, text, url, ...rest }: import(
|
|
4
|
+
Item: ({ maxWidth, current, icon, text, url, ...rest }: import('./types').BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
Truncation: ({ ariaLabel, children, ...rest }: BreadcrumbTruncationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export { Breadcrumbs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BreadcrumbItemProps } from '../types';
|
|
2
2
|
export declare const Item: ({ maxWidth, current, icon, text, url, ...rest }: BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HTMLAttributes, LiHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
|
|
3
3
|
/**
|
|
4
4
|
* This controls if the Breadcrumb Items can wrap if they don’t fit within the container.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
2
|
export declare const BUTTON_SIZES: readonly ["small", "medium", "large"];
|
|
3
3
|
export type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
4
4
|
export declare const BUTTON_ICON_POSITIONS: readonly ["leading", "trailing"];
|
|
@@ -27,5 +27,5 @@ interface ButtonPrimitiveProps {
|
|
|
27
27
|
export interface ButtonProps extends Omit<ButtonPrimitiveProps, 'color'> {
|
|
28
28
|
color?: ButtonColor;
|
|
29
29
|
}
|
|
30
|
-
export declare const Button: ForwardRefExoticComponent<ButtonProps & import(
|
|
30
|
+
export declare const Button: ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
31
31
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CardThumbnailProps } from '../types';
|
|
2
2
|
export declare const CardThumbnail: ({ alt, aspectRatio, src, }: CardThumbnailProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const Card: import(
|
|
1
|
+
import { CardProps } from './types';
|
|
2
|
+
declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { Card };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { BadgeProps } from '../badge';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { StandaloneLinkProps } from '../standalone-link';
|
|
4
4
|
interface CardPropsBase {
|
|
5
5
|
className?: string;
|
|
6
6
|
ctaLabel?: string;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Note: lines of code are expected to be stable. If we need to work with
|
|
3
|
-
* dynamic code blocks in the future, we could assign random unique IDs
|
|
4
|
-
* to each line during the `linesOfCode` `useMemo` function.
|
|
5
|
-
*
|
|
6
|
-
* For now, we disable react/no-array-index key for the entire file.
|
|
7
|
-
*/
|
|
8
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { ReactNode } from 'react';
|
|
9
2
|
interface CodeLinesProps {
|
|
10
3
|
value: ReactNode;
|
|
11
4
|
hasLineNumbers?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const HiddenCopyContent: import(
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
declare const HiddenCopyContent: import('react').ForwardRefExoticComponent<{
|
|
3
3
|
code: ReactNode;
|
|
4
|
-
} & import(
|
|
4
|
+
} & import('react').RefAttributes<HTMLPreElement>>;
|
|
5
5
|
export { HiddenCopyContent };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type HTMLAttributes } from 'react';
|
|
1
|
+
import { PropsWithChildren, HTMLAttributes } from 'react';
|
|
3
2
|
interface DisclosurePrimitiveProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
/**
|
|
5
4
|
* Callback fired when the disclosure is closed (optional)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
2
|
export interface DisclosurePrimitiveContextState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onClickToggle: MouseEventHandler<HTMLButtonElement>;
|
|
@@ -7,5 +7,5 @@ export interface DisclosurePrimitiveContextState {
|
|
|
7
7
|
containsInteractive: boolean;
|
|
8
8
|
ariaLabel: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const DisclosurePrimitiveContext: import(
|
|
10
|
+
export declare const DisclosurePrimitiveContext: import('react').Context<DisclosurePrimitiveContextState | undefined>;
|
|
11
11
|
export declare function useDisclosurePrimitive(): DisclosurePrimitiveContextState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { DropdownToggleButtonProps } from './toggle-button';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* If true, container is given full width styles. (Added by web presence team)
|
|
@@ -51,19 +51,19 @@ declare const Dropdown: {
|
|
|
51
51
|
};
|
|
52
52
|
ListItem: {
|
|
53
53
|
Interactive: {
|
|
54
|
-
({ text, color, icon, isLoading, trailingIcon, ...rest }: import(
|
|
54
|
+
({ text, color, icon, isLoading, trailingIcon, ...rest }: import('./list-item/interactive').ListItemInteractiveProps): import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
displayName: string;
|
|
56
56
|
};
|
|
57
57
|
Title: {
|
|
58
|
-
({ text, ...rest }: import(
|
|
58
|
+
({ text, ...rest }: import('./list-item/title').ListItemTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
61
|
Separator: {
|
|
62
|
-
(props: import(
|
|
62
|
+
(props: import('./list-item/separator').ListItemSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
63
63
|
displayName: string;
|
|
64
64
|
};
|
|
65
65
|
Custom: {
|
|
66
|
-
({ children }: import(
|
|
66
|
+
({ children }: import('./list-item/custom').ListItemCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
displayName: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
declare const ListItem: {
|
|
2
2
|
Interactive: {
|
|
3
|
-
({ text, color, icon, isLoading, trailingIcon, ...rest }: import(
|
|
3
|
+
({ text, color, icon, isLoading, trailingIcon, ...rest }: import('./interactive').ListItemInteractiveProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
Title: {
|
|
7
|
-
({ text, ...rest }: import(
|
|
7
|
+
({ text, ...rest }: import('./title').ListItemTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
displayName: string;
|
|
9
9
|
};
|
|
10
10
|
Separator: {
|
|
11
|
-
(props: import(
|
|
11
|
+
(props: import('./separator').ListItemSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
Custom: {
|
|
15
|
-
({ children }: import(
|
|
15
|
+
({ children }: import('./custom').ListItemCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InteractiveProps } from '../../interactive';
|
|
2
2
|
interface ListItemInteractiveProps extends Omit<InteractiveProps, 'children'> {
|
|
3
3
|
/**
|
|
4
4
|
* Text to be used in the item. If no text value is defined, an error will be thrown.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
2
|
type ListItemSeparatorProps = Omit<HTMLAttributes<HTMLLIElement>, 'className' | 'aria-hidden' | 'role'>;
|
|
3
3
|
declare const ListItemSeparator: {
|
|
4
4
|
(props: ListItemSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FlightIconName } from '../../flight-icon';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
3
|
interface DropdownToggleButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Text of the ToggleButton. If no text value is defined, an error will be thrown.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
import { IconName } from '@hashicorp/flight-icons/svg';
|
|
3
3
|
declare const FLIGHT_ICON_SIZES: readonly [12, 16, 24, 32];
|
|
4
4
|
type FlightIconSize = (typeof FLIGHT_ICON_SIZES)[number];
|
|
5
5
|
type FlightIconName = IconName | (string & Record<never, never>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fieldset } from '../fieldset';
|
|
2
|
-
import
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
export interface RadioCardGroupProps extends ComponentProps<typeof Fieldset> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
legend: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RadioCardGroup } from './group';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { HTMLProps, ReactNode } from 'react';
|
|
3
|
+
import { 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,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TComboBoxItem, ComboBoxSearchInputProps } from '../../combo-box-primitive';
|
|
2
|
+
import { FieldProps } from '../field';
|
|
3
3
|
type SuperSelectSearchInputProps = ComboBoxSearchInputProps;
|
|
4
4
|
interface SuperSelectOptionProps extends TComboBoxItem {
|
|
5
5
|
isLoading?: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import 'tippy.js/dist/svg-arrow.css';
|
|
1
|
+
import { TippyProps } from '@tippyjs/react';
|
|
2
|
+
import { Plugin } from 'tippy.js';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
5
4
|
export interface TooltipProps {
|
|
6
5
|
options?: TippyProps;
|
|
7
6
|
children: TippyProps['children'];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ButtonHTMLAttributes, MouseEventHandler } from 'react';
|
|
1
|
+
import { ForwardRefExoticComponent, ButtonHTMLAttributes, MouseEventHandler } from 'react';
|
|
3
2
|
interface InteractiveProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
3
|
isHrefExternal?: boolean;
|
|
5
4
|
href?: string;
|
|
@@ -8,7 +7,7 @@ interface InteractiveProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
8
7
|
prefetch?: boolean;
|
|
9
8
|
locale?: string;
|
|
10
9
|
}
|
|
11
|
-
declare const Interactive: ForwardRefExoticComponent<InteractiveProps & import(
|
|
10
|
+
declare const Interactive: ForwardRefExoticComponent<InteractiveProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
12
11
|
/**
|
|
13
12
|
* Smaller, local version of our getLocalizedLinkProps util,
|
|
14
13
|
* cloned here to work around a cyclic dependency issue
|
|
@@ -21,7 +20,7 @@ declare const Interactive: ForwardRefExoticComponent<InteractiveProps & import("
|
|
|
21
20
|
export declare const getLocalizedLinkProps: (href: string, locale?: string, isHrefExternal?: boolean) => {
|
|
22
21
|
href: string;
|
|
23
22
|
hrefLang: string | undefined;
|
|
24
|
-
isHrefExternal?: boolean;
|
|
23
|
+
isHrefExternal?: boolean | undefined;
|
|
25
24
|
};
|
|
26
25
|
export type { InteractiveProps };
|
|
27
26
|
export { Interactive };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
3
|
/** @deprecated Use <Button> from '@hashicorp/mds-react/button' instead. Will be removed in v1.0. */
|
|
4
|
-
declare const MDSButton: ForwardRefExoticComponent<ButtonProps & import(
|
|
4
|
+
declare const MDSButton: ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
5
5
|
export { MDSButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { COLORS } from './utils';
|
|
2
2
|
type HashiCorpProduct = 'hashicorp' | 'boundary' | 'consul' | 'nomad' | 'packer' | 'terraform' | 'vault' | 'vagrant' | 'waypoint';
|
|
3
3
|
export type Size = 'medium' | 'small';
|
|
4
4
|
export type ThemeBackground = 'light' | 'dark' | 'brand';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ButtonColor, Theme } from './types';
|
|
2
2
|
export declare const COLORS: readonly ["primary", "primary-black", "primary-white", "secondary", "secondary-high-contrast", "secondary-white", "secondary-black", "tertiary", "critical", "boundary", "consul", "nomad", "packer", "terraform", "vagrant", "vault", "waypoint", "hashicorp"];
|
|
3
3
|
export declare function determineColor(theme?: Theme): ButtonColor;
|
|
4
4
|
export declare const LINK_TYPE_ICON_MAP: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEventHandler, RefObject } from 'react';
|
|
2
2
|
export interface MenuPrimitiveContextState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onClickToggle: MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
toggleRef: RefObject<HTMLDivElement>;
|
|
6
6
|
closeMenu: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const MenuPrimitiveContext: import(
|
|
8
|
+
export declare const MenuPrimitiveContext: import('react').Context<MenuPrimitiveContextState | undefined>;
|
|
9
9
|
export declare function useMenuPrimitive(): MenuPrimitiveContextState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface ModalContextState {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
openModal: (content: ReactNode) => void;
|
|
5
5
|
closeModal: () => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const ModalContext: import(
|
|
7
|
+
export declare const ModalContext: import('react').Context<ModalContextState | undefined>;
|
|
8
8
|
export declare function useModal(): ModalContextState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InteractiveProps } from '../interactive';
|
|
2
2
|
declare const STANDALONE_LINK_SIZES: readonly ["small", "medium", "large"];
|
|
3
3
|
type StandaloneLinkSize = (typeof STANDALONE_LINK_SIZES)[number];
|
|
4
4
|
declare const STANDALONE_LINK_COLORS: readonly ["primary", "secondary", "secondary-inverted"];
|
|
@@ -18,6 +18,6 @@ interface StandaloneLinkProps extends Omit<InteractiveProps, 'color' | 'size'> {
|
|
|
18
18
|
className?: string;
|
|
19
19
|
'data-testid'?: string;
|
|
20
20
|
}
|
|
21
|
-
declare const StandaloneLink: import(
|
|
21
|
+
declare const StandaloneLink: import('react').ForwardRefExoticComponent<StandaloneLinkProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
22
22
|
export type { StandaloneLinkSize, StandaloneLinkColor, StandaloneLinkIconPosition, StandaloneLinkProps, };
|
|
23
23
|
export { STANDALONE_LINK_SIZES, STANDALONE_LINK_COLORS, STANDALONE_LINK_ICON_POSITIONS, StandaloneLink, };
|