@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/esm/Dropdown/Dropdown.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
var _excluded = ["options"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
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 from '@xstyled/styled-components';
|
|
15
|
-
import { th } from '@xstyled/system';
|
|
10
|
+
import styled, { th } from '@xstyled/styled-components';
|
|
16
11
|
import caret from './imgs/downcaret.png';
|
|
17
|
-
var Wrapper = styled.div(
|
|
18
|
-
|
|
12
|
+
var Wrapper = styled.div.withConfig({
|
|
13
|
+
displayName: "Dropdown__Wrapper",
|
|
14
|
+
componentId: "sc-1rfrh0u-0"
|
|
15
|
+
})(["\n position: relative;\n width: 200px;\n height: 20px;\n\n &:after {\n display: flex;\n justify-content: center;\n width: 17px;\n height: 16px;\n font-size: 14px;\n line-height: 1.1;\n content: '';\n pointer-events: none;\n position: absolute;\n right: 1px;\n top: 2px;\n\n background-color: material;\n box-shadow: inset 0.5px 0.7px 0px 0.7px ", ",\n inset -1px 0px 0 1px ", ",\n inset 1.5px 1.5px 0px 1.5px ", ";\n\n border-right: 1;\n border-bottom: 1;\n\n background-image: url('", "');\n background-position: 60% 60%;\n background-repeat: no-repeat;\n }\n"], th('colors.material'), th('colors.borderDark'), th('colors.borderLightest'), caret);
|
|
16
|
+
var Select = styled.select.withConfig({
|
|
17
|
+
displayName: "Dropdown__Select",
|
|
18
|
+
componentId: "sc-1rfrh0u-1"
|
|
19
|
+
})(["\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'));
|
|
19
20
|
var Dropdown = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
20
21
|
var options = _ref.options,
|
|
21
22
|
rest = _objectWithoutProperties(_ref, _excluded);
|
package/esm/Fieldset/Fieldset.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
var _excluded = ["legend", "children"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
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 from '@xstyled/styled-components';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
import styled, { th } from '@xstyled/styled-components';
|
|
11
|
+
var Field = styled.fieldset.withConfig({
|
|
12
|
+
displayName: "Fieldset__Field",
|
|
13
|
+
componentId: "sc-15a7lpx-0"
|
|
14
|
+
})(["\n border-top-style: groove;\n border-top-width: 2;\n border-top-color: borderLighter;\n\n border-left-style: groove;\n border-left-width: 2;\n border-left-color: borderLighter;\n\n border-bottom-style: solid;\n border-bottom-width: 1;\n border-bottom-color: borderDark;\n\n border-right-style: solid;\n border-right-width: 1;\n border-right-color: borderDark;\n\n box-shadow: 1px 1px 0 0 ", ";\n"], th('colors.borderLighter'));
|
|
15
|
+
var Legend = styled.legend.withConfig({
|
|
16
|
+
displayName: "Fieldset__Legend",
|
|
17
|
+
componentId: "sc-15a7lpx-1"
|
|
18
|
+
})(["\n padding-left: 4px;\n padding-right: 1px;\n"]);
|
|
18
19
|
var Fieldset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
19
20
|
var legend = _ref.legend,
|
|
20
21
|
children = _ref.children,
|
package/esm/Frame/Frame.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import styled from '@xstyled/styled-components';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import styled, { system } from '@xstyled/styled-components';
|
|
2
|
+
var Frame = styled.div.withConfig({
|
|
3
|
+
displayName: "Frame",
|
|
4
|
+
componentId: "sc-1g3ndsf-0"
|
|
5
|
+
})(system);
|
|
4
6
|
Frame.defaultProps = {
|
|
5
7
|
w: 'auto',
|
|
6
8
|
h: 'auto',
|
|
@@ -5,7 +5,7 @@ export var createBorder = function createBorder(_ref) {
|
|
|
5
5
|
innerTopLeft = _ref.innerTopLeft,
|
|
6
6
|
outerBottomRight = _ref.outerBottomRight,
|
|
7
7
|
innerBottomRight = _ref.innerBottomRight;
|
|
8
|
-
return css(["border:0
|
|
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] : {},
|
|
@@ -14,19 +14,19 @@ export var border = function border() {
|
|
|
14
14
|
|
|
15
15
|
return createBorder({
|
|
16
16
|
direction: direction,
|
|
17
|
-
outerBottomRight: css(["", ""], function (_ref3) {
|
|
17
|
+
outerBottomRight: css(["\n ", "\n "], function (_ref3) {
|
|
18
18
|
var theme = _ref3.theme;
|
|
19
19
|
return theme.colors.borderDarkest;
|
|
20
20
|
}),
|
|
21
|
-
innerBottomRight: css(["", ""], function (_ref4) {
|
|
21
|
+
innerBottomRight: css(["\n ", "\n "], function (_ref4) {
|
|
22
22
|
var theme = _ref4.theme;
|
|
23
23
|
return theme.colors.borderDark;
|
|
24
24
|
}),
|
|
25
|
-
outerTopLeft: css(["", ""], function (_ref5) {
|
|
25
|
+
outerTopLeft: css(["\n ", "\n "], function (_ref5) {
|
|
26
26
|
var theme = _ref5.theme;
|
|
27
27
|
return theme.colors.borderLightest;
|
|
28
28
|
}),
|
|
29
|
-
innerTopLeft: css(["", ""], function (_ref6) {
|
|
29
|
+
innerTopLeft: css(["\n ", "\n "], function (_ref6) {
|
|
30
30
|
var theme = _ref6.theme;
|
|
31
31
|
return theme.colors.borderLight;
|
|
32
32
|
})
|
|
@@ -39,19 +39,19 @@ export var windowBorder = function windowBorder() {
|
|
|
39
39
|
|
|
40
40
|
return createBorder({
|
|
41
41
|
direction: direction,
|
|
42
|
-
outerBottomRight: css(["", ""], function (_ref8) {
|
|
42
|
+
outerBottomRight: css(["\n ", "\n "], function (_ref8) {
|
|
43
43
|
var theme = _ref8.theme;
|
|
44
44
|
return theme.colors.borderDarkest;
|
|
45
45
|
}),
|
|
46
|
-
innerBottomRight: css(["", ""], function (_ref9) {
|
|
46
|
+
innerBottomRight: css(["\n ", "\n "], function (_ref9) {
|
|
47
47
|
var theme = _ref9.theme;
|
|
48
48
|
return theme.colors.borderDark;
|
|
49
49
|
}),
|
|
50
|
-
outerTopLeft: css(["", ""], function (_ref10) {
|
|
50
|
+
outerTopLeft: css(["\n ", "\n "], function (_ref10) {
|
|
51
51
|
var theme = _ref10.theme;
|
|
52
52
|
return theme.colors.borderLight;
|
|
53
53
|
}),
|
|
54
|
-
innerTopLeft: css(["", ""], function (_ref11) {
|
|
54
|
+
innerTopLeft: css(["\n ", "\n "], function (_ref11) {
|
|
55
55
|
var theme = _ref11.theme;
|
|
56
56
|
return theme.colors.borderLightest;
|
|
57
57
|
})
|
|
@@ -64,19 +64,19 @@ export var scrollBarBorder = function scrollBarBorder() {
|
|
|
64
64
|
|
|
65
65
|
return createBorder({
|
|
66
66
|
direction: direction,
|
|
67
|
-
outerBottomRight: css(["", ""], function (_ref13) {
|
|
67
|
+
outerBottomRight: css(["\n ", "\n "], function (_ref13) {
|
|
68
68
|
var theme = _ref13.theme;
|
|
69
69
|
return theme.colors.borderDarkest;
|
|
70
70
|
}),
|
|
71
|
-
innerBottomRight: css(["", ""], function (_ref14) {
|
|
71
|
+
innerBottomRight: css(["\n ", "\n "], function (_ref14) {
|
|
72
72
|
var theme = _ref14.theme;
|
|
73
73
|
return theme.colors.borderDark;
|
|
74
74
|
}),
|
|
75
|
-
outerTopLeft: css(["", ""], function (_ref15) {
|
|
75
|
+
outerTopLeft: css(["\n ", "\n "], function (_ref15) {
|
|
76
76
|
var theme = _ref15.theme;
|
|
77
77
|
return theme.colors.borderLight;
|
|
78
78
|
}),
|
|
79
|
-
innerTopLeft: css(["", ""], function (_ref16) {
|
|
79
|
+
innerTopLeft: css(["\n ", "\n "], function (_ref16) {
|
|
80
80
|
var theme = _ref16.theme;
|
|
81
81
|
return theme.colors.borderLightest;
|
|
82
82
|
})
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
1
|
import { createGlobalStyle } from '@xstyled/styled-components';
|
|
6
2
|
import woff2 from './font/MS-Sans-Serif.woff2';
|
|
7
3
|
import woff from './font/MS-Sans-Serif.woff';
|
|
@@ -13,5 +9,5 @@ import videottf from './font/React95Video-Numbers.ttf';
|
|
|
13
9
|
import videoeot from './font/React95Video-Numbers.eot';
|
|
14
10
|
import { scrollbars } from './Scrollbar';
|
|
15
11
|
import Cursor from '../Cursor/Cursor';
|
|
16
|
-
var GlobalStyle = createGlobalStyle(
|
|
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);
|
|
17
13
|
export default GlobalStyle;
|
|
@@ -14,9 +14,9 @@ export var createHatchedBackground = function createHatchedBackground(_ref) {
|
|
|
14
14
|
secondaryColor = _ref$secondaryColor === void 0 ? 'transparent' : _ref$secondaryColor,
|
|
15
15
|
_ref$pixelSize = _ref.pixelSize,
|
|
16
16
|
pixelSize = _ref$pixelSize === void 0 ? 2 : _ref$pixelSize;
|
|
17
|
-
return css(["background-image:", "
|
|
17
|
+
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
18
|
};
|
|
19
|
-
export var scrollbars = css(["::-webkit-scrollbar{width:17
|
|
19
|
+
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) {
|
|
20
20
|
var theme = _ref2.theme;
|
|
21
21
|
return createHatchedBackground({
|
|
22
22
|
mainColor: theme.colors.material,
|
package/esm/Input/Input.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
1
|
import styled from '@xstyled/styled-components';
|
|
6
2
|
import { padding, borders, shadow } from 'styled-system';
|
|
7
|
-
var Input = styled.input(
|
|
3
|
+
var Input = styled.input.withConfig({
|
|
4
|
+
displayName: "Input",
|
|
5
|
+
componentId: "sc-1thk6g5-0"
|
|
6
|
+
})(["\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"], padding, borders, shadow);
|
|
8
7
|
export default Input;
|
package/esm/List/List.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
|
-
import styled from '@xstyled/styled-components';
|
|
6
|
-
import { th } from '@xstyled/system';
|
|
1
|
+
import styled, { th } from '@xstyled/styled-components';
|
|
7
2
|
import ListItem from './ListItem';
|
|
8
3
|
import Divider from './ListDivider';
|
|
9
|
-
var StyledList = styled.ul
|
|
4
|
+
var StyledList = styled.ul.withConfig({
|
|
5
|
+
displayName: "List__StyledList",
|
|
6
|
+
componentId: "sc-11tpq62-0"
|
|
7
|
+
})(["\n background-color: material;\n padding: 5 20 6;\n border: none;\n\n margin: 0;\n padding: 2;\n list-style: none;\n\n box-shadow: inset 1px 1px 0px 1px ", ",\n inset 0 0 0 1px ", ",\n 1px 1px 0 1px ", ";\n\n ", ";\n"], th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), function (_ref) {
|
|
10
8
|
var width = _ref.width;
|
|
11
9
|
return "\n width: ".concat(width, "px;\n ");
|
|
12
10
|
});
|
package/esm/List/ListDivider.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
1
|
import styled from '@xstyled/styled-components';
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var Divider = styled.li.withConfig({
|
|
3
|
+
displayName: "ListDivider__Divider",
|
|
4
|
+
componentId: "sc-mgbvoj-0"
|
|
5
|
+
})(["\n height: 1px;\n border-top: 1;\n border-top-color: borderDark;\n border-bottom: 1;\n border-bottom-color: borderLightest;\n\n width: 98%;\n margin-left: 2;\n"]);
|
|
8
6
|
Divider.displayName = 'List.Divider';
|
|
9
7
|
export default Divider;
|
package/esm/List/ListItem.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
var _excluded = ["icon", "children"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
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
10
|
import styled, { css } from '@xstyled/styled-components';
|
|
15
|
-
import { th } from '@xstyled/system';
|
|
16
11
|
import rightcaret from '../GlobalStyle/imgs/rightcaret.svg';
|
|
17
|
-
var Item = styled.li
|
|
12
|
+
var Item = styled.li.withConfig({
|
|
13
|
+
displayName: "ListItem__Item",
|
|
14
|
+
componentId: "sc-1k1qq02-0"
|
|
15
|
+
})(["\n position: relative;\n\n display: flex;\n align-items: center;\n margin: 0;\n padding: 2 6;\n\n color: materialText;\n\n img {\n margin-right: 10;\n }\n\n &:hover {\n background-color: headerBackground;\n color: materialTextInvert;\n }\n\n ul {\n display: none;\n position: absolute;\n top: -2px;\n left: 97%;\n color: materialText;\n z-index: taskbar;\n\n img {\n width: 18px;\n height: 20px;\n margin-right: 6;\n }\n }\n\n svg {\n fill: materialTextInvert;\n }\n\n ", ";\n\n ", ";\n"], function (_ref) {
|
|
18
16
|
var icon = _ref.icon;
|
|
19
17
|
return !icon && 'padding-left: 26px;';
|
|
20
18
|
}, function (_ref2) {
|
|
21
19
|
var hasList = _ref2.hasList;
|
|
22
|
-
return hasList && css(
|
|
20
|
+
return hasList && css(["\n &:after {\n position: absolute;\n width: 5px;\n height: 8px;\n right: 8px;\n\n content: '';\n background-color: materialText;\n mask-image: url('", "');\n mask-position: center center;\n mask-size: 5px 8px;\n mask-repeat: no-repeat;\n }\n\n &:hover {\n &:after {\n background-color: materialTextInvert;\n }\n\n ul {\n display: block;\n }\n }\n "], rightcaret);
|
|
23
21
|
});
|
|
24
22
|
var ListItem = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
25
23
|
var icon = _ref3.icon,
|
package/esm/Modal/Modal.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var _excluded = ["hasWindowButton", "buttons", "buttonsAlignment", "children", "closeModal", "defaultPosition", "height", "icon", "menu", "title", "width"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -20,33 +18,45 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
20
18
|
|
|
21
19
|
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; }
|
|
22
20
|
|
|
23
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
24
|
-
|
|
25
21
|
import * as React from 'react';
|
|
26
|
-
import styled, { css } from '@xstyled/styled-components';
|
|
27
|
-
import { th } from '@xstyled/system';
|
|
22
|
+
import styled, { css, th } from '@xstyled/styled-components';
|
|
28
23
|
import Draggable from 'react-draggable';
|
|
29
24
|
import Button from '../Button';
|
|
30
25
|
import TitleBar from '../TitleBar';
|
|
31
26
|
import ModalContext from './ModalContext';
|
|
32
|
-
var ModalWrapper = styled.div
|
|
27
|
+
var ModalWrapper = styled.div.withConfig({
|
|
28
|
+
displayName: "Modal__ModalWrapper",
|
|
29
|
+
componentId: "sc-4ouk59-0"
|
|
30
|
+
})(["\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) {
|
|
33
31
|
var width = _ref.width,
|
|
34
32
|
height = _ref.height;
|
|
35
33
|
return "\n width: ".concat(width ? "".concat(width, "px") : 'auto', ";\n height: ").concat(height ? "".concat(height, "px") : 'auto', ";\n ");
|
|
36
34
|
}, function (_ref2) {
|
|
37
35
|
var active = _ref2.active;
|
|
38
|
-
return active ? css(
|
|
36
|
+
return active ? css(["\n z-index: modal;\n "]) : '';
|
|
39
37
|
});
|
|
40
|
-
var Content = styled.div(
|
|
41
|
-
|
|
38
|
+
var Content = styled.div.withConfig({
|
|
39
|
+
displayName: "Modal__Content",
|
|
40
|
+
componentId: "sc-4ouk59-1"
|
|
41
|
+
})(["\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n\n padding: 6;\n"]);
|
|
42
|
+
var ButtonWrapper = styled.div.withConfig({
|
|
43
|
+
displayName: "Modal__ButtonWrapper",
|
|
44
|
+
componentId: "sc-4ouk59-2"
|
|
45
|
+
})(["\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) {
|
|
42
46
|
var _ref3$buttonsAlignmen = _ref3.buttonsAlignment,
|
|
43
47
|
buttonsAlignment = _ref3$buttonsAlignmen === void 0 ? 'center' : _ref3$buttonsAlignmen;
|
|
44
48
|
return buttonsAlignment;
|
|
45
49
|
}, Button);
|
|
46
|
-
var MenuWrapper = styled.ul(
|
|
47
|
-
|
|
50
|
+
var MenuWrapper = styled.ul.withConfig({
|
|
51
|
+
displayName: "Modal__MenuWrapper",
|
|
52
|
+
componentId: "sc-4ouk59-3"
|
|
53
|
+
})(["\n display: flex;\n flex-direction: row;\n\n list-style: none;\n margin: 0;\n padding-left: 0;\n padding-bottom: 3;\n\n border-bottom-style: solid;\n border-width: 1;\n border-bottom-color: borderDark;\n\n box-shadow: 0 1px 0 0 ", ";\n"], th('colors.borderLighter'));
|
|
54
|
+
var MenuItem = styled.li.withConfig({
|
|
55
|
+
displayName: "Modal__MenuItem",
|
|
56
|
+
componentId: "sc-4ouk59-4"
|
|
57
|
+
})(["\n position: relative;\n padding-left: 6;\n padding-right: 6;\n\n user-select: none;\n\n ul {\n position: absolute;\n left: 0;\n color: ", ";\n }\n\n ", ";\n"], th('colors.materialText'), function (_ref4) {
|
|
48
58
|
var active = _ref4.active;
|
|
49
|
-
return active && css(
|
|
59
|
+
return active && css(["\n background-color: primary;\n color: materialTextInvert;\n "]);
|
|
50
60
|
});
|
|
51
61
|
MenuItem.displayName = 'MenuItem';
|
|
52
62
|
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
var _excluded = ["width", "percent"];
|
|
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
|
-
|
|
16
|
-
|
|
10
|
+
import styled, { css, th } from '@xstyled/styled-components';
|
|
11
|
+
var Wrapper = styled.div.withConfig({
|
|
12
|
+
displayName: "ProgressBar__Wrapper",
|
|
13
|
+
componentId: "sc-1xpcki1-0"
|
|
14
|
+
})(["\n width: ", "px;\n height: 20px;\n\n position: relative;\n\n text-align: center;\n"], function (_ref) {
|
|
17
15
|
var width = _ref.width;
|
|
18
16
|
return width;
|
|
19
17
|
});
|
|
20
|
-
var WhiteBar = styled.div(
|
|
18
|
+
var WhiteBar = styled.div.withConfig({
|
|
19
|
+
displayName: "ProgressBar__WhiteBar",
|
|
20
|
+
componentId: "sc-1xpcki1-1"
|
|
21
|
+
})(["\n width: ", "px;\n height: 20px;\n line-height: 20px;\n\n border-left: 1;\n border-left-color: borderDark;\n\n border-top: 1;\n border-top-color: borderDark;\n\n background-color: inputBackground;\n color: materialText;\n\n ", "\n"], function (_ref2) {
|
|
21
22
|
var width = _ref2.width;
|
|
22
23
|
return width;
|
|
23
|
-
}, css(
|
|
24
|
-
var Container = styled.div(
|
|
24
|
+
}, css(["\n box-shadow: inset -1px -1px 0 0 ", ",\n inset 1px 1px 0 0 ", ",\n 0.5px 0.5px 0 0.5px ", ";\n "], th('colors.material'), th('colors.borderDarkest'), th('colors.borderLightest')));
|
|
25
|
+
var Container = styled.div.withConfig({
|
|
26
|
+
displayName: "ProgressBar__Container",
|
|
27
|
+
componentId: "sc-1xpcki1-2"
|
|
28
|
+
})(["\n width: ", "%;\n\n position: absolute;\n top: 0;\n left: 0;\n\n overflow: hidden;\n"], function (_ref3) {
|
|
25
29
|
var percent = _ref3.percent;
|
|
26
30
|
return percent;
|
|
27
31
|
});
|
|
28
|
-
var Progress = styled.div(
|
|
32
|
+
var Progress = styled.div.withConfig({
|
|
33
|
+
displayName: "ProgressBar__Progress",
|
|
34
|
+
componentId: "sc-1xpcki1-3"
|
|
35
|
+
})(["\n width: ", "px;\n height: 17px;\n line-height: 18px;\n\n margin-left: 2;\n margin-top: 2;\n\n background-color: progress;\n color: ", ";\n"], function (_ref4) {
|
|
29
36
|
var width = _ref4.width;
|
|
30
37
|
return width;
|
|
31
38
|
}, th('colors.materialTextInvert'));
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
var _excluded = ["children", "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 { radioChecked, radioCheckedDisabled, radioUnchecked, radioUncheckedDisabled } from './radioButtonStates';
|
|
17
|
-
var Icon = styled.span(
|
|
18
|
-
|
|
12
|
+
var Icon = styled.span.withConfig({
|
|
13
|
+
displayName: "RadioButton__Icon",
|
|
14
|
+
componentId: "sc-1nrg9a4-0"
|
|
15
|
+
})(["\n width: 12px;\n height: 12px;\n\n content: '';\n display: inline-block;\n\n position: absolute;\n left: 0;\n top: 0;\n\n background-image: url(", ");\n"], radioUnchecked);
|
|
16
|
+
var Text = styled.span.withConfig({
|
|
17
|
+
displayName: "RadioButton__Text",
|
|
18
|
+
componentId: "sc-1nrg9a4-1"
|
|
19
|
+
})(["\n padding: 1;\n user-select: none;\n\n position: absolute;\n top: 0;\n left: 18px;\n"]);
|
|
19
20
|
var Field = styled.input.attrs({
|
|
20
21
|
type: 'radio'
|
|
21
|
-
})(
|
|
22
|
-
|
|
22
|
+
}).withConfig({
|
|
23
|
+
displayName: "RadioButton__Field",
|
|
24
|
+
componentId: "sc-1nrg9a4-2"
|
|
25
|
+
})(["\n margin: 0;\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 &:disabled + ", " {\n background-image: url(", ");\n }\n\n &:checked:disabled + ", " {\n background-image: url(", ");\n }\n"], Text, Text, Icon, radioChecked, Icon, radioUncheckedDisabled, Icon, radioCheckedDisabled);
|
|
26
|
+
var Label = styled.label.withConfig({
|
|
27
|
+
displayName: "RadioButton__Label",
|
|
28
|
+
componentId: "sc-1nrg9a4-3"
|
|
29
|
+
})(["\n position: relative;\n margin-bottom: 10;\n display: block;\n\n ", "\n"], function (_ref) {
|
|
23
30
|
var disabled = _ref.disabled;
|
|
24
|
-
return disabled && css(
|
|
31
|
+
return disabled && css(["\n color: materialTextDisabled;\n text-shadow: 0.5px 0.5px ", ";\n "], th('colors.materialTextDisabledShadow'));
|
|
25
32
|
});
|
|
26
33
|
var RadioButton = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
27
34
|
var children = _ref2.children,
|
package/esm/Range/Range.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import styled, { css } from '@xstyled/styled-components';
|
|
6
|
-
import { th } from '@xstyled/system';
|
|
7
|
-
var trackStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 4px;\n\n background: ", ";\n\n cursor: pointer;\n\n border-top: 1;\n border-top-color: borderLight;\n border-right: 2;\n border-right-color: ", ";\n border-bottom: 1;\n border-bottom-color: borderLighter;\n border-left: 2;\n border-left-color: ", ";\n\n box-shadow: 0px 1px 0px 0px ", ";\n"])), th('colors.borderDarkest'), th('colors.borderLightest'), th('colors.borderLightest'), th('colors.borderLightest'));
|
|
8
|
-
var thumbStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 12px;\n height: 20px;\n\n background-color: material;\n\n cursor: pointer;\n\n margin-top: -", "px;\n\n border-top: 1;\n border-top-color: ", ";\n border-right: 1;\n border-right-color: ", ";\n border-bottom: 1;\n border-bottom-color: ", ";\n border-left: 1;\n border-left-color: ", ";\n\n box-shadow: inset 0px -1px 0px ", ",\n inset -1px 0px 0px ", ",\n inset 0px 1px 0px ", ",\n inset 1px 0px 0px ", ";\n\n -webkit-appearance: none;\n"])), th('space.8'), th('colors.borderLightest'), th('colors.borderDarkest'), th('colors.borderDarkest'), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDark'), th('colors.borderLighter'), th('colors.borderLighter'));
|
|
1
|
+
import styled, { css, th } from '@xstyled/styled-components';
|
|
2
|
+
var trackStyle = css(["\n width: 100%;\n height: 4px;\n\n background-color: borderDarkest;\n\n cursor: pointer;\n\n border-top: 1;\n border-top-color: borderLight;\n border-right: 2;\n border-right-color: borderLightest;\n border-bottom: 1;\n border-bottom-color: borderLighter;\n border-left: 2;\n border-left-color: borderLightest;\n\n box-shadow: 0px 1px 0px 0px ", ";\n"], th('colors.borderLightest'));
|
|
3
|
+
var thumbStyle = css(["\n width: 12px;\n height: 20px;\n\n background-color: material;\n\n cursor: pointer;\n\n margin-top: -8;\n\n border-top: 1;\n border-top-color: borderLightest;\n border-right: 1;\n border-right-color: borderDarkest;\n border-bottom: 1;\n border-bottom-color: borderDarkest;\n border-left: 1;\n border-left-color: borderLightest;\n\n box-shadow: inset 0px -1px 0px ", ",\n inset -1px 0px 0px ", ",\n inset 0px 1px 0px ", ",\n inset 1px 0px 0px ", ";\n\n -webkit-appearance: none;\n"], th('colors.borderDark'), th('colors.borderDark'), th('colors.borderLighter'), th('colors.borderLighter'));
|
|
9
4
|
var Range = styled.input.attrs({
|
|
10
5
|
type: 'range'
|
|
11
|
-
})(
|
|
6
|
+
}).withConfig({
|
|
7
|
+
displayName: "Range",
|
|
8
|
+
componentId: "sc-1p4whtx-0"
|
|
9
|
+
})(["\n -webkit-appearance: none;\n width: 100%;\n\n &:hover,\n &:focus,\n &:active {\n outline: none;\n }\n\n &::-webkit-slider-runnable-track {\n ", "\n }\n\n &::-webkit-slider-thumb {\n ", "\n }\n\n &:focus::-webkit-slider-runnable-track {\n background-color: borderDarkest;\n }\n\n &::-moz-range-track {\n ", "\n }\n\n &::-moz-range-thumb {\n ", "\n }\n"], trackStyle, thumbStyle, trackStyle, thumbStyle);
|
|
12
10
|
export default Range;
|
package/esm/Tabs/Tab.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
var _excluded = ["activeTab", "title"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
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
|
-
|
|
16
|
-
|
|
10
|
+
import styled, { css, th } from '@xstyled/styled-components';
|
|
11
|
+
var NavItem = styled.li.withConfig({
|
|
12
|
+
displayName: "Tab__NavItem",
|
|
13
|
+
componentId: "sc-vz441a-0"
|
|
14
|
+
})(["\n list-style: none;\n padding: 3 6;\n background-color: material;\n box-shadow: inset 0 1px 0 0 ", ",\n -2px 1px 0 -1px ", ",\n -3px 1px 0 -1px ", ",\n -2px 0 0 -1px ", ",\n 2px 1px 0 -1px ", ",\n 2px 0 0 -1px ", ",\n 3px 1px 0 -1px ", ";\n margin-right: 2;\n margin-left: 2;\n\n &:first-child {\n margin-left: 4;\n }\n\n ", "\n"], th('colors.borderLightest'), th('colors.material'), th('colors.borderLightest'), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('colors.borderDarkest'), function (_ref) {
|
|
17
15
|
var active = _ref.active;
|
|
18
|
-
return active && css(
|
|
16
|
+
return active && css(["\n margin-top: -2;\n margin-left: -2;\n margin-bottom: 1;\n\n &:first-child {\n margin-left: 2;\n }\n\n box-shadow: inset 0 1px 0 0 ", ",\n -2px 1px 0 -1px ", ",\n -0.5px 3px 0 0.5px ", ",\n -2px 2px 0 0 ", ",\n -2px 0 0 -1px ", ",\n 1px 2px 0 0 ", ",\n 2px 0 0 -1px ", ",\n 2px 2px 0 0 ", ";\n\n & + li {\n margin-left: 0;\n box-shadow: inset 0 1px 0 0 ", ",\n 2px 1px 0 -1px ", ",\n 2px 0 0 -1px ", ",\n 3px 1px 0 -1px ", ";\n }\n "], th('colors.borderLightest'), th('colors.material'), th('colors.material'), th('colors.borderLightest'), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('colors.borderDarkest'), th('colors.borderLightest'), th('colors.borderDark'), th('colors.borderDarkest'), th('colors.borderDarkest'));
|
|
19
17
|
});
|
|
20
18
|
var Tab = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
21
19
|
var activeTab = _ref2.activeTab,
|
package/esm/Tabs/Tabs.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var _excluded = ["children", "style", "defaultActiveTab", "onChange"];
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -20,14 +18,18 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
20
18
|
|
|
21
19
|
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; }
|
|
22
20
|
|
|
23
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
24
|
-
|
|
25
21
|
import React, { forwardRef } from 'react';
|
|
26
22
|
import styled from '@xstyled/styled-components';
|
|
27
23
|
import Tab from './Tab';
|
|
28
24
|
import Frame from '../Frame';
|
|
29
|
-
var Navbar = styled(Frame)(
|
|
30
|
-
|
|
25
|
+
var Navbar = styled(Frame).withConfig({
|
|
26
|
+
displayName: "Tabs__Navbar",
|
|
27
|
+
componentId: "sc-1r3cxnf-0"
|
|
28
|
+
})(["\n display: flex;\n padding: 0;\n margin: 0;\n border: none;\n box-shadow: none;\n background-color: unset;\n"]);
|
|
29
|
+
var NavContainer = styled(Frame).withConfig({
|
|
30
|
+
displayName: "Tabs__NavContainer",
|
|
31
|
+
componentId: "sc-1r3cxnf-1"
|
|
32
|
+
})(["\n padding: 12;\n box-shadow: out;\n"]);
|
|
31
33
|
NavContainer.displayName = 'NavContainer';
|
|
32
34
|
var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
33
35
|
var children = _ref.children,
|