Socket
Socket
Sign inDemoInstall

@blueprintjs/core

Package Overview
Dependencies
Maintainers
1
Versions
298
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 1.11.1 to 1.12.0

dist/components/text/text.d.ts

2

dist/common/errors.d.ts

@@ -21,2 +21,4 @@ export declare function deprecationWarning(oldName: string, newName: string, message?: string): string;

export declare const RADIOGROUP_CHILDREN_OPTIONS_MUTEX: string;
export declare const SLIDER_ZERO_STEP: string;
export declare const SLIDER_ZERO_LABEL_STEP: string;
export declare const RANGESLIDER_NULL_VALUE: string;

@@ -23,0 +25,0 @@ export declare const TABS_FIRST_CHILD: string;

6

dist/common/errors.js

@@ -32,6 +32,8 @@ /*

exports.POPOVER_MODAL_INTERACTION = ns + " <Popover isModal={true}> requires interactionKind={PopoverInteractionKind.CLICK}.";
exports.POPOVER_SMART_POSITIONING_INLINE = "{ns} <Popover useSmartPositioning={true}> requires inline={false}.";
exports.POPOVER_SMART_POSITIONING_INLINE = ns + " <Popover useSmartPositioning={true}> requires inline={false}.";
exports.RADIOGROUP_RADIO_CHILDREN = ns + " <RadioGroup> only supports <Radio> children";
exports.RADIOGROUP_CHILDREN_OPTIONS_MUTEX = ns + " <RadioGroup> children and options props are mutually exclusive.";
exports.RANGESLIDER_NULL_VALUE = ns + " <RangeSlider> value prop must be an array of two non-null numbers";
exports.SLIDER_ZERO_STEP = ns + " <Slider> stepSize must be greater than zero.";
exports.SLIDER_ZERO_LABEL_STEP = ns + " <Slider> labelStepSize must be greater than zero.";
exports.RANGESLIDER_NULL_VALUE = ns + " <RangeSlider> value prop must be an array of two non-null numbers.";
exports.TABS_FIRST_CHILD = ns + " First child of <Tabs> component should be a <TabList>";

@@ -38,0 +40,0 @@ exports.TABS_MISMATCH = ns + " Number of <Tab> components should equal number of <TabPanel> components";

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

"containerRef",
"defaultIndeterminate",
"elementRef",

@@ -17,0 +16,0 @@ "iconName",

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

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var position_1 = require("./position");

@@ -24,15 +25,9 @@ var DEFAULT_CONSTRAINTS = {

/** @internal */
function createTetherOptions(element, target, position, useSmartPositioning, constraints) {
if (constraints == null && useSmartPositioning) {
constraints = [DEFAULT_CONSTRAINTS];
function createTetherOptions(element, target, position, useSmartPositioning, tetherOptions) {
if (tetherOptions === void 0) { tetherOptions = {}; }
if (tetherOptions.constraints == null && useSmartPositioning) {
tetherOptions.constraints = [DEFAULT_CONSTRAINTS];
}
var options = {
attachment: getPopoverAttachment(position),
bodyElement: fakeHtmlElement,
classPrefix: "pt-tether",
constraints: constraints,
element: element,
target: target,
targetAttachment: getTargetAttachment(position),
};
var options = tslib_1.__assign({}, tetherOptions, { attachment: getPopoverAttachment(position), bodyElement: fakeHtmlElement, classPrefix: "pt-tether", element: element,
target: target, targetAttachment: getTargetAttachment(position) });
return options;

@@ -39,0 +34,0 @@ }

@@ -22,3 +22,6 @@ /** Returns whether `process.env.NODE_ENV` exists and equals `env`. */

export declare function approxEqual(a: number, b: number, tolerance?: number): boolean;
/** Clamps the given number between min and max values. Returns value if within range, or closest bound. */
export declare function clamp(val: number, min: number, max: number): number;
/** Returns the number of decimal places in the given number. */
export declare function countDecimalPlaces(num: number): number;
/**

@@ -25,0 +28,0 @@ * Throttle an event on an EventTarget by wrapping it in `requestAnimationFrame` call.

@@ -55,3 +55,3 @@ /*

exports.approxEqual = approxEqual;
/* Clamps the given number between min and max values. Returns value if within range, or closest bound. */
/** Clamps the given number between min and max values. Returns value if within range, or closest bound. */
function clamp(val, min, max) {

@@ -64,2 +64,10 @@ if (max < min) {

exports.clamp = clamp;
/** Returns the number of decimal places in the given number. */
function countDecimalPlaces(num) {
if (typeof num !== "number" || Math.floor(num) === num) {
return 0;
}
return num.toString().split(".")[1].length;
}
exports.countDecimalPlaces = countDecimalPlaces;
/**

@@ -66,0 +74,0 @@ * Throttle an event on an EventTarget by wrapping it in `requestAnimationFrame` call.

@@ -19,2 +19,8 @@ /*

var utils_1 = require("../../common/utils");
var INVALID_PROPS = [
// we spread props to `<input>` but render `children` as its sibling
"children",
"defaultIndeterminate",
"indeterminate",
];
/** Base Component class for all Controls */

@@ -31,4 +37,5 @@ var Control = (function (_super) {

var className = classNames(Classes.CONTROL, typeClassName, (_a = {}, _a[Classes.DISABLED] = this.props.disabled, _a), this.props.className);
var inputProps = props_1.removeNonHTMLProps(this.props, INVALID_PROPS, true);
return (React.createElement("label", { className: className, style: this.props.style },
React.createElement("input", tslib_1.__assign({}, props_1.removeNonHTMLProps(this.props, ["children", "indeterminate"], true), { ref: inputRef, type: type })),
React.createElement("input", tslib_1.__assign({}, inputProps, { ref: inputRef, type: type })),
React.createElement("span", { className: Classes.CONTROL_INDICATOR }),

@@ -35,0 +42,0 @@ this.props.label,

@@ -65,2 +65,3 @@ import * as React from "react";

shouldSelectAfterUpdate?: boolean;
stepMaxPrecision?: number;
value?: string;

@@ -117,2 +118,4 @@ }

private isFloatingPointNumericCharacter(char);
private getStepMaxPrecision(props);
private toMaxPrecision(value);
}

@@ -119,0 +122,0 @@ export declare const NumericInputFactory: React.ComponentFactory<React.HTMLProps<HTMLInputElement> & INumericInputProps & {

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

shouldSelectAfterUpdate: false,
stepMaxPrecision: _this.getStepMaxPrecision(props),
value: _this.getValueOrEmptyValue(props.value),

@@ -138,15 +139,14 @@ };

var didBoundsChange = didMinChange || didMaxChange;
var sanitizedValue = (value !== NumericInput_1.VALUE_EMPTY)
? this.getSanitizedValue(value, /* delta */ 0, nextProps.min, nextProps.max)
: NumericInput_1.VALUE_EMPTY;
var stepMaxPrecision = this.getStepMaxPrecision(nextProps);
// if a new min and max were provided that cause the existing value to fall
// outside of the new bounds, then clamp the value to the new valid range.
if (didBoundsChange) {
var sanitizedValue = (value !== NumericInput_1.VALUE_EMPTY)
? this.getSanitizedValue(value, /* delta */ 0, nextProps.min, nextProps.max)
: NumericInput_1.VALUE_EMPTY;
if (sanitizedValue !== this.state.value) {
this.setState({ value: sanitizedValue });
this.invokeOnChangeCallbacks(sanitizedValue);
}
if (didBoundsChange && sanitizedValue !== this.state.value) {
this.setState({ stepMaxPrecision: stepMaxPrecision, value: sanitizedValue });
this.invokeOnChangeCallbacks(sanitizedValue);
}
else {
this.setState({ value: value });
this.setState({ stepMaxPrecision: stepMaxPrecision, value: value });
}

@@ -159,2 +159,3 @@ };

"buttonPosition",
"className",
"majorStepSize",

@@ -180,3 +181,3 @@ "minorStepSize",

var decrementButton = this.renderButton(NumericInput_1.DECREMENT_KEY, NumericInput_1.DECREMENT_ICON_NAME, this.handleDecrementButtonClick);
var buttonGroup = (React.createElement("div", { key: "button-group", className: classNames(common_1.Classes.BUTTON_GROUP, common_1.Classes.VERTICAL) },
var buttonGroup = (React.createElement("div", { key: "button-group", className: classNames(common_1.Classes.BUTTON_GROUP, common_1.Classes.VERTICAL, common_1.Classes.FIXED) },
incrementButton,

@@ -262,5 +263,3 @@ decrementButton));

}
// truncate floating-point result to avoid precision issues when adding
// non-integer, binary-unfriendly deltas like 0.1
var nextValue = parseFloat((parseFloat(value) + delta).toFixed(2));
var nextValue = this.toMaxPrecision(parseFloat(value) + delta);
// defaultProps won't work if the user passes in null, so just default

@@ -311,2 +310,17 @@ // to +/- infinity here instead, as a catch-all.

};
NumericInput.prototype.getStepMaxPrecision = function (props) {
if (props.minorStepSize != null) {
return common_1.Utils.countDecimalPlaces(props.minorStepSize);
}
else {
return common_1.Utils.countDecimalPlaces(props.stepSize);
}
};
NumericInput.prototype.toMaxPrecision = function (value) {
// round the value to have the specified maximum precision (toFixed is the wrong choice,
// because it would show trailing zeros in the decimal part out to the specified precision)
// source: http://stackoverflow.com/a/18358056/5199574
var scaleFactor = Math.pow(10, this.state.stepMaxPrecision);
return Math.round(value * scaleFactor) / scaleFactor;
};
return NumericInput;

@@ -313,0 +327,0 @@ }(common_1.AbstractComponent));

@@ -21,2 +21,3 @@ import * as contextMenu from "./context-menu/contextMenu";

export * from "./overlay/overlay";
export * from "./text/text";
export * from "./popover/popover";

@@ -23,0 +24,0 @@ export * from "./popover/svgPopover";

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

__export(require("./overlay/overlay"));
__export(require("./text/text"));
__export(require("./popover/popover"));

@@ -39,0 +40,0 @@ __export(require("./popover/svgPopover"));

import * as React from "react";
import { IProps } from "../../common/props";
export interface INonIdealStateProps extends IProps {
/**
* An action that's attached to the non-ideal state.
*/
action?: JSX.Element;

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

import * as React from "react";
import * as Tether from "tether";
import { AbstractComponent } from "../../common/abstractComponent";

@@ -22,3 +23,5 @@ import * as PosUtils from "../../common/position";

* Constraints for the underlying Tether instance.
* If defined, this will overwrite `tetherOptions.constraints`.
* See http://tether.io/#constraints.
* @deprecated since v1.12.0; use `tetherOptions` instead.
*/

@@ -82,2 +85,9 @@ constraints?: TetherUtils.ITetherConstraint[];

/**
* Whether the popover should open when its target is focused.
* If `true`, target will render with `tabindex="0"` to make it focusable via keyboard navigation.
* This prop is only available when `interactionKind` is `HOVER` or `HOVER_TARGET_ONLY`.
* @default: true
*/
openOnTargetFocus?: boolean;
/**
* A space-delimited string of class names that are applied to the popover (but not the target).

@@ -114,2 +124,7 @@ */

/**
* Options for the underlying Tether instance.
* See http://tether.io/#options
*/
tetherOptions?: Partial<Tether.ITetherOptions>;
/**
* Whether the arrow's offset should be computed such that it always points at the center

@@ -160,2 +175,4 @@ * of the target. If false, arrow position is hardcoded via CSS, which expects a 30px target.

private handleContentMount;
private handleTargetFocus;
private handleTargetBlur;
private handleMouseEnter;

@@ -171,2 +188,3 @@ private handleMouseLeave;

private isElementInPopover(element);
private isHoverInteractionKind();
}

@@ -173,0 +191,0 @@ export declare const PopoverFactory: React.ComponentFactory<IPopoverProps & {

@@ -59,2 +59,20 @@ /*

};
_this.handleTargetFocus = function (e) {
if (_this.props.openOnTargetFocus && _this.isHoverInteractionKind()) {
_this.handleMouseEnter(e);
}
};
_this.handleTargetBlur = function (e) {
if (_this.props.openOnTargetFocus && _this.isHoverInteractionKind()) {
// if the next element to receive focus is within the popover, we'll want to leave the
// popover open. we must do this check *after* the next element focuses, so we use a
// timeout of 0 to flush the rest of the event queue before proceeding.
_this.setTimeout(function () {
var popoverElement = _this.popoverElement;
if (popoverElement == null || !popoverElement.contains(document.activeElement)) {
_this.handleMouseLeave(e);
}
}, 0);
}
};
_this.handleMouseEnter = function (e) {

@@ -65,3 +83,4 @@ // if we're entering the popover, and the mode is set to be HOVER_TARGET_ONLY, we want to manually

&& _this.isElementInPopover(e.target)
&& _this.props.interactionKind === PopoverInteractionKind.HOVER_TARGET_ONLY) {
&& _this.props.interactionKind === PopoverInteractionKind.HOVER_TARGET_ONLY
&& !_this.props.openOnTargetFocus) {
_this.handleMouseLeave(e);

@@ -118,7 +137,8 @@ }

Popover.prototype.render = function () {
var _a = this.props, className = _a.className, interactionKind = _a.interactionKind;
var className = this.props.className;
var targetProps;
if (interactionKind === PopoverInteractionKind.HOVER
|| interactionKind === PopoverInteractionKind.HOVER_TARGET_ONLY) {
if (this.isHoverInteractionKind()) {
targetProps = {
onBlur: this.handleTargetBlur,
onFocus: this.handleTargetFocus,
onMouseEnter: this.handleMouseEnter,

@@ -134,10 +154,13 @@ onMouseLeave: this.handleMouseLeave,

}
targetProps.className = classNames(Classes.POPOVER_TARGET, (_b = {},
_b[Classes.POPOVER_OPEN] = this.state.isOpen,
_b), className);
targetProps.className = classNames(Classes.POPOVER_TARGET, (_a = {},
_a[Classes.POPOVER_OPEN] = this.state.isOpen,
_a), className);
targetProps.ref = this.refHandlers.target;
var childrenBaseProps = this.props.openOnTargetFocus && this.isHoverInteractionKind()
? { tabIndex: 0 }
: {};
var children = this.props.children;
if (typeof this.props.children === "string") {
// wrap text in a <span> so that we have a consistent way to interact with the target node(s)
children = React.DOM.span({}, this.props.children);
children = React.DOM.span(childrenBaseProps, this.props.children);
}

@@ -147,8 +170,8 @@ else {

// force disable single Tooltip child when popover is open (BLUEPRINT-552)
if (this.state.isOpen && child.type === tooltip_1.Tooltip) {
children = React.cloneElement(child, { isDisabled: true });
}
var childProps = (this.state.isOpen && child.type === tooltip_1.Tooltip)
? tslib_1.__assign({}, childrenBaseProps, { isDisabled: true }) : childrenBaseProps;
children = React.cloneElement(child, childProps);
}
return React.createElement(this.props.rootElementTag, targetProps, children, React.createElement(overlay_1.Overlay, { autoFocus: this.props.autoFocus, backdropClassName: Classes.POPOVER_BACKDROP, backdropProps: this.props.backdropProps, canEscapeKeyClose: this.props.canEscapeKeyClose, canOutsideClickClose: this.props.interactionKind === PopoverInteractionKind.CLICK, className: this.props.portalClassName, didOpen: this.handleContentMount, enforceFocus: this.props.enforceFocus, hasBackdrop: this.props.isModal, inline: this.props.inline, isOpen: this.state.isOpen, lazy: this.props.lazy, onClose: this.handleOverlayClose, transitionDuration: this.props.transitionDuration, transitionName: Classes.POPOVER }, this.renderPopover()));
var _b;
var _a;
};

@@ -294,3 +317,7 @@ Popover.prototype.componentDidMount = function () {

var target = react_dom_1.findDOMNode(this).childNodes[0];
var tetherOptions = TetherUtils.createTetherOptions(this.popoverElement, target, this.props.position, this.props.useSmartPositioning, this.props.constraints);
// constraints is deprecated but must still be supported through tetherOptions until v2.0
if (this.props.constraints != null) {
this.props.tetherOptions.constraints = this.props.constraints;
}
var tetherOptions = TetherUtils.createTetherOptions(this.popoverElement, target, this.props.position, this.props.useSmartPositioning, this.props.tetherOptions);
if (this.tether == null) {

@@ -339,2 +366,6 @@ this.tether = new Tether(tetherOptions);

};
Popover.prototype.isHoverInteractionKind = function () {
return this.props.interactionKind === PopoverInteractionKind.HOVER
|| this.props.interactionKind === PopoverInteractionKind.HOVER_TARGET_ONLY;
};
return Popover;

@@ -354,5 +385,7 @@ }(abstractComponent_1.AbstractComponent));

isModal: false,
openOnTargetFocus: true,
popoverClassName: "",
position: PosUtils.Position.RIGHT,
rootElementTag: "span",
tetherOptions: {},
transitionDuration: 300,

@@ -359,0 +392,0 @@ useSmartArrowPositioning: true,

@@ -11,3 +11,3 @@ import * as React from "react";

/**
* Increment between successive labels.
* Increment between successive labels. Must be greater than zero.
* @default 1

@@ -17,2 +17,9 @@ */

/**
* Number of decimal places to use when rendering label value. Default value is the number of
* decimals used in the `stepSize` prop. This prop has _no effect_ if you supply a custom
* `renderLabel` callback.
* @default inferred from stepSize
*/
labelPrecision?: number;
/**
* Maximum value of the slider.

@@ -34,3 +41,3 @@ * @default 10

/**
* Increment between successive values; amount by which the handle moves.
* Increment between successive values; amount by which the handle moves. Must be greater than zero.
* @default 1

@@ -41,8 +48,10 @@ */

* Callback to render a single label. Useful for formatting numbers as currency or percentages.
* If `true`, labels will use number value. If `false`, labels will not be shown.
* If `true`, labels will use number value formatted to `labelPrecision` decimal places.
* If `false`, labels will not be shown.
* @default true
*/
renderLabel?: ((value: number) => string | JSX.Element) | boolean;
renderLabel?: boolean | ((value: number) => string | JSX.Element);
}
export interface ISliderState {
labelPrecision?: number;
/** the client size, in pixels, of one tick */

@@ -52,9 +61,10 @@ tickSize?: number;

export declare abstract class CoreSlider<P extends ICoreSliderProps> extends AbstractComponent<P, ISliderState> {
state: ISliderState;
className: string;
private trackElement;
private refHandlers;
constructor(props: P);
render(): JSX.Element;
componentDidMount(): void;
componentDidUpdate(): void;
componentWillReceiveProps(props: P): void;
protected abstract renderHandles(): JSX.Element | JSX.Element[];

@@ -66,2 +76,3 @@ protected abstract renderFill(): JSX.Element;

protected formatLabel(value: number): React.ReactChild;
protected validateProps(props: P): void;
private maybeRenderAxis();

@@ -72,3 +83,4 @@ private maybeRenderFill();

private canHandleTrackEvent;
private getLabelPrecision({labelPrecision, stepSize});
private updateTickSize();
}

@@ -15,10 +15,8 @@ /*

var Classes = require("../../common/classes");
var Errors = require("../../common/errors");
var utils_1 = require("../../common/utils");
var CoreSlider = (function (_super) {
tslib_1.__extends(CoreSlider, _super);
function CoreSlider() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
tickSize: 0,
};
function CoreSlider(props) {
var _this = _super.call(this, props) || this;
_this.className = Classes.SLIDER;

@@ -43,2 +41,6 @@ _this.refHandlers = {

};
_this.state = {
labelPrecision: _this.getLabelPrecision(props),
tickSize: 0,
};
return _this;

@@ -65,2 +67,6 @@ }

};
CoreSlider.prototype.componentWillReceiveProps = function (props) {
_super.prototype.componentWillReceiveProps.call(this, props);
this.setState({ labelPrecision: this.getLabelPrecision(props) });
};
CoreSlider.prototype.formatLabel = function (value) {

@@ -75,5 +81,13 @@ var renderLabel = this.props.renderLabel;

else {
return value;
return value.toFixed(this.state.labelPrecision);
}
};
CoreSlider.prototype.validateProps = function (props) {
if (props.stepSize <= 0) {
throw new Error(Errors.SLIDER_ZERO_STEP);
}
if (props.labelStepSize <= 0) {
throw new Error(Errors.SLIDER_ZERO_LABEL_STEP);
}
};
CoreSlider.prototype.maybeRenderAxis = function () {

@@ -98,2 +112,9 @@ var _a = this.props, max = _a.max, min = _a.min, labelStepSize = _a.labelStepSize;

};
CoreSlider.prototype.getLabelPrecision = function (_a) {
var labelPrecision = _a.labelPrecision, stepSize = _a.stepSize;
// infer default label precision from stepSize because that's how much the handle moves.
return (labelPrecision == null)
? utils_1.countDecimalPlaces(stepSize)
: labelPrecision;
};
CoreSlider.prototype.updateTickSize = function () {

@@ -100,0 +121,0 @@ if (this.trackElement != null) {

@@ -31,4 +31,2 @@ import * as React from "react";

}
export declare const RangeSliderFactory: React.ComponentFactory<IRangeSliderProps & {
children?: React.ReactNode;
}, RangeSlider>;
export declare const RangeSliderFactory: React.Factory<IRangeSliderProps>;

@@ -29,4 +29,2 @@ import * as React from "react";

}
export declare const SliderFactory: React.ComponentFactory<ISliderProps & {
children?: React.ReactNode;
}, Slider>;
export declare const SliderFactory: React.Factory<ISliderProps>;

@@ -13,2 +13,3 @@ import * as React from "react";

* See http://github.hubspot.com/tether/#constraints
* @deprecated since v1.12.0; use `tetherOptions` instead.
*/

@@ -58,2 +59,8 @@ constraints?: ITetherConstraint[];

/**
* Whether the tooltip should open when its target is focused.
* If `true`, target will render with `tabindex="0"` to make it focusable via keyboard navigation.
* @default: true
*/
openOnTargetFocus?: boolean;
/**
* Space-delimited string of class names applied to the

@@ -74,2 +81,7 @@ * portal which holds the tooltip if `inline` is set to `false`.

/**
* Options for the underlying Tether instance.
* See http://tether.io/#options
*/
tetherOptions?: Partial<Tether.ITetherOptions>;
/**
* A space-delimited string of class names that are applied to the tooltip (but not the target).

@@ -100,8 +112,6 @@ */

export declare class Tooltip extends React.Component<ITooltipProps, {}> {
static defaultProps: ITooltipProps;
static defaultProps: Partial<ITooltipProps>;
displayName: string;
render(): JSX.Element;
}
export declare const TooltipFactory: React.ComponentFactory<ITooltipProps & {
children?: React.ReactNode;
}, Tooltip>;
export declare const TooltipFactory: React.Factory<Partial<ITooltipProps>>;

@@ -24,5 +24,5 @@ /*

Tooltip.prototype.render = function () {
var _a = this.props, children = _a.children, intent = _a.intent, tooltipClassName = _a.tooltipClassName;
var _a = this.props, children = _a.children, intent = _a.intent, openOnTargetFocus = _a.openOnTargetFocus, tooltipClassName = _a.tooltipClassName;
var classes = classNames(Classes.TOOLTIP, Classes.intentClass(intent), tooltipClassName);
return (React.createElement(popover_1.Popover, tslib_1.__assign({}, this.props, { arrowSize: 22, autoFocus: false, canEscapeKeyClose: false, enforceFocus: false, interactionKind: popover_1.PopoverInteractionKind.HOVER_TARGET_ONLY, lazy: true, popoverClassName: classes }), children));
return (React.createElement(popover_1.Popover, tslib_1.__assign({}, this.props, { arrowSize: 22, autoFocus: false, canEscapeKeyClose: false, enforceFocus: false, interactionKind: popover_1.PopoverInteractionKind.HOVER_TARGET_ONLY, lazy: true, openOnTargetFocus: openOnTargetFocus, popoverClassName: classes }), children));
};

@@ -32,10 +32,8 @@ return Tooltip;

Tooltip.defaultProps = {
className: "",
content: "",
hoverCloseDelay: 0,
hoverOpenDelay: 100,
isDisabled: false,
openOnTargetFocus: true,
position: position_1.Position.TOP,
rootElementTag: "span",
tooltipClassName: "",
transitionDuration: 100,

@@ -42,0 +40,0 @@ useSmartArrowPositioning: true,

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

export * from "./sliderExample";
export * from "./textExample";
export * from "./spinnerExample";

@@ -31,0 +32,0 @@ export * from "./tabsExample";

{
"name": "@blueprintjs/core",
"version": "1.11.1",
"version": "1.12.0",
"description": "Core styles & components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -47,3 +47,3 @@ /*

export const POPOVER_SMART_POSITIONING_INLINE =
`{ns} <Popover useSmartPositioning={true}> requires inline={false}.`;
`${ns} <Popover useSmartPositioning={true}> requires inline={false}.`;

@@ -54,3 +54,5 @@ export const RADIOGROUP_RADIO_CHILDREN = `${ns} <RadioGroup> only supports <Radio> children`;

export const RANGESLIDER_NULL_VALUE = `${ns} <RangeSlider> value prop must be an array of two non-null numbers`;
export const SLIDER_ZERO_STEP = `${ns} <Slider> stepSize must be greater than zero.`;
export const SLIDER_ZERO_LABEL_STEP = `${ns} <Slider> labelStepSize must be greater than zero.`;
export const RANGESLIDER_NULL_VALUE = `${ns} <RangeSlider> value prop must be an array of two non-null numbers.`;

@@ -57,0 +59,0 @@ export const TABS_FIRST_CHILD = `${ns} First child of <Tabs> component should be a <TabList>`;

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

"containerRef",
"defaultIndeterminate",
"elementRef",

@@ -88,0 +87,0 @@ "iconName",

@@ -47,12 +47,12 @@ /*

useSmartPositioning: boolean,
constraints: ITetherConstraint[]) {
if (constraints == null && useSmartPositioning) {
constraints = [DEFAULT_CONSTRAINTS];
tetherOptions: Partial<Tether.ITetherOptions> = {}) {
if (tetherOptions.constraints == null && useSmartPositioning) {
tetherOptions.constraints = [DEFAULT_CONSTRAINTS];
}
const options: Tether.ITetherOptions = {
...tetherOptions,
attachment: getPopoverAttachment(position),
bodyElement: fakeHtmlElement,
classPrefix: "pt-tether",
constraints,
element,

@@ -59,0 +59,0 @@ target,

@@ -60,3 +60,3 @@ /*

/* Clamps the given number between min and max values. Returns value if within range, or closest bound. */
/** Clamps the given number between min and max values. Returns value if within range, or closest bound. */
export function clamp(val: number, min: number, max: number) {

@@ -69,2 +69,10 @@ if (max < min) {

/** Returns the number of decimal places in the given number. */
export function countDecimalPlaces(num: number) {
if (typeof num !== "number" || Math.floor(num) === num) {
return 0;
}
return num.toString().split(".")[1].length;
}
/**

@@ -71,0 +79,0 @@ * Throttle an event on an EventTarget by wrapping it in `requestAnimationFrame` call.

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

export * from "./overlay/overlay";
export * from "./text/text";
export * from "./popover/popover";

@@ -38,0 +39,0 @@ export * from "./popover/svgPopover";

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 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

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc