@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.
Files changed (47) hide show
  1. package/build/main/assets/icons/refresh.svg +1 -1
  2. package/build/main/assets/icons/story-loader.svg +3 -0
  3. package/build/main/constants/constants.d.ts +13 -13
  4. package/build/main/constants/constants.js +14 -13
  5. package/build/main/constants/index.d.ts +1 -0
  6. package/build/main/constants/index.js +1 -0
  7. package/build/main/constants/types.d.ts +8 -0
  8. package/build/main/constants/types.js +1 -0
  9. package/build/main/helpers/index.d.ts +3 -1
  10. package/build/main/helpers/index.js +6 -2
  11. package/build/main/styles/main.js +0 -0
  12. package/build/main/styles/stories.module.scss +167 -55
  13. package/build/main/styles/styles.min.css +30 -77
  14. package/build/main/styles/styles.scss +13 -0
  15. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +1 -1
  16. package/build/main//321/201omponents/ActionModal/ActionModal.js +9 -9
  17. package/build/main//321/201omponents/ActionModal/types.d.ts +2 -2
  18. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +3 -3
  19. package/build/main//321/201omponents/Button/Button.d.ts +1 -1
  20. package/build/main//321/201omponents/Button/Button.js +3 -2
  21. package/build/main//321/201omponents/Button/types.d.ts +2 -1
  22. package/build/main//321/201omponents/Checkbox/Checkbox.js +3 -3
  23. package/build/main//321/201omponents/Chips/Chips.js +2 -2
  24. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +4 -4
  25. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +2 -2
  26. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
  27. package/build/main//321/201omponents/Error/Error.js +2 -2
  28. package/build/main//321/201omponents/Header/Header.js +6 -6
  29. package/build/main//321/201omponents/Header/types.d.ts +3 -2
  30. package/build/main//321/201omponents/Input/Input.d.ts +1 -1
  31. package/build/main//321/201omponents/Input/Input.js +4 -4
  32. package/build/main//321/201omponents/Input/types.d.ts +2 -1
  33. package/build/main//321/201omponents/Loader/Loader.d.ts +1 -1
  34. package/build/main//321/201omponents/Loader/Loader.js +8 -5
  35. package/build/main//321/201omponents/Loader/types.d.ts +2 -1
  36. package/build/main//321/201omponents/Modal/Modal.d.ts +1 -1
  37. package/build/main//321/201omponents/Modal/Modal.js +7 -7
  38. package/build/main//321/201omponents/Modal/types.d.ts +2 -2
  39. package/build/main//321/201omponents/Notification/types.d.ts +2 -2
  40. package/build/main//321/201omponents/Profile/Profile.js +4 -4
  41. package/build/main//321/201omponents/RadioButton/RadioButton.js +3 -3
  42. package/build/main//321/201omponents/Stories/Stories.js +30 -8
  43. package/build/main//321/201omponents/Stories/types.d.ts +4 -3
  44. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +2 -2
  45. package/build/main//321/201omponents/SyncLoader/types.d.ts +2 -2
  46. package/build/main//321/201omponents/Toggle/Toggle.js +3 -3
  47. package/package.json +3 -1
@@ -1,6 +1,6 @@
1
- export interface ISyncLoaderProps {
1
+ import { IThemeProps } from '../../constants';
2
+ export interface ISyncLoaderProps extends IThemeProps {
2
3
  isLoading: boolean;
3
- theme?: 'default' | 'dark';
4
4
  color?: string;
5
5
  fontFamily?: string;
6
6
  }
@@ -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 { DEFAULT_BLUE_ICON_COLOR, DEFAULT_BLUE_ICON_HOVER_COLOR } from '../../constants';
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, DEFAULT_BLUE_ICON_COLOR));
23
- document.documentElement.style.setProperty('--toggle-hover-color', getColor(checkedHoverColor, DEFAULT_BLUE_ICON_HOVER_COLOR));
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.6",
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",