@rpg-engine/long-bow 0.1.50 → 0.1.54
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/components/DraggableContainer.d.ts +12 -0
- package/dist/components/SimpleProgressBar.d.ts +8 -0
- package/dist/components/SkillProgressBar.d.ts +9 -0
- package/dist/imgExp.png +0 -0
- package/dist/index.d.ts +3 -1
- package/dist/long-bow.cjs.development.js +200 -67
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +199 -68
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +6 -2
- package/src/components/Button.tsx +5 -7
- package/src/components/Chat/Chat.tsx +63 -39
- package/src/components/CheckButton.tsx +4 -3
- package/src/components/DraggableContainer.tsx +95 -0
- package/src/components/Dropdown.tsx +1 -1
- package/src/components/ListMenu.tsx +4 -4
- package/src/components/NPCDialog/NPCDialog.tsx +3 -2
- package/src/components/NPCDialog/NPCDialogText.tsx +1 -1
- package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +15 -13
- package/src/components/ProgressBar.tsx +4 -4
- package/src/components/RPGUIContainer.tsx +1 -1
- package/src/components/RadioButton.tsx +1 -1
- package/src/components/SimpleProgressBar.tsx +58 -0
- package/src/components/SkillProgressBar.tsx +70 -0
- package/src/components/Truncate.tsx +1 -1
- package/src/components/imgExp.png +0 -0
- package/src/components/shared/Column.tsx +4 -4
- package/src/hooks/useEventListener.ts +1 -1
- package/src/index.tsx +3 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IDraggableContainerProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
width?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
imgSrc?: string;
|
|
9
|
+
imgWidth: string;
|
|
10
|
+
onCloseButton: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const DraggableContainer: React.FC<IDraggableContainerProps>;
|
package/dist/imgExp.png
ADDED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './components/Button';
|
|
2
|
-
export * from './components/CheckButton';
|
|
3
2
|
export * from './components/Chat/Chat';
|
|
3
|
+
export * from './components/CheckButton';
|
|
4
|
+
export * from './components/DraggableContainer';
|
|
4
5
|
export * from './components/Dropdown';
|
|
5
6
|
export * from './components/Input';
|
|
6
7
|
export * from './components/ListMenu';
|
|
@@ -11,6 +12,7 @@ export * from './components/RadioButton';
|
|
|
11
12
|
export * from './components/RangeSlider';
|
|
12
13
|
export * from './components/RPGUIContainer';
|
|
13
14
|
export * from './components/RPGUIRoot';
|
|
15
|
+
export * from './components/SkillProgressBar';
|
|
14
16
|
export * from './components/TextArea';
|
|
15
17
|
export * from './components/Truncate';
|
|
16
18
|
export * from './components/typography/DynamicText';
|
|
@@ -8,6 +8,8 @@ var React = require('react');
|
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
9
|
var styled = _interopDefault(require('styled-components'));
|
|
10
10
|
var dayjs = _interopDefault(require('dayjs'));
|
|
11
|
+
var reactErrorBoundary = require('react-error-boundary');
|
|
12
|
+
var Draggable = _interopDefault(require('react-draggable'));
|
|
11
13
|
var uuid = require('uuid');
|
|
12
14
|
require('rpgui/rpgui.min.css');
|
|
13
15
|
require('rpgui/rpgui.min.js');
|
|
@@ -66,51 +68,6 @@ var ButtonContainer = /*#__PURE__*/styled.button.withConfig({
|
|
|
66
68
|
componentId: "sc-obzd3o-0"
|
|
67
69
|
})(["height:45px;font-size:11.5px;"]);
|
|
68
70
|
|
|
69
|
-
var CheckButton = function CheckButton(_ref) {
|
|
70
|
-
var items = _ref.items,
|
|
71
|
-
onChange = _ref.onChange;
|
|
72
|
-
|
|
73
|
-
var generateSelectedValuesList = function generateSelectedValuesList() {
|
|
74
|
-
var selectedValues = {};
|
|
75
|
-
items.forEach(function (item) {
|
|
76
|
-
selectedValues[item.label] = false;
|
|
77
|
-
});
|
|
78
|
-
return selectedValues;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
var _useState = React.useState(generateSelectedValuesList()),
|
|
82
|
-
selectedValues = _useState[0],
|
|
83
|
-
setSelectedValues = _useState[1];
|
|
84
|
-
|
|
85
|
-
var handleClick = function handleClick(label) {
|
|
86
|
-
var _extends2;
|
|
87
|
-
|
|
88
|
-
setSelectedValues(_extends({}, selectedValues, (_extends2 = {}, _extends2[label] = !selectedValues[label], _extends2)));
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
React.useEffect(function () {
|
|
92
|
-
if (selectedValues) {
|
|
93
|
-
onChange(selectedValues);
|
|
94
|
-
}
|
|
95
|
-
}, [selectedValues]);
|
|
96
|
-
return React__default.createElement("div", {
|
|
97
|
-
id: "elemento-checkbox"
|
|
98
|
-
}, items == null ? void 0 : items.map(function (element, index) {
|
|
99
|
-
return React__default.createElement("div", {
|
|
100
|
-
key: element.label + "_" + index
|
|
101
|
-
}, React__default.createElement("input", {
|
|
102
|
-
className: "rpgui-checkbox",
|
|
103
|
-
type: "checkbox",
|
|
104
|
-
checked: selectedValues[element.label],
|
|
105
|
-
onChange: function onChange() {}
|
|
106
|
-
}), React__default.createElement("label", {
|
|
107
|
-
onClick: function onClick() {
|
|
108
|
-
return handleClick(element.label);
|
|
109
|
-
}
|
|
110
|
-
}, element.label), React__default.createElement("br", null));
|
|
111
|
-
}));
|
|
112
|
-
};
|
|
113
|
-
|
|
114
71
|
var colors = {
|
|
115
72
|
darkGrey: '#3e3e3e'
|
|
116
73
|
};
|
|
@@ -204,12 +161,30 @@ var Chat = function Chat(_ref) {
|
|
|
204
161
|
setMessage(value);
|
|
205
162
|
};
|
|
206
163
|
|
|
164
|
+
var onRenderMessageLines = function onRenderMessageLines(emitter, createdAt, message) {
|
|
165
|
+
return dayjs(createdAt || new Date()).format('HH:mm') + " " + (emitter != null && emitter.name ? emitter.name + ": " : 'Unknown: ') + " " + message;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
var onRenderChatMessages = function onRenderChatMessages(chatMessages) {
|
|
169
|
+
return chatMessages != null && chatMessages.length ? chatMessages == null ? void 0 : chatMessages.map(function (_ref2, index) {
|
|
170
|
+
var _id = _ref2._id,
|
|
171
|
+
createdAt = _ref2.createdAt,
|
|
172
|
+
emitter = _ref2.emitter,
|
|
173
|
+
message = _ref2.message;
|
|
174
|
+
return React__default.createElement(MessageText, {
|
|
175
|
+
key: _id + "_" + index
|
|
176
|
+
}, onRenderMessageLines(emitter, createdAt, message));
|
|
177
|
+
}) : React__default.createElement(MessageText, null, "No messages available.");
|
|
178
|
+
};
|
|
179
|
+
|
|
207
180
|
return React__default.createElement(Container$1, null, React__default.createElement(CustomContainer, {
|
|
208
181
|
type: exports.RPGUIContainerTypes.FramedGrey,
|
|
209
182
|
width: width,
|
|
210
183
|
height: height,
|
|
211
184
|
className: "chat-container",
|
|
212
185
|
opacity: opacity
|
|
186
|
+
}, React__default.createElement(reactErrorBoundary.ErrorBoundary, {
|
|
187
|
+
fallback: React__default.createElement("p", null, "Oops! Your chat has crashed.")
|
|
213
188
|
}, onCloseButton && React__default.createElement(CloseButton, {
|
|
214
189
|
onClick: onCloseButton,
|
|
215
190
|
onTouchStart: onCloseButton
|
|
@@ -218,15 +193,7 @@ var Chat = function Chat(_ref) {
|
|
|
218
193
|
width: '100%',
|
|
219
194
|
height: '80%',
|
|
220
195
|
className: "chat-body dark-background"
|
|
221
|
-
}, chatMessages
|
|
222
|
-
var _id = _ref2._id,
|
|
223
|
-
createdAt = _ref2.createdAt,
|
|
224
|
-
emitter = _ref2.emitter,
|
|
225
|
-
message = _ref2.message;
|
|
226
|
-
return React__default.createElement(MessageText, {
|
|
227
|
-
key: _id + "_" + index
|
|
228
|
-
}, dayjs(createdAt).format('HH:mm') + " " + emitter.name + ": " + message);
|
|
229
|
-
}) : React__default.createElement(MessageText, null, "No messages available.")), React__default.createElement(Form, {
|
|
196
|
+
}, onRenderChatMessages(chatMessages)), React__default.createElement(Form, {
|
|
230
197
|
onSubmit: handleSubmit
|
|
231
198
|
}, React__default.createElement(Column, {
|
|
232
199
|
flex: 70
|
|
@@ -245,7 +212,7 @@ var Chat = function Chat(_ref) {
|
|
|
245
212
|
}, React__default.createElement(Button, {
|
|
246
213
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
247
214
|
id: "chat-send-button"
|
|
248
|
-
}, "Send")))));
|
|
215
|
+
}, "Send"))))));
|
|
249
216
|
};
|
|
250
217
|
var Container$1 = /*#__PURE__*/styled.div.withConfig({
|
|
251
218
|
displayName: "Chat__Container",
|
|
@@ -274,6 +241,100 @@ var MessageText = /*#__PURE__*/styled.p.withConfig({
|
|
|
274
241
|
componentId: "sc-1bk05n6-5"
|
|
275
242
|
})(["display:block !important;width:100%;font-size:0.7rem !important;overflow-y:auto;margin:0;"]);
|
|
276
243
|
|
|
244
|
+
var CheckButton = function CheckButton(_ref) {
|
|
245
|
+
var items = _ref.items,
|
|
246
|
+
onChange = _ref.onChange;
|
|
247
|
+
|
|
248
|
+
var generateSelectedValuesList = function generateSelectedValuesList() {
|
|
249
|
+
var selectedValues = {};
|
|
250
|
+
items.forEach(function (item) {
|
|
251
|
+
selectedValues[item.label] = false;
|
|
252
|
+
});
|
|
253
|
+
return selectedValues;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
var _useState = React.useState(generateSelectedValuesList()),
|
|
257
|
+
selectedValues = _useState[0],
|
|
258
|
+
setSelectedValues = _useState[1];
|
|
259
|
+
|
|
260
|
+
var handleClick = function handleClick(label) {
|
|
261
|
+
var _extends2;
|
|
262
|
+
|
|
263
|
+
setSelectedValues(_extends({}, selectedValues, (_extends2 = {}, _extends2[label] = !selectedValues[label], _extends2)));
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
React.useEffect(function () {
|
|
267
|
+
if (selectedValues) {
|
|
268
|
+
onChange(selectedValues);
|
|
269
|
+
}
|
|
270
|
+
}, [selectedValues]);
|
|
271
|
+
return React__default.createElement("div", {
|
|
272
|
+
id: "elemento-checkbox"
|
|
273
|
+
}, items == null ? void 0 : items.map(function (element, index) {
|
|
274
|
+
return React__default.createElement("div", {
|
|
275
|
+
key: element.label + "_" + index
|
|
276
|
+
}, React__default.createElement("input", {
|
|
277
|
+
className: "rpgui-checkbox",
|
|
278
|
+
type: "checkbox",
|
|
279
|
+
checked: selectedValues[element.label],
|
|
280
|
+
onChange: function onChange() {}
|
|
281
|
+
}), React__default.createElement("label", {
|
|
282
|
+
onClick: function onClick() {
|
|
283
|
+
return handleClick(element.label);
|
|
284
|
+
}
|
|
285
|
+
}, element.label), React__default.createElement("br", null));
|
|
286
|
+
}));
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
var DraggableContainer = function DraggableContainer(_ref) {
|
|
290
|
+
var children = _ref.children,
|
|
291
|
+
_ref$width = _ref.width,
|
|
292
|
+
width = _ref$width === void 0 ? '50%' : _ref$width,
|
|
293
|
+
height = _ref.height,
|
|
294
|
+
className = _ref.className,
|
|
295
|
+
onCloseButton = _ref.onCloseButton,
|
|
296
|
+
title = _ref.title,
|
|
297
|
+
imgSrc = _ref.imgSrc,
|
|
298
|
+
_ref$imgWidth = _ref.imgWidth,
|
|
299
|
+
imgWidth = _ref$imgWidth === void 0 ? '20px' : _ref$imgWidth;
|
|
300
|
+
return React__default.createElement(Draggable, null, React__default.createElement(Container$2, {
|
|
301
|
+
width: width,
|
|
302
|
+
height: height || 'auto',
|
|
303
|
+
className: "rpgui-container framed-grey " + className + " rpgui-draggable"
|
|
304
|
+
}, imgSrc ? React__default.createElement(Icon, {
|
|
305
|
+
src: imgSrc,
|
|
306
|
+
width: imgWidth
|
|
307
|
+
}) : React__default.createElement(Icon, {
|
|
308
|
+
width: imgWidth
|
|
309
|
+
}), React__default.createElement(Title, null, title), onCloseButton && React__default.createElement(CloseButton$1, {
|
|
310
|
+
onClick: onCloseButton,
|
|
311
|
+
onTouchStart: onCloseButton
|
|
312
|
+
}, "X"), children));
|
|
313
|
+
};
|
|
314
|
+
var Container$2 = /*#__PURE__*/styled.div.withConfig({
|
|
315
|
+
displayName: "DraggableContainer__Container",
|
|
316
|
+
componentId: "sc-184mpyl-0"
|
|
317
|
+
})(["height:", ";width:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;"], function (props) {
|
|
318
|
+
return props.height;
|
|
319
|
+
}, function (_ref2) {
|
|
320
|
+
var width = _ref2.width;
|
|
321
|
+
return width;
|
|
322
|
+
});
|
|
323
|
+
var CloseButton$1 = /*#__PURE__*/styled.div.withConfig({
|
|
324
|
+
displayName: "DraggableContainer__CloseButton",
|
|
325
|
+
componentId: "sc-184mpyl-1"
|
|
326
|
+
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:10px;"]);
|
|
327
|
+
var Title = /*#__PURE__*/styled.div.withConfig({
|
|
328
|
+
displayName: "DraggableContainer__Title",
|
|
329
|
+
componentId: "sc-184mpyl-2"
|
|
330
|
+
})(["position:absolute;top:3px;right:50%;color:white;z-index:22;font-size:10px;"]);
|
|
331
|
+
var Icon = /*#__PURE__*/styled.img.withConfig({
|
|
332
|
+
displayName: "DraggableContainer__Icon",
|
|
333
|
+
componentId: "sc-184mpyl-3"
|
|
334
|
+
})(["position:absolute;top:3px;left:0px;color:white;z-index:22;font-size:10px;width:", ";"], function (props) {
|
|
335
|
+
return props.width;
|
|
336
|
+
});
|
|
337
|
+
|
|
277
338
|
var _RPGUI = RPGUI;
|
|
278
339
|
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
279
340
|
var children = _ref.children;
|
|
@@ -328,7 +389,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
328
389
|
y = _ref.y,
|
|
329
390
|
_ref$fontSize = _ref.fontSize,
|
|
330
391
|
fontSize = _ref$fontSize === void 0 ? 0.8 : _ref$fontSize;
|
|
331
|
-
return React__default.createElement(Container$
|
|
392
|
+
return React__default.createElement(Container$3, {
|
|
332
393
|
x: x,
|
|
333
394
|
y: y,
|
|
334
395
|
fontSize: fontSize
|
|
@@ -346,7 +407,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
346
407
|
}, params.text);
|
|
347
408
|
})));
|
|
348
409
|
};
|
|
349
|
-
var Container$
|
|
410
|
+
var Container$3 = /*#__PURE__*/styled.div.withConfig({
|
|
350
411
|
displayName: "ListMenu__Container",
|
|
351
412
|
componentId: "sc-i9097t-0"
|
|
352
413
|
})(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", "em;}"], function (props) {
|
|
@@ -442,13 +503,13 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
442
503
|
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
443
504
|
};
|
|
444
505
|
}, [chunkIndex]);
|
|
445
|
-
return React__default.createElement(Container$
|
|
506
|
+
return React__default.createElement(Container$4, null, React__default.createElement(DynamicText, {
|
|
446
507
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
447
508
|
onFinish: onEndStep,
|
|
448
509
|
onStart: onStartStep
|
|
449
510
|
}));
|
|
450
511
|
};
|
|
451
|
-
var Container$
|
|
512
|
+
var Container$4 = /*#__PURE__*/styled.div.withConfig({
|
|
452
513
|
displayName: "NPCDialogText__Container",
|
|
453
514
|
componentId: "sc-1cxkdh9-0"
|
|
454
515
|
})([""]);
|
|
@@ -620,7 +681,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
620
681
|
});
|
|
621
682
|
};
|
|
622
683
|
|
|
623
|
-
return React__default.createElement(Container$
|
|
684
|
+
return React__default.createElement(Container$5, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
|
|
624
685
|
text: currentQuestion.text,
|
|
625
686
|
onStart: function onStart() {
|
|
626
687
|
return setCanShowAnswers(false);
|
|
@@ -630,7 +691,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
630
691
|
}
|
|
631
692
|
})), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
632
693
|
};
|
|
633
|
-
var Container$
|
|
694
|
+
var Container$5 = /*#__PURE__*/styled.div.withConfig({
|
|
634
695
|
displayName: "QuestionDialog__Container",
|
|
635
696
|
componentId: "sc-bxc5u0-0"
|
|
636
697
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -694,7 +755,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
694
755
|
}
|
|
695
756
|
})), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer, null, React__default.createElement(NPCThumbnail, {
|
|
696
757
|
src: imagePath || img
|
|
697
|
-
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
758
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$6, null, React__default.createElement(TextContainer$1, {
|
|
698
759
|
flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
699
760
|
}, React__default.createElement(NPCDialogText, {
|
|
700
761
|
onStartStep: function onStartStep() {
|
|
@@ -716,7 +777,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
716
777
|
src: img$1
|
|
717
778
|
})));
|
|
718
779
|
};
|
|
719
|
-
var Container$
|
|
780
|
+
var Container$6 = /*#__PURE__*/styled.div.withConfig({
|
|
720
781
|
displayName: "NPCDialog__Container",
|
|
721
782
|
componentId: "sc-1b4aw74-0"
|
|
722
783
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -763,7 +824,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
763
824
|
return value * 100 / max;
|
|
764
825
|
};
|
|
765
826
|
|
|
766
|
-
return React__default.createElement(Container$
|
|
827
|
+
return React__default.createElement(Container$7, {
|
|
767
828
|
className: "rpgui-progress",
|
|
768
829
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
769
830
|
"data-rpguitype": "progress",
|
|
@@ -792,7 +853,7 @@ var TextOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
|
792
853
|
displayName: "ProgressBar__TextOverlay",
|
|
793
854
|
componentId: "sc-qa6fzh-1"
|
|
794
855
|
})(["width:100%;position:relative;"]);
|
|
795
|
-
var Container$
|
|
856
|
+
var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
796
857
|
displayName: "ProgressBar__Container",
|
|
797
858
|
componentId: "sc-qa6fzh-2"
|
|
798
859
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
|
|
@@ -892,6 +953,76 @@ var Input$1 = /*#__PURE__*/styled.input.withConfig({
|
|
|
892
953
|
componentId: "sc-v8mte9-0"
|
|
893
954
|
})(["opacity:0;"]);
|
|
894
955
|
|
|
956
|
+
const img$2 = require('./imgExp.png');
|
|
957
|
+
|
|
958
|
+
var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
959
|
+
var value = _ref.value,
|
|
960
|
+
_ref$bgColor = _ref.bgColor,
|
|
961
|
+
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor;
|
|
962
|
+
return React__default.createElement(Container$8, null, React__default.createElement(ProgressBarContainer, null, React__default.createElement(BackgroundBar, null, React__default.createElement(Progress, {
|
|
963
|
+
value: value,
|
|
964
|
+
bgColor: bgColor
|
|
965
|
+
}))));
|
|
966
|
+
};
|
|
967
|
+
var Container$8 = /*#__PURE__*/styled.div.withConfig({
|
|
968
|
+
displayName: "SimpleProgressBar__Container",
|
|
969
|
+
componentId: "sc-mbeil3-0"
|
|
970
|
+
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
971
|
+
var BackgroundBar = /*#__PURE__*/styled.span.withConfig({
|
|
972
|
+
displayName: "SimpleProgressBar__BackgroundBar",
|
|
973
|
+
componentId: "sc-mbeil3-1"
|
|
974
|
+
})(["background-color:rgba(0,0,0,0.075);"]);
|
|
975
|
+
var Progress = /*#__PURE__*/styled.span.withConfig({
|
|
976
|
+
displayName: "SimpleProgressBar__Progress",
|
|
977
|
+
componentId: "sc-mbeil3-2"
|
|
978
|
+
})(["background-color:", ";width:", "%;"], function (props) {
|
|
979
|
+
return props.bgColor;
|
|
980
|
+
}, function (props) {
|
|
981
|
+
return props.value;
|
|
982
|
+
});
|
|
983
|
+
var ProgressBarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
984
|
+
displayName: "SimpleProgressBar__ProgressBarContainer",
|
|
985
|
+
componentId: "sc-mbeil3-3"
|
|
986
|
+
})(["border-radius:60px;border:1px solid #282424;overflow:hidden;width:100%;span{display:block;height:100%;}height:8px;"]);
|
|
987
|
+
|
|
988
|
+
var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
989
|
+
var value = _ref.value,
|
|
990
|
+
bgColor = _ref.bgColor,
|
|
991
|
+
titleName = _ref.titleName,
|
|
992
|
+
_ref$logoSrc = _ref.logoSrc,
|
|
993
|
+
logoSrc = _ref$logoSrc === void 0 ? img$2 : _ref$logoSrc;
|
|
994
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, React__default.createElement(TitleName, null, titleName), React__default.createElement(ValueDisplay, null, value)), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, React__default.createElement(Icon$1, {
|
|
995
|
+
src: logoSrc
|
|
996
|
+
})), React__default.createElement(SimpleProgressBar, {
|
|
997
|
+
value: value,
|
|
998
|
+
bgColor: bgColor
|
|
999
|
+
})));
|
|
1000
|
+
};
|
|
1001
|
+
var TitleName = /*#__PURE__*/styled.span.withConfig({
|
|
1002
|
+
displayName: "SkillProgressBar__TitleName",
|
|
1003
|
+
componentId: "sc-5vuroc-0"
|
|
1004
|
+
})(["margin-left:5px;"]);
|
|
1005
|
+
var ValueDisplay = /*#__PURE__*/styled.span.withConfig({
|
|
1006
|
+
displayName: "SkillProgressBar__ValueDisplay",
|
|
1007
|
+
componentId: "sc-5vuroc-1"
|
|
1008
|
+
})([""]);
|
|
1009
|
+
var ProgressIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
1010
|
+
displayName: "SkillProgressBar__ProgressIconContainer",
|
|
1011
|
+
componentId: "sc-5vuroc-2"
|
|
1012
|
+
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
1013
|
+
var ProgressBody = /*#__PURE__*/styled.div.withConfig({
|
|
1014
|
+
displayName: "SkillProgressBar__ProgressBody",
|
|
1015
|
+
componentId: "sc-5vuroc-3"
|
|
1016
|
+
})(["display:flex;flex-direction:row;"]);
|
|
1017
|
+
var ProgressTitle = /*#__PURE__*/styled.div.withConfig({
|
|
1018
|
+
displayName: "SkillProgressBar__ProgressTitle",
|
|
1019
|
+
componentId: "sc-5vuroc-4"
|
|
1020
|
+
})(["width:100%;display:flex;flex-direction:row;justify-content:space-between;span{font-size:0.6rem;}"]);
|
|
1021
|
+
var Icon$1 = /*#__PURE__*/styled.img.withConfig({
|
|
1022
|
+
displayName: "SkillProgressBar__Icon",
|
|
1023
|
+
componentId: "sc-5vuroc-5"
|
|
1024
|
+
})(["margin-right:10px;height:30px;"]);
|
|
1025
|
+
|
|
895
1026
|
var TextArea = function TextArea(_ref) {
|
|
896
1027
|
var props = _extends({}, _ref);
|
|
897
1028
|
|
|
@@ -903,11 +1034,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
903
1034
|
var _ref$maxLines = _ref.maxLines,
|
|
904
1035
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
905
1036
|
children = _ref.children;
|
|
906
|
-
return React__default.createElement(Container$
|
|
1037
|
+
return React__default.createElement(Container$9, {
|
|
907
1038
|
maxLines: maxLines
|
|
908
1039
|
}, children);
|
|
909
1040
|
};
|
|
910
|
-
var Container$
|
|
1041
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
911
1042
|
displayName: "Truncate__Container",
|
|
912
1043
|
componentId: "sc-6x00qb-0"
|
|
913
1044
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
@@ -917,6 +1048,7 @@ var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
|
917
1048
|
exports.Button = Button;
|
|
918
1049
|
exports.Chat = Chat;
|
|
919
1050
|
exports.CheckButton = CheckButton;
|
|
1051
|
+
exports.DraggableContainer = DraggableContainer;
|
|
920
1052
|
exports.Dropdown = Dropdown;
|
|
921
1053
|
exports.DynamicText = DynamicText;
|
|
922
1054
|
exports.Input = Input;
|
|
@@ -928,6 +1060,7 @@ exports.QuestionDialog = QuestionDialog;
|
|
|
928
1060
|
exports.RPGUIContainer = RPGUIContainer;
|
|
929
1061
|
exports.RPGUIRoot = RPGUIRoot;
|
|
930
1062
|
exports.RangeSlider = RangeSlider;
|
|
1063
|
+
exports.SkillProgressBar = SkillProgressBar;
|
|
931
1064
|
exports.TextArea = TextArea;
|
|
932
1065
|
exports.Truncate = Truncate;
|
|
933
1066
|
exports._RPGUI = _RPGUI;
|