@sprinklrjs/spaceweb 14.14.0 → 14.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/banner/banner.js +4 -4
- package/esm/banner/banner.js +3 -3
- package/esm/form-control/form-control.js +3 -3
- package/esm/icon/components/{alert-solid.d.ts → error-solid.d.ts} +1 -1
- package/esm/icon/components/error-solid.js +8 -0
- package/{icon/components/alert-solid.d.ts → esm/icon/components/warning-clr.d.ts} +1 -1
- package/esm/icon/components/warning-clr.js +8 -0
- package/esm/modal/modal.d.ts +3 -3
- package/esm/modal/modal.js +3 -3
- package/esm/progressSteps/step.js +2 -2
- package/esm/snackbar/constants.js +3 -3
- package/esm/time-range-picker/RangeSelectorContainer.js +2 -4
- package/form-control/form-control.js +4 -4
- package/{esm/icon/components/alert.d.ts → icon/components/error-solid.d.ts} +1 -1
- package/icon/components/{alert-solid.js → error-solid.js} +3 -3
- package/{esm/icon/components/error.d.ts → icon/components/warning-clr.d.ts} +1 -1
- package/icon/components/warning-clr.js +11 -0
- package/modal/modal.d.ts +3 -3
- package/modal/modal.js +4 -4
- package/package.json +2 -2
- package/progressSteps/step.js +2 -2
- package/snackbar/constants.js +4 -4
- package/time-range-picker/RangeSelectorContainer.js +3 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/icon/components/alert-solid.js +0 -8
- package/esm/icon/components/alert.js +0 -8
- package/esm/icon/components/error-clr.d.ts +0 -3
- package/esm/icon/components/error-clr.js +0 -8
- package/esm/icon/components/error.js +0 -8
- package/esm/icon/components/warning-solid.d.ts +0 -3
- package/esm/icon/components/warning-solid.js +0 -8
- package/icon/components/alert.d.ts +0 -3
- package/icon/components/alert.js +0 -11
- package/icon/components/error-clr.d.ts +0 -3
- package/icon/components/error-clr.js +0 -11
- package/icon/components/error.d.ts +0 -3
- package/icon/components/error.js +0 -11
- package/icon/components/warning-solid.d.ts +0 -3
- package/icon/components/warning-solid.js +0 -11
package/banner/banner.js
CHANGED
|
@@ -11,8 +11,8 @@ var button_1 = require("../button");
|
|
|
11
11
|
var typography_1 = require("../typography");
|
|
12
12
|
var base_button_1 = require("../base-button");
|
|
13
13
|
// icons
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var warning_clr_1 = tslib_1.__importDefault(require("../icon/components/warning-clr"));
|
|
15
|
+
var error_solid_1 = tslib_1.__importDefault(require("../icon/components/error-solid"));
|
|
16
16
|
var info_circle_1 = tslib_1.__importDefault(require("../icon/components/info-circle"));
|
|
17
17
|
var tickCircle_solid_1 = tslib_1.__importDefault(require("../icon/components/tickCircle-solid"));
|
|
18
18
|
var close_1 = tslib_1.__importDefault(require("../icon/components/close"));
|
|
@@ -29,8 +29,8 @@ var styled_components_1 = require("../link/styled-components");
|
|
|
29
29
|
var cvaConfig_1 = require("./cvaConfig");
|
|
30
30
|
var box_1 = require("../box");
|
|
31
31
|
var intentToIconMap = {
|
|
32
|
-
error: { BaseIcon:
|
|
33
|
-
warning: { BaseIcon:
|
|
32
|
+
error: { BaseIcon: error_solid_1.default },
|
|
33
|
+
warning: { BaseIcon: warning_clr_1.default },
|
|
34
34
|
success: { BaseIcon: tickCircle_solid_1.default },
|
|
35
35
|
info: { BaseIcon: info_circle_1.default },
|
|
36
36
|
};
|
package/esm/banner/banner.js
CHANGED
|
@@ -9,8 +9,8 @@ import { IconButton } from '../button';
|
|
|
9
9
|
import { Typography } from '../typography';
|
|
10
10
|
import { BaseButton } from '../base-button';
|
|
11
11
|
// icons
|
|
12
|
-
import WarningIcon from '../icon/components/warning-
|
|
13
|
-
import
|
|
12
|
+
import WarningIcon from '../icon/components/warning-clr';
|
|
13
|
+
import ErrorIcon from '../icon/components/error-solid';
|
|
14
14
|
import InfoCircle from '../icon/components/info-circle';
|
|
15
15
|
import TickCircleIcon from '../icon/components/tickCircle-solid';
|
|
16
16
|
import CloseIcon from '../icon/components/close';
|
|
@@ -27,7 +27,7 @@ import { linkStyles } from '../link/styled-components';
|
|
|
27
27
|
import { bannerIconFillColor } from './cvaConfig';
|
|
28
28
|
import { Box } from '../box';
|
|
29
29
|
var intentToIconMap = {
|
|
30
|
-
error: { BaseIcon:
|
|
30
|
+
error: { BaseIcon: ErrorIcon },
|
|
31
31
|
warning: { BaseIcon: WarningIcon },
|
|
32
32
|
success: { BaseIcon: TickCircleIcon },
|
|
33
33
|
info: { BaseIcon: InfoCircle },
|
|
@@ -7,8 +7,8 @@ import { add$props } from '../helpers';
|
|
|
7
7
|
import { Stack, StackItem } from '../stack';
|
|
8
8
|
import { Box } from '../box';
|
|
9
9
|
import InfoIcon from './info-icon';
|
|
10
|
-
import WarningIcon from '../icon/components/warning-
|
|
11
|
-
import
|
|
10
|
+
import WarningIcon from '../icon/components/warning-clr';
|
|
11
|
+
import ErrorIcon from '../icon/components/error-solid';
|
|
12
12
|
import TickCircleIcon from '../icon/components/tickCircle-solid';
|
|
13
13
|
import { useOverrides } from '../overrides';
|
|
14
14
|
import { StatefulTooltip } from '../tooltip';
|
|
@@ -19,7 +19,7 @@ import classNames from '../classNames';
|
|
|
19
19
|
import { getTextFromNode } from '../utils/generalUtils';
|
|
20
20
|
var addConditionalIds = classNames;
|
|
21
21
|
var intentToIconMap = {
|
|
22
|
-
error:
|
|
22
|
+
error: ErrorIcon,
|
|
23
23
|
warning: WarningIcon,
|
|
24
24
|
success: TickCircleIcon,
|
|
25
25
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useStyle } from '../../style';
|
|
4
|
+
import Icon from '../icon';
|
|
5
|
+
export default function ErrorSolid(props) {
|
|
6
|
+
var _a = useStyle(), theme = _a.theme, isRTL = _a.isRTL;
|
|
7
|
+
return (_jsx(Icon, __assign({ viewBox: "0 0 14 14", "data-icon-name": "ErrorSolid" }, props, { children: _jsx("path", { d: "M7.063.012a6.994 6.994 0 106.994 6.994A6.996 6.996 0 007.063.012zm0 7.693a.701.701 0 01-.7-.699V4.21a.701.701 0 01.7-.7.701.701 0 01.7.7v2.797a.701.701 0 01-.7.7zm0 2.798a.701.701 0 01-.7-.7.701.701 0 01.7-.699.701.701 0 01.7.7.701.701 0 01-.7.699z" }) })));
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useStyle } from '../../style';
|
|
4
|
+
import Icon from '../icon';
|
|
5
|
+
export default function WarningClr(props) {
|
|
6
|
+
var _a = useStyle(), theme = _a.theme, isRTL = _a.isRTL;
|
|
7
|
+
return (_jsxs(Icon, __assign({ viewBox: "0 0 16 16", "data-icon-name": "WarningClr" }, props, { children: [_jsx("path", { fillRule: "evenodd", d: "M16 13.518c0 .96-.778 1.738-1.738 1.738H1.738a1.738 1.738 0 0 1-1.515-2.59L6.405 1.677l.064-.105a1.83 1.83 0 0 1 3.126.105l6.182 10.99.052.098c.112.235.171.492.171.753", clipRule: "evenodd" }), _jsx("path", { fill: "currentColor", d: "M8 .744c.661 0 1.271.357 1.596.934l6.181 10.988.051.1a1.738 1.738 0 0 1-1.565 2.49H1.737a1.738 1.738 0 0 1-1.514-2.59L6.405 1.678l.064-.106A1.83 1.83 0 0 1 8 .744m0 1a.83.83 0 0 0-.694.376l-.03.048-6.181 10.988a.738.738 0 0 0 .643 1.1h12.525a.738.738 0 0 0 .664-1.058l-.022-.042L8.724 2.168A.83.83 0 0 0 8 1.744" }), _jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M8 9.99a.75.75 0 0 1-.75-.75V5.868a.75.75 0 0 1 1.5 0V9.24a.75.75 0 0 1-.75.75m-.75 1.88a.75.75 0 1 0 1.5-.007.75.75 0 1 0-1.5.007", clipRule: "evenodd" })] })));
|
|
8
|
+
}
|
package/esm/modal/modal.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
import type { ModalProps } from './types';
|
|
3
|
-
import
|
|
3
|
+
import Error from '../icon/components/error-solid';
|
|
4
4
|
import Tick from '../icon/components/tickCircle-solid';
|
|
5
|
-
import Warning from '../icon/components/warning-
|
|
5
|
+
import Warning from '../icon/components/warning-clr';
|
|
6
6
|
export declare const INTENT_TO_ICON: {
|
|
7
7
|
success: typeof Tick;
|
|
8
|
-
error: typeof
|
|
8
|
+
error: typeof Error;
|
|
9
9
|
warning: typeof Warning;
|
|
10
10
|
};
|
|
11
11
|
declare const _default: import("react").MemoExoticComponent<{
|
package/esm/modal/modal.js
CHANGED
|
@@ -12,14 +12,14 @@ import { useLocale } from '../locale';
|
|
|
12
12
|
import { mergeOverrides } from '../overrides';
|
|
13
13
|
import { ModalContextProvider } from './ModalContext';
|
|
14
14
|
import useUniqueId from '../hooks/useUniqueId';
|
|
15
|
-
import
|
|
15
|
+
import Error from '../icon/components/error-solid';
|
|
16
16
|
import Tick from '../icon/components/tickCircle-solid';
|
|
17
|
-
import Warning from '../icon/components/warning-
|
|
17
|
+
import Warning from '../icon/components/warning-clr';
|
|
18
18
|
import { isDarkTheme } from '../helpers/themeHelpers';
|
|
19
19
|
var CloseButton = function (closeProps) { return (_jsx(IconButton, __assign({}, closeProps, { children: _jsx(Close, {}) }))); };
|
|
20
20
|
export var INTENT_TO_ICON = {
|
|
21
21
|
success: Tick,
|
|
22
|
-
error:
|
|
22
|
+
error: Error,
|
|
23
23
|
warning: Warning,
|
|
24
24
|
};
|
|
25
25
|
var getWarningIconClassName = function (_a) {
|
|
@@ -4,10 +4,10 @@ import { memo } from 'react';
|
|
|
4
4
|
import { useOverrides } from '../overrides';
|
|
5
5
|
import { StyledStep, StyledIconContainer, StyledInnerIcon, StyledContent, StyledContentTitle, StyledContentSubTitle, StyledContentTail, StyledContentDescription, getContentTailStyle, getIconContainerStyle, } from './styled-components';
|
|
6
6
|
import TickCircleIcon from '../icon/components/tickCircle-solid';
|
|
7
|
-
import
|
|
7
|
+
import Error from '../icon/components/error-solid';
|
|
8
8
|
import { ORIENTATION } from './constants';
|
|
9
9
|
var INTENT_TO_ICON_MAP = {
|
|
10
|
-
error: _jsx(
|
|
10
|
+
error: _jsx(Error, { size: 16, className: "spr-support-error-text" }),
|
|
11
11
|
};
|
|
12
12
|
var Step = function (_a) {
|
|
13
13
|
var _b = _a.overrides, overrides = _b === void 0 ? {} : _b, isCompleted = _a.isCompleted, isCurrent = _a.isCurrent, isActive = _a.isActive, _c = _a.intent, intent = _c === void 0 ? 'default' : _c, isRightBeforeActive = _a.isRightBeforeActive, _d = _a.isLast, isLast = _d === void 0 ? false : _d, childrenCount = _a.childrenCount, _e = _a.orientation, orientation = _e === void 0 ? ORIENTATION.vertical : _e, title = _a.title, subTitle = _a.subTitle, alwaysShowDescription = _a.alwaysShowDescription, children = _a.children, className = _a.className, onClick = _a.onClick, variant = _a.variant, role = _a.role, style = _a.style, step = _a.step, showStepNumber = _a.showStepNumber, restProps = __rest(_a, ["overrides", "isCompleted", "isCurrent", "isActive", "intent", "isRightBeforeActive", "isLast", "childrenCount", "orientation", "title", "subTitle", "alwaysShowDescription", "children", "className", "onClick", "variant", "role", "style", "step", "showStepNumber"]);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Warning from '../icon/components/warning-
|
|
1
|
+
import Error from '../icon/components/error-solid';
|
|
2
|
+
import Warning from '../icon/components/warning-clr';
|
|
3
3
|
import Tick from '../icon/components/tickCircle-solid';
|
|
4
4
|
import Delete from '../icon/components/delete-solid';
|
|
5
5
|
export var TRANSITION_DURATION = 1000;
|
|
6
6
|
export var INTENT_TO_ICON = {
|
|
7
7
|
success: Tick,
|
|
8
|
-
error:
|
|
8
|
+
error: Error,
|
|
9
9
|
warning: Warning,
|
|
10
10
|
delete: Delete,
|
|
11
11
|
};
|
|
@@ -10,7 +10,7 @@ import { Button } from '../button';
|
|
|
10
10
|
import { StyledHeader } from './styled-component';
|
|
11
11
|
import { Stack, StackItem } from '../stack';
|
|
12
12
|
import DefaultTimezonePicker from './TimezonePicker';
|
|
13
|
-
import ErrorIcon from '../icon/components/error';
|
|
13
|
+
import ErrorIcon from '../icon/components/error-solid';
|
|
14
14
|
import { StyledFooter, StyledFooterBeforeEnhancer } from '../date-picker/styled-components';
|
|
15
15
|
import { useLocale } from '../locale';
|
|
16
16
|
import { getRangeError, getSelectedTimeRange, getValidRange, getMinMaxDateInTimezone, convertDateFromSystemTzToTargetTz, } from './utils';
|
|
@@ -114,9 +114,7 @@ var RangeSelectorContainer = function (_a) {
|
|
|
114
114
|
fill: theme.spr.clrRed,
|
|
115
115
|
});
|
|
116
116
|
} }), _jsx(Typography, __assign({ className: "my-0", variant: "bs3" }, { children: errMsg }))] }))) : null;
|
|
117
|
-
return (_jsxs(Box, __assign({ className: "spr-ui-01 rounded-8" }, { children: [_jsxs(Header, __assign({ "$setTimezone": setTimezone, "$onClose": props.onClose }, headerProps, { children: [_jsx(HeaderBeforeEnhancer, __assign({ variant: "heading-7", "$as": "span", className: "flex items-center" }, headerBeforeEnhancerProps, { children: locale.timeRangePicker.headerLabel })), disableTimezone ? null : (_jsx(TimezonePicker, __assign({ setTimezone: setTimezone, timezone: timezone, timezoneOptions: timezoneOptions }, timezonePickerProps, { className: ['w-0 grow max-w-md', timezonePickerProps === null || timezonePickerProps === void 0 ? void 0 : timezonePickerProps.className] })))] })), _jsx(RangeSelector, __assign({ overrides: props.overrides, timeSelect: props.timeSelect, timeRangePresets: timeRangePresets, timezone: timezone, timeRange: timeRange, preset: preset, onChange: onDateChange, adapter: adapter, peekNextMonth: props.peekNextMonth, excludeDates: props.excludeDates, filterDate: props.filterDate, minDate: minDate, maxDate: maxDate, formatString: props.formatString, locale: props.locale, fixedHeight: props.fixedHeight, monthsShown: monthsShown, hidePresetSearch: hidePresetSearch, footerContent: _jsx(Footer, __assign({ "$hasError": hasError, "$onSubmit": handleSubmit, "$onClose": props.onClose }, footerProps, { className: ['px-6 py-3 mt-2', footerProps.className] }, { children: _jsxs(Box, __assign({ className: "justify-between w-0 grow flex" }, { children: [_jsx(FooterBeforeEnhancer, __assign({}, footerBeforeEnhancerProps)), _jsxs(Stack, __assign({ direction: monthsShown === 1 ? 'vertical' : 'horizontal', gap: 3,
|
|
118
|
-
// @ts-ignore -- CSS-in-JS
|
|
119
|
-
className: [cx({ 'items-center': monthsShown !== 1 }), { maxWidth: 'fit-content' }] }, { children: [monthsShown === 1 ? null : errorEl, _jsxs(StackItem, __assign({ className: "flex self-end" }, { children: [(footerProps === null || footerProps === void 0 ? void 0 : footerProps.showClearButton) ? (_jsx(Button, __assign({ size: "xs", onClick: footerProps.handleClearBtnClick, variant: "secondary", "data-testid": "clear", disabled: timeRange.length === 0 }, { children: locale.timeRangePicker.clearBtnLabel }))) : (_jsx(Button, __assign({ size: "xs", onClick: props.onClose, variant: "secondary", "data-testid": "cancel" }, { children: locale.timeRangePicker.cancelBtnLabel }))), _jsx(Button, __assign({ size: "xs", className: "ml-3", onClick: handleSubmit, disabled: hasError, "data-testid": "save" }, { children: locale.timeRangePicker.saveBtnLabel }))] })), monthsShown === 1 ? errorEl : null] }))] })) })) }, rangeSelectorProps))] })));
|
|
117
|
+
return (_jsxs(Box, __assign({ className: "spr-ui-01 rounded-8" }, { children: [_jsxs(Header, __assign({ "$setTimezone": setTimezone, "$onClose": props.onClose }, headerProps, { children: [_jsx(HeaderBeforeEnhancer, __assign({ variant: "heading-7", "$as": "span", className: "flex items-center" }, headerBeforeEnhancerProps, { children: locale.timeRangePicker.headerLabel })), disableTimezone ? null : (_jsx(TimezonePicker, __assign({ setTimezone: setTimezone, timezone: timezone, timezoneOptions: timezoneOptions }, timezonePickerProps, { className: ['w-0 grow max-w-md', timezonePickerProps === null || timezonePickerProps === void 0 ? void 0 : timezonePickerProps.className] })))] })), _jsx(RangeSelector, __assign({ overrides: props.overrides, timeSelect: props.timeSelect, timeRangePresets: timeRangePresets, timezone: timezone, timeRange: timeRange, preset: preset, onChange: onDateChange, adapter: adapter, peekNextMonth: props.peekNextMonth, excludeDates: props.excludeDates, filterDate: props.filterDate, minDate: minDate, maxDate: maxDate, formatString: props.formatString, locale: props.locale, fixedHeight: props.fixedHeight, monthsShown: monthsShown, hidePresetSearch: hidePresetSearch, footerContent: _jsx(Footer, __assign({ "$hasError": hasError, "$onSubmit": handleSubmit, "$onClose": props.onClose }, footerProps, { className: ['px-6 py-3 mt-2', footerProps.className] }, { children: _jsxs(Box, __assign({ className: "justify-between w-0 grow flex" }, { children: [_jsx(FooterBeforeEnhancer, __assign({}, footerBeforeEnhancerProps)), _jsxs(Stack, __assign({ direction: monthsShown === 1 ? 'vertical' : 'horizontal', gap: 3, className: monthsShown !== 1 ? 'items-center' : undefined, style: { maxWidth: 'fit-content' } }, { children: [monthsShown === 1 ? null : errorEl, _jsxs(StackItem, __assign({ className: "flex self-end" }, { children: [(footerProps === null || footerProps === void 0 ? void 0 : footerProps.showClearButton) ? (_jsx(Button, __assign({ size: "xs", onClick: footerProps.handleClearBtnClick, variant: "secondary", "data-testid": "clear", disabled: timeRange.length === 0 }, { children: locale.timeRangePicker.clearBtnLabel }))) : (_jsx(Button, __assign({ size: "xs", onClick: props.onClose, variant: "secondary", "data-testid": "cancel" }, { children: locale.timeRangePicker.cancelBtnLabel }))), _jsx(Button, __assign({ size: "xs", className: "ml-3", onClick: handleSubmit, disabled: hasError, "data-testid": "save" }, { children: locale.timeRangePicker.saveBtnLabel }))] })), monthsShown === 1 ? errorEl : null] }))] })) })) }, rangeSelectorProps))] })));
|
|
120
118
|
};
|
|
121
119
|
RangeSelectorContainer.displayName = 'RangeSelectorContainer';
|
|
122
120
|
export default RangeSelectorContainer;
|
|
@@ -10,8 +10,8 @@ var helpers_1 = require("../helpers");
|
|
|
10
10
|
var stack_1 = require("../stack");
|
|
11
11
|
var box_1 = require("../box");
|
|
12
12
|
var info_icon_1 = tslib_1.__importDefault(require("./info-icon"));
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var warning_clr_1 = tslib_1.__importDefault(require("../icon/components/warning-clr"));
|
|
14
|
+
var error_solid_1 = tslib_1.__importDefault(require("../icon/components/error-solid"));
|
|
15
15
|
var tickCircle_solid_1 = tslib_1.__importDefault(require("../icon/components/tickCircle-solid"));
|
|
16
16
|
var overrides_1 = require("../overrides");
|
|
17
17
|
var tooltip_1 = require("../tooltip");
|
|
@@ -22,8 +22,8 @@ var classNames_1 = tslib_1.__importDefault(require("../classNames"));
|
|
|
22
22
|
var generalUtils_1 = require("../utils/generalUtils");
|
|
23
23
|
var addConditionalIds = classNames_1.default;
|
|
24
24
|
var intentToIconMap = {
|
|
25
|
-
error:
|
|
26
|
-
warning:
|
|
25
|
+
error: error_solid_1.default,
|
|
26
|
+
warning: warning_clr_1.default,
|
|
27
27
|
success: tickCircle_solid_1.default,
|
|
28
28
|
};
|
|
29
29
|
var renderWithIcon = function (intent, message) {
|
|
@@ -4,8 +4,8 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
var style_1 = require("../../style");
|
|
6
6
|
var icon_1 = tslib_1.__importDefault(require("../icon"));
|
|
7
|
-
function
|
|
7
|
+
function ErrorSolid(props) {
|
|
8
8
|
var _a = (0, style_1.useStyle)(), theme = _a.theme, isRTL = _a.isRTL;
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(icon_1.default, tslib_1.__assign({ viewBox: "0 0 14 14", "data-icon-name": "
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(icon_1.default, tslib_1.__assign({ viewBox: "0 0 14 14", "data-icon-name": "ErrorSolid" }, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M7.063.012a6.994 6.994 0 106.994 6.994A6.996 6.996 0 007.063.012zm0 7.693a.701.701 0 01-.7-.699V4.21a.701.701 0 01.7-.7.701.701 0 01.7.7v2.797a.701.701 0 01-.7.7zm0 2.798a.701.701 0 01-.7-.7.701.701 0 01.7-.699.701.701 0 01.7.7.701.701 0 01-.7.699z" }) })));
|
|
10
10
|
}
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = ErrorSolid;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var style_1 = require("../../style");
|
|
6
|
+
var icon_1 = tslib_1.__importDefault(require("../icon"));
|
|
7
|
+
function WarningClr(props) {
|
|
8
|
+
var _a = (0, style_1.useStyle)(), theme = _a.theme, isRTL = _a.isRTL;
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(icon_1.default, tslib_1.__assign({ viewBox: "0 0 16 16", "data-icon-name": "WarningClr" }, props, { children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M16 13.518c0 .96-.778 1.738-1.738 1.738H1.738a1.738 1.738 0 0 1-1.515-2.59L6.405 1.677l.064-.105a1.83 1.83 0 0 1 3.126.105l6.182 10.99.052.098c.112.235.171.492.171.753", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M8 .744c.661 0 1.271.357 1.596.934l6.181 10.988.051.1a1.738 1.738 0 0 1-1.565 2.49H1.737a1.738 1.738 0 0 1-1.514-2.59L6.405 1.678l.064-.106A1.83 1.83 0 0 1 8 .744m0 1a.83.83 0 0 0-.694.376l-.03.048-6.181 10.988a.738.738 0 0 0 .643 1.1h12.525a.738.738 0 0 0 .664-1.058l-.022-.042L8.724 2.168A.83.83 0 0 0 8 1.744" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M8 9.99a.75.75 0 0 1-.75-.75V5.868a.75.75 0 0 1 1.5 0V9.24a.75.75 0 0 1-.75.75m-.75 1.88a.75.75 0 1 0 1.5-.007.75.75 0 1 0-1.5.007", clipRule: "evenodd" })] })));
|
|
10
|
+
}
|
|
11
|
+
exports.default = WarningClr;
|
package/modal/modal.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
import type { ModalProps } from './types';
|
|
3
|
-
import
|
|
3
|
+
import Error from '../icon/components/error-solid';
|
|
4
4
|
import Tick from '../icon/components/tickCircle-solid';
|
|
5
|
-
import Warning from '../icon/components/warning-
|
|
5
|
+
import Warning from '../icon/components/warning-clr';
|
|
6
6
|
export declare const INTENT_TO_ICON: {
|
|
7
7
|
success: typeof Tick;
|
|
8
|
-
error: typeof
|
|
8
|
+
error: typeof Error;
|
|
9
9
|
warning: typeof Warning;
|
|
10
10
|
};
|
|
11
11
|
declare const _default: import("react").MemoExoticComponent<{
|
package/modal/modal.js
CHANGED
|
@@ -15,15 +15,15 @@ var locale_1 = require("../locale");
|
|
|
15
15
|
var overrides_2 = require("../overrides");
|
|
16
16
|
var ModalContext_1 = require("./ModalContext");
|
|
17
17
|
var useUniqueId_1 = tslib_1.__importDefault(require("../hooks/useUniqueId"));
|
|
18
|
-
var
|
|
18
|
+
var error_solid_1 = tslib_1.__importDefault(require("../icon/components/error-solid"));
|
|
19
19
|
var tickCircle_solid_1 = tslib_1.__importDefault(require("../icon/components/tickCircle-solid"));
|
|
20
|
-
var
|
|
20
|
+
var warning_clr_1 = tslib_1.__importDefault(require("../icon/components/warning-clr"));
|
|
21
21
|
var themeHelpers_1 = require("../helpers/themeHelpers");
|
|
22
22
|
var CloseButton = function (closeProps) { return ((0, jsx_runtime_1.jsx)(button_1.IconButton, tslib_1.__assign({}, closeProps, { children: (0, jsx_runtime_1.jsx)(close_1.default, {}) }))); };
|
|
23
23
|
exports.INTENT_TO_ICON = {
|
|
24
24
|
success: tickCircle_solid_1.default,
|
|
25
|
-
error:
|
|
26
|
-
warning:
|
|
25
|
+
error: error_solid_1.default,
|
|
26
|
+
warning: warning_clr_1.default,
|
|
27
27
|
};
|
|
28
28
|
var getWarningIconClassName = function (_a) {
|
|
29
29
|
var theme = _a.theme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sprinklrjs/spaceweb",
|
|
3
|
-
"version": "14.14.
|
|
3
|
+
"version": "14.14.1",
|
|
4
4
|
"description": "Components for SpaceWeb",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"ts-node": "^10.4.0"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@sprinklrjs/spaceweb-themes": "14.14.
|
|
104
|
+
"@sprinklrjs/spaceweb-themes": "14.14.1",
|
|
105
105
|
"react": ">=17.0.2 <19.0.0",
|
|
106
106
|
"react-dom": ">=17.0.2 <19.0.0"
|
|
107
107
|
}
|
package/progressSteps/step.js
CHANGED
|
@@ -6,10 +6,10 @@ var react_1 = require("react");
|
|
|
6
6
|
var overrides_1 = require("../overrides");
|
|
7
7
|
var styled_components_1 = require("./styled-components");
|
|
8
8
|
var tickCircle_solid_1 = tslib_1.__importDefault(require("../icon/components/tickCircle-solid"));
|
|
9
|
-
var
|
|
9
|
+
var error_solid_1 = tslib_1.__importDefault(require("../icon/components/error-solid"));
|
|
10
10
|
var constants_1 = require("./constants");
|
|
11
11
|
var INTENT_TO_ICON_MAP = {
|
|
12
|
-
error: (0, jsx_runtime_1.jsx)(
|
|
12
|
+
error: (0, jsx_runtime_1.jsx)(error_solid_1.default, { size: 16, className: "spr-support-error-text" }),
|
|
13
13
|
};
|
|
14
14
|
var Step = function (_a) {
|
|
15
15
|
var _b = _a.overrides, overrides = _b === void 0 ? {} : _b, isCompleted = _a.isCompleted, isCurrent = _a.isCurrent, isActive = _a.isActive, _c = _a.intent, intent = _c === void 0 ? 'default' : _c, isRightBeforeActive = _a.isRightBeforeActive, _d = _a.isLast, isLast = _d === void 0 ? false : _d, childrenCount = _a.childrenCount, _e = _a.orientation, orientation = _e === void 0 ? constants_1.ORIENTATION.vertical : _e, title = _a.title, subTitle = _a.subTitle, alwaysShowDescription = _a.alwaysShowDescription, children = _a.children, className = _a.className, onClick = _a.onClick, variant = _a.variant, role = _a.role, style = _a.style, step = _a.step, showStepNumber = _a.showStepNumber, restProps = tslib_1.__rest(_a, ["overrides", "isCompleted", "isCurrent", "isActive", "intent", "isRightBeforeActive", "isLast", "childrenCount", "orientation", "title", "subTitle", "alwaysShowDescription", "children", "className", "onClick", "variant", "role", "style", "step", "showStepNumber"]);
|
package/snackbar/constants.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TYPE_TO_HIDE_DURATION = exports.INTENT_TO_ROLE = exports.INTENT_TO_ICON = exports.TRANSITION_DURATION = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var error_solid_1 = tslib_1.__importDefault(require("../icon/components/error-solid"));
|
|
6
|
+
var warning_clr_1 = tslib_1.__importDefault(require("../icon/components/warning-clr"));
|
|
7
7
|
var tickCircle_solid_1 = tslib_1.__importDefault(require("../icon/components/tickCircle-solid"));
|
|
8
8
|
var delete_solid_1 = tslib_1.__importDefault(require("../icon/components/delete-solid"));
|
|
9
9
|
exports.TRANSITION_DURATION = 1000;
|
|
10
10
|
exports.INTENT_TO_ICON = {
|
|
11
11
|
success: tickCircle_solid_1.default,
|
|
12
|
-
error:
|
|
13
|
-
warning:
|
|
12
|
+
error: error_solid_1.default,
|
|
13
|
+
warning: warning_clr_1.default,
|
|
14
14
|
delete: delete_solid_1.default,
|
|
15
15
|
};
|
|
16
16
|
exports.INTENT_TO_ROLE = {
|
|
@@ -12,7 +12,7 @@ var button_1 = require("../button");
|
|
|
12
12
|
var styled_component_1 = require("./styled-component");
|
|
13
13
|
var stack_1 = require("../stack");
|
|
14
14
|
var TimezonePicker_1 = tslib_1.__importDefault(require("./TimezonePicker"));
|
|
15
|
-
var
|
|
15
|
+
var error_solid_1 = tslib_1.__importDefault(require("../icon/components/error-solid"));
|
|
16
16
|
var styled_components_1 = require("../date-picker/styled-components");
|
|
17
17
|
var locale_1 = require("../locale");
|
|
18
18
|
var utils_1 = require("./utils");
|
|
@@ -110,15 +110,13 @@ var RangeSelectorContainer = function (_a) {
|
|
|
110
110
|
}, [timeRange, preset, timezone, onSubmit, disableTimezone]);
|
|
111
111
|
// show error message only when it is present, hasError can be true when user has not selected any date,
|
|
112
112
|
// but we are showing any error message for that scenario.
|
|
113
|
-
var errorEl = errMsg ? ((0, jsx_runtime_1.jsxs)(stack_1.Stack, tslib_1.__assign({ direction: "horizontal", gap: 1, className: (0, classNames_1.default)('mr-1', { 'items-center': monthsShown !== 1 }), shrink: true }, { children: [(0, jsx_runtime_1.jsx)(
|
|
113
|
+
var errorEl = errMsg ? ((0, jsx_runtime_1.jsxs)(stack_1.Stack, tslib_1.__assign({ direction: "horizontal", gap: 1, className: (0, classNames_1.default)('mr-1', { 'items-center': monthsShown !== 1 }), shrink: true }, { children: [(0, jsx_runtime_1.jsx)(error_solid_1.default, { size: 14, className: "block", style: function (_a) {
|
|
114
114
|
var theme = _a.theme;
|
|
115
115
|
return ({
|
|
116
116
|
fill: theme.spr.clrRed,
|
|
117
117
|
});
|
|
118
118
|
} }), (0, jsx_runtime_1.jsx)(typography_1.Typography, tslib_1.__assign({ className: "my-0", variant: "bs3" }, { children: errMsg }))] }))) : null;
|
|
119
|
-
return ((0, jsx_runtime_1.jsxs)(box_1.Box, tslib_1.__assign({ className: "spr-ui-01 rounded-8" }, { children: [(0, jsx_runtime_1.jsxs)(Header, tslib_1.__assign({ "$setTimezone": setTimezone, "$onClose": props.onClose }, headerProps, { children: [(0, jsx_runtime_1.jsx)(HeaderBeforeEnhancer, tslib_1.__assign({ variant: "heading-7", "$as": "span", className: "flex items-center" }, headerBeforeEnhancerProps, { children: locale.timeRangePicker.headerLabel })), disableTimezone ? null : ((0, jsx_runtime_1.jsx)(TimezonePicker, tslib_1.__assign({ setTimezone: setTimezone, timezone: timezone, timezoneOptions: timezoneOptions }, timezonePickerProps, { className: ['w-0 grow max-w-md', timezonePickerProps === null || timezonePickerProps === void 0 ? void 0 : timezonePickerProps.className] })))] })), (0, jsx_runtime_1.jsx)(RangeSelector, tslib_1.__assign({ overrides: props.overrides, timeSelect: props.timeSelect, timeRangePresets: timeRangePresets, timezone: timezone, timeRange: timeRange, preset: preset, onChange: onDateChange, adapter: adapter, peekNextMonth: props.peekNextMonth, excludeDates: props.excludeDates, filterDate: props.filterDate, minDate: minDate, maxDate: maxDate, formatString: props.formatString, locale: props.locale, fixedHeight: props.fixedHeight, monthsShown: monthsShown, hidePresetSearch: hidePresetSearch, footerContent: (0, jsx_runtime_1.jsx)(Footer, tslib_1.__assign({ "$hasError": hasError, "$onSubmit": handleSubmit, "$onClose": props.onClose }, footerProps, { className: ['px-6 py-3 mt-2', footerProps.className] }, { children: (0, jsx_runtime_1.jsxs)(box_1.Box, tslib_1.__assign({ className: "justify-between w-0 grow flex" }, { children: [(0, jsx_runtime_1.jsx)(FooterBeforeEnhancer, tslib_1.__assign({}, footerBeforeEnhancerProps)), (0, jsx_runtime_1.jsxs)(stack_1.Stack, tslib_1.__assign({ direction: monthsShown === 1 ? 'vertical' : 'horizontal', gap: 3,
|
|
120
|
-
// @ts-ignore -- CSS-in-JS
|
|
121
|
-
className: [(0, classNames_1.default)({ 'items-center': monthsShown !== 1 }), { maxWidth: 'fit-content' }] }, { children: [monthsShown === 1 ? null : errorEl, (0, jsx_runtime_1.jsxs)(stack_1.StackItem, tslib_1.__assign({ className: "flex self-end" }, { children: [(footerProps === null || footerProps === void 0 ? void 0 : footerProps.showClearButton) ? ((0, jsx_runtime_1.jsx)(button_1.Button, tslib_1.__assign({ size: "xs", onClick: footerProps.handleClearBtnClick, variant: "secondary", "data-testid": "clear", disabled: timeRange.length === 0 }, { children: locale.timeRangePicker.clearBtnLabel }))) : ((0, jsx_runtime_1.jsx)(button_1.Button, tslib_1.__assign({ size: "xs", onClick: props.onClose, variant: "secondary", "data-testid": "cancel" }, { children: locale.timeRangePicker.cancelBtnLabel }))), (0, jsx_runtime_1.jsx)(button_1.Button, tslib_1.__assign({ size: "xs", className: "ml-3", onClick: handleSubmit, disabled: hasError, "data-testid": "save" }, { children: locale.timeRangePicker.saveBtnLabel }))] })), monthsShown === 1 ? errorEl : null] }))] })) })) }, rangeSelectorProps))] })));
|
|
119
|
+
return ((0, jsx_runtime_1.jsxs)(box_1.Box, tslib_1.__assign({ className: "spr-ui-01 rounded-8" }, { children: [(0, jsx_runtime_1.jsxs)(Header, tslib_1.__assign({ "$setTimezone": setTimezone, "$onClose": props.onClose }, headerProps, { children: [(0, jsx_runtime_1.jsx)(HeaderBeforeEnhancer, tslib_1.__assign({ variant: "heading-7", "$as": "span", className: "flex items-center" }, headerBeforeEnhancerProps, { children: locale.timeRangePicker.headerLabel })), disableTimezone ? null : ((0, jsx_runtime_1.jsx)(TimezonePicker, tslib_1.__assign({ setTimezone: setTimezone, timezone: timezone, timezoneOptions: timezoneOptions }, timezonePickerProps, { className: ['w-0 grow max-w-md', timezonePickerProps === null || timezonePickerProps === void 0 ? void 0 : timezonePickerProps.className] })))] })), (0, jsx_runtime_1.jsx)(RangeSelector, tslib_1.__assign({ overrides: props.overrides, timeSelect: props.timeSelect, timeRangePresets: timeRangePresets, timezone: timezone, timeRange: timeRange, preset: preset, onChange: onDateChange, adapter: adapter, peekNextMonth: props.peekNextMonth, excludeDates: props.excludeDates, filterDate: props.filterDate, minDate: minDate, maxDate: maxDate, formatString: props.formatString, locale: props.locale, fixedHeight: props.fixedHeight, monthsShown: monthsShown, hidePresetSearch: hidePresetSearch, footerContent: (0, jsx_runtime_1.jsx)(Footer, tslib_1.__assign({ "$hasError": hasError, "$onSubmit": handleSubmit, "$onClose": props.onClose }, footerProps, { className: ['px-6 py-3 mt-2', footerProps.className] }, { children: (0, jsx_runtime_1.jsxs)(box_1.Box, tslib_1.__assign({ className: "justify-between w-0 grow flex" }, { children: [(0, jsx_runtime_1.jsx)(FooterBeforeEnhancer, tslib_1.__assign({}, footerBeforeEnhancerProps)), (0, jsx_runtime_1.jsxs)(stack_1.Stack, tslib_1.__assign({ direction: monthsShown === 1 ? 'vertical' : 'horizontal', gap: 3, className: monthsShown !== 1 ? 'items-center' : undefined, style: { maxWidth: 'fit-content' } }, { children: [monthsShown === 1 ? null : errorEl, (0, jsx_runtime_1.jsxs)(stack_1.StackItem, tslib_1.__assign({ className: "flex self-end" }, { children: [(footerProps === null || footerProps === void 0 ? void 0 : footerProps.showClearButton) ? ((0, jsx_runtime_1.jsx)(button_1.Button, tslib_1.__assign({ size: "xs", onClick: footerProps.handleClearBtnClick, variant: "secondary", "data-testid": "clear", disabled: timeRange.length === 0 }, { children: locale.timeRangePicker.clearBtnLabel }))) : ((0, jsx_runtime_1.jsx)(button_1.Button, tslib_1.__assign({ size: "xs", onClick: props.onClose, variant: "secondary", "data-testid": "cancel" }, { children: locale.timeRangePicker.cancelBtnLabel }))), (0, jsx_runtime_1.jsx)(button_1.Button, tslib_1.__assign({ size: "xs", className: "ml-3", onClick: handleSubmit, disabled: hasError, "data-testid": "save" }, { children: locale.timeRangePicker.saveBtnLabel }))] })), monthsShown === 1 ? errorEl : null] }))] })) })) }, rangeSelectorProps))] })));
|
|
122
120
|
};
|
|
123
121
|
RangeSelectorContainer.displayName = 'RangeSelectorContainer';
|
|
124
122
|
exports.default = RangeSelectorContainer;
|