@blueprintjs/core
Advanced tools
Comparing version 5.0.0-alpha.2 to 5.0.0-alpha.3
@@ -31,2 +31,3 @@ "use strict"; | ||
"icon", | ||
"iconSize", | ||
"inputClassName", | ||
@@ -49,2 +50,3 @@ "inputRef", | ||
"round", | ||
"size", | ||
"small", | ||
@@ -51,0 +53,0 @@ "tagName", |
@@ -5,3 +5,4 @@ import * as React from "react"; | ||
export { IconName, IconSize }; | ||
export interface IconProps extends IntentProps, Props, SVGIconProps { | ||
export declare type IconHTMLAttributes = Omit<React.HTMLAttributes<HTMLElement>, "children" | "title">; | ||
export interface IconProps extends IntentProps, Props, SVGIconProps, IconHTMLAttributes { | ||
/** | ||
@@ -29,2 +30,9 @@ * Whether the component should automatically load icon contents using an async import. | ||
icon: IconName | MaybeElement; | ||
/** | ||
* Alias for `size` prop. Kept around for backwards-compatibility with Blueprint v4.x, | ||
* will be removed in v6.0. | ||
* | ||
* @deprecated use `size` prop instead | ||
*/ | ||
iconSize?: number; | ||
/** Props to apply to the `SVG` element */ | ||
@@ -38,2 +46,2 @@ svgProps?: React.HTMLAttributes<SVGElement>; | ||
*/ | ||
export declare const Icon: React.FC<IconProps & Omit<React.HTMLAttributes<HTMLElement>, "title">>; | ||
export declare const Icon: React.FC<IconProps>; |
@@ -31,2 +31,3 @@ "use strict"; | ||
exports.Icon = React.forwardRef(function (props, ref) { | ||
var _a; | ||
var icon = props.icon; | ||
@@ -39,4 +40,6 @@ if (icon == null || typeof icon === "boolean") { | ||
} | ||
var autoLoad = props.autoLoad, className = props.className, color = props.color, size = props.size, _icon = props.icon, intent = props.intent, tagName = props.tagName, svgProps = props.svgProps, title = props.title, htmlTitle = props.htmlTitle, htmlProps = tslib_1.__rest(props, ["autoLoad", "className", "color", "size", "icon", "intent", "tagName", "svgProps", "title", "htmlTitle"]); | ||
var _a = React.useState(), Component = _a[0], setIconComponent = _a[1]; | ||
var autoLoad = props.autoLoad, className = props.className, color = props.color, _icon = props.icon, intent = props.intent, tagName = props.tagName, svgProps = props.svgProps, title = props.title, htmlTitle = props.htmlTitle, htmlProps = tslib_1.__rest(props, ["autoLoad", "className", "color", "icon", "intent", "tagName", "svgProps", "title", "htmlTitle"]); | ||
var _b = React.useState(), Component = _b[0], setIconComponent = _b[1]; | ||
// eslint-disable-next-line deprecation/deprecation | ||
var size = (_a = props.size) !== null && _a !== void 0 ? _a : props.iconSize; | ||
React.useEffect(function () { | ||
@@ -69,3 +72,3 @@ var shouldCancelIconLoading = false; | ||
: undefined; | ||
return React.createElement(tagName, tslib_1.__assign(tslib_1.__assign({}, htmlProps), { "aria-hidden": title ? undefined : true, className: (0, classnames_1.default)(common_1.Classes.ICON, sizeClass, common_1.Classes.iconClass(icon), common_1.Classes.intentClass(intent), className), "data-icon": icon, ref: ref, title: htmlTitle })); | ||
return React.createElement(tagName, tslib_1.__assign(tslib_1.__assign({}, (0, common_1.removeNonHTMLProps)(htmlProps)), { "aria-hidden": title ? undefined : true, className: (0, classnames_1.default)(common_1.Classes.ICON, sizeClass, common_1.Classes.iconClass(icon), common_1.Classes.intentClass(intent), className), "data-icon": icon, ref: ref, title: htmlTitle })); | ||
} | ||
@@ -77,3 +80,3 @@ else { | ||
// don't forward Classes.iconClass(icon) here, since the component template will render that class | ||
className: (0, classnames_1.default)(common_1.Classes.intentClass(intent), className), color: color, size: size, tagName: tagName, title: title, htmlTitle: htmlTitle, ref: ref, svgProps: svgProps }, htmlProps))); | ||
className: (0, classnames_1.default)(common_1.Classes.intentClass(intent), className), color: color, size: size, tagName: tagName, title: title, htmlTitle: htmlTitle, ref: ref, svgProps: svgProps }, (0, common_1.removeNonHTMLProps)(htmlProps)))); | ||
} | ||
@@ -80,0 +83,0 @@ }); |
@@ -51,3 +51,3 @@ export { Alert, AlertProps } from "./alert/alert"; | ||
export { PopoverProps, Popover, PopoverInteractionKind } from "./popover/popover"; | ||
export { DefaultPopoverTargetHTMLProps, PopoverSharedProps, PopoverTargetProps, PopoverClickTargetHandlers, PopoverHoverTargetHandlers, PopperBoundary, PopperCustomModifier, PopperModifierOverrides, Placement, PopperPlacements, StrictModifierNames, } from "./popover/popoverSharedProps"; | ||
export { DefaultPopoverTargetHTMLProps, PopoverPosition, PopoverSharedProps, PopoverTargetProps, PopoverClickTargetHandlers, PopoverHoverTargetHandlers, PopperBoundary, PopperCustomModifier, PopperModifierOverrides, Placement, PopperPlacements, StrictModifierNames, } from "./popover/popoverSharedProps"; | ||
export { PopupKind } from "./popover/popupKind"; | ||
@@ -68,3 +68,3 @@ export { Portal, PortalProps } from "./portal/portal"; | ||
export { Toast, ToastProps } from "./toast/toast"; | ||
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
export { Toaster, ToasterInstance, 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.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.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"); | ||
@@ -134,2 +134,3 @@ var alert_1 = require("./alert/alert"); | ||
var popoverSharedProps_1 = require("./popover/popoverSharedProps"); | ||
Object.defineProperty(exports, "PopoverPosition", { enumerable: true, get: function () { return popoverSharedProps_1.PopoverPosition; } }); | ||
Object.defineProperty(exports, "PopperPlacements", { enumerable: true, get: function () { return popoverSharedProps_1.PopperPlacements; } }); | ||
@@ -136,0 +137,0 @@ var popupKind_1 = require("./popover/popupKind"); |
@@ -22,1 +22,3 @@ import { Position } from "../../common"; | ||
} | ||
/** @deprecated use `Toaster` type instead */ | ||
export declare type ToasterInstance = Toaster; |
@@ -28,2 +28,3 @@ /* | ||
"icon", | ||
"iconSize", | ||
"inputClassName", | ||
@@ -46,2 +47,3 @@ "inputRef", | ||
"round", | ||
"size", | ||
"small", | ||
@@ -48,0 +50,0 @@ "tagName", |
@@ -5,3 +5,4 @@ import * as React from "react"; | ||
export { IconName, IconSize }; | ||
export interface IconProps extends IntentProps, Props, SVGIconProps { | ||
export declare type IconHTMLAttributes = Omit<React.HTMLAttributes<HTMLElement>, "children" | "title">; | ||
export interface IconProps extends IntentProps, Props, SVGIconProps, IconHTMLAttributes { | ||
/** | ||
@@ -29,2 +30,9 @@ * Whether the component should automatically load icon contents using an async import. | ||
icon: IconName | MaybeElement; | ||
/** | ||
* Alias for `size` prop. Kept around for backwards-compatibility with Blueprint v4.x, | ||
* will be removed in v6.0. | ||
* | ||
* @deprecated use `size` prop instead | ||
*/ | ||
iconSize?: number; | ||
/** Props to apply to the `SVG` element */ | ||
@@ -38,2 +46,2 @@ svgProps?: React.HTMLAttributes<SVGElement>; | ||
*/ | ||
export declare const Icon: React.FC<IconProps & Omit<React.HTMLAttributes<HTMLElement>, "title">>; | ||
export declare const Icon: React.FC<IconProps>; |
@@ -20,3 +20,3 @@ /* | ||
import { Icons, IconSize } from "@blueprintjs/icons"; | ||
import { Classes, DISPLAYNAME_PREFIX } from "../../common"; | ||
import { Classes, DISPLAYNAME_PREFIX, removeNonHTMLProps } from "../../common"; | ||
// re-export for convenience, since some users won't be importing from or have a direct dependency on the icons package | ||
@@ -30,2 +30,3 @@ export { IconSize }; | ||
export var Icon = React.forwardRef(function (props, ref) { | ||
var _a; | ||
var icon = props.icon; | ||
@@ -38,4 +39,6 @@ if (icon == null || typeof icon === "boolean") { | ||
} | ||
var autoLoad = props.autoLoad, className = props.className, color = props.color, size = props.size, _icon = props.icon, intent = props.intent, tagName = props.tagName, svgProps = props.svgProps, title = props.title, htmlTitle = props.htmlTitle, htmlProps = __rest(props, ["autoLoad", "className", "color", "size", "icon", "intent", "tagName", "svgProps", "title", "htmlTitle"]); | ||
var _a = React.useState(), Component = _a[0], setIconComponent = _a[1]; | ||
var autoLoad = props.autoLoad, className = props.className, color = props.color, _icon = props.icon, intent = props.intent, tagName = props.tagName, svgProps = props.svgProps, title = props.title, htmlTitle = props.htmlTitle, htmlProps = __rest(props, ["autoLoad", "className", "color", "icon", "intent", "tagName", "svgProps", "title", "htmlTitle"]); | ||
var _b = React.useState(), Component = _b[0], setIconComponent = _b[1]; | ||
// eslint-disable-next-line deprecation/deprecation | ||
var size = (_a = props.size) !== null && _a !== void 0 ? _a : props.iconSize; | ||
React.useEffect(function () { | ||
@@ -68,3 +71,3 @@ var shouldCancelIconLoading = false; | ||
: undefined; | ||
return React.createElement(tagName, __assign(__assign({}, htmlProps), { "aria-hidden": title ? undefined : true, className: classNames(Classes.ICON, sizeClass, Classes.iconClass(icon), Classes.intentClass(intent), className), "data-icon": icon, ref: ref, title: htmlTitle })); | ||
return React.createElement(tagName, __assign(__assign({}, removeNonHTMLProps(htmlProps)), { "aria-hidden": title ? undefined : true, className: classNames(Classes.ICON, sizeClass, Classes.iconClass(icon), Classes.intentClass(intent), className), "data-icon": icon, ref: ref, title: htmlTitle })); | ||
} | ||
@@ -76,3 +79,3 @@ else { | ||
// don't forward Classes.iconClass(icon) here, since the component template will render that class | ||
className: classNames(Classes.intentClass(intent), className), color: color, size: size, tagName: tagName, title: title, htmlTitle: htmlTitle, ref: ref, svgProps: svgProps }, htmlProps))); | ||
className: classNames(Classes.intentClass(intent), className), color: color, size: size, tagName: tagName, title: title, htmlTitle: htmlTitle, ref: ref, svgProps: svgProps }, removeNonHTMLProps(htmlProps)))); | ||
} | ||
@@ -79,0 +82,0 @@ }); |
@@ -51,3 +51,3 @@ export { Alert, AlertProps } from "./alert/alert"; | ||
export { PopoverProps, Popover, PopoverInteractionKind } from "./popover/popover"; | ||
export { DefaultPopoverTargetHTMLProps, PopoverSharedProps, PopoverTargetProps, PopoverClickTargetHandlers, PopoverHoverTargetHandlers, PopperBoundary, PopperCustomModifier, PopperModifierOverrides, Placement, PopperPlacements, StrictModifierNames, } from "./popover/popoverSharedProps"; | ||
export { DefaultPopoverTargetHTMLProps, PopoverPosition, PopoverSharedProps, PopoverTargetProps, PopoverClickTargetHandlers, PopoverHoverTargetHandlers, PopperBoundary, PopperCustomModifier, PopperModifierOverrides, Placement, PopperPlacements, StrictModifierNames, } from "./popover/popoverSharedProps"; | ||
export { PopupKind } from "./popover/popupKind"; | ||
@@ -68,3 +68,3 @@ export { Portal, PortalProps } from "./portal/portal"; | ||
export { Toast, ToastProps } from "./toast/toast"; | ||
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
export { TooltipProps, Tooltip } from "./tooltip/tooltip"; | ||
@@ -71,0 +71,0 @@ export { Tree, TreeProps } from "./tree/tree"; |
@@ -63,3 +63,3 @@ /* | ||
export { Popover, PopoverInteractionKind } from "./popover/popover"; | ||
export { PopperPlacements, } from "./popover/popoverSharedProps"; | ||
export { PopoverPosition, PopperPlacements, } from "./popover/popoverSharedProps"; | ||
export { PopupKind } from "./popover/popupKind"; | ||
@@ -66,0 +66,0 @@ export { Portal } from "./portal/portal"; |
@@ -22,1 +22,3 @@ import { Position } from "../../common"; | ||
} | ||
/** @deprecated use `Toaster` type instead */ | ||
export declare type ToasterInstance = Toaster; |
@@ -27,2 +27,3 @@ /* | ||
"icon", | ||
"iconSize", | ||
"inputClassName", | ||
@@ -45,2 +46,3 @@ "inputRef", | ||
"round", | ||
"size", | ||
"small", | ||
@@ -47,0 +49,0 @@ "tagName", |
@@ -5,3 +5,4 @@ import * as React from "react"; | ||
export { IconName, IconSize }; | ||
export interface IconProps extends IntentProps, Props, SVGIconProps { | ||
export declare type IconHTMLAttributes = Omit<React.HTMLAttributes<HTMLElement>, "children" | "title">; | ||
export interface IconProps extends IntentProps, Props, SVGIconProps, IconHTMLAttributes { | ||
/** | ||
@@ -29,2 +30,9 @@ * Whether the component should automatically load icon contents using an async import. | ||
icon: IconName | MaybeElement; | ||
/** | ||
* Alias for `size` prop. Kept around for backwards-compatibility with Blueprint v4.x, | ||
* will be removed in v6.0. | ||
* | ||
* @deprecated use `size` prop instead | ||
*/ | ||
iconSize?: number; | ||
/** Props to apply to the `SVG` element */ | ||
@@ -38,2 +46,2 @@ svgProps?: React.HTMLAttributes<SVGElement>; | ||
*/ | ||
export declare const Icon: React.FC<IconProps & Omit<React.HTMLAttributes<HTMLElement>, "title">>; | ||
export declare const Icon: React.FC<IconProps>; |
@@ -19,3 +19,3 @@ /* | ||
import { Icons, IconSize } from "@blueprintjs/icons"; | ||
import { Classes, DISPLAYNAME_PREFIX } from "../../common"; | ||
import { Classes, DISPLAYNAME_PREFIX, removeNonHTMLProps } from "../../common"; | ||
// re-export for convenience, since some users won't be importing from or have a direct dependency on the icons package | ||
@@ -36,4 +36,6 @@ export { IconSize }; | ||
} | ||
const { autoLoad, className, color, size, icon: _icon, intent, tagName, svgProps, title, htmlTitle, ...htmlProps } = props; | ||
const { autoLoad, className, color, icon: _icon, intent, tagName, svgProps, title, htmlTitle, ...htmlProps } = props; | ||
const [Component, setIconComponent] = React.useState(); | ||
// eslint-disable-next-line deprecation/deprecation | ||
const size = props.size ?? props.iconSize; | ||
React.useEffect(() => { | ||
@@ -67,3 +69,3 @@ let shouldCancelIconLoading = false; | ||
return React.createElement(tagName, { | ||
...htmlProps, | ||
...removeNonHTMLProps(htmlProps), | ||
"aria-hidden": title ? undefined : true, | ||
@@ -81,3 +83,3 @@ className: classNames(Classes.ICON, sizeClass, Classes.iconClass(icon), Classes.intentClass(intent), className), | ||
// don't forward Classes.iconClass(icon) here, since the component template will render that class | ||
className: classNames(Classes.intentClass(intent), className), color: color, size: size, tagName: tagName, title: title, htmlTitle: htmlTitle, ref: ref, svgProps: svgProps, ...htmlProps })); | ||
className: classNames(Classes.intentClass(intent), className), color: color, size: size, tagName: tagName, title: title, htmlTitle: htmlTitle, ref: ref, svgProps: svgProps, ...removeNonHTMLProps(htmlProps) })); | ||
} | ||
@@ -84,0 +86,0 @@ }); |
@@ -51,3 +51,3 @@ export { Alert, AlertProps } from "./alert/alert"; | ||
export { PopoverProps, Popover, PopoverInteractionKind } from "./popover/popover"; | ||
export { DefaultPopoverTargetHTMLProps, PopoverSharedProps, PopoverTargetProps, PopoverClickTargetHandlers, PopoverHoverTargetHandlers, PopperBoundary, PopperCustomModifier, PopperModifierOverrides, Placement, PopperPlacements, StrictModifierNames, } from "./popover/popoverSharedProps"; | ||
export { DefaultPopoverTargetHTMLProps, PopoverPosition, PopoverSharedProps, PopoverTargetProps, PopoverClickTargetHandlers, PopoverHoverTargetHandlers, PopperBoundary, PopperCustomModifier, PopperModifierOverrides, Placement, PopperPlacements, StrictModifierNames, } from "./popover/popoverSharedProps"; | ||
export { PopupKind } from "./popover/popupKind"; | ||
@@ -68,3 +68,3 @@ export { Portal, PortalProps } from "./portal/portal"; | ||
export { Toast, ToastProps } from "./toast/toast"; | ||
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
export { TooltipProps, Tooltip } from "./tooltip/tooltip"; | ||
@@ -71,0 +71,0 @@ export { Tree, TreeProps } from "./tree/tree"; |
@@ -63,3 +63,3 @@ /* | ||
export { Popover, PopoverInteractionKind } from "./popover/popover"; | ||
export { PopperPlacements, } from "./popover/popoverSharedProps"; | ||
export { PopoverPosition, PopperPlacements, } from "./popover/popoverSharedProps"; | ||
export { PopupKind } from "./popover/popupKind"; | ||
@@ -66,0 +66,0 @@ export { Portal } from "./portal/portal"; |
@@ -22,1 +22,3 @@ import { Position } from "../../common"; | ||
} | ||
/** @deprecated use `Toaster` type instead */ | ||
export declare type ToasterInstance = Toaster; |
{ | ||
"name": "@blueprintjs/core", | ||
"version": "5.0.0-alpha.2", | ||
"version": "5.0.0-alpha.3", | ||
"description": "Core styles & components", | ||
@@ -73,3 +73,3 @@ "main": "lib/cjs/index.js", | ||
"devDependencies": { | ||
"@blueprintjs/karma-build-scripts": "^5.0.0-alpha.1", | ||
"@blueprintjs/karma-build-scripts": "^5.0.0-alpha.2", | ||
"@blueprintjs/node-build-scripts": "^8.0.0-alpha.1", | ||
@@ -76,0 +76,0 @@ "@blueprintjs/test-commons": "^2.0.0-alpha.1", |
@@ -121,2 +121,3 @@ /* | ||
"icon", | ||
"iconSize", | ||
"inputClassName", | ||
@@ -139,2 +140,3 @@ "inputRef", | ||
"round", | ||
"size", | ||
"small", | ||
@@ -141,0 +143,0 @@ "tagName", |
@@ -81,2 +81,3 @@ /* | ||
DefaultPopoverTargetHTMLProps, | ||
PopoverPosition, | ||
PopoverSharedProps, | ||
@@ -108,3 +109,4 @@ PopoverTargetProps, | ||
export { Toast, ToastProps } from "./toast/toast"; | ||
export { Toaster, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
// eslint-disable-next-line deprecation/deprecation | ||
export { Toaster, ToasterInstance, ToastOptions, ToasterPosition } from "./toast/toaster"; | ||
export { TooltipProps, Tooltip } from "./tooltip/tooltip"; | ||
@@ -111,0 +113,0 @@ export { Tree, TreeProps } from "./tree/tree"; |
@@ -47,1 +47,4 @@ /* | ||
} | ||
/** @deprecated use `Toaster` type instead */ | ||
export type ToasterInstance = Toaster; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5541810
80260