@expressms/smartapp-ui 1.1.6 → 1.1.8
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/build/main/assets/icons/refresh.svg +1 -1
- package/build/main/assets/icons/story-loader.svg +3 -0
- package/build/main/constants/constants.d.ts +13 -13
- package/build/main/constants/constants.js +14 -13
- package/build/main/constants/index.d.ts +1 -0
- package/build/main/constants/index.js +1 -0
- package/build/main/constants/types.d.ts +8 -0
- package/build/main/constants/types.js +1 -0
- package/build/main/helpers/index.d.ts +3 -1
- package/build/main/helpers/index.js +6 -2
- package/build/main/styles/main.js +0 -0
- package/build/main/styles/stories.module.scss +167 -55
- package/build/main/styles/styles.min.css +30 -77
- package/build/main/styles/styles.scss +13 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +1 -1
- package/build/main//321/201omponents/ActionModal/ActionModal.js +9 -9
- package/build/main//321/201omponents/ActionModal/types.d.ts +2 -2
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +3 -3
- package/build/main//321/201omponents/Button/Button.d.ts +1 -1
- package/build/main//321/201omponents/Button/Button.js +3 -2
- package/build/main//321/201omponents/Button/types.d.ts +2 -1
- package/build/main//321/201omponents/Checkbox/Checkbox.js +3 -3
- package/build/main//321/201omponents/Chips/Chips.js +2 -2
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +4 -4
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +2 -2
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
- package/build/main//321/201omponents/Error/Error.js +2 -2
- package/build/main//321/201omponents/Header/Header.js +6 -6
- package/build/main//321/201omponents/Header/types.d.ts +3 -2
- package/build/main//321/201omponents/Input/Input.d.ts +1 -1
- package/build/main//321/201omponents/Input/Input.js +4 -4
- package/build/main//321/201omponents/Input/types.d.ts +2 -1
- package/build/main//321/201omponents/Loader/Loader.d.ts +1 -1
- package/build/main//321/201omponents/Loader/Loader.js +8 -5
- package/build/main//321/201omponents/Loader/types.d.ts +2 -1
- package/build/main//321/201omponents/Modal/Modal.d.ts +1 -1
- package/build/main//321/201omponents/Modal/Modal.js +7 -7
- package/build/main//321/201omponents/Modal/types.d.ts +2 -2
- package/build/main//321/201omponents/Notification/types.d.ts +2 -2
- package/build/main//321/201omponents/Profile/Profile.js +4 -4
- package/build/main//321/201omponents/RadioButton/RadioButton.js +3 -3
- package/build/main//321/201omponents/Stories/Stories.js +30 -8
- package/build/main//321/201omponents/Stories/types.d.ts +4 -3
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js +2 -2
- package/build/main//321/201omponents/SyncLoader/types.d.ts +2 -2
- package/build/main//321/201omponents/Toggle/Toggle.js +3 -3
- package/package.json +3 -1
|
@@ -12,15 +12,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { COLORS } from '../../constants';
|
|
16
16
|
import { getColor } from '../../helpers';
|
|
17
17
|
import '../../styles/stories.module.scss';
|
|
18
18
|
var Toggle = function (_a) {
|
|
19
19
|
var _b = _a.id, id = _b === void 0 ? 'toggle' : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isChecked, isChecked = _d === void 0 ? false : _d, checkedColor = _a.checkedColor, checkedHoverColor = _a.checkedHoverColor, _e = _a.onClick, onClick = _e === void 0 ? function () { return undefined; } : _e;
|
|
20
20
|
var handleClick = function () { return !isDisabled && onClick(); };
|
|
21
21
|
useEffect(function () {
|
|
22
|
-
document.documentElement.style.setProperty('--toggle-color', getColor(checkedColor,
|
|
23
|
-
document.documentElement.style.setProperty('--toggle-hover-color', getColor(checkedHoverColor,
|
|
22
|
+
document.documentElement.style.setProperty('--toggle-color', getColor(checkedColor, COLORS.blue));
|
|
23
|
+
document.documentElement.style.setProperty('--toggle-hover-color', getColor(checkedHoverColor, COLORS.darkBlue));
|
|
24
24
|
}, [checkedColor, checkedHoverColor]);
|
|
25
25
|
return (_jsx("div", __assign({ className: "smartapp-toggle-wrapper" }, { children: _jsxs("label", __assign({ htmlFor: "smartapp-toggle-".concat(id), className: "smartapp-toggle", onClick: handleClick }, { children: [_jsx("input", { type: "checkbox", id: "smartapp-toggle-".concat(id), checked: isChecked, disabled: true }), _jsx("span", { className: classNames('smartapp-slider', { 'smartapp-slider__disabled': isDisabled }) })] })) })));
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressms/smartapp-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "SmartApp UI library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/main/index.js",
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"@storybook/addon-essentials": "^6.5.15",
|
|
17
17
|
"@storybook/addon-links": "^6.5.15",
|
|
18
18
|
"@storybook/addon-viewport": "^6.5.15",
|
|
19
|
+
"@storybook/addons": "^6.5.15",
|
|
20
|
+
"@storybook/core-events": "^6.5.15",
|
|
19
21
|
"@storybook/preset-scss": "^1.0.3",
|
|
20
22
|
"@storybook/react": "^6.5.15",
|
|
21
23
|
"@svgr/webpack": "5.5",
|