@instructure/quiz-core 20.9.0 → 20.9.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +16 -22
- package/es/building/components/layout/Sidebar/SidebarItem/styles.js +11 -0
- package/es/building/components/layout/Sidebar/SidebarItem/theme.js +4 -2
- package/es/building/components/layout/Sidebar/Stimulus/presenter.js +17 -23
- package/es/building/components/layout/Sidebar/Stimulus/styles.js +11 -0
- package/es/building/components/layout/Sidebar/Stimulus/theme.js +4 -2
- package/es/building/components/layout/Sidebar/presenter.js +42 -38
- package/es/building/components/layout/Sidebar/styles.js +28 -0
- package/es/building/components/layout/Sidebar/theme.js +4 -2
- package/es/building/components/layout/header/BuildingButtons/presenter.js +33 -39
- package/es/building/components/layout/header/BuildingButtons/styles.js +21 -0
- package/es/building/components/layout/header/BuildingButtons/theme.js +4 -2
- package/es/building/components/resources/ActionButtons/presenter.js +29 -27
- package/es/building/components/resources/ActionButtons/styles.js +33 -0
- package/es/building/components/resources/ActionButtons/theme.js +4 -2
- package/es/building/components/resources/AddToBankOptions/index.js +11 -15
- package/es/building/components/resources/AddToBankOptions/styles.js +11 -0
- package/es/building/components/resources/AddToBankOptions/theme.js +4 -2
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +38 -44
- package/es/building/components/resources/DeleteStimulusModal/styles.js +22 -0
- package/es/building/components/resources/DeleteStimulusModal/theme.js +4 -2
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +23 -28
- package/es/building/components/resources/ItemFeedbackModal/styles.js +14 -0
- package/es/building/components/resources/ItemFeedbackModal/theme.js +4 -2
- package/es/common/components/layout/header/Timer/presenter.js +30 -37
- package/es/common/components/layout/header/Timer/styles.js +27 -0
- package/es/common/components/layout/header/Timer/theme.js +4 -2
- package/es/common/components/layout/sidebar/PositionSummary/index.js +17 -25
- package/es/common/components/layout/sidebar/PositionSummary/styles.js +28 -0
- package/es/common/components/layout/sidebar/PositionSummary/theme.js +4 -2
- package/es/common/components/layout/sidebar/Sidebar/index.js +88 -94
- package/es/common/components/layout/sidebar/Sidebar/styles.js +117 -0
- package/es/common/components/layout/sidebar/Sidebar/theme.js +4 -8
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +52 -52
- package/es/common/components/layout/sidebar/SidebarItem/styles.js +59 -0
- package/es/common/components/layout/sidebar/SidebarItem/theme.js +4 -2
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +39 -36
- package/es/common/components/layout/sidebar/Stimulus/styles.js +33 -0
- package/es/common/components/layout/sidebar/Stimulus/theme.js +4 -2
- package/es/common/components/shared/InteractionTypes/presenter.js +27 -33
- package/es/common/components/shared/InteractionTypes/styles.js +17 -0
- package/es/common/components/shared/InteractionTypes/theme.js +4 -2
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +40 -30
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +41 -0
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +4 -2
- package/es/common/components/shared/file_selector/FileSelector.js +11 -14
- package/es/common/components/shared/file_selector/styles.js +12 -0
- package/es/common/components/shared/file_selector/theme.js +4 -2
- package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +15 -23
- package/lib/building/components/layout/Sidebar/SidebarItem/styles.js +19 -0
- package/lib/building/components/layout/Sidebar/SidebarItem/theme.js +6 -3
- package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +16 -24
- package/lib/building/components/layout/Sidebar/Stimulus/styles.js +19 -0
- package/lib/building/components/layout/Sidebar/Stimulus/theme.js +6 -3
- package/lib/building/components/layout/Sidebar/presenter.js +40 -41
- package/lib/building/components/layout/Sidebar/styles.js +38 -0
- package/lib/building/components/layout/Sidebar/theme.js +6 -3
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +32 -40
- package/lib/building/components/layout/header/BuildingButtons/styles.js +29 -0
- package/lib/building/components/layout/header/BuildingButtons/theme.js +6 -3
- package/lib/building/components/resources/ActionButtons/presenter.js +28 -30
- package/lib/building/components/resources/ActionButtons/styles.js +44 -0
- package/lib/building/components/resources/ActionButtons/theme.js +6 -3
- package/lib/building/components/resources/AddToBankOptions/index.js +10 -16
- package/lib/building/components/resources/AddToBankOptions/styles.js +19 -0
- package/lib/building/components/resources/AddToBankOptions/theme.js +6 -3
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +37 -46
- package/lib/building/components/resources/DeleteStimulusModal/styles.js +30 -0
- package/lib/building/components/resources/DeleteStimulusModal/theme.js +6 -3
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +19 -27
- package/lib/building/components/resources/ItemFeedbackModal/styles.js +22 -0
- package/lib/building/components/resources/ItemFeedbackModal/theme.js +6 -3
- package/lib/common/components/layout/header/Timer/presenter.js +29 -39
- package/lib/common/components/layout/header/Timer/styles.js +35 -0
- package/lib/common/components/layout/header/Timer/theme.js +6 -3
- package/lib/common/components/layout/sidebar/PositionSummary/index.js +16 -26
- package/lib/common/components/layout/sidebar/PositionSummary/styles.js +36 -0
- package/lib/common/components/layout/sidebar/PositionSummary/theme.js +6 -3
- package/lib/common/components/layout/sidebar/Sidebar/index.js +85 -97
- package/lib/common/components/layout/sidebar/Sidebar/styles.js +128 -0
- package/lib/common/components/layout/sidebar/Sidebar/theme.js +5 -9
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +51 -55
- package/lib/common/components/layout/sidebar/SidebarItem/styles.js +69 -0
- package/lib/common/components/layout/sidebar/SidebarItem/theme.js +6 -3
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +38 -37
- package/lib/common/components/layout/sidebar/Stimulus/styles.js +41 -0
- package/lib/common/components/layout/sidebar/Stimulus/theme.js +6 -3
- package/lib/common/components/shared/InteractionTypes/presenter.js +26 -36
- package/lib/common/components/shared/InteractionTypes/styles.js +25 -0
- package/lib/common/components/shared/InteractionTypes/theme.js +6 -3
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +40 -33
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +51 -0
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +6 -3
- package/lib/common/components/shared/file_selector/FileSelector.js +10 -15
- package/lib/common/components/shared/file_selector/styles.js +20 -0
- package/lib/common/components/shared/file_selector/theme.js +6 -3
- package/package.json +10 -10
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -17,7 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
21
19
|
|
|
22
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
21
|
|
|
@@ -33,34 +31,25 @@ var _uiTopNavBar = require("@instructure/ui-top-nav-bar");
|
|
|
33
31
|
|
|
34
32
|
var _uiView = require("@instructure/ui-view");
|
|
35
33
|
|
|
36
|
-
var
|
|
34
|
+
var _emotion = require("@instructure/emotion");
|
|
37
35
|
|
|
38
36
|
var _index = _interopRequireDefault(require("../../../shared/FormattedDuration/index.js"));
|
|
39
37
|
|
|
40
38
|
var _formatTimespan = require("../../../../util/formatTimespan.js");
|
|
41
39
|
|
|
40
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
41
|
+
|
|
42
42
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
43
43
|
|
|
44
44
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
45
45
|
|
|
46
46
|
var _dec, _class, _class2, _temp;
|
|
47
47
|
|
|
48
|
-
var
|
|
49
|
-
componentId: 'fBhoO',
|
|
50
|
-
template: function template(theme) {
|
|
51
|
-
return "\n\n.fBhoO_dAhe{flex-direction:row;font-size:".concat(theme.timerFontSize || 'inherit', ";justify-content:center;line-height:1rem}\n\n.fBhoO_dAhe,.fBhoO_Swlx{align-items:center;display:flex}\n\n.fBhoO_Swlx{flex-direction:column-reverse}\n\n.fBhoO_dkDW{padding:").concat(theme.timerRightPadding || 'inherit', "}\n\n.fBhoO_bYJj{font-size:").concat(theme.timeRemainingLabelFontSize || 'inherit', ";text-align:center;width:100%}\n\n[dir=ltr] .fBhoO_bYJj,[dir=rtl] .fBhoO_bYJj{text-align:center}");
|
|
52
|
-
},
|
|
53
|
-
'timer': 'fBhoO_dAhe',
|
|
54
|
-
'timerLeft': 'fBhoO_Swlx',
|
|
55
|
-
'timerRight': 'fBhoO_dkDW',
|
|
56
|
-
'timeRemainingLabel': 'fBhoO_bYJj'
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.IconClockLine, null);
|
|
48
|
+
var _ref = (0, _emotion.jsx)(_uiIcons.IconClockLine, null);
|
|
60
49
|
|
|
61
|
-
var _ref2 =
|
|
50
|
+
var _ref2 = (0, _emotion.jsx)(_uiIcons.IconClockSolid, null);
|
|
62
51
|
|
|
63
|
-
var Timer = (_dec = (0,
|
|
52
|
+
var Timer = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
64
53
|
(0, _inherits2.default)(Timer, _Component);
|
|
65
54
|
|
|
66
55
|
var _super = (0, _createSuper2.default)(Timer);
|
|
@@ -146,13 +135,13 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
146
135
|
}, {
|
|
147
136
|
key: "renderHelpScreenreaderText",
|
|
148
137
|
value: function renderHelpScreenreaderText() {
|
|
149
|
-
return
|
|
138
|
+
return (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('During the quiz, press Alt+Shift+T to have the remaining time read'));
|
|
150
139
|
}
|
|
151
140
|
}, {
|
|
152
141
|
key: "renderMinimizedTimer",
|
|
153
142
|
value: function renderMinimizedTimer() {
|
|
154
143
|
if (this.props.iceTopNavBarEnabled) {
|
|
155
|
-
return
|
|
144
|
+
return (0, _emotion.jsx)(_uiTopNavBar.TopNavBar.Item, {
|
|
156
145
|
id: "TimerButton",
|
|
157
146
|
onClick: (0, _partial.default)(this.props.updateTimerMinimized, false),
|
|
158
147
|
variant: "icon",
|
|
@@ -163,20 +152,20 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
163
152
|
}, (0, _formatMessage.default)('Show Timer'));
|
|
164
153
|
}
|
|
165
154
|
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
}, this.renderHelpScreenreaderText(),
|
|
155
|
+
return (0, _emotion.jsx)("div", {
|
|
156
|
+
css: this.props.styles.timer
|
|
157
|
+
}, this.renderHelpScreenreaderText(), (0, _emotion.jsx)(_uiButtons.Button, {
|
|
169
158
|
"aria-expanded": "false",
|
|
170
159
|
ref: this.showTimerRef,
|
|
171
160
|
renderIcon: _uiIcons.IconClockLine,
|
|
172
161
|
onClick: (0, _partial.default)(this.props.updateTimerMinimized, false)
|
|
173
|
-
},
|
|
162
|
+
}, (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Show Timer'))));
|
|
174
163
|
}
|
|
175
164
|
}, {
|
|
176
165
|
key: "renderMaximizedTimer",
|
|
177
166
|
value: function renderMaximizedTimer() {
|
|
178
167
|
if (this.props.iceTopNavBarEnabled) {
|
|
179
|
-
return
|
|
168
|
+
return (0, _emotion.jsx)(_uiTopNavBar.TopNavBar.Item, {
|
|
180
169
|
id: "TimerButton",
|
|
181
170
|
onClick: (0, _partial.default)(this.props.updateTimerMinimized, true),
|
|
182
171
|
variant: "forceIconWithLabel",
|
|
@@ -184,29 +173,29 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
184
173
|
tooltip: (0, _formatMessage.default)('Hide Timer'),
|
|
185
174
|
"aria-expanded": "true",
|
|
186
175
|
itemRef: this.hideTimerRef
|
|
187
|
-
},
|
|
176
|
+
}, (0, _emotion.jsx)(_index.default, {
|
|
188
177
|
seconds: this.props.timeLeftInSeconds
|
|
189
178
|
}));
|
|
190
179
|
}
|
|
191
180
|
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
}, this.renderHelpScreenreaderText(),
|
|
181
|
+
return (0, _emotion.jsx)("div", {
|
|
182
|
+
css: this.props.styles.timer
|
|
183
|
+
}, this.renderHelpScreenreaderText(), (0, _emotion.jsx)(_uiView.View, {
|
|
195
184
|
as: "div"
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
}, (0, _formatMessage.default)('Time Remaining')),
|
|
185
|
+
}, (0, _emotion.jsx)("div", {
|
|
186
|
+
css: this.props.styles.timerLeft
|
|
187
|
+
}, (0, _emotion.jsx)("div", {
|
|
188
|
+
css: this.props.styles.timeRemainingLabel
|
|
189
|
+
}, (0, _formatMessage.default)('Time Remaining')), (0, _emotion.jsx)(_index.default, {
|
|
201
190
|
seconds: this.props.timeLeftInSeconds
|
|
202
|
-
}))),
|
|
203
|
-
|
|
204
|
-
},
|
|
191
|
+
}))), (0, _emotion.jsx)("div", {
|
|
192
|
+
css: this.props.styles.timerRight
|
|
193
|
+
}, (0, _emotion.jsx)(_uiButtons.Button, {
|
|
205
194
|
"aria-expanded": "true",
|
|
206
195
|
ref: this.hideTimerRef,
|
|
207
196
|
renderIcon: _uiIcons.IconArrowOpenStartLine,
|
|
208
197
|
onClick: (0, _partial.default)(this.props.updateTimerMinimized, true)
|
|
209
|
-
},
|
|
198
|
+
}, (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Hide Timer')))));
|
|
210
199
|
}
|
|
211
200
|
}, {
|
|
212
201
|
key: "render",
|
|
@@ -230,7 +219,8 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
230
219
|
timerRunning: _propTypes.default.bool,
|
|
231
220
|
updateTimerMinimized: _propTypes.default.func.isRequired,
|
|
232
221
|
iceTopNavBarEnabled: _propTypes.default.bool,
|
|
233
|
-
setTimerEnabled: _propTypes.default.func
|
|
222
|
+
setTimerEnabled: _propTypes.default.func,
|
|
223
|
+
styles: _propTypes.default.object
|
|
234
224
|
}, _class2.defaultProps = {
|
|
235
225
|
timerRunning: false,
|
|
236
226
|
timeLeftInSeconds: 0,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
timer: {
|
|
11
|
+
lineHeight: '1rem',
|
|
12
|
+
fontSize: componentTheme.timerFontSize,
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center'
|
|
17
|
+
},
|
|
18
|
+
timerLeft: {
|
|
19
|
+
display: 'flex',
|
|
20
|
+
flexDirection: 'column-reverse',
|
|
21
|
+
alignItems: 'center'
|
|
22
|
+
},
|
|
23
|
+
timerRight: {
|
|
24
|
+
padding: componentTheme.timerRightPadding
|
|
25
|
+
},
|
|
26
|
+
timeRemainingLabel: {
|
|
27
|
+
fontSize: componentTheme.timeRemainingLabelFontSize,
|
|
28
|
+
width: '100%',
|
|
29
|
+
textAlign: 'center'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var _default = generateStyle;
|
|
35
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var spacing = _ref.spacing,
|
|
10
10
|
borders = _ref.borders,
|
|
11
11
|
colors = _ref.colors,
|
|
@@ -22,4 +22,7 @@ function generator(_ref) {
|
|
|
22
22
|
timerRightPadding: spacing.xxSmall,
|
|
23
23
|
timeRemainingLabelFontSize: typography.fontSizeXSmall
|
|
24
24
|
};
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var _default = generateComponentTheme;
|
|
28
|
+
exports.default = _default;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = exports.PositionSummary = void 0;
|
|
11
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
|
|
14
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -17,13 +17,13 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
|
|
18
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
19
|
|
|
20
|
-
var _react =
|
|
20
|
+
var _react = require("react");
|
|
21
21
|
|
|
22
22
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _emotion = require("@instructure/emotion");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
27
27
|
|
|
28
28
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
29
29
|
|
|
@@ -31,18 +31,7 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
31
31
|
|
|
32
32
|
var _dec, _class, _class2, _temp;
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
componentId: 'CixOW',
|
|
36
|
-
template: function template(theme) {
|
|
37
|
-
return "\n\n.CixOW_bZNM{display:flex;flex-flow:column}\n\n.CixOW_dlMM{padding-bottom:".concat(theme.firstNumberSummaryPadding || 'inherit', "}\n\n.CixOW_dWEq{padding-top:").concat(theme.secondNumberSummaryPadding || 'inherit', "}\n\n.CixOW_fJqn{color:").concat(theme.numberSummaryColor || 'inherit', ";font-size:").concat(theme.numberSummaryFontSize || 'inherit', ";font-weight:").concat(theme.numberSummaryFontWeight || 'inherit', ";margin:auto}\n\n.CixOW_EKnN{border-color:").concat(theme.verticalDotsBorderColor || 'inherit', ";border-left:dotted ").concat(theme.verticalDotsBorderWidth || 'inherit', ";height:1.5rem;margin:auto}");
|
|
38
|
-
},
|
|
39
|
-
'column': 'CixOW_bZNM',
|
|
40
|
-
'firstNumberSummary': 'CixOW_dlMM',
|
|
41
|
-
'secondNumberSummary': 'CixOW_dWEq',
|
|
42
|
-
'numberSummary': 'CixOW_fJqn',
|
|
43
|
-
'verticalDots': 'CixOW_EKnN'
|
|
44
|
-
};
|
|
45
|
-
var PositionSummary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
34
|
+
var PositionSummary = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
46
35
|
(0, _inherits2.default)(PositionSummary, _Component);
|
|
47
36
|
|
|
48
37
|
var _super = (0, _createSuper2.default)(PositionSummary);
|
|
@@ -55,16 +44,16 @@ var PositionSummary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
55
44
|
(0, _createClass2.default)(PositionSummary, [{
|
|
56
45
|
key: "render",
|
|
57
46
|
value: function render() {
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
47
|
+
return (0, _emotion.jsx)("div", {
|
|
48
|
+
css: this.props.styles.column
|
|
49
|
+
}, (0, _emotion.jsx)("div", {
|
|
50
|
+
css: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.props.styles.numberSummary), this.props.styles.firstNumberSummary)
|
|
62
51
|
}, (0, _formatMessage.default)('{first, number}', {
|
|
63
52
|
first: this.props.firstPosition
|
|
64
|
-
})),
|
|
65
|
-
|
|
66
|
-
}),
|
|
67
|
-
|
|
53
|
+
})), (0, _emotion.jsx)("div", {
|
|
54
|
+
css: this.props.styles.verticalDots
|
|
55
|
+
}), (0, _emotion.jsx)("div", {
|
|
56
|
+
css: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.props.styles.numberSummary), this.props.styles.secondNumberSummary)
|
|
68
57
|
}, (0, _formatMessage.default)('{last, number}', {
|
|
69
58
|
last: this.props.lastPosition
|
|
70
59
|
})));
|
|
@@ -74,7 +63,8 @@ var PositionSummary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
74
63
|
return PositionSummary;
|
|
75
64
|
}(_react.Component), _class2.propTypes = {
|
|
76
65
|
firstPosition: _propTypes.default.number.isRequired,
|
|
77
|
-
lastPosition: _propTypes.default.number.isRequired
|
|
66
|
+
lastPosition: _propTypes.default.number.isRequired,
|
|
67
|
+
styles: _propTypes.default.object
|
|
78
68
|
}, _temp)) || _class);
|
|
79
69
|
exports.PositionSummary = PositionSummary;
|
|
80
70
|
var _default = PositionSummary;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
column: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
flexFlow: 'column'
|
|
13
|
+
},
|
|
14
|
+
firstNumberSummary: {
|
|
15
|
+
paddingBottom: "".concat(componentTheme.firstNumberSummaryPadding)
|
|
16
|
+
},
|
|
17
|
+
secondNumberSummary: {
|
|
18
|
+
paddingTop: "".concat(componentTheme.secondNumberSummaryPadding)
|
|
19
|
+
},
|
|
20
|
+
numberSummary: {
|
|
21
|
+
color: componentTheme.numberSummaryColor,
|
|
22
|
+
fontSize: componentTheme.numberSummaryFontSize,
|
|
23
|
+
fontWeight: componentTheme.numberSummaryFontWeight,
|
|
24
|
+
margin: 'auto'
|
|
25
|
+
},
|
|
26
|
+
verticalDots: {
|
|
27
|
+
margin: 'auto',
|
|
28
|
+
height: '1.5rem',
|
|
29
|
+
borderLeft: "dotted ".concat(componentTheme.verticalDotsBorderWidth),
|
|
30
|
+
borderColor: componentTheme.verticalDotsBorderColor
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var _default = generateStyle;
|
|
36
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var colors = _ref.colors,
|
|
10
10
|
spacing = _ref.spacing,
|
|
11
11
|
borders = _ref.borders,
|
|
@@ -19,4 +19,7 @@ function generator(_ref) {
|
|
|
19
19
|
verticalDotsBorderWidth: borders.widthSmall,
|
|
20
20
|
verticalDotsBorderColor: colors.licorice
|
|
21
21
|
};
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var _default = generateComponentTheme;
|
|
25
|
+
exports.default = _default;
|