@react95/core 6.0.0 → 6.0.3
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/@types/Avatar/Avatar.d.ts +1 -2
- package/@types/Frame/Frame.d.ts +1 -1
- package/@types/Modal/ModalProvider.d.ts +1 -1
- package/@types/TaskBar/Clock.d.ts +0 -1
- package/@types/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/@types/shared/test/utils.d.ts +3 -59
- package/cjs/Alert/Alert.js +12 -7
- package/cjs/Avatar/Avatar.js +10 -8
- package/cjs/Button/Button.js +9 -8
- package/cjs/Checkbox/Checkbox.js +17 -11
- package/cjs/Cursor/Cursor.js +1 -1
- package/cjs/Dropdown/Dropdown.js +9 -9
- package/cjs/Fieldset/Fieldset.js +9 -11
- package/cjs/Frame/Frame.js +9 -4
- package/cjs/GlobalStyle/Borders.js +13 -13
- package/cjs/GlobalStyle/GlobalStyle.js +1 -5
- package/cjs/GlobalStyle/Scrollbar.js +2 -2
- package/cjs/Input/Input.js +4 -5
- package/cjs/List/List.js +10 -7
- package/cjs/List/ListDivider.js +4 -7
- package/cjs/List/ListItem.js +5 -8
- package/cjs/Modal/Modal.js +22 -13
- package/cjs/ProgressBar/ProgressBar.js +18 -12
- package/cjs/RadioButton/RadioButton.js +18 -12
- package/cjs/Range/Range.js +6 -9
- package/cjs/Tabs/Tab.js +5 -8
- package/cjs/Tabs/Tabs.js +8 -6
- package/cjs/TaskBar/Clock.js +5 -6
- package/cjs/TaskBar/TaskBar.js +4 -5
- package/cjs/TaskBar/WindowButton.js +10 -10
- package/cjs/TextArea/TextArea.js +4 -5
- package/cjs/ThemeProvider/ThemeProvider.js +1 -1
- package/cjs/TitleBar/TitleBar.js +25 -24
- package/cjs/Tooltip/Tooltip.js +8 -6
- package/cjs/Tree/Node.js +24 -10
- package/cjs/Tree/Tree.js +1 -1
- package/cjs/Video/Video.js +32 -17
- package/cjs/shared/test/utils.js +98 -0
- package/esm/Alert/Alert.js +12 -7
- package/esm/Avatar/Avatar.js +10 -8
- package/esm/Button/Button.js +5 -7
- package/esm/Checkbox/Checkbox.js +18 -11
- package/esm/Cursor/Cursor.js +1 -1
- package/esm/Dropdown/Dropdown.js +9 -8
- package/esm/Fieldset/Fieldset.js +9 -8
- package/esm/Frame/Frame.js +5 -3
- package/esm/GlobalStyle/Borders.js +13 -13
- package/esm/GlobalStyle/GlobalStyle.js +1 -5
- package/esm/GlobalStyle/Scrollbar.js +2 -2
- package/esm/Input/Input.js +4 -5
- package/esm/List/List.js +5 -7
- package/esm/List/ListDivider.js +4 -6
- package/esm/List/ListItem.js +5 -7
- package/esm/Modal/Modal.js +23 -13
- package/esm/ProgressBar/ProgressBar.js +18 -11
- package/esm/RadioButton/RadioButton.js +18 -11
- package/esm/Range/Range.js +7 -9
- package/esm/Tabs/Tab.js +6 -8
- package/esm/Tabs/Tabs.js +8 -6
- package/esm/TaskBar/Clock.js +5 -6
- package/esm/TaskBar/TaskBar.js +4 -5
- package/esm/TaskBar/WindowButton.js +11 -10
- package/esm/TextArea/TextArea.js +4 -5
- package/esm/ThemeProvider/ThemeProvider.js +1 -1
- package/esm/TitleBar/TitleBar.js +21 -25
- package/esm/Tooltip/Tooltip.js +8 -6
- package/esm/Tree/Node.js +24 -10
- package/esm/Tree/Tree.js +1 -1
- package/esm/Video/Video.js +29 -13
- package/esm/shared/test/utils.js +71 -0
- package/package.json +6 -6
package/cjs/TextArea/TextArea.js
CHANGED
|
@@ -13,8 +13,6 @@ var _styledComponents = _interopRequireDefault(require("@xstyled/styled-componen
|
|
|
13
13
|
|
|
14
14
|
var _styledSystem = require("styled-system");
|
|
15
15
|
|
|
16
|
-
var _templateObject;
|
|
17
|
-
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
17
|
|
|
20
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -23,9 +21,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
21
|
|
|
24
22
|
function _extends() { _extends = Object.assign || 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); }
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
var TextAreaComponent = _styledComponents["default"].textarea.withConfig({
|
|
25
|
+
displayName: "TextArea__TextAreaComponent",
|
|
26
|
+
componentId: "sc-nssclc-0"
|
|
27
|
+
})(["\n outline: none;\n border: none;\n cursor: text;\n\n padding: 3 3 5 3;\n\n color: materialText;\n background-color: inputBackground;\n\n border-radius: 0;\n\n border-top-width: 1;\n border-top-style: 1;\n border-top-color: borderDark;\n\n border-right-width: 0;\n border-bottom-width: 0;\n\n border-left-width: 1;\n border-left-style: 1;\n border-left-color: borderDark;\n\n box-shadow: input;\n\n -webkit-appearance: none;\n\n ", "\n ", "\n ", "\n"], _styledSystem.padding, _styledSystem.borders, _styledSystem.shadow);
|
|
29
28
|
|
|
30
29
|
var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
31
30
|
return /*#__PURE__*/_react["default"].createElement(TextAreaComponent, _extends({}, props, {
|
package/cjs/TitleBar/TitleBar.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
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); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -7,41 +9,43 @@ exports["default"] = void 0;
|
|
|
7
9
|
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
|
|
10
|
-
var _styledComponents =
|
|
11
|
-
|
|
12
|
-
var _system = require("@xstyled/system");
|
|
12
|
+
var _styledComponents = _interopRequireWildcard(require("@xstyled/styled-components"));
|
|
13
13
|
|
|
14
14
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
15
15
|
|
|
16
16
|
var _Frame = _interopRequireDefault(require("../Frame/Frame"));
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
31
|
-
|
|
32
|
-
var OptionsBox = _styledComponents["default"].ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n"])));
|
|
24
|
+
var OptionsBox = _styledComponents["default"].ul.withConfig({
|
|
25
|
+
displayName: "TitleBar__OptionsBox",
|
|
26
|
+
componentId: "sc-5cvtvn-0"
|
|
27
|
+
})(["\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n"]);
|
|
33
28
|
|
|
34
29
|
var Option = (0, _styledComponents["default"])(_Button["default"]).attrs({
|
|
35
30
|
as: 'li'
|
|
36
|
-
})(
|
|
31
|
+
}).withConfig({
|
|
32
|
+
displayName: "TitleBar__Option",
|
|
33
|
+
componentId: "sc-5cvtvn-1"
|
|
34
|
+
})(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n margin-left: 2;\n padding: 0;\n\n width: 17px;\n height: 14px;\n\n min-width: 0;\n font-weight: 600;\n font-size: 10;\n\n &:active {\n padding: 1 0 0 1;\n\n outline: none;\n }\n\n &:first-child {\n margin-right: 0;\n }\n\n &:focus {\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset -1px -1px 0px 1px ", ";\n }\n"], (0, _styledComponents.th)('colors.borderLightest'), (0, _styledComponents.th)('colors.borderDark'));
|
|
37
35
|
Option.displayName = 'Option';
|
|
38
|
-
var TitleBarBackground = (0, _styledComponents["default"])(_Frame["default"])(
|
|
36
|
+
var TitleBarBackground = (0, _styledComponents["default"])(_Frame["default"]).withConfig({
|
|
37
|
+
displayName: "TitleBar__TitleBarBackground",
|
|
38
|
+
componentId: "sc-5cvtvn-2"
|
|
39
|
+
})(["\n height: 18;\n margin-bottom: 2;\n\n padding: 2;\n\n display: flex;\n\n box-shadow: none;\n\n img {\n width: 15;\n height: 14;\n margin-right: 4;\n }\n\n background: ", ";\n"], function (_ref) {
|
|
39
40
|
var active = _ref.active,
|
|
40
41
|
theme = _ref.theme;
|
|
41
42
|
return active ? theme.colors.headerBackground : theme.colors.headerNotActiveBackground;
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
var Title = _styledComponents["default"].div(
|
|
45
|
+
var Title = _styledComponents["default"].div.withConfig({
|
|
46
|
+
displayName: "TitleBar__Title",
|
|
47
|
+
componentId: "sc-5cvtvn-3"
|
|
48
|
+
})(["\n flex-grow: 1;\n font-weight: bold;\n line-height: 1.4em;\n margin: 0;\n font-size: 1em;\n"]);
|
|
45
49
|
|
|
46
50
|
var TitleBarRenderer = function TitleBarRenderer(_ref2, ref) {
|
|
47
51
|
var children = _ref2.children,
|
|
@@ -50,15 +54,12 @@ var TitleBarRenderer = function TitleBarRenderer(_ref2, ref) {
|
|
|
50
54
|
icon = _ref2.icon,
|
|
51
55
|
_ref2$active = _ref2.active,
|
|
52
56
|
active = _ref2$active === void 0 ? true : _ref2$active,
|
|
53
|
-
className = _ref2.className
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/_react["default"].createElement(TitleBarBackground, _extends({
|
|
57
|
+
className = _ref2.className;
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(TitleBarBackground, {
|
|
57
59
|
active: active,
|
|
58
|
-
color: active ? 'headerText' : 'headerNotActiveText'
|
|
59
|
-
}, props, {
|
|
60
|
+
color: active ? 'headerText' : 'headerNotActiveText',
|
|
60
61
|
ref: ref
|
|
61
|
-
}
|
|
62
|
+
}, icon && icon, /*#__PURE__*/_react["default"].createElement(Title, {
|
|
62
63
|
className: className
|
|
63
64
|
}, title), children);
|
|
64
65
|
};
|
package/cjs/Tooltip/Tooltip.js
CHANGED
|
@@ -15,8 +15,6 @@ var _Frame = _interopRequireDefault(require("../Frame"));
|
|
|
15
15
|
|
|
16
16
|
var _excluded = ["children", "text", "delay"];
|
|
17
17
|
|
|
18
|
-
var _templateObject, _templateObject2;
|
|
19
|
-
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
19
|
|
|
22
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -41,11 +39,15 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
41
39
|
|
|
42
40
|
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; }
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
var Tip = (0, _styledComponents["default"])(_Frame["default"]).withConfig({
|
|
43
|
+
displayName: "Tooltip__Tip",
|
|
44
|
+
componentId: "sc-klr207-0"
|
|
45
|
+
})(["\n background: radial-gradient(#ff0 20%, transparent 20%) 0 0,\n radial-gradient(#ff0 20%, transparent 20%) 4px 4px,\n radial-gradient(rgba(255, 255, 255, 0.1) 20%, transparent 25%) 0 1px,\n radial-gradient(rgba(255, 255, 255, 0.1) 20%, transparent 25%) 3px 4px;\n background-size: 7px 7px;\n background-color: borderLightest;\n border: 1;\n padding: 2 2 2 4;\n box-shadow: none;\n position: absolute;\n top: -20px;\n text-align: center;\n z-index: taskbar;\n"]);
|
|
47
46
|
|
|
48
|
-
var Wrapper = _styledComponents["default"].div(
|
|
47
|
+
var Wrapper = _styledComponents["default"].div.withConfig({
|
|
48
|
+
displayName: "Tooltip__Wrapper",
|
|
49
|
+
componentId: "sc-klr207-1"
|
|
50
|
+
})(["\n display: inline-block;\n position: relative;\n cursor: default;\n white-space: nowrap;\n"]);
|
|
49
51
|
|
|
50
52
|
var TooltipRenderer = function TooltipRenderer(_ref, ref) {
|
|
51
53
|
var children = _ref.children,
|
package/cjs/Tree/Node.js
CHANGED
|
@@ -21,8 +21,6 @@ var _icons = require("@react95/icons");
|
|
|
21
21
|
|
|
22
22
|
var _excluded = ["children", "id", "icon", "label", "onClick"];
|
|
23
23
|
|
|
24
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
25
|
-
|
|
26
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
25
|
|
|
28
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -47,8 +45,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
47
45
|
|
|
48
46
|
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; }
|
|
49
47
|
|
|
50
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
51
|
-
|
|
52
48
|
var icons = {
|
|
53
49
|
FILE_MEDIA: _icons.MediaCd,
|
|
54
50
|
FILE_TEXT: _icons.FileText,
|
|
@@ -61,23 +57,41 @@ var icons = {
|
|
|
61
57
|
};
|
|
62
58
|
exports.icons = icons;
|
|
63
59
|
|
|
64
|
-
var NodeItem = _styledComponents["default"].div(
|
|
60
|
+
var NodeItem = _styledComponents["default"].div.withConfig({
|
|
61
|
+
displayName: "Node__NodeItem",
|
|
62
|
+
componentId: "sc-284w29-0"
|
|
63
|
+
})(["\n list-style-type: none;\n background-repeat: no-repeat;\n background-image: url(", ");\n\n &:last-child {\n background-image: url(", ");\n }\n"], _treeMid["default"], function (_ref) {
|
|
65
64
|
var isOpen = _ref.isOpen;
|
|
66
65
|
return isOpen ? _treeMid["default"] : _treeLast["default"];
|
|
67
66
|
});
|
|
68
67
|
|
|
69
|
-
var NodeInfo = _styledComponents["default"].div(
|
|
68
|
+
var NodeInfo = _styledComponents["default"].div.withConfig({
|
|
69
|
+
displayName: "Node__NodeInfo",
|
|
70
|
+
componentId: "sc-284w29-1"
|
|
71
|
+
})(["\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n"]);
|
|
70
72
|
|
|
71
|
-
var FolderStatus = _styledComponents["default"].div(
|
|
73
|
+
var FolderStatus = _styledComponents["default"].div.withConfig({
|
|
74
|
+
displayName: "Node__FolderStatus",
|
|
75
|
+
componentId: "sc-284w29-2"
|
|
76
|
+
})(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 10px;\n height: 10px;\n border: 1;\n border-color: borderDarkest;\n background-color: inputBackground;\n font-size: 11px;\n"]);
|
|
72
77
|
|
|
73
|
-
var IconContainer = _styledComponents["default"].div(
|
|
78
|
+
var IconContainer = _styledComponents["default"].div.withConfig({
|
|
79
|
+
displayName: "Node__IconContainer",
|
|
80
|
+
componentId: "sc-284w29-3"
|
|
81
|
+
})(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-right: 6;\n margin-left: ", "px;\n\n > img {\n width: 14px;\n height: 14px;\n }\n"], function (_ref2) {
|
|
74
82
|
var hasChildren = _ref2.hasChildren;
|
|
75
83
|
return hasChildren ? 8 : 18;
|
|
76
84
|
});
|
|
77
85
|
|
|
78
|
-
var NodeChildren = _styledComponents["default"].ul(
|
|
86
|
+
var NodeChildren = _styledComponents["default"].ul.withConfig({
|
|
87
|
+
displayName: "Node__NodeChildren",
|
|
88
|
+
componentId: "sc-284w29-4"
|
|
89
|
+
})(["\n padding: 0 0 0 22;\n background-image: url(", ");\n background-repeat: repeat-y;\n"], _treeNodeChildren["default"]);
|
|
79
90
|
|
|
80
|
-
var Label = _styledComponents["default"].span(
|
|
91
|
+
var Label = _styledComponents["default"].span.withConfig({
|
|
92
|
+
displayName: "Node__Label",
|
|
93
|
+
componentId: "sc-284w29-5"
|
|
94
|
+
})(["\n outline: none;\n padding: 1;\n\n :focus {\n border-width: 1;\n border-style: dotted;\n padding: 0;\n }\n"]);
|
|
81
95
|
|
|
82
96
|
var NodeIcon = function NodeIcon(_ref3) {
|
|
83
97
|
var hasChildren = _ref3.hasChildren,
|
package/cjs/Tree/Tree.js
CHANGED
|
@@ -30,7 +30,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
30
30
|
var TreeParent = _styledComponents["default"].ul.withConfig({
|
|
31
31
|
displayName: "Tree__TreeParent",
|
|
32
32
|
componentId: "sc-1wiuvvx-0"
|
|
33
|
-
})(["padding:0
|
|
33
|
+
})(["\n padding: 0;\n"]);
|
|
34
34
|
|
|
35
35
|
var Tree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
36
36
|
var data = _ref.data,
|
package/cjs/Video/Video.js
CHANGED
|
@@ -13,8 +13,6 @@ var _styledComponents = _interopRequireWildcard(require("@xstyled/styled-compone
|
|
|
13
13
|
|
|
14
14
|
var _icons = require("@react95/icons");
|
|
15
15
|
|
|
16
|
-
var _system = require("@xstyled/system");
|
|
17
|
-
|
|
18
16
|
var _Frame = _interopRequireDefault(require("../Frame/Frame"));
|
|
19
17
|
|
|
20
18
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
@@ -29,8 +27,6 @@ var _ListDivider = _interopRequireDefault(require("../List/ListDivider"));
|
|
|
29
27
|
|
|
30
28
|
var _excluded = ["name", "src", "videoProps", "style"];
|
|
31
29
|
|
|
32
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
33
|
-
|
|
34
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
31
|
|
|
36
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -61,9 +57,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
61
57
|
|
|
62
58
|
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; }
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
var VideoTag = _styledComponents["default"].video.withConfig({
|
|
61
|
+
displayName: "Video__VideoTag",
|
|
62
|
+
componentId: "sc-aeevd2-0"
|
|
63
|
+
})(["\n width: 100%;\n padding: 2;\n\n display: ", ";\n"], function (_ref) {
|
|
67
64
|
var visible = _ref.visible;
|
|
68
65
|
return visible ? 'block' : 'none';
|
|
69
66
|
});
|
|
@@ -76,19 +73,37 @@ var Source = function Source(_ref2) {
|
|
|
76
73
|
});
|
|
77
74
|
};
|
|
78
75
|
|
|
79
|
-
var ControlBtn = (0, _styledComponents["default"])(_Button["default"])
|
|
76
|
+
var ControlBtn = (0, _styledComponents["default"])(_Button["default"]).withConfig({
|
|
77
|
+
displayName: "Video__ControlBtn",
|
|
78
|
+
componentId: "sc-aeevd2-1"
|
|
79
|
+
})(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n\n svg {\n fill: materialText;\n }\n\n &&,\n &:active,\n &:focus {\n width: 20px;\n height: 20px;\n padding: 7;\n\n ", "\n }\n"], function (_ref3) {
|
|
80
80
|
var disabled = _ref3.disabled;
|
|
81
|
-
return disabled && (0, _styledComponents.css)(
|
|
81
|
+
return disabled && (0, _styledComponents.css)(["\n padding: 4;\n svg {\n fill: borderDark;\n border-bottom: 1px solid;\n border-bottom-color: borderLightest;\n border-right: 1px solid;\n border-right-color: borderLightest;\n }\n "]);
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
-
var Controls = _styledComponents["default"].div(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
var Controls = _styledComponents["default"].div.withConfig({
|
|
85
|
+
displayName: "Video__Controls",
|
|
86
|
+
componentId: "sc-aeevd2-2"
|
|
87
|
+
})(["\n display: flex;\n align-items: center;\n padding: 2 0;\n"]);
|
|
88
|
+
|
|
89
|
+
var CountDownContainer = (0, _styledComponents["default"])(_Frame["default"]).withConfig({
|
|
90
|
+
displayName: "Video__CountDownContainer",
|
|
91
|
+
componentId: "sc-aeevd2-3"
|
|
92
|
+
})(["\n display: flex;\n padding: 6;\n margin-bottom: 4;\n\n box-shadow: in;\n background-color: canvas;\n height: 50px;\n\n color: canvasText;\n"]);
|
|
93
|
+
|
|
94
|
+
var VideoFont = _styledComponents["default"].span.withConfig({
|
|
95
|
+
displayName: "Video__VideoFont",
|
|
96
|
+
componentId: "sc-aeevd2-4"
|
|
97
|
+
})(["\n font-family: 'React95Video-Numbers';\n text-transform: uppercase;\n"]);
|
|
98
|
+
|
|
99
|
+
var ResetFrame = (0, _styledComponents["default"])(_Frame["default"]).withConfig({
|
|
100
|
+
displayName: "Video__ResetFrame",
|
|
101
|
+
componentId: "sc-aeevd2-5"
|
|
102
|
+
})(["\n background-color: transparent;\n box-shadow: none;\n"]);
|
|
103
|
+
var VideoRange = (0, _styledComponents["default"])(_Range["default"]).withConfig({
|
|
104
|
+
displayName: "Video__VideoRange",
|
|
105
|
+
componentId: "sc-aeevd2-6"
|
|
106
|
+
})(["\n &::-webkit-slider-thumb {\n height: 18px;\n margin-top: -7px;\n width: 10px;\n }\n\n &[value='0']::-webkit-slider-thumb {\n margin-left: -2px;\n }\n"]);
|
|
92
107
|
|
|
93
108
|
var PlayOrPause = function PlayOrPause(_ref4) {
|
|
94
109
|
var playing = _ref4.playing;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
render: true,
|
|
8
|
+
waitRender: true
|
|
9
|
+
};
|
|
10
|
+
exports.waitRender = exports.render = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = require("@testing-library/react");
|
|
13
|
+
|
|
14
|
+
Object.keys(_react).forEach(function (key) {
|
|
15
|
+
if (key === "default" || key === "__esModule") return;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
+
if (key in exports && exports[key] === _react[key]) return;
|
|
18
|
+
Object.defineProperty(exports, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _react[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
var _ThemeProvider = _interopRequireDefault(require("../../ThemeProvider"));
|
|
27
|
+
|
|
28
|
+
var _excluded = ["container"];
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
37
|
+
|
|
38
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
var customRender = function customRender(ui, options) {
|
|
47
|
+
return (0, _react.render)(ui, _objectSpread({
|
|
48
|
+
wrapper: _ThemeProvider["default"]
|
|
49
|
+
}, options));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.render = customRender;
|
|
53
|
+
|
|
54
|
+
var waitRender = /*#__PURE__*/function () {
|
|
55
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(ui, options) {
|
|
56
|
+
var _customRender, container, rest;
|
|
57
|
+
|
|
58
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
59
|
+
while (1) {
|
|
60
|
+
switch (_context2.prev = _context2.next) {
|
|
61
|
+
case 0:
|
|
62
|
+
_customRender = customRender(ui, options), container = _customRender.container, rest = _objectWithoutProperties(_customRender, _excluded);
|
|
63
|
+
_context2.next = 3;
|
|
64
|
+
return (0, _react.act)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
65
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
66
|
+
while (1) {
|
|
67
|
+
switch (_context.prev = _context.next) {
|
|
68
|
+
case 0:
|
|
69
|
+
_context.next = 2;
|
|
70
|
+
return Promise.resolve(container);
|
|
71
|
+
|
|
72
|
+
case 2:
|
|
73
|
+
case "end":
|
|
74
|
+
return _context.stop();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, _callee);
|
|
78
|
+
})));
|
|
79
|
+
|
|
80
|
+
case 3:
|
|
81
|
+
return _context2.abrupt("return", _objectSpread({
|
|
82
|
+
container: container
|
|
83
|
+
}, rest));
|
|
84
|
+
|
|
85
|
+
case 4:
|
|
86
|
+
case "end":
|
|
87
|
+
return _context2.stop();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, _callee2);
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
return function waitRender(_x, _x2) {
|
|
94
|
+
return _ref.apply(this, arguments);
|
|
95
|
+
};
|
|
96
|
+
}();
|
|
97
|
+
|
|
98
|
+
exports.waitRender = waitRender;
|
package/esm/Alert/Alert.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
var _excluded = ["type", "message", "closeAlert", "hasSound"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
4
|
-
|
|
5
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
6
4
|
|
|
7
5
|
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; }
|
|
8
6
|
|
|
9
7
|
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; }
|
|
10
8
|
|
|
11
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
|
|
13
9
|
import React, { useEffect, forwardRef } from 'react';
|
|
14
10
|
import styled from '@xstyled/styled-components';
|
|
15
11
|
import { User3, User2, User4, User5 } from '@react95/icons';
|
|
@@ -45,9 +41,18 @@ var RenderImage = function RenderImage(_ref) {
|
|
|
45
41
|
}
|
|
46
42
|
};
|
|
47
43
|
|
|
48
|
-
var Message = styled.div(
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
var Message = styled.div.withConfig({
|
|
45
|
+
displayName: "Alert__Message",
|
|
46
|
+
componentId: "sc-1y8aa45-0"
|
|
47
|
+
})(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]);
|
|
48
|
+
var IconWrapper = styled.div.withConfig({
|
|
49
|
+
displayName: "Alert__IconWrapper",
|
|
50
|
+
componentId: "sc-1y8aa45-1"
|
|
51
|
+
})(["\n padding: 7 15 7 7;\n"]);
|
|
52
|
+
var Dialog = styled.div.withConfig({
|
|
53
|
+
displayName: "Alert__Dialog",
|
|
54
|
+
componentId: "sc-1y8aa45-2"
|
|
55
|
+
})(["\n display: flex;\n flex-direction: row;\n"]);
|
|
51
56
|
var Alert = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
52
57
|
var _ref2$type = _ref2.type,
|
|
53
58
|
type = _ref2$type === void 0 ? 'error' : _ref2$type,
|
package/esm/Avatar/Avatar.js
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
var _excluded = ["src", "srcSet", "alt", "circle", "children"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
|
-
|
|
5
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
6
4
|
|
|
7
5
|
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; }
|
|
8
6
|
|
|
9
7
|
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; }
|
|
10
8
|
|
|
11
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
|
|
13
9
|
import * as React from 'react';
|
|
14
10
|
import styled, { css } from '@xstyled/styled-components';
|
|
15
11
|
import Frame from '../Frame/Frame';
|
|
16
|
-
var Image = styled.img(
|
|
17
|
-
|
|
12
|
+
var Image = styled.img.withConfig({
|
|
13
|
+
displayName: "Avatar__Image",
|
|
14
|
+
componentId: "sc-1crmc5x-0"
|
|
15
|
+
})(["\n max-width: 100%;\n"]);
|
|
16
|
+
var StyledAvatar = styled(Frame).withConfig({
|
|
17
|
+
displayName: "Avatar__StyledAvatar",
|
|
18
|
+
componentId: "sc-1crmc5x-1"
|
|
19
|
+
})(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n font-weight: bold;\n overflow: hidden;\n margin-right: 1;\n margin-bottom: 1;\n\n box-shadow: unset;\n\n ", "\n\n ", "\n"], function (_ref) {
|
|
18
20
|
var circle = _ref.circle,
|
|
19
21
|
_ref$size = _ref.size,
|
|
20
22
|
size = _ref$size === void 0 ? 48 : _ref$size;
|
|
21
|
-
return css(
|
|
23
|
+
return css(["\n border-radius: ", ";\n\n width: ", ";\n height: ", ";\n "], circle ? '50%' : 0, size, size);
|
|
22
24
|
}, function (_ref2) {
|
|
23
25
|
var circle = _ref2.circle;
|
|
24
|
-
return circle ? css(
|
|
26
|
+
return circle ? css(["\n border-style: solid;\n border-width: 1;\n border-top-color: borderDark;\n border-right-color: borderLightest;\n border-bottom-color: borderLightest;\n border-left-color: borderDark;\n "]) : css(["\n box-shadow: in;\n padding-left: 1;\n "]);
|
|
25
27
|
});
|
|
26
28
|
var Avatar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
27
29
|
var src = _ref3.src,
|
package/esm/Button/Button.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { th } from '@xstyled/system';
|
|
7
|
-
var Button = styled.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: material;\n padding: 7 20 5;\n border: none;\n color: materialText;\n\n font-size: 12px;\n\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset 0 0 0 1px ", ",\n 1px 1px 0 0px ", ";\n\n &:disabled {\n color: materialTextDisabled;\n }\n\n &:focus {\n outline: ", "px dotted ", ";\n outline-offset: -", "px;\n\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset -0.5px -0.5px 0px 1px ", ",\n 1px 1px 0 1px ", ";\n }\n\n &:active {\n padding: 8 20 4;\n\n outline: ", "px dotted ", ";\n outline-offset: -", "px;\n\n box-shadow: inset 0 0 0 1px ", ",\n 0 0 0 1px ", ";\n }\n"])), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('space.1'), th('colors.materialText'), th('space.5'), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('space.1'), th('colors.borderDarkest'), th('space.5'), th('colors.borderDark'), th('colors.borderDarkest'));
|
|
1
|
+
import styled, { th } from '@xstyled/styled-components';
|
|
2
|
+
var Button = styled.button.withConfig({
|
|
3
|
+
displayName: "Button",
|
|
4
|
+
componentId: "sc-1wi1b4u-0"
|
|
5
|
+
})(["\n background-color: material;\n padding: 7 20 5;\n border: none;\n color: materialText;\n\n font-size: 12px;\n\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset 0 0 0 1px ", ",\n 1px 1px 0 0px ", ";\n\n &:disabled {\n color: materialTextDisabled;\n }\n\n &:focus {\n outline: ", "px dotted ", ";\n outline-offset: -", "px;\n\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset -0.5px -0.5px 0px 1px ", ",\n 1px 1px 0 1px ", ";\n }\n\n &:active {\n padding: 8 20 4;\n\n outline: ", "px dotted ", ";\n outline-offset: -", "px;\n\n box-shadow: inset 0 0 0 1px ", ",\n 0 0 0 1px ", ";\n }\n"], th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('space.1'), th('colors.materialText'), th('space.5'), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('space.1'), th('colors.borderDarkest'), th('space.5'), th('colors.borderDark'), th('colors.borderDarkest'));
|
|
8
6
|
Button.defaultProps = {
|
|
9
7
|
children: 'Ok'
|
|
10
8
|
};
|
package/esm/Checkbox/Checkbox.js
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
var _excluded = ["children", "style", "checked", "label", "disabled"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
|
-
|
|
5
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
6
4
|
|
|
7
5
|
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; }
|
|
8
6
|
|
|
9
7
|
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; }
|
|
10
8
|
|
|
11
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
|
|
13
9
|
import React, { forwardRef } from 'react';
|
|
14
|
-
import styled, { css } from '@xstyled/styled-components';
|
|
15
|
-
import { th } from '@xstyled/system';
|
|
10
|
+
import styled, { css, th } from '@xstyled/styled-components';
|
|
16
11
|
import check from './imgs/check.svg';
|
|
17
12
|
import checkDisabled from './imgs/check-disabled.svg';
|
|
18
|
-
var Icon = styled.span
|
|
19
|
-
|
|
13
|
+
var Icon = styled.span.withConfig({
|
|
14
|
+
displayName: "Checkbox__Icon",
|
|
15
|
+
componentId: "sc-18k8gti-0"
|
|
16
|
+
})(["\n width: 12px;\n height: 12px;\n\n content: '';\n display: inline-block;\n\n position: absolute;\n left: 0;\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 background-color: inputBackground;\n\n background-repeat: no-repeat;\n background-position: center center;\n background-size: 7px 7px;\n"], th('colors.material'), th('colors.borderDarkest'), th('colors.borderLightest'));
|
|
17
|
+
var Text = styled.span.withConfig({
|
|
18
|
+
displayName: "Checkbox__Text",
|
|
19
|
+
componentId: "sc-18k8gti-1"
|
|
20
|
+
})(["\n padding: 1;\n user-select: none;\n"]);
|
|
20
21
|
var Field = styled.input.attrs({
|
|
21
22
|
type: 'checkbox'
|
|
22
|
-
})(
|
|
23
|
+
}).withConfig({
|
|
24
|
+
displayName: "Checkbox__Field",
|
|
25
|
+
componentId: "sc-18k8gti-2"
|
|
26
|
+
})(["\n width: 12px;\n height: 12px;\n\n margin: 0;\n\n position: absolute;\n top: 0;\n left: 0;\n\n opacity: 0;\n\n &:focus ~ ", ", &:active ~ ", " {\n border-width: 1;\n border-style: dotted;\n padding: 0;\n }\n\n &:checked + ", " {\n background-image: url('", "');\n }\n\n &:checked &:disabled + ", " {\n background-image: url('", "');\n background-size: 7px 7px, 1.9px 1.9px;\n }\n\n &:disabled + ", " {\n background-color: inputBackgroundDisabled;\n }\n"], Text, Text, Icon, check, Icon, checkDisabled, Icon);
|
|
23
27
|
Field.displayName = 'Field';
|
|
24
|
-
var Label = styled.label
|
|
28
|
+
var Label = styled.label.withConfig({
|
|
29
|
+
displayName: "Checkbox__Label",
|
|
30
|
+
componentId: "sc-18k8gti-3"
|
|
31
|
+
})(["\n display: inline-block;\n height: 15px;\n\n line-height: 1.5;\n\n position: relative;\n\n margin: 4 0;\n padding-left: 20;\n\n ", "\n"], function (_ref) {
|
|
25
32
|
var disabled = _ref.disabled;
|
|
26
|
-
return disabled && css(
|
|
33
|
+
return disabled && css(["\n color: borderDark;\n text-shadow: 0.5px 0.5px ", ";\n "], th('colors.borderLight'));
|
|
27
34
|
});
|
|
28
35
|
var Checkbox = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
29
36
|
var children = _ref2.children,
|
package/esm/Cursor/Cursor.js
CHANGED
|
@@ -74,6 +74,6 @@ var toKebabCase = function toKebabCase(str) {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var Cursor = Object.keys(cursors).reduce(function (all, cur) {
|
|
77
|
-
return Object.assign(all, _defineProperty({}, cur, css(["cursor:", " ", "
|
|
77
|
+
return Object.assign(all, _defineProperty({}, cur, css(["\n cursor: ", " ", ";\n "], cursors[cur] && "url(".concat(cursors[cur], "), "), toKebabCase(cur))));
|
|
78
78
|
}, {});
|
|
79
79
|
export default Cursor;
|