1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | const ns = "[Blueprint]";
|
18 |
|
19 | export const CLAMP_MIN_MAX = ns + ` clamp: max cannot be less than min`;
|
20 |
|
21 | export const ALERT_WARN_CANCEL_PROPS = ns + ` <Alert> cancelButtonText and onCancel should be set together.`;
|
22 | export const ALERT_WARN_CANCEL_ESCAPE_KEY =
|
23 | ns + ` <Alert> canEscapeKeyCancel enabled without onCancel or onClose handler.`;
|
24 | export const ALERT_WARN_CANCEL_OUTSIDE_CLICK =
|
25 | ns + ` <Alert> canOutsideClickCancel enbaled without onCancel or onClose handler.`;
|
26 |
|
27 | export const COLLAPSIBLE_LIST_INVALID_CHILD = ns + ` <CollapsibleList> children must be <MenuItem>s`;
|
28 |
|
29 | export const CONTEXTMENU_WARN_DECORATOR_NO_METHOD =
|
30 | ns + ` @ContextMenuTarget-decorated class should implement renderContextMenu.`;
|
31 | export const CONTEXTMENU_WARN_DECORATOR_NEEDS_REACT_ELEMENT =
|
32 | ns + ` "@ContextMenuTarget-decorated components must return a single JSX.Element or an empty render.`;
|
33 |
|
34 | export const HOTKEYS_HOTKEY_CHILDREN = ns + ` <Hotkeys> only accepts <Hotkey> children.`;
|
35 | export const HOTKEYS_WARN_DECORATOR_NO_METHOD = ns + ` @HotkeysTarget-decorated class should implement renderHotkeys.`;
|
36 | export const HOTKEYS_WARN_DECORATOR_NEEDS_REACT_ELEMENT =
|
37 | ns + ` "@HotkeysTarget-decorated components must return a single JSX.Element or an empty render.`;
|
38 |
|
39 | export const HOTKEYS_TARGET2_CHILDREN_LOCAL_HOTKEYS =
|
40 | ns +
|
41 | ` <HotkeysTarget2> was configured with local hotkeys, but you did not use the generated event handlers to bind their event handlers. Try using a render function as the child of this component.`;
|
42 |
|
43 | export const INPUT_WARN_LEFT_ELEMENT_LEFT_ICON_MUTEX =
|
44 | ns + ` <InputGroup> leftElement and leftIcon prop are mutually exclusive, with leftElement taking priority.`;
|
45 |
|
46 | export const NUMERIC_INPUT_MIN_MAX = ns + ` <NumericInput> requires min to be no greater than max if both are defined.`;
|
47 | export const NUMERIC_INPUT_MINOR_STEP_SIZE_BOUND =
|
48 | ns + ` <NumericInput> requires minorStepSize to be no greater than stepSize.`;
|
49 | export const NUMERIC_INPUT_MAJOR_STEP_SIZE_BOUND =
|
50 | ns + ` <NumericInput> requires stepSize to be no greater than majorStepSize.`;
|
51 | export const NUMERIC_INPUT_MINOR_STEP_SIZE_NON_POSITIVE =
|
52 | ns + ` <NumericInput> requires minorStepSize to be strictly greater than zero.`;
|
53 | export const NUMERIC_INPUT_MAJOR_STEP_SIZE_NON_POSITIVE =
|
54 | ns + ` <NumericInput> requires majorStepSize to be strictly greater than zero.`;
|
55 | export const NUMERIC_INPUT_STEP_SIZE_NON_POSITIVE =
|
56 | ns + ` <NumericInput> requires stepSize to be strictly greater than zero.`;
|
57 | export const NUMERIC_INPUT_CONTROLLED_VALUE_INVALID =
|
58 | ns + ` <NumericInput> controlled value prop does not adhere to stepSize, min, and/or max constraints.`;
|
59 |
|
60 | export const PANEL_STACK_INITIAL_PANEL_STACK_MUTEX =
|
61 | ns + ` <PanelStack> requires exactly one of initialPanel and stack prop`;
|
62 | export const PANEL_STACK_REQUIRES_PANEL = ns + ` <PanelStack> requires at least one panel in the stack`;
|
63 |
|
64 | export const OVERFLOW_LIST_OBSERVE_PARENTS_CHANGED =
|
65 | ns + ` <OverflowList> does not support changing observeParents after mounting.`;
|
66 |
|
67 | export const POPOVER_REQUIRES_TARGET = ns + ` <Popover> requires target prop or at least one child element.`;
|
68 | export const POPOVER_HAS_BACKDROP_INTERACTION =
|
69 | ns + ` <Popover hasBackdrop={true}> requires interactionKind={PopoverInteractionKind.CLICK}.`;
|
70 | export const POPOVER_WARN_TOO_MANY_CHILDREN =
|
71 | ns +
|
72 | ` <Popover> supports one or two children; additional children are ignored.` +
|
73 | ` First child is the target, second child is the content. You may instead supply these two as props.`;
|
74 | export const POPOVER_WARN_DOUBLE_CONTENT =
|
75 | ns + ` <Popover> with two children ignores content prop; use either prop or children.`;
|
76 | export const POPOVER_WARN_DOUBLE_TARGET =
|
77 | ns + ` <Popover> with children ignores target prop; use either prop or children.`;
|
78 | export const POPOVER_WARN_EMPTY_CONTENT = ns + ` Disabling <Popover> with empty/whitespace content...`;
|
79 | export const POPOVER_WARN_HAS_BACKDROP_INLINE = ns + ` <Popover usePortal={false}> ignores hasBackdrop`;
|
80 | export const POPOVER_WARN_PLACEMENT_AND_POSITION_MUTEX =
|
81 | ns + ` <Popover> supports either placement or position prop, not both.`;
|
82 | export const POPOVER_WARN_UNCONTROLLED_ONINTERACTION = ns + ` <Popover> onInteraction is ignored when uncontrolled.`;
|
83 |
|
84 | export const PORTAL_CONTEXT_CLASS_NAME_STRING = ns + ` <Portal> context blueprintPortalClassName must be string`;
|
85 |
|
86 | export const RADIOGROUP_WARN_CHILDREN_OPTIONS_MUTEX =
|
87 | ns + ` <RadioGroup> children and options prop are mutually exclusive, with options taking priority.`;
|
88 |
|
89 | export const SLIDER_ZERO_STEP = ns + ` <Slider> stepSize must be greater than zero.`;
|
90 | export const SLIDER_ZERO_LABEL_STEP = ns + ` <Slider> labelStepSize must be greater than zero.`;
|
91 | export const RANGESLIDER_NULL_VALUE = ns + ` <RangeSlider> value prop must be an array of two non-null numbers.`;
|
92 | export const MULTISLIDER_INVALID_CHILD = ns + ` <MultiSlider> children must be <SliderHandle>s or <SliderTrackStop>s`;
|
93 | export const MULTISLIDER_WARN_LABEL_STEP_SIZE_LABEL_VALUES_MUTEX =
|
94 | ns +
|
95 | ` <MultiSlider> labelStepSize and labelValues prop are mutually exclusive, with labelStepSize taking priority.`;
|
96 |
|
97 | export const SPINNER_WARN_CLASSES_SIZE = ns + ` <Spinner> Classes.SMALL/LARGE are ignored if size prop is set.`;
|
98 |
|
99 | export const TOASTER_CREATE_NULL =
|
100 | ns +
|
101 | ` Toaster.create() is not supported inside React lifecycle methods in React 16.` +
|
102 | ` See usage example on the docs site.`;
|
103 | export const TOASTER_WARN_INLINE = ns + ` Toaster.create() ignores inline prop as it always creates a new element.`;
|
104 |
|
105 | export const DIALOG_WARN_NO_HEADER_ICON = ns + ` <Dialog> iconName is ignored if title is omitted.`;
|
106 | export const DIALOG_WARN_NO_HEADER_CLOSE_BUTTON =
|
107 | ns + ` <Dialog> isCloseButtonShown prop is ignored if title is omitted.`;
|
108 |
|
109 | export const DRAWER_VERTICAL_IS_IGNORED = ns + ` <Drawer> vertical is ignored if position is defined`;
|
110 | export const DRAWER_ANGLE_POSITIONS_ARE_CASTED =
|
111 | ns + ` <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)`;
|
112 |
|
113 | export const TOASTER_MAX_TOASTS_INVALID =
|
114 | ns + ` <Toaster> maxToasts is set to an invalid number, must be greater than 0`;
|