diff --git a/packages/core/src/components/alert/alert.tsx b/packages/core/src/components/alert/alert.tsx index ff74da4dfb..3fe1e34ea6 100644 --- a/packages/core/src/components/alert/alert.tsx +++ b/packages/core/src/components/alert/alert.tsx @@ -17,7 +17,14 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Intent, MaybeElement, Props } from "../../common"; +import { + AbstractPureComponent, + Classes, + DISPLAYNAME_PREFIX, + type Intent, + type MaybeElement, + type Props, +} from "../../common"; import { ALERT_WARN_CANCEL_ESCAPE_KEY, ALERT_WARN_CANCEL_OUTSIDE_CLICK, @@ -25,7 +32,7 @@ import { } from "../../common/errors"; import { Button } from "../button/buttons"; import { Dialog } from "../dialog/dialog"; -import { Icon, IconName } from "../icon/icon"; +import { Icon, type IconName } from "../icon/icon"; import type { OverlayLifecycleProps } from "../overlay/overlay"; export interface AlertProps extends OverlayLifecycleProps, Props { diff --git a/packages/core/src/components/breadcrumbs/breadcrumb.tsx b/packages/core/src/components/breadcrumbs/breadcrumb.tsx index 21c4be629b..c9f33de42a 100644 --- a/packages/core/src/components/breadcrumbs/breadcrumb.tsx +++ b/packages/core/src/components/breadcrumbs/breadcrumb.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { ActionProps, Classes, LinkProps } from "../../common"; +import { type ActionProps, Classes, type LinkProps } from "../../common"; import { Icon } from "../icon/icon"; export interface BreadcrumbProps extends ActionProps, LinkProps { diff --git a/packages/core/src/components/breadcrumbs/breadcrumbs.tsx b/packages/core/src/components/breadcrumbs/breadcrumbs.tsx index f735f8fbf4..eea3711050 100644 --- a/packages/core/src/components/breadcrumbs/breadcrumbs.tsx +++ b/packages/core/src/components/breadcrumbs/breadcrumbs.tsx @@ -17,12 +17,12 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Boundary, Classes, Props, removeNonHTMLProps } from "../../common"; +import { AbstractPureComponent, Boundary, Classes, type Props, removeNonHTMLProps } from "../../common"; import { Menu } from "../menu/menu"; import { MenuItem } from "../menu/menuItem"; -import { OverflowList, OverflowListProps } from "../overflow-list/overflowList"; -import { Popover, PopoverProps } from "../popover/popover"; -import { Breadcrumb, BreadcrumbProps } from "./breadcrumb"; +import { OverflowList, type OverflowListProps } from "../overflow-list/overflowList"; +import { Popover, type PopoverProps } from "../popover/popover"; +import { Breadcrumb, type BreadcrumbProps } from "./breadcrumb"; export interface BreadcrumbsProps extends Props { /** diff --git a/packages/core/src/components/button/buttonGroup.tsx b/packages/core/src/components/button/buttonGroup.tsx index 8c7a708749..a883ac3def 100644 --- a/packages/core/src/components/button/buttonGroup.tsx +++ b/packages/core/src/components/button/buttonGroup.tsx @@ -17,8 +17,8 @@ import classNames from "classnames"; import * as React from "react"; -import { Alignment, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { type Alignment, Classes } from "../../common"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; export interface ButtonGroupProps extends Props, HTMLDivProps, React.RefAttributes { /** diff --git a/packages/core/src/components/callout/callout.tsx b/packages/core/src/components/callout/callout.tsx index a2f487cebf..465210a2ec 100644 --- a/packages/core/src/components/callout/callout.tsx +++ b/packages/core/src/components/callout/callout.tsx @@ -17,17 +17,17 @@ import classNames from "classnames"; import * as React from "react"; -import { Error, IconName, InfoSign, Tick, WarningSign } from "@blueprintjs/icons"; +import { Error, type IconName, InfoSign, Tick, WarningSign } from "@blueprintjs/icons"; import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, - HTMLDivProps, + type HTMLDivProps, Intent, - IntentProps, - MaybeElement, - Props, + type IntentProps, + type MaybeElement, + type Props, Utils, } from "../../common"; import { H5 } from "../html/html"; diff --git a/packages/core/src/components/card-list/cardList.tsx b/packages/core/src/components/card-list/cardList.tsx index 38cd288f8b..2f4ac71a97 100644 --- a/packages/core/src/components/card-list/cardList.tsx +++ b/packages/core/src/components/card-list/cardList.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes, DISPLAYNAME_PREFIX, Elevation, HTMLDivProps, Props } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, Elevation, type HTMLDivProps, type Props } from "../../common"; import { Card } from "../card/card"; export interface CardListProps extends Props, HTMLDivProps, React.RefAttributes { diff --git a/packages/core/src/components/card/card.tsx b/packages/core/src/components/card/card.tsx index 8f929562af..632d8eaa29 100644 --- a/packages/core/src/components/card/card.tsx +++ b/packages/core/src/components/card/card.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { Classes, Elevation } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; export interface CardProps extends Props, HTMLDivProps, React.RefAttributes { /** diff --git a/packages/core/src/components/collapse/collapse.tsx b/packages/core/src/components/collapse/collapse.tsx index 01e1ee28ab..12f4790034 100644 --- a/packages/core/src/components/collapse/collapse.tsx +++ b/packages/core/src/components/collapse/collapse.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type Props } from "../../common/props"; export interface CollapseProps extends Props { /** Contents to collapse. */ diff --git a/packages/core/src/components/context-menu/contextMenu.tsx b/packages/core/src/components/context-menu/contextMenu.tsx index 0c08e67fe2..c12d137870 100644 --- a/packages/core/src/components/context-menu/contextMenu.tsx +++ b/packages/core/src/components/context-menu/contextMenu.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes, DISPLAYNAME_PREFIX, mergeRefs, Props, Utils } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, mergeRefs, type Props, Utils } from "../../common"; import { TooltipContext, TooltipProvider } from "../popover/tooltipContext"; import { ContextMenuPopover } from "./contextMenuPopover"; import type { ContextMenuPopoverOptions, Offset } from "./contextMenuShared"; diff --git a/packages/core/src/components/context-menu/contextMenuSingleton.tsx b/packages/core/src/components/context-menu/contextMenuSingleton.tsx index def83f0fe7..2154f777c8 100644 --- a/packages/core/src/components/context-menu/contextMenuSingleton.tsx +++ b/packages/core/src/components/context-menu/contextMenuSingleton.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import { Classes } from "../../common"; -import { ContextMenuPopover, ContextMenuPopoverProps } from "./contextMenuPopover"; +import { ContextMenuPopover, type ContextMenuPopoverProps } from "./contextMenuPopover"; /** DOM element which contains the context menu singleton instance for the imperative ContextMenu APIs. */ let contextMenuElement: HTMLElement | undefined; diff --git a/packages/core/src/components/control-card/checkboxCard.tsx b/packages/core/src/components/control-card/checkboxCard.tsx index ae124eebc5..7b1376837e 100644 --- a/packages/core/src/components/control-card/checkboxCard.tsx +++ b/packages/core/src/components/control-card/checkboxCard.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { Classes } from "../../common"; import { DISPLAYNAME_PREFIX } from "../../common/props"; -import { ControlCard, ControlCardProps } from "./controlCard"; +import { ControlCard, type ControlCardProps } from "./controlCard"; export type CheckboxCardProps = Omit; diff --git a/packages/core/src/components/control-card/controlCard.tsx b/packages/core/src/components/control-card/controlCard.tsx index 5a7af47400..71ba205429 100644 --- a/packages/core/src/components/control-card/controlCard.tsx +++ b/packages/core/src/components/control-card/controlCard.tsx @@ -18,8 +18,8 @@ import classNames from "classnames"; import * as React from "react"; import { Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLInputProps } from "../../common/props"; -import { Card, CardProps } from "../card/card"; +import { DISPLAYNAME_PREFIX, type HTMLInputProps } from "../../common/props"; +import { Card, type CardProps } from "../card/card"; import type { CheckedControlProps, ControlProps } from "../forms/controlProps"; import { Checkbox, Switch } from "../forms/controls"; import { useCheckedControl } from "./useCheckedControl"; diff --git a/packages/core/src/components/control-card/switchCard.tsx b/packages/core/src/components/control-card/switchCard.tsx index 490a5affc8..f91ee8cb96 100644 --- a/packages/core/src/components/control-card/switchCard.tsx +++ b/packages/core/src/components/control-card/switchCard.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { Classes } from "../../common"; import { DISPLAYNAME_PREFIX } from "../../common/props"; -import { ControlCard, ControlCardProps } from "./controlCard"; +import { ControlCard, type ControlCardProps } from "./controlCard"; export type SwitchCardProps = Omit; diff --git a/packages/core/src/components/dialog/dialog.tsx b/packages/core/src/components/dialog/dialog.tsx index 5c7c523a6a..9ab1523170 100644 --- a/packages/core/src/components/dialog/dialog.tsx +++ b/packages/core/src/components/dialog/dialog.tsx @@ -17,15 +17,15 @@ import classNames from "classnames"; import * as React from "react"; -import { IconName, IconSize, SmallCross } from "@blueprintjs/icons"; +import { type IconName, IconSize, SmallCross } from "@blueprintjs/icons"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, MaybeElement, Props } from "../../common"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type MaybeElement, type Props } from "../../common"; import * as Errors from "../../common/errors"; import { uniqueId } from "../../common/utils"; import { Button } from "../button/buttons"; import { H6 } from "../html/html"; import { Icon } from "../icon/icon"; -import { BackdropProps, Overlay, OverlayableProps } from "../overlay/overlay"; +import { type BackdropProps, Overlay, type OverlayableProps } from "../overlay/overlay"; export interface DialogProps extends OverlayableProps, BackdropProps, Props { /** Dialog contents. */ diff --git a/packages/core/src/components/dialog/dialogStep.tsx b/packages/core/src/components/dialog/dialogStep.tsx index 75616f1fa6..ba3c08752c 100644 --- a/packages/core/src/components/dialog/dialogStep.tsx +++ b/packages/core/src/components/dialog/dialogStep.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; import type { DialogStepButtonProps } from "./dialogStepButton"; export type DialogStepId = string | number; diff --git a/packages/core/src/components/dialog/dialogStepButton.tsx b/packages/core/src/components/dialog/dialogStepButton.tsx index d5651c23a2..4b59d09c50 100644 --- a/packages/core/src/components/dialog/dialogStepButton.tsx +++ b/packages/core/src/components/dialog/dialogStepButton.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import type { ButtonSharedPropsAndAttributes } from "../button/buttonProps"; import { AnchorButton } from "../button/buttons"; -import { Tooltip, TooltipProps } from "../tooltip/tooltip"; +import { Tooltip, type TooltipProps } from "../tooltip/tooltip"; export type DialogStepButtonProps = Partial & { /** If defined, the button will be wrapped with a tooltip with the specified content. */ diff --git a/packages/core/src/components/dialog/multistepDialog.tsx b/packages/core/src/components/dialog/multistepDialog.tsx index 77d9c2ecfb..986ff205b0 100644 --- a/packages/core/src/components/dialog/multistepDialog.tsx +++ b/packages/core/src/components/dialog/multistepDialog.tsx @@ -17,13 +17,13 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, Position, Utils } from "../../common"; +import { AbstractPureComponent, Classes, type Position, Utils } from "../../common"; import { DISPLAYNAME_PREFIX } from "../../common/props"; import { clickElementOnKeyPress } from "../../common/utils"; -import { Dialog, DialogProps } from "./dialog"; +import { Dialog, type DialogProps } from "./dialog"; import { DialogFooter } from "./dialogFooter"; -import { DialogStep, DialogStepId, DialogStepProps } from "./dialogStep"; -import { DialogStepButton, DialogStepButtonProps } from "./dialogStepButton"; +import { DialogStep, type DialogStepId, type DialogStepProps } from "./dialogStep"; +import { DialogStepButton, type DialogStepButtonProps } from "./dialogStepButton"; type DialogStepElement = React.ReactElement; diff --git a/packages/core/src/components/divider/divider.tsx b/packages/core/src/components/divider/divider.tsx index 0ace89ec72..90e43844ef 100644 --- a/packages/core/src/components/divider/divider.tsx +++ b/packages/core/src/components/divider/divider.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { AbstractPureComponent } from "../../common"; import { DIVIDER } from "../../common/classes"; -import { DISPLAYNAME_PREFIX, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type Props } from "../../common/props"; export interface DividerProps extends Props, React.HTMLAttributes { /** diff --git a/packages/core/src/components/drawer/drawer.tsx b/packages/core/src/components/drawer/drawer.tsx index a6e4a28a87..3cf7d75ef7 100644 --- a/packages/core/src/components/drawer/drawer.tsx +++ b/packages/core/src/components/drawer/drawer.tsx @@ -17,16 +17,16 @@ import classNames from "classnames"; import * as React from "react"; -import { IconName, IconSize, SmallCross } from "@blueprintjs/icons"; +import { type IconName, IconSize, SmallCross } from "@blueprintjs/icons"; -import { AbstractPureComponent, Classes, Props } from "../../common"; +import { AbstractPureComponent, Classes, type Props } from "../../common"; import * as Errors from "../../common/errors"; -import { getPositionIgnoreAngles, isPositionHorizontal, Position } from "../../common/position"; -import { DISPLAYNAME_PREFIX, MaybeElement } from "../../common/props"; +import { getPositionIgnoreAngles, isPositionHorizontal, type Position } from "../../common/position"; +import { DISPLAYNAME_PREFIX, type MaybeElement } from "../../common/props"; import { Button } from "../button/buttons"; import { H4 } from "../html/html"; import { Icon } from "../icon/icon"; -import { BackdropProps, Overlay, OverlayableProps } from "../overlay/overlay"; +import { type BackdropProps, Overlay, type OverlayableProps } from "../overlay/overlay"; export enum DrawerSize { SMALL = "360px", diff --git a/packages/core/src/components/editable-text/editableText.tsx b/packages/core/src/components/editable-text/editableText.tsx index 65204b9870..2f357e2f89 100644 --- a/packages/core/src/components/editable-text/editableText.tsx +++ b/packages/core/src/components/editable-text/editableText.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props"; import { clamp } from "../../common/utils"; export interface EditableTextProps extends IntentProps, Props { diff --git a/packages/core/src/components/forms/controlGroup.tsx b/packages/core/src/components/forms/controlGroup.tsx index 90cebcd9b5..9623a26db8 100644 --- a/packages/core/src/components/forms/controlGroup.tsx +++ b/packages/core/src/components/forms/controlGroup.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; export interface ControlGroupProps extends Props, HTMLDivProps, React.RefAttributes { /** Group contents. */ diff --git a/packages/core/src/components/forms/fileInput.tsx b/packages/core/src/components/forms/fileInput.tsx index c41d1ab2a0..f2041c5524 100644 --- a/packages/core/src/components/forms/fileInput.tsx +++ b/packages/core/src/components/forms/fileInput.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type Props } from "../../common/props"; export interface FileInputProps extends React.LabelHTMLAttributes, Props { /** diff --git a/packages/core/src/components/forms/formGroup.tsx b/packages/core/src/components/forms/formGroup.tsx index 9b60d6f164..8e7c655253 100644 --- a/packages/core/src/components/forms/formGroup.tsx +++ b/packages/core/src/components/forms/formGroup.tsx @@ -17,8 +17,8 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, Intent } from "../../common"; -import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props"; +import { AbstractPureComponent, Classes, type Intent } from "../../common"; +import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props"; export interface FormGroupProps extends IntentProps, Props { /** Group contents. */ diff --git a/packages/core/src/components/forms/inputGroup.tsx b/packages/core/src/components/forms/inputGroup.tsx index 24a9893dd9..0e971e3664 100644 --- a/packages/core/src/components/forms/inputGroup.tsx +++ b/packages/core/src/components/forms/inputGroup.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; import * as Errors from "../../common/errors"; -import { ControlledProps, DISPLAYNAME_PREFIX, HTMLInputProps, removeNonHTMLProps } from "../../common/props"; +import { type ControlledProps, DISPLAYNAME_PREFIX, type HTMLInputProps, removeNonHTMLProps } from "../../common/props"; import { Icon } from "../icon/icon"; import { AsyncControllableInput } from "./asyncControllableInput"; import type { InputSharedProps } from "./inputSharedProps"; diff --git a/packages/core/src/components/forms/numericInput.tsx b/packages/core/src/components/forms/numericInput.tsx index 74ca09343b..cf70c8e2f2 100644 --- a/packages/core/src/components/forms/numericInput.tsx +++ b/packages/core/src/components/forms/numericInput.tsx @@ -23,7 +23,7 @@ import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, - HTMLInputProps, + type HTMLInputProps, Intent, Position, refHandler, diff --git a/packages/core/src/components/forms/radioGroup.tsx b/packages/core/src/components/forms/radioGroup.tsx index 1abd812cae..25fd28b8da 100644 --- a/packages/core/src/components/forms/radioGroup.tsx +++ b/packages/core/src/components/forms/radioGroup.tsx @@ -16,10 +16,10 @@ import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, OptionProps, Props } from "../../common"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type OptionProps, type Props } from "../../common"; import * as Errors from "../../common/errors"; import { isElementOfType } from "../../common/utils"; -import { Radio, RadioProps } from "./controls"; +import { Radio, type RadioProps } from "./controls"; export interface RadioGroupProps extends Props { /** diff --git a/packages/core/src/components/forms/textArea.tsx b/packages/core/src/components/forms/textArea.tsx index bde34cd7de..8261a2f056 100644 --- a/packages/core/src/components/forms/textArea.tsx +++ b/packages/core/src/components/forms/textArea.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes, refHandler, setRef } from "../../common"; -import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props"; import { AsyncControllableTextArea } from "./asyncControllableTextArea"; export interface TextAreaProps extends IntentProps, Props, React.TextareaHTMLAttributes { diff --git a/packages/core/src/components/hotkeys/hotkey.tsx b/packages/core/src/components/hotkeys/hotkey.tsx index 501fc1dc72..14ef495a97 100644 --- a/packages/core/src/components/hotkeys/hotkey.tsx +++ b/packages/core/src/components/hotkeys/hotkey.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import type { HotkeyConfig } from "../../hooks"; import { KeyComboTag } from "./keyComboTag"; diff --git a/packages/core/src/components/hotkeys/hotkeys.tsx b/packages/core/src/components/hotkeys/hotkeys.tsx index caef159369..bde6a0a512 100644 --- a/packages/core/src/components/hotkeys/hotkeys.tsx +++ b/packages/core/src/components/hotkeys/hotkeys.tsx @@ -17,11 +17,11 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import { HOTKEYS_HOTKEY_CHILDREN } from "../../common/errors"; import { isElementOfType, isReactChildrenElementOrElements } from "../../common/utils"; import { H4 } from "../html/html"; -import { Hotkey, HotkeyProps } from "./hotkey"; +import { Hotkey, type HotkeyProps } from "./hotkey"; export interface HotkeysProps extends Props { /** diff --git a/packages/core/src/components/hotkeys/hotkeysDialog2.tsx b/packages/core/src/components/hotkeys/hotkeysDialog2.tsx index 8a1bfd02d6..7646aa082d 100644 --- a/packages/core/src/components/hotkeys/hotkeysDialog2.tsx +++ b/packages/core/src/components/hotkeys/hotkeysDialog2.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { Classes } from "../../common"; import type { HotkeyConfig } from "../../hooks"; -import { Dialog, DialogProps } from "../dialog/dialog"; +import { Dialog, type DialogProps } from "../dialog/dialog"; import { DialogBody } from "../dialog/dialogBody"; import { Hotkey } from "./hotkey"; import { Hotkeys } from "./hotkeys"; diff --git a/packages/core/src/components/hotkeys/hotkeysTarget2.tsx b/packages/core/src/components/hotkeys/hotkeysTarget2.tsx index eb8393dc1f..5b63f2247b 100644 --- a/packages/core/src/components/hotkeys/hotkeysTarget2.tsx +++ b/packages/core/src/components/hotkeys/hotkeysTarget2.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import * as Errors from "../../common/errors"; import { isNodeEnv } from "../../common/utils"; -import { HotkeyConfig, useHotkeys, UseHotkeysOptions } from "../../hooks"; +import { type HotkeyConfig, useHotkeys, type UseHotkeysOptions } from "../../hooks"; /** Identical to the return type of `useHotkeys` hook. */ export interface HotkeysTarget2RenderProps { diff --git a/packages/core/src/components/hotkeys/keyComboTag.tsx b/packages/core/src/components/hotkeys/keyComboTag.tsx index 53c93a25cc..52b69805a1 100644 --- a/packages/core/src/components/hotkeys/keyComboTag.tsx +++ b/packages/core/src/components/hotkeys/keyComboTag.tsx @@ -17,8 +17,8 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; -import { Icon, IconName } from "../icon/icon"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; +import { Icon, type IconName } from "../icon/icon"; import { normalizeKeyCombo } from "./hotkeyParser"; const KEY_ICONS: Record = { diff --git a/packages/core/src/components/html-select/htmlSelect.tsx b/packages/core/src/components/html-select/htmlSelect.tsx index b85ae7ee56..f885856a5d 100644 --- a/packages/core/src/components/html-select/htmlSelect.tsx +++ b/packages/core/src/components/html-select/htmlSelect.tsx @@ -17,10 +17,10 @@ import classNames from "classnames"; import * as React from "react"; -import { CaretDown, DoubleCaretVertical, IconName, SVGIconProps } from "@blueprintjs/icons"; +import { CaretDown, DoubleCaretVertical, type IconName, type SVGIconProps } from "@blueprintjs/icons"; import { DISABLED, FILL, HTML_SELECT, LARGE, MINIMAL } from "../../common/classes"; -import { DISPLAYNAME_PREFIX, OptionProps } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type OptionProps } from "../../common/props"; import type { Extends } from "../../common/utils"; export type HTMLSelectIconName = Extends; diff --git a/packages/core/src/components/icon/icon.tsx b/packages/core/src/components/icon/icon.tsx index ec73def59e..8ac37d86e0 100644 --- a/packages/core/src/components/icon/icon.tsx +++ b/packages/core/src/components/icon/icon.tsx @@ -18,16 +18,23 @@ import classNames from "classnames"; import * as React from "react"; import { - DefaultSVGIconProps, - IconName, - IconPaths, + type DefaultSVGIconProps, + type IconName, + type IconPaths, Icons, IconSize, SVGIconContainer, - SVGIconProps, + type SVGIconProps, } from "@blueprintjs/icons"; -import { Classes, DISPLAYNAME_PREFIX, IntentProps, MaybeElement, Props, removeNonHTMLProps } from "../../common"; +import { + Classes, + DISPLAYNAME_PREFIX, + type IntentProps, + type MaybeElement, + type Props, + removeNonHTMLProps, +} from "../../common"; // re-export for convenience, since some users won't be importing from or have a direct dependency on the icons package export { type IconName, IconSize }; diff --git a/packages/core/src/components/menu/menu.tsx b/packages/core/src/components/menu/menu.tsx index 328e25f494..01b9703583 100644 --- a/packages/core/src/components/menu/menu.tsx +++ b/packages/core/src/components/menu/menu.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type Props } from "../../common/props"; export interface MenuProps extends Props, React.HTMLAttributes { /** Menu items. */ diff --git a/packages/core/src/components/menu/menuDivider.tsx b/packages/core/src/components/menu/menuDivider.tsx index e5793cf8ac..449b794db7 100644 --- a/packages/core/src/components/menu/menuDivider.tsx +++ b/packages/core/src/components/menu/menuDivider.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import { H6 } from "../html/html"; export interface MenuDividerProps extends Props { diff --git a/packages/core/src/components/menu/menuItem.tsx b/packages/core/src/components/menu/menuItem.tsx index 282d5fcf24..5c955a43b8 100644 --- a/packages/core/src/components/menu/menuItem.tsx +++ b/packages/core/src/components/menu/menuItem.tsx @@ -20,12 +20,12 @@ import * as React from "react"; import { CaretRight, SmallTick } from "@blueprintjs/icons"; import { Classes } from "../../common"; -import { ActionProps, DISPLAYNAME_PREFIX, removeNonHTMLProps } from "../../common/props"; +import { type ActionProps, DISPLAYNAME_PREFIX, removeNonHTMLProps } from "../../common/props"; import { clickElementOnKeyPress } from "../../common/utils"; import { Icon } from "../icon/icon"; -import { Popover, PopoverProps } from "../popover/popover"; +import { Popover, type PopoverProps } from "../popover/popover"; import { Text } from "../text/text"; -import { Menu, MenuProps } from "./menu"; +import { Menu, type MenuProps } from "./menu"; /** * Note that the HTML attributes supported by this component are spread to the nested `` element, while the diff --git a/packages/core/src/components/navbar/navbar.tsx b/packages/core/src/components/navbar/navbar.tsx index 7e38abf178..2a4adb9096 100644 --- a/packages/core/src/components/navbar/navbar.tsx +++ b/packages/core/src/components/navbar/navbar.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; import { NavbarDivider } from "./navbarDivider"; import { NavbarGroup } from "./navbarGroup"; import { NavbarHeading } from "./navbarHeading"; diff --git a/packages/core/src/components/navbar/navbarDivider.tsx b/packages/core/src/components/navbar/navbarDivider.tsx index 92e86e4429..511b296cfb 100644 --- a/packages/core/src/components/navbar/navbarDivider.tsx +++ b/packages/core/src/components/navbar/navbarDivider.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; // allow the empty interface so we can label it clearly in the docs export interface NavbarDividerProps extends Props, HTMLDivProps { diff --git a/packages/core/src/components/navbar/navbarGroup.tsx b/packages/core/src/components/navbar/navbarGroup.tsx index ee538d9528..99caf30c94 100644 --- a/packages/core/src/components/navbar/navbarGroup.tsx +++ b/packages/core/src/components/navbar/navbarGroup.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Alignment, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; export interface NavbarGroupProps extends Props, HTMLDivProps { /** diff --git a/packages/core/src/components/navbar/navbarHeading.tsx b/packages/core/src/components/navbar/navbarHeading.tsx index 0ea37f8d81..8eb5f4673b 100644 --- a/packages/core/src/components/navbar/navbarHeading.tsx +++ b/packages/core/src/components/navbar/navbarHeading.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; export interface NavbarHeadingProps extends Props, HTMLDivProps { children?: React.ReactNode; diff --git a/packages/core/src/components/non-ideal-state/nonIdealState.tsx b/packages/core/src/components/non-ideal-state/nonIdealState.tsx index df638e3835..b3115abcd5 100644 --- a/packages/core/src/components/non-ideal-state/nonIdealState.tsx +++ b/packages/core/src/components/non-ideal-state/nonIdealState.tsx @@ -17,9 +17,9 @@ import classNames from "classnames"; import * as React from "react"; -import { IconName, IconSize } from "@blueprintjs/icons"; +import { type IconName, IconSize } from "@blueprintjs/icons"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, MaybeElement, Props } from "../../common"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type MaybeElement, type Props } from "../../common"; import { ensureElement } from "../../common/utils"; import { H4 } from "../html/html"; import { Icon } from "../icon/icon"; diff --git a/packages/core/src/components/overflow-list/overflowList.tsx b/packages/core/src/components/overflow-list/overflowList.tsx index dd853a7f7d..6999911a76 100644 --- a/packages/core/src/components/overflow-list/overflowList.tsx +++ b/packages/core/src/components/overflow-list/overflowList.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Boundary, Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { Boundary, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import { OVERFLOW_LIST_OBSERVE_PARENTS_CHANGED } from "../../common/errors"; import { shallowCompareKeys } from "../../common/utils"; import { ResizeSensor } from "../resize-sensor/resizeSensor"; diff --git a/packages/core/src/components/overlay/overlay.tsx b/packages/core/src/components/overlay/overlay.tsx index c2190d06ad..c346766d52 100644 --- a/packages/core/src/components/overlay/overlay.tsx +++ b/packages/core/src/components/overlay/overlay.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { CSSTransition, TransitionGroup } from "react-transition-group"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; import { getActiveElement, isFunction } from "../../common/utils"; import { Portal } from "../portal/portal"; diff --git a/packages/core/src/components/panel-stack2/panelStack2.tsx b/packages/core/src/components/panel-stack2/panelStack2.tsx index 0094d99e56..07619a0a00 100644 --- a/packages/core/src/components/panel-stack2/panelStack2.tsx +++ b/packages/core/src/components/panel-stack2/panelStack2.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { CSSTransition, TransitionGroup } from "react-transition-group"; -import { Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import type { Panel } from "./panelTypes"; import { PanelView2 } from "./panelView2"; diff --git a/packages/core/src/components/popover/popover.tsx b/packages/core/src/components/popover/popover.tsx index 6dfaecfc8d..35ed02e503 100644 --- a/packages/core/src/components/popover/popover.tsx +++ b/packages/core/src/components/popover/popover.tsx @@ -17,13 +17,20 @@ import type { State as PopperState, PositioningStrategy } from "@popperjs/core"; import classNames from "classnames"; import * as React from "react"; -import { Manager, Modifier, Popper, PopperChildrenProps, Reference, ReferenceChildrenProps } from "react-popper"; +import { + Manager, + type Modifier, + Popper, + type PopperChildrenProps, + Reference, + type ReferenceChildrenProps, +} from "react-popper"; import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, - HTMLDivProps, + type HTMLDivProps, mergeRefs, refHandler, Utils, diff --git a/packages/core/src/components/popover/popoverSharedProps.ts b/packages/core/src/components/popover/popoverSharedProps.ts index 80365a82b9..af8838da14 100644 --- a/packages/core/src/components/popover/popoverSharedProps.ts +++ b/packages/core/src/components/popover/popoverSharedProps.ts @@ -22,7 +22,7 @@ import type { Props } from "../../common"; import type { OverlayableProps } from "../overlay/overlay"; import type { PopoverPosition } from "./popoverPosition"; -export { Boundary as PopperBoundary, Placement }; +export type { Boundary as PopperBoundary, Placement }; // copied from @popperjs/core, where it is not exported as public export type StrictModifierNames = NonNullable; diff --git a/packages/core/src/components/portal/portal.tsx b/packages/core/src/components/portal/portal.tsx index 9b042f6a87..44fa4334a1 100644 --- a/packages/core/src/components/portal/portal.tsx +++ b/packages/core/src/components/portal/portal.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import { Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import type { ValidationMap } from "../../common/context"; import * as Errors from "../../common/errors"; import { PortalContext } from "../../context/portal/portalProvider"; diff --git a/packages/core/src/components/progress-bar/progressBar.tsx b/packages/core/src/components/progress-bar/progressBar.tsx index 1347325191..020566e034 100644 --- a/packages/core/src/components/progress-bar/progressBar.tsx +++ b/packages/core/src/components/progress-bar/progressBar.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props"; import { clamp } from "../../common/utils"; export interface ProgressBarProps extends Props, IntentProps { diff --git a/packages/core/src/components/section/section.tsx b/packages/core/src/components/section/section.tsx index 62d0623f19..b14fc4e39b 100644 --- a/packages/core/src/components/section/section.tsx +++ b/packages/core/src/components/section/section.tsx @@ -17,12 +17,12 @@ import classNames from "classnames"; import * as React from "react"; -import { ChevronDown, ChevronUp, IconName } from "@blueprintjs/icons"; +import { ChevronDown, ChevronUp, type IconName } from "@blueprintjs/icons"; import { Classes, Elevation, Utils } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, MaybeElement, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type MaybeElement, type Props } from "../../common/props"; import { Card } from "../card/card"; -import { Collapse, CollapseProps } from "../collapse/collapse"; +import { Collapse, type CollapseProps } from "../collapse/collapse"; import { H6 } from "../html/html"; import { Icon } from "../icon/icon"; diff --git a/packages/core/src/components/section/sectionCard.tsx b/packages/core/src/components/section/sectionCard.tsx index fb9a44847e..bcf033e7c4 100644 --- a/packages/core/src/components/section/sectionCard.tsx +++ b/packages/core/src/components/section/sectionCard.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type Props } from "../../common/props"; export interface SectionCardProps extends Props, HTMLDivProps, React.RefAttributes { /** diff --git a/packages/core/src/components/slider/multiSlider.tsx b/packages/core/src/components/slider/multiSlider.tsx index c4444b4281..8d7a56530e 100644 --- a/packages/core/src/components/slider/multiSlider.tsx +++ b/packages/core/src/components/slider/multiSlider.tsx @@ -17,10 +17,18 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Intent, IntentProps, Props, Utils } from "../../common"; +import { + AbstractPureComponent, + Classes, + DISPLAYNAME_PREFIX, + Intent, + type IntentProps, + type Props, + Utils, +} from "../../common"; import * as Errors from "../../common/errors"; import { Handle } from "./handle"; -import { HandleInteractionKind, HandleProps, HandleType } from "./handleProps"; +import { HandleInteractionKind, type HandleProps, HandleType } from "./handleProps"; import { argMin, fillValues, formatPercentage } from "./sliderUtils"; /** diff --git a/packages/core/src/components/slider/rangeSlider.tsx b/packages/core/src/components/slider/rangeSlider.tsx index 1475bba50b..b9eca1ee2f 100644 --- a/packages/core/src/components/slider/rangeSlider.tsx +++ b/packages/core/src/components/slider/rangeSlider.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { AbstractPureComponent, DISPLAYNAME_PREFIX, Intent } from "../../common"; import * as Errors from "../../common/errors"; import type { HandleHtmlProps } from "./handleProps"; -import { MultiSlider, SliderBaseProps } from "./multiSlider"; +import { MultiSlider, type SliderBaseProps } from "./multiSlider"; export type NumberRange = [number, number]; diff --git a/packages/core/src/components/slider/slider.tsx b/packages/core/src/components/slider/slider.tsx index 394b4db46f..27280fd7b7 100644 --- a/packages/core/src/components/slider/slider.tsx +++ b/packages/core/src/components/slider/slider.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { AbstractPureComponent, Intent } from "../../common"; import { DISPLAYNAME_PREFIX } from "../../common/props"; import type { HandleHtmlProps } from "./handleProps"; -import { MultiSlider, SliderBaseProps } from "./multiSlider"; +import { MultiSlider, type SliderBaseProps } from "./multiSlider"; export interface SliderProps extends SliderBaseProps { /** diff --git a/packages/core/src/components/spinner/spinner.tsx b/packages/core/src/components/spinner/spinner.tsx index 13d605ad22..38c0cb9f3a 100644 --- a/packages/core/src/components/spinner/spinner.tsx +++ b/packages/core/src/components/spinner/spinner.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { AbstractPureComponent, Classes } from "../../common"; import { SPINNER_WARN_CLASSES_SIZE } from "../../common/errors"; -import { DISPLAYNAME_PREFIX, IntentProps, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type IntentProps, type Props } from "../../common/props"; import { clamp } from "../../common/utils"; export enum SpinnerSize { diff --git a/packages/core/src/components/tabs/tab.tsx b/packages/core/src/components/tabs/tab.tsx index fbe6cbd863..9d0cc975d5 100644 --- a/packages/core/src/components/tabs/tab.tsx +++ b/packages/core/src/components/tabs/tab.tsx @@ -20,7 +20,7 @@ import * as React from "react"; import type { IconName } from "@blueprintjs/icons"; import { AbstractPureComponent, Classes } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLDivProps, MaybeElement, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type HTMLDivProps, type MaybeElement, type Props } from "../../common/props"; import type { TagProps } from "../tag/tag"; export type TabId = string | number; diff --git a/packages/core/src/components/tabs/tabs.tsx b/packages/core/src/components/tabs/tabs.tsx index ff36f850cd..468ca13add 100644 --- a/packages/core/src/components/tabs/tabs.tsx +++ b/packages/core/src/components/tabs/tabs.tsx @@ -17,8 +17,8 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, Props, Utils } from "../../common"; -import { Tab, TabId, TabProps } from "./tab"; +import { AbstractPureComponent, Classes, DISPLAYNAME_PREFIX, type Props, Utils } from "../../common"; +import { Tab, type TabId, type TabProps } from "./tab"; import { generateTabPanelId, generateTabTitleId, TabTitle } from "./tabTitle"; /** diff --git a/packages/core/src/components/tag-input/resizableInput.tsx b/packages/core/src/components/tag-input/resizableInput.tsx index 4fa8350b7b..6b6442ece6 100644 --- a/packages/core/src/components/tag-input/resizableInput.tsx +++ b/packages/core/src/components/tag-input/resizableInput.tsx @@ -4,7 +4,7 @@ import * as React from "react"; -import { Classes, DISPLAYNAME_PREFIX, HTMLInputProps } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, type HTMLInputProps } from "../../common"; export type Ref = HTMLInputElement; diff --git a/packages/core/src/components/tag-input/tagInput.tsx b/packages/core/src/components/tag-input/tagInput.tsx index 0a743b062a..5f959d67ce 100644 --- a/packages/core/src/components/tag-input/tagInput.tsx +++ b/packages/core/src/components/tag-input/tagInput.tsx @@ -17,13 +17,19 @@ import classNames from "classnames"; import * as React from "react"; -import { IconName, IconSize } from "@blueprintjs/icons"; +import { type IconName, IconSize } from "@blueprintjs/icons"; import { AbstractPureComponent, Classes, refHandler, setRef, Utils } from "../../common"; -import { DISPLAYNAME_PREFIX, HTMLInputProps, IntentProps, MaybeElement, Props } from "../../common/props"; +import { + DISPLAYNAME_PREFIX, + type HTMLInputProps, + type IntentProps, + type MaybeElement, + type Props, +} from "../../common/props"; import { getActiveElement } from "../../common/utils"; import { Icon } from "../icon/icon"; -import { Tag, TagProps } from "../tag/tag"; +import { Tag, type TagProps } from "../tag/tag"; import { ResizableInput } from "./resizableInput"; /** diff --git a/packages/core/src/components/tag/tag.tsx b/packages/core/src/components/tag/tag.tsx index d2f8b2e96e..770369253b 100644 --- a/packages/core/src/components/tag/tag.tsx +++ b/packages/core/src/components/tag/tag.tsx @@ -17,9 +17,9 @@ import classNames from "classnames"; import * as React from "react"; -import { IconName, IconSize, SmallCross } from "@blueprintjs/icons"; +import { type IconName, IconSize, SmallCross } from "@blueprintjs/icons"; -import { Classes, DISPLAYNAME_PREFIX, IntentProps, MaybeElement, Props, Utils } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, type IntentProps, type MaybeElement, type Props, Utils } from "../../common"; import { isReactNodeEmpty } from "../../common/utils"; import { Icon } from "../icon/icon"; import { Text } from "../text/text"; diff --git a/packages/core/src/components/text/text.tsx b/packages/core/src/components/text/text.tsx index 7b0adb8336..a6cb9c4537 100644 --- a/packages/core/src/components/text/text.tsx +++ b/packages/core/src/components/text/text.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { Classes, mergeRefs } from "../../common"; -import { DISPLAYNAME_PREFIX, Props } from "../../common/props"; +import { DISPLAYNAME_PREFIX, type Props } from "../../common/props"; export interface TextProps extends Props, diff --git a/packages/core/src/components/toast/overlayToaster.tsx b/packages/core/src/components/toast/overlayToaster.tsx index 726dc4dad8..69ddeae3d5 100644 --- a/packages/core/src/components/toast/overlayToaster.tsx +++ b/packages/core/src/components/toast/overlayToaster.tsx @@ -24,7 +24,7 @@ import { DISPLAYNAME_PREFIX } from "../../common/props"; import { isNodeEnv } from "../../common/utils"; import { Overlay } from "../overlay/overlay"; import type { OverlayToasterProps } from "./overlayToasterProps"; -import { Toast, ToastProps } from "./toast"; +import { Toast, type ToastProps } from "./toast"; import type { Toaster, ToastOptions } from "./toaster"; export interface OverlayToasterState { diff --git a/packages/core/src/components/toast/toast.tsx b/packages/core/src/components/toast/toast.tsx index 1e9297066a..f733e44764 100644 --- a/packages/core/src/components/toast/toast.tsx +++ b/packages/core/src/components/toast/toast.tsx @@ -20,10 +20,17 @@ import * as React from "react"; import { Cross } from "@blueprintjs/icons"; import { AbstractPureComponent, Classes } from "../../common"; -import { ActionProps, DISPLAYNAME_PREFIX, IntentProps, LinkProps, MaybeElement, Props } from "../../common/props"; +import { + type ActionProps, + DISPLAYNAME_PREFIX, + type IntentProps, + type LinkProps, + type MaybeElement, + type Props, +} from "../../common/props"; import { ButtonGroup } from "../button/buttonGroup"; import { AnchorButton, Button } from "../button/buttons"; -import { Icon, IconName } from "../icon/icon"; +import { Icon, type IconName } from "../icon/icon"; export interface ToastProps extends Props, IntentProps { /** diff --git a/packages/core/src/components/tooltip/tooltip.tsx b/packages/core/src/components/tooltip/tooltip.tsx index a1a8ed858a..9da5473b68 100644 --- a/packages/core/src/components/tooltip/tooltip.tsx +++ b/packages/core/src/components/tooltip/tooltip.tsx @@ -17,13 +17,13 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractPureComponent, DISPLAYNAME_PREFIX, IntentProps } from "../../common"; +import { AbstractPureComponent, DISPLAYNAME_PREFIX, type IntentProps } from "../../common"; import * as Classes from "../../common/classes"; // eslint-disable-next-line import/no-cycle -import { Popover, PopoverInteractionKind } from "../popover/popover"; +import { Popover, type PopoverInteractionKind } from "../popover/popover"; import { TOOLTIP_ARROW_SVG_SIZE } from "../popover/popoverArrow"; import type { DefaultPopoverTargetHTMLProps, PopoverSharedProps } from "../popover/popoverSharedProps"; -import { TooltipContext, TooltipContextState, TooltipProvider } from "../popover/tooltipContext"; +import { TooltipContext, type TooltipContextState, TooltipProvider } from "../popover/tooltipContext"; export interface TooltipProps extends Omit, "shouldReturnFocusOnClose">, diff --git a/packages/core/src/components/tree/tree.tsx b/packages/core/src/components/tree/tree.tsx index 5c456fabed..661c0dcb2b 100644 --- a/packages/core/src/components/tree/tree.tsx +++ b/packages/core/src/components/tree/tree.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes, DISPLAYNAME_PREFIX, Props } from "../../common"; +import { Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import { TreeNode } from "./treeNode"; import type { TreeEventHandler, TreeNodeInfo } from "./treeTypes"; diff --git a/packages/core/src/context/hotkeys/hotkeysProvider.tsx b/packages/core/src/context/hotkeys/hotkeysProvider.tsx index 1a4a252a26..2820213de2 100644 --- a/packages/core/src/context/hotkeys/hotkeysProvider.tsx +++ b/packages/core/src/context/hotkeys/hotkeysProvider.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { shallowCompareKeys } from "../../common/utils"; -import { HotkeysDialog2, HotkeysDialogProps } from "../../components/hotkeys/hotkeysDialog2"; +import { HotkeysDialog2, type HotkeysDialogProps } from "../../components/hotkeys/hotkeysDialog2"; import type { HotkeyConfig } from "../../hooks"; interface HotkeysContextState { diff --git a/packages/core/src/hooks/hotkeys/useHotkeys.ts b/packages/core/src/hooks/hotkeys/useHotkeys.ts index d569b95268..e745b3dac1 100644 --- a/packages/core/src/hooks/hotkeys/useHotkeys.ts +++ b/packages/core/src/hooks/hotkeys/useHotkeys.ts @@ -18,7 +18,7 @@ import * as React from "react"; import { HOTKEYS_PROVIDER_NOT_FOUND } from "../../common/errors"; import { elementIsTextInput } from "../../common/utils/domUtils"; -import { comboMatches, getKeyCombo, KeyCombo, parseKeyCombo } from "../../components/hotkeys/hotkeyParser"; +import { comboMatches, getKeyCombo, type KeyCombo, parseKeyCombo } from "../../components/hotkeys/hotkeyParser"; import { HotkeysContext } from "../../context"; import type { HotkeyConfig } from "./hotkeyConfig"; diff --git a/packages/core/src/legacy/contextMenuTargetLegacy.tsx b/packages/core/src/legacy/contextMenuTargetLegacy.tsx index 83766143d3..814a921e2b 100644 --- a/packages/core/src/legacy/contextMenuTargetLegacy.tsx +++ b/packages/core/src/legacy/contextMenuTargetLegacy.tsx @@ -26,7 +26,7 @@ import * as ReactDOM from "react-dom"; import { isDarkTheme, isFunction } from "../common/utils"; import { show as showLegacyContextMenu } from "./contextMenuLegacy"; -import { Constructor, getDisplayName } from "./legacyCommon"; +import { type Constructor, getDisplayName } from "./legacyCommon"; export const CONTEXTMENU_WARN_DECORATOR_NO_METHOD = `[Blueprint] @ContextMenuTarget-decorated class should implement renderContextMenu.`; export const CONTEXTMENU_WARN_DECORATOR_NEEDS_REACT_ELEMENT = `[Blueprint] "@ContextMenuTarget-decorated components must return a single JSX.Element or an empty render.`; diff --git a/packages/core/src/legacy/hotkeysDialogLegacy.tsx b/packages/core/src/legacy/hotkeysDialogLegacy.tsx index 854bc5f879..6543e51ac3 100644 --- a/packages/core/src/legacy/hotkeysDialogLegacy.tsx +++ b/packages/core/src/legacy/hotkeysDialogLegacy.tsx @@ -26,7 +26,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import { Classes } from "../common"; -import { Dialog, DialogProps, Hotkey, HotkeyProps, Hotkeys } from "../components"; +import { Dialog, type DialogProps, Hotkey, type HotkeyProps, Hotkeys } from "../components"; interface HotkeysDialogProps extends DialogProps { /** diff --git a/packages/core/src/legacy/hotkeysEvents.ts b/packages/core/src/legacy/hotkeysEvents.ts index 232b1d5083..97ece03a4f 100644 --- a/packages/core/src/legacy/hotkeysEvents.ts +++ b/packages/core/src/legacy/hotkeysEvents.ts @@ -21,11 +21,11 @@ /* eslint-disable deprecation/deprecation */ -import { Children, ReactNode } from "react"; +import { Children, type ReactNode } from "react"; import { isElementOfType } from "../common/utils"; -import { Hotkey, HotkeyProps, HotkeysProps } from "../components/hotkeys"; -import { comboMatches, getKeyCombo, KeyCombo, parseKeyCombo } from "../components/hotkeys/hotkeyParser"; +import { Hotkey, type HotkeyProps, type HotkeysProps } from "../components/hotkeys"; +import { comboMatches, getKeyCombo, type KeyCombo, parseKeyCombo } from "../components/hotkeys/hotkeyParser"; import { hideHotkeysDialogAfterDelay, isHotkeysDialogShowing, showHotkeysDialog } from "./hotkeysDialogLegacy"; const SHOW_DIALOG_KEY = "?"; diff --git a/packages/core/src/legacy/hotkeysTargetLegacy.tsx b/packages/core/src/legacy/hotkeysTargetLegacy.tsx index c4d601f0c9..8b1c49e552 100644 --- a/packages/core/src/legacy/hotkeysTargetLegacy.tsx +++ b/packages/core/src/legacy/hotkeysTargetLegacy.tsx @@ -26,7 +26,7 @@ import * as React from "react"; import { isFunction } from "../common/utils"; import type { HotkeysProps } from "../components/hotkeys"; import { HotkeyScope, HotkeysEvents } from "./hotkeysEvents"; -import { Constructor, getDisplayName } from "./legacyCommon"; +import { type Constructor, getDisplayName } from "./legacyCommon"; const HOTKEYS_WARN_DECORATOR_NO_METHOD = `[Blueprint] @HotkeysTargetLegacy-decorated class should implement renderHotkeys.`; const HOTKEYS_WARN_DECORATOR_NEEDS_REACT_ELEMENT = `[Blueprint] "@HotkeysTargetLegacy-decorated components must return a single JSX.Element or an empty render.`; diff --git a/packages/core/test/alert/alertTests.tsx b/packages/core/test/alert/alertTests.tsx index 498aa1fb73..1c35e7e389 100644 --- a/packages/core/test/alert/alertTests.tsx +++ b/packages/core/test/alert/alertTests.tsx @@ -15,13 +15,13 @@ */ import { assert } from "chai"; -import { mount, shallow, ShallowWrapper } from "enzyme"; +import { mount, shallow, type ShallowWrapper } from "enzyme"; import * as React from "react"; -import { SinonStub, spy, stub } from "sinon"; +import { type SinonStub, spy, stub } from "sinon"; import { WarningSign } from "@blueprintjs/icons"; -import { Alert, AlertProps, Button, ButtonProps, Classes, Icon, Intent } from "../../src"; +import { Alert, type AlertProps, Button, type ButtonProps, Classes, Icon, Intent } from "../../src"; import * as Errors from "../../src/common/errors"; import { findInPortal } from "../utils"; diff --git a/packages/core/test/breadcrumbs/breadcrumbsTests.tsx b/packages/core/test/breadcrumbs/breadcrumbsTests.tsx index e225baccc5..54e8e1ec99 100644 --- a/packages/core/test/breadcrumbs/breadcrumbsTests.tsx +++ b/packages/core/test/breadcrumbs/breadcrumbsTests.tsx @@ -21,10 +21,10 @@ import sinon from "sinon"; import { Classes } from "../../src/common"; import { Boundary } from "../../src/common/boundary"; -import { Breadcrumb, BreadcrumbProps } from "../../src/components/breadcrumbs/breadcrumb"; +import { Breadcrumb, type BreadcrumbProps } from "../../src/components/breadcrumbs/breadcrumb"; import { Breadcrumbs } from "../../src/components/breadcrumbs/breadcrumbs"; import { MenuItem } from "../../src/components/menu/menuItem"; -import { OverflowList, OverflowListProps } from "../../src/components/overflow-list/overflowList"; +import { OverflowList, type OverflowListProps } from "../../src/components/overflow-list/overflowList"; const ITEMS: BreadcrumbProps[] = [{ text: "1" }, { text: "2" }, { text: "3" }]; diff --git a/packages/core/test/buttons/buttonTests.tsx b/packages/core/test/buttons/buttonTests.tsx index d601930eef..bcf46e5882 100644 --- a/packages/core/test/buttons/buttonTests.tsx +++ b/packages/core/test/buttons/buttonTests.tsx @@ -19,7 +19,7 @@ import { mount } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { AnchorButton, Button, ButtonProps, Classes, Icon, Spinner } from "../../src"; +import { AnchorButton, Button, type ButtonProps, Classes, Icon, Spinner } from "../../src"; describe("Buttons:", () => { buttonTestSuite(Button, "button"); diff --git a/packages/core/test/common/utilsTests.tsx b/packages/core/test/common/utilsTests.tsx index 37014acf3a..7e4d9c3a10 100644 --- a/packages/core/test/common/utilsTests.tsx +++ b/packages/core/test/common/utilsTests.tsx @@ -16,7 +16,7 @@ import { assert } from "chai"; import * as React from "react"; -import { SinonSpy, spy } from "sinon"; +import { type SinonSpy, spy } from "sinon"; import * as Utils from "../../src/common/utils"; diff --git a/packages/core/test/context-menu/contextMenuTests.tsx b/packages/core/test/context-menu/contextMenuTests.tsx index fa7353d855..4ab27ff12e 100644 --- a/packages/core/test/context-menu/contextMenuTests.tsx +++ b/packages/core/test/context-menu/contextMenuTests.tsx @@ -16,7 +16,7 @@ import { assert } from "chai"; import classNames from "classnames"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import { spy } from "sinon"; @@ -24,15 +24,15 @@ import { spy } from "sinon"; import { Classes, ContextMenu, - ContextMenuContentProps, - ContextMenuProps, + type ContextMenuContentProps, + type ContextMenuProps, Drawer, Menu, MenuItem, Popover, PopoverInteractionKind, Tooltip, - TooltipProps, + type TooltipProps, Utils, } from "../../src"; diff --git a/packages/core/test/control-card/controlCardTests.tsx b/packages/core/test/control-card/controlCardTests.tsx index 4fc79426aa..f4745d9b11 100644 --- a/packages/core/test/control-card/controlCardTests.tsx +++ b/packages/core/test/control-card/controlCardTests.tsx @@ -17,7 +17,7 @@ import { assert } from "chai"; import { mount } from "enzyme"; import * as React from "react"; -import { SinonSpy, spy } from "sinon"; +import { type SinonSpy, spy } from "sinon"; import { CheckboxCard, Classes, SwitchCard } from "../../src"; diff --git a/packages/core/test/controls/numericInputTests.tsx b/packages/core/test/controls/numericInputTests.tsx index b4ed0a2f23..3578c60152 100644 --- a/packages/core/test/controls/numericInputTests.tsx +++ b/packages/core/test/controls/numericInputTests.tsx @@ -15,14 +15,14 @@ import { assert, expect } from "chai"; import { - MountRendererProps, - ReactWrapper, - ShallowRendererProps, + type MountRendererProps, + type ReactWrapper, + type ShallowRendererProps, mount as untypedMount, shallow as untypedShallow, } from "enzyme"; import * as React from "react"; -import { SinonStub, spy, stub } from "sinon"; +import { type SinonStub, spy, stub } from "sinon"; import { dispatchMouseEvent } from "@blueprintjs/test-commons"; @@ -30,11 +30,11 @@ import { Button, ButtonGroup, ControlGroup, - HTMLInputProps, + type HTMLInputProps, Icon, InputGroup, NumericInput, - NumericInputProps, + type NumericInputProps, Position, } from "../../src"; import * as Errors from "../../src/common/errors"; diff --git a/packages/core/test/controls/radioGroupTests.tsx b/packages/core/test/controls/radioGroupTests.tsx index 4ea52059d2..fde6d727ab 100644 --- a/packages/core/test/controls/radioGroupTests.tsx +++ b/packages/core/test/controls/radioGroupTests.tsx @@ -15,11 +15,11 @@ */ import { assert } from "chai"; -import { EnzymePropSelector, mount, ReactWrapper } from "enzyme"; +import { type EnzymePropSelector, mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy, stub } from "sinon"; -import { OptionProps, Radio, RadioGroup } from "../../src"; +import { type OptionProps, Radio, RadioGroup } from "../../src"; import { RADIOGROUP_WARN_CHILDREN_OPTIONS_MUTEX } from "../../src/common/errors"; describe("", () => { diff --git a/packages/core/test/dialog/dialogTests.tsx b/packages/core/test/dialog/dialogTests.tsx index cbc32caebd..b675991387 100644 --- a/packages/core/test/dialog/dialogTests.tsx +++ b/packages/core/test/dialog/dialogTests.tsx @@ -19,7 +19,7 @@ import { mount } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { Button, Classes, Dialog, DialogBody, DialogFooter, DialogProps } from "../../src"; +import { Button, Classes, Dialog, DialogBody, DialogFooter, type DialogProps } from "../../src"; const COMMON_PROPS: Partial = { icon: "inbox", diff --git a/packages/core/test/drawer/drawerTests.tsx b/packages/core/test/drawer/drawerTests.tsx index 4007999fc9..025d920cea 100644 --- a/packages/core/test/drawer/drawerTests.tsx +++ b/packages/core/test/drawer/drawerTests.tsx @@ -15,11 +15,11 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { Button, Classes, Drawer, DrawerProps, Position } from "../../src"; +import { Button, Classes, Drawer, type DrawerProps, Position } from "../../src"; describe("", () => { let drawer: ReactWrapper; diff --git a/packages/core/test/editable-text/editableTextTests.tsx b/packages/core/test/editable-text/editableTextTests.tsx index 3bc3cf28bf..98bc498965 100644 --- a/packages/core/test/editable-text/editableTextTests.tsx +++ b/packages/core/test/editable-text/editableTextTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow } from "enzyme"; +import { mount, type ReactWrapper, shallow } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; diff --git a/packages/core/test/forms/fileInputTests.tsx b/packages/core/test/forms/fileInputTests.tsx index 5a58283a02..2eaaede074 100644 --- a/packages/core/test/forms/fileInputTests.tsx +++ b/packages/core/test/forms/fileInputTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow, ShallowWrapper } from "enzyme"; +import { mount, type ReactWrapper, shallow, type ShallowWrapper } from "enzyme"; import * as React from "react"; import sinon from "sinon"; diff --git a/packages/core/test/hooks/useHotkeysTests.tsx b/packages/core/test/hooks/useHotkeysTests.tsx index 2ac36a7915..c4adc8d2c9 100644 --- a/packages/core/test/hooks/useHotkeysTests.tsx +++ b/packages/core/test/hooks/useHotkeysTests.tsx @@ -17,7 +17,7 @@ import { render, screen } from "@testing-library/react"; import { expect } from "chai"; import * as React from "react"; -import { SinonStub, spy, stub } from "sinon"; +import { type SinonStub, spy, stub } from "sinon"; // N.B. { fireEvent } from "@testing-library/react" does not generate "real" enough events which // work with our hotkey parser implementation (worth investigating...) diff --git a/packages/core/test/hotkeys/hotkeyTests.tsx b/packages/core/test/hotkeys/hotkeyTests.tsx index 65190df7e7..6535fe51a3 100644 --- a/packages/core/test/hotkeys/hotkeyTests.tsx +++ b/packages/core/test/hotkeys/hotkeyTests.tsx @@ -17,7 +17,7 @@ import { render, screen } from "@testing-library/react"; import { expect } from "chai"; import * as React from "react"; -import { SinonStub, stub } from "sinon"; +import { type SinonStub, stub } from "sinon"; import { Hotkey } from "../../src/components/hotkeys"; diff --git a/packages/core/test/hotkeys/hotkeysParserTests.ts b/packages/core/test/hotkeys/hotkeysParserTests.ts index 7531090ea5..00d7e9d3b7 100644 --- a/packages/core/test/hotkeys/hotkeysParserTests.ts +++ b/packages/core/test/hotkeys/hotkeysParserTests.ts @@ -20,7 +20,7 @@ import { comboMatches, getKeyCombo, getKeyComboString, - KeyCombo, + type KeyCombo, normalizeKeyCombo, parseKeyCombo, } from "../../src/components/hotkeys/hotkeyParser"; diff --git a/packages/core/test/html-select/htmlSelectTests.tsx b/packages/core/test/html-select/htmlSelectTests.tsx index 4bc84ef802..6b87b8693c 100644 --- a/packages/core/test/html-select/htmlSelectTests.tsx +++ b/packages/core/test/html-select/htmlSelectTests.tsx @@ -18,7 +18,7 @@ import { assert } from "chai"; import { mount } from "enzyme"; import * as React from "react"; -import { HTMLSelect, OptionProps } from "../../src"; +import { HTMLSelect, type OptionProps } from "../../src"; describe("", () => { const emptyHandler = () => true; diff --git a/packages/core/test/icon/iconTests.tsx b/packages/core/test/icon/iconTests.tsx index 2d9b99fe18..532e404437 100644 --- a/packages/core/test/icon/iconTests.tsx +++ b/packages/core/test/icon/iconTests.tsx @@ -17,16 +17,16 @@ import { assert } from "chai"; import { mount } from "enzyme"; import * as React from "react"; -import Sinon, { stub } from "sinon"; +import { type SinonStub, stub } from "sinon"; -import { IconName, Icons, IconSize } from "@blueprintjs/icons"; +import { type IconName, Icons, IconSize } from "@blueprintjs/icons"; // tslint:disable-next-line no-submodule-imports import { Add, Airplane, Calendar, Graph } from "@blueprintjs/icons/lib/cjs/generated/16px/paths"; -import { Classes, Icon, IconProps, Intent } from "../../src"; +import { Classes, Icon, type IconProps, Intent } from "../../src"; describe("", () => { - let iconLoader: Sinon.SinonStub; + let iconLoader: SinonStub; before(() => { stub(Icons, "load").resolves(undefined); diff --git a/packages/core/test/menu/menuItemTests.tsx b/packages/core/test/menu/menuItemTests.tsx index 7d13b995bc..76ecc1cb18 100644 --- a/packages/core/test/menu/menuItemTests.tsx +++ b/packages/core/test/menu/menuItemTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow, ShallowWrapper } from "enzyme"; +import { mount, type ReactWrapper, shallow, type ShallowWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; @@ -26,8 +26,8 @@ import { Classes, Icon, MenuItem, - MenuItemProps, - MenuProps, + type MenuItemProps, + type MenuProps, Popover, PopoverInteractionKind, Text, diff --git a/packages/core/test/multistep-dialog/multistepDialogTests.tsx b/packages/core/test/multistep-dialog/multistepDialogTests.tsx index 3868504185..ac1ac8731c 100644 --- a/packages/core/test/multistep-dialog/multistepDialogTests.tsx +++ b/packages/core/test/multistep-dialog/multistepDialogTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { dispatchTestKeyboardEvent } from "@blueprintjs/test-commons"; diff --git a/packages/core/test/overflow-list/overflowListTests.tsx b/packages/core/test/overflow-list/overflowListTests.tsx index 0a5382dd85..ff76e69f48 100644 --- a/packages/core/test/overflow-list/overflowListTests.tsx +++ b/packages/core/test/overflow-list/overflowListTests.tsx @@ -15,11 +15,15 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { OverflowList, OverflowListProps, OverflowListState } from "../../src/components/overflow-list/overflowList"; +import { + OverflowList, + type OverflowListProps, + type OverflowListState, +} from "../../src/components/overflow-list/overflowList"; type OverflowProps = OverflowListProps; diff --git a/packages/core/test/overlay/overlayTests.tsx b/packages/core/test/overlay/overlayTests.tsx index d501fc9a16..532e124d10 100644 --- a/packages/core/test/overlay/overlayTests.tsx +++ b/packages/core/test/overlay/overlayTests.tsx @@ -15,13 +15,13 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow } from "enzyme"; +import { mount, type ReactWrapper, shallow } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; import { dispatchMouseEvent } from "@blueprintjs/test-commons"; -import { Classes, Overlay, OverlayProps, Portal, Utils } from "../../src"; +import { Classes, Overlay, type OverlayProps, Portal, Utils } from "../../src"; import { findInPortal } from "../utils"; const BACKDROP_SELECTOR = `.${Classes.OVERLAY_BACKDROP}`; diff --git a/packages/core/test/panel-stack/panelStackTests.tsx b/packages/core/test/panel-stack/panelStackTests.tsx index cb16abc9ca..3036f1b961 100644 --- a/packages/core/test/panel-stack/panelStackTests.tsx +++ b/packages/core/test/panel-stack/panelStackTests.tsx @@ -22,11 +22,11 @@ /* eslint-disable deprecation/deprecation */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { Classes, IPanel, IPanelProps, PanelStack, PanelStackProps } from "../../src"; +import { Classes, type IPanel, type IPanelProps, PanelStack, type PanelStackProps } from "../../src"; export class TestPanel extends React.Component { public render() { diff --git a/packages/core/test/panel-stack2/panelStack2Tests.tsx b/packages/core/test/panel-stack2/panelStack2Tests.tsx index cb1f087887..17abbd5df8 100644 --- a/packages/core/test/panel-stack2/panelStack2Tests.tsx +++ b/packages/core/test/panel-stack2/panelStack2Tests.tsx @@ -15,11 +15,11 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { Classes, NumericInput, Panel, PanelProps, PanelStack2, PanelStack2Props } from "../../src"; +import { Classes, NumericInput, type Panel, type PanelProps, PanelStack2, type PanelStack2Props } from "../../src"; // eslint-disable-next-line @typescript-eslint/ban-types type TestPanelInfo = {}; diff --git a/packages/core/test/popover/popoverTests.tsx b/packages/core/test/popover/popoverTests.tsx index 7f9910882e..ce26944197 100644 --- a/packages/core/test/popover/popoverTests.tsx +++ b/packages/core/test/popover/popoverTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow } from "enzyme"; +import { mount, type ReactWrapper, shallow } from "enzyme"; import * as React from "react"; import sinon from "sinon"; @@ -24,7 +24,12 @@ import { dispatchMouseEvent } from "@blueprintjs/test-commons"; import { Classes } from "../../src/common"; import * as Errors from "../../src/common/errors"; import { Button, Overlay, Portal } from "../../src/components"; -import { Popover, PopoverInteractionKind, PopoverProps, PopoverState } from "../../src/components/popover/popover"; +import { + Popover, + PopoverInteractionKind, + type PopoverProps, + type PopoverState, +} from "../../src/components/popover/popover"; import { PopoverArrow } from "../../src/components/popover/popoverArrow"; import { PopupKind } from "../../src/components/popover/popupKind"; import { Tooltip } from "../../src/components/tooltip/tooltip"; diff --git a/packages/core/test/portal/portalTests.tsx b/packages/core/test/portal/portalTests.tsx index cdbc4e42f8..3888fa5d1b 100644 --- a/packages/core/test/portal/portalTests.tsx +++ b/packages/core/test/portal/portalTests.tsx @@ -15,10 +15,10 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; -import { Classes, Portal, PortalProps, PortalProvider } from "../../src"; +import { Classes, Portal, type PortalProps, PortalProvider } from "../../src"; describe("", () => { let rootElement: HTMLElement | undefined; diff --git a/packages/core/test/resize-sensor/resizeSensorTests.tsx b/packages/core/test/resize-sensor/resizeSensorTests.tsx index 5eb5101c13..6c22ee2415 100644 --- a/packages/core/test/resize-sensor/resizeSensorTests.tsx +++ b/packages/core/test/resize-sensor/resizeSensorTests.tsx @@ -15,11 +15,11 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; -import { ResizeSensor, ResizeSensorProps } from "../../src/components/resize-sensor/resizeSensor"; +import { ResizeSensor, type ResizeSensorProps } from "../../src/components/resize-sensor/resizeSensor"; describe("", () => { // this scope variable is assigned in mountResizeSensor() and used in resize() diff --git a/packages/core/test/section/sectionTests.tsx b/packages/core/test/section/sectionTests.tsx index 2df80dbf87..9aaab16867 100644 --- a/packages/core/test/section/sectionTests.tsx +++ b/packages/core/test/section/sectionTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { IconNames } from "@blueprintjs/icons"; diff --git a/packages/core/test/slider/handleTests.tsx b/packages/core/test/slider/handleTests.tsx index 8c37508258..fb5083ad60 100644 --- a/packages/core/test/slider/handleTests.tsx +++ b/packages/core/test/slider/handleTests.tsx @@ -15,11 +15,11 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import sinon from "sinon"; -import { Handle, HandleState, InternalHandleProps } from "../../src/components/slider/handle"; +import { Handle, type HandleState, type InternalHandleProps } from "../../src/components/slider/handle"; import { DRAG_SIZE, simulateMovement } from "./sliderTestUtils"; const HANDLE_PROPS: InternalHandleProps = { diff --git a/packages/core/test/slider/multiSliderTests.tsx b/packages/core/test/slider/multiSliderTests.tsx index b5e4049098..05f5cfdcd5 100644 --- a/packages/core/test/slider/multiSliderTests.tsx +++ b/packages/core/test/slider/multiSliderTests.tsx @@ -15,14 +15,14 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import sinon from "sinon"; import { expectPropValidationError } from "@blueprintjs/test-commons"; -import { Classes, MultiSlider, MultiSliderProps } from "../../src"; +import { Classes, MultiSlider, type MultiSliderProps } from "../../src"; import { Handle } from "../../src/components/slider/handle"; import { mouseUpHorizontal, simulateMovement } from "./sliderTestUtils"; diff --git a/packages/core/test/slider/sliderTestUtils.ts b/packages/core/test/slider/sliderTestUtils.ts index 215ec92050..bffac354c3 100644 --- a/packages/core/test/slider/sliderTestUtils.ts +++ b/packages/core/test/slider/sliderTestUtils.ts @@ -18,7 +18,7 @@ import type { ReactWrapper } from "enzyme"; import { dispatchMouseEvent, dispatchTouchEvent } from "@blueprintjs/test-commons"; -import { Handle, InternalHandleProps } from "../../src/components/slider/handle"; +import { Handle, type InternalHandleProps } from "../../src/components/slider/handle"; interface MoveOptions { /** Size in pixels of one drag event. Direction of drag is determined by `vertical` option. */ diff --git a/packages/core/test/spinner/spinnerTests.tsx b/packages/core/test/spinner/spinnerTests.tsx index fe33f0213c..99ea2d0b2a 100644 --- a/packages/core/test/spinner/spinnerTests.tsx +++ b/packages/core/test/spinner/spinnerTests.tsx @@ -15,7 +15,7 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow } from "enzyme"; +import { mount, type ReactWrapper, shallow } from "enzyme"; import * as React from "react"; import { stub } from "sinon"; diff --git a/packages/core/test/tabs/tabsTests.tsx b/packages/core/test/tabs/tabsTests.tsx index bd66c1efe2..37d6025255 100644 --- a/packages/core/test/tabs/tabsTests.tsx +++ b/packages/core/test/tabs/tabsTests.tsx @@ -14,13 +14,13 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { spy } from "sinon"; import { Classes } from "../../src/common"; import { Tab } from "../../src/components/tabs/tab"; -import { Tabs, TabsProps, TabsState } from "../../src/components/tabs/tabs"; +import { Tabs, type TabsProps, type TabsState } from "../../src/components/tabs/tabs"; describe("", () => { const ID = "tabsTests"; diff --git a/packages/core/test/tag-input/tagInputTests.tsx b/packages/core/test/tag-input/tagInputTests.tsx index ac1e7ba33f..ac04d53830 100644 --- a/packages/core/test/tag-input/tagInputTests.tsx +++ b/packages/core/test/tag-input/tagInputTests.tsx @@ -15,11 +15,11 @@ */ import { assert, expect } from "chai"; -import { MountRendererProps, ReactWrapper, mount as untypedMount } from "enzyme"; +import { type MountRendererProps, type ReactWrapper, mount as untypedMount } from "enzyme"; import * as React from "react"; import sinon from "sinon"; -import { Button, Classes, Intent, Tag, TagInput, TagInputProps } from "../../src"; +import { Button, Classes, Intent, Tag, TagInput, type TagInputProps } from "../../src"; /** * @see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26979#issuecomment-465304376 diff --git a/packages/core/test/toast/toastTests.tsx b/packages/core/test/toast/toastTests.tsx index c929c0c6e1..9fc1dde43d 100644 --- a/packages/core/test/toast/toastTests.tsx +++ b/packages/core/test/toast/toastTests.tsx @@ -17,7 +17,7 @@ import { assert } from "chai"; import { mount, shallow } from "enzyme"; import * as React from "react"; -import { SinonSpy, spy } from "sinon"; +import { type SinonSpy, spy } from "sinon"; import { AnchorButton, Button, Toast } from "../../src"; diff --git a/packages/core/test/tooltip/tooltipTests.tsx b/packages/core/test/tooltip/tooltipTests.tsx index 487deb1cc7..1c9384eac1 100644 --- a/packages/core/test/tooltip/tooltipTests.tsx +++ b/packages/core/test/tooltip/tooltipTests.tsx @@ -22,7 +22,7 @@ import { spy, stub } from "sinon"; import { Classes } from "../../src/common"; import { Button, Overlay } from "../../src/components"; import { Popover } from "../../src/components/popover/popover"; -import { Tooltip, TooltipProps } from "../../src/components/tooltip/tooltip"; +import { Tooltip, type TooltipProps } from "../../src/components/tooltip/tooltip"; const TARGET_SELECTOR = `.${Classes.POPOVER_TARGET}`; const TOOLTIP_SELECTOR = `.${Classes.TOOLTIP}`; diff --git a/packages/core/test/tree/treeTests.tsx b/packages/core/test/tree/treeTests.tsx index da535be5a6..6458e4fc4a 100644 --- a/packages/core/test/tree/treeTests.tsx +++ b/packages/core/test/tree/treeTests.tsx @@ -15,12 +15,12 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import { spy } from "sinon"; -import { Classes, Tree, TreeNodeInfo, TreeProps } from "../../src"; +import { Classes, Tree, type TreeNodeInfo, type TreeProps } from "../../src"; describe("", () => { let testsContainerElement: Element; diff --git a/packages/datetime/src/common/dateUtils.ts b/packages/datetime/src/common/dateUtils.ts index 2d6e6d748b..7fdd1f8443 100644 --- a/packages/datetime/src/common/dateUtils.ts +++ b/packages/datetime/src/common/dateUtils.ts @@ -16,7 +16,7 @@ import { isSameDay } from "date-fns"; -import { DateRange, isNonNullRange } from "./dateRange"; +import { type DateRange, isNonNullRange } from "./dateRange"; import { Months } from "./months"; export { isSameDay }; diff --git a/packages/datetime/src/common/index.ts b/packages/datetime/src/common/index.ts index 454eb470b3..255a4a7426 100644 --- a/packages/datetime/src/common/index.ts +++ b/packages/datetime/src/common/index.ts @@ -21,14 +21,14 @@ import * as TimezoneNameUtils from "./timezoneNameUtils"; import type { TimezoneWithNames } from "./timezoneTypes"; import * as TimezoneUtils from "./timezoneUtils"; -export { Classes, DateUtils, Errors, TimezoneNameUtils, TimezoneUtils, TimezoneWithNames }; +export { Classes, DateUtils, Errors, TimezoneNameUtils, TimezoneUtils, type TimezoneWithNames }; -export { DatePickerBaseProps, DatePickerModifiers } from "./datePickerBaseProps"; -export { DateFormatProps } from "./dateFormatProps"; -export { DateRange, NonNullDateRange } from "./dateRange"; +export type { DatePickerBaseProps, DatePickerModifiers } from "./datePickerBaseProps"; +export type { DateFormatProps } from "./dateFormatProps"; +export type { DateRange, NonNullDateRange } from "./dateRange"; export { Months } from "./months"; export { TimeUnit } from "./timeUnit"; -export { TimePickerProps } from "./timePickerProps"; +export type { TimePickerProps } from "./timePickerProps"; export { TimePrecision } from "./timePrecision"; export { TimezoneDisplayFormat } from "./timezoneDisplayFormat"; export { getTimezoneMetadata } from "./timezoneMetadata"; diff --git a/packages/datetime/src/components/date-input/dateInput.tsx b/packages/datetime/src/components/date-input/dateInput.tsx index e4eba51c6a..2cac1b79a2 100644 --- a/packages/datetime/src/components/date-input/dateInput.tsx +++ b/packages/datetime/src/components/date-input/dateInput.tsx @@ -27,20 +27,20 @@ import * as React from "react"; import type { DayPickerProps } from "react-day-picker"; import { - ButtonProps, + type ButtonProps, DISPLAYNAME_PREFIX, InputGroup, - InputGroupProps, + type InputGroupProps, mergeRefs, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, - Props, + type PopoverClickTargetHandlers, + type PopoverTargetProps, + type Props, Tag, Utils, } from "@blueprintjs/core"; -import { Classes, DateFormatProps, DatePickerBaseProps } from "../../common"; +import { Classes, type DateFormatProps, type DatePickerBaseProps } from "../../common"; import { getFormattedDateString } from "../../common/dateFormatProps"; import type { DatetimePopoverProps } from "../../common/datetimePopoverProps"; import { hasMonthChanged, hasTimeChanged, isDateValid, isDayInRange } from "../../common/dateUtils"; diff --git a/packages/datetime/src/components/date-picker/datePicker.tsx b/packages/datetime/src/components/date-picker/datePicker.tsx index 5512d049ca..50028b6da1 100644 --- a/packages/datetime/src/components/date-picker/datePicker.tsx +++ b/packages/datetime/src/components/date-picker/datePicker.tsx @@ -24,13 +24,13 @@ import classNames from "classnames"; import * as React from "react"; -import DayPicker, { CaptionElementProps, DayModifiers, NavbarElementProps } from "react-day-picker"; +import DayPicker, { type CaptionElementProps, type DayModifiers, type NavbarElementProps } from "react-day-picker"; -import { AbstractPureComponent, Button, DISPLAYNAME_PREFIX, Divider, Props } from "@blueprintjs/core"; +import { AbstractPureComponent, Button, DISPLAYNAME_PREFIX, Divider, type Props } from "@blueprintjs/core"; -import { Classes, DatePickerBaseProps, DateUtils } from "../../common"; +import { Classes, type DatePickerBaseProps, DateUtils } from "../../common"; import * as Errors from "../../common/errors"; -import { DatePickerShortcut, DatePickerShortcutMenu, DateRangeShortcut } from "../shortcuts/shortcuts"; +import { type DatePickerShortcut, DatePickerShortcutMenu, type DateRangeShortcut } from "../shortcuts/shortcuts"; import { TimePicker } from "../time-picker/timePicker"; import { DatePickerCaption } from "./datePickerCaption"; import { getDefaultMaxDate, getDefaultMinDate } from "./datePickerCore"; diff --git a/packages/datetime/src/components/date-picker/datePickerCaption.tsx b/packages/datetime/src/components/date-picker/datePickerCaption.tsx index 3337a576e6..fa59d380dd 100644 --- a/packages/datetime/src/components/date-picker/datePickerCaption.tsx +++ b/packages/datetime/src/components/date-picker/datePickerCaption.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import type { CaptionElementProps } from "react-day-picker"; -import { AbstractPureComponent, Divider, HTMLSelect, OptionProps } from "@blueprintjs/core"; +import { AbstractPureComponent, Divider, HTMLSelect, type OptionProps } from "@blueprintjs/core"; import { IconSize } from "@blueprintjs/icons"; import { Classes } from "../../common"; diff --git a/packages/datetime/src/components/date-picker/datePickerCore.tsx b/packages/datetime/src/components/date-picker/datePickerCore.tsx index f8d9b1bd65..3ab4c1920b 100644 --- a/packages/datetime/src/components/date-picker/datePickerCore.tsx +++ b/packages/datetime/src/components/date-picker/datePickerCore.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { DatePickerModifiers, Months } from "../../common"; +import { type DatePickerModifiers, Months } from "../../common"; export const DISABLED_MODIFIER = "disabled"; export const HOVERED_RANGE_MODIFIER = "hovered-range"; diff --git a/packages/datetime/src/components/date-range-input/dateRangeInput.tsx b/packages/datetime/src/components/date-range-input/dateRangeInput.tsx index 7649f540c2..0b8dd45ace 100644 --- a/packages/datetime/src/components/date-range-input/dateRangeInput.tsx +++ b/packages/datetime/src/components/date-range-input/dateRangeInput.tsx @@ -32,18 +32,24 @@ import { Classes as CoreClasses, DISPLAYNAME_PREFIX, InputGroup, - InputGroupProps, + type InputGroupProps, Intent, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, - Props, + type PopoverClickTargetHandlers, + type PopoverTargetProps, + type Props, refHandler, setRef, Utils, } from "@blueprintjs/core"; -import { Classes, DateFormatProps, DatePickerBaseProps, DateRange, NonNullDateRange } from "../../common"; +import { + Classes, + type DateFormatProps, + type DatePickerBaseProps, + type DateRange, + type NonNullDateRange, +} from "../../common"; import { getFormattedDateString } from "../../common/dateFormatProps"; import type { DatetimePopoverProps } from "../../common/datetimePopoverProps"; import { isDayInRange, isSameTime } from "../../common/dateUtils"; diff --git a/packages/datetime/src/components/date-range-picker/dateRangePicker.tsx b/packages/datetime/src/components/date-range-picker/dateRangePicker.tsx index 2f0faa774c..af0fc58bd9 100644 --- a/packages/datetime/src/components/date-range-picker/dateRangePicker.tsx +++ b/packages/datetime/src/components/date-range-picker/dateRangePicker.tsx @@ -24,11 +24,16 @@ import classNames from "classnames"; import * as React from "react"; -import DayPicker, { CaptionElementProps, DayModifiers, DayPickerProps, NavbarElementProps } from "react-day-picker"; +import DayPicker, { + type CaptionElementProps, + type DayModifiers, + type DayPickerProps, + type NavbarElementProps, +} from "react-day-picker"; -import { AbstractPureComponent, Boundary, DISPLAYNAME_PREFIX, Divider, Props } from "@blueprintjs/core"; +import { AbstractPureComponent, Boundary, DISPLAYNAME_PREFIX, Divider, type Props } from "@blueprintjs/core"; -import { Classes, DatePickerBaseProps, DatePickerModifiers, DateRange, DateUtils } from "../../common"; +import { Classes, type DatePickerBaseProps, type DatePickerModifiers, type DateRange, DateUtils } from "../../common"; import { DateRangeSelectionStrategy } from "../../common/dateRangeSelectionStrategy"; import * as Errors from "../../common/errors"; import { MonthAndYear } from "../../common/monthAndYear"; @@ -41,7 +46,7 @@ import { SELECTED_RANGE_MODIFIER, } from "../date-picker/datePickerCore"; import { DatePickerNavbar } from "../date-picker/datePickerNavbar"; -import { DatePickerShortcutMenu, DateRangeShortcut } from "../shortcuts/shortcuts"; +import { DatePickerShortcutMenu, type DateRangeShortcut } from "../shortcuts/shortcuts"; import { TimePicker } from "../time-picker/timePicker"; export interface DateRangePickerProps extends DatePickerBaseProps, Props { diff --git a/packages/datetime/src/components/shortcuts/shortcuts.tsx b/packages/datetime/src/components/shortcuts/shortcuts.tsx index e213423b85..f1f61b8f2f 100644 --- a/packages/datetime/src/components/shortcuts/shortcuts.tsx +++ b/packages/datetime/src/components/shortcuts/shortcuts.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import { Menu, MenuItem } from "@blueprintjs/core"; -import { Classes, DateRange, TimePrecision } from "../../common"; +import { Classes, type DateRange, type TimePrecision } from "../../common"; import { clone, isDayRangeInRange } from "../../common/dateUtils"; export interface DateShortcutBase { diff --git a/packages/datetime/src/components/time-picker/timePicker.tsx b/packages/datetime/src/components/time-picker/timePicker.tsx index 95d137d727..4cd8b07557 100644 --- a/packages/datetime/src/components/time-picker/timePicker.tsx +++ b/packages/datetime/src/components/time-picker/timePicker.tsx @@ -26,7 +26,7 @@ import { Intent, } from "@blueprintjs/core"; -import { Classes, DateUtils, TimePickerProps, TimePrecision } from "../../common"; +import { Classes, DateUtils, type TimePickerProps, TimePrecision } from "../../common"; import { getDefaultMaxTime, getDefaultMinTime, diff --git a/packages/datetime/src/components/timezone-select/timezoneSelect.tsx b/packages/datetime/src/components/timezone-select/timezoneSelect.tsx index ee3846427f..f4432cf1c5 100644 --- a/packages/datetime/src/components/timezone-select/timezoneSelect.tsx +++ b/packages/datetime/src/components/timezone-select/timezoneSelect.tsx @@ -20,16 +20,16 @@ import * as React from "react"; import { AbstractPureComponent, Button, - ButtonProps, + type ButtonProps, Classes as CoreClasses, DISPLAYNAME_PREFIX, - InputGroupProps, + type InputGroupProps, MenuItem, - Props, + type Props, } from "@blueprintjs/core"; -import { ItemListPredicate, ItemRenderer, Select, SelectPopoverProps } from "@blueprintjs/select"; +import { type ItemListPredicate, type ItemRenderer, Select, type SelectPopoverProps } from "@blueprintjs/select"; -import { Classes, TimezoneWithNames } from "../../common"; +import { Classes, type TimezoneWithNames } from "../../common"; import { formatTimezone, TimezoneDisplayFormat } from "../../common/timezoneDisplayFormat"; import { TIMEZONE_ITEMS } from "../../common/timezoneItems"; import { getInitialTimezoneItems, mapTimezonesWithNames } from "../../common/timezoneNameUtils"; diff --git a/packages/datetime/src/index.ts b/packages/datetime/src/index.ts index 474a57a635..2f1b983f45 100644 --- a/packages/datetime/src/index.ts +++ b/packages/datetime/src/index.ts @@ -20,28 +20,28 @@ export * from "./common"; // re-exporting these symbols to preserve compatibility type DatePickerLocaleUtils = typeof LocaleUtils; -export { DatePickerLocaleUtils, DatePickerDayModifiers }; +export type { DatePickerLocaleUtils, DatePickerDayModifiers }; -export { DateFormatProps } from "./common/dateFormatProps"; -export { DateRangeSelectionStrategy, DateRangeSelectionState } from "./common/dateRangeSelectionStrategy"; +export type { DateFormatProps } from "./common/dateFormatProps"; +export { DateRangeSelectionStrategy, type DateRangeSelectionState } from "./common/dateRangeSelectionStrategy"; export { MonthAndYear } from "./common/monthAndYear"; -export { TimePickerProps } from "./common/timePickerProps"; +export type { TimePickerProps } from "./common/timePickerProps"; export { TimePrecision } from "./common/timePrecision"; export { DatePickerUtils } from "./components/date-picker/datePickerUtils"; -export { DatePickerBaseProps, DatePickerModifiers } from "./common/datePickerBaseProps"; +export type { DatePickerBaseProps, DatePickerModifiers } from "./common/datePickerBaseProps"; export { TimePicker } from "./components/time-picker/timePicker"; export { - DatePickerShortcut, + type DatePickerShortcut, DatePickerShortcutMenu, - DatePickerShortcutMenuProps, - DateRangeShortcut, + type DatePickerShortcutMenuProps, + type DateRangeShortcut, } from "./components/shortcuts/shortcuts"; -export { TimezoneSelect, TimezoneSelectProps } from "./components/timezone-select/timezoneSelect"; +export { TimezoneSelect, type TimezoneSelectProps } from "./components/timezone-select/timezoneSelect"; /* eslint-disable deprecation/deprecation */ -export { DateInput, DateInputProps } from "./components/date-input/dateInput"; -export { DatePicker, DatePickerProps } from "./components/date-picker/datePicker"; -export { DateRangeInput, DateRangeInputProps } from "./components/date-range-input/dateRangeInput"; -export { DateRangePicker, DateRangePickerProps } from "./components/date-range-picker/dateRangePicker"; +export { DateInput, type DateInputProps } from "./components/date-input/dateInput"; +export { DatePicker, type DatePickerProps } from "./components/date-picker/datePicker"; +export { DateRangeInput, type DateRangeInputProps } from "./components/date-range-input/dateRangeInput"; +export { DateRangePicker, type DateRangePickerProps } from "./components/date-range-picker/dateRangePicker"; diff --git a/packages/datetime/test/common/dateFormat.ts b/packages/datetime/test/common/dateFormat.ts index eb8dd366a7..aa5893e2b0 100644 --- a/packages/datetime/test/common/dateFormat.ts +++ b/packages/datetime/test/common/dateFormat.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { format, Locale, parse } from "date-fns"; +import { format, type Locale, parse } from "date-fns"; import type { DateFormatProps } from "../../src/common"; diff --git a/packages/datetime/test/components/dateInputTests.tsx b/packages/datetime/test/components/dateInputTests.tsx index 0fe240d756..61180a1e27 100644 --- a/packages/datetime/test/components/dateInputTests.tsx +++ b/packages/datetime/test/components/dateInputTests.tsx @@ -25,7 +25,7 @@ import { assert } from "chai"; import { intlFormat, isEqual, parseISO } from "date-fns"; import { formatInTimeZone, zonedTimeToUtc } from "date-fns-tz"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as sinon from "sinon"; @@ -34,7 +34,7 @@ import { Classes as CoreClasses, InputGroup, Popover, Tag } from "@blueprintjs/c import { Classes, DateInput, - DateInputProps, + type DateInputProps, DatePicker, Months, TimePrecision, diff --git a/packages/datetime/test/components/datePickerCaptionTests.tsx b/packages/datetime/test/components/datePickerCaptionTests.tsx index 02bd86ce0f..d167583346 100644 --- a/packages/datetime/test/components/datePickerCaptionTests.tsx +++ b/packages/datetime/test/components/datePickerCaptionTests.tsx @@ -21,8 +21,8 @@ import sinon from "sinon"; import { HTMLSelect } from "@blueprintjs/core"; -import { Classes, DatePickerLocaleUtils } from "../../src"; -import { DatePickerCaption, DatePickerCaptionProps } from "../../src/components/date-picker/datePickerCaption"; +import { Classes, type DatePickerLocaleUtils } from "../../src"; +import { DatePickerCaption, type DatePickerCaptionProps } from "../../src/components/date-picker/datePickerCaption"; describe("", () => { const LOCALE_UTILS: DatePickerLocaleUtils = { diff --git a/packages/datetime/test/components/datePickerTests.tsx b/packages/datetime/test/components/datePickerTests.tsx index d4f8db5429..67c8e58c5b 100644 --- a/packages/datetime/test/components/datePickerTests.tsx +++ b/packages/datetime/test/components/datePickerTests.tsx @@ -31,11 +31,18 @@ import sinon from "sinon"; import { Button, Classes as CoreClasses, HTMLSelect, Menu, MenuItem } from "@blueprintjs/core"; import { assertDatesEqual } from "@blueprintjs/test-commons"; -import { Classes, DatePicker, DatePickerModifiers, DatePickerProps, TimePicker, TimePrecision } from "../../src"; +import { + Classes, + DatePicker, + type DatePickerModifiers, + type DatePickerProps, + TimePicker, + TimePrecision, +} from "../../src"; import { DateUtils, Months } from "../../src/common"; import * as Errors from "../../src/common/errors"; import type { DatePickerState } from "../../src/components/date-picker/datePicker"; -import { DatePickerShortcut, DatePickerShortcutMenu } from "../../src/components/shortcuts/shortcuts"; +import { type DatePickerShortcut, DatePickerShortcutMenu } from "../../src/components/shortcuts/shortcuts"; import { assertDayDisabled, assertDayHidden } from "../common/dayPickerTestUtils"; describe("", () => { diff --git a/packages/datetime/test/components/dateRangeInputTests.tsx b/packages/datetime/test/components/dateRangeInputTests.tsx index 4ff1214a2a..fdc2acaf4c 100644 --- a/packages/datetime/test/components/dateRangeInputTests.tsx +++ b/packages/datetime/test/components/dateRangeInputTests.tsx @@ -23,7 +23,7 @@ /* eslint-disable deprecation/deprecation, @blueprintjs/no-deprecated-components */ import { expect } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import * as TestUtils from "react-dom/test-utils"; @@ -32,16 +32,16 @@ import * as sinon from "sinon"; import { Boundary, Classes as CoreClasses, - HTMLDivProps, - HTMLInputProps, + type HTMLDivProps, + type HTMLInputProps, InputGroup, - InputGroupProps, + type InputGroupProps, Popover, - PopoverProps, + type PopoverProps, } from "@blueprintjs/core"; import { expectPropValidationError } from "@blueprintjs/test-commons"; -import { Classes, DateRange, DateRangeInput, DateRangePicker, Months, TimePrecision } from "../../src"; +import { Classes, type DateRange, DateRangeInput, DateRangePicker, Months, TimePrecision } from "../../src"; import { DATE_FORMAT, DATETIME_FORMAT } from "../common/dateFormat"; type NullableRange = [T | null, T | null]; diff --git a/packages/datetime/test/components/dateRangePickerTests.tsx b/packages/datetime/test/components/dateRangePickerTests.tsx index 2c53c6343f..99d733212e 100644 --- a/packages/datetime/test/components/dateRangePickerTests.tsx +++ b/packages/datetime/test/components/dateRangePickerTests.tsx @@ -23,7 +23,7 @@ /* eslint-disable deprecation/deprecation, @blueprintjs/no-deprecated-components */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import ReactDayPicker from "react-day-picker"; import sinon from "sinon"; @@ -32,19 +32,19 @@ import { Button, Classes, Menu, MenuItem } from "@blueprintjs/core"; import { Classes as DateClasses, - DatePickerModifiers, - DateRange, + type DatePickerModifiers, + type DateRange, DateRangePicker, - DateRangePickerProps, + type DateRangePickerProps, TimePicker, - TimePrecision, + type TimePrecision, } from "../../src"; import * as DateUtils from "../../src/common/dateUtils"; import * as Errors from "../../src/common/errors"; import { Months } from "../../src/common/months"; import { DatePickerNavbar } from "../../src/components/date-picker/datePickerNavbar"; import type { DateRangePickerState } from "../../src/components/date-range-picker/dateRangePicker"; -import { DatePickerShortcutMenu, DateRangeShortcut } from "../../src/components/shortcuts/shortcuts"; +import { DatePickerShortcutMenu, type DateRangeShortcut } from "../../src/components/shortcuts/shortcuts"; import { assertDayDisabled } from "../common/dayPickerTestUtils"; describe("", () => { diff --git a/packages/datetime/test/components/timePickerTests.tsx b/packages/datetime/test/components/timePickerTests.tsx index ccc3cb4c27..e5a8404d61 100644 --- a/packages/datetime/test/components/timePickerTests.tsx +++ b/packages/datetime/test/components/timePickerTests.tsx @@ -24,7 +24,7 @@ import sinon from "sinon"; import { Classes as CoreClasses, Intent } from "@blueprintjs/core"; import { assertTimeIs, createTimeObject } from "@blueprintjs/test-commons"; -import { Classes, TimePicker, TimePickerProps, TimePrecision } from "../../src"; +import { Classes, TimePicker, type TimePickerProps, TimePrecision } from "../../src"; describe("", () => { let testsContainerElement: Element; diff --git a/packages/datetime/test/components/timezoneSelectTests.tsx b/packages/datetime/test/components/timezoneSelectTests.tsx index 3b1d82d7af..c250ab5d51 100644 --- a/packages/datetime/test/components/timezoneSelectTests.tsx +++ b/packages/datetime/test/components/timezoneSelectTests.tsx @@ -15,14 +15,22 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as sinon from "sinon"; -import { Button, ButtonProps, InputGroup, InputGroupProps, MenuItem, Popover, PopoverProps } from "@blueprintjs/core"; +import { + Button, + type ButtonProps, + InputGroup, + type InputGroupProps, + MenuItem, + Popover, + type PopoverProps, +} from "@blueprintjs/core"; import { QueryList, Select } from "@blueprintjs/select"; -import { TimezoneSelect, TimezoneSelectProps } from "../../src"; +import { TimezoneSelect, type TimezoneSelectProps } from "../../src"; import { getCurrentTimezone } from "../../src/common/getTimezone"; import { TIMEZONE_ITEMS } from "../../src/common/timezoneItems"; import { getInitialTimezoneItems, mapTimezonesWithNames } from "../../src/common/timezoneNameUtils"; diff --git a/packages/datetime2/src/common/dateFnsFormatUtils.ts b/packages/datetime2/src/common/dateFnsFormatUtils.ts index ee1032b977..45205b196e 100644 --- a/packages/datetime2/src/common/dateFnsFormatUtils.ts +++ b/packages/datetime2/src/common/dateFnsFormatUtils.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { format, Locale, parse } from "date-fns"; +import { format, type Locale, parse } from "date-fns"; -import { DatePickerBaseProps, TimePrecision } from "@blueprintjs/datetime"; +import { type DatePickerBaseProps, TimePrecision } from "@blueprintjs/datetime"; export const DefaultDateFnsFormats = { DATE_ONLY: "yyyy-MM-dd", diff --git a/packages/datetime2/src/components/date-input3/dateInput3.tsx b/packages/datetime2/src/components/date-input3/dateInput3.tsx index b1303caa07..667021c2ef 100644 --- a/packages/datetime2/src/components/date-input3/dateInput3.tsx +++ b/packages/datetime2/src/components/date-input3/dateInput3.tsx @@ -18,18 +18,18 @@ import classNames from "classnames"; import * as React from "react"; import { - ButtonProps, + type ButtonProps, DISPLAYNAME_PREFIX, InputGroup, mergeRefs, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, + type PopoverClickTargetHandlers, + type PopoverTargetProps, Tag, Utils, } from "@blueprintjs/core"; import { - DatePickerShortcut, + type DatePickerShortcut, DatePickerUtils, DateUtils, Errors, @@ -47,7 +47,7 @@ import type { DateInput3DefaultProps, DateInput3Props, DateInput3PropsWithDefaul import { useDateFormatter } from "./useDateFormatter"; import { useDateParser } from "./useDateParser"; -export { DateInput3Props }; +export type { DateInput3Props }; const timezoneSelectButtonProps: Partial = { fill: false, diff --git a/packages/datetime2/src/components/date-picker3/datePicker3.tsx b/packages/datetime2/src/components/date-picker3/datePicker3.tsx index f4edc1061f..1004982bcb 100644 --- a/packages/datetime2/src/components/date-picker3/datePicker3.tsx +++ b/packages/datetime2/src/components/date-picker3/datePicker3.tsx @@ -17,14 +17,14 @@ import classNames from "classnames"; import { format } from "date-fns"; import * as React from "react"; -import { ActiveModifiers, DateFormatter, DayPicker } from "react-day-picker"; +import { type ActiveModifiers, type DateFormatter, DayPicker } from "react-day-picker"; import { AbstractPureComponent, Button, DISPLAYNAME_PREFIX, Divider } from "@blueprintjs/core"; import { DatePickerShortcutMenu, DatePickerUtils, - DateRange, - DateRangeShortcut, + type DateRange, + type DateRangeShortcut, DateUtils, Errors, TimePicker, @@ -38,7 +38,7 @@ import { DatePicker3Provider } from "./datePicker3Context"; import type { DatePicker3Props } from "./datePicker3Props"; import type { DatePicker3State } from "./datePicker3State"; -export { DatePicker3Props }; +export type { DatePicker3Props }; /** * Date picker (v3) component. diff --git a/packages/datetime2/src/components/date-range-input3/dateRangeInput3.tsx b/packages/datetime2/src/components/date-range-input3/dateRangeInput3.tsx index c4b790904a..9ba2623c59 100644 --- a/packages/datetime2/src/components/date-range-input3/dateRangeInput3.tsx +++ b/packages/datetime2/src/components/date-range-input3/dateRangeInput3.tsx @@ -25,19 +25,19 @@ import { InputGroup, Intent, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, + type PopoverClickTargetHandlers, + type PopoverTargetProps, refHandler, setRef, Utils, } from "@blueprintjs/core"; import { DatePickerUtils, - DateRange, - DateRangeShortcut, + type DateRange, + type DateRangeShortcut, DateUtils, Errors, - NonNullDateRange, + type NonNullDateRange, } from "@blueprintjs/datetime"; import { Classes } from "../../classes"; @@ -52,7 +52,7 @@ import type { } from "./dateRangeInput3Props"; import type { DateRangeInput3State } from "./dateRangeInput3State"; -export { DateRangeInput3Props }; +export type { DateRangeInput3Props }; // We handle events in a kind of generic way in this component, so here // we enumerate all the different kinds of events for which we have handlers. diff --git a/packages/datetime2/src/components/date-range-picker3/contiguousDayRangePicker.tsx b/packages/datetime2/src/components/date-range-picker3/contiguousDayRangePicker.tsx index d2b2017c70..7225d63382 100644 --- a/packages/datetime2/src/components/date-range-picker3/contiguousDayRangePicker.tsx +++ b/packages/datetime2/src/components/date-range-picker3/contiguousDayRangePicker.tsx @@ -15,10 +15,10 @@ */ import * as React from "react"; -import { DayPicker, MonthChangeEventHandler, SelectRangeEventHandler } from "react-day-picker"; +import { DayPicker, type MonthChangeEventHandler, type SelectRangeEventHandler } from "react-day-picker"; import { DISPLAYNAME_PREFIX } from "@blueprintjs/core"; -import { DateRange, DateRangeSelectionStrategy, MonthAndYear } from "@blueprintjs/datetime"; +import { type DateRange, DateRangeSelectionStrategy, MonthAndYear } from "@blueprintjs/datetime"; import { dateRangeToDayPickerRange } from "../../common/reactDayPickerUtils"; import { DatePicker3Dropdown } from "../react-day-picker/datePicker3Dropdown"; diff --git a/packages/datetime2/src/components/date-range-picker3/dateRangePicker3.tsx b/packages/datetime2/src/components/date-range-picker3/dateRangePicker3.tsx index f0246e07c7..2ff66970eb 100644 --- a/packages/datetime2/src/components/date-range-picker3/dateRangePicker3.tsx +++ b/packages/datetime2/src/components/date-range-picker3/dateRangePicker3.tsx @@ -23,9 +23,9 @@ import { Boundary, DISPLAYNAME_PREFIX, Divider } from "@blueprintjs/core"; import { DatePickerShortcutMenu, DatePickerUtils, - DateRange, + type DateRange, DateRangeSelectionStrategy, - DateRangeShortcut, + type DateRangeShortcut, DateUtils, Errors, MonthAndYear, @@ -42,7 +42,7 @@ import type { DateRangePicker3DefaultProps, DateRangePicker3Props } from "./date import type { DateRangePicker3State } from "./dateRangePicker3State"; import { NonContiguousDayRangePicker } from "./nonContiguousDayRangePicker"; -export { DateRangePicker3Props }; +export type { DateRangePicker3Props }; const NULL_RANGE: DateRange = [null, null]; diff --git a/packages/datetime2/src/components/date-range-picker3/nonContiguousDayRangePicker.tsx b/packages/datetime2/src/components/date-range-picker3/nonContiguousDayRangePicker.tsx index 5c544e3cc9..b65ec6d643 100644 --- a/packages/datetime2/src/components/date-range-picker3/nonContiguousDayRangePicker.tsx +++ b/packages/datetime2/src/components/date-range-picker3/nonContiguousDayRangePicker.tsx @@ -15,10 +15,15 @@ */ import * as React from "react"; -import { DayPicker, DayPickerRangeProps, MonthChangeEventHandler, SelectRangeEventHandler } from "react-day-picker"; +import { + DayPicker, + type DayPickerRangeProps, + type MonthChangeEventHandler, + type SelectRangeEventHandler, +} from "react-day-picker"; import { DISPLAYNAME_PREFIX } from "@blueprintjs/core"; -import { DateRange, DateRangeSelectionStrategy, DateUtils, MonthAndYear } from "@blueprintjs/datetime"; +import { type DateRange, DateRangeSelectionStrategy, DateUtils, MonthAndYear } from "@blueprintjs/datetime"; import { Classes } from "../../classes"; import { dateRangeToDayPickerRange } from "../../common/reactDayPickerUtils"; diff --git a/packages/datetime2/src/components/react-day-picker/datePicker3Caption.tsx b/packages/datetime2/src/components/react-day-picker/datePicker3Caption.tsx index b7fe15da72..011433b2e7 100644 --- a/packages/datetime2/src/components/react-day-picker/datePicker3Caption.tsx +++ b/packages/datetime2/src/components/react-day-picker/datePicker3Caption.tsx @@ -17,9 +17,9 @@ import classNames from "classnames"; import { format } from "date-fns"; import * as React from "react"; -import { CaptionLabel, CaptionProps, useDayPicker, useNavigation } from "react-day-picker"; +import { CaptionLabel, type CaptionProps, useDayPicker, useNavigation } from "react-day-picker"; -import { Button, DISPLAYNAME_PREFIX, HTMLSelect, OptionProps } from "@blueprintjs/core"; +import { Button, DISPLAYNAME_PREFIX, HTMLSelect, type OptionProps } from "@blueprintjs/core"; import { DateUtils, Months } from "@blueprintjs/datetime"; import { ChevronLeft, ChevronRight } from "@blueprintjs/icons"; diff --git a/packages/datetime2/src/dateInput2MigrationUtils.ts b/packages/datetime2/src/dateInput2MigrationUtils.ts index 722896d664..ea043fb1b9 100644 --- a/packages/datetime2/src/dateInput2MigrationUtils.ts +++ b/packages/datetime2/src/dateInput2MigrationUtils.ts @@ -16,7 +16,7 @@ import { isValid } from "date-fns"; -import { DateInputProps, TimePrecision, TimezoneUtils } from "@blueprintjs/datetime"; +import { type DateInputProps, TimePrecision, TimezoneUtils } from "@blueprintjs/datetime"; type DateInputLegacyValue = Date | null | undefined; type DateInputLegacyDefaultValue = Date | undefined; diff --git a/packages/datetime2/src/index.ts b/packages/datetime2/src/index.ts index e21271454c..2a1acbef9e 100644 --- a/packages/datetime2/src/index.ts +++ b/packages/datetime2/src/index.ts @@ -15,10 +15,10 @@ */ export type { DayPickerProps } from "./common/reactDayPickerProps"; -export { DatePicker3, DatePicker3Props } from "./components/date-picker3/datePicker3"; -export { DateInput3, DateInput3Props } from "./components/date-input3/dateInput3"; -export { DateRangeInput3, DateRangeInput3Props } from "./components/date-range-input3/dateRangeInput3"; -export { DateRangePicker3, DateRangePicker3Props } from "./components/date-range-picker3/dateRangePicker3"; +export { DatePicker3, type DatePicker3Props } from "./components/date-picker3/datePicker3"; +export { DateInput3, type DateInput3Props } from "./components/date-input3/dateInput3"; +export { DateRangeInput3, type DateRangeInput3Props } from "./components/date-range-input3/dateRangeInput3"; +export { DateRangePicker3, type DateRangePicker3Props } from "./components/date-range-picker3/dateRangePicker3"; import * as DateInput2MigrationUtils from "./dateInput2MigrationUtils"; export { DateInput2MigrationUtils }; @@ -29,23 +29,23 @@ export { Classes as Datetime2Classes, ReactDayPickerClasses } from "./classes"; export { /** @deprecated import from `@blueprintjs/datetime` or use `Datetime2Classes` instead */ Classes, - DateFormatProps, + type DateFormatProps, /** @deprecated import from `@blueprintjs/datetime` instead */ DateInput as DateInput2, /** @deprecated import from `@blueprintjs/datetime` instead */ - DateInputProps as DateInput2Props, - DateRange, + type DateInputProps as DateInput2Props, + type DateRange, /** @deprecated import from `@blueprintjs/datetime` instead */ DateRangeInput as DateRangeInput2, /** @deprecated import from `@blueprintjs/datetime` instead */ - DateRangeInputProps as DateRangeInput2Props, + type DateRangeInputProps as DateRangeInput2Props, /** @deprecated import from `@blueprintjs/datetime` instead */ getTimezoneMetadata, TimePrecision, /** @deprecated import from `@blueprintjs/datetime` instead */ TimezoneSelect, /** @deprecated import from `@blueprintjs/datetime` instead */ - TimezoneSelectProps, + type TimezoneSelectProps, /** @deprecated import from `@blueprintjs/datetime` instead */ TimezoneDisplayFormat, } from "@blueprintjs/datetime"; diff --git a/packages/datetime2/test/components/dateInput3Tests.tsx b/packages/datetime2/test/components/dateInput3Tests.tsx index 06002c400f..bfb3148840 100644 --- a/packages/datetime2/test/components/dateInput3Tests.tsx +++ b/packages/datetime2/test/components/dateInput3Tests.tsx @@ -18,7 +18,7 @@ import { assert } from "chai"; import { intlFormat, isEqual, parseISO } from "date-fns"; import { formatInTimeZone, zonedTimeToUtc } from "date-fns-tz"; import enUSLocale from "date-fns/locale/en-US"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as sinon from "sinon"; @@ -35,7 +35,7 @@ import { // tslint:disable-next-line no-submodule-imports import { TIMEZONE_ITEMS } from "@blueprintjs/datetime/lib/esm/common/timezoneItems"; -import { Datetime2Classes as Classes, DateInput3, DateInput3Props, DatePicker3 } from "../../src"; +import { Datetime2Classes as Classes, DateInput3, type DateInput3Props, DatePicker3 } from "../../src"; import { DefaultDateFnsFormats, getDateFnsFormatter } from "../../src/common/dateFnsFormatUtils"; import { loadDateFnsLocaleFake } from "../common/loadDateFnsLocaleFake"; diff --git a/packages/datetime2/test/components/datePicker3Tests.tsx b/packages/datetime2/test/components/datePicker3Tests.tsx index c7fc274b62..ec219edf72 100644 --- a/packages/datetime2/test/components/datePicker3Tests.tsx +++ b/packages/datetime2/test/components/datePicker3Tests.tsx @@ -16,14 +16,14 @@ import { assert } from "chai"; import enUSLocale from "date-fns/locale/en-US"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import { Day } from "react-day-picker"; import sinon from "sinon"; import { Button, Classes as CoreClasses, HTMLSelect, Menu, MenuItem } from "@blueprintjs/core"; import { - DatePickerShortcut, + type DatePickerShortcut, DatePickerShortcutMenu, DateUtils, Errors, @@ -34,7 +34,7 @@ import { import { assertDatesEqual } from "@blueprintjs/test-commons"; import { Classes } from "../../src/classes"; -import { DatePicker3, DatePicker3Props } from "../../src/components/date-picker3/datePicker3"; +import { DatePicker3, type DatePicker3Props } from "../../src/components/date-picker3/datePicker3"; import type { DatePicker3State } from "../../src/components/date-picker3/datePicker3State"; import { assertDayDisabled, assertDayHidden } from "../common/dayPickerTestUtils"; import { loadDateFnsLocaleFake } from "../common/loadDateFnsLocaleFake"; diff --git a/packages/datetime2/test/components/dateRangeInput3Tests.tsx b/packages/datetime2/test/components/dateRangeInput3Tests.tsx index 5dbe002afb..2316f12cef 100644 --- a/packages/datetime2/test/components/dateRangeInput3Tests.tsx +++ b/packages/datetime2/test/components/dateRangeInput3Tests.tsx @@ -18,7 +18,7 @@ import { expect } from "chai"; import { format, parse } from "date-fns"; import * as Locales from "date-fns/locale"; import esLocale from "date-fns/locale/es"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import * as TestUtils from "react-dom/test-utils"; @@ -27,19 +27,25 @@ import * as sinon from "sinon"; import { Boundary, Classes as CoreClasses, - HTMLDivProps, - HTMLInputProps, + type HTMLDivProps, + type HTMLInputProps, InputGroup, - InputGroupProps, + type InputGroupProps, Popover, - PopoverProps, + type PopoverProps, } from "@blueprintjs/core"; -import { DateFormatProps, DateRange, Classes as DatetimeClasses, Months, TimePrecision } from "@blueprintjs/datetime"; +import { + type DateFormatProps, + type DateRange, + Classes as DatetimeClasses, + Months, + TimePrecision, +} from "@blueprintjs/datetime"; import { expectPropValidationError } from "@blueprintjs/test-commons"; import { DateRangeInput3, - DateRangeInput3Props, + type DateRangeInput3Props, DateRangePicker3, Datetime2Classes, ReactDayPickerClasses, diff --git a/packages/datetime2/test/components/dateRangePicker3Tests.tsx b/packages/datetime2/test/components/dateRangePicker3Tests.tsx index cc360cc530..8f80027278 100644 --- a/packages/datetime2/test/components/dateRangePicker3Tests.tsx +++ b/packages/datetime2/test/components/dateRangePicker3Tests.tsx @@ -17,26 +17,26 @@ import { assert } from "chai"; import { format, parse } from "date-fns"; import enUSLocale from "date-fns/locale/en-US"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; -import { DayModifiers, DayPicker, ModifiersClassNames } from "react-day-picker"; +import { type DayModifiers, DayPicker, type ModifiersClassNames } from "react-day-picker"; import sinon from "sinon"; import { Button, Classes, Menu, MenuItem } from "@blueprintjs/core"; import { DatePickerShortcutMenu, - DateRange, - DateRangeShortcut, + type DateRange, + type DateRangeShortcut, DateUtils, Errors, MonthAndYear, Months, - NonNullDateRange, + type NonNullDateRange, TimePicker, - TimePrecision, + type TimePrecision, } from "@blueprintjs/datetime"; -import { DateRangePicker3, DateRangePicker3Props, Datetime2Classes, ReactDayPickerClasses } from "../../src"; +import { DateRangePicker3, type DateRangePicker3Props, Datetime2Classes, ReactDayPickerClasses } from "../../src"; import type { DateRangePicker3State } from "../../src/components/date-range-picker3/dateRangePicker3State"; import { assertDayDisabled } from "../common/dayPickerTestUtils"; import { loadDateFnsLocaleFake } from "../common/loadDateFnsLocaleFake"; diff --git a/packages/demo-app/src/examples/BreadcrumbExample.tsx b/packages/demo-app/src/examples/BreadcrumbExample.tsx index 16c4647cd4..8152de16c3 100644 --- a/packages/demo-app/src/examples/BreadcrumbExample.tsx +++ b/packages/demo-app/src/examples/BreadcrumbExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { BreadcrumbProps, Breadcrumbs } from "@blueprintjs/core"; +import { type BreadcrumbProps, Breadcrumbs } from "@blueprintjs/core"; import { ExampleCard } from "./ExampleCard"; diff --git a/packages/demo-app/src/examples/TagInputExample.tsx b/packages/demo-app/src/examples/TagInputExample.tsx index 30f179542f..8613003825 100644 --- a/packages/demo-app/src/examples/TagInputExample.tsx +++ b/packages/demo-app/src/examples/TagInputExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Intent, TagInput, TagProps } from "@blueprintjs/core"; +import { Intent, TagInput, type TagProps } from "@blueprintjs/core"; import { ExampleCard } from "./ExampleCard"; diff --git a/packages/demo-app/src/examples/TreeExample.tsx b/packages/demo-app/src/examples/TreeExample.tsx index 84a8d9c437..259a15fa6d 100644 --- a/packages/demo-app/src/examples/TreeExample.tsx +++ b/packages/demo-app/src/examples/TreeExample.tsx @@ -17,7 +17,7 @@ import cloneDeep from "lodash/cloneDeep"; import * as React from "react"; -import { Classes, ContextMenu, Icon, Intent, Tooltip, Tree, TreeNodeInfo } from "@blueprintjs/core"; +import { Classes, ContextMenu, Icon, Intent, Tooltip, Tree, type TreeNodeInfo } from "@blueprintjs/core"; import { ExampleCard } from "./ExampleCard"; diff --git a/packages/docs-app/src/common/dateFnsLocaleSelect.tsx b/packages/docs-app/src/common/dateFnsLocaleSelect.tsx index 24a3ea2ad8..8ee3fdb6a2 100644 --- a/packages/docs-app/src/common/dateFnsLocaleSelect.tsx +++ b/packages/docs-app/src/common/dateFnsLocaleSelect.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import { Button, MenuItem } from "@blueprintjs/core"; import { CaretDown } from "@blueprintjs/icons"; -import { ItemRenderer, Select, SelectPopoverProps } from "@blueprintjs/select"; +import { type ItemRenderer, Select, type SelectPopoverProps } from "@blueprintjs/select"; export type CommonDateFnsLocale = "de" | "en-US" | "es" | "fr" | "hi" | "it" | "zh-CN"; export const COMMON_DATE_FNS_LOCALES: CommonDateFnsLocale[] = ["de", "en-US", "es", "fr", "hi", "it", "zh-CN"]; diff --git a/packages/docs-app/src/common/propCodeTooltip.tsx b/packages/docs-app/src/common/propCodeTooltip.tsx index 92989cfe9e..6214cc49d2 100644 --- a/packages/docs-app/src/common/propCodeTooltip.tsx +++ b/packages/docs-app/src/common/propCodeTooltip.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Code, Tooltip, TooltipProps } from "@blueprintjs/core"; +import { Code, Tooltip, type TooltipProps } from "@blueprintjs/core"; /** * Opinionated subset of tooltip props. diff --git a/packages/docs-app/src/components/blueprintDocs.tsx b/packages/docs-app/src/components/blueprintDocs.tsx index 5bc12d07ca..cd276840dd 100644 --- a/packages/docs-app/src/components/blueprintDocs.tsx +++ b/packages/docs-app/src/components/blueprintDocs.tsx @@ -14,13 +14,19 @@ * limitations under the License. */ -import { IHeadingNode, IPageData, isPageNode, ITsDocBase } from "@documentalist/client"; +import { type IHeadingNode, type IPageData, isPageNode, type ITsDocBase } from "@documentalist/client"; import classNames from "classnames"; import * as React from "react"; -import { AnchorButton, Classes, HotkeysProvider, Intent, Tag } from "@blueprintjs/core"; +import { AnchorButton, Classes, HotkeysProvider, type Intent, Tag } from "@blueprintjs/core"; import type { DocsCompleteData } from "@blueprintjs/docs-data"; -import { Banner, Documentation, DocumentationProps, NavMenuItem, NavMenuItemProps } from "@blueprintjs/docs-theme"; +import { + Banner, + Documentation, + type DocumentationProps, + NavMenuItem, + type NavMenuItemProps, +} from "@blueprintjs/docs-theme"; import { highlightCodeBlocks } from "../styles/syntaxHighlighting"; import { NavHeader } from "./navHeader"; diff --git a/packages/docs-app/src/components/clickToCopy.tsx b/packages/docs-app/src/components/clickToCopy.tsx index 19ad60baec..b8eefc8bdd 100644 --- a/packages/docs-app/src/components/clickToCopy.tsx +++ b/packages/docs-app/src/components/clickToCopy.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { HTMLDivProps, Props, removeNonHTMLProps } from "@blueprintjs/core"; +import { type HTMLDivProps, type Props, removeNonHTMLProps } from "@blueprintjs/core"; import { createKeyEventHandler } from "@blueprintjs/docs-theme"; export interface ClickToCopyProps extends Props, React.RefAttributes, HTMLDivProps { diff --git a/packages/docs-app/src/components/docsIcon.tsx b/packages/docs-app/src/components/docsIcon.tsx index 38a4f93914..a99fa27703 100644 --- a/packages/docs-app/src/components/docsIcon.tsx +++ b/packages/docs-app/src/components/docsIcon.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import download from "downloadjs"; import * as React from "react"; -import { Classes, ContextMenu, Icon, IconName, Menu, MenuItem } from "@blueprintjs/core"; +import { Classes, ContextMenu, Icon, type IconName, Menu, MenuItem } from "@blueprintjs/core"; import { IconSize } from "@blueprintjs/icons"; import { ClickToCopy } from "./clickToCopy"; diff --git a/packages/docs-app/src/components/icons.tsx b/packages/docs-app/src/components/icons.tsx index bf40f4d60d..c7699d9644 100644 --- a/packages/docs-app/src/components/icons.tsx +++ b/packages/docs-app/src/components/icons.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { Classes, H3, InputGroup, NonIdealState } from "@blueprintjs/core"; import { smartSearch } from "@blueprintjs/docs-theme"; -import { DocsIcon, DocsIconProps as Icon } from "./docsIcon"; +import { DocsIcon, type DocsIconProps as Icon } from "./docsIcon"; const ICONS_PER_ROW = 5; diff --git a/packages/docs-app/src/components/navHeader.tsx b/packages/docs-app/src/components/navHeader.tsx index a7e941c612..46472e326a 100644 --- a/packages/docs-app/src/components/navHeader.tsx +++ b/packages/docs-app/src/components/navHeader.tsx @@ -17,7 +17,7 @@ import type { INpmPackage } from "@documentalist/client"; import * as React from "react"; -import { Classes, HotkeysTarget2, Intent, Menu, MenuItem, NavbarHeading, Popover, Tag } from "@blueprintjs/core"; +import { Classes, HotkeysTarget2, type Intent, Menu, MenuItem, NavbarHeading, Popover, Tag } from "@blueprintjs/core"; import { NavButton } from "@blueprintjs/docs-theme"; import { Logo } from "./logo"; diff --git a/packages/docs-app/src/components/welcome.tsx b/packages/docs-app/src/components/welcome.tsx index 85ea5d4959..62663c495e 100644 --- a/packages/docs-app/src/components/welcome.tsx +++ b/packages/docs-app/src/components/welcome.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Card, H4, Icon, IconName } from "@blueprintjs/core"; +import { Card, H4, Icon, type IconName } from "@blueprintjs/core"; export class Welcome extends React.PureComponent { public render() { diff --git a/packages/docs-app/src/examples/core-examples/alertExample.tsx b/packages/docs-app/src/examples/core-examples/alertExample.tsx index f88ad30025..1a5446c6a2 100644 --- a/packages/docs-app/src/examples/core-examples/alertExample.tsx +++ b/packages/docs-app/src/examples/core-examples/alertExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Alert, Button, H5, Intent, OverlayToaster, Switch, Toaster } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Alert, Button, H5, Intent, OverlayToaster, Switch, type Toaster } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import type { BlueprintExampleData } from "../../tags/types"; diff --git a/packages/docs-app/src/examples/core-examples/breadcrumbsExample.tsx b/packages/docs-app/src/examples/core-examples/breadcrumbsExample.tsx index ccb8d347fc..d5d4651703 100644 --- a/packages/docs-app/src/examples/core-examples/breadcrumbsExample.tsx +++ b/packages/docs-app/src/examples/core-examples/breadcrumbsExample.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import { Boundary, - BreadcrumbProps, + type BreadcrumbProps, Breadcrumbs, Card, Checkbox, @@ -28,7 +28,7 @@ import { RadioGroup, Slider, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleStringChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleStringChange } from "@blueprintjs/docs-theme"; export interface BreadcrumbsExampleState { collapseFrom: Boundary; diff --git a/packages/docs-app/src/examples/core-examples/buttonGroupExample.tsx b/packages/docs-app/src/examples/core-examples/buttonGroupExample.tsx index c8e3f12f0d..ba71aac4c7 100644 --- a/packages/docs-app/src/examples/core-examples/buttonGroupExample.tsx +++ b/packages/docs-app/src/examples/core-examples/buttonGroupExample.tsx @@ -28,7 +28,7 @@ import { Switch, Tooltip, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { AlignmentSelect } from "./common/alignmentSelect"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx b/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx index 2d48a6c6d1..803a1fa6ff 100644 --- a/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx +++ b/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Alignment, Button, ButtonGroup, H5, IconName, Popover, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Alignment, Button, ButtonGroup, H5, type IconName, Popover, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { AlignmentSelect } from "./common/alignmentSelect"; import { FileMenu } from "./common/fileMenu"; diff --git a/packages/docs-app/src/examples/core-examples/buttonsExample.tsx b/packages/docs-app/src/examples/core-examples/buttonsExample.tsx index 2801bfe97f..97b6ecad57 100644 --- a/packages/docs-app/src/examples/core-examples/buttonsExample.tsx +++ b/packages/docs-app/src/examples/core-examples/buttonsExample.tsx @@ -17,13 +17,13 @@ import classNames from "classnames"; import * as React from "react"; -import { Alignment, AnchorButton, Button, Code, H5, Intent, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { type Alignment, AnchorButton, Button, Code, H5, Intent, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { Duplicate, Refresh } from "@blueprintjs/icons"; import { AlignmentSelect } from "./common/alignmentSelect"; import { IntentSelect } from "./common/intentSelect"; -import { Size, SizeSelect } from "./common/sizeSelect"; +import { type Size, SizeSelect } from "./common/sizeSelect"; interface ButtonsExampleState { active: boolean; diff --git a/packages/docs-app/src/examples/core-examples/buttonsIconsExample.tsx b/packages/docs-app/src/examples/core-examples/buttonsIconsExample.tsx index ee74053300..b94ab2e994 100644 --- a/packages/docs-app/src/examples/core-examples/buttonsIconsExample.tsx +++ b/packages/docs-app/src/examples/core-examples/buttonsIconsExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, Icon } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export class ButtonsIconsExample extends React.PureComponent { public render() { diff --git a/packages/docs-app/src/examples/core-examples/calloutExample.tsx b/packages/docs-app/src/examples/core-examples/calloutExample.tsx index 11dd3a488b..5c063232fa 100644 --- a/packages/docs-app/src/examples/core-examples/calloutExample.tsx +++ b/packages/docs-app/src/examples/core-examples/calloutExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, Callout, Code, H5, HTMLSelect, Intent, Label, Switch } from "@blueprintjs/core"; -import { DocsExampleProps, Example, handleBooleanChange, handleNumberChange } from "@blueprintjs/docs-theme"; +import { Button, Callout, Code, H5, HTMLSelect, type Intent, Label, Switch } from "@blueprintjs/core"; +import { type DocsExampleProps, Example, handleBooleanChange, handleNumberChange } from "@blueprintjs/docs-theme"; import type { IconName } from "@blueprintjs/icons"; import { IconSelect } from "./common/iconSelect"; diff --git a/packages/docs-app/src/examples/core-examples/cardExample.tsx b/packages/docs-app/src/examples/core-examples/cardExample.tsx index 1d2a8a2e49..63dabfd325 100644 --- a/packages/docs-app/src/examples/core-examples/cardExample.tsx +++ b/packages/docs-app/src/examples/core-examples/cardExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, Card, Classes, Elevation, H5, Label, Slider, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Button, Card, Classes, type Elevation, H5, Label, Slider, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export interface CardExampleState { compact: boolean; diff --git a/packages/docs-app/src/examples/core-examples/cardListExample.tsx b/packages/docs-app/src/examples/core-examples/cardListExample.tsx index 8a02c536fb..a85ab9102c 100644 --- a/packages/docs-app/src/examples/core-examples/cardListExample.tsx +++ b/packages/docs-app/src/examples/core-examples/cardListExample.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { Button, Card, CardList, Classes, Code, H5, Section, SectionCard, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { ChevronRight } from "@blueprintjs/icons"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; diff --git a/packages/docs-app/src/examples/core-examples/checkboxCardExample.tsx b/packages/docs-app/src/examples/core-examples/checkboxCardExample.tsx index 481f914cbc..bd28cc71fc 100644 --- a/packages/docs-app/src/examples/core-examples/checkboxCardExample.tsx +++ b/packages/docs-app/src/examples/core-examples/checkboxCardExample.tsx @@ -17,8 +17,16 @@ import classNames from "classnames"; import * as React from "react"; -import { Alignment, CheckboxCard, CheckboxCardProps, Classes, FormGroup, H5, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { + type Alignment, + CheckboxCard, + type CheckboxCardProps, + Classes, + FormGroup, + H5, + Switch, +} from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; import { AlignmentSelect } from "./common/alignmentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/checkboxExample.tsx b/packages/docs-app/src/examples/core-examples/checkboxExample.tsx index 80c25aaa07..5e24b8561a 100644 --- a/packages/docs-app/src/examples/core-examples/checkboxExample.tsx +++ b/packages/docs-app/src/examples/core-examples/checkboxExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Alignment, Checkbox, H5, Label, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { AlignmentSelect } from "./common/alignmentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/collapseExample.tsx b/packages/docs-app/src/examples/core-examples/collapseExample.tsx index ec14357c85..f631a924c0 100644 --- a/packages/docs-app/src/examples/core-examples/collapseExample.tsx +++ b/packages/docs-app/src/examples/core-examples/collapseExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, Collapse, H5, Pre, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface CollapseExampleState { isOpen: boolean; diff --git a/packages/docs-app/src/examples/core-examples/common/fileMenu.tsx b/packages/docs-app/src/examples/core-examples/common/fileMenu.tsx index 00b3493278..9bbec4dd47 100644 --- a/packages/docs-app/src/examples/core-examples/common/fileMenu.tsx +++ b/packages/docs-app/src/examples/core-examples/common/fileMenu.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Menu, MenuDivider, MenuItem, Props } from "@blueprintjs/core"; +import { Menu, MenuDivider, MenuItem, type Props } from "@blueprintjs/core"; export interface FileMenuProps extends Props { shouldDismissPopover?: boolean; diff --git a/packages/docs-app/src/examples/core-examples/common/iconNames.ts b/packages/docs-app/src/examples/core-examples/common/iconNames.ts index 384be736f0..314dcde476 100644 --- a/packages/docs-app/src/examples/core-examples/common/iconNames.ts +++ b/packages/docs-app/src/examples/core-examples/common/iconNames.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { IconName, IconNames } from "@blueprintjs/icons"; +import { type IconName, IconNames } from "@blueprintjs/icons"; export const NONE = "(none)"; export type IconNameOrNone = IconName | typeof NONE; diff --git a/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx b/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx index 225fbe0260..f3a85800bb 100644 --- a/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx +++ b/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx @@ -19,9 +19,9 @@ import * as React from "react"; import { Alignment, Button, Classes, MenuItem } from "@blueprintjs/core"; import type { IconName } from "@blueprintjs/icons"; -import { ItemRenderer, Select } from "@blueprintjs/select"; +import { type ItemRenderer, Select } from "@blueprintjs/select"; -import { getIconNames, IconNameOrNone, NONE } from "./iconNames"; +import { getIconNames, type IconNameOrNone, NONE } from "./iconNames"; const ICON_NAMES = getIconNames(); diff --git a/packages/docs-app/src/examples/core-examples/contextMenuExample.tsx b/packages/docs-app/src/examples/core-examples/contextMenuExample.tsx index 9284832c94..ee4ce5cf07 100644 --- a/packages/docs-app/src/examples/core-examples/contextMenuExample.tsx +++ b/packages/docs-app/src/examples/core-examples/contextMenuExample.tsx @@ -20,14 +20,14 @@ import * as React from "react"; import { Classes, ContextMenu, - ContextMenuChildrenProps, - ContextMenuContentProps, + type ContextMenuChildrenProps, + type ContextMenuContentProps, Menu, MenuDivider, MenuItem, Tooltip, } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export const ContextMenuExample: React.FC = props => { const renderContent = React.useCallback( diff --git a/packages/docs-app/src/examples/core-examples/contextMenuPopoverExample.tsx b/packages/docs-app/src/examples/core-examples/contextMenuPopoverExample.tsx index 760988ff69..78b801699b 100644 --- a/packages/docs-app/src/examples/core-examples/contextMenuPopoverExample.tsx +++ b/packages/docs-app/src/examples/core-examples/contextMenuPopoverExample.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import * as React from "react"; import { Classes, hideContextMenu, Menu, MenuDivider, MenuItem, showContextMenu } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export const ContextMenuPopoverExample: React.FC = props => { const [isOpen, setIsOpen] = React.useState(false); diff --git a/packages/docs-app/src/examples/core-examples/controlCardListExample.tsx b/packages/docs-app/src/examples/core-examples/controlCardListExample.tsx index cbf32d95f2..0694e39a66 100644 --- a/packages/docs-app/src/examples/core-examples/controlCardListExample.tsx +++ b/packages/docs-app/src/examples/core-examples/controlCardListExample.tsx @@ -22,12 +22,12 @@ import { H5, Section, SectionCard, - SectionProps, + type SectionProps, Switch, SwitchCard, - SwitchCardProps, + type SwitchCardProps, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { Cog, Moon, PageLayout } from "@blueprintjs/icons"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; diff --git a/packages/docs-app/src/examples/core-examples/controlGroupExample.tsx b/packages/docs-app/src/examples/core-examples/controlGroupExample.tsx index a91ec150b6..1c9df432a4 100644 --- a/packages/docs-app/src/examples/core-examples/controlGroupExample.tsx +++ b/packages/docs-app/src/examples/core-examples/controlGroupExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, ControlGroup, HTMLSelect, InputGroup, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; const FILTER_OPTIONS = ["Filter", "Name - ascending", "Name - descending", "Price - ascending", "Price - descending"]; diff --git a/packages/docs-app/src/examples/core-examples/dialogExample.tsx b/packages/docs-app/src/examples/core-examples/dialogExample.tsx index 32023b1301..8e7eb0c544 100644 --- a/packages/docs-app/src/examples/core-examples/dialogExample.tsx +++ b/packages/docs-app/src/examples/core-examples/dialogExample.tsx @@ -23,12 +23,12 @@ import { Dialog, DialogBody, DialogFooter, - DialogProps, + type DialogProps, H5, Switch, Tooltip, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import type { BlueprintExampleData } from "../../tags/types"; diff --git a/packages/docs-app/src/examples/core-examples/dividerExample.tsx b/packages/docs-app/src/examples/core-examples/dividerExample.tsx index e8b5f39b04..1dbdc3e4ee 100644 --- a/packages/docs-app/src/examples/core-examples/dividerExample.tsx +++ b/packages/docs-app/src/examples/core-examples/dividerExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, ButtonGroup, Divider, H5, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface DividerExampleState { vertical: boolean; diff --git a/packages/docs-app/src/examples/core-examples/drawerExample.tsx b/packages/docs-app/src/examples/core-examples/drawerExample.tsx index 89f2146d04..8746297912 100644 --- a/packages/docs-app/src/examples/core-examples/drawerExample.tsx +++ b/packages/docs-app/src/examples/core-examples/drawerExample.tsx @@ -29,13 +29,13 @@ import { Label, Menu, MenuItem, - OptionProps, + type OptionProps, Position, Switch, } from "@blueprintjs/core"; import { Example, - ExampleProps, + type ExampleProps, handleBooleanChange, handleStringChange, handleValueChange, diff --git a/packages/docs-app/src/examples/core-examples/dropdownMenuExample.tsx b/packages/docs-app/src/examples/core-examples/dropdownMenuExample.tsx index ffebe498e4..799f12f3ed 100644 --- a/packages/docs-app/src/examples/core-examples/dropdownMenuExample.tsx +++ b/packages/docs-app/src/examples/core-examples/dropdownMenuExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, Card, Menu, MenuDivider, MenuItem, Popover } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export class DropdownMenuExample extends React.PureComponent { public render() { diff --git a/packages/docs-app/src/examples/core-examples/editableTextExample.tsx b/packages/docs-app/src/examples/core-examples/editableTextExample.tsx index 24cd6b3af0..ade67e3272 100644 --- a/packages/docs-app/src/examples/core-examples/editableTextExample.tsx +++ b/packages/docs-app/src/examples/core-examples/editableTextExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Classes, EditableText, FormGroup, H1, H5, Intent, NumericInput, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Classes, EditableText, FormGroup, H1, H5, type Intent, NumericInput, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/fileInputExample.tsx b/packages/docs-app/src/examples/core-examples/fileInputExample.tsx index 6ab66d57c2..759d5239cc 100644 --- a/packages/docs-app/src/examples/core-examples/fileInputExample.tsx +++ b/packages/docs-app/src/examples/core-examples/fileInputExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; import { FileInput, FormGroup, H5, InputGroup, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; interface FileInputExampleState { buttonText?: string; diff --git a/packages/docs-app/src/examples/core-examples/focusExample.tsx b/packages/docs-app/src/examples/core-examples/focusExample.tsx index 42703e5342..ca7cdfce71 100644 --- a/packages/docs-app/src/examples/core-examples/focusExample.tsx +++ b/packages/docs-app/src/examples/core-examples/focusExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, Classes, FocusStyleManager, InputGroup, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface FocusExampleState { isFocusActive?: boolean; diff --git a/packages/docs-app/src/examples/core-examples/formGroupExample.tsx b/packages/docs-app/src/examples/core-examples/formGroupExample.tsx index d6daa26774..8fe0ba4383 100644 --- a/packages/docs-app/src/examples/core-examples/formGroupExample.tsx +++ b/packages/docs-app/src/examples/core-examples/formGroupExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Classes, Code, FormGroup, H5, Icon, InputGroup, Intent, Switch, Tooltip } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/hotkeyPiano.tsx b/packages/docs-app/src/examples/core-examples/hotkeyPiano.tsx index 03c29f0268..5121e32d1f 100644 --- a/packages/docs-app/src/examples/core-examples/hotkeyPiano.tsx +++ b/packages/docs-app/src/examples/core-examples/hotkeyPiano.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Hotkey, Hotkeys, HotkeysTarget, NonIdealState } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { PianoKey } from "./audio"; diff --git a/packages/docs-app/src/examples/core-examples/hotkeyTesterExample.tsx b/packages/docs-app/src/examples/core-examples/hotkeyTesterExample.tsx index 69ef3c8821..9871a55e0f 100644 --- a/packages/docs-app/src/examples/core-examples/hotkeyTesterExample.tsx +++ b/packages/docs-app/src/examples/core-examples/hotkeyTesterExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Code, getKeyComboString, KeyComboTag } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export interface HotkeyTesterState { combo: string; diff --git a/packages/docs-app/src/examples/core-examples/hotkeysTarget2Example.tsx b/packages/docs-app/src/examples/core-examples/hotkeysTarget2Example.tsx index 7a710f16c3..a865c25fe8 100644 --- a/packages/docs-app/src/examples/core-examples/hotkeysTarget2Example.tsx +++ b/packages/docs-app/src/examples/core-examples/hotkeysTarget2Example.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { HotkeyProps, HotkeysTarget2, NonIdealState } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { type HotkeyProps, HotkeysTarget2, NonIdealState } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { PianoKey } from "./audio"; diff --git a/packages/docs-app/src/examples/core-examples/htmlSelectExample.tsx b/packages/docs-app/src/examples/core-examples/htmlSelectExample.tsx index e38b780d77..17c656f85c 100644 --- a/packages/docs-app/src/examples/core-examples/htmlSelectExample.tsx +++ b/packages/docs-app/src/examples/core-examples/htmlSelectExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { H5, HTMLSelect, HTMLSelectIconName, Label, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange, handleStringChange } from "@blueprintjs/docs-theme"; +import { H5, HTMLSelect, type HTMLSelectIconName, Label, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange, handleStringChange } from "@blueprintjs/docs-theme"; export interface HTMLSelectExampleState { disabled: boolean; diff --git a/packages/docs-app/src/examples/core-examples/iconExample.tsx b/packages/docs-app/src/examples/core-examples/iconExample.tsx index e5925c03e0..10c172d812 100644 --- a/packages/docs-app/src/examples/core-examples/iconExample.tsx +++ b/packages/docs-app/src/examples/core-examples/iconExample.tsx @@ -17,8 +17,8 @@ import * as React from "react"; import { H5, Icon, Intent, Label, Slider } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; -import { IconName, IconSize } from "@blueprintjs/icons"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; +import { type IconName, IconSize } from "@blueprintjs/icons"; import { IconSelect } from "./common/iconSelect"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/iconGeneratedComponentExample.tsx b/packages/docs-app/src/examples/core-examples/iconGeneratedComponentExample.tsx index 0f3bba289a..c348ca36f3 100644 --- a/packages/docs-app/src/examples/core-examples/iconGeneratedComponentExample.tsx +++ b/packages/docs-app/src/examples/core-examples/iconGeneratedComponentExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { H5, Label, Slider } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Calendar, IconSize } from "@blueprintjs/icons"; interface ExampleState { diff --git a/packages/docs-app/src/examples/core-examples/inputGroupExample.tsx b/packages/docs-app/src/examples/core-examples/inputGroupExample.tsx index c5cf454f92..6130a54ea3 100644 --- a/packages/docs-app/src/examples/core-examples/inputGroupExample.tsx +++ b/packages/docs-app/src/examples/core-examples/inputGroupExample.tsx @@ -30,7 +30,7 @@ import { Tag, Tooltip, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange, handleStringChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleStringChange } from "@blueprintjs/docs-theme"; import { IconSize } from "@blueprintjs/icons"; export interface InputGroupExampleState { diff --git a/packages/docs-app/src/examples/core-examples/menuExample.tsx b/packages/docs-app/src/examples/core-examples/menuExample.tsx index ed771033cf..c046dce8ee 100644 --- a/packages/docs-app/src/examples/core-examples/menuExample.tsx +++ b/packages/docs-app/src/examples/core-examples/menuExample.tsx @@ -17,9 +17,9 @@ import * as React from "react"; import { Classes, H5, Icon, Menu, MenuDivider, MenuItem } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; -import { getSizeProp, Size, SizeSelect } from "./common/sizeSelect"; +import { getSizeProp, type Size, SizeSelect } from "./common/sizeSelect"; export function MenuExample(props: ExampleProps) { const [size, setSize] = React.useState("regular"); diff --git a/packages/docs-app/src/examples/core-examples/menuItemExample.tsx b/packages/docs-app/src/examples/core-examples/menuItemExample.tsx index b80275a0e8..af92b85177 100644 --- a/packages/docs-app/src/examples/core-examples/menuItemExample.tsx +++ b/packages/docs-app/src/examples/core-examples/menuItemExample.tsx @@ -16,8 +16,19 @@ import * as React from "react"; -import { Classes, Code, H5, HTMLSelect, Intent, Label, Menu, MenuItem, MenuItemProps, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { + Classes, + Code, + H5, + HTMLSelect, + type Intent, + Label, + Menu, + MenuItem, + type MenuItemProps, + Switch, +} from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; import { BooleanOrUndefinedSelect } from "./common/booleanOrUndefinedSelect"; diff --git a/packages/docs-app/src/examples/core-examples/multiSliderExample.tsx b/packages/docs-app/src/examples/core-examples/multiSliderExample.tsx index 4096d00468..07a6d02f2d 100644 --- a/packages/docs-app/src/examples/core-examples/multiSliderExample.tsx +++ b/packages/docs-app/src/examples/core-examples/multiSliderExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { H5, HandleInteractionKind, Intent, MultiSlider, Radio, RadioGroup, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; interface SliderValues { dangerStart: number; diff --git a/packages/docs-app/src/examples/core-examples/multistepDialogExample.tsx b/packages/docs-app/src/examples/core-examples/multistepDialogExample.tsx index 6148edc142..1666e98eb8 100644 --- a/packages/docs-app/src/examples/core-examples/multistepDialogExample.tsx +++ b/packages/docs-app/src/examples/core-examples/multistepDialogExample.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import { Button, - ButtonProps, + type ButtonProps, Code, DialogBody, DialogStep, @@ -26,7 +26,7 @@ import { HTMLSelect, Label, MultistepDialog, - MultistepDialogNavPosition, + type MultistepDialogNavPosition, NumericInput, Radio, RadioGroup, @@ -34,7 +34,7 @@ import { } from "@blueprintjs/core"; import { Example, - ExampleProps, + type ExampleProps, handleBooleanChange, handleStringChange, handleValueChange, diff --git a/packages/docs-app/src/examples/core-examples/navbarExample.tsx b/packages/docs-app/src/examples/core-examples/navbarExample.tsx index 247f8d9ed0..be53ba0f4d 100644 --- a/packages/docs-app/src/examples/core-examples/navbarExample.tsx +++ b/packages/docs-app/src/examples/core-examples/navbarExample.tsx @@ -27,7 +27,7 @@ import { NavbarHeading, Switch, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface NavbarExampleState { alignRight: boolean; diff --git a/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx b/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx index dc4cbebb99..d1aa23d70b 100644 --- a/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx +++ b/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx @@ -26,12 +26,12 @@ import { Spinner, Switch, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import type { IconName } from "@blueprintjs/icons"; import { IconSelect } from "./common/iconSelect"; -import { Layout, LayoutSelect } from "./common/layoutSelect"; -import { Size, SizeSelect } from "./common/sizeSelect"; +import { type Layout, LayoutSelect } from "./common/layoutSelect"; +import { type Size, SizeSelect } from "./common/sizeSelect"; const sizeToNonIdealStateIconSize: Record = { large: NonIdealStateIconSize.STANDARD, diff --git a/packages/docs-app/src/examples/core-examples/numericInputBasicExample.tsx b/packages/docs-app/src/examples/core-examples/numericInputBasicExample.tsx index 07aa624483..6be4c06250 100644 --- a/packages/docs-app/src/examples/core-examples/numericInputBasicExample.tsx +++ b/packages/docs-app/src/examples/core-examples/numericInputBasicExample.tsx @@ -24,15 +24,15 @@ import { Menu, MenuItem, NumericInput, - NumericInputProps, - OptionProps, + type NumericInputProps, + type OptionProps, Popover, Position, Switch, } from "@blueprintjs/core"; import { Example, - ExampleProps, + type ExampleProps, handleBooleanChange, handleNumberChange, handleStringChange, diff --git a/packages/docs-app/src/examples/core-examples/numericInputExtendedExample.tsx b/packages/docs-app/src/examples/core-examples/numericInputExtendedExample.tsx index 51d88e4b05..7ee6f3a4b0 100644 --- a/packages/docs-app/src/examples/core-examples/numericInputExtendedExample.tsx +++ b/packages/docs-app/src/examples/core-examples/numericInputExtendedExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; import { NumericInput } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export interface NumericInputExtendedExampleState { value?: string; diff --git a/packages/docs-app/src/examples/core-examples/overlayExample.tsx b/packages/docs-app/src/examples/core-examples/overlayExample.tsx index c947a2e744..cb9f271073 100644 --- a/packages/docs-app/src/examples/core-examples/overlayExample.tsx +++ b/packages/docs-app/src/examples/core-examples/overlayExample.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; import { Button, Classes, Code, H3, H5, Intent, Overlay, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import type { BlueprintExampleData } from "../../tags/types"; diff --git a/packages/docs-app/src/examples/core-examples/panelStack2Example.tsx b/packages/docs-app/src/examples/core-examples/panelStack2Example.tsx index 11e55ab325..b1d40d5d07 100644 --- a/packages/docs-app/src/examples/core-examples/panelStack2Example.tsx +++ b/packages/docs-app/src/examples/core-examples/panelStack2Example.tsx @@ -23,8 +23,18 @@ import * as React from "react"; -import { Button, H5, Intent, NumericInput, Panel, PanelProps, PanelStack2, Switch, UL } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { + Button, + H5, + Intent, + NumericInput, + type Panel, + type PanelProps, + PanelStack2, + Switch, + UL, +} from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; // eslint-disable-next-line @typescript-eslint/no-empty-interface interface Panel1Info { diff --git a/packages/docs-app/src/examples/core-examples/panelStackExample.tsx b/packages/docs-app/src/examples/core-examples/panelStackExample.tsx index e4da0e585c..fc71073a97 100644 --- a/packages/docs-app/src/examples/core-examples/panelStackExample.tsx +++ b/packages/docs-app/src/examples/core-examples/panelStackExample.tsx @@ -23,8 +23,18 @@ import * as React from "react"; -import { Button, H5, Intent, IPanel, IPanelProps, NumericInput, PanelStack, Switch, UL } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { + Button, + H5, + Intent, + type IPanel, + type IPanelProps, + NumericInput, + PanelStack, + Switch, + UL, +} from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface IPanelStackExampleState { activePanelOnly: boolean; diff --git a/packages/docs-app/src/examples/core-examples/popoverDismissExample.tsx b/packages/docs-app/src/examples/core-examples/popoverDismissExample.tsx index 9291b02a3e..8c82fdcc37 100644 --- a/packages/docs-app/src/examples/core-examples/popoverDismissExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverDismissExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, Callout, Classes, Popover, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export class PopoverDismissExample extends React.PureComponent< ExampleProps, diff --git a/packages/docs-app/src/examples/core-examples/popoverExample.tsx b/packages/docs-app/src/examples/core-examples/popoverExample.tsx index 3a12855d13..90e574f646 100644 --- a/packages/docs-app/src/examples/core-examples/popoverExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverExample.tsx @@ -29,21 +29,21 @@ import { Menu, MenuDivider, MenuItem, - NumberRange, - Placement, + type NumberRange, + type Placement, Popover, - PopoverInteractionKind, - PopperModifierOverrides, + type PopoverInteractionKind, + type PopperModifierOverrides, PopperPlacements, RadioGroup, RangeSlider, Slider, - StrictModifierNames, + type StrictModifierNames, Switch, } from "@blueprintjs/core"; import { Example, - ExampleProps, + type ExampleProps, handleBooleanChange, handleNumberChange, handleValueChange, diff --git a/packages/docs-app/src/examples/core-examples/popoverInteractionKindExample.tsx b/packages/docs-app/src/examples/core-examples/popoverInteractionKindExample.tsx index eadab31121..ee444c4173 100644 --- a/packages/docs-app/src/examples/core-examples/popoverInteractionKindExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverInteractionKindExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, Intent, Popover, PopoverInteractionKind } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Button, Intent, Popover, type PopoverInteractionKind } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { FileMenu } from "./common/fileMenu"; diff --git a/packages/docs-app/src/examples/core-examples/popoverMinimalExample.tsx b/packages/docs-app/src/examples/core-examples/popoverMinimalExample.tsx index 97c9c3840c..0aa95055e0 100644 --- a/packages/docs-app/src/examples/core-examples/popoverMinimalExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverMinimalExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, Intent, Popover, PopoverProps } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Button, Intent, Popover, type PopoverProps } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { FileMenu } from "../core-examples/common/fileMenu"; diff --git a/packages/docs-app/src/examples/core-examples/popoverPlacementExample.tsx b/packages/docs-app/src/examples/core-examples/popoverPlacementExample.tsx index e5d0fa4808..d1bd709b8f 100644 --- a/packages/docs-app/src/examples/core-examples/popoverPlacementExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverPlacementExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, Classes, Code, ControlGroup, Placement, Popover } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Button, Classes, Code, ControlGroup, type Placement, Popover } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; const EXAMPLE_CLASS = "docs-popover-placement-example"; const SIDE_LABEL_CLASS = "docs-popover-placement-label-side"; diff --git a/packages/docs-app/src/examples/core-examples/popoverPortalExample.tsx b/packages/docs-app/src/examples/core-examples/popoverPortalExample.tsx index 7cb25fbfb2..cfabd5c962 100644 --- a/packages/docs-app/src/examples/core-examples/popoverPortalExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverPortalExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, Code, H5, Popover, PopoverProps, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Button, Code, H5, Popover, type PopoverProps, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; const POPOVER_PROPS: Partial = { autoFocus: false, diff --git a/packages/docs-app/src/examples/core-examples/popoverSizingExample.tsx b/packages/docs-app/src/examples/core-examples/popoverSizingExample.tsx index 5ebc9acbdb..4f6e870297 100644 --- a/packages/docs-app/src/examples/core-examples/popoverSizingExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverSizingExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, Popover } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { FileMenu } from "./common/fileMenu"; diff --git a/packages/docs-app/src/examples/core-examples/progressExample.tsx b/packages/docs-app/src/examples/core-examples/progressExample.tsx index a00f3b39fa..210b01678c 100644 --- a/packages/docs-app/src/examples/core-examples/progressExample.tsx +++ b/packages/docs-app/src/examples/core-examples/progressExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { H5, Intent, ProgressBar, Slider, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { H5, type Intent, ProgressBar, Slider, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/rangeSliderExample.tsx b/packages/docs-app/src/examples/core-examples/rangeSliderExample.tsx index 6dc936ea5a..7e32289136 100644 --- a/packages/docs-app/src/examples/core-examples/rangeSliderExample.tsx +++ b/packages/docs-app/src/examples/core-examples/rangeSliderExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { H5, NumberRange, RangeSlider, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { H5, type NumberRange, RangeSlider, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface RangeSliderExampleState { range: NumberRange; diff --git a/packages/docs-app/src/examples/core-examples/searchInputExample.tsx b/packages/docs-app/src/examples/core-examples/searchInputExample.tsx index 3a96c05531..ec0bc6d5b6 100644 --- a/packages/docs-app/src/examples/core-examples/searchInputExample.tsx +++ b/packages/docs-app/src/examples/core-examples/searchInputExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { H5, InputGroup, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; interface SearchInputExampleProps { disabled: boolean; diff --git a/packages/docs-app/src/examples/core-examples/sectionExample.tsx b/packages/docs-app/src/examples/core-examples/sectionExample.tsx index 352762262d..5fc1171ff0 100644 --- a/packages/docs-app/src/examples/core-examples/sectionExample.tsx +++ b/packages/docs-app/src/examples/core-examples/sectionExample.tsx @@ -26,11 +26,11 @@ import { Label, Section, SectionCard, - SectionElevation, + type SectionElevation, Slider, Switch, } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { IconNames } from "@blueprintjs/icons"; export interface SectionExampleState { diff --git a/packages/docs-app/src/examples/core-examples/sliderExample.tsx b/packages/docs-app/src/examples/core-examples/sliderExample.tsx index 91764393ce..1275511add 100644 --- a/packages/docs-app/src/examples/core-examples/sliderExample.tsx +++ b/packages/docs-app/src/examples/core-examples/sliderExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { H5, Slider, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; export interface SliderExampleState { value1?: number; diff --git a/packages/docs-app/src/examples/core-examples/spinnerExample.tsx b/packages/docs-app/src/examples/core-examples/spinnerExample.tsx index d70dabac8a..b3c56b55b6 100644 --- a/packages/docs-app/src/examples/core-examples/spinnerExample.tsx +++ b/packages/docs-app/src/examples/core-examples/spinnerExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { H5, Intent, Label, Slider, Spinner, SpinnerSize, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { H5, type Intent, Label, Slider, Spinner, SpinnerSize, Switch } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/switchCardExample.tsx b/packages/docs-app/src/examples/core-examples/switchCardExample.tsx index 0fb9df8015..0825c92d96 100644 --- a/packages/docs-app/src/examples/core-examples/switchCardExample.tsx +++ b/packages/docs-app/src/examples/core-examples/switchCardExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Alignment, FormGroup, H5, Switch, SwitchCard, SwitchCardProps } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { type Alignment, FormGroup, H5, Switch, SwitchCard, type SwitchCardProps } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; import { AlignmentSelect } from "./common/alignmentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/tabsExample.tsx b/packages/docs-app/src/examples/core-examples/tabsExample.tsx index 01db2a24bd..ebafa6c16c 100644 --- a/packages/docs-app/src/examples/core-examples/tabsExample.tsx +++ b/packages/docs-app/src/examples/core-examples/tabsExample.tsx @@ -16,8 +16,20 @@ import * as React from "react"; -import { Alignment, Classes, Divider, H4, H5, InputGroup, Navbar, Switch, Tab, TabId, Tabs } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { + Alignment, + Classes, + Divider, + H4, + H5, + InputGroup, + Navbar, + Switch, + Tab, + type TabId, + Tabs, +} from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; diff --git a/packages/docs-app/src/examples/core-examples/tagExample.tsx b/packages/docs-app/src/examples/core-examples/tagExample.tsx index 83e180e300..ea4dcef48b 100644 --- a/packages/docs-app/src/examples/core-examples/tagExample.tsx +++ b/packages/docs-app/src/examples/core-examples/tagExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, H5, Intent, Switch, Tag } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/tagInputExample.tsx b/packages/docs-app/src/examples/core-examples/tagInputExample.tsx index 0ce815ab61..c48502302f 100644 --- a/packages/docs-app/src/examples/core-examples/tagInputExample.tsx +++ b/packages/docs-app/src/examples/core-examples/tagInputExample.tsx @@ -16,8 +16,8 @@ import * as React from "react"; -import { Button, H5, Intent, Switch, TagInput, TagProps } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Button, H5, Intent, Switch, TagInput, type TagProps } from "@blueprintjs/core"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { IntentSelect } from "./common/intentSelect"; diff --git a/packages/docs-app/src/examples/core-examples/textAreaExample.tsx b/packages/docs-app/src/examples/core-examples/textAreaExample.tsx index 9c49ce872f..5aa7b4c74b 100644 --- a/packages/docs-app/src/examples/core-examples/textAreaExample.tsx +++ b/packages/docs-app/src/examples/core-examples/textAreaExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { AnchorButton, Code, ControlGroup, H5, Switch, TextArea, Tooltip } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; diff --git a/packages/docs-app/src/examples/core-examples/textExample.tsx b/packages/docs-app/src/examples/core-examples/textExample.tsx index e1a67b4bd6..f79556a5a3 100644 --- a/packages/docs-app/src/examples/core-examples/textExample.tsx +++ b/packages/docs-app/src/examples/core-examples/textExample.tsx @@ -17,8 +17,8 @@ import * as React from "react"; import { Button, Menu, MenuItem, Popover, Text, TextArea } from "@blueprintjs/core"; -import { Example, ExampleProps, handleStringChange } from "@blueprintjs/docs-theme"; -import { Film, TOP_100_FILMS } from "@blueprintjs/select/examples"; +import { Example, type ExampleProps, handleStringChange } from "@blueprintjs/docs-theme"; +import { type Film, TOP_100_FILMS } from "@blueprintjs/select/examples"; export interface TextExampleState { textContent: string; diff --git a/packages/docs-app/src/examples/core-examples/toastExample.tsx b/packages/docs-app/src/examples/core-examples/toastExample.tsx index 3c1bf48c16..10925ad961 100644 --- a/packages/docs-app/src/examples/core-examples/toastExample.tsx +++ b/packages/docs-app/src/examples/core-examples/toastExample.tsx @@ -26,15 +26,15 @@ import { Label, NumericInput, OverlayToaster, - OverlayToasterProps, + type OverlayToasterProps, Position, ProgressBar, Switch, - Toaster, - ToasterPosition, - ToastProps, + type Toaster, + type ToasterPosition, + type ToastProps, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import type { BlueprintExampleData } from "../../tags/types"; diff --git a/packages/docs-app/src/examples/core-examples/tooltipExample.tsx b/packages/docs-app/src/examples/core-examples/tooltipExample.tsx index 7733f6332d..81513798d7 100644 --- a/packages/docs-app/src/examples/core-examples/tooltipExample.tsx +++ b/packages/docs-app/src/examples/core-examples/tooltipExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Button, ButtonGroup, Classes, Code, H1, Popover, Switch, Tooltip } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export interface TooltipExampleState { isOpen: boolean; diff --git a/packages/docs-app/src/examples/core-examples/treeExample.tsx b/packages/docs-app/src/examples/core-examples/treeExample.tsx index 2934d607c2..312d939cd5 100644 --- a/packages/docs-app/src/examples/core-examples/treeExample.tsx +++ b/packages/docs-app/src/examples/core-examples/treeExample.tsx @@ -17,8 +17,8 @@ import cloneDeep from "lodash/cloneDeep"; import * as React from "react"; -import { Classes, ContextMenu, Icon, Intent, Tooltip, Tree, TreeNodeInfo } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Classes, ContextMenu, Icon, Intent, Tooltip, Tree, type TreeNodeInfo } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; type NodePath = number[]; diff --git a/packages/docs-app/src/examples/core-examples/useHotkeysExample.tsx b/packages/docs-app/src/examples/core-examples/useHotkeysExample.tsx index bafaee67c9..f3e85e52ef 100644 --- a/packages/docs-app/src/examples/core-examples/useHotkeysExample.tsx +++ b/packages/docs-app/src/examples/core-examples/useHotkeysExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { NonIdealState, useHotkeys } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { PianoKey } from "./audio"; diff --git a/packages/docs-app/src/examples/datetime-examples/common/dateFnsDate.tsx b/packages/docs-app/src/examples/datetime-examples/common/dateFnsDate.tsx index 04a972312c..fa61261ff3 100644 --- a/packages/docs-app/src/examples/datetime-examples/common/dateFnsDate.tsx +++ b/packages/docs-app/src/examples/datetime-examples/common/dateFnsDate.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import { format, isValid } from "date-fns"; import * as React from "react"; -import { Icon, Intent, Props, Tag } from "@blueprintjs/core"; +import { Icon, Intent, type Props, Tag } from "@blueprintjs/core"; import type { DateRange } from "@blueprintjs/datetime"; const FORMAT = "EEEE, MMMM d, yyyy"; diff --git a/packages/docs-app/src/examples/datetime-examples/common/dateFnsDateFormatPropsSelect.tsx b/packages/docs-app/src/examples/datetime-examples/common/dateFnsDateFormatPropsSelect.tsx index 0da5fe4ac6..3551693008 100644 --- a/packages/docs-app/src/examples/datetime-examples/common/dateFnsDateFormatPropsSelect.tsx +++ b/packages/docs-app/src/examples/datetime-examples/common/dateFnsDateFormatPropsSelect.tsx @@ -21,12 +21,12 @@ /* eslint-disable deprecation/deprecation, @blueprintjs/no-deprecated-components */ -import { format, Locale, parse } from "date-fns"; +import { format, type Locale, parse } from "date-fns"; import * as React from "react"; import type { DateFormatProps } from "@blueprintjs/datetime"; -import { DateFormatSelector, DateFormatSelectorProps } from "../../../common/dateFormatSelector"; +import { DateFormatSelector, type DateFormatSelectorProps } from "../../../common/dateFormatSelector"; // eslint-disable-next-line @typescript-eslint/no-var-requires const locales: { [localeCode: string]: Locale } = require("date-fns/locale"); diff --git a/packages/docs-app/src/examples/datetime-examples/common/momentDate.tsx b/packages/docs-app/src/examples/datetime-examples/common/momentDate.tsx index 56baad6933..c79363fe2a 100644 --- a/packages/docs-app/src/examples/datetime-examples/common/momentDate.tsx +++ b/packages/docs-app/src/examples/datetime-examples/common/momentDate.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import moment from "moment"; import * as React from "react"; -import { Icon, Intent, Props, Tag } from "@blueprintjs/core"; +import { Icon, Intent, type Props, Tag } from "@blueprintjs/core"; import type { DateRange } from "@blueprintjs/datetime"; const FORMAT = "dddd, LL"; diff --git a/packages/docs-app/src/examples/datetime-examples/common/momentFormats.tsx b/packages/docs-app/src/examples/datetime-examples/common/momentFormats.tsx index 3ad6d73638..54ce28a6ad 100644 --- a/packages/docs-app/src/examples/datetime-examples/common/momentFormats.tsx +++ b/packages/docs-app/src/examples/datetime-examples/common/momentFormats.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import type { DateFormatProps } from "@blueprintjs/datetime"; -import { DateFormatSelector, DateFormatSelectorProps } from "../../../common/dateFormatSelector"; +import { DateFormatSelector, type DateFormatSelectorProps } from "../../../common/dateFormatSelector"; export const MomentFormatSelector: React.FC> = props => { return ( diff --git a/packages/docs-app/src/examples/datetime-examples/dateInputExample.tsx b/packages/docs-app/src/examples/datetime-examples/dateInputExample.tsx index 608fd34bf8..3752a45ca8 100644 --- a/packages/docs-app/src/examples/datetime-examples/dateInputExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/dateInputExample.tsx @@ -25,8 +25,8 @@ import classNames from "classnames"; import * as React from "react"; import { Classes, Code, H5, Icon, Switch, Tag } from "@blueprintjs/core"; -import { DateFormatProps, DateInput, TimePrecision } from "@blueprintjs/datetime"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { type DateFormatProps, DateInput, TimePrecision } from "@blueprintjs/datetime"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; import { DATE_FNS_FORMATS, DateFnsDateFormatPropsSelect } from "./common/dateFnsDateFormatPropsSelect"; diff --git a/packages/docs-app/src/examples/datetime-examples/datePickerExample.tsx b/packages/docs-app/src/examples/datetime-examples/datePickerExample.tsx index b55cd3bfb2..810a986e59 100644 --- a/packages/docs-app/src/examples/datetime-examples/datePickerExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/datePickerExample.tsx @@ -24,8 +24,8 @@ import * as React from "react"; import { Callout, Classes, H5, Switch } from "@blueprintjs/core"; -import { DatePicker, TimePrecision } from "@blueprintjs/datetime"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { DatePicker, type TimePrecision } from "@blueprintjs/datetime"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { MomentDate } from "./common/momentDate"; import { PrecisionSelect } from "./common/precisionSelect"; diff --git a/packages/docs-app/src/examples/datetime-examples/dateRangeInputExample.tsx b/packages/docs-app/src/examples/datetime-examples/dateRangeInputExample.tsx index 44862dd592..64a8acd1cb 100644 --- a/packages/docs-app/src/examples/datetime-examples/dateRangeInputExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/dateRangeInputExample.tsx @@ -24,8 +24,8 @@ import * as React from "react"; import { Callout, Code, H5, Switch } from "@blueprintjs/core"; -import { DateFormatProps, DateRange, DateRangeInput, TimePrecision } from "@blueprintjs/datetime"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { type DateFormatProps, type DateRange, DateRangeInput, TimePrecision } from "@blueprintjs/datetime"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; import { DateFnsDateRange } from "./common/dateFnsDate"; diff --git a/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx b/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx index c562b45da4..089890b3df 100644 --- a/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx @@ -25,10 +25,10 @@ import moment from "moment"; import * as React from "react"; import { Classes, H5, HTMLSelect, Label, Switch } from "@blueprintjs/core"; -import { DateRange, DateRangePicker, TimePrecision } from "@blueprintjs/datetime"; +import { type DateRange, DateRangePicker, type TimePrecision } from "@blueprintjs/datetime"; import { Example, - ExampleProps, + type ExampleProps, handleBooleanChange, handleNumberChange, handleValueChange, diff --git a/packages/docs-app/src/examples/datetime-examples/timePickerExample.tsx b/packages/docs-app/src/examples/datetime-examples/timePickerExample.tsx index c233fdc8e1..a2b522cd73 100644 --- a/packages/docs-app/src/examples/datetime-examples/timePickerExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/timePickerExample.tsx @@ -20,7 +20,7 @@ import { Classes, H5, HTMLSelect, Switch } from "@blueprintjs/core"; import { TimePicker, TimePrecision } from "@blueprintjs/datetime"; // tslint:disable-next-line:no-submodule-imports import { getDefaultMaxTime, getDefaultMinTime } from "@blueprintjs/datetime/lib/esm/common/timeUnit"; -import { Example, ExampleProps, handleNumberChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleNumberChange, handleValueChange } from "@blueprintjs/docs-theme"; import { PrecisionSelect } from "./common/precisionSelect"; diff --git a/packages/docs-app/src/examples/datetime-examples/timezoneSelectExample.tsx b/packages/docs-app/src/examples/datetime-examples/timezoneSelectExample.tsx index 6ffb1224bc..da198b7357 100644 --- a/packages/docs-app/src/examples/datetime-examples/timezoneSelectExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/timezoneSelectExample.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import { H5, Position, Radio, RadioGroup, Switch } from "@blueprintjs/core"; import { TimezoneDisplayFormat, TimezoneSelect } from "@blueprintjs/datetime"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; export interface TimezoneSelectExampleState { disabled: boolean; diff --git a/packages/docs-app/src/examples/datetime2-examples/common/dateFnsFormatSelect.tsx b/packages/docs-app/src/examples/datetime2-examples/common/dateFnsFormatSelect.tsx index 3db8bed66c..f4ee60e64c 100644 --- a/packages/docs-app/src/examples/datetime2-examples/common/dateFnsFormatSelect.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/common/dateFnsFormatSelect.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { PropCodeTooltip } from "../../../common/propCodeTooltip"; -import { RadioSelect, RadioSelectProps } from "../../../common/RadioSelect"; +import { RadioSelect, type RadioSelectProps } from "../../../common/RadioSelect"; export const DATE_FNS_FORMAT_OPTIONS: string[] = [ "MM/dd/yyyy", diff --git a/packages/docs-app/src/examples/datetime2-examples/dateInput3Example.tsx b/packages/docs-app/src/examples/datetime2-examples/dateInput3Example.tsx index 42e0ff2f32..4e77828554 100644 --- a/packages/docs-app/src/examples/datetime2-examples/dateInput3Example.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/dateInput3Example.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import { Classes, Code, FormGroup, H5, Icon, Switch } from "@blueprintjs/core"; import { DateInput3, TimePrecision } from "@blueprintjs/datetime2"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { type CommonDateFnsLocale, DateFnsLocaleSelect } from "../../common/dateFnsLocaleSelect"; import { FormattedDateTag } from "../../common/formattedDateTag"; diff --git a/packages/docs-app/src/examples/datetime2-examples/datePicker3Example.tsx b/packages/docs-app/src/examples/datetime2-examples/datePicker3Example.tsx index ca231a7787..403fed5b0f 100644 --- a/packages/docs-app/src/examples/datetime2-examples/datePicker3Example.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/datePicker3Example.tsx @@ -17,8 +17,8 @@ import * as React from "react"; import { Callout, Classes, H5, Switch } from "@blueprintjs/core"; -import { DatePicker3, TimePrecision } from "@blueprintjs/datetime2"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { DatePicker3, type TimePrecision } from "@blueprintjs/datetime2"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { FormattedDateTag } from "../../common/formattedDateTag"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; diff --git a/packages/docs-app/src/examples/datetime2-examples/datePicker3LocalizedExample.tsx b/packages/docs-app/src/examples/datetime2-examples/datePicker3LocalizedExample.tsx index e570d5fefa..0ca8174bfa 100644 --- a/packages/docs-app/src/examples/datetime2-examples/datePicker3LocalizedExample.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/datePicker3LocalizedExample.tsx @@ -18,9 +18,9 @@ import * as React from "react"; import { H5 } from "@blueprintjs/core"; import { DatePicker3 } from "@blueprintjs/datetime2"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; -import { CommonDateFnsLocale, DateFnsLocaleSelect } from "../../common/dateFnsLocaleSelect"; +import { type CommonDateFnsLocale, DateFnsLocaleSelect } from "../../common/dateFnsLocaleSelect"; export const DatePicker3LocalizedExample: React.FC = props => { const [localeCode, setlocaleCode] = React.useState("fr"); diff --git a/packages/docs-app/src/examples/datetime2-examples/datePicker3ModifierExample.tsx b/packages/docs-app/src/examples/datetime2-examples/datePicker3ModifierExample.tsx index 2361c7dd3e..7de4fcf1c8 100644 --- a/packages/docs-app/src/examples/datetime2-examples/datePicker3ModifierExample.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/datePicker3ModifierExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { DatePicker3 } from "@blueprintjs/datetime2"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; export function DatePicker3ModifierExample(props: ExampleProps) { const isDayNumberOdd = React.useCallback((d: Date) => d.getDate() % 2 === 1, []); diff --git a/packages/docs-app/src/examples/datetime2-examples/dateRangeInput3Example.tsx b/packages/docs-app/src/examples/datetime2-examples/dateRangeInput3Example.tsx index 099f26b147..7c73b35a99 100644 --- a/packages/docs-app/src/examples/datetime2-examples/dateRangeInput3Example.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/dateRangeInput3Example.tsx @@ -17,9 +17,9 @@ import * as React from "react"; import { Callout, Code, FormGroup, H5, Switch } from "@blueprintjs/core"; -import { DateRange, TimePrecision } from "@blueprintjs/datetime"; +import { type DateRange, TimePrecision } from "@blueprintjs/datetime"; import { DateRangeInput3 } from "@blueprintjs/datetime2"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; import { type CommonDateFnsLocale, DateFnsLocaleSelect } from "../../common/dateFnsLocaleSelect"; import { FormattedDateRange } from "../../common/formattedDateRange"; diff --git a/packages/docs-app/src/examples/datetime2-examples/dateRangePicker3Example.tsx b/packages/docs-app/src/examples/datetime2-examples/dateRangePicker3Example.tsx index 11bfe010a9..fd73e99900 100644 --- a/packages/docs-app/src/examples/datetime2-examples/dateRangePicker3Example.tsx +++ b/packages/docs-app/src/examples/datetime2-examples/dateRangePicker3Example.tsx @@ -19,9 +19,9 @@ import * as React from "react"; import { Classes, FormGroup, Switch } from "@blueprintjs/core"; import type { DateRange, TimePrecision } from "@blueprintjs/datetime"; import { DateRangePicker3 } from "@blueprintjs/datetime2"; -import { Example, ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange, handleValueChange } from "@blueprintjs/docs-theme"; -import { CommonDateFnsLocale, DateFnsLocaleSelect } from "../../common/dateFnsLocaleSelect"; +import { type CommonDateFnsLocale, DateFnsLocaleSelect } from "../../common/dateFnsLocaleSelect"; import { FormattedDateRange } from "../../common/formattedDateRange"; import { PropCodeTooltip } from "../../common/propCodeTooltip"; import { PrecisionSelect } from "../datetime-examples/common/precisionSelect"; diff --git a/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx b/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx index 6ae3d068bf..16315f467e 100644 --- a/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx +++ b/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx @@ -16,14 +16,14 @@ import * as React from "react"; -import { Code, H5, Intent, MenuItem, Popover, Switch, TagProps } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; -import { ItemRenderer, MultiSelect } from "@blueprintjs/select"; +import { Code, H5, Intent, MenuItem, type Popover, Switch, type TagProps } from "@blueprintjs/core"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; +import { type ItemRenderer, MultiSelect } from "@blueprintjs/select"; import { areFilmsEqual, arrayContainsFilm, createFilms, - Film, + type Film, filterFilm, getFilmItemProps, maybeAddCreatedFilmToArrays, diff --git a/packages/docs-app/src/examples/select-examples/omnibarExample.tsx b/packages/docs-app/src/examples/select-examples/omnibarExample.tsx index f116a72fd3..1ff929ac76 100644 --- a/packages/docs-app/src/examples/select-examples/omnibarExample.tsx +++ b/packages/docs-app/src/examples/select-examples/omnibarExample.tsx @@ -23,14 +23,14 @@ import { OverlayToaster, Position, Switch, - Toaster, + type Toaster, } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { Omnibar } from "@blueprintjs/select"; import { areFilmsEqual, createFilm, - Film, + type Film, filterFilm, renderCreateFilmMenuItem, renderFilm, diff --git a/packages/docs-app/src/examples/select-examples/selectExample.tsx b/packages/docs-app/src/examples/select-examples/selectExample.tsx index 12fe3112a4..18759c67f5 100644 --- a/packages/docs-app/src/examples/select-examples/selectExample.tsx +++ b/packages/docs-app/src/examples/select-examples/selectExample.tsx @@ -17,9 +17,9 @@ import * as React from "react"; import { H5, Menu, MenuDivider, MenuItem, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import type { ItemListRendererProps } from "@blueprintjs/select"; -import { Film, FilmSelect, filterFilm, TOP_100_FILMS } from "@blueprintjs/select/examples"; +import { type Film, FilmSelect, filterFilm, TOP_100_FILMS } from "@blueprintjs/select/examples"; export interface SelectExampleState { allowCreate: boolean; diff --git a/packages/docs-app/src/examples/select-examples/suggestExample.tsx b/packages/docs-app/src/examples/select-examples/suggestExample.tsx index 83be8e0fa5..835ae1411a 100644 --- a/packages/docs-app/src/examples/select-examples/suggestExample.tsx +++ b/packages/docs-app/src/examples/select-examples/suggestExample.tsx @@ -17,12 +17,12 @@ import * as React from "react"; import { H5, MenuItem, Switch } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; -import { ItemRenderer, Suggest } from "@blueprintjs/select"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; +import { type ItemRenderer, Suggest } from "@blueprintjs/select"; import { areFilmsEqual, createFilm, - Film, + type Film, filterFilm, getFilmItemProps, maybeAddCreatedFilmToArrays, diff --git a/packages/docs-app/src/examples/table-examples/cellLoadingExample.tsx b/packages/docs-app/src/examples/table-examples/cellLoadingExample.tsx index 07b11eeee7..6b2d60f970 100644 --- a/packages/docs-app/src/examples/table-examples/cellLoadingExample.tsx +++ b/packages/docs-app/src/examples/table-examples/cellLoadingExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; import { RadioGroup } from "@blueprintjs/core"; -import { Example, ExampleProps, handleStringChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleStringChange } from "@blueprintjs/docs-theme"; import { Cell, Column, ColumnHeaderCell, RowHeaderCell, Table2 } from "@blueprintjs/table"; interface BigSpaceRock { diff --git a/packages/docs-app/src/examples/table-examples/columnLoadingExample.tsx b/packages/docs-app/src/examples/table-examples/columnLoadingExample.tsx index 9e72b33882..c68a286d9d 100644 --- a/packages/docs-app/src/examples/table-examples/columnLoadingExample.tsx +++ b/packages/docs-app/src/examples/table-examples/columnLoadingExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { HTMLSelect, Label } from "@blueprintjs/core"; -import { Example, ExampleProps, handleNumberChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleNumberChange } from "@blueprintjs/docs-theme"; import { Cell, Column, ColumnLoadingOption, Table2 } from "@blueprintjs/table"; interface BigSpaceRock { diff --git a/packages/docs-app/src/examples/table-examples/tableDollarExample.tsx b/packages/docs-app/src/examples/table-examples/tableDollarExample.tsx index 26af64e392..9dd60f2ecb 100644 --- a/packages/docs-app/src/examples/table-examples/tableDollarExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableDollarExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Classes } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Cell, Column, ColumnHeaderCell, Table2 } from "@blueprintjs/table"; // this will obviously get outdated, it's valid only as of August 2021 diff --git a/packages/docs-app/src/examples/table-examples/tableEditableExample.tsx b/packages/docs-app/src/examples/table-examples/tableEditableExample.tsx index 44810f41c8..01b73c95d3 100644 --- a/packages/docs-app/src/examples/table-examples/tableEditableExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableEditableExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Intent } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Column, ColumnHeaderCell, EditableCell2, EditableName, Table2 } from "@blueprintjs/table"; export interface TableEditableExampleState { diff --git a/packages/docs-app/src/examples/table-examples/tableFormatsExample.tsx b/packages/docs-app/src/examples/table-examples/tableFormatsExample.tsx index 63d43e9403..a5ecc72392 100644 --- a/packages/docs-app/src/examples/table-examples/tableFormatsExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableFormatsExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Cell, Column, JSONFormat, Table2, TruncatedFormat } from "@blueprintjs/table"; interface Timezone { diff --git a/packages/docs-app/src/examples/table-examples/tableFreezingExample.tsx b/packages/docs-app/src/examples/table-examples/tableFreezingExample.tsx index 073df27679..cf555219da 100644 --- a/packages/docs-app/src/examples/table-examples/tableFreezingExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableFreezingExample.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Cell, Column, Table2, Utils } from "@blueprintjs/table"; export interface TableFreezingExampleState { diff --git a/packages/docs-app/src/examples/table-examples/tableLoadingExample.tsx b/packages/docs-app/src/examples/table-examples/tableLoadingExample.tsx index 978409d90e..077fb8afc4 100644 --- a/packages/docs-app/src/examples/table-examples/tableLoadingExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableLoadingExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { Cell, Column, Table2, TableLoadingOption } from "@blueprintjs/table"; interface BigSpaceRock { diff --git a/packages/docs-app/src/examples/table-examples/tableReorderableExample.tsx b/packages/docs-app/src/examples/table-examples/tableReorderableExample.tsx index 9063a645a3..f85ed9ce49 100644 --- a/packages/docs-app/src/examples/table-examples/tableReorderableExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableReorderableExample.tsx @@ -17,7 +17,7 @@ import * as React from "react"; import { Switch } from "@blueprintjs/core"; -import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; import { Cell, Column, Table2, Utils } from "@blueprintjs/table"; export interface TableReorderableExampleState { diff --git a/packages/docs-app/src/examples/table-examples/tableSortableExample.tsx b/packages/docs-app/src/examples/table-examples/tableSortableExample.tsx index 8c64326848..87e3e7b6ee 100644 --- a/packages/docs-app/src/examples/table-examples/tableSortableExample.tsx +++ b/packages/docs-app/src/examples/table-examples/tableSortableExample.tsx @@ -19,13 +19,13 @@ import * as React from "react"; import { Menu, MenuItem } from "@blueprintjs/core"; -import { Example, ExampleProps } from "@blueprintjs/docs-theme"; +import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Cell, Column, ColumnHeaderCell, CopyCellsMenuItem, - MenuContext, + type MenuContext, SelectionModes, Table2, Utils, diff --git a/packages/docs-theme/src/common/documentalistUtils.ts b/packages/docs-theme/src/common/documentalistUtils.ts index af98aa67be..8dd5d00831 100644 --- a/packages/docs-theme/src/common/documentalistUtils.ts +++ b/packages/docs-theme/src/common/documentalistUtils.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { IHeadingNode, IPageNode, isPageNode } from "@documentalist/client"; +import { type IHeadingNode, type IPageNode, isPageNode } from "@documentalist/client"; /** * Performs an in-order traversal of the layout tree, invoking the callback for each node. diff --git a/packages/docs-theme/src/components/banner.tsx b/packages/docs-theme/src/components/banner.tsx index 3bb2dfe3e1..be7d1c3cab 100644 --- a/packages/docs-theme/src/components/banner.tsx +++ b/packages/docs-theme/src/components/banner.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes, Intent, Props } from "@blueprintjs/core"; +import { Classes, Intent, type Props } from "@blueprintjs/core"; export interface BannerProps extends Props { children?: React.ReactNode; diff --git a/packages/docs-theme/src/components/documentation.tsx b/packages/docs-theme/src/components/documentation.tsx index 70db5da629..ab1c5fcf02 100644 --- a/packages/docs-theme/src/components/documentation.tsx +++ b/packages/docs-theme/src/components/documentation.tsx @@ -14,16 +14,28 @@ * limitations under the License. */ -import { IHeadingNode, IPageData, IPageNode, isPageNode, ITsDocBase, linkify } from "@documentalist/client"; +import { + type IHeadingNode, + type IPageData, + type IPageNode, + isPageNode, + type ITsDocBase, + linkify, +} from "@documentalist/client"; import classNames from "classnames"; import * as React from "react"; -import { Classes, Drawer, FocusStyleManager, HotkeysTarget2, Props } from "@blueprintjs/core"; +import { Classes, Drawer, FocusStyleManager, HotkeysTarget2, type Props } from "@blueprintjs/core"; import { Search } from "@blueprintjs/icons"; -import { DocsData, DocumentationContext, DocumentationContextApi, hasTypescriptData } from "../common/context"; +import { + type DocsData, + DocumentationContext, + type DocumentationContextApi, + hasTypescriptData, +} from "../common/context"; import { eachLayoutNode } from "../common/documentalistUtils"; -import { TagRendererMap, TypescriptExample } from "../tags"; +import { type TagRendererMap, TypescriptExample } from "../tags"; import { renderBlock } from "./block"; import { NavButton } from "./navButton"; import { Navigator } from "./navigator"; diff --git a/packages/docs-theme/src/components/navMenu.tsx b/packages/docs-theme/src/components/navMenu.tsx index afee293879..d4831994d6 100644 --- a/packages/docs-theme/src/components/navMenu.tsx +++ b/packages/docs-theme/src/components/navMenu.tsx @@ -14,14 +14,14 @@ * limitations under the License. */ -import { IHeadingNode, IPageNode, isPageNode } from "@documentalist/client"; +import { type IHeadingNode, type IPageNode, isPageNode } from "@documentalist/client"; import classNames from "classnames"; import * as React from "react"; -import { Classes, Props } from "@blueprintjs/core"; +import { Classes, type Props } from "@blueprintjs/core"; import { COMPONENT_DISPLAY_NAMESPACE } from "../common"; -import { NavMenuItem, NavMenuItemProps } from "./navMenuItem"; +import { NavMenuItem, type NavMenuItemProps } from "./navMenuItem"; export interface NavMenuProps extends Props { activePageId: string; diff --git a/packages/docs-theme/src/components/navigator.tsx b/packages/docs-theme/src/components/navigator.tsx index 6ce6242c20..128a00ae76 100644 --- a/packages/docs-theme/src/components/navigator.tsx +++ b/packages/docs-theme/src/components/navigator.tsx @@ -20,7 +20,7 @@ import * as React from "react"; import { Classes, MenuItem } from "@blueprintjs/core"; import { CaretRight } from "@blueprintjs/icons"; -import { ItemListPredicate, ItemRenderer, Omnibar } from "@blueprintjs/select"; +import { type ItemListPredicate, type ItemRenderer, Omnibar } from "@blueprintjs/select"; import { eachLayoutNode } from "../common/documentalistUtils"; diff --git a/packages/docs-theme/src/components/typescript/apiHeader.tsx b/packages/docs-theme/src/components/typescript/apiHeader.tsx index e43c4fc8a0..f4e6398526 100644 --- a/packages/docs-theme/src/components/typescript/apiHeader.tsx +++ b/packages/docs-theme/src/components/typescript/apiHeader.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { isTsClass, isTsInterface, ITsDocBase } from "@documentalist/client"; +import { isTsClass, isTsInterface, type ITsDocBase } from "@documentalist/client"; import * as React from "react"; import { COMPONENT_DISPLAY_NAMESPACE } from "../../common"; diff --git a/packages/docs-theme/src/components/typescript/interfaceTable.tsx b/packages/docs-theme/src/components/typescript/interfaceTable.tsx index 79a36aeda2..16d47b4b35 100644 --- a/packages/docs-theme/src/components/typescript/interfaceTable.tsx +++ b/packages/docs-theme/src/components/typescript/interfaceTable.tsx @@ -17,16 +17,16 @@ import { isTag, isTsProperty, - ITsClass, - ITsInterface, - ITsMethod, - ITsProperty, - ITsSignature, + type ITsClass, + type ITsInterface, + type ITsMethod, + type ITsProperty, + type ITsSignature, } from "@documentalist/client"; import classNames from "classnames"; import * as React from "react"; -import { Classes, Intent, Props, Tag } from "@blueprintjs/core"; +import { Classes, Intent, type Props, Tag } from "@blueprintjs/core"; import { COMPONENT_DISPLAY_NAMESPACE } from "../../common"; import { DocumentationContext } from "../../common/context"; diff --git a/packages/docs-theme/src/components/typescript/methodTable.tsx b/packages/docs-theme/src/components/typescript/methodTable.tsx index d76f7f110b..766eaaac78 100644 --- a/packages/docs-theme/src/components/typescript/methodTable.tsx +++ b/packages/docs-theme/src/components/typescript/methodTable.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ -import { isTag, ITsMethod, ITsParameter, ITsSignature } from "@documentalist/client"; +import { isTag, type ITsMethod, type ITsParameter, type ITsSignature } from "@documentalist/client"; import classNames from "classnames"; import * as React from "react"; -import { Code, Intent, Props, Tag } from "@blueprintjs/core"; +import { Code, Intent, type Props, Tag } from "@blueprintjs/core"; import { COMPONENT_DISPLAY_NAMESPACE } from "../../common"; import { DocumentationContext } from "../../common/context"; diff --git a/packages/docs-theme/src/tags/method.tsx b/packages/docs-theme/src/tags/method.tsx index 325017abbb..4693c4726c 100644 --- a/packages/docs-theme/src/tags/method.tsx +++ b/packages/docs-theme/src/tags/method.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { isTsClass, isTsMethod, ITag, ITsClass, ITypescriptPluginData } from "@documentalist/client"; +import { isTsClass, isTsMethod, type ITag, type ITsClass, type ITypescriptPluginData } from "@documentalist/client"; import * as React from "react"; import type { Props } from "@blueprintjs/core"; diff --git a/packages/docs-theme/src/tags/typescript.tsx b/packages/docs-theme/src/tags/typescript.tsx index c43cb41c82..b9917696de 100644 --- a/packages/docs-theme/src/tags/typescript.tsx +++ b/packages/docs-theme/src/tags/typescript.tsx @@ -14,7 +14,14 @@ * limitations under the License. */ -import { isTsClass, isTsEnum, isTsInterface, isTsTypeAlias, ITag, ITypescriptPluginData } from "@documentalist/client"; +import { + isTsClass, + isTsEnum, + isTsInterface, + isTsTypeAlias, + type ITag, + type ITypescriptPluginData, +} from "@documentalist/client"; import * as React from "react"; import type { Props } from "@blueprintjs/core"; diff --git a/packages/eslint-config/typescript-eslint-rules.json b/packages/eslint-config/typescript-eslint-rules.json index 67c5eeedf4..712da3a553 100644 --- a/packages/eslint-config/typescript-eslint-rules.json +++ b/packages/eslint-config/typescript-eslint-rules.json @@ -8,6 +8,19 @@ ], "@typescript-eslint/ban-types": "error", "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-exports": [ + "error", + { + "fixMixedExportsWithInlineTypeSpecifier": true + } + ], + "@typescript-eslint/consistent-type-imports": [ + "error", + { + "prefer": "type-imports", + "fixStyle": "inline-type-imports" + } + ], "@typescript-eslint/dot-notation": "error", "@typescript-eslint/explicit-member-accessibility": [ "error", diff --git a/packages/eslint-plugin/src/rules/classes-constants.ts b/packages/eslint-plugin/src/rules/classes-constants.ts index 1e342d9edc..461d450cf7 100644 --- a/packages/eslint-plugin/src/rules/classes-constants.ts +++ b/packages/eslint-plugin/src/rules/classes-constants.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_NODE_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES, type TSESLint, type TSESTree } from "@typescript-eslint/utils"; import { addImportToFile } from "./utils/addImportToFile"; import { createRule } from "./utils/createRule"; diff --git a/packages/eslint-plugin/src/rules/html-components.ts b/packages/eslint-plugin/src/rules/html-components.ts index 0ac38db670..7c95bd2088 100644 --- a/packages/eslint-plugin/src/rules/html-components.ts +++ b/packages/eslint-plugin/src/rules/html-components.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_NODE_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES, type TSESLint, type TSESTree } from "@typescript-eslint/utils"; import { addImportToFile } from "./utils/addImportToFile"; import { createRule } from "./utils/createRule"; diff --git a/packages/eslint-plugin/src/rules/icon-components.ts b/packages/eslint-plugin/src/rules/icon-components.ts index d3e69b591f..9aa56e6cbb 100644 --- a/packages/eslint-plugin/src/rules/icon-components.ts +++ b/packages/eslint-plugin/src/rules/icon-components.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_NODE_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES, type TSESLint, type TSESTree } from "@typescript-eslint/utils"; import { createRule } from "./utils/createRule"; diff --git a/packages/eslint-plugin/src/rules/no-deprecated-components/createNoDeprecatedComponentsRule.ts b/packages/eslint-plugin/src/rules/no-deprecated-components/createNoDeprecatedComponentsRule.ts index 650d683333..4dd7bb2d32 100644 --- a/packages/eslint-plugin/src/rules/no-deprecated-components/createNoDeprecatedComponentsRule.ts +++ b/packages/eslint-plugin/src/rules/no-deprecated-components/createNoDeprecatedComponentsRule.ts @@ -4,7 +4,7 @@ // tslint:disable object-literal-sort-keys -import { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESLint, TSESTree } from "@typescript-eslint/utils"; import { createRule } from "../utils/createRule"; diff --git a/packages/eslint-plugin/src/rules/utils/addImportToFile.ts b/packages/eslint-plugin/src/rules/utils/addImportToFile.ts index 48e313944c..47807fb329 100644 --- a/packages/eslint-plugin/src/rules/utils/addImportToFile.ts +++ b/packages/eslint-plugin/src/rules/utils/addImportToFile.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_NODE_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES, type TSESLint, type TSESTree } from "@typescript-eslint/utils"; /** * Return a function which when provided with a fixer will produce a RuleFix to add the diff --git a/packages/eslint-plugin/src/rules/utils/getAllIdentifiersInFile.ts b/packages/eslint-plugin/src/rules/utils/getAllIdentifiersInFile.ts index c58f5abb60..714ccffacd 100644 --- a/packages/eslint-plugin/src/rules/utils/getAllIdentifiersInFile.ts +++ b/packages/eslint-plugin/src/rules/utils/getAllIdentifiersInFile.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_TOKEN_TYPES, TSESLint } from "@typescript-eslint/utils"; +import { AST_TOKEN_TYPES, type TSESLint } from "@typescript-eslint/utils"; /** * Gets all identifier tokens in a source file. diff --git a/packages/eslint-plugin/src/rules/utils/getProgram.ts b/packages/eslint-plugin/src/rules/utils/getProgram.ts index fbb798f3d9..3f860529d5 100644 --- a/packages/eslint-plugin/src/rules/utils/getProgram.ts +++ b/packages/eslint-plugin/src/rules/utils/getProgram.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES, type TSESTree } from "@typescript-eslint/utils"; /** * Return the top level node that is the greatest parent of the current node, if it is a Program. diff --git a/packages/eslint-plugin/src/rules/utils/replaceImportInFile.ts b/packages/eslint-plugin/src/rules/utils/replaceImportInFile.ts index 98c1dcd290..7a765b38b2 100644 --- a/packages/eslint-plugin/src/rules/utils/replaceImportInFile.ts +++ b/packages/eslint-plugin/src/rules/utils/replaceImportInFile.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { AST_NODE_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES, type TSESLint, type TSESTree } from "@typescript-eslint/utils"; /** * Return a function which, when provided with a fixer, will produce a RuleFix to replace the diff --git a/packages/icons/src/allPaths.ts b/packages/icons/src/allPaths.ts index 145a337425..347ec49b77 100644 --- a/packages/icons/src/allPaths.ts +++ b/packages/icons/src/allPaths.ts @@ -19,7 +19,7 @@ import { pascalCase } from "change-case"; import * as IconSvgPaths16 from "./generated/16px/paths"; import * as IconSvgPaths20 from "./generated/20px/paths"; import type { IconName } from "./iconNames"; -import { IconPaths, IconSize } from "./iconTypes"; +import { type IconPaths, IconSize } from "./iconTypes"; import type { PascalCase } from "./type-utils"; export { IconSvgPaths16, IconSvgPaths20 }; diff --git a/packages/icons/src/iconNames.ts b/packages/icons/src/iconNames.ts index b7c7c9c839..22d46a8e0b 100644 --- a/packages/icons/src/iconNames.ts +++ b/packages/icons/src/iconNames.ts @@ -19,7 +19,7 @@ import { pascalCase, snakeCase } from "change-case"; // The two icon sets are identical aside from SVG paths, so we only need to import info for the 16px set -import { BlueprintIcons_16, BlueprintIcons_16Id as IconName } from "./generated/16px/blueprint-icons-16"; +import { BlueprintIcons_16, type BlueprintIcons_16Id as IconName } from "./generated/16px/blueprint-icons-16"; import type { PascalCase, ScreamingSnakeCase } from "./type-utils"; export type { IconName }; diff --git a/packages/icons/src/index.ts b/packages/icons/src/index.ts index d3ac8e756a..66042ef04b 100644 --- a/packages/icons/src/index.ts +++ b/packages/icons/src/index.ts @@ -17,9 +17,9 @@ // N.B. these named imports will trigger bundlers to statically loads all icon path modules export { IconSvgPaths16, IconSvgPaths20, getIconPaths } from "./allPaths"; -export { Icons, IconLoaderOptions, IconPathsLoader } from "./iconLoader"; -export { DefaultSVGIconAttributes, DefaultSVGIconProps, SVGIconAttributes, SVGIconProps } from "./svgIconProps"; -export { SVGIconContainer, SVGIconContainerComponent, SVGIconContainerProps } from "./svgIconContainer"; +export { Icons, type IconLoaderOptions, type IconPathsLoader } from "./iconLoader"; +export type { DefaultSVGIconAttributes, DefaultSVGIconProps, SVGIconAttributes, SVGIconProps } from "./svgIconProps"; +export { SVGIconContainer, type SVGIconContainerComponent, type SVGIconContainerProps } from "./svgIconContainer"; export { getIconContentString, IconCodepoints } from "./iconCodepoints"; -export { IconName, IconNames } from "./iconNames"; -export { IconSize, IconPaths } from "./iconTypes"; +export { type IconName, IconNames } from "./iconNames"; +export { IconSize, type IconPaths } from "./iconTypes"; diff --git a/packages/icons/src/paths-loaders/splitPathsBySizeLoader.ts b/packages/icons/src/paths-loaders/splitPathsBySizeLoader.ts index d8f156aa9b..c316bbf4d8 100644 --- a/packages/icons/src/paths-loaders/splitPathsBySizeLoader.ts +++ b/packages/icons/src/paths-loaders/splitPathsBySizeLoader.ts @@ -18,7 +18,7 @@ import { pascalCase } from "change-case"; import type { IconPathsLoader } from "../iconLoader"; import type { IconName } from "../iconNames"; -import { IconPaths, IconSize } from "../iconTypes"; +import { type IconPaths, IconSize } from "../iconTypes"; import type { PascalCase } from "../type-utils"; /** diff --git a/packages/popover2/src/index.ts b/packages/popover2/src/index.ts index 4368f0567c..baa96d0bd2 100644 --- a/packages/popover2/src/index.ts +++ b/packages/popover2/src/index.ts @@ -18,24 +18,24 @@ export { /** @deprecated import from `@blueprintjs/core` instead */ - BreadcrumbProps, + type BreadcrumbProps, /** @deprecated import from `@blueprintjs/core` instead */ Breadcrumbs as Breadcrumbs2, /** @deprecated import from `@blueprintjs/core` instead */ - BreadcrumbsProps as Breadcrumbs2Props, + type BreadcrumbsProps as Breadcrumbs2Props, /** @deprecated import from `@blueprintjs/core` instead */ ContextMenu as ContextMenu2, /** @deprecated import from `@blueprintjs/core` instead */ - ContextMenuChildrenProps as ContextMenu2ChildrenProps, + type ContextMenuChildrenProps as ContextMenu2ChildrenProps, /** @deprecated import from `@blueprintjs/core` instead */ - ContextMenuContentProps as ContextMenu2ContentProps, + type ContextMenuContentProps as ContextMenu2ContentProps, /** @deprecated import from `@blueprintjs/core` instead */ ContextMenuPopover as ContextMenu2Popover, /** @deprecated import from `@blueprintjs/core` instead */ - ContextMenuPopoverProps as ContextMenu2PopoverProps, + type ContextMenuPopoverProps as ContextMenu2PopoverProps, /** @deprecated import from `@blueprintjs/core` instead */ - ContextMenuProps as ContextMenu2Props, + type ContextMenuProps as ContextMenu2Props, /** @deprecated import from `@blueprintjs/core` instead */ hideContextMenu, /** @deprecated import from `@blueprintjs/core` instead */ @@ -44,50 +44,50 @@ export { /** @deprecated import from `@blueprintjs/core` instead */ MenuItem as MenuItem2, /** @deprecated import from `@blueprintjs/core` instead */ - MenuItemProps as MenuItem2Props, + type MenuItemProps as MenuItem2Props, /** @deprecated import from `@blueprintjs/core` instead */ - DefaultPopoverTargetHTMLProps as DefaultPopover2TargetHTMLProps, + type DefaultPopoverTargetHTMLProps as DefaultPopover2TargetHTMLProps, /** @deprecated import from `@blueprintjs/core` instead */ - Placement, + type Placement, /** @deprecated import from `@blueprintjs/core` instead */ - PopoverClickTargetHandlers as Popover2ClickTargetHandlers, + type PopoverClickTargetHandlers as Popover2ClickTargetHandlers, /** @deprecated import from `@blueprintjs/core` instead */ - PopoverHoverTargetHandlers as Popover2HoverTargetHandlers, + type PopoverHoverTargetHandlers as Popover2HoverTargetHandlers, /** @deprecated import from `@blueprintjs/core` instead */ PopoverInteractionKind as Popover2InteractionKind, /** @deprecated import from `@blueprintjs/core` instead */ - PopoverSharedProps as Popover2SharedProps, + type PopoverSharedProps as Popover2SharedProps, /** @deprecated import from `@blueprintjs/core` instead */ - PopoverTargetProps as Popover2TargetProps, + type PopoverTargetProps as Popover2TargetProps, /** @deprecated import from `@blueprintjs/core` instead */ - PopperBoundary, + type PopperBoundary, /** * N.B. this misspelling was present in @blueprintjs/popover2 v4, we'll keep it around for now since it will * be getting migrated to the correct spelling in @blueprintjs/core v5 anyway. * * @deprecated import from `@blueprintjs/core` instead (with corrected spelling) */ - PopperCustomModifier as PopperCustomModifer, + type PopperCustomModifier as PopperCustomModifer, /** @deprecated import from `@blueprintjs/core` instead */ - PopperModifierOverrides, + type PopperModifierOverrides, /** @deprecated import from `@blueprintjs/core` instead */ PopperPlacements as PlacementOptions, /** @deprecated import from `@blueprintjs/core` instead */ PopupKind, /** @deprecated import from `@blueprintjs/core` instead */ - StrictModifierNames, + type StrictModifierNames, /** @deprecated import from `@blueprintjs/core` instead */ ResizeSensor as ResizeSensor2, /** @deprecated import from `@blueprintjs/core` instead */ - ResizeSensorProps as ResizeSensor2Props, + type ResizeSensorProps as ResizeSensor2Props, /** @deprecated import from `@blueprintjs/core` instead */ Tooltip as Tooltip2, /** @deprecated import from `@blueprintjs/core` instead */ - TooltipProps as Tooltip2Props, + type TooltipProps as Tooltip2Props, } from "@blueprintjs/core"; export { Classes } from "./classes"; -export { Popover2, Popover2Props } from "./popover2"; +export { Popover2, type Popover2Props } from "./popover2"; diff --git a/packages/popover2/src/popover2.tsx b/packages/popover2/src/popover2.tsx index 01a4a7d2ab..fa82e25627 100644 --- a/packages/popover2/src/popover2.tsx +++ b/packages/popover2/src/popover2.tsx @@ -19,7 +19,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes, DefaultPopoverTargetHTMLProps, mergeRefs, Popover, PopoverProps } from "@blueprintjs/core"; +import { Classes, type DefaultPopoverTargetHTMLProps, mergeRefs, Popover, type PopoverProps } from "@blueprintjs/core"; // Legacy classes from @blueprintjs/popover2 v1.x. Note that these are distinct from the `Classes` aliases in // "./classes.ts" - those strings will continue to work with Popover in Blueprint v5.x, while these values are diff --git a/packages/select/src/__examples__/filmSelect.tsx b/packages/select/src/__examples__/filmSelect.tsx index 6c5cc9ddcc..aa1965d214 100644 --- a/packages/select/src/__examples__/filmSelect.tsx +++ b/packages/select/src/__examples__/filmSelect.tsx @@ -19,11 +19,11 @@ import * as React from "react"; import { Button, MenuItem } from "@blueprintjs/core"; import type { ItemRenderer } from "../common"; -import { Select, SelectProps } from "../components/select/select"; +import { Select, type SelectProps } from "../components/select/select"; import { areFilmsEqual, createFilm, - Film, + type Film, filterFilm, getFilmItemProps, maybeAddCreatedFilmToArrays, diff --git a/packages/select/src/__examples__/films.tsx b/packages/select/src/__examples__/films.tsx index 2898d94ad0..b843ef2b3d 100644 --- a/packages/select/src/__examples__/films.tsx +++ b/packages/select/src/__examples__/films.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { MenuItem, MenuItemProps } from "@blueprintjs/core"; +import { MenuItem, type MenuItemProps } from "@blueprintjs/core"; import type { ItemPredicate, ItemRenderer, ItemRendererProps } from "../common"; diff --git a/packages/select/src/common/listItemsProps.ts b/packages/select/src/common/listItemsProps.ts index ccfa7986ee..01422246ce 100644 --- a/packages/select/src/common/listItemsProps.ts +++ b/packages/select/src/common/listItemsProps.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Props, Utils } from "@blueprintjs/core"; +import { type Props, Utils } from "@blueprintjs/core"; import type { ItemListRenderer } from "./itemListRenderer"; import type { ItemRenderer } from "./itemRenderer"; diff --git a/packages/select/src/components/deprecatedAliases.ts b/packages/select/src/components/deprecatedAliases.ts index 65289ac6c8..0a3d5a2e03 100644 --- a/packages/select/src/components/deprecatedAliases.ts +++ b/packages/select/src/components/deprecatedAliases.ts @@ -18,19 +18,19 @@ export { /** @deprecated import "v1" API instead */ MultiSelect as MultiSelect2, /** @deprecated import "v1" API instead */ - MultiSelectProps as MultiSelect2Props, + type MultiSelectProps as MultiSelect2Props, } from "./multi-select/multiSelect"; export { /** @deprecated import "v1" API instead */ Select as Select2, /** @deprecated import "v1" API instead */ - SelectProps as Select2Props, + type SelectProps as Select2Props, } from "./select/select"; export { /** @deprecated import "v1" API instead */ Suggest as Suggest2, /** @deprecated import "v1" API instead */ - SuggestProps as Suggest2Props, + type SuggestProps as Suggest2Props, } from "./suggest/suggest"; diff --git a/packages/select/src/components/index.ts b/packages/select/src/components/index.ts index fd154f477c..31dbad2c22 100644 --- a/packages/select/src/components/index.ts +++ b/packages/select/src/components/index.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -export { MultiSelect, MultiSelectProps } from "./multi-select/multiSelect"; -export { Omnibar, OmnibarProps } from "./omnibar/omnibar"; -export { QueryList, QueryListProps, QueryListRendererProps } from "./query-list/queryList"; -export { Select, SelectProps } from "./select/select"; -export { Suggest, SuggestProps } from "./suggest/suggest"; +export { MultiSelect, type MultiSelectProps } from "./multi-select/multiSelect"; +export { Omnibar, type OmnibarProps } from "./omnibar/omnibar"; +export { QueryList, type QueryListProps, type QueryListRendererProps } from "./query-list/queryList"; +export { Select, type SelectProps } from "./select/select"; +export { Suggest, type SuggestProps } from "./suggest/suggest"; diff --git a/packages/select/src/components/multi-select/multiSelect.tsx b/packages/select/src/components/multi-select/multiSelect.tsx index b76236cbb3..eaac8d72c4 100644 --- a/packages/select/src/components/multi-select/multiSelect.tsx +++ b/packages/select/src/components/multi-select/multiSelect.tsx @@ -23,20 +23,20 @@ import { DISPLAYNAME_PREFIX, mergeRefs, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, + type PopoverClickTargetHandlers, + type PopoverTargetProps, PopupKind, refHandler, setRef, TagInput, - TagInputAddMethod, - TagInputProps, + type TagInputAddMethod, + type TagInputProps, Utils, } from "@blueprintjs/core"; import { Cross } from "@blueprintjs/icons"; -import { Classes, ListItemsProps, SelectPopoverProps } from "../../common"; -import { QueryList, QueryListRendererProps } from "../query-list/queryList"; +import { Classes, type ListItemsProps, type SelectPopoverProps } from "../../common"; +import { QueryList, type QueryListRendererProps } from "../query-list/queryList"; export interface MultiSelectProps extends ListItemsProps, SelectPopoverProps { /** diff --git a/packages/select/src/components/omnibar/omnibar.tsx b/packages/select/src/components/omnibar/omnibar.tsx index c79a6c57e9..3fd0a7ff41 100644 --- a/packages/select/src/components/omnibar/omnibar.tsx +++ b/packages/select/src/components/omnibar/omnibar.tsx @@ -17,11 +17,11 @@ import classNames from "classnames"; import * as React from "react"; -import { DISPLAYNAME_PREFIX, InputGroup, InputGroupProps, Overlay, OverlayProps } from "@blueprintjs/core"; +import { DISPLAYNAME_PREFIX, InputGroup, type InputGroupProps, Overlay, type OverlayProps } from "@blueprintjs/core"; import { Search } from "@blueprintjs/icons"; -import { Classes, ListItemsProps } from "../../common"; -import { QueryList, QueryListRendererProps } from "../query-list/queryList"; +import { Classes, type ListItemsProps } from "../../common"; +import { QueryList, type QueryListRendererProps } from "../query-list/queryList"; export interface OmnibarProps extends ListItemsProps { /** diff --git a/packages/select/src/components/query-list/queryList.tsx b/packages/select/src/components/query-list/queryList.tsx index 4dfbaaffc0..d0fb6c0f1f 100644 --- a/packages/select/src/components/query-list/queryList.tsx +++ b/packages/select/src/components/query-list/queryList.tsx @@ -16,17 +16,17 @@ import * as React from "react"; -import { AbstractComponent, DISPLAYNAME_PREFIX, Menu, Props, Utils } from "@blueprintjs/core"; +import { AbstractComponent, DISPLAYNAME_PREFIX, Menu, type Props, Utils } from "@blueprintjs/core"; import { - CreateNewItem, + type CreateNewItem, executeItemsEqual, getActiveItem, getCreateNewItem, isCreateNewItem, - ItemListRendererProps, - ItemModifiers, - ListItemsProps, + type ItemListRendererProps, + type ItemModifiers, + type ListItemsProps, renderFilteredItems, } from "../../common"; diff --git a/packages/select/src/components/select/select.tsx b/packages/select/src/components/select/select.tsx index 31de831cb7..a39b4330b8 100644 --- a/packages/select/src/components/select/select.tsx +++ b/packages/select/src/components/select/select.tsx @@ -23,10 +23,10 @@ import { Classes as CoreClasses, DISPLAYNAME_PREFIX, InputGroup, - InputGroupProps, + type InputGroupProps, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, + type PopoverClickTargetHandlers, + type PopoverTargetProps, PopupKind, refHandler, setRef, @@ -34,8 +34,8 @@ import { } from "@blueprintjs/core"; import { Cross, Search } from "@blueprintjs/icons"; -import { Classes, ListItemsProps, SelectPopoverProps } from "../../common"; -import { QueryList, QueryListRendererProps } from "../query-list/queryList"; +import { Classes, type ListItemsProps, type SelectPopoverProps } from "../../common"; +import { QueryList, type QueryListRendererProps } from "../query-list/queryList"; export interface SelectProps extends ListItemsProps, SelectPopoverProps { /** diff --git a/packages/select/src/components/suggest/suggest.tsx b/packages/select/src/components/suggest/suggest.tsx index 99e6001086..5e013c9e9f 100644 --- a/packages/select/src/components/suggest/suggest.tsx +++ b/packages/select/src/components/suggest/suggest.tsx @@ -21,19 +21,19 @@ import { AbstractPureComponent, DISPLAYNAME_PREFIX, InputGroup, - InputGroupProps, + type InputGroupProps, mergeRefs, Popover, - PopoverClickTargetHandlers, - PopoverTargetProps, + type PopoverClickTargetHandlers, + type PopoverTargetProps, PopupKind, refHandler, setRef, Utils, } from "@blueprintjs/core"; -import { Classes, ListItemsProps, SelectPopoverProps } from "../../common"; -import { QueryList, QueryListRendererProps } from "../query-list/queryList"; +import { Classes, type ListItemsProps, type SelectPopoverProps } from "../../common"; +import { QueryList, type QueryListRendererProps } from "../query-list/queryList"; export interface SuggestProps extends ListItemsProps, Omit { /** diff --git a/packages/select/test/itemRendererTests.tsx b/packages/select/test/itemRendererTests.tsx index 5906b80b5a..115dadddc5 100644 --- a/packages/select/test/itemRendererTests.tsx +++ b/packages/select/test/itemRendererTests.tsx @@ -20,7 +20,7 @@ import * as React from "react"; import { Menu, MenuItem } from "@blueprintjs/core"; import type { ItemRenderer, ItemRendererProps } from "../src"; -import { Film, TOP_100_FILMS } from "../src/__examples__"; +import { type Film, TOP_100_FILMS } from "../src/__examples__"; describe("ItemRenderer", () => { // N.B. don't use `renderFilm` here from the src/__examples__ directory, since we are specifically trying to diff --git a/packages/select/test/multiSelectTests.tsx b/packages/select/test/multiSelectTests.tsx index 7670209e14..16d59c0043 100644 --- a/packages/select/test/multiSelectTests.tsx +++ b/packages/select/test/multiSelectTests.tsx @@ -22,8 +22,8 @@ import sinon from "sinon"; import { Classes as CoreClasses, Tag } from "@blueprintjs/core"; import { dispatchTestKeyboardEvent } from "@blueprintjs/test-commons"; -import { ItemRendererProps, MultiSelect, MultiSelectProps } from "../src"; -import { Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; +import { type ItemRendererProps, MultiSelect, type MultiSelectProps } from "../src"; +import { type Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; import type { MultiSelectState } from "../src/components/multi-select/multiSelect"; import { selectComponentSuite } from "./selectComponentSuite"; diff --git a/packages/select/test/queryListTests.tsx b/packages/select/test/queryListTests.tsx index 6c77a3ce34..87dccf112d 100644 --- a/packages/select/test/queryListTests.tsx +++ b/packages/select/test/queryListTests.tsx @@ -15,21 +15,21 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper, shallow } from "enzyme"; +import { mount, type ReactWrapper, shallow } from "enzyme"; import * as React from "react"; import sinon from "sinon"; import { Menu } from "@blueprintjs/core"; import { - ItemListPredicate, - ItemListRenderer, - ItemPredicate, + type ItemListPredicate, + type ItemListRenderer, + type ItemPredicate, QueryList, - QueryListProps, - QueryListRendererProps, + type QueryListProps, + type QueryListRendererProps, } from "../src"; -import { Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; +import { type Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; import type { QueryListState } from "../src/components/query-list/queryList"; type FilmQueryListWrapper = ReactWrapper, QueryListState>; diff --git a/packages/select/test/renderFilteredItemsTests.tsx b/packages/select/test/renderFilteredItemsTests.tsx index c93636294f..1a7704aedb 100644 --- a/packages/select/test/renderFilteredItemsTests.tsx +++ b/packages/select/test/renderFilteredItemsTests.tsx @@ -18,7 +18,7 @@ import { assert } from "chai"; import * as React from "react"; import sinon from "sinon"; -import { ItemListRendererProps, renderFilteredItems } from "../src"; +import { type ItemListRendererProps, renderFilteredItems } from "../src"; describe("renderFilteredItems()", () => { const PROPS: ItemListRendererProps = { diff --git a/packages/select/test/selectComponentSuite.tsx b/packages/select/test/selectComponentSuite.tsx index 19a2b78166..a34b51637d 100644 --- a/packages/select/test/selectComponentSuite.tsx +++ b/packages/select/test/selectComponentSuite.tsx @@ -19,14 +19,14 @@ import type { ReactWrapper } from "enzyme"; import * as React from "react"; import sinon from "sinon"; -import { Classes, HTMLInputProps } from "@blueprintjs/core"; +import { Classes, type HTMLInputProps } from "@blueprintjs/core"; import type { ListItemsProps } from "../src"; import { areFilmsEqual, createFilm, createFilms, - Film, + type Film, filterFilm, renderFilm, TOP_100_FILMS, diff --git a/packages/select/test/selectPopoverTestSuite.tsx b/packages/select/test/selectPopoverTestSuite.tsx index 105257548c..e3f772af1a 100644 --- a/packages/select/test/selectPopoverTestSuite.tsx +++ b/packages/select/test/selectPopoverTestSuite.tsx @@ -21,7 +21,7 @@ import * as sinon from "sinon"; import { Classes } from "@blueprintjs/core"; import type { ListItemsProps, SelectPopoverProps } from "../src"; -import { areFilmsEqual, Film, filterFilm, renderFilm, TOP_100_FILMS } from "../src/__examples__"; +import { areFilmsEqual, type Film, filterFilm, renderFilm, TOP_100_FILMS } from "../src/__examples__"; type EnzymeLocator = (wrapper: ReactWrapper) => ReactWrapper; diff --git a/packages/select/test/selectTests.tsx b/packages/select/test/selectTests.tsx index c0c94a7998..90134f9508 100644 --- a/packages/select/test/selectTests.tsx +++ b/packages/select/test/selectTests.tsx @@ -15,14 +15,14 @@ */ import { assert } from "chai"; -import { HTMLAttributes, mount, ReactWrapper } from "enzyme"; +import { type HTMLAttributes, mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as sinon from "sinon"; import { Button, Classes, InputGroup, MenuItem, Popover } from "@blueprintjs/core"; -import { ItemRendererProps, Select, SelectProps } from "../src"; -import { Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; +import { type ItemRendererProps, Select, type SelectProps } from "../src"; +import { type Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; import type { SelectState } from "../src/components/select/select"; import { selectComponentSuite } from "./selectComponentSuite"; import { selectPopoverTestSuite } from "./selectPopoverTestSuite"; diff --git a/packages/select/test/suggestTests.tsx b/packages/select/test/suggestTests.tsx index 100e14a4ba..615e5b5c1c 100644 --- a/packages/select/test/suggestTests.tsx +++ b/packages/select/test/suggestTests.tsx @@ -15,15 +15,15 @@ */ import { assert } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import * as sinon from "sinon"; -import { InputGroup, MenuItem, Popover, PopoverProps } from "@blueprintjs/core"; +import { InputGroup, MenuItem, Popover, type PopoverProps } from "@blueprintjs/core"; -import { ItemRendererProps, QueryList } from "../src"; -import { Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; -import { Suggest, SuggestProps, SuggestState } from "../src/components/suggest/suggest"; +import { type ItemRendererProps, QueryList } from "../src"; +import { type Film, renderFilm, TOP_100_FILMS } from "../src/__examples__"; +import { Suggest, type SuggestProps, type SuggestState } from "../src/components/suggest/suggest"; import { selectComponentSuite } from "./selectComponentSuite"; import { selectPopoverTestSuite } from "./selectPopoverTestSuite"; diff --git a/packages/stylelint-plugin/src/rules/no-color-literal.ts b/packages/stylelint-plugin/src/rules/no-color-literal.ts index 79c66586cc..8cb338922e 100644 --- a/packages/stylelint-plugin/src/rules/no-color-literal.ts +++ b/packages/stylelint-plugin/src/rules/no-color-literal.ts @@ -15,7 +15,7 @@ import type { Declaration, Root } from "postcss"; import valueParser from "postcss-value-parser"; -import stylelint, { PostcssResult, RuleContext } from "stylelint"; +import stylelint, { type PostcssResult, type RuleContext } from "stylelint"; import { Colors } from "@blueprintjs/colors"; diff --git a/packages/stylelint-plugin/src/utils/insertImport.ts b/packages/stylelint-plugin/src/utils/insertImport.ts index 063f3bd067..3b76a8ec80 100644 --- a/packages/stylelint-plugin/src/utils/insertImport.ts +++ b/packages/stylelint-plugin/src/utils/insertImport.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import postcss, { AtRule, Comment, Root } from "postcss"; +import postcss, { type AtRule, type Comment, type Root } from "postcss"; import type { RuleContext } from "stylelint"; import { CssSyntax } from "./cssSyntax"; diff --git a/packages/table-dev-app/src/features.tsx b/packages/table-dev-app/src/features.tsx index 8a5fc33ac4..1b872d2480 100644 --- a/packages/table-dev-app/src/features.tsx +++ b/packages/table-dev-app/src/features.tsx @@ -25,13 +25,13 @@ import { Cell, Column, ColumnHeaderCell, - ColumnHeaderCellProps, + type ColumnHeaderCellProps, CopyCellsMenuItem, EditableCell2, EditableName, JSONFormat, - MenuContext, - Region, + type MenuContext, + type Region, RegionCardinality, Regions, RowHeaderCell, diff --git a/packages/table-dev-app/src/mutableTable.tsx b/packages/table-dev-app/src/mutableTable.tsx index e360fd69ec..aa8fd1a86a 100644 --- a/packages/table-dev-app/src/mutableTable.tsx +++ b/packages/table-dev-app/src/mutableTable.tsx @@ -21,7 +21,7 @@ import * as React from "react"; import { Button, - ButtonProps, + type ButtonProps, Classes, Divider, FocusStyleManager, @@ -42,15 +42,15 @@ import { CopyCellsMenuItem, EditableCell2, EditableName, - FocusedCellCoordinates, + type FocusedCellCoordinates, JSONFormat, - MenuContext, - Region, + type MenuContext, + type Region, RegionCardinality, Regions, RenderMode, RowHeaderCell, - StyledRegionGroup, + type StyledRegionGroup, Table2, TableLoadingOption, TruncatedFormat, diff --git a/packages/table/src/cell/cell.tsx b/packages/table/src/cell/cell.tsx index 0ae6bd9e19..ff4d7bfa4d 100644 --- a/packages/table/src/cell/cell.tsx +++ b/packages/table/src/cell/cell.tsx @@ -16,7 +16,13 @@ import classNames from "classnames"; import * as React from "react"; -import { Classes as CoreClasses, Utils as CoreUtils, DISPLAYNAME_PREFIX, IntentProps, Props } from "@blueprintjs/core"; +import { + Classes as CoreClasses, + Utils as CoreUtils, + DISPLAYNAME_PREFIX, + type IntentProps, + type Props, +} from "@blueprintjs/core"; import * as Classes from "../common/classes"; import { LoadableContent } from "../common/loadableContent"; diff --git a/packages/table/src/cell/editableCell.tsx b/packages/table/src/cell/editableCell.tsx index ca253fc2b2..8604d870b8 100644 --- a/packages/table/src/cell/editableCell.tsx +++ b/packages/table/src/cell/editableCell.tsx @@ -20,7 +20,7 @@ import { Utils as CoreUtils, DISPLAYNAME_PREFIX, EditableText, - EditableTextProps, + type EditableTextProps, Hotkey, Hotkeys, HotkeysTarget, @@ -28,7 +28,7 @@ import { import * as Classes from "../common/classes"; import { Draggable } from "../interactions/draggable"; -import { Cell, CellProps } from "./cell"; +import { Cell, type CellProps } from "./cell"; export interface EditableCellProps extends CellProps { /** diff --git a/packages/table/src/cell/editableCell2.tsx b/packages/table/src/cell/editableCell2.tsx index f030569bfa..bfb83143ec 100644 --- a/packages/table/src/cell/editableCell2.tsx +++ b/packages/table/src/cell/editableCell2.tsx @@ -20,15 +20,15 @@ import { Utils as CoreUtils, DISPLAYNAME_PREFIX, EditableText, - EditableTextProps, - HotkeyConfig, + type EditableTextProps, + type HotkeyConfig, HotkeysTarget2, - UseHotkeysReturnValue, + type UseHotkeysReturnValue, } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import { Draggable } from "../interactions/draggable"; -import { Cell, CellProps } from "./cell"; +import { Cell, type CellProps } from "./cell"; export interface EditableCell2Props extends Omit { /** diff --git a/packages/table/src/cell/formats/jsonFormat.tsx b/packages/table/src/cell/formats/jsonFormat.tsx index ce5821dbef..c84e948b05 100644 --- a/packages/table/src/cell/formats/jsonFormat.tsx +++ b/packages/table/src/cell/formats/jsonFormat.tsx @@ -20,7 +20,7 @@ import * as React from "react"; import { DISPLAYNAME_PREFIX } from "@blueprintjs/core"; import * as Classes from "../../common/classes"; -import { TruncatedFormat, TruncatedFormatProps, TruncatedPopoverMode } from "./truncatedFormat"; +import { TruncatedFormat, type TruncatedFormatProps, TruncatedPopoverMode } from "./truncatedFormat"; export interface JSONFormatProps extends TruncatedFormatProps { children?: any; diff --git a/packages/table/src/cell/formats/truncatedFormat.tsx b/packages/table/src/cell/formats/truncatedFormat.tsx index 540dffc764..48e2e53de9 100644 --- a/packages/table/src/cell/formats/truncatedFormat.tsx +++ b/packages/table/src/cell/formats/truncatedFormat.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { DISPLAYNAME_PREFIX, Popover, Props } from "@blueprintjs/core"; +import { DISPLAYNAME_PREFIX, Popover, type Props } from "@blueprintjs/core"; import { More } from "@blueprintjs/icons"; import * as Classes from "../../common/classes"; diff --git a/packages/table/src/column.tsx b/packages/table/src/column.tsx index a4a4118272..677c428cb9 100644 --- a/packages/table/src/column.tsx +++ b/packages/table/src/column.tsx @@ -16,9 +16,9 @@ import * as React from "react"; -import { DISPLAYNAME_PREFIX, Props } from "@blueprintjs/core"; +import { DISPLAYNAME_PREFIX, type Props } from "@blueprintjs/core"; -import { CellRenderer, emptyCellRenderer } from "./cell/cell"; +import { type CellRenderer, emptyCellRenderer } from "./cell/cell"; import type { ColumnHeaderRenderer } from "./headers/columnHeader"; import type { ColumnNameProps } from "./headers/columnHeaderCell"; import type { ColumnLoadingOption } from "./regions"; diff --git a/packages/table/src/common/contextMenuTargetWrapper.tsx b/packages/table/src/common/contextMenuTargetWrapper.tsx index 65a62673a0..902e7aac26 100644 --- a/packages/table/src/common/contextMenuTargetWrapper.tsx +++ b/packages/table/src/common/contextMenuTargetWrapper.tsx @@ -23,7 +23,7 @@ import * as React from "react"; -import { ContextMenuTargetLegacy, Props } from "@blueprintjs/core"; +import { ContextMenuTargetLegacy, type Props } from "@blueprintjs/core"; export interface ContextMenuTargetWrapperProps extends Props { children?: React.ReactNode; diff --git a/packages/table/src/common/grid.ts b/packages/table/src/common/grid.ts index 98491037bf..59e590754a 100644 --- a/packages/table/src/common/grid.ts +++ b/packages/table/src/common/grid.ts @@ -16,7 +16,7 @@ import type { CSSProperties } from "react"; -import { Region, RegionCardinality, Regions } from "../regions"; +import { type Region, RegionCardinality, Regions } from "../regions"; import * as Classes from "./classes"; import { Rect } from "./rect"; import { Utils } from "./utils"; diff --git a/packages/table/src/common/internal/focusedCellUtils.ts b/packages/table/src/common/internal/focusedCellUtils.ts index 9986d87a8d..748361e002 100644 --- a/packages/table/src/common/internal/focusedCellUtils.ts +++ b/packages/table/src/common/internal/focusedCellUtils.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Region, RegionCardinality, Regions } from "../../regions"; +import { type Region, RegionCardinality, Regions } from "../../regions"; import type { CellCoordinates, FocusedCellCoordinates } from "../cellTypes"; import * as Errors from "../errors"; diff --git a/packages/table/src/common/internal/scrollUtils.ts b/packages/table/src/common/internal/scrollUtils.ts index cfd75219bc..125c411755 100644 --- a/packages/table/src/common/internal/scrollUtils.ts +++ b/packages/table/src/common/internal/scrollUtils.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Region, RegionCardinality, Regions } from "../../regions"; +import { type Region, RegionCardinality, Regions } from "../../regions"; /** * Returns the scroll{Left,Top} offsets of the provided region based on its diff --git a/packages/table/src/common/internal/selectionUtils.ts b/packages/table/src/common/internal/selectionUtils.ts index 707ee7ebe0..dc9220053e 100644 --- a/packages/table/src/common/internal/selectionUtils.ts +++ b/packages/table/src/common/internal/selectionUtils.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Region, RegionCardinality, Regions } from "../../regions"; +import { type Region, RegionCardinality, Regions } from "../../regions"; import type { FocusedCellCoordinates } from "../cellTypes"; import { Direction } from "../direction"; import * as DirectionUtils from "./directionUtils"; diff --git a/packages/table/src/headers/columnHeader.tsx b/packages/table/src/headers/columnHeader.tsx index f16e0196bb..54b9b05428 100644 --- a/packages/table/src/headers/columnHeader.tsx +++ b/packages/table/src/headers/columnHeader.tsx @@ -24,8 +24,8 @@ import type { ClientCoordinates } from "../interactions/dragTypes"; import type { IndexedResizeCallback } from "../interactions/resizable"; import { Orientation } from "../interactions/resizeHandle"; import { RegionCardinality, Regions } from "../regions"; -import { ColumnHeaderCell, ColumnHeaderCellProps } from "./columnHeaderCell"; -import { Header, HeaderProps } from "./header"; +import { ColumnHeaderCell, type ColumnHeaderCellProps } from "./columnHeaderCell"; +import { Header, type HeaderProps } from "./header"; export type ColumnHeaderRenderer = (columnIndex: number) => React.ReactElement | null; diff --git a/packages/table/src/headers/columnHeaderCell.tsx b/packages/table/src/headers/columnHeaderCell.tsx index 8fab2ff726..8c27e1c91f 100644 --- a/packages/table/src/headers/columnHeaderCell.tsx +++ b/packages/table/src/headers/columnHeaderCell.tsx @@ -21,17 +21,17 @@ import { Utils as CoreUtils, DISPLAYNAME_PREFIX, Icon, - IconName, - OverlayLifecycleProps, + type IconName, + type OverlayLifecycleProps, Popover, - PopoverProps, - Props, + type PopoverProps, + type Props, } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import { LoadableContent } from "../common/loadableContent"; import { CLASSNAME_EXCLUDED_FROM_TEXT_MEASUREMENT } from "../common/utils"; -import { HeaderCell, HeaderCellProps } from "./headerCell"; +import { HeaderCell, type HeaderCellProps } from "./headerCell"; import { HorizontalCellDivider } from "./horizontalCellDivider"; export interface ColumnNameProps { diff --git a/packages/table/src/headers/editableName.tsx b/packages/table/src/headers/editableName.tsx index df0fac88df..f7d6a6b529 100644 --- a/packages/table/src/headers/editableName.tsx +++ b/packages/table/src/headers/editableName.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { DISPLAYNAME_PREFIX, EditableText, IntentProps, Props } from "@blueprintjs/core"; +import { DISPLAYNAME_PREFIX, EditableText, type IntentProps, type Props } from "@blueprintjs/core"; import * as Classes from "../common/classes"; diff --git a/packages/table/src/headers/header.tsx b/packages/table/src/headers/header.tsx index 477354afcf..a74956d06e 100644 --- a/packages/table/src/headers/header.tsx +++ b/packages/table/src/headers/header.tsx @@ -26,12 +26,12 @@ import * as Classes from "../common/classes"; import { CLASSNAME_EXCLUDED_FROM_TEXT_MEASUREMENT } from "../common/utils"; import { DragEvents } from "../interactions/dragEvents"; import type { ClientCoordinates, CoordinateData } from "../interactions/dragTypes"; -import { DragReorderable, ReorderableProps } from "../interactions/reorderable"; +import { DragReorderable, type ReorderableProps } from "../interactions/reorderable"; import { Resizable } from "../interactions/resizable"; import type { LockableLayout, Orientation } from "../interactions/resizeHandle"; -import { DragSelectable, SelectableProps } from "../interactions/selectable"; +import { DragSelectable, type SelectableProps } from "../interactions/selectable"; import type { Locator } from "../locator"; -import { Region, RegionCardinality, Regions } from "../regions"; +import { type Region, RegionCardinality, Regions } from "../regions"; import type { HeaderCellProps } from "./headerCell"; export type HeaderCellRenderer = (index: number) => React.ReactElement; diff --git a/packages/table/src/headers/headerCell.tsx b/packages/table/src/headers/headerCell.tsx index 77b83c9a53..dc400035dd 100644 --- a/packages/table/src/headers/headerCell.tsx +++ b/packages/table/src/headers/headerCell.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { ContextMenu, Classes as CoreClasses, Utils as CoreUtils, Props } from "@blueprintjs/core"; +import { ContextMenu, Classes as CoreClasses, Utils as CoreUtils, type Props } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import type { ResizeHandle } from "../interactions/resizeHandle"; diff --git a/packages/table/src/headers/rowHeader.tsx b/packages/table/src/headers/rowHeader.tsx index ebd76051f2..dc380fa590 100644 --- a/packages/table/src/headers/rowHeader.tsx +++ b/packages/table/src/headers/rowHeader.tsx @@ -23,8 +23,8 @@ import type { ClientCoordinates } from "../interactions/dragTypes"; import type { IndexedResizeCallback } from "../interactions/resizable"; import { Orientation } from "../interactions/resizeHandle"; import { RegionCardinality, Regions } from "../regions"; -import { Header, HeaderProps } from "./header"; -import { RowHeaderCell, RowHeaderCellProps } from "./rowHeaderCell"; +import { Header, type HeaderProps } from "./header"; +import { RowHeaderCell, type RowHeaderCellProps } from "./rowHeaderCell"; export type RowHeaderRenderer = (rowIndex: number) => React.ReactElement; diff --git a/packages/table/src/headers/rowHeaderCell.tsx b/packages/table/src/headers/rowHeaderCell.tsx index 03c750d992..5c7b368c0b 100644 --- a/packages/table/src/headers/rowHeaderCell.tsx +++ b/packages/table/src/headers/rowHeaderCell.tsx @@ -16,11 +16,11 @@ import * as React from "react"; -import { AbstractPureComponent, Props } from "@blueprintjs/core"; +import { AbstractPureComponent, type Props } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import { LoadableContent } from "../common/loadableContent"; -import { HeaderCell, HeaderCellProps } from "./headerCell"; +import { HeaderCell, type HeaderCellProps } from "./headerCell"; export interface RowHeaderCellProps extends HeaderCellProps, Props { /** diff --git a/packages/table/src/interactions/draggable.tsx b/packages/table/src/interactions/draggable.tsx index aa380c444c..d7bc1d0897 100644 --- a/packages/table/src/interactions/draggable.tsx +++ b/packages/table/src/interactions/draggable.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Utils as CoreUtils, Props } from "@blueprintjs/core"; +import { Utils as CoreUtils, type Props } from "@blueprintjs/core"; import { DragEvents } from "./dragEvents"; import type { DraggableChildrenProps, DragHandler } from "./dragTypes"; diff --git a/packages/table/src/interactions/menus/copyCellsMenuItem.tsx b/packages/table/src/interactions/menus/copyCellsMenuItem.tsx index e6467e60b5..669df55e02 100644 --- a/packages/table/src/interactions/menus/copyCellsMenuItem.tsx +++ b/packages/table/src/interactions/menus/copyCellsMenuItem.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { MenuItem, MenuItemProps } from "@blueprintjs/core"; +import { MenuItem, type MenuItemProps } from "@blueprintjs/core"; import { Clipboard } from "../../common/clipboard"; import { TABLE_COPY_FAILED } from "../../common/errors"; diff --git a/packages/table/src/interactions/menus/menuContext.ts b/packages/table/src/interactions/menus/menuContext.ts index f3a7eb6dee..6fce8f8179 100644 --- a/packages/table/src/interactions/menus/menuContext.ts +++ b/packages/table/src/interactions/menus/menuContext.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { CellCoordinate, Region, Regions } from "../../regions"; +import { type CellCoordinate, type Region, Regions } from "../../regions"; export type ContextMenuRenderer = (context: MenuContext) => JSX.Element; diff --git a/packages/table/src/interactions/reorderable.tsx b/packages/table/src/interactions/reorderable.tsx index 92a8a5a799..aecb953b34 100644 --- a/packages/table/src/interactions/reorderable.tsx +++ b/packages/table/src/interactions/reorderable.tsx @@ -20,7 +20,7 @@ import { Utils as CoreUtils } from "@blueprintjs/core"; import type { FocusedCellCoordinates } from "../common/cellTypes"; import { Utils } from "../common/utils"; -import { Region, RegionCardinality, Regions } from "../regions"; +import { type Region, RegionCardinality, Regions } from "../regions"; import { Draggable } from "./draggable"; import type { CoordinateData, DraggableChildrenProps, DragHandler } from "./dragTypes"; diff --git a/packages/table/src/interactions/resizable.tsx b/packages/table/src/interactions/resizable.tsx index 538df735cf..0e0e9c60a8 100644 --- a/packages/table/src/interactions/resizable.tsx +++ b/packages/table/src/interactions/resizable.tsx @@ -16,10 +16,10 @@ import * as React from "react"; -import { AbstractPureComponent, Props } from "@blueprintjs/core"; +import { AbstractPureComponent, type Props } from "@blueprintjs/core"; import { Utils } from "../common/index"; -import { LockableLayout, Orientation, ResizeHandle } from "./resizeHandle"; +import { type LockableLayout, Orientation, ResizeHandle } from "./resizeHandle"; export type IndexedResizeCallback = (index: number, size: number) => void; diff --git a/packages/table/src/interactions/selectable.tsx b/packages/table/src/interactions/selectable.tsx index 69cec92b42..b5c2fcc0ee 100644 --- a/packages/table/src/interactions/selectable.tsx +++ b/packages/table/src/interactions/selectable.tsx @@ -22,7 +22,7 @@ import type { FocusedCellCoordinates } from "../common/cellTypes"; import * as DefaultFocusedCellUtils from "../common/internal/focusedCellUtils"; import * as PlatformUtils from "../common/internal/platformUtils"; import { Utils } from "../common/utils"; -import { Region, Regions } from "../regions"; +import { type Region, Regions } from "../regions"; import { DragEvents } from "./dragEvents"; import { Draggable } from "./draggable"; import type { CoordinateData, DraggableChildrenProps, DragHandler } from "./dragTypes"; diff --git a/packages/table/src/layers/guides.tsx b/packages/table/src/layers/guides.tsx index f6a7fe1565..8536e6cfd8 100644 --- a/packages/table/src/layers/guides.tsx +++ b/packages/table/src/layers/guides.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { Utils as CoreUtils, Props } from "@blueprintjs/core"; +import { Utils as CoreUtils, type Props } from "@blueprintjs/core"; import * as Classes from "../common/classes"; diff --git a/packages/table/src/layers/regions.tsx b/packages/table/src/layers/regions.tsx index 6e15ca002a..3b69b77da9 100644 --- a/packages/table/src/layers/regions.tsx +++ b/packages/table/src/layers/regions.tsx @@ -17,11 +17,11 @@ import classNames from "classnames"; import * as React from "react"; -import { Utils as CoreUtils, Props } from "@blueprintjs/core"; +import { Utils as CoreUtils, type Props } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import type { QuadrantType } from "../quadrants/tableQuadrant"; -import { Region, Regions } from "../regions"; +import { type Region, Regions } from "../regions"; export type RegionStyler = (region: Region, quadrantType?: QuadrantType) => React.CSSProperties; diff --git a/packages/table/src/quadrants/tableQuadrant.tsx b/packages/table/src/quadrants/tableQuadrant.tsx index da78e95317..32be004ae2 100644 --- a/packages/table/src/quadrants/tableQuadrant.tsx +++ b/packages/table/src/quadrants/tableQuadrant.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractComponent, Props } from "@blueprintjs/core"; +import { AbstractComponent, type Props } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import * as Errors from "../common/errors"; diff --git a/packages/table/src/quadrants/tableQuadrantStack.tsx b/packages/table/src/quadrants/tableQuadrantStack.tsx index a72b45ad59..0331ad4b1d 100644 --- a/packages/table/src/quadrants/tableQuadrantStack.tsx +++ b/packages/table/src/quadrants/tableQuadrantStack.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { AbstractComponent, Utils as CoreUtils, Props, setRef } from "@blueprintjs/core"; +import { AbstractComponent, Utils as CoreUtils, type Props, setRef } from "@blueprintjs/core"; import * as Classes from "../common/classes"; import { Grid } from "../common/grid"; diff --git a/packages/table/src/resizeRows.ts b/packages/table/src/resizeRows.ts index 20d2fa8acd..6e20b0be6f 100644 --- a/packages/table/src/resizeRows.ts +++ b/packages/table/src/resizeRows.ts @@ -17,7 +17,7 @@ import type { Rect } from "./common"; import type { CellMapper, Grid } from "./common/grid"; import { Utils } from "./common/utils"; -import { Locator, LocatorImpl } from "./locator"; +import { type Locator, LocatorImpl } from "./locator"; export interface ResizeRowsByApproximateHeightOptions { /** diff --git a/packages/table/src/table.tsx b/packages/table/src/table.tsx index c7c303dbc0..4ef9eacabc 100644 --- a/packages/table/src/table.tsx +++ b/packages/table/src/table.tsx @@ -35,29 +35,36 @@ import { } from "@blueprintjs/core"; import type { CellRenderer } from "./cell/cell"; -import { Column, ColumnProps } from "./column"; +import { Column, type ColumnProps } from "./column"; import type { FocusedCellCoordinates } from "./common/cellTypes"; import * as Classes from "./common/classes"; import * as Errors from "./common/errors"; -import { CellMapper, Grid } from "./common/grid"; +import { type CellMapper, Grid } from "./common/grid"; import * as FocusedCellUtils from "./common/internal/focusedCellUtils"; import * as ScrollUtils from "./common/internal/scrollUtils"; import { Rect } from "./common/rect"; import { RenderMode } from "./common/renderMode"; import { Utils } from "./common/utils"; import { ColumnHeader } from "./headers/columnHeader"; -import { ColumnHeaderCell, ColumnHeaderCellProps } from "./headers/columnHeaderCell"; +import { ColumnHeaderCell, type ColumnHeaderCellProps } from "./headers/columnHeaderCell"; import { renderDefaultRowHeader, RowHeader } from "./headers/rowHeader"; import { ResizeSensor } from "./interactions/resizeSensor"; import { GuideLayer } from "./layers/guides"; -import { RegionLayer, RegionStyler } from "./layers/regions"; -import { Locator, LocatorImpl } from "./locator"; +import { RegionLayer, type RegionStyler } from "./layers/regions"; +import { type Locator, LocatorImpl } from "./locator"; import { QuadrantType } from "./quadrants/tableQuadrant"; import { TableQuadrantStack } from "./quadrants/tableQuadrantStack"; -import { ColumnLoadingOption, Region, RegionCardinality, Regions, SelectionModes, TableLoadingOption } from "./regions"; +import { + ColumnLoadingOption, + type Region, + RegionCardinality, + Regions, + SelectionModes, + TableLoadingOption, +} from "./regions"; import { resizeRowsByApproximateHeight, - ResizeRowsByApproximateHeightOptions, + type ResizeRowsByApproximateHeightOptions, resizeRowsByTallestCell, } from "./resizeRows"; import { TableBody } from "./tableBody"; diff --git a/packages/table/src/table2.tsx b/packages/table/src/table2.tsx index 62c0095cd3..3a0e4fc4e9 100644 --- a/packages/table/src/table2.tsx +++ b/packages/table/src/table2.tsx @@ -21,17 +21,17 @@ import { AbstractComponent, Utils as CoreUtils, DISPLAYNAME_PREFIX, - HotkeyConfig, + type HotkeyConfig, HotkeysTarget2, - UseHotkeysReturnValue, + type UseHotkeysReturnValue, } from "@blueprintjs/core"; import type { CellRenderer } from "./cell/cell"; -import { Column, ColumnProps } from "./column"; +import { Column, type ColumnProps } from "./column"; import type { FocusedCellCoordinates } from "./common/cellTypes"; import * as Classes from "./common/classes"; import * as Errors from "./common/errors"; -import { CellMapper, Grid } from "./common/grid"; +import { type CellMapper, Grid } from "./common/grid"; import * as FocusedCellUtils from "./common/internal/focusedCellUtils"; import * as ScrollUtils from "./common/internal/scrollUtils"; import { Rect } from "./common/rect"; @@ -39,18 +39,25 @@ import { RenderMode } from "./common/renderMode"; import { ScrollDirection } from "./common/scrollDirection"; import { Utils } from "./common/utils"; import { ColumnHeader } from "./headers/columnHeader"; -import { ColumnHeaderCell, ColumnHeaderCellProps } from "./headers/columnHeaderCell"; +import { ColumnHeaderCell, type ColumnHeaderCellProps } from "./headers/columnHeaderCell"; import { renderDefaultRowHeader, RowHeader } from "./headers/rowHeader"; import { ResizeSensor } from "./interactions/resizeSensor"; import { GuideLayer } from "./layers/guides"; -import { RegionLayer, RegionStyler } from "./layers/regions"; -import { Locator, LocatorImpl } from "./locator"; +import { RegionLayer, type RegionStyler } from "./layers/regions"; +import { type Locator, LocatorImpl } from "./locator"; import { QuadrantType } from "./quadrants/tableQuadrant"; import { TableQuadrantStack } from "./quadrants/tableQuadrantStack"; -import { ColumnLoadingOption, Region, RegionCardinality, Regions, SelectionModes, TableLoadingOption } from "./regions"; +import { + ColumnLoadingOption, + type Region, + RegionCardinality, + Regions, + SelectionModes, + TableLoadingOption, +} from "./regions"; import { resizeRowsByApproximateHeight, - ResizeRowsByApproximateHeightOptions, + type ResizeRowsByApproximateHeightOptions, resizeRowsByTallestCell, } from "./resizeRows"; import { compareChildren, getHotkeysFromProps, isSelectionModeEnabled } from "./table2Utils"; diff --git a/packages/table/src/tableBody.tsx b/packages/table/src/tableBody.tsx index 4d959b2985..537d578e33 100644 --- a/packages/table/src/tableBody.tsx +++ b/packages/table/src/tableBody.tsx @@ -24,11 +24,11 @@ import * as Classes from "./common/classes"; import { ContextMenuTargetWrapper } from "./common/contextMenuTargetWrapper"; import { RenderMode } from "./common/renderMode"; import type { CoordinateData } from "./interactions/dragTypes"; -import { ContextMenuRenderer, MenuContextImpl } from "./interactions/menus"; -import { DragSelectable, SelectableProps } from "./interactions/selectable"; +import { type ContextMenuRenderer, MenuContextImpl } from "./interactions/menus"; +import { DragSelectable, type SelectableProps } from "./interactions/selectable"; import type { Locator } from "./locator"; -import { Region, Regions } from "./regions"; -import { TableBodyCells, TableBodyCellsProps } from "./tableBodyCells"; +import { type Region, Regions } from "./regions"; +import { TableBodyCells, type TableBodyCellsProps } from "./tableBodyCells"; export interface TableBodyProps extends SelectableProps, TableBodyCellsProps { /** diff --git a/packages/table/src/tableBody2.tsx b/packages/table/src/tableBody2.tsx index db43ac1f25..b652a1da5f 100644 --- a/packages/table/src/tableBody2.tsx +++ b/packages/table/src/tableBody2.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractComponent, ContextMenu, ContextMenuContentProps, Utils as CoreUtils } from "@blueprintjs/core"; +import { AbstractComponent, ContextMenu, type ContextMenuContentProps, Utils as CoreUtils } from "@blueprintjs/core"; import type { CellCoordinates } from "./common/cellTypes"; import * as Classes from "./common/classes"; @@ -25,7 +25,7 @@ import { RenderMode } from "./common/renderMode"; import type { CoordinateData } from "./interactions/dragTypes"; import { MenuContextImpl } from "./interactions/menus"; import { DragSelectable } from "./interactions/selectable"; -import { Region, Regions } from "./regions"; +import { type Region, Regions } from "./regions"; import type { TableBodyProps } from "./tableBody"; import { TableBodyCells } from "./tableBodyCells"; diff --git a/packages/table/src/tableBodyCells.tsx b/packages/table/src/tableBodyCells.tsx index 2bb001d219..2e04f7e2d0 100644 --- a/packages/table/src/tableBodyCells.tsx +++ b/packages/table/src/tableBodyCells.tsx @@ -17,9 +17,9 @@ import classNames from "classnames"; import * as React from "react"; -import { AbstractComponent, Utils as CoreUtils, Props } from "@blueprintjs/core"; +import { AbstractComponent, Utils as CoreUtils, type Props } from "@blueprintjs/core"; -import { CellRenderer, emptyCellRenderer } from "./cell/cell"; +import { type CellRenderer, emptyCellRenderer } from "./cell/cell"; import { Batcher } from "./common/batcher"; import type { FocusedCellCoordinates } from "./common/cellTypes"; import * as Classes from "./common/classes"; diff --git a/packages/table/src/tableHotkeys.ts b/packages/table/src/tableHotkeys.ts index 4102f984de..3aa2bcfe6a 100644 --- a/packages/table/src/tableHotkeys.ts +++ b/packages/table/src/tableHotkeys.ts @@ -22,7 +22,7 @@ import { TABLE_COPY_FAILED } from "./common/errors"; import type { Grid } from "./common/grid"; import * as FocusedCellUtils from "./common/internal/focusedCellUtils"; import * as SelectionUtils from "./common/internal/selectionUtils"; -import { NonNullRegion, Region, RegionCardinality, Regions } from "./regions"; +import { type NonNullRegion, type Region, RegionCardinality, Regions } from "./regions"; import type { TableProps } from "./tableProps"; import type { TableSnapshot, TableState } from "./tableState"; diff --git a/packages/table/test/columnHeaderCellTests.tsx b/packages/table/test/columnHeaderCellTests.tsx index 86a45330f4..b8366b6764 100644 --- a/packages/table/test/columnHeaderCellTests.tsx +++ b/packages/table/test/columnHeaderCellTests.tsx @@ -21,7 +21,7 @@ import * as sinon from "sinon"; import { Classes as CoreClasses, H4, Menu, MenuItem } from "@blueprintjs/core"; -import { ColumnHeaderCell, ColumnHeaderCellProps } from "../src"; +import { ColumnHeaderCell, type ColumnHeaderCellProps } from "../src"; import * as Classes from "../src/common/classes"; import { ElementHarness, ReactHarness } from "./harness"; import { createTableOfSize } from "./mocks/table"; diff --git a/packages/table/test/columnTests.tsx b/packages/table/test/columnTests.tsx index 1a31ccd33f..5ceae01101 100644 --- a/packages/table/test/columnTests.tsx +++ b/packages/table/test/columnTests.tsx @@ -20,7 +20,7 @@ import * as React from "react"; import { Cell, Column, ColumnLoadingOption, Table2 } from "../src"; import * as Classes from "../src/common/classes"; import { CellType, expectCellLoading } from "./cellTestUtils"; -import { ElementHarness, ReactHarness } from "./harness"; +import { type ElementHarness, ReactHarness } from "./harness"; describe("Column", () => { const harness = new ReactHarness(); diff --git a/packages/table/test/common/internal/focusedCellUtilsTests.ts b/packages/table/test/common/internal/focusedCellUtilsTests.ts index 32cf4d73ca..b4c71931c9 100644 --- a/packages/table/test/common/internal/focusedCellUtilsTests.ts +++ b/packages/table/test/common/internal/focusedCellUtilsTests.ts @@ -20,7 +20,7 @@ import { expect } from "chai"; import type { CellCoordinates, FocusedCellCoordinates } from "../../../src/common/cellTypes"; import * as FocusedCellUtils from "../../../src/common/internal/focusedCellUtils"; -import { Region, Regions } from "../../../src/regions"; +import { type Region, Regions } from "../../../src/regions"; describe("FocusedCellUtils", () => { describe("expandFocusedRegion", () => { diff --git a/packages/table/test/common/internal/scrollUtilsTests.tsx b/packages/table/test/common/internal/scrollUtilsTests.tsx index 95c2a5de35..7db55445fd 100644 --- a/packages/table/test/common/internal/scrollUtilsTests.tsx +++ b/packages/table/test/common/internal/scrollUtilsTests.tsx @@ -19,7 +19,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ScrollUtils from "../../../src/common/internal/scrollUtils"; -import { Region, Regions } from "../../../src/regions"; +import { type Region, Regions } from "../../../src/regions"; describe("scrollUtils", () => { describe("getScrollPositionForRegion", () => { diff --git a/packages/table/test/locatorTests.tsx b/packages/table/test/locatorTests.tsx index 1e88246169..8ef6d1c93f 100644 --- a/packages/table/test/locatorTests.tsx +++ b/packages/table/test/locatorTests.tsx @@ -20,7 +20,7 @@ import * as ReactDOM from "react-dom"; import { Utils } from "../src"; import { Grid } from "../src/common/grid"; -import { Locator, LocatorImpl } from "../src/locator"; +import { type Locator, LocatorImpl } from "../src/locator"; const N_ROWS = 10; const N_COLS = 10; diff --git a/packages/table/test/mocks/table.tsx b/packages/table/test/mocks/table.tsx index da41bb8e9f..f60c6149f1 100644 --- a/packages/table/test/mocks/table.tsx +++ b/packages/table/test/mocks/table.tsx @@ -16,7 +16,7 @@ import * as React from "react"; -import { Cell, Column, ColumnProps, RenderMode, Table, TableProps, Utils } from "../../src"; +import { Cell, Column, type ColumnProps, RenderMode, Table, type TableProps, Utils } from "../../src"; export function createStringOfLength(length: number) { return new Array(length).fill("a").join(""); diff --git a/packages/table/test/quadrants/tableQuadrantTests.tsx b/packages/table/test/quadrants/tableQuadrantTests.tsx index 8163cf0296..fd7e31f260 100644 --- a/packages/table/test/quadrants/tableQuadrantTests.tsx +++ b/packages/table/test/quadrants/tableQuadrantTests.tsx @@ -15,14 +15,14 @@ */ import { expect } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import sinon from "sinon"; import * as Classes from "../../src/common/classes"; import * as Errors from "../../src/common/errors"; import { Grid } from "../../src/common/grid"; -import { QuadrantType, TableQuadrant, TableQuadrantProps } from "../../src/quadrants/tableQuadrant"; +import { QuadrantType, TableQuadrant, type TableQuadrantProps } from "../../src/quadrants/tableQuadrant"; /** * is responsible for showing a single table "instance" of both diff --git a/packages/table/test/regionsTests.ts b/packages/table/test/regionsTests.ts index 50cf73962f..60e081dccd 100644 --- a/packages/table/test/regionsTests.ts +++ b/packages/table/test/regionsTests.ts @@ -16,7 +16,7 @@ import { expect } from "chai"; -import { CellCoordinate, Region, RegionCardinality, Regions } from "../src/regions"; +import { type CellCoordinate, type Region, RegionCardinality, Regions } from "../src/regions"; describe("Regions", () => { describe("factories", () => { diff --git a/packages/table/test/resizableTests.tsx b/packages/table/test/resizableTests.tsx index 34344f56a5..918b2d0c70 100644 --- a/packages/table/test/resizableTests.tsx +++ b/packages/table/test/resizableTests.tsx @@ -20,8 +20,8 @@ import * as React from "react"; import sinon from "sinon"; import * as Classes from "../src/common/classes"; -import { Resizable, ResizableProps, ResizeableState } from "../src/interactions/resizable"; -import { Orientation, ResizeHandle } from "../src/interactions/resizeHandle"; +import { Resizable, type ResizableProps, type ResizeableState } from "../src/interactions/resizable"; +import { Orientation, type ResizeHandle } from "../src/interactions/resizeHandle"; import { ReactHarness } from "./harness"; interface ResizableDivProps { diff --git a/packages/table/test/selectableTests.tsx b/packages/table/test/selectableTests.tsx index 94d52b182e..2dc1243716 100644 --- a/packages/table/test/selectableTests.tsx +++ b/packages/table/test/selectableTests.tsx @@ -21,8 +21,8 @@ import sinon from "sinon"; import type { FocusedCellCoordinates } from "../src/common/cellTypes"; import * as FocusedCellUtils from "../src/common/internal/focusedCellUtils"; import { DragSelectable, type DragSelectableProps } from "../src/interactions/selectable"; -import { Region, Regions } from "../src/regions"; -import { ElementHarness, ReactHarness } from "./harness"; +import { type Region, Regions } from "../src/regions"; +import { type ElementHarness, ReactHarness } from "./harness"; const REGION = Regions.cell(0, 0); const REGION_2 = Regions.cell(1, 1); diff --git a/packages/table/test/table2Tests.tsx b/packages/table/test/table2Tests.tsx index 714de4eac7..c41bce91d4 100644 --- a/packages/table/test/table2Tests.tsx +++ b/packages/table/test/table2Tests.tsx @@ -15,7 +15,7 @@ */ import { expect } from "chai"; -import { MountRendererProps, ReactWrapper, mount as untypedMount } from "enzyme"; +import { type MountRendererProps, type ReactWrapper, mount as untypedMount } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import * as TestUtils from "react-dom/test-utils"; @@ -24,7 +24,7 @@ import sinon from "sinon"; import { Utils as CoreUtils } from "@blueprintjs/core"; import { dispatchMouseEvent, expectPropValidationError } from "@blueprintjs/test-commons"; -import { Cell, Column, RegionCardinality, Table2, TableLoadingOption, TableProps } from "../src"; +import { Cell, Column, RegionCardinality, Table2, TableLoadingOption, type TableProps } from "../src"; import type { CellCoordinates, FocusedCellCoordinates } from "../src/common/cellTypes"; import * as Classes from "../src/common/classes"; import * as Errors from "../src/common/errors"; @@ -33,10 +33,10 @@ import { Rect } from "../src/common/rect"; import { RenderMode } from "../src/common/renderMode"; import { TableQuadrant } from "../src/quadrants/tableQuadrant"; import { TableQuadrantStack } from "../src/quadrants/tableQuadrantStack"; -import { Region, Regions } from "../src/regions"; +import { type Region, Regions } from "../src/regions"; import type { TableState } from "../src/tableState"; import { CellType, expectCellLoading } from "./cellTestUtils"; -import { ElementHarness, ReactHarness } from "./harness"; +import { type ElementHarness, ReactHarness } from "./harness"; import { createStringOfLength, createTableOfSize } from "./mocks/table"; /** diff --git a/packages/table/test/tableBody2Tests.tsx b/packages/table/test/tableBody2Tests.tsx index 56a98edfad..aba57d539e 100644 --- a/packages/table/test/tableBody2Tests.tsx +++ b/packages/table/test/tableBody2Tests.tsx @@ -15,7 +15,7 @@ */ import { expect } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import sinon from "sinon"; @@ -26,7 +26,7 @@ import { Grid } from "../src/common/grid"; import { Rect } from "../src/common/rect"; import { RenderMode } from "../src/common/renderMode"; import type { MenuContext } from "../src/interactions/menus/menuContext"; -import { Region, Regions } from "../src/regions"; +import { type Region, Regions } from "../src/regions"; import type { TableBodyProps } from "../src/tableBody"; import { TableBody2 } from "../src/tableBody2"; import { cellClassNames } from "../src/tableBodyCells"; diff --git a/packages/table/test/tableBodyTests.tsx b/packages/table/test/tableBodyTests.tsx index ac39a92de4..8480a2b459 100644 --- a/packages/table/test/tableBodyTests.tsx +++ b/packages/table/test/tableBodyTests.tsx @@ -22,7 +22,7 @@ /* eslint-disable deprecation/deprecation, @blueprintjs/no-deprecated-components */ import { expect } from "chai"; -import { mount, ReactWrapper } from "enzyme"; +import { mount, type ReactWrapper } from "enzyme"; import * as React from "react"; import sinon from "sinon"; @@ -33,8 +33,8 @@ import { Grid } from "../src/common/grid"; import { Rect } from "../src/common/rect"; import { RenderMode } from "../src/common/renderMode"; import type { MenuContext } from "../src/interactions/menus/menuContext"; -import { Region, Regions } from "../src/regions"; -import { TableBody, TableBodyProps } from "../src/tableBody"; +import { type Region, Regions } from "../src/regions"; +import { TableBody, type TableBodyProps } from "../src/tableBody"; import { cellClassNames } from "../src/tableBodyCells"; describe("TableBody", () => { diff --git a/packages/table/test/tableTests.tsx b/packages/table/test/tableTests.tsx index 3880ef86d6..22c0488072 100644 --- a/packages/table/test/tableTests.tsx +++ b/packages/table/test/tableTests.tsx @@ -22,7 +22,7 @@ /* eslint-disable deprecation/deprecation, @blueprintjs/no-deprecated-components */ import { expect } from "chai"; -import { MountRendererProps, ReactWrapper, mount as untypedMount } from "enzyme"; +import { type MountRendererProps, type ReactWrapper, mount as untypedMount } from "enzyme"; import * as React from "react"; import * as ReactDOM from "react-dom"; import sinon from "sinon"; @@ -30,7 +30,7 @@ import sinon from "sinon"; import { Utils as CoreUtils } from "@blueprintjs/core"; import { dispatchMouseEvent, expectPropValidationError } from "@blueprintjs/test-commons"; -import { Cell, Column, RegionCardinality, Table, TableLoadingOption, TableProps } from "../src"; +import { Cell, Column, RegionCardinality, Table, TableLoadingOption, type TableProps } from "../src"; import type { CellCoordinates, FocusedCellCoordinates } from "../src/common/cellTypes"; import * as Classes from "../src/common/classes"; import * as Errors from "../src/common/errors"; @@ -38,10 +38,10 @@ import type { ColumnIndices, RowIndices } from "../src/common/grid"; import { Rect } from "../src/common/rect"; import { RenderMode } from "../src/common/renderMode"; import { TableQuadrant } from "../src/quadrants/tableQuadrant"; -import { Region, Regions } from "../src/regions"; +import { type Region, Regions } from "../src/regions"; import type { TableState } from "../src/tableState"; import { CellType, expectCellLoading } from "./cellTestUtils"; -import { ElementHarness, ReactHarness } from "./harness"; +import { type ElementHarness, ReactHarness } from "./harness"; import { createStringOfLength, createTableOfSize } from "./mocks/table"; /**