Socket
Socket
Sign inDemoInstall

@blueprintjs/core

Package Overview
Dependencies
Maintainers
1
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blueprintjs/core - npm Package Compare versions

Comparing version 5.0.0-alpha.3 to 5.0.0-alpha.4

lib/cjs/deprecatedTypeAliases.d.ts

2

lib/cjs/common/classes.d.ts

@@ -105,2 +105,4 @@ import { Alignment } from "./alignment";

export declare const HTML_SELECT: string;
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
export declare const SELECT: string;
export declare const HTML_TABLE: string;

@@ -107,0 +109,0 @@ export declare const HTML_TABLE_BORDERED: string;

8

lib/cjs/common/classes.js

@@ -20,5 +20,5 @@ "use strict";

exports.HTML_SELECT = exports.FLEX_EXPANDER = exports.EDITABLE_TEXT_PLACEHOLDER = exports.EDITABLE_TEXT_INPUT = exports.EDITABLE_TEXT_EDITING = exports.EDITABLE_TEXT_CONTENT = exports.EDITABLE_TEXT = exports.DRAWER_HEADER = exports.DRAWER_FOOTER = exports.DRAWER_BODY = exports.DRAWER = exports.DIVIDER = exports.DIALOG_STEP_VIEWED = exports.DIALOG_STEP_ICON = exports.DIALOG_STEP_TITLE = exports.DIALOG_STEP_CONTAINER = exports.DIALOG_STEP = exports.DIALOG_FOOTER_ACTIONS = exports.DIALOG_FOOTER_MAIN_SECTION = exports.DIALOG_FOOTER_FIXED = exports.DIALOG_FOOTER = exports.DIALOG_CLOSE_BUTTON = exports.DIALOG_BODY_SCROLL_CONTAINER = exports.DIALOG_BODY = exports.DIALOG_HEADER = exports.DIALOG_CONTAINER = exports.DIALOG = exports.CONTROL_GROUP = exports.CONTEXT_MENU_BACKDROP = exports.CONTEXT_MENU_POPOVER = exports.CONTEXT_MENU_VIRTUAL_TARGET = exports.CONTEXT_MENU = exports.COLLAPSE_BODY = exports.COLLAPSE = exports.CARD = exports.CALLOUT_ICON = exports.CALLOUT = exports.BUTTON_TEXT = exports.BUTTON_SPINNER = exports.BUTTON_GROUP = exports.BUTTON = exports.BREADCRUMBS_COLLAPSED = exports.BREADCRUMBS = exports.BREADCRUMB_CURRENT = exports.BREADCRUMB = exports.ALERT_FOOTER = exports.ALERT_CONTENTS = exports.ALERT_BODY = exports.ALERT = exports.RTL = void 0;
exports.NAVBAR_DIVIDER = exports.NAVBAR_HEADING = exports.NAVBAR_GROUP = exports.NAVBAR = exports.MULTISTEP_DIALOG_NAV_RIGHT = exports.MULTISTEP_DIALOG_NAV_TOP = exports.MULTISTEP_DIALOG_RIGHT_PANEL = exports.MULTISTEP_DIALOG_LEFT_PANEL = exports.MULTISTEP_DIALOG_PANELS = exports.MULTISTEP_DIALOG = exports.MENU_HEADER = exports.MENU_DIVIDER = exports.MENU_SUBMENU_ICON = exports.MENU_SUBMENU = exports.MENU_ITEM_LABEL = exports.MENU_ITEM_ICON = exports.MENU_ITEM = exports.MENU = exports.FORM_GROUP_SUB_LABEL = exports.FORM_HELPER_TEXT = exports.FORM_CONTENT = exports.FORM_GROUP = exports.LABEL = exports.HOTKEY_DIALOG = exports.HOTKEY_COLUMN = exports.HOTKEY_LABEL = exports.HOTKEY = exports.MODIFIER_KEY = exports.KEY_COMBO = exports.KEY = exports.FILE_UPLOAD_INPUT_CUSTOM_TEXT = exports.FILE_UPLOAD_INPUT = exports.FILE_INPUT_HAS_SELECTION = exports.FILE_INPUT = exports.SWITCH_INNER_TEXT = exports.SWITCH = exports.RADIO = exports.CHECKBOX = exports.CONTROL_INDICATOR_CHILD = exports.CONTROL_INDICATOR = exports.CONTROL = exports.RESIZABLE_INPUT_SPAN = exports.INPUT_ACTION = exports.INPUT_LEFT_CONTAINER = exports.INPUT_GROUP = exports.INPUT_GHOST = exports.INPUT = exports.HTML_TABLE_STRIPED = exports.HTML_TABLE_BORDERED = exports.HTML_TABLE = void 0;
exports.SLIDER_TRACK = exports.SLIDER_LABEL = exports.SLIDER_HANDLE = exports.SLIDER_AXIS = exports.SLIDER = exports.SKELETON = exports.PORTAL = exports.PROGRESS_NO_ANIMATION = exports.PROGRESS_NO_STRIPES = exports.PROGRESS_METER = exports.PROGRESS_BAR = exports.POPOVER_WRAPPER = exports.POPOVER_TRANSITION_CONTAINER = exports.POPOVER_TARGET = exports.POPOVER_REFERENCE_HIDDEN = exports.POPOVER_POPPER_ESCAPED = exports.POPOVER_OPEN = exports.POPOVER_MATCH_TARGET_WIDTH = exports.POPOVER_DISMISS_OVERRIDE = exports.POPOVER_DISMISS = exports.POPOVER_CONTENT_SIZING = exports.POPOVER_CONTENT_PLACEMENT = exports.POPOVER_CONTENT = exports.POPOVER_CAPTURING_DISMISS = exports.POPOVER_BACKDROP = exports.POPOVER_ARROW = exports.POPOVER = exports.PANEL_STACK2_VIEW = exports.PANEL_STACK2_HEADER_BACK = exports.PANEL_STACK2_HEADER = exports.PANEL_STACK2 = exports.PANEL_STACK_VIEW = exports.PANEL_STACK_HEADER_BACK = exports.PANEL_STACK_HEADER = exports.PANEL_STACK = exports.OVERLAY_END_FOCUS_TRAP = exports.OVERLAY_START_FOCUS_TRAP = exports.OVERLAY_SCROLL_CONTAINER = exports.OVERLAY_OPEN = exports.OVERLAY_INLINE = exports.OVERLAY_CONTENT = exports.OVERLAY_CONTAINER = exports.OVERLAY_BACKDROP = exports.OVERLAY = exports.OVERFLOW_LIST_SPACER = exports.OVERFLOW_LIST = exports.NUMERIC_INPUT = exports.NON_IDEAL_STATE_TEXT = exports.NON_IDEAL_STATE_VISUAL = exports.NON_IDEAL_STATE = void 0;
exports.positionClass = exports.intentClass = exports.iconClass = exports.elevationClass = exports.alignmentClass = exports.getClassNamespace = exports.ICON_LARGE = exports.ICON_STANDARD = exports.ICON = exports.TREE_ROOT = exports.TREE_NODE_SELECTED = exports.TREE_NODE_SECONDARY_LABEL = exports.TREE_NODE_LIST = exports.TREE_NODE_LABEL = exports.TREE_NODE_ICON = exports.TREE_NODE_EXPANDED = exports.TREE_NODE_CONTENT = exports.TREE_NODE_CARET_OPEN = exports.TREE_NODE_CARET_NONE = exports.TREE_NODE_CARET_CLOSED = exports.TREE_NODE_CARET = exports.TREE_NODE = exports.TREE = exports.TOOLTIP_INDICATOR = exports.TOOLTIP = exports.TOAST_MESSAGE = exports.TOAST_CONTAINER = exports.TOAST = exports.TAG_INPUT_VALUES = exports.TAG_INPUT_ICON = exports.TAG_INPUT = exports.TAG_REMOVE = exports.TAG = exports.TABS = exports.TAB_PANEL = exports.TAB_LIST = exports.TAB_INDICATOR_WRAPPER = exports.TAB_INDICATOR = exports.TAB_TAG = exports.TAB_ICON = exports.TAB = exports.SPINNER_TRACK = exports.SPINNER_NO_SPIN = exports.SPINNER_HEAD = exports.SPINNER_ANIMATION = exports.SPINNER = exports.END = exports.START = exports.SLIDER_PROGRESS = void 0;
exports.NAVBAR_HEADING = exports.NAVBAR_GROUP = exports.NAVBAR = exports.MULTISTEP_DIALOG_NAV_RIGHT = exports.MULTISTEP_DIALOG_NAV_TOP = exports.MULTISTEP_DIALOG_RIGHT_PANEL = exports.MULTISTEP_DIALOG_LEFT_PANEL = exports.MULTISTEP_DIALOG_PANELS = exports.MULTISTEP_DIALOG = exports.MENU_HEADER = exports.MENU_DIVIDER = exports.MENU_SUBMENU_ICON = exports.MENU_SUBMENU = exports.MENU_ITEM_LABEL = exports.MENU_ITEM_ICON = exports.MENU_ITEM = exports.MENU = exports.FORM_GROUP_SUB_LABEL = exports.FORM_HELPER_TEXT = exports.FORM_CONTENT = exports.FORM_GROUP = exports.LABEL = exports.HOTKEY_DIALOG = exports.HOTKEY_COLUMN = exports.HOTKEY_LABEL = exports.HOTKEY = exports.MODIFIER_KEY = exports.KEY_COMBO = exports.KEY = exports.FILE_UPLOAD_INPUT_CUSTOM_TEXT = exports.FILE_UPLOAD_INPUT = exports.FILE_INPUT_HAS_SELECTION = exports.FILE_INPUT = exports.SWITCH_INNER_TEXT = exports.SWITCH = exports.RADIO = exports.CHECKBOX = exports.CONTROL_INDICATOR_CHILD = exports.CONTROL_INDICATOR = exports.CONTROL = exports.RESIZABLE_INPUT_SPAN = exports.INPUT_ACTION = exports.INPUT_LEFT_CONTAINER = exports.INPUT_GROUP = exports.INPUT_GHOST = exports.INPUT = exports.HTML_TABLE_STRIPED = exports.HTML_TABLE_BORDERED = exports.HTML_TABLE = exports.SELECT = void 0;
exports.SLIDER_LABEL = exports.SLIDER_HANDLE = exports.SLIDER_AXIS = exports.SLIDER = exports.SKELETON = exports.PORTAL = exports.PROGRESS_NO_ANIMATION = exports.PROGRESS_NO_STRIPES = exports.PROGRESS_METER = exports.PROGRESS_BAR = exports.POPOVER_WRAPPER = exports.POPOVER_TRANSITION_CONTAINER = exports.POPOVER_TARGET = exports.POPOVER_REFERENCE_HIDDEN = exports.POPOVER_POPPER_ESCAPED = exports.POPOVER_OPEN = exports.POPOVER_MATCH_TARGET_WIDTH = exports.POPOVER_DISMISS_OVERRIDE = exports.POPOVER_DISMISS = exports.POPOVER_CONTENT_SIZING = exports.POPOVER_CONTENT_PLACEMENT = exports.POPOVER_CONTENT = exports.POPOVER_CAPTURING_DISMISS = exports.POPOVER_BACKDROP = exports.POPOVER_ARROW = exports.POPOVER = exports.PANEL_STACK2_VIEW = exports.PANEL_STACK2_HEADER_BACK = exports.PANEL_STACK2_HEADER = exports.PANEL_STACK2 = exports.PANEL_STACK_VIEW = exports.PANEL_STACK_HEADER_BACK = exports.PANEL_STACK_HEADER = exports.PANEL_STACK = exports.OVERLAY_END_FOCUS_TRAP = exports.OVERLAY_START_FOCUS_TRAP = exports.OVERLAY_SCROLL_CONTAINER = exports.OVERLAY_OPEN = exports.OVERLAY_INLINE = exports.OVERLAY_CONTENT = exports.OVERLAY_CONTAINER = exports.OVERLAY_BACKDROP = exports.OVERLAY = exports.OVERFLOW_LIST_SPACER = exports.OVERFLOW_LIST = exports.NUMERIC_INPUT = exports.NON_IDEAL_STATE_TEXT = exports.NON_IDEAL_STATE_VISUAL = exports.NON_IDEAL_STATE = exports.NAVBAR_DIVIDER = void 0;
exports.positionClass = exports.intentClass = exports.iconClass = exports.elevationClass = exports.alignmentClass = exports.getClassNamespace = exports.ICON_LARGE = exports.ICON_STANDARD = exports.ICON = exports.TREE_ROOT = exports.TREE_NODE_SELECTED = exports.TREE_NODE_SECONDARY_LABEL = exports.TREE_NODE_LIST = exports.TREE_NODE_LABEL = exports.TREE_NODE_ICON = exports.TREE_NODE_EXPANDED = exports.TREE_NODE_CONTENT = exports.TREE_NODE_CARET_OPEN = exports.TREE_NODE_CARET_NONE = exports.TREE_NODE_CARET_CLOSED = exports.TREE_NODE_CARET = exports.TREE_NODE = exports.TREE = exports.TOOLTIP_INDICATOR = exports.TOOLTIP = exports.TOAST_MESSAGE = exports.TOAST_CONTAINER = exports.TOAST = exports.TAG_INPUT_VALUES = exports.TAG_INPUT_ICON = exports.TAG_INPUT = exports.TAG_REMOVE = exports.TAG = exports.TABS = exports.TAB_PANEL = exports.TAB_LIST = exports.TAB_INDICATOR_WRAPPER = exports.TAB_INDICATOR = exports.TAB_TAG = exports.TAB_ICON = exports.TAB = exports.SPINNER_TRACK = exports.SPINNER_NO_SPIN = exports.SPINNER_HEAD = exports.SPINNER_ANIMATION = exports.SPINNER = exports.END = exports.START = exports.SLIDER_PROGRESS = exports.SLIDER_TRACK = void 0;
var alignment_1 = require("./alignment");

@@ -139,2 +139,4 @@ var elevation_1 = require("./elevation");

exports.HTML_SELECT = "".concat(NS, "-html-select");
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
exports.SELECT = "".concat(NS, "-select");
exports.HTML_TABLE = "".concat(NS, "-html-table");

@@ -141,0 +143,0 @@ exports.HTML_TABLE_BORDERED = "".concat(exports.HTML_TABLE, "-bordered");

@@ -40,2 +40,3 @@ export declare const CLAMP_MIN_MAX: string;

export declare const TOASTER_CREATE_NULL: string;
export declare const TOASTER_MAX_TOASTS_INVALID: string;
export declare const TOASTER_WARN_INLINE: string;

@@ -45,2 +46,1 @@ export declare const DIALOG_WARN_NO_HEADER_ICON: string;

export declare const DRAWER_ANGLE_POSITIONS_ARE_CASTED: string;
export declare const TOASTER_MAX_TOASTS_INVALID: string;

@@ -18,3 +18,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TOASTER_MAX_TOASTS_INVALID = exports.DRAWER_ANGLE_POSITIONS_ARE_CASTED = exports.DIALOG_WARN_NO_HEADER_CLOSE_BUTTON = exports.DIALOG_WARN_NO_HEADER_ICON = exports.TOASTER_WARN_INLINE = exports.TOASTER_CREATE_NULL = exports.SPINNER_WARN_CLASSES_SIZE = exports.MULTISLIDER_WARN_LABEL_STEP_SIZE_LABEL_VALUES_MUTEX = exports.MULTISLIDER_INVALID_CHILD = exports.RANGESLIDER_NULL_VALUE = exports.SLIDER_MAX = exports.SLIDER_MIN = exports.SLIDER_ZERO_LABEL_STEP = exports.SLIDER_ZERO_STEP = exports.RADIOGROUP_WARN_CHILDREN_OPTIONS_MUTEX = exports.PORTAL_LEGACY_CONTEXT_API = exports.PORTAL_CONTEXT_CLASS_NAME_STRING = exports.POPOVER_WARN_TARGET_PROPS_WITH_RENDER_TARGET = exports.POPOVER_WARN_UNCONTROLLED_ONINTERACTION = exports.POPOVER_WARN_PLACEMENT_AND_POSITION_MUTEX = exports.POPOVER_WARN_HAS_BACKDROP_INLINE = exports.POPOVER_WARN_EMPTY_CONTENT = exports.POPOVER_WARN_DOUBLE_TARGET = exports.POPOVER_WARN_TOO_MANY_CHILDREN = exports.POPOVER_HAS_BACKDROP_INTERACTION = exports.POPOVER_REQUIRES_TARGET = exports.OVERFLOW_LIST_OBSERVE_PARENTS_CHANGED = exports.PANEL_STACK_REQUIRES_PANEL = exports.PANEL_STACK_INITIAL_PANEL_STACK_MUTEX = exports.NUMERIC_INPUT_CONTROLLED_VALUE_INVALID = exports.NUMERIC_INPUT_STEP_SIZE_NON_POSITIVE = exports.NUMERIC_INPUT_MAJOR_STEP_SIZE_NON_POSITIVE = exports.NUMERIC_INPUT_MINOR_STEP_SIZE_NON_POSITIVE = exports.NUMERIC_INPUT_MAJOR_STEP_SIZE_BOUND = exports.NUMERIC_INPUT_MINOR_STEP_SIZE_BOUND = exports.NUMERIC_INPUT_MIN_MAX = exports.INPUT_WARN_LEFT_ELEMENT_LEFT_ICON_MUTEX = exports.HOTKEYS_TARGET_CHILDREN_LOCAL_HOTKEYS = exports.HOTKEYS_PROVIDER_NOT_FOUND = exports.HOTKEYS_HOTKEY_CHILDREN = exports.ALERT_WARN_CANCEL_OUTSIDE_CLICK = exports.ALERT_WARN_CANCEL_ESCAPE_KEY = exports.ALERT_WARN_CANCEL_PROPS = exports.CLAMP_MIN_MAX = void 0;
exports.DRAWER_ANGLE_POSITIONS_ARE_CASTED = exports.DIALOG_WARN_NO_HEADER_CLOSE_BUTTON = exports.DIALOG_WARN_NO_HEADER_ICON = exports.TOASTER_WARN_INLINE = exports.TOASTER_MAX_TOASTS_INVALID = exports.TOASTER_CREATE_NULL = exports.SPINNER_WARN_CLASSES_SIZE = exports.MULTISLIDER_WARN_LABEL_STEP_SIZE_LABEL_VALUES_MUTEX = exports.MULTISLIDER_INVALID_CHILD = exports.RANGESLIDER_NULL_VALUE = exports.SLIDER_MAX = exports.SLIDER_MIN = exports.SLIDER_ZERO_LABEL_STEP = exports.SLIDER_ZERO_STEP = exports.RADIOGROUP_WARN_CHILDREN_OPTIONS_MUTEX = exports.PORTAL_LEGACY_CONTEXT_API = exports.PORTAL_CONTEXT_CLASS_NAME_STRING = exports.POPOVER_WARN_TARGET_PROPS_WITH_RENDER_TARGET = exports.POPOVER_WARN_UNCONTROLLED_ONINTERACTION = exports.POPOVER_WARN_PLACEMENT_AND_POSITION_MUTEX = exports.POPOVER_WARN_HAS_BACKDROP_INLINE = exports.POPOVER_WARN_EMPTY_CONTENT = exports.POPOVER_WARN_DOUBLE_TARGET = exports.POPOVER_WARN_TOO_MANY_CHILDREN = exports.POPOVER_HAS_BACKDROP_INTERACTION = exports.POPOVER_REQUIRES_TARGET = exports.OVERFLOW_LIST_OBSERVE_PARENTS_CHANGED = exports.PANEL_STACK_REQUIRES_PANEL = exports.PANEL_STACK_INITIAL_PANEL_STACK_MUTEX = exports.NUMERIC_INPUT_CONTROLLED_VALUE_INVALID = exports.NUMERIC_INPUT_STEP_SIZE_NON_POSITIVE = exports.NUMERIC_INPUT_MAJOR_STEP_SIZE_NON_POSITIVE = exports.NUMERIC_INPUT_MINOR_STEP_SIZE_NON_POSITIVE = exports.NUMERIC_INPUT_MAJOR_STEP_SIZE_BOUND = exports.NUMERIC_INPUT_MINOR_STEP_SIZE_BOUND = exports.NUMERIC_INPUT_MIN_MAX = exports.INPUT_WARN_LEFT_ELEMENT_LEFT_ICON_MUTEX = exports.HOTKEYS_TARGET_CHILDREN_LOCAL_HOTKEYS = exports.HOTKEYS_PROVIDER_NOT_FOUND = exports.HOTKEYS_HOTKEY_CHILDREN = exports.ALERT_WARN_CANCEL_OUTSIDE_CLICK = exports.ALERT_WARN_CANCEL_ESCAPE_KEY = exports.ALERT_WARN_CANCEL_PROPS = exports.CLAMP_MIN_MAX = void 0;
var ns = "[Blueprint]";

@@ -63,9 +63,9 @@ exports.CLAMP_MIN_MAX = ns + " clamp: max cannot be less than min";

exports.TOASTER_CREATE_NULL = ns +
" Toaster.create() is not supported inside React lifecycle methods in React 16." +
" OverlayToaster.create() is not supported inside React lifecycle methods in React 16." +
" See usage example on the docs site.";
exports.TOASTER_WARN_INLINE = ns + " Toaster.create() ignores inline prop as it always creates a new element.";
exports.TOASTER_MAX_TOASTS_INVALID = ns + " <OverlayToaster> maxToasts is set to an invalid number, must be greater than 0";
exports.TOASTER_WARN_INLINE = ns + " OverlayToaster.create() ignores inline prop as it always creates a new element.";
exports.DIALOG_WARN_NO_HEADER_ICON = ns + " <Dialog> iconName is ignored if title is omitted.";
exports.DIALOG_WARN_NO_HEADER_CLOSE_BUTTON = ns + " <Dialog> isCloseButtonShown prop is ignored if title is omitted.";
exports.DRAWER_ANGLE_POSITIONS_ARE_CASTED = ns + " <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)";
exports.TOASTER_MAX_TOASTS_INVALID = ns + " <Toaster> maxToasts is set to an invalid number, must be greater than 0";
//# sourceMappingURL=errors.js.map

@@ -72,3 +72,3 @@ "use strict";

};
KeyComboTag.displayName = "".concat(common_1.DISPLAYNAME_PREFIX, ".KeyCombo");
KeyComboTag.displayName = "".concat(common_1.DISPLAYNAME_PREFIX, ".KeyComboTag");
return KeyComboTag;

@@ -75,0 +75,0 @@ }(common_1.AbstractPureComponent));

@@ -46,5 +46,13 @@ "use strict";

if (typeof icon === "string") {
if (autoLoad) {
// load the module to get the component (it will be cached if it's the same icon)
icons_1.Icons.load(icon).then(function () {
// The icon may have been loaded already, in which case we can simply grab it.
// N.B. when `autoLoad={true}`, we can't rely on simply calling Icons.load() here to re-load an icon module
// which has already been loaded & cached, since it may have been loaded with special loading options which
// this component knows nothing about.
var loadedIconComponent = icons_1.Icons.getComponent(icon);
if (loadedIconComponent !== undefined) {
setIconComponent(loadedIconComponent);
}
else if (autoLoad) {
icons_1.Icons.load(icon)
.then(function () {
// if this effect expired by the time icon loaded, then don't set state

@@ -54,6 +62,9 @@ if (!shouldCancelIconLoading) {

}
})
.catch(function (reason) {
console.error("[Blueprint] Icon '".concat(icon, "' could not be loaded."), reason);
});
}
else {
setIconComponent(icons_1.Icons.getComponent(icon));
console.error("[Blueprint] Icon '".concat(icon, "' is not loaded yet and autoLoad={false}, did you call Icons.load('").concat(icon, "')?"));
}

@@ -60,0 +71,0 @@ }

@@ -55,3 +55,3 @@ export { Alert, AlertProps } from "./alert/alert";

export { ProgressBar, ProgressBarProps } from "./progress-bar/progressBar";
export { ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { ResizeEntry, ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { HandleHtmlProps, HandleInteractionKind, HandleProps, HandleType } from "./slider/handleProps";

@@ -68,3 +68,3 @@ export { MultiSlider, MultiSliderProps } from "./slider/multiSlider";

export { Toast, ToastProps } from "./toast/toast";
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster";
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster";
export { TooltipProps, Tooltip } from "./tooltip/tooltip";

@@ -71,0 +71,0 @@ export { Tree, TreeProps } from "./tree/tree";

@@ -19,3 +19,3 @@ "use strict";

exports.MenuDivider = exports.Menu = exports.IconSize = exports.Icon = exports.HTMLTable = exports.HTMLSelect = exports.UL = exports.Pre = exports.OL = exports.Label = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Code = exports.Blockquote = exports.TextArea = exports.RadioGroup = exports.NumericInput = exports.InputGroup = exports.FormGroup = exports.FileInput = exports.Switch = exports.Radio = exports.Checkbox = exports.ControlGroup = exports.EditableText = exports.DrawerSize = exports.Drawer = exports.Divider = exports.MultistepDialog = exports.DialogStep = exports.DialogFooter = exports.DialogBody = exports.Dialog = exports.hideContextMenu = exports.showContextMenu = exports.ContextMenuPopover = exports.ContextMenu = exports.Collapse = exports.Card = exports.Callout = exports.ButtonGroup = exports.Button = exports.AnchorButton = exports.Breadcrumbs = exports.Breadcrumb = exports.Alert = void 0;
exports.TreeNode = exports.Tree = exports.Tooltip = exports.Toast = exports.OverlayToaster = exports.TagInput = exports.Tag = exports.Tabs = exports.Tab = exports.SpinnerSize = exports.Spinner = exports.Slider = exports.RangeSlider = exports.MultiSlider = exports.HandleType = exports.HandleInteractionKind = exports.ResizeSensor = exports.ProgressBar = exports.Portal = exports.PopupKind = exports.PopperPlacements = exports.PopoverPosition = exports.PopoverInteractionKind = exports.Popover = exports.PanelStack2 = exports.PanelStack = exports.Text = exports.Overlay = exports.OverflowList = exports.NonIdealStateIconSize = exports.NonIdealState = exports.NavbarHeading = exports.NavbarGroup = exports.NavbarDivider = exports.Navbar = exports.MenuItem = void 0;
exports.TreeNode = exports.Tree = exports.Tooltip = exports.Toast = exports.OverlayToaster = exports.TagInput = exports.Tag = exports.Tabs = exports.Tab = exports.SpinnerSize = exports.Spinner = exports.Slider = exports.RangeSlider = exports.MultiSlider = exports.HandleType = exports.HandleInteractionKind = exports.ResizeSensor = exports.ResizeEntry = exports.ProgressBar = exports.Portal = exports.PopupKind = exports.PopperPlacements = exports.PopoverPosition = exports.PopoverInteractionKind = exports.Popover = exports.PanelStack2 = exports.PanelStack = exports.Text = exports.Overlay = exports.OverflowList = exports.NonIdealStateIconSize = exports.NonIdealState = exports.NavbarHeading = exports.NavbarGroup = exports.NavbarDivider = exports.Navbar = exports.MenuItem = void 0;
var tslib_1 = require("tslib");

@@ -143,2 +143,3 @@ var alert_1 = require("./alert/alert");

var resizeSensor_1 = require("./resize-sensor/resizeSensor");
Object.defineProperty(exports, "ResizeEntry", { enumerable: true, get: function () { return resizeSensor_1.ResizeEntry; } });
Object.defineProperty(exports, "ResizeSensor", { enumerable: true, get: function () { return resizeSensor_1.ResizeSensor; } });

@@ -145,0 +146,0 @@ var handleProps_1 = require("./slider/handleProps");

import { ResizeObserverEntry } from "@juggle/resize-observer";
import * as React from "react";
import { AbstractPureComponent } from "../../common";
export { ResizeObserverEntry as ResizeEntry };
/** `ResizeSensor` requires a single DOM element child and will error otherwise. */

@@ -5,0 +6,0 @@ export interface ResizeSensorProps {

@@ -18,5 +18,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ResizeSensor = void 0;
exports.ResizeSensor = exports.ResizeEntry = void 0;
var tslib_1 = require("tslib");
var resize_observer_1 = require("@juggle/resize-observer");
Object.defineProperty(exports, "ResizeEntry", { enumerable: true, get: function () { return resize_observer_1.ResizeObserverEntry; } });
var React = tslib_1.__importStar(require("react"));

@@ -23,0 +24,0 @@ var common_1 = require("../../common");

@@ -6,4 +6,5 @@ export { FocusStyleManager } from "./accessibility/focusStyleManager";

export * from "./hooks";
export * from "./deprecatedTypeAliases";
export { HotkeysTargetLegacy as HotkeysTarget, type HotkeysTargetLegacyComponent as IHotkeysTargetComponent, } from "./legacy/hotkeysTargetLegacy";
export { isHotkeysDialogShowing, setHotkeysDialogProps, showHotkeysDialog, hideHotkeysDialog, hideHotkeysDialogAfterDelay, } from "./legacy/hotkeysDialogLegacy";
export { ContextMenuTargetLegacy, ContextMenuTargetLegacyComponent } from "./legacy/contextMenuTargetLegacy";

@@ -27,2 +27,3 @@ "use strict";

/* eslint-disable deprecation/deprecation */
tslib_1.__exportStar(require("./deprecatedTypeAliases"), exports);
var hotkeysTargetLegacy_1 = require("./legacy/hotkeysTargetLegacy");

@@ -29,0 +30,0 @@ Object.defineProperty(exports, "HotkeysTarget", { enumerable: true, get: function () { return hotkeysTargetLegacy_1.HotkeysTargetLegacy; } });

@@ -105,2 +105,4 @@ import { Alignment } from "./alignment";

export declare const HTML_SELECT: string;
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
export declare const SELECT: string;
export declare const HTML_TABLE: string;

@@ -107,0 +109,0 @@ export declare const HTML_TABLE_BORDERED: string;

@@ -131,2 +131,4 @@ /*

export var HTML_SELECT = "".concat(NS, "-html-select");
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
export var SELECT = "".concat(NS, "-select");
export var HTML_TABLE = "".concat(NS, "-html-table");

@@ -133,0 +135,0 @@ export var HTML_TABLE_BORDERED = "".concat(HTML_TABLE, "-bordered");

@@ -40,2 +40,3 @@ export declare const CLAMP_MIN_MAX: string;

export declare const TOASTER_CREATE_NULL: string;
export declare const TOASTER_MAX_TOASTS_INVALID: string;
export declare const TOASTER_WARN_INLINE: string;

@@ -45,2 +46,1 @@ export declare const DIALOG_WARN_NO_HEADER_ICON: string;

export declare const DRAWER_ANGLE_POSITIONS_ARE_CASTED: string;
export declare const TOASTER_MAX_TOASTS_INVALID: string;

@@ -59,9 +59,9 @@ /*

export var TOASTER_CREATE_NULL = ns +
" Toaster.create() is not supported inside React lifecycle methods in React 16." +
" OverlayToaster.create() is not supported inside React lifecycle methods in React 16." +
" See usage example on the docs site.";
export var TOASTER_WARN_INLINE = ns + " Toaster.create() ignores inline prop as it always creates a new element.";
export var TOASTER_MAX_TOASTS_INVALID = ns + " <OverlayToaster> maxToasts is set to an invalid number, must be greater than 0";
export var TOASTER_WARN_INLINE = ns + " OverlayToaster.create() ignores inline prop as it always creates a new element.";
export var DIALOG_WARN_NO_HEADER_ICON = ns + " <Dialog> iconName is ignored if title is omitted.";
export var DIALOG_WARN_NO_HEADER_CLOSE_BUTTON = ns + " <Dialog> isCloseButtonShown prop is ignored if title is omitted.";
export var DRAWER_ANGLE_POSITIONS_ARE_CASTED = ns + " <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)";
export var TOASTER_MAX_TOASTS_INVALID = ns + " <Toaster> maxToasts is set to an invalid number, must be greater than 0";
//# sourceMappingURL=errors.js.map

@@ -69,3 +69,3 @@ /*

};
KeyComboTag.displayName = "".concat(DISPLAYNAME_PREFIX, ".KeyCombo");
KeyComboTag.displayName = "".concat(DISPLAYNAME_PREFIX, ".KeyComboTag");
return KeyComboTag;

@@ -72,0 +72,0 @@ }(AbstractPureComponent));

@@ -44,5 +44,13 @@ /*

if (typeof icon === "string") {
if (autoLoad) {
// load the module to get the component (it will be cached if it's the same icon)
Icons.load(icon).then(function () {
// The icon may have been loaded already, in which case we can simply grab it.
// N.B. when `autoLoad={true}`, we can't rely on simply calling Icons.load() here to re-load an icon module
// which has already been loaded & cached, since it may have been loaded with special loading options which
// this component knows nothing about.
var loadedIconComponent = Icons.getComponent(icon);
if (loadedIconComponent !== undefined) {
setIconComponent(loadedIconComponent);
}
else if (autoLoad) {
Icons.load(icon)
.then(function () {
// if this effect expired by the time icon loaded, then don't set state

@@ -52,6 +60,9 @@ if (!shouldCancelIconLoading) {

}
})
.catch(function (reason) {
console.error("[Blueprint] Icon '".concat(icon, "' could not be loaded."), reason);
});
}
else {
setIconComponent(Icons.getComponent(icon));
console.error("[Blueprint] Icon '".concat(icon, "' is not loaded yet and autoLoad={false}, did you call Icons.load('").concat(icon, "')?"));
}

@@ -58,0 +69,0 @@ }

@@ -55,3 +55,3 @@ export { Alert, AlertProps } from "./alert/alert";

export { ProgressBar, ProgressBarProps } from "./progress-bar/progressBar";
export { ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { ResizeEntry, ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { HandleHtmlProps, HandleInteractionKind, HandleProps, HandleType } from "./slider/handleProps";

@@ -68,3 +68,3 @@ export { MultiSlider, MultiSliderProps } from "./slider/multiSlider";

export { Toast, ToastProps } from "./toast/toast";
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster";
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster";
export { TooltipProps, Tooltip } from "./tooltip/tooltip";

@@ -71,0 +71,0 @@ export { Tree, TreeProps } from "./tree/tree";

@@ -67,3 +67,3 @@ /*

export { ProgressBar } from "./progress-bar/progressBar";
export { ResizeSensor } from "./resize-sensor/resizeSensor";
export { ResizeEntry, ResizeSensor } from "./resize-sensor/resizeSensor";
export { HandleInteractionKind, HandleType } from "./slider/handleProps";

@@ -70,0 +70,0 @@ export { MultiSlider } from "./slider/multiSlider";

import { ResizeObserverEntry } from "@juggle/resize-observer";
import * as React from "react";
import { AbstractPureComponent } from "../../common";
export { ResizeObserverEntry as ResizeEntry };
/** `ResizeSensor` requires a single DOM element child and will error otherwise. */

@@ -5,0 +6,0 @@ export interface ResizeSensorProps {

@@ -17,5 +17,7 @@ /*

import { __extends } from "tslib";
import { ResizeObserver } from "@juggle/resize-observer";
import { ResizeObserver, ResizeObserverEntry } from "@juggle/resize-observer";
import * as React from "react";
import { AbstractPureComponent, DISPLAYNAME_PREFIX } from "../../common";
// backwards-compatible with @blueprintjs/core v4.x
export { ResizeObserverEntry as ResizeEntry };
/**

@@ -22,0 +24,0 @@ * Resize sensor component.

@@ -6,4 +6,5 @@ export { FocusStyleManager } from "./accessibility/focusStyleManager";

export * from "./hooks";
export * from "./deprecatedTypeAliases";
export { HotkeysTargetLegacy as HotkeysTarget, type HotkeysTargetLegacyComponent as IHotkeysTargetComponent, } from "./legacy/hotkeysTargetLegacy";
export { isHotkeysDialogShowing, setHotkeysDialogProps, showHotkeysDialog, hideHotkeysDialog, hideHotkeysDialogAfterDelay, } from "./legacy/hotkeysDialogLegacy";
export { ContextMenuTargetLegacy, ContextMenuTargetLegacyComponent } from "./legacy/contextMenuTargetLegacy";

@@ -22,2 +22,3 @@ /*

/* eslint-disable deprecation/deprecation */
export * from "./deprecatedTypeAliases";
export { HotkeysTargetLegacy as HotkeysTarget, } from "./legacy/hotkeysTargetLegacy";

@@ -24,0 +25,0 @@ export { isHotkeysDialogShowing, setHotkeysDialogProps, showHotkeysDialog, hideHotkeysDialog, hideHotkeysDialogAfterDelay, } from "./legacy/hotkeysDialogLegacy";

@@ -105,2 +105,4 @@ import { Alignment } from "./alignment";

export declare const HTML_SELECT: string;
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
export declare const SELECT: string;
export declare const HTML_TABLE: string;

@@ -107,0 +109,0 @@ export declare const HTML_TABLE_BORDERED: string;

@@ -131,2 +131,4 @@ /*

export const HTML_SELECT = `${NS}-html-select`;
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
export const SELECT = `${NS}-select`;
export const HTML_TABLE = `${NS}-html-table`;

@@ -133,0 +135,0 @@ export const HTML_TABLE_BORDERED = `${HTML_TABLE}-bordered`;

@@ -40,2 +40,3 @@ export declare const CLAMP_MIN_MAX: string;

export declare const TOASTER_CREATE_NULL: string;
export declare const TOASTER_MAX_TOASTS_INVALID: string;
export declare const TOASTER_WARN_INLINE: string;

@@ -45,2 +46,1 @@ export declare const DIALOG_WARN_NO_HEADER_ICON: string;

export declare const DRAWER_ANGLE_POSITIONS_ARE_CASTED: string;
export declare const TOASTER_MAX_TOASTS_INVALID: string;

@@ -59,9 +59,9 @@ /*

export const TOASTER_CREATE_NULL = ns +
` Toaster.create() is not supported inside React lifecycle methods in React 16.` +
` OverlayToaster.create() is not supported inside React lifecycle methods in React 16.` +
` See usage example on the docs site.`;
export const TOASTER_WARN_INLINE = ns + ` Toaster.create() ignores inline prop as it always creates a new element.`;
export const TOASTER_MAX_TOASTS_INVALID = ns + ` <OverlayToaster> maxToasts is set to an invalid number, must be greater than 0`;
export const TOASTER_WARN_INLINE = ns + ` OverlayToaster.create() ignores inline prop as it always creates a new element.`;
export const DIALOG_WARN_NO_HEADER_ICON = ns + ` <Dialog> iconName is ignored if title is omitted.`;
export const DIALOG_WARN_NO_HEADER_CLOSE_BUTTON = ns + ` <Dialog> isCloseButtonShown prop is ignored if title is omitted.`;
export const DRAWER_ANGLE_POSITIONS_ARE_CASTED = ns + ` <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)`;
export const TOASTER_MAX_TOASTS_INVALID = ns + ` <Toaster> maxToasts is set to an invalid number, must be greater than 0`;
//# sourceMappingURL=errors.js.map

@@ -42,3 +42,3 @@ /*

export class KeyComboTag extends AbstractPureComponent {
static displayName = `${DISPLAYNAME_PREFIX}.KeyCombo`;
static displayName = `${DISPLAYNAME_PREFIX}.KeyComboTag`;
render() {

@@ -45,0 +45,0 @@ const { className, combo, minimal } = this.props;

@@ -42,5 +42,13 @@ /*

if (typeof icon === "string") {
if (autoLoad) {
// load the module to get the component (it will be cached if it's the same icon)
Icons.load(icon).then(() => {
// The icon may have been loaded already, in which case we can simply grab it.
// N.B. when `autoLoad={true}`, we can't rely on simply calling Icons.load() here to re-load an icon module
// which has already been loaded & cached, since it may have been loaded with special loading options which
// this component knows nothing about.
const loadedIconComponent = Icons.getComponent(icon);
if (loadedIconComponent !== undefined) {
setIconComponent(loadedIconComponent);
}
else if (autoLoad) {
Icons.load(icon)
.then(() => {
// if this effect expired by the time icon loaded, then don't set state

@@ -50,6 +58,9 @@ if (!shouldCancelIconLoading) {

}
})
.catch(reason => {
console.error(`[Blueprint] Icon '${icon}' could not be loaded.`, reason);
});
}
else {
setIconComponent(Icons.getComponent(icon));
console.error(`[Blueprint] Icon '${icon}' is not loaded yet and autoLoad={false}, did you call Icons.load('${icon}')?`);
}

@@ -56,0 +67,0 @@ }

@@ -55,3 +55,3 @@ export { Alert, AlertProps } from "./alert/alert";

export { ProgressBar, ProgressBarProps } from "./progress-bar/progressBar";
export { ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { ResizeEntry, ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { HandleHtmlProps, HandleInteractionKind, HandleProps, HandleType } from "./slider/handleProps";

@@ -68,3 +68,3 @@ export { MultiSlider, MultiSliderProps } from "./slider/multiSlider";

export { Toast, ToastProps } from "./toast/toast";
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster";
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster";
export { TooltipProps, Tooltip } from "./tooltip/tooltip";

@@ -71,0 +71,0 @@ export { Tree, TreeProps } from "./tree/tree";

@@ -67,3 +67,3 @@ /*

export { ProgressBar } from "./progress-bar/progressBar";
export { ResizeSensor } from "./resize-sensor/resizeSensor";
export { ResizeEntry, ResizeSensor } from "./resize-sensor/resizeSensor";
export { HandleInteractionKind, HandleType } from "./slider/handleProps";

@@ -70,0 +70,0 @@ export { MultiSlider } from "./slider/multiSlider";

import { ResizeObserverEntry } from "@juggle/resize-observer";
import * as React from "react";
import { AbstractPureComponent } from "../../common";
export { ResizeObserverEntry as ResizeEntry };
/** `ResizeSensor` requires a single DOM element child and will error otherwise. */

@@ -5,0 +6,0 @@ export interface ResizeSensorProps {

@@ -16,5 +16,7 @@ /*

*/
import { ResizeObserver } from "@juggle/resize-observer";
import { ResizeObserver, ResizeObserverEntry } from "@juggle/resize-observer";
import * as React from "react";
import { AbstractPureComponent, DISPLAYNAME_PREFIX } from "../../common";
// backwards-compatible with @blueprintjs/core v4.x
export { ResizeObserverEntry as ResizeEntry };
/**

@@ -21,0 +23,0 @@ * Resize sensor component.

@@ -6,4 +6,5 @@ export { FocusStyleManager } from "./accessibility/focusStyleManager";

export * from "./hooks";
export * from "./deprecatedTypeAliases";
export { HotkeysTargetLegacy as HotkeysTarget, type HotkeysTargetLegacyComponent as IHotkeysTargetComponent, } from "./legacy/hotkeysTargetLegacy";
export { isHotkeysDialogShowing, setHotkeysDialogProps, showHotkeysDialog, hideHotkeysDialog, hideHotkeysDialogAfterDelay, } from "./legacy/hotkeysDialogLegacy";
export { ContextMenuTargetLegacy, ContextMenuTargetLegacyComponent } from "./legacy/contextMenuTargetLegacy";

@@ -22,2 +22,3 @@ /*

/* eslint-disable deprecation/deprecation */
export * from "./deprecatedTypeAliases";
export { HotkeysTargetLegacy as HotkeysTarget, } from "./legacy/hotkeysTargetLegacy";

@@ -24,0 +25,0 @@ export { isHotkeysDialogShowing, setHotkeysDialogProps, showHotkeysDialog, hideHotkeysDialog, hideHotkeysDialogAfterDelay, } from "./legacy/hotkeysDialogLegacy";

{
"name": "@blueprintjs/core",
"version": "5.0.0-alpha.3",
"version": "5.0.0-alpha.4",
"description": "Core styles & components",

@@ -52,4 +52,4 @@ "main": "lib/cjs/index.js",

"dependencies": {
"@blueprintjs/colors": "^5.0.0-alpha.1",
"@blueprintjs/icons": "^5.0.0-alpha.2",
"@blueprintjs/colors": "^5.0.0-alpha.2",
"@blueprintjs/icons": "^5.0.0-alpha.3",
"@juggle/resize-observer": "^3.4.0",

@@ -74,5 +74,5 @@ "@popperjs/core": "^2.11.7",

"devDependencies": {
"@blueprintjs/karma-build-scripts": "^5.0.0-alpha.2",
"@blueprintjs/node-build-scripts": "^8.0.0-alpha.1",
"@blueprintjs/test-commons": "^2.0.0-alpha.1",
"@blueprintjs/karma-build-scripts": "^5.0.0-alpha.3",
"@blueprintjs/node-build-scripts": "^8.0.0-alpha.2",
"@blueprintjs/test-commons": "^2.0.0-alpha.2",
"@testing-library/react": "^12.1.5",

@@ -79,0 +79,0 @@ "enzyme": "^3.11.0",

@@ -158,2 +158,4 @@ /*

export const HTML_SELECT = `${NS}-html-select`;
/** @deprecated use `<HTMLSelect>` component or `Classes.HTML_SELECT` instead */
export const SELECT = `${NS}-select`;

@@ -160,0 +162,0 @@ export const HTML_TABLE = `${NS}-html-table`;

@@ -94,5 +94,8 @@ /*

ns +
` Toaster.create() is not supported inside React lifecycle methods in React 16.` +
` OverlayToaster.create() is not supported inside React lifecycle methods in React 16.` +
` See usage example on the docs site.`;
export const TOASTER_WARN_INLINE = ns + ` Toaster.create() ignores inline prop as it always creates a new element.`;
export const TOASTER_MAX_TOASTS_INVALID =
ns + ` <OverlayToaster> maxToasts is set to an invalid number, must be greater than 0`;
export const TOASTER_WARN_INLINE =
ns + ` OverlayToaster.create() ignores inline prop as it always creates a new element.`;

@@ -105,4 +108,1 @@ export const DIALOG_WARN_NO_HEADER_ICON = ns + ` <Dialog> iconName is ignored if title is omitted.`;

ns + ` <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)`;
export const TOASTER_MAX_TOASTS_INVALID =
ns + ` <Toaster> maxToasts is set to an invalid number, must be greater than 0`;

@@ -96,3 +96,3 @@ /*

export { ProgressBar, ProgressBarProps } from "./progress-bar/progressBar";
export { ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { ResizeEntry, ResizeSensor, ResizeSensorProps } from "./resize-sensor/resizeSensor";
export { HandleHtmlProps, HandleInteractionKind, HandleProps, HandleType } from "./slider/handleProps";

@@ -109,4 +109,3 @@ export { MultiSlider, MultiSliderProps } from "./slider/multiSlider";

export { Toast, ToastProps } from "./toast/toast";
// eslint-disable-next-line deprecation/deprecation
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster";
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster";
export { TooltipProps, Tooltip } from "./tooltip/tooltip";

@@ -113,0 +112,0 @@ export { Tree, TreeProps } from "./tree/tree";

@@ -26,12 +26,12 @@ @# Toast

The `OverlayToaster` React component is a stateful container for a single list of toasts. Internally, it
uses [`Overlay`](#core/components/overlay) to manage children and transitions. It can be vertically
The __OverlayToaster__ component is a stateful container for a single list of toasts. Internally, it
uses the [Overlay](#core/components/overlay) component to manage children and transitions. It can be vertically
aligned along the top or bottom edge of its container (new toasts will slide in from that edge) and
horizontally aligned along the left edge, center, or right edge of its container.
There are three ways to use the `OverlayToaster` component:
There are three ways to use __OverlayToaster__:
1. `OverlayToaster.create(props)` static method returns a new `Toaster`. Use the instance method `toaster.show()` to manipulate this instance. __(recommended)__
1. `OverlayToaster.create(props)` static method returns a new `Toaster` instance. Use the instance method `toaster.show()` to manipulate this instance. __(recommended)__
1. `<OverlayToaster><Toast />...</OverlayToaster>`: Render a `<OverlayToaster>` element with React `children`.
1. `<OverlayToaster ref={toaster => toaster.show({ ...toast })} />`: Render a `<OverlayToaster>` element and use the `ref` prop to access its instance methods.
1. `<OverlayToaster ref={(ref: Toaster) => ref.show({ ...toast })} />`: Render a `<OverlayToaster>` element and use the `ref` prop to access its instance methods.

@@ -49,3 +49,3 @@ <div class="@ns-callout @ns-intent-primary @ns-icon-info-sign">

`OverlayToaster` always disables `Overlay`'s `enforceFocus` behavior (meaning that you're not blocked
__OverlayToaster__ always disables Overlay's `enforceFocus` behavior (meaning that you're not blocked
from accessing other parts of the application while a toast is active), and by default also

@@ -62,11 +62,10 @@ disables `autoFocus` (meaning that focus will not switch to a toast when it appears). You can

The `OverlayToaster` component provides the static `create` method that returns a new `Toaster` instance, rendered into an
element attached to `<body>`. A `Toaster` instance
has a collection of methods to show and hide toasts in its given container.
__OverlayToaster__ provides the static `create` method that returns a new `Toaster`, rendered into an
element attached to `<body>`. A toaster instance has a collection of methods to show and hide toasts in its given container.
```ts
OverlayToaster.create(props?: ToasterProps, container = document.body): Toaster
OverlayOverlayToaster.create(props?: ToasterProps, container = document.body): Toaster
```
The `OverlayToaster` will be rendered into a new element appended to the given `container`.
The toaster will be rendered into a new element appended to the given `container`.
The `container` determines which element toasts are positioned relative to; the default value of `<body>` allows them to use the entire viewport.

@@ -85,3 +84,3 @@

Your application can contain several `Toaster` instances and easily share them across the codebase as modules.
Your application can contain several `ToasterInstance`s and easily share them across the codebase as modules.

@@ -93,3 +92,3 @@ The following code samples demonstrate our preferred pattern for intergrating a toaster into a React application:

```ts
import { Position, OverlayToaster } from "@blueprintjs/core";
import { OverlayToaster, Position } from "@blueprintjs/core";

@@ -132,3 +131,3 @@ /** Singleton toaster instance. Create separate instances for different options. */

```tsx
import { Button, Position, Toast, OverlayToaster, Toaster } from "@blueprintjs/core";
import { Button, OverlayToaster, Position, Toast, Toaster } from "@blueprintjs/core";
import * as React from "react";

@@ -135,0 +134,0 @@

@@ -33,3 +33,3 @@ @# useHotkeys

```tsx
import { InputGroup, KeyCombo, useHotkeys } from "@blueprintjs/core";
import { InputGroup, KeyComboTag, useHotkeys } from "@blueprintjs/core";
import React, { createRef, useCallback, useMemo } from "react";

@@ -61,3 +61,3 @@

<div tabIndex={0} onKeyDown={handleKeyDown} onKeyUp={handleKeyUp}>
Press <KeyCombo combo="R" /> to refresh data, <KeyCombo combo="F" /> to focus the input...
Press <KeyComboTag combo="R" /> to refresh data, <KeyComboTag combo="F" /> to focus the input...
<InputGroup inputRef={inputRef} />

@@ -64,0 +64,0 @@ </div>

@@ -24,2 +24,4 @@ /*

/* eslint-disable deprecation/deprecation */
export * from "./deprecatedTypeAliases";
export {

@@ -26,0 +28,0 @@ HotkeysTargetLegacy as HotkeysTarget,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc