ag-common 0.0.372 → 0.0.374
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/dist/ui/components/BorderGradient/index.js +7 -29
- package/dist/ui/components/Button/index.d.ts +1 -1
- package/dist/ui/components/Button/index.js +5 -27
- package/dist/ui/components/Chevron/index.js +3 -3
- package/dist/ui/components/Close/index.js +2 -2
- package/dist/ui/components/Confirm/Modal.js +6 -6
- package/dist/ui/components/DropdownList/Base.js +4 -4
- package/dist/ui/components/FlexColumn/index.js +2 -2
- package/dist/ui/components/FlexRow/index.js +2 -2
- package/dist/ui/components/Icon/index.d.ts +4 -1
- package/dist/ui/components/Icon/index.js +2 -2
- package/dist/ui/components/Image/index.js +2 -2
- package/dist/ui/components/KebabDots/index.js +2 -2
- package/dist/ui/components/Loader/index.js +3 -3
- package/dist/ui/components/Modal/Modal.d.ts +5 -2
- package/dist/ui/components/Modal/Modal.js +5 -5
- package/dist/ui/components/OpenApiCodeBlock/OpenApiCodeBlock.js +6 -6
- package/dist/ui/components/OpenApiCodeBlock/curl/index.js +2 -2
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/req.js +2 -2
- package/dist/ui/components/OpenApiCodeBlock/fetch/index.js +2 -2
- package/dist/ui/components/OpenApiCodeBlock/helpers/common.d.ts +9 -2
- package/dist/ui/components/OpenApiCodeBlock/helpers/common.js +3 -3
- package/dist/ui/components/ProgressBar/index.js +4 -4
- package/dist/ui/components/Prompt/Modal.js +6 -6
- package/dist/ui/components/RowOrColumn/index.js +2 -2
- package/dist/ui/components/Search/Base.js +7 -7
- package/dist/ui/components/Search/Modal.js +2 -2
- package/dist/ui/components/Sidebar/index.js +6 -6
- package/dist/ui/components/SparkLine/index.js +4 -4
- package/dist/ui/components/Table/index.js +6 -6
- package/dist/ui/components/TextEdit/CheckboxEdit.js +2 -2
- package/dist/ui/components/TextEdit/LengthBox.js +2 -2
- package/dist/ui/components/TextEdit/RadioGroup.js +2 -2
- package/dist/ui/components/TextEdit/TextEdit.d.ts +4 -2
- package/dist/ui/components/TextEdit/TextEdit.js +35 -37
- package/dist/ui/components/TextEdit/common.d.ts +14 -4
- package/dist/ui/components/TextEdit/common.js +8 -27
- package/dist/ui/components/TextWithButton/index.js +4 -4
- package/dist/ui/components/UserImage/index.js +3 -3
- package/dist/ui/icons/CrossIcon.js +2 -2
- package/dist/ui/styles/common.d.ts +14 -8
- package/dist/ui/styles/common.js +12 -31
- package/dist/ui/styles/standaloneStyles.d.ts +27 -6
- package/dist/ui/styles/standaloneStyles.js +7 -7
- package/package.json +6 -5
|
@@ -7,9 +7,9 @@ exports.Sidebar = void 0;
|
|
|
7
7
|
const use_1 = require("../../helpers/cookie/use");
|
|
8
8
|
const common_1 = require("../../styles/common");
|
|
9
9
|
const Chevron_1 = require("../Chevron");
|
|
10
|
-
const
|
|
10
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
11
11
|
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const Base =
|
|
12
|
+
const Base = styled_1.default.div `
|
|
13
13
|
position: relative;
|
|
14
14
|
transition: all 200ms;
|
|
15
15
|
border-right: solid 1px #ccc;
|
|
@@ -36,7 +36,7 @@ const Base = styled_components_1.default.div `
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
`;
|
|
39
|
-
const ContentBlock =
|
|
39
|
+
const ContentBlock = styled_1.default.div `
|
|
40
40
|
left: -18rem;
|
|
41
41
|
transition: left 200ms;
|
|
42
42
|
&[data-open='false'] {
|
|
@@ -46,7 +46,7 @@ const ContentBlock = styled_components_1.default.div `
|
|
|
46
46
|
//width set in style
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
const Content =
|
|
49
|
+
const Content = styled_1.default.div `
|
|
50
50
|
display: flex;
|
|
51
51
|
flex-flow: column;
|
|
52
52
|
width: 100%;
|
|
@@ -60,7 +60,7 @@ const Content = styled_components_1.default.div `
|
|
|
60
60
|
border-radius: 1rem;
|
|
61
61
|
}
|
|
62
62
|
`;
|
|
63
|
-
const Hamburger =
|
|
63
|
+
const Hamburger = styled_1.default.div `
|
|
64
64
|
position: absolute;
|
|
65
65
|
transition: all 200ms;
|
|
66
66
|
&[data-open='false'] {
|
|
@@ -84,7 +84,7 @@ const Hamburger = styled_components_1.default.div `
|
|
|
84
84
|
border: solid 1px rgba(0, 0, 0, 0.5);
|
|
85
85
|
cursor: pointer;
|
|
86
86
|
`;
|
|
87
|
-
const ChevronStyled = (0,
|
|
87
|
+
const ChevronStyled = (0, styled_1.default)(Chevron_1.Chevron) `
|
|
88
88
|
svg {
|
|
89
89
|
fill: #555;
|
|
90
90
|
}
|
|
@@ -6,21 +6,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SparkLine = void 0;
|
|
7
7
|
const math_1 = require("../../../common/helpers/math");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const
|
|
10
|
-
const Base =
|
|
9
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
10
|
+
const Base = styled_1.default.div `
|
|
11
11
|
width: calc(100% - 2px - 1rem);
|
|
12
12
|
height: 100%;
|
|
13
13
|
border: solid 1px #666;
|
|
14
14
|
border-radius: 0.5rem;
|
|
15
15
|
padding: 0.5rem;
|
|
16
16
|
`;
|
|
17
|
-
const Points =
|
|
17
|
+
const Points = styled_1.default.div `
|
|
18
18
|
position: relative;
|
|
19
19
|
|
|
20
20
|
width: 100%;
|
|
21
21
|
height: 100%;
|
|
22
22
|
`;
|
|
23
|
-
const Point =
|
|
23
|
+
const Point = styled_1.default.div `
|
|
24
24
|
position: absolute;
|
|
25
25
|
border-width: 2px;
|
|
26
26
|
border-style: solid;
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Table = void 0;
|
|
7
7
|
const groupBy_1 = require("../../../common/helpers/groupBy");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const
|
|
10
|
-
const Base =
|
|
9
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
10
|
+
const Base = styled_1.default.div `
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-flow: column;
|
|
13
13
|
width: 100%;
|
|
14
14
|
`;
|
|
15
|
-
const TableRow =
|
|
15
|
+
const TableRow = styled_1.default.div `
|
|
16
16
|
display: flex;
|
|
17
17
|
border: solid 1px #ccc;
|
|
18
18
|
&[data-header='true'] {
|
|
@@ -22,15 +22,15 @@ const TableRow = styled_components_1.default.div `
|
|
|
22
22
|
border-top: 0;
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
-
const Group =
|
|
25
|
+
const Group = styled_1.default.div `
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-flow: column;
|
|
28
28
|
width: 100%;
|
|
29
29
|
`;
|
|
30
|
-
const GroupTitle =
|
|
30
|
+
const GroupTitle = styled_1.default.div `
|
|
31
31
|
font-size: 1.5rem;
|
|
32
32
|
`;
|
|
33
|
-
const GroupWrap =
|
|
33
|
+
const GroupWrap = styled_1.default.div `
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-flow: column;
|
|
36
36
|
`;
|
|
@@ -31,11 +31,11 @@ const common_1 = require("./common");
|
|
|
31
31
|
const common_2 = require("../../styles/common");
|
|
32
32
|
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
33
33
|
const FlexRow_1 = require("../FlexRow");
|
|
34
|
-
const
|
|
34
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
35
35
|
const react_1 = __importStar(require("react"));
|
|
36
36
|
const Save_1 = require("../../icons/Save");
|
|
37
37
|
const Undo_1 = require("../../icons/Undo");
|
|
38
|
-
const Icons = (0,
|
|
38
|
+
const Icons = (0, styled_1.default)(FlexRow_1.FlexRow) `
|
|
39
39
|
position: absolute;
|
|
40
40
|
top: 0;
|
|
41
41
|
right: -2rem;
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.TextEditLengthBox = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const
|
|
9
|
-
const Base =
|
|
8
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
|
+
const Base = styled_1.default.div `
|
|
10
10
|
/* position: absolute;
|
|
11
11
|
bottom: 0.5rem;
|
|
12
12
|
right: 0.5rem; */
|
|
@@ -31,8 +31,8 @@ const common_1 = require("./common");
|
|
|
31
31
|
const FlexColumn_1 = require("../FlexColumn");
|
|
32
32
|
const common_2 = require("../../styles/common");
|
|
33
33
|
const react_1 = __importStar(require("react"));
|
|
34
|
-
const
|
|
35
|
-
const Label =
|
|
34
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
35
|
+
const Label = styled_1.default.label ``;
|
|
36
36
|
const RadioGroup = ({ defaultValue, onSubmit, values,
|
|
37
37
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
38
|
renderLabel = (e) => e.toString(),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IRefTextEdit, ITextEdit } from './types';
|
|
2
|
-
import { StyledComponent } from 'styled-components';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
export declare const ValueReadonly: StyledComponent<
|
|
3
|
+
export declare const ValueReadonly: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: React.ElementType<any> | undefined;
|
|
6
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
7
|
export declare const TextEdit: React.ForwardRefExoticComponent<ITextEdit & React.RefAttributes<IRefTextEdit>>;
|
|
@@ -22,6 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.TextEdit = exports.ValueReadonly = void 0;
|
|
27
30
|
/* eslint-disable react/display-name */
|
|
@@ -30,17 +33,18 @@ const LengthBox_1 = require("./LengthBox");
|
|
|
30
33
|
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
31
34
|
const common_2 = require("../../styles/common");
|
|
32
35
|
const dom_1 = require("../../helpers/dom");
|
|
33
|
-
const
|
|
34
|
-
const react_1 =
|
|
36
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
37
|
+
const react_1 = require("@emotion/react");
|
|
38
|
+
const react_2 = __importStar(require("react"));
|
|
35
39
|
const Pencil_1 = require("../../icons/Pencil");
|
|
36
40
|
const Save_1 = require("../../icons/Save");
|
|
37
41
|
const Undo_1 = require("../../icons/Undo");
|
|
38
|
-
exports.ValueReadonly =
|
|
42
|
+
exports.ValueReadonly = styled_1.default.div `
|
|
39
43
|
${common_1.valueCss};
|
|
40
44
|
word-break: break-word;
|
|
41
45
|
flex-basis: calc(100% - 3rem);
|
|
42
46
|
`;
|
|
43
|
-
const basecss = (0,
|
|
47
|
+
const basecss = (0, react_1.css) `
|
|
44
48
|
outline: none;
|
|
45
49
|
border: 0;
|
|
46
50
|
word-break: break-word;
|
|
@@ -55,19 +59,19 @@ const basecss = (0, styled_components_1.css) `
|
|
|
55
59
|
color: #bbb;
|
|
56
60
|
}
|
|
57
61
|
`;
|
|
58
|
-
const ValueTextArea =
|
|
62
|
+
const ValueTextArea = styled_1.default.textarea `
|
|
59
63
|
${basecss}
|
|
60
64
|
&[data-editing='true'] {
|
|
61
65
|
min-height: 5rem;
|
|
62
66
|
}
|
|
63
67
|
`;
|
|
64
|
-
const ValueTextBox =
|
|
68
|
+
const ValueTextBox = styled_1.default.input `
|
|
65
69
|
${basecss}
|
|
66
70
|
`;
|
|
67
|
-
const ValueBoxEdit = (0,
|
|
71
|
+
const ValueBoxEdit = (0, styled_1.default)(common_1.ValueBox) `
|
|
68
72
|
border: solid 1px #ccc;
|
|
69
73
|
`;
|
|
70
|
-
const Right =
|
|
74
|
+
const Right = styled_1.default.div `
|
|
71
75
|
display: flex;
|
|
72
76
|
flex-flow: row;
|
|
73
77
|
align-content: center;
|
|
@@ -77,7 +81,7 @@ const Right = styled_components_1.default.div `
|
|
|
77
81
|
right: 0.5rem;
|
|
78
82
|
}
|
|
79
83
|
`;
|
|
80
|
-
const Icon =
|
|
84
|
+
const Icon = styled_1.default.div `
|
|
81
85
|
width: 1.5rem;
|
|
82
86
|
display: flex;
|
|
83
87
|
cursor: pointer;
|
|
@@ -85,14 +89,14 @@ const Icon = styled_components_1.default.div `
|
|
|
85
89
|
filter: saturate(3);
|
|
86
90
|
}
|
|
87
91
|
`;
|
|
88
|
-
exports.TextEdit = (0,
|
|
92
|
+
exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
89
93
|
const { defaultValue = '', defaultEditing, disableEdit = false, placeholder, className, singleLine = false, noGrow = false, leftContent, onSubmit, onEditingChange, onClickOutsideWithNoValue, onClickNotEditing, allowUndo = true, onEscape, maxLength, onKeyDown, } = p;
|
|
90
|
-
const divRef = (0,
|
|
91
|
-
const taref = (0,
|
|
92
|
-
const [value, setValue] = (0,
|
|
93
|
-
const [editing, setEditingRaw] = (0,
|
|
94
|
+
const divRef = (0, react_2.useRef)(null);
|
|
95
|
+
const taref = (0, react_2.useRef)(null);
|
|
96
|
+
const [value, setValue] = (0, react_2.useState)(defaultValue);
|
|
97
|
+
const [editing, setEditingRaw] = (0, react_2.useState)(!!defaultEditing);
|
|
94
98
|
const valueChange = value !== defaultValue;
|
|
95
|
-
(0,
|
|
99
|
+
(0, react_2.useImperativeHandle)(ref, () => ({
|
|
96
100
|
setValue,
|
|
97
101
|
}));
|
|
98
102
|
(0, useOnClickOutside_1.useOnClickOutside)({
|
|
@@ -114,40 +118,34 @@ exports.TextEdit = (0, react_1.forwardRef)((p, ref) => {
|
|
|
114
118
|
setEditingRaw(false);
|
|
115
119
|
}
|
|
116
120
|
});
|
|
117
|
-
const setEditing = (0,
|
|
121
|
+
const setEditing = (0, react_2.useCallback)((b) => {
|
|
118
122
|
setEditingRaw(b);
|
|
119
123
|
if (onEditingChange) {
|
|
120
124
|
onEditingChange(b);
|
|
121
125
|
}
|
|
122
126
|
}, [onEditingChange]);
|
|
123
|
-
(0,
|
|
124
|
-
setValue(defaultValue);
|
|
125
|
-
}, [defaultValue]);
|
|
126
|
-
(0, react_1.useEffect)(() => {
|
|
127
|
+
(0, react_2.useEffect)(() => {
|
|
127
128
|
if ((defaultEditing === null || defaultEditing === void 0 ? void 0 : defaultEditing.focus) && taref.current) {
|
|
128
129
|
taref.current.focus();
|
|
129
130
|
}
|
|
130
131
|
}, [defaultEditing === null || defaultEditing === void 0 ? void 0 : defaultEditing.focus]);
|
|
131
132
|
if (!editing || disableEdit) {
|
|
132
|
-
return (
|
|
133
|
+
return (react_2.default.createElement(common_1.ValueBox, Object.assign({}, common_2.noDrag, { className: className, "data-editing": "false", onClick: () => onClickNotEditing === null || onClickNotEditing === void 0 ? void 0 : onClickNotEditing(), "data-pointer": onClickNotEditing ? 'true' : 'false', "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)),
|
|
133
134
|
leftContent || null,
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
react_2.default.createElement(exports.ValueReadonly, { "data-type": "text" }, value || react_2.default.createElement("span", { style: { color: '#ccc' } }, placeholder)),
|
|
136
|
+
react_2.default.createElement(Right, null, !disableEdit && (react_2.default.createElement(Icon, { style: common_1.iconRight, onClick: (e) => {
|
|
136
137
|
e.stopPropagation();
|
|
137
138
|
setEditing(true);
|
|
138
139
|
} },
|
|
139
|
-
|
|
140
|
+
react_2.default.createElement(Pencil_1.Pencil, null))))));
|
|
140
141
|
}
|
|
141
142
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
-
const Comp = singleLine
|
|
143
|
-
|
|
144
|
-
ValueTextBox
|
|
145
|
-
: ValueTextArea;
|
|
146
|
-
return (react_1.default.createElement(ValueBoxEdit, Object.assign({}, common_2.noDrag, { className: className, "data-editing": "true",
|
|
143
|
+
const Comp = !singleLine ? ValueTextArea : ValueTextBox;
|
|
144
|
+
return (react_2.default.createElement(ValueBoxEdit, Object.assign({}, common_2.noDrag, { className: className, "data-editing": "true",
|
|
147
145
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
148
146
|
ref: ref, tabIndex: -1, "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)),
|
|
149
147
|
leftContent || null,
|
|
150
|
-
|
|
148
|
+
react_2.default.createElement(Comp, { tabIndex: editing ? 0 : undefined, "data-editing": "true", "data-valuechange": valueChange.toString(), ref: taref, "data-type": "text", value: value, onChange: (v) => {
|
|
151
149
|
setValue(v.currentTarget.value);
|
|
152
150
|
if (!allowUndo) {
|
|
153
151
|
onSubmit(v.currentTarget.value, false);
|
|
@@ -164,14 +162,14 @@ exports.TextEdit = (0, react_1.forwardRef)((p, ref) => {
|
|
|
164
162
|
onEscape();
|
|
165
163
|
}
|
|
166
164
|
} }),
|
|
167
|
-
maxLength && (
|
|
168
|
-
|
|
169
|
-
allowUndo && (
|
|
170
|
-
valueChange && (
|
|
171
|
-
|
|
172
|
-
(valueChange || editing !== !!defaultEditing) && (
|
|
165
|
+
maxLength && (react_2.default.createElement(Right, { "data-singleline": singleLine },
|
|
166
|
+
react_2.default.createElement(LengthBox_1.TextEditLengthBox, { min: value.length, max: maxLength }))),
|
|
167
|
+
allowUndo && (react_2.default.createElement(Right, null,
|
|
168
|
+
valueChange && (react_2.default.createElement(Icon, { style: common_1.iconLeft, onClick: () => valueChange && onSubmit(value, false) },
|
|
169
|
+
react_2.default.createElement(Save_1.Save, null))),
|
|
170
|
+
(valueChange || editing !== !!defaultEditing) && (react_2.default.createElement(Icon, { style: common_1.iconRight, onClick: () => {
|
|
173
171
|
setEditing(!!defaultEditing);
|
|
174
172
|
setValue(defaultValue);
|
|
175
173
|
} },
|
|
176
|
-
|
|
174
|
+
react_2.default.createElement(Undo_1.Undo, null)))))));
|
|
177
175
|
});
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ValueBox: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const valueCss: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const ValueInputCB: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
11
|
+
export declare const IconD: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
15
|
export declare const iconRight: {
|
|
6
16
|
right: string;
|
|
7
17
|
};
|
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.iconLeft = exports.iconRight = exports.IconD = exports.ValueInputCB = exports.valueCss = exports.ValueBox = void 0;
|
|
27
7
|
const colours_1 = require("../../styles/colours");
|
|
28
|
-
const
|
|
29
|
-
|
|
8
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
|
+
const react_1 = require("@emotion/react");
|
|
10
|
+
exports.ValueBox = styled_1.default.div `
|
|
30
11
|
padding: 0.5rem;
|
|
31
12
|
|
|
32
13
|
display: flex;
|
|
@@ -46,7 +27,7 @@ exports.ValueBox = styled_components_1.default.div `
|
|
|
46
27
|
flex-grow: 0;
|
|
47
28
|
}
|
|
48
29
|
`;
|
|
49
|
-
exports.valueCss = (0,
|
|
30
|
+
exports.valueCss = (0, react_1.css) `
|
|
50
31
|
width: 100%;
|
|
51
32
|
height: 100%;
|
|
52
33
|
word-break: break-all;
|
|
@@ -60,10 +41,10 @@ exports.valueCss = (0, styled_components_1.css) `
|
|
|
60
41
|
height: 1.5rem;
|
|
61
42
|
}
|
|
62
43
|
`;
|
|
63
|
-
exports.ValueInputCB =
|
|
44
|
+
exports.ValueInputCB = styled_1.default.input `
|
|
64
45
|
${exports.valueCss};
|
|
65
46
|
`;
|
|
66
|
-
exports.IconD =
|
|
47
|
+
exports.IconD = styled_1.default.div `
|
|
67
48
|
z-index: 1;
|
|
68
49
|
font-size: 1rem;
|
|
69
50
|
width: 1.5rem;
|
|
@@ -28,12 +28,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.TextWithButton = void 0;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
|
-
const
|
|
32
|
-
const Base =
|
|
31
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
32
|
+
const Base = styled_1.default.div `
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-flow: row;
|
|
35
35
|
`;
|
|
36
|
-
const Input =
|
|
36
|
+
const Input = styled_1.default.input `
|
|
37
37
|
flex-grow: 1;
|
|
38
38
|
border: solid 3px #ccc;
|
|
39
39
|
border-right: 0;
|
|
@@ -46,7 +46,7 @@ const Input = styled_components_1.default.input `
|
|
|
46
46
|
}
|
|
47
47
|
outline: 0;
|
|
48
48
|
`;
|
|
49
|
-
const Button =
|
|
49
|
+
const Button = styled_1.default.button `
|
|
50
50
|
padding: 2rem;
|
|
51
51
|
padding-top: 1rem;
|
|
52
52
|
padding-bottom: 1rem;
|
|
@@ -30,9 +30,9 @@ exports.UserProfileImage = exports.UserImage = void 0;
|
|
|
30
30
|
const log_1 = require("../../../common/helpers/log");
|
|
31
31
|
const array_1 = require("../../../common/helpers/array");
|
|
32
32
|
const react_1 = __importStar(require("react"));
|
|
33
|
-
const
|
|
33
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
34
|
const UserOutline_1 = require("../../icons/UserOutline");
|
|
35
|
-
const Base =
|
|
35
|
+
const Base = styled_1.default.div `
|
|
36
36
|
width: 2.5rem;
|
|
37
37
|
height: 2.5rem;
|
|
38
38
|
border-radius: 50%;
|
|
@@ -40,7 +40,7 @@ const Base = styled_components_1.default.div `
|
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
position: relative;
|
|
42
42
|
`;
|
|
43
|
-
const Img =
|
|
43
|
+
const Img = styled_1.default.img `
|
|
44
44
|
width: 2.5rem;
|
|
45
45
|
height: 2.5rem;
|
|
46
46
|
`;
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CrossIcon = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const
|
|
9
|
-
const Base =
|
|
8
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
|
+
const Base = styled_1.default.svg `
|
|
10
10
|
color: rgb(170, 170, 170);
|
|
11
11
|
margin: auto;
|
|
12
12
|
font-size: 2rem;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const HardOutline: import("
|
|
3
|
-
export declare const NoTextSelect: import("
|
|
4
|
-
export declare const TextOverflowEllipsis: import("
|
|
5
|
-
export declare const CssTransparentBlock: import("
|
|
2
|
+
export declare const HardOutline: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const NoTextSelect: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const TextOverflowEllipsis: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const CssTransparentBlock: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const FadeBottom: ({ height }: {
|
|
7
7
|
height: string;
|
|
8
|
-
}) => import("
|
|
9
|
-
export declare const Card: import("styled
|
|
8
|
+
}) => import("@emotion/react").SerializedStyles;
|
|
9
|
+
export declare const Card: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
as?: import("react").ElementType<any> | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
13
|
export declare const noDrag: {
|
|
11
14
|
draggable: boolean;
|
|
12
15
|
onDragStart: React.DragEventHandler<HTMLDivElement>;
|
|
13
16
|
onTouchStart: React.TouchEventHandler<HTMLDivElement>;
|
|
14
17
|
};
|
|
15
|
-
export declare const FullScreenPage: import("styled
|
|
16
|
-
|
|
18
|
+
export declare const FullScreenPage: import("@emotion/styled").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
as?: import("react").ElementType<any> | undefined;
|
|
21
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
|
+
export declare const bounce: (bounceattr: string) => import("@emotion/react").SerializedStyles;
|
package/dist/ui/styles/common.js
CHANGED
|
@@ -1,55 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.bounce = exports.FullScreenPage = exports.noDrag = exports.Card = exports.FadeBottom = exports.CssTransparentBlock = exports.TextOverflowEllipsis = exports.NoTextSelect = exports.HardOutline = void 0;
|
|
27
7
|
const colours_1 = require("./colours");
|
|
28
|
-
const
|
|
29
|
-
|
|
8
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
|
+
const react_1 = require("@emotion/react");
|
|
10
|
+
exports.HardOutline = (0, react_1.css) `
|
|
30
11
|
filter: drop-shadow(1px 1px 0px var(--outlinecolour))
|
|
31
12
|
drop-shadow(-1px 1px 0px var(--outlinecolour))
|
|
32
13
|
drop-shadow(1px -1px 0px var(--outlinecolour))
|
|
33
14
|
drop-shadow(-1px -1px 0px var(--outlinecolour));
|
|
34
15
|
`;
|
|
35
|
-
exports.NoTextSelect = (0,
|
|
16
|
+
exports.NoTextSelect = (0, react_1.css) `
|
|
36
17
|
user-select: none; /* supported by Chrome and Opera */
|
|
37
18
|
-webkit-user-select: none; /* Safari */
|
|
38
19
|
-khtml-user-select: none; /* Konqueror HTML */
|
|
39
20
|
-moz-user-select: none; /* Firefox */
|
|
40
21
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
41
22
|
`;
|
|
42
|
-
exports.TextOverflowEllipsis = (0,
|
|
23
|
+
exports.TextOverflowEllipsis = (0, react_1.css) `
|
|
43
24
|
overflow: hidden;
|
|
44
25
|
text-overflow: ellipsis;
|
|
45
26
|
`;
|
|
46
|
-
exports.CssTransparentBlock = (0,
|
|
27
|
+
exports.CssTransparentBlock = (0, react_1.css) `
|
|
47
28
|
background-color: rgba(150, 150, 150, 0.5);
|
|
48
29
|
border-radius: 3px;
|
|
49
30
|
font-weight: 600;
|
|
50
31
|
color: ${colours_1.colours.mainLight};
|
|
51
32
|
`;
|
|
52
|
-
const FadeBottom = ({ height }) => (0,
|
|
33
|
+
const FadeBottom = ({ height }) => (0, react_1.css) `
|
|
53
34
|
&:after {
|
|
54
35
|
content: '';
|
|
55
36
|
position: absolute;
|
|
@@ -79,7 +60,7 @@ const FadeBottom = ({ height }) => (0, styled_components_1.css) `
|
|
|
79
60
|
}
|
|
80
61
|
`;
|
|
81
62
|
exports.FadeBottom = FadeBottom;
|
|
82
|
-
exports.Card =
|
|
63
|
+
exports.Card = styled_1.default.div `
|
|
83
64
|
background-color: white;
|
|
84
65
|
margin: 0.5rem;
|
|
85
66
|
|
|
@@ -100,7 +81,7 @@ exports.noDrag = {
|
|
|
100
81
|
e.stopPropagation();
|
|
101
82
|
},
|
|
102
83
|
};
|
|
103
|
-
exports.FullScreenPage =
|
|
84
|
+
exports.FullScreenPage = styled_1.default.div `
|
|
104
85
|
display: flex;
|
|
105
86
|
width: 100%;
|
|
106
87
|
flex-grow: 1;
|
|
@@ -109,7 +90,7 @@ exports.FullScreenPage = styled_components_1.default.div `
|
|
|
109
90
|
align-content: flex-start;
|
|
110
91
|
align-items: flex-start;
|
|
111
92
|
`;
|
|
112
|
-
const bounce = (bounceattr) => (0,
|
|
93
|
+
const bounce = (bounceattr) => (0, react_1.css) `
|
|
113
94
|
transition: opacity 0.2s ease,
|
|
114
95
|
transform 0.2s cubic-bezier(0.02, 1.5, 0.74, 1.23);
|
|
115
96
|
transform-origin: 50% 50%;
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SOBase: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
+
}, {}, {}>;
|
|
8
|
+
export declare const SOBR: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const SOB: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const SOP: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
+
export declare const SOCenter: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const SOA: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|