@react95/core 6.0.7 → 6.1.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.
Files changed (195) hide show
  1. package/@types/Alert/Alert.d.ts +2 -2
  2. package/@types/Checkbox/Checkbox.d.ts +2 -2
  3. package/@types/Cursor/Cursor.d.ts +32 -32
  4. package/@types/Fieldset/Fieldset.d.ts +1 -1
  5. package/@types/Input/Input.d.ts +1 -1
  6. package/@types/List/List.d.ts +2 -2
  7. package/@types/List/ListItem.d.ts +1 -1
  8. package/@types/Modal/Modal.d.ts +13 -9
  9. package/@types/Modal/ModalContext.d.ts +1 -1
  10. package/@types/Modal/ModalProvider.d.ts +1 -1
  11. package/@types/ProgressBar/ProgressBar.d.ts +1 -1
  12. package/@types/RadioButton/RadioButton.d.ts +1 -1
  13. package/@types/Tabs/Tabs.d.ts +1 -1
  14. package/@types/TaskBar/Clock.d.ts +2 -1
  15. package/@types/TaskBar/TaskBar.d.ts +1 -1
  16. package/@types/TaskBar/WindowButton.d.ts +1 -1
  17. package/@types/TextArea/TextArea.d.ts +2 -2
  18. package/@types/ThemeProvider/ThemeProvider.d.ts +1 -1
  19. package/@types/ThemeProvider/themes/baseTheme.d.ts +1 -1
  20. package/@types/Tooltip/Tooltip.d.ts +1 -1
  21. package/@types/Tree/Node.d.ts +1 -1
  22. package/@types/Tree/Tree.d.ts +2 -2
  23. package/@types/Video/Video.d.ts +2 -2
  24. package/@types/Video/buttons/Fullscreen.d.ts +1 -1
  25. package/@types/Video/buttons/Pause.d.ts +1 -1
  26. package/@types/Video/buttons/Play.d.ts +1 -1
  27. package/@types/Video/buttons/Stop.d.ts +1 -1
  28. package/cjs/Alert/Alert.js +9 -33
  29. package/cjs/Alert/index.js +0 -3
  30. package/cjs/Avatar/Avatar.js +7 -21
  31. package/cjs/Avatar/index.js +0 -3
  32. package/cjs/Button/Button.js +0 -6
  33. package/cjs/Button/index.js +0 -3
  34. package/cjs/Checkbox/Checkbox.js +6 -25
  35. package/cjs/Checkbox/index.js +0 -3
  36. package/cjs/Cursor/Cursor.js +23 -57
  37. package/cjs/Cursor/index.js +0 -3
  38. package/cjs/Dropdown/Dropdown.js +1 -16
  39. package/cjs/Dropdown/index.js +0 -3
  40. package/cjs/Fieldset/Fieldset.js +2 -15
  41. package/cjs/Fieldset/index.js +0 -3
  42. package/cjs/Frame/Frame.js +0 -6
  43. package/cjs/Frame/index.js +0 -3
  44. package/cjs/GlobalStyle/Borders.js +10 -22
  45. package/cjs/GlobalStyle/GlobalStyle.js +10 -23
  46. package/cjs/GlobalStyle/Scrollbar.js +7 -12
  47. package/cjs/GlobalStyle/index.js +0 -3
  48. package/cjs/Input/Input.js +0 -5
  49. package/cjs/Input/index.js +0 -3
  50. package/cjs/List/List.js +0 -9
  51. package/cjs/List/ListDivider.js +0 -4
  52. package/cjs/List/ListItem.js +3 -17
  53. package/cjs/List/index.js +0 -3
  54. package/cjs/Modal/Modal.js +35 -67
  55. package/cjs/Modal/ModalContext.js +1 -2
  56. package/cjs/Modal/ModalProvider.js +13 -38
  57. package/cjs/Modal/index.js +0 -4
  58. package/cjs/ProgressBar/ProgressBar.js +2 -17
  59. package/cjs/ProgressBar/index.js +0 -3
  60. package/cjs/RadioButton/RadioButton.js +2 -18
  61. package/cjs/RadioButton/index.js +0 -3
  62. package/cjs/RadioButton/radioButtonStates.js +0 -5
  63. package/cjs/Range/Range.js +0 -7
  64. package/cjs/Range/index.js +0 -3
  65. package/cjs/Tabs/Tab.js +2 -14
  66. package/cjs/Tabs/Tabs.js +16 -39
  67. package/cjs/Tabs/index.js +0 -3
  68. package/cjs/TaskBar/Clock.js +5 -24
  69. package/cjs/TaskBar/TaskBar.js +17 -41
  70. package/cjs/TaskBar/WindowButton.js +6 -23
  71. package/cjs/TaskBar/index.js +0 -3
  72. package/cjs/TextArea/TextArea.js +0 -10
  73. package/cjs/TextArea/index.js +0 -3
  74. package/cjs/ThemeProvider/ThemeProvider.js +1 -11
  75. package/cjs/ThemeProvider/index.js +0 -3
  76. package/cjs/ThemeProvider/themes/azureOrange.js +4 -12
  77. package/cjs/ThemeProvider/themes/baseTheme.js +0 -2
  78. package/cjs/ThemeProvider/themes/bee.js +4 -12
  79. package/cjs/ThemeProvider/themes/blackAndWhite.js +4 -12
  80. package/cjs/ThemeProvider/themes/brick.js +4 -12
  81. package/cjs/ThemeProvider/themes/candy.js +4 -12
  82. package/cjs/ThemeProvider/themes/coldGray.js +4 -12
  83. package/cjs/ThemeProvider/themes/counterStrike.js +4 -12
  84. package/cjs/ThemeProvider/themes/eggplant.js +4 -12
  85. package/cjs/ThemeProvider/themes/highContrast.js +4 -12
  86. package/cjs/ThemeProvider/themes/lilac.js +4 -12
  87. package/cjs/ThemeProvider/themes/lilacRoseDark.js +4 -12
  88. package/cjs/ThemeProvider/themes/maple.js +4 -12
  89. package/cjs/ThemeProvider/themes/marine.js +4 -12
  90. package/cjs/ThemeProvider/themes/matrix.js +4 -12
  91. package/cjs/ThemeProvider/themes/millenium.js +4 -12
  92. package/cjs/ThemeProvider/themes/modernDark.js +4 -12
  93. package/cjs/ThemeProvider/themes/molecule.js +4 -12
  94. package/cjs/ThemeProvider/themes/ninjaTurtles.js +4 -12
  95. package/cjs/ThemeProvider/themes/olive.js +4 -12
  96. package/cjs/ThemeProvider/themes/pamelaAnderson.js +4 -12
  97. package/cjs/ThemeProvider/themes/plum.js +4 -12
  98. package/cjs/ThemeProvider/themes/rainyDay.js +4 -12
  99. package/cjs/ThemeProvider/themes/rose.js +4 -12
  100. package/cjs/ThemeProvider/themes/slate.js +4 -12
  101. package/cjs/ThemeProvider/themes/spruce.js +4 -12
  102. package/cjs/ThemeProvider/themes/storm.js +4 -12
  103. package/cjs/ThemeProvider/themes/theSixtiesUSA.js +4 -12
  104. package/cjs/ThemeProvider/themes/tokyoDark.js +4 -12
  105. package/cjs/ThemeProvider/themes/tooSexy.js +4 -12
  106. package/cjs/ThemeProvider/themes/travel.js +4 -12
  107. package/cjs/ThemeProvider/themes/vaporTeal.js +4 -12
  108. package/cjs/ThemeProvider/themes/vermillion.js +4 -12
  109. package/cjs/ThemeProvider/themes/violetDark.js +4 -12
  110. package/cjs/ThemeProvider/themes/water.js +4 -12
  111. package/cjs/ThemeProvider/themes/win95.js +4 -12
  112. package/cjs/ThemeProvider/themes.js +0 -37
  113. package/cjs/TitleBar/TitleBar.js +7 -20
  114. package/cjs/TitleBar/index.js +0 -3
  115. package/cjs/Tooltip/Tooltip.js +11 -39
  116. package/cjs/Tooltip/index.js +0 -3
  117. package/cjs/Tree/Node.js +13 -51
  118. package/cjs/Tree/Tree.js +1 -15
  119. package/cjs/Tree/index.js +0 -3
  120. package/cjs/Video/Video.js +19 -76
  121. package/cjs/Video/buttons/Fullscreen.js +0 -7
  122. package/cjs/Video/buttons/Pause.js +0 -7
  123. package/cjs/Video/buttons/Play.js +0 -7
  124. package/cjs/Video/buttons/Stop.js +0 -7
  125. package/cjs/Video/buttons/index.js +0 -5
  126. package/cjs/Video/index.js +0 -3
  127. package/cjs/index.js +0 -24
  128. package/cjs/shared/test/utils.js +28 -53
  129. package/esm/Alert/Alert.js +8 -21
  130. package/esm/Avatar/Avatar.js +7 -12
  131. package/esm/Checkbox/Checkbox.js +6 -11
  132. package/esm/Cursor/Cursor.js +23 -23
  133. package/esm/Dropdown/Dropdown.js +1 -6
  134. package/esm/Fieldset/Fieldset.js +2 -7
  135. package/esm/GlobalStyle/Borders.js +10 -13
  136. package/esm/GlobalStyle/GlobalStyle.js +7 -7
  137. package/esm/GlobalStyle/Scrollbar.js +7 -6
  138. package/esm/List/ListItem.js +3 -8
  139. package/esm/Modal/Modal.js +35 -51
  140. package/esm/Modal/ModalProvider.js +15 -31
  141. package/esm/ProgressBar/ProgressBar.js +2 -7
  142. package/esm/RadioButton/RadioButton.js +2 -7
  143. package/esm/Tabs/Tab.js +2 -7
  144. package/esm/Tabs/Tabs.js +15 -29
  145. package/esm/TaskBar/Clock.js +5 -15
  146. package/esm/TaskBar/TaskBar.js +16 -27
  147. package/esm/TaskBar/WindowButton.js +6 -13
  148. package/esm/TextArea/TextArea.js +0 -1
  149. package/esm/ThemeProvider/ThemeProvider.js +1 -3
  150. package/esm/ThemeProvider/themes/azureOrange.js +4 -6
  151. package/esm/ThemeProvider/themes/bee.js +4 -6
  152. package/esm/ThemeProvider/themes/blackAndWhite.js +4 -6
  153. package/esm/ThemeProvider/themes/brick.js +4 -6
  154. package/esm/ThemeProvider/themes/candy.js +4 -6
  155. package/esm/ThemeProvider/themes/coldGray.js +4 -6
  156. package/esm/ThemeProvider/themes/counterStrike.js +4 -6
  157. package/esm/ThemeProvider/themes/eggplant.js +4 -6
  158. package/esm/ThemeProvider/themes/highContrast.js +4 -6
  159. package/esm/ThemeProvider/themes/lilac.js +4 -6
  160. package/esm/ThemeProvider/themes/lilacRoseDark.js +4 -6
  161. package/esm/ThemeProvider/themes/maple.js +4 -6
  162. package/esm/ThemeProvider/themes/marine.js +4 -6
  163. package/esm/ThemeProvider/themes/matrix.js +4 -6
  164. package/esm/ThemeProvider/themes/millenium.js +4 -6
  165. package/esm/ThemeProvider/themes/modernDark.js +4 -6
  166. package/esm/ThemeProvider/themes/molecule.js +4 -6
  167. package/esm/ThemeProvider/themes/ninjaTurtles.js +4 -6
  168. package/esm/ThemeProvider/themes/olive.js +4 -6
  169. package/esm/ThemeProvider/themes/pamelaAnderson.js +4 -6
  170. package/esm/ThemeProvider/themes/plum.js +4 -6
  171. package/esm/ThemeProvider/themes/rainyDay.js +4 -6
  172. package/esm/ThemeProvider/themes/rose.js +4 -6
  173. package/esm/ThemeProvider/themes/slate.js +4 -6
  174. package/esm/ThemeProvider/themes/spruce.js +4 -6
  175. package/esm/ThemeProvider/themes/storm.js +4 -6
  176. package/esm/ThemeProvider/themes/theSixtiesUSA.js +4 -6
  177. package/esm/ThemeProvider/themes/tokyoDark.js +4 -6
  178. package/esm/ThemeProvider/themes/tooSexy.js +4 -6
  179. package/esm/ThemeProvider/themes/travel.js +4 -6
  180. package/esm/ThemeProvider/themes/vaporTeal.js +4 -6
  181. package/esm/ThemeProvider/themes/vermillion.js +4 -6
  182. package/esm/ThemeProvider/themes/violetDark.js +4 -6
  183. package/esm/ThemeProvider/themes/water.js +4 -6
  184. package/esm/ThemeProvider/themes/win95.js +4 -6
  185. package/esm/TitleBar/TitleBar.js +7 -9
  186. package/esm/Tooltip/Tooltip.js +11 -30
  187. package/esm/Tree/Node.js +13 -34
  188. package/esm/Tree/Tree.js +1 -6
  189. package/esm/Video/Video.js +20 -58
  190. package/esm/Video/buttons/Fullscreen.js +0 -3
  191. package/esm/Video/buttons/Pause.js +0 -3
  192. package/esm/Video/buttons/Play.js +0 -3
  193. package/esm/Video/buttons/Stop.js +0 -3
  194. package/esm/shared/test/utils.js +28 -48
  195. package/package.json +3 -4
@@ -1,35 +1,37 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
5
  import { css } from 'styled-components';
6
+ import NwseResize from './cursors/AngleUpLeft.png';
7
+ import NeswResize from './cursors/AngleUpRight.png';
8
+ import Progress from './cursors/AppStarting.png';
4
9
  import Auto from './cursors/Arrow.png';
5
- import Text from './cursors/Text.png';
6
- import VerticalText from './cursors/VText.png';
7
- import Help from './cursors/Help.png';
10
+ import NoDrop from './cursors/Circle.png';
11
+ import ColResize from './cursors/ColRezise.png';
12
+ import Copy from './cursors/Copy.png';
8
13
  import Crosshair from './cursors/Cross.png';
14
+ import SResize from './cursors/DownArrow.png';
15
+ import SwResize from './cursors/DownLeftArrow.png';
16
+ import SeResize from './cursors/DownRightArrow.png';
17
+ import Grab from './cursors/Hand.png';
9
18
  import Pointer from './cursors/HandPointer.png';
10
- import Progress from './cursors/AppStarting.png';
11
- import Wait from './cursors/Wait.png';
19
+ import Grabbing from './cursors/Handsqueezed.png';
20
+ import Help from './cursors/Help.png';
21
+ import WResize from './cursors/LeftArrow.png';
22
+ import EwResize from './cursors/LeftRight.png';
12
23
  import Alias from './cursors/Link.png';
13
- import Copy from './cursors/Copy.png';
14
24
  import Move from './cursors/Move.png';
15
- import NoDrop from './cursors/Circle.png';
16
25
  import NotAllowed from './cursors/NO.png';
17
- import Grab from './cursors/Hand.png';
18
- import Grabbing from './cursors/Handsqueezed.png';
19
- import ColResize from './cursors/ColRezise.png';
26
+ import EResize from './cursors/RightArrow.png';
20
27
  import RowResize from './cursors/RowResize.png';
28
+ import Text from './cursors/Text.png';
21
29
  import NResize from './cursors/UpArrow.png';
22
- import EResize from './cursors/RightArrow.png';
23
- import SResize from './cursors/DownArrow.png';
24
- import WResize from './cursors/LeftArrow.png';
25
30
  import NsResize from './cursors/UpDownArrow.png';
26
- import EwResize from './cursors/LeftRight.png';
27
- import NeResize from './cursors/UpRightArrow.png';
28
31
  import NwResize from './cursors/UpLeftArrow.png';
29
- import SeResize from './cursors/DownRightArrow.png';
30
- import SwResize from './cursors/DownLeftArrow.png';
31
- import NeswResize from './cursors/AngleUpRight.png';
32
- import NwseResize from './cursors/AngleUpLeft.png';
32
+ import NeResize from './cursors/UpRightArrow.png';
33
+ import VerticalText from './cursors/VText.png';
34
+ import Wait from './cursors/Wait.png';
33
35
  import ZoomIn from './cursors/ZoomIn.png';
34
36
  import ZoomOut from './cursors/ZoomOut.png';
35
37
  var cursors = {
@@ -66,13 +68,11 @@ var cursors = {
66
68
  ZoomIn: ZoomIn,
67
69
  ZoomOut: ZoomOut
68
70
  };
69
-
70
71
  var toKebabCase = function toKebabCase(str) {
71
72
  return "".concat(str.charAt(0).toLowerCase()).concat(str.substring(1)).replace(/[A-Z]/g, function (letter) {
72
73
  return "-".concat(letter.toLowerCase());
73
74
  });
74
75
  };
75
-
76
76
  var Cursor = Object.keys(cursors).reduce(function (all, cur) {
77
77
  return Object.assign(all, _defineProperty({}, cur, css(["\n cursor: ", " ", ";\n "], cursors[cur] && "url(".concat(cursors[cur], "), "), toKebabCase(cur))));
78
78
  }, {});
@@ -1,11 +1,7 @@
1
1
  var _excluded = ["options"];
2
-
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
5
  import React, { forwardRef } from 'react';
10
6
  import styled, { th } from '@xstyled/styled-components';
11
7
  import caret from './imgs/downcaret.png';
@@ -19,8 +15,7 @@ var Select = styled.select.withConfig({
19
15
  })(["\n position: relative;\n outline: none;\n border: none;\n border-radius: 0;\n width: 100%;\n height: 20px;\n\n padding: 3;\n\n color: materialText;\n background-color: inputBackground;\n\n border-left: 1;\n border-left-color: borderDark;\n border-top: 1;\n border-top-color: borderDark;\n\n box-shadow: inset -1px -1px 0 0 ", ",\n inset 1px 1px 0 0 ", ",\n 0.5px 0.5px 0 0.5px ", ";\n\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n"], th('colors.material'), th('colors.borderDarkest'), th('colors.borderLightest'));
20
16
  var Dropdown = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
17
  var options = _ref.options,
22
- rest = _objectWithoutProperties(_ref, _excluded);
23
-
18
+ rest = _objectWithoutProperties(_ref, _excluded);
24
19
  return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(Select, _extends({}, rest, {
25
20
  ref: ref
26
21
  }), options && options.map(function (option) {
@@ -1,11 +1,7 @@
1
1
  var _excluded = ["legend", "children"];
2
-
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
5
  import React, { forwardRef } from 'react';
10
6
  import styled, { th } from '@xstyled/styled-components';
11
7
  var Field = styled.fieldset.withConfig({
@@ -18,9 +14,8 @@ var Legend = styled.legend.withConfig({
18
14
  })(["\n padding-left: 4px;\n padding-right: 1px;\n"]);
19
15
  var Fieldset = /*#__PURE__*/forwardRef(function (_ref, ref) {
20
16
  var legend = _ref.legend,
21
- children = _ref.children,
22
- rest = _objectWithoutProperties(_ref, _excluded);
23
-
17
+ children = _ref.children,
18
+ rest = _objectWithoutProperties(_ref, _excluded);
24
19
  return /*#__PURE__*/React.createElement(Field, _extends({}, rest, {
25
20
  ref: ref
26
21
  }), legend && /*#__PURE__*/React.createElement(Legend, null, legend), children);
@@ -1,17 +1,16 @@
1
1
  import { css } from 'styled-components';
2
2
  export var createBorder = function createBorder(_ref) {
3
3
  var direction = _ref.direction,
4
- outerTopLeft = _ref.outerTopLeft,
5
- innerTopLeft = _ref.innerTopLeft,
6
- outerBottomRight = _ref.outerBottomRight,
7
- innerBottomRight = _ref.innerBottomRight;
4
+ outerTopLeft = _ref.outerTopLeft,
5
+ innerTopLeft = _ref.innerTopLeft,
6
+ outerBottomRight = _ref.outerBottomRight,
7
+ innerBottomRight = _ref.innerBottomRight;
8
8
  return css(["\n border: 0;\n box-shadow: inset -1px -1px 0 0\n ", ",\n inset 1px 1px 0 0\n ", ",\n inset -2px -2px 0 0\n ", ",\n inset 2px 2px 0 0\n ", ";\n"], direction == 'extrude' ? outerBottomRight : innerTopLeft, direction == 'extrude' ? outerTopLeft : innerBottomRight, direction == 'extrude' ? innerBottomRight : outerTopLeft, direction == 'extrude' ? innerTopLeft : outerBottomRight);
9
9
  };
10
10
  export var border = function border() {
11
11
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
12
- _ref2$direction = _ref2.direction,
13
- direction = _ref2$direction === void 0 ? 'extrude' : _ref2$direction;
14
-
12
+ _ref2$direction = _ref2.direction,
13
+ direction = _ref2$direction === void 0 ? 'extrude' : _ref2$direction;
15
14
  return createBorder({
16
15
  direction: direction,
17
16
  outerBottomRight: css(["\n ", "\n "], function (_ref3) {
@@ -34,9 +33,8 @@ export var border = function border() {
34
33
  };
35
34
  export var windowBorder = function windowBorder() {
36
35
  var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
37
- _ref7$direction = _ref7.direction,
38
- direction = _ref7$direction === void 0 ? 'extrude' : _ref7$direction;
39
-
36
+ _ref7$direction = _ref7.direction,
37
+ direction = _ref7$direction === void 0 ? 'extrude' : _ref7$direction;
40
38
  return createBorder({
41
39
  direction: direction,
42
40
  outerBottomRight: css(["\n ", "\n "], function (_ref8) {
@@ -59,9 +57,8 @@ export var windowBorder = function windowBorder() {
59
57
  };
60
58
  export var scrollBarBorder = function scrollBarBorder() {
61
59
  var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
62
- _ref12$direction = _ref12.direction,
63
- direction = _ref12$direction === void 0 ? 'extrude' : _ref12$direction;
64
-
60
+ _ref12$direction = _ref12.direction,
61
+ direction = _ref12$direction === void 0 ? 'extrude' : _ref12$direction;
65
62
  return createBorder({
66
63
  direction: direction,
67
64
  outerBottomRight: css(["\n ", "\n "], function (_ref13) {
@@ -1,13 +1,13 @@
1
1
  import { createGlobalStyle } from '@xstyled/styled-components';
2
- import woff2 from './font/MS-Sans-Serif.woff2';
3
- import woff from './font/MS-Sans-Serif.woff';
4
- import ttf from './font/MS-Sans-Serif.ttf';
5
2
  import eot from './font/MS-Sans-Serif.eot';
6
- import videowoff2 from './font/React95Video-Numbers.woff2';
7
- import videowoff from './font/React95Video-Numbers.woff';
8
- import videottf from './font/React95Video-Numbers.ttf';
3
+ import ttf from './font/MS-Sans-Serif.ttf';
4
+ import woff from './font/MS-Sans-Serif.woff';
5
+ import woff2 from './font/MS-Sans-Serif.woff2';
9
6
  import videoeot from './font/React95Video-Numbers.eot';
10
- import { scrollbars } from './Scrollbar';
7
+ import videottf from './font/React95Video-Numbers.ttf';
8
+ import videowoff from './font/React95Video-Numbers.woff';
9
+ import videowoff2 from './font/React95Video-Numbers.woff2';
11
10
  import Cursor from '../Cursor/Cursor';
11
+ import { scrollbars } from './Scrollbar';
12
12
  var GlobalStyle = createGlobalStyle(["\n @font-face {\n font-family: 'MS Sans Serif';\n src: url('", "');\n src: url('", "') format('woff2'),\n url('", "') format('woff'),\n url('", "') format('truetype'),\n url('", "?#iefix') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n @font-face {\n font-family: 'React95Video-Numbers';\n src: url('", "');\n src: url('", "') format('woff2'),\n url('", "') format('woff'),\n url('", "') format('truetype'),\n url('", "?#iefix') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n body {\n background-color: #5aa;\n margin: 0;\n padding: 0;\n font-size: 12px;\n color: materialText;\n }\n\n a {\n color: anchor;\n }\n\n a:visited {\n color: anchorVisited;\n }\n\n * {\n font-family: 'MS Sans Serif';\n box-sizing: border-box;\n }\n\n // scrollbar\n ", "\n\n html, .auto, * { ", " }\n .default { ", " }\n .none { ", " }\n .help { ", " }\n .pointer, :any-link { ", " }\n .progress { ", " }\n .wait { ", " }\n .crosshair { ", " }\n .text { ", " }\n .vertical-text { ", " }\n .alias { ", " }\n .copy { ", " }\n .move { ", " }\n .no-drop { ", " }\n .not-allowed { ", " }\n .grab { ", " }\n .grabbing { ", " }\n .col-resize { ", " }\n .row-resize { ", " }\n .n-resize { ", " }\n .e-resize { ", " }\n .s-resize { ", " }\n .w-resize { ", " }\n .ns-resize { ", " }\n .ew-resize { ", " }\n .ne-resize { ", " }\n .nw-resize { ", " }\n .se-resize { ", " }\n .sw-resize { ", " }\n .nesw-resize { ", " }\n .nwse-resize { ", " }\n .zoom-in { ", " }\n .zoom-out { ", " }\n"], eot, woff2, woff, ttf, eot, videoeot, videowoff2, videowoff, videottf, videoeot, scrollbars, Cursor.Auto, Cursor.Auto, Cursor.None, Cursor.Help, Cursor.Pointer, Cursor.Progress, Cursor.Wait, Cursor.Crosshair, Cursor.Text, Cursor.VerticalText, Cursor.Alias, Cursor.Copy, Cursor.Move, Cursor.NoDrop, Cursor.NotAllowed, Cursor.Grab, Cursor.Grabbing, Cursor.ColResize, Cursor.RowResize, Cursor.NResize, Cursor.EResize, Cursor.SResize, Cursor.WResize, Cursor.NsResize, Cursor.EwResize, Cursor.NeResize, Cursor.NwResize, Cursor.SeResize, Cursor.SwResize, Cursor.NeswResize, Cursor.NwseResize, Cursor.ZoomIn, Cursor.ZoomOut);
13
13
  export default GlobalStyle;
@@ -5,15 +5,16 @@ export var createTriangleSVG = function createTriangleSVG(color) {
5
5
  var svg = "<svg height=\"21\" width=\"21\" viewBox=\"0 0 21 21\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g transform=\"rotate(".concat(angle, " 13 13)\">\n <polygon fill=\"").concat(color, "\" points=\"6,10 20,10 13,17\"/>\n </g>\n </svg>");
6
6
  var encoded = typeof window != 'undefined' ? window.btoa(svg) : '';
7
7
  return "url(data:image/svg+xml;base64,".concat(encoded, ")");
8
- }; // TODO for flat box styles add checkered background when disabled (not solid color)
8
+ };
9
9
 
10
+ // TODO for flat box styles add checkered background when disabled (not solid color)
10
11
  export var createHatchedBackground = function createHatchedBackground(_ref) {
11
12
  var _ref$mainColor = _ref.mainColor,
12
- mainColor = _ref$mainColor === void 0 ? 'black' : _ref$mainColor,
13
- _ref$secondaryColor = _ref.secondaryColor,
14
- secondaryColor = _ref$secondaryColor === void 0 ? 'transparent' : _ref$secondaryColor,
15
- _ref$pixelSize = _ref.pixelSize,
16
- pixelSize = _ref$pixelSize === void 0 ? 2 : _ref$pixelSize;
13
+ mainColor = _ref$mainColor === void 0 ? 'black' : _ref$mainColor,
14
+ _ref$secondaryColor = _ref.secondaryColor,
15
+ secondaryColor = _ref$secondaryColor === void 0 ? 'transparent' : _ref$secondaryColor,
16
+ _ref$pixelSize = _ref.pixelSize,
17
+ pixelSize = _ref$pixelSize === void 0 ? 2 : _ref$pixelSize;
17
18
  return css(["\n background-image: ", ";\n background-color: ", ";\n background-size: ", ";\n background-position: 0 0, ", ";\n"], ["linear-gradient(\n 45deg,\n ".concat(mainColor, " 25%,\n transparent 25%,\n transparent 75%,\n ").concat(mainColor, " 75%\n )"), "linear-gradient(\n 45deg,\n ".concat(mainColor, " 25%,\n transparent 25%,\n transparent 75%,\n ").concat(mainColor, " 75%\n )")].join(','), secondaryColor, "".concat(pixelSize * 2, "px ").concat(pixelSize * 2, "px"), "".concat(pixelSize, "px ").concat(pixelSize, "px"));
18
19
  };
19
20
  export var scrollbars = css(["\n ::-webkit-scrollbar {\n width: 17;\n height: 17;\n }\n ::-webkit-scrollbar-track {\n ", "\n }\n ::-webkit-scrollbar-thumb {\n box-sizing: border-box;\n display: inline-block;\n background: ", ";\n color: ", ";\n ", "\n }\n\n ::-webkit-scrollbar-corner {\n background-color: ", ";\n }\n ::-webkit-scrollbar-button {\n box-sizing: border-box;\n display: inline-block;\n background: ", ";\n color: ", ";\n ", "\n display: block;\n outline-offset: -2px;\n height: 17;\n width: 17;\n background-repeat: no-repeat;\n background-size: 80%;\n background-position: 0 0;\n }\n ::-webkit-scrollbar-button:active,\n ::-webkit-scrollbar-button:active {\n background-position: 0 1;\n ", "\n }\n\n ::-webkit-scrollbar-button:horizontal:increment:start,\n ::-webkit-scrollbar-button:horizontal:decrement:end,\n ::-webkit-scrollbar-button:vertical:increment:start,\n ::-webkit-scrollbar-button:vertical:decrement:end {\n display: none;\n }\n\n ::-webkit-scrollbar-button:horizontal:decrement {\n background-image: ", ";\n }\n\n ::-webkit-scrollbar-button:horizontal:increment {\n background-image: ", ";\n }\n\n ::-webkit-scrollbar-button:vertical:decrement {\n background-image: ", ";\n }\n\n ::-webkit-scrollbar-button:vertical:increment {\n background-image: ", ";\n }\n"], function (_ref2) {
@@ -1,11 +1,7 @@
1
1
  var _excluded = ["icon", "children"];
2
-
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
5
  import React, { forwardRef } from 'react';
10
6
  import styled, { css } from '@xstyled/styled-components';
11
7
  import rightcaret from '../GlobalStyle/imgs/rightcaret.svg';
@@ -21,10 +17,9 @@ var Item = styled.li.withConfig({
21
17
  });
22
18
  var ListItem = /*#__PURE__*/forwardRef(function (_ref3, ref) {
23
19
  var icon = _ref3.icon,
24
- _ref3$children = _ref3.children,
25
- children = _ref3$children === void 0 ? [] : _ref3$children,
26
- rest = _objectWithoutProperties(_ref3, _excluded);
27
-
20
+ _ref3$children = _ref3.children,
21
+ children = _ref3$children === void 0 ? [] : _ref3$children,
22
+ rest = _objectWithoutProperties(_ref3, _excluded);
28
23
  return /*#__PURE__*/React.createElement(Item, _extends({}, rest, {
29
24
  icon: !!icon,
30
25
  ref: ref,
@@ -1,25 +1,15 @@
1
- var _excluded = ["hasWindowButton", "buttons", "buttonsAlignment", "children", "closeModal", "defaultPosition", "height", "icon", "menu", "title", "width"];
2
-
1
+ var _excluded = ["hasWindowButton", "buttons", "buttonsAlignment", "children", "closeModal", "defaultPosition", "positionOffset", "height", "icon", "menu", "title", "width"];
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
-
7
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
-
9
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
-
11
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
-
13
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
14
-
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
8
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
-
17
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
-
19
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
-
21
- import * as React from 'react';
22
11
  import styled, { css, th } from '@xstyled/styled-components';
12
+ import * as React from 'react';
23
13
  import Draggable from 'react-draggable';
24
14
  import Button from '../Button';
25
15
  import TitleBar from '../TitleBar';
@@ -29,7 +19,7 @@ var ModalWrapper = styled.div.withConfig({
29
19
  componentId: "sc-4ouk59-0"
30
20
  })(["\n display: flex;\n flex-direction: column;\n\n position: fixed;\n\n padding: 2 2 8;\n\n top: 50px;\n\n background-color: material;\n\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset 0 0 0 1px ", ",\n 1px 1px 0 1px ", ";\n\n ", "\n ", "\n"], th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), function (_ref) {
31
21
  var width = _ref.width,
32
- height = _ref.height;
22
+ height = _ref.height;
33
23
  return "\n width: ".concat(width ? "".concat(width, "px") : 'auto', ";\n height: ").concat(height ? "".concat(height, "px") : 'auto', ";\n ");
34
24
  }, function (_ref2) {
35
25
  var active = _ref2.active;
@@ -44,7 +34,7 @@ var ButtonWrapper = styled.div.withConfig({
44
34
  componentId: "sc-4ouk59-2"
45
35
  })(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n\n padding: 0 6 6 6;\n\n & ", " {\n margin-right: 6;\n min-width: 70px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n"], function (_ref3) {
46
36
  var _ref3$buttonsAlignmen = _ref3.buttonsAlignment,
47
- buttonsAlignment = _ref3$buttonsAlignmen === void 0 ? 'center' : _ref3$buttonsAlignmen;
37
+ buttonsAlignment = _ref3$buttonsAlignmen === void 0 ? 'center' : _ref3$buttonsAlignmen;
48
38
  return buttonsAlignment;
49
39
  }, Button);
50
40
  var MenuWrapper = styled.ul.withConfig({
@@ -59,44 +49,39 @@ var MenuItem = styled.li.withConfig({
59
49
  return active && css(["\n background-color: primary;\n color: materialTextInvert;\n "]);
60
50
  });
61
51
  MenuItem.displayName = 'MenuItem';
62
-
63
52
  var ModalRenderer = function ModalRenderer(_ref5, ref) {
64
53
  var _ref5$hasWindowButton = _ref5.hasWindowButton,
65
- hasButton = _ref5$hasWindowButton === void 0 ? true : _ref5$hasWindowButton,
66
- buttons = _ref5.buttons,
67
- buttonsAlignment = _ref5.buttonsAlignment,
68
- children = _ref5.children,
69
- closeModal = _ref5.closeModal,
70
- defaultPosition = _ref5.defaultPosition,
71
- height = _ref5.height,
72
- icon = _ref5.icon,
73
- menu = _ref5.menu,
74
- title = _ref5.title,
75
- width = _ref5.width,
76
- rest = _objectWithoutProperties(_ref5, _excluded);
77
-
54
+ hasButton = _ref5$hasWindowButton === void 0 ? true : _ref5$hasWindowButton,
55
+ buttons = _ref5.buttons,
56
+ buttonsAlignment = _ref5.buttonsAlignment,
57
+ children = _ref5.children,
58
+ closeModal = _ref5.closeModal,
59
+ defaultPosition = _ref5.defaultPosition,
60
+ positionOffset = _ref5.positionOffset,
61
+ height = _ref5.height,
62
+ icon = _ref5.icon,
63
+ menu = _ref5.menu,
64
+ title = _ref5.title,
65
+ width = _ref5.width,
66
+ rest = _objectWithoutProperties(_ref5, _excluded);
78
67
  var _React$useContext = React.useContext(ModalContext),
79
- addWindows = _React$useContext.addWindows,
80
- removeWindow = _React$useContext.removeWindow,
81
- updateWindow = _React$useContext.updateWindow,
82
- setActiveWindow = _React$useContext.setActiveWindow,
83
- activeWindow = _React$useContext.activeWindow;
84
-
68
+ addWindows = _React$useContext.addWindows,
69
+ removeWindow = _React$useContext.removeWindow,
70
+ updateWindow = _React$useContext.updateWindow,
71
+ setActiveWindow = _React$useContext.setActiveWindow,
72
+ activeWindow = _React$useContext.activeWindow;
85
73
  var _React$useState = React.useState(null),
86
- _React$useState2 = _slicedToArray(_React$useState, 2),
87
- id = _React$useState2[0],
88
- setId = _React$useState2[1];
89
-
74
+ _React$useState2 = _slicedToArray(_React$useState, 2),
75
+ id = _React$useState2[0],
76
+ setId = _React$useState2[1];
90
77
  var _React$useState3 = React.useState(''),
91
- _React$useState4 = _slicedToArray(_React$useState3, 2),
92
- menuOpened = _React$useState4[0],
93
- setMenuOpened = _React$useState4[1];
94
-
78
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
79
+ menuOpened = _React$useState4[0],
80
+ setMenuOpened = _React$useState4[1];
95
81
  var _React$useState5 = React.useState(false),
96
- _React$useState6 = _slicedToArray(_React$useState5, 2),
97
- isActive = _React$useState6[0],
98
- setIsActive = _React$useState6[1];
99
-
82
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
83
+ isActive = _React$useState6[0],
84
+ setIsActive = _React$useState6[1];
100
85
  React.useEffect(function () {
101
86
  if (!id) {
102
87
  var newId = addWindows({
@@ -104,7 +89,6 @@ var ModalRenderer = function ModalRenderer(_ref5, ref) {
104
89
  title: title,
105
90
  hasButton: hasButton
106
91
  });
107
-
108
92
  if (newId) {
109
93
  setId(newId);
110
94
  setActiveWindow(newId);
@@ -130,6 +114,7 @@ var ModalRenderer = function ModalRenderer(_ref5, ref) {
130
114
  return /*#__PURE__*/React.createElement(Draggable, {
131
115
  handle: ".draggable",
132
116
  defaultPosition: defaultPosition,
117
+ positionOffset: positionOffset,
133
118
  onMouseDown: id ? function () {
134
119
  return setActiveWindow(id);
135
120
  } : undefined
@@ -148,7 +133,7 @@ var ModalRenderer = function ModalRenderer(_ref5, ref) {
148
133
  onClick: closeModal
149
134
  }, "X"))), menu && menu.length > 0 && /*#__PURE__*/React.createElement(MenuWrapper, null, menu.map(function (_ref6) {
150
135
  var name = _ref6.name,
151
- list = _ref6.list;
136
+ list = _ref6.list;
152
137
  var active = menuOpened === name;
153
138
  return /*#__PURE__*/React.createElement(MenuItem, {
154
139
  key: name,
@@ -171,7 +156,6 @@ var ModalRenderer = function ModalRenderer(_ref5, ref) {
171
156
  }, button.value);
172
157
  }))));
173
158
  };
174
-
175
159
  var Modal = /*#__PURE__*/React.forwardRef(ModalRenderer);
176
160
  Modal.displayName = 'Modal';
177
161
  Modal.defaultProps = {
@@ -1,65 +1,53 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
-
3
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
-
5
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
-
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
-
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
11
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
-
13
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
-
15
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
-
17
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
-
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
13
  import { nanoid } from 'nanoid';
20
14
  import * as React from 'react';
21
- import ModalContext from './ModalContext'; // eslint-disable-next-line @typescript-eslint/ban-types
15
+ import ModalContext from './ModalContext';
16
+
17
+ // eslint-disable-next-line @typescript-eslint/ban-types
22
18
 
23
19
  var windowStackReducer = function windowStackReducer(state, action) {
24
20
  var newWindows = _objectSpread({}, state);
25
-
26
21
  switch (action.type) {
27
22
  case 'ADD_WINDOW':
28
23
  {
29
24
  newWindows[action.id] = action.window;
30
25
  return newWindows;
31
26
  }
32
-
33
27
  case 'REMOVE_WINDOW':
34
28
  {
35
29
  delete newWindows[action.id];
36
30
  return newWindows;
37
31
  }
38
-
39
32
  case 'UPDATE_WINDOW':
40
33
  {
41
34
  newWindows[action.id] = action.window;
42
35
  return newWindows;
43
36
  }
44
-
45
37
  default:
46
38
  return state;
47
39
  }
48
40
  };
49
-
50
41
  var ModalProvider = function ModalProvider(_ref) {
51
42
  var children = _ref.children;
52
-
53
43
  var _React$useReducer = React.useReducer(windowStackReducer, {}),
54
- _React$useReducer2 = _slicedToArray(_React$useReducer, 2),
55
- windows = _React$useReducer2[0],
56
- dispatch = _React$useReducer2[1];
57
-
44
+ _React$useReducer2 = _slicedToArray(_React$useReducer, 2),
45
+ windows = _React$useReducer2[0],
46
+ dispatch = _React$useReducer2[1];
58
47
  var _React$useState = React.useState(),
59
- _React$useState2 = _slicedToArray(_React$useState, 2),
60
- activeWindow = _React$useState2[0],
61
- setActiveWindow = _React$useState2[1];
62
-
48
+ _React$useState2 = _slicedToArray(_React$useState, 2),
49
+ activeWindow = _React$useState2[0],
50
+ setActiveWindow = _React$useState2[1];
63
51
  var addWindows = function addWindows(window) {
64
52
  var id = nanoid();
65
53
  dispatch({
@@ -69,14 +57,12 @@ var ModalProvider = function ModalProvider(_ref) {
69
57
  });
70
58
  return id;
71
59
  };
72
-
73
60
  var removeWindow = function removeWindow(id) {
74
61
  dispatch({
75
62
  type: 'REMOVE_WINDOW',
76
63
  id: id
77
64
  });
78
65
  };
79
-
80
66
  var updateWindow = function updateWindow(id, window) {
81
67
  dispatch({
82
68
  type: 'UPDATE_WINDOW',
@@ -84,7 +70,6 @@ var ModalProvider = function ModalProvider(_ref) {
84
70
  window: window
85
71
  });
86
72
  };
87
-
88
73
  return /*#__PURE__*/React.createElement(ModalContext.Provider, {
89
74
  value: {
90
75
  windows: windows,
@@ -96,5 +81,4 @@ var ModalProvider = function ModalProvider(_ref) {
96
81
  }
97
82
  }, children);
98
83
  };
99
-
100
84
  export default ModalProvider;
@@ -1,11 +1,7 @@
1
1
  var _excluded = ["width", "percent"];
2
-
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
5
  import React, { forwardRef } from 'react';
10
6
  import styled, { css, th } from '@xstyled/styled-components';
11
7
  var Wrapper = styled.div.withConfig({
@@ -38,9 +34,8 @@ var Progress = styled.div.withConfig({
38
34
  }, th('colors.materialTextInvert'));
39
35
  var ProgressBar = /*#__PURE__*/forwardRef(function (_ref5, ref) {
40
36
  var width = _ref5.width,
41
- percent = _ref5.percent,
42
- rest = _objectWithoutProperties(_ref5, _excluded);
43
-
37
+ percent = _ref5.percent,
38
+ rest = _objectWithoutProperties(_ref5, _excluded);
44
39
  return /*#__PURE__*/React.createElement(Wrapper, _extends({
45
40
  width: width
46
41
  }, rest, {
@@ -1,11 +1,7 @@
1
1
  var _excluded = ["children", "disabled"];
2
-
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
5
  import React, { forwardRef } from 'react';
10
6
  import styled, { css, th } from '@xstyled/styled-components';
11
7
  import { radioChecked, radioCheckedDisabled, radioUnchecked, radioUncheckedDisabled } from './radioButtonStates';
@@ -32,9 +28,8 @@ var Label = styled.label.withConfig({
32
28
  });
33
29
  var RadioButton = /*#__PURE__*/forwardRef(function (_ref2, ref) {
34
30
  var children = _ref2.children,
35
- disabled = _ref2.disabled,
36
- props = _objectWithoutProperties(_ref2, _excluded);
37
-
31
+ disabled = _ref2.disabled,
32
+ props = _objectWithoutProperties(_ref2, _excluded);
38
33
  return /*#__PURE__*/React.createElement(Label, {
39
34
  disabled: disabled
40
35
  }, /*#__PURE__*/React.createElement(Field, _extends({
package/esm/Tabs/Tab.js CHANGED
@@ -1,11 +1,7 @@
1
1
  var _excluded = ["activeTab", "title"];
2
-
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
5
  import React, { forwardRef } from 'react';
10
6
  import styled, { css, th } from '@xstyled/styled-components';
11
7
  var NavItem = styled.li.withConfig({
@@ -17,9 +13,8 @@ var NavItem = styled.li.withConfig({
17
13
  });
18
14
  var Tab = /*#__PURE__*/forwardRef(function (_ref2, ref) {
19
15
  var activeTab = _ref2.activeTab,
20
- title = _ref2.title,
21
- rest = _objectWithoutProperties(_ref2, _excluded);
22
-
16
+ title = _ref2.title,
17
+ rest = _objectWithoutProperties(_ref2, _excluded);
23
18
  return /*#__PURE__*/React.createElement(NavItem, _extends({}, rest, {
24
19
  active: activeTab === title,
25
20
  ref: ref