@rpg-engine/long-bow 0.1.794 → 0.2.2
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/LICENSE +20 -20
- package/README.md +181 -181
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Equipment/EquipmentSet.d.ts +5 -3
- package/dist/components/Item/Cards/ItemTooltip.d.ts +6 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +4 -6
- package/dist/components/Item/Inventory/ItemContainerTypes.d.ts +6 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +5 -9
- package/dist/components/Item/Inventory/itemContainerHelper.d.ts +2 -7
- package/dist/components/PropertySelect/PropertySelect.d.ts +12 -0
- package/dist/components/QuestInfo/QuestInfo.d.ts +14 -0
- package/dist/components/RelativeListMenu.d.ts +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +748 -1194
- 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 +748 -1196
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/mocks/equipmentSet.mocks.d.ts +2 -2
- package/dist/stories/Button.stories.d.ts +5 -0
- package/dist/stories/Chat.stories.d.ts +5 -0
- package/dist/stories/CheckButton.stories.d.ts +5 -0
- package/dist/stories/DraggableContainer.stories.d.ts +5 -0
- package/dist/stories/Dropdown.stories.d.ts +5 -0
- package/dist/stories/EquipmentSet.stories.d.ts +5 -0
- package/dist/stories/ItemContainer.stories.d.ts +5 -0
- package/dist/stories/ListMenu.stories.d.ts +5 -0
- package/dist/stories/Multitab.stories.d.ts +6 -0
- package/dist/stories/NPCDialog.stories.d.ts +7 -0
- package/dist/stories/ProgressBar.stories.d.ts +8 -0
- package/dist/stories/PropertySelect.stories.d.ts +5 -0
- package/dist/stories/QuestInfo.stories.d.ts +5 -0
- package/dist/stories/RPGUIContainers.stories.d.ts +5 -0
- package/dist/stories/RadioButton.stories.d.ts +5 -0
- package/dist/stories/RangeSlider.stories.d.ts +5 -0
- package/dist/stories/ScrollList.stories.d.ts +5 -0
- package/dist/stories/SimpleProgressBar.stories.d.ts +5 -0
- package/dist/stories/SkillProgressBar.stories.d.ts +5 -0
- package/dist/stories/SkillsContainer.stories.d.ts +5 -0
- package/dist/stories/Text.stories.d.ts +7 -0
- package/package.json +98 -96
- package/src/components/Abstractions/SlotsContainer.tsx +42 -42
- package/src/components/Button.tsx +30 -29
- package/src/components/Chat/Chat.tsx +193 -193
- package/src/components/CheckButton.tsx +65 -65
- package/src/components/DraggableContainer.tsx +150 -150
- package/src/components/Dropdown.tsx +57 -57
- package/src/components/Equipment/EquipmentSet.tsx +138 -180
- package/src/components/Input.tsx +11 -11
- package/src/components/Item/Cards/ItemTooltip.tsx +32 -0
- package/src/components/Item/Inventory/ItemContainer.tsx +68 -113
- package/src/components/Item/Inventory/ItemContainerTypes.ts +6 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +212 -158
- package/src/components/Item/Inventory/itemContainerHelper.ts +146 -81
- package/src/components/ListMenu.tsx +65 -65
- package/src/components/Multitab/Tab.tsx +57 -57
- package/src/components/Multitab/TabBody.tsx +13 -13
- package/src/components/Multitab/TabsContainer.tsx +97 -97
- package/src/components/NPCDialog/NPCDialog.tsx +145 -145
- package/src/components/NPCDialog/NPCDialogText.tsx +53 -53
- package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +237 -242
- package/src/components/ProgressBar.tsx +91 -91
- package/src/components/PropertySelect/PropertySelect.tsx +101 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow01-left-clicked.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow01-left.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow01-right-clicked.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow01-right.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow02-left-clicked.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow02-left.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow02-right-clicked.png +0 -0
- package/src/components/PropertySelect/img/ui-arrows/arrow02-right.png +0 -0
- package/src/components/QuestInfo/QuestInfo.tsx +143 -0
- package/src/components/QuestInfo/img/default.png +0 -0
- package/src/components/RPGUIContainer.tsx +47 -47
- package/src/components/RPGUIRoot.tsx +14 -14
- package/src/components/RadioButton.tsx +53 -53
- package/src/components/RangeSlider.tsx +68 -68
- package/src/components/RelativeListMenu.tsx +83 -0
- package/src/components/ScrollList.tsx +77 -77
- package/src/components/SimpleProgressBar.tsx +62 -62
- package/src/components/SkillProgressBar.tsx +123 -124
- package/src/components/SkillsContainer.tsx +196 -235
- package/src/components/TextArea.tsx +11 -11
- package/src/components/Truncate.tsx +25 -25
- package/src/components/shared/Column.tsx +16 -16
- package/src/components/shared/SpriteFromAtlas.tsx +99 -99
- package/src/components/typography/DynamicText.tsx +49 -49
- package/src/constants/uiColors.ts +10 -10
- package/src/hooks/useEventListener.ts +21 -21
- package/src/hooks/useOutsideAlerter.ts +25 -25
- package/src/index.tsx +25 -25
- package/src/libs/StringHelpers.ts +3 -3
- package/src/mocks/atlas/icons/icons.json +735 -303
- package/src/mocks/atlas/icons/icons.png +0 -0
- package/src/mocks/atlas/items/items.json +5215 -5195
- package/src/mocks/atlas/items/items.png +0 -0
- package/src/mocks/equipmentSet.mocks.ts +347 -347
- package/src/mocks/itemContainer.mocks.ts +281 -249
- package/src/mocks/skills.mocks.ts +122 -122
- package/src/stories/Button.stories.tsx +36 -0
- package/src/stories/Chat.stories.tsx +170 -0
- package/src/stories/CheckButton.stories.tsx +48 -0
- package/src/stories/DraggableContainer.stories.tsx +28 -0
- package/src/stories/Dropdown.stories.tsx +46 -0
- package/src/stories/EquipmentSet.stories.tsx +51 -0
- package/src/stories/ItemContainer.stories.tsx +51 -0
- package/src/stories/ListMenu.stories.tsx +56 -0
- package/src/stories/Multitab.stories.tsx +51 -0
- package/src/stories/NPCDialog.stories.tsx +130 -0
- package/src/stories/ProgressBar.stories.tsx +23 -0
- package/src/stories/PropertySelect.stories.tsx +41 -0
- package/src/stories/QuestInfo.stories.tsx +76 -0
- package/src/stories/RPGUIContainers.stories.tsx +42 -0
- package/src/stories/RadioButton.stories.tsx +49 -0
- package/src/stories/RangeSlider.stories.tsx +60 -0
- package/src/stories/ScrollList.stories.tsx +85 -0
- package/src/stories/SimpleProgressBar.stories.tsx +22 -0
- package/src/stories/SkillProgressBar.stories.tsx +30 -0
- package/src/stories/SkillsContainer.stories.tsx +31 -0
- package/src/stories/Text.stories.tsx +42 -0
- package/src/types/eventTypes.ts +4 -4
- package/src/types/index.d.ts +2 -2
- package/dist/components/Item/Cards/ItemCard.d.ts +0 -9
- package/dist/components/shared/SpriteIcon.d.ts +0 -9
- package/dist/components/store/UI.store.d.ts +0 -38
- package/src/components/Item/Cards/ItemCard.tsx +0 -36
- package/src/components/shared/SpriteIcon.tsx +0 -67
- package/src/components/store/UI.store.ts +0 -232
|
@@ -1,235 +1,196 @@
|
|
|
1
|
-
import { ISkill } from '@rpg-engine/shared';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<SkillSplitDiv>
|
|
119
|
-
<p>Basic Attributes</p>
|
|
120
|
-
<hr className="golden" />
|
|
121
|
-
</SkillSplitDiv>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
skillPoints={skill?.air?.skillPoints || 0}
|
|
198
|
-
skillPointsToNextLevel={skill?.air?.skillPointsToNextLevel || 0}
|
|
199
|
-
texturePath={'spell-icons/poison-tornado.png'}
|
|
200
|
-
/>
|
|
201
|
-
<SkillProgressBar
|
|
202
|
-
skillName={'Water'}
|
|
203
|
-
bgColor={'red'}
|
|
204
|
-
level={skill?.water?.level || 0}
|
|
205
|
-
skillPoints={skill?.water?.skillPoints || 0}
|
|
206
|
-
skillPointsToNextLevel={skill?.water?.skillPointsToNextLevel || 0}
|
|
207
|
-
texturePath={'spell-icons/tsunami.png'}
|
|
208
|
-
/> */}
|
|
209
|
-
</SkillsDraggableContainer>
|
|
210
|
-
);
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
const SkillsDraggableContainer = styled(DraggableContainer)`
|
|
214
|
-
border: 1px solid black;
|
|
215
|
-
width: 400px;
|
|
216
|
-
height: 800px;
|
|
217
|
-
overflow-y: scroll;
|
|
218
|
-
.DraggableContainer__TitleContainer-sc-184mpyl-2 {
|
|
219
|
-
width: auto;
|
|
220
|
-
height: auto;
|
|
221
|
-
}
|
|
222
|
-
`;
|
|
223
|
-
|
|
224
|
-
const SkillSplitDiv = styled.div`
|
|
225
|
-
width: 100%;
|
|
226
|
-
font-size: 11px;
|
|
227
|
-
margin-top: 10px;
|
|
228
|
-
hr {
|
|
229
|
-
margin: 0px;
|
|
230
|
-
padding: 0px;
|
|
231
|
-
}
|
|
232
|
-
p {
|
|
233
|
-
margin-bottom: 0px;
|
|
234
|
-
}
|
|
235
|
-
`;
|
|
1
|
+
import { ISkill, ISkillDetails } from '@rpg-engine/shared';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { colors } from '../constants/uiColors';
|
|
6
|
+
import { DraggableContainer } from './DraggableContainer';
|
|
7
|
+
import { SkillProgressBar } from './SkillProgressBar';
|
|
8
|
+
|
|
9
|
+
export interface ISkillContainerProps {
|
|
10
|
+
skill: ISkill;
|
|
11
|
+
onCloseButton: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const skillProps = {
|
|
15
|
+
attributes: {
|
|
16
|
+
color: colors.cardinal,
|
|
17
|
+
values: {
|
|
18
|
+
stamina: 'spell-icons/regenerate.png',
|
|
19
|
+
magic: 'spell-icons/fireball.png',
|
|
20
|
+
magicResistance: 'spell-icons/freeze.png',
|
|
21
|
+
strength: 'spell-icons/enchanted-blow.png',
|
|
22
|
+
resistance: 'spell-icons/magic-shield.png',
|
|
23
|
+
dexterity: 'spell-icons/haste.png',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
combat: {
|
|
27
|
+
color: colors.purple,
|
|
28
|
+
values: {
|
|
29
|
+
first: 'gloves/leather-gloves.png',
|
|
30
|
+
club: 'maces/club.png',
|
|
31
|
+
sword: 'swords/double-edged-sword.png',
|
|
32
|
+
axe: 'axes/double-axe.png',
|
|
33
|
+
distance: 'bows/horse-bow.png',
|
|
34
|
+
shielding: 'shields/studded-shield.png',
|
|
35
|
+
dagger: 'daggers/dagger.png',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
crafting: {
|
|
39
|
+
color: colors.blue,
|
|
40
|
+
values: {
|
|
41
|
+
fishing: 'foods/fish.png',
|
|
42
|
+
mining: 'crafting-resources/iron-ingot.png',
|
|
43
|
+
lumberjacking: 'crafting-resources/greater-wood-log.png',
|
|
44
|
+
cooking: 'foods/chickens-meat.png',
|
|
45
|
+
alchemy: 'potions/greater-mana-potion.png',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const SkillsContainer: React.FC<ISkillContainerProps> = ({
|
|
51
|
+
onCloseButton,
|
|
52
|
+
skill,
|
|
53
|
+
}) => {
|
|
54
|
+
const onRenderSkillCategory = (
|
|
55
|
+
category: 'attributes' | 'combat' | 'crafting'
|
|
56
|
+
) => {
|
|
57
|
+
const skillCategory = skillProps[category];
|
|
58
|
+
|
|
59
|
+
const skillCategoryColor = skillCategory.color;
|
|
60
|
+
|
|
61
|
+
const output = [];
|
|
62
|
+
|
|
63
|
+
for (const [key, value] of Object.entries(skillCategory.values)) {
|
|
64
|
+
//@ts-ignore
|
|
65
|
+
const skillDetails = (skill[key] as unknown) as ISkillDetails;
|
|
66
|
+
|
|
67
|
+
output.push(
|
|
68
|
+
<SkillProgressBar
|
|
69
|
+
key={key}
|
|
70
|
+
skillName={_.capitalize(key)}
|
|
71
|
+
bgColor={skillCategoryColor}
|
|
72
|
+
level={skillDetails.level || 0}
|
|
73
|
+
skillPoints={Math.round(skillDetails.skillPoints) || 0}
|
|
74
|
+
skillPointsToNextLevel={
|
|
75
|
+
Math.round(skillDetails.skillPointsToNextLevel) || 0
|
|
76
|
+
}
|
|
77
|
+
texturePath={value}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return output;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<SkillsDraggableContainer title="Skills">
|
|
87
|
+
{onCloseButton && (
|
|
88
|
+
<CloseButton onClick={onCloseButton} onTouchStart={onCloseButton}>
|
|
89
|
+
X
|
|
90
|
+
</CloseButton>
|
|
91
|
+
)}
|
|
92
|
+
<SkillSplitDiv>
|
|
93
|
+
<p>General</p>
|
|
94
|
+
<hr className="golden" />
|
|
95
|
+
|
|
96
|
+
<SkillProgressBar
|
|
97
|
+
skillName={'Level'}
|
|
98
|
+
bgColor={colors.navyBlue}
|
|
99
|
+
level={Math.round(skill.level) || 0}
|
|
100
|
+
skillPoints={Math.round(skill.experience) || 0}
|
|
101
|
+
skillPointsToNextLevel={Math.round(skill.xpToNextLevel) || 0}
|
|
102
|
+
texturePath={'swords/broad-sword.png'}
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<p>Combat Skills</p>
|
|
106
|
+
<hr className="golden" />
|
|
107
|
+
</SkillSplitDiv>
|
|
108
|
+
|
|
109
|
+
{onRenderSkillCategory('combat')}
|
|
110
|
+
|
|
111
|
+
<SkillSplitDiv>
|
|
112
|
+
<p>Crafting Skills</p>
|
|
113
|
+
<hr className="golden" />
|
|
114
|
+
</SkillSplitDiv>
|
|
115
|
+
|
|
116
|
+
{onRenderSkillCategory('crafting')}
|
|
117
|
+
|
|
118
|
+
<SkillSplitDiv>
|
|
119
|
+
<p>Basic Attributes</p>
|
|
120
|
+
<hr className="golden" />
|
|
121
|
+
</SkillSplitDiv>
|
|
122
|
+
|
|
123
|
+
{onRenderSkillCategory('attributes')}
|
|
124
|
+
|
|
125
|
+
{/* <SkillSplitDiv>
|
|
126
|
+
<p>Magic Skills</p>
|
|
127
|
+
<hr className="golden" />
|
|
128
|
+
</SkillSplitDiv>
|
|
129
|
+
<SkillProgressBar
|
|
130
|
+
skillName={'Ice'}
|
|
131
|
+
bgColor={'red'}
|
|
132
|
+
level={skill?.ice?.level || 0}
|
|
133
|
+
skillPoints={skill?.ice?.skillPoints || 0}
|
|
134
|
+
skillPointsToNextLevel={skill?.ice?.skillPointsToNextLevel || 0}
|
|
135
|
+
texturePath={'spell-icons/freeze.png'}
|
|
136
|
+
/>
|
|
137
|
+
<SkillProgressBar
|
|
138
|
+
skillName={'Earth'}
|
|
139
|
+
bgColor={'red'}
|
|
140
|
+
level={skill?.earth?.level || 0}
|
|
141
|
+
skillPoints={skill?.earth?.skillPoints || 0}
|
|
142
|
+
skillPointsToNextLevel={skill?.earth?.skillPointsToNextLevel || 0}
|
|
143
|
+
texturePath={'spell-icons/earth-barrier.png'}
|
|
144
|
+
/>
|
|
145
|
+
<SkillProgressBar
|
|
146
|
+
skillName={'Air'}
|
|
147
|
+
bgColor={'red'}
|
|
148
|
+
level={skill?.air?.level || 0}
|
|
149
|
+
skillPoints={skill?.air?.skillPoints || 0}
|
|
150
|
+
skillPointsToNextLevel={skill?.air?.skillPointsToNextLevel || 0}
|
|
151
|
+
texturePath={'spell-icons/poison-tornado.png'}
|
|
152
|
+
/>
|
|
153
|
+
<SkillProgressBar
|
|
154
|
+
skillName={'Water'}
|
|
155
|
+
bgColor={'red'}
|
|
156
|
+
level={skill?.water?.level || 0}
|
|
157
|
+
skillPoints={skill?.water?.skillPoints || 0}
|
|
158
|
+
skillPointsToNextLevel={skill?.water?.skillPointsToNextLevel || 0}
|
|
159
|
+
texturePath={'spell-icons/tsunami.png'}
|
|
160
|
+
/> */}
|
|
161
|
+
</SkillsDraggableContainer>
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const SkillsDraggableContainer = styled(DraggableContainer)`
|
|
166
|
+
border: 1px solid black;
|
|
167
|
+
width: 400px;
|
|
168
|
+
height: 90%;
|
|
169
|
+
overflow-y: scroll;
|
|
170
|
+
.DraggableContainer__TitleContainer-sc-184mpyl-2 {
|
|
171
|
+
width: auto;
|
|
172
|
+
height: auto;
|
|
173
|
+
}
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
const SkillSplitDiv = styled.div`
|
|
177
|
+
width: 100%;
|
|
178
|
+
font-size: 11px;
|
|
179
|
+
hr {
|
|
180
|
+
margin: 0;
|
|
181
|
+
margin-bottom: 1rem;
|
|
182
|
+
padding: 0px;
|
|
183
|
+
}
|
|
184
|
+
p {
|
|
185
|
+
margin-bottom: 0px;
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
|
|
189
|
+
const CloseButton = styled.div`
|
|
190
|
+
position: absolute;
|
|
191
|
+
top: 2px;
|
|
192
|
+
right: 2px;
|
|
193
|
+
color: white;
|
|
194
|
+
z-index: 22;
|
|
195
|
+
font-size: 0.7rem;
|
|
196
|
+
`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ITextArea
|
|
4
|
-
extends React.DetailedHTMLProps<
|
|
5
|
-
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
6
|
-
HTMLTextAreaElement
|
|
7
|
-
> {}
|
|
8
|
-
|
|
9
|
-
export const TextArea: React.FC<ITextArea> = ({ ...props }) => {
|
|
10
|
-
return <textarea {...props} />;
|
|
11
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ITextArea
|
|
4
|
+
extends React.DetailedHTMLProps<
|
|
5
|
+
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
6
|
+
HTMLTextAreaElement
|
|
7
|
+
> {}
|
|
8
|
+
|
|
9
|
+
export const TextArea: React.FC<ITextArea> = ({ ...props }) => {
|
|
10
|
+
return <textarea {...props} />;
|
|
11
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/* eslint-disable react/require-default-props */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
interface IProps {
|
|
6
|
-
maxLines?: number;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Truncate: React.FC<IProps> = ({ maxLines = 1, children }) => {
|
|
11
|
-
return <Container maxLines={maxLines}>{children}</Container>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
interface IContainerProps {
|
|
15
|
-
maxLines: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Container = styled.div<IContainerProps>`
|
|
19
|
-
display: -webkit-box;
|
|
20
|
-
max-width: 100%;
|
|
21
|
-
max-height: 100%;
|
|
22
|
-
-webkit-line-clamp: ${props => props.maxLines};
|
|
23
|
-
-webkit-box-orient: vertical;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`;
|
|
1
|
+
/* eslint-disable react/require-default-props */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
interface IProps {
|
|
6
|
+
maxLines?: number;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Truncate: React.FC<IProps> = ({ maxLines = 1, children }) => {
|
|
11
|
+
return <Container maxLines={maxLines}>{children}</Container>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
interface IContainerProps {
|
|
15
|
+
maxLines: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Container = styled.div<IContainerProps>`
|
|
19
|
+
display: -webkit-box;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
max-height: 100%;
|
|
22
|
+
-webkit-line-clamp: ${props => props.maxLines};
|
|
23
|
+
-webkit-box-orient: vertical;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
`;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
interface IColumn {
|
|
4
|
-
flex?: number;
|
|
5
|
-
alignItems?: string;
|
|
6
|
-
justifyContent?: string;
|
|
7
|
-
flexWrap?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Column = styled.div<IColumn>`
|
|
11
|
-
flex: ${props => props.flex || 'auto'};
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-wrap: ${props => props.flexWrap || 'nowrap'};
|
|
14
|
-
align-items: ${props => props.alignItems || 'flex-start'};
|
|
15
|
-
justify-content: ${props => props.justifyContent || 'flex-start'};
|
|
16
|
-
`;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
interface IColumn {
|
|
4
|
+
flex?: number;
|
|
5
|
+
alignItems?: string;
|
|
6
|
+
justifyContent?: string;
|
|
7
|
+
flexWrap?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Column = styled.div<IColumn>`
|
|
11
|
+
flex: ${props => props.flex || 'auto'};
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-wrap: ${props => props.flexWrap || 'nowrap'};
|
|
14
|
+
align-items: ${props => props.alignItems || 'flex-start'};
|
|
15
|
+
justify-content: ${props => props.justifyContent || 'flex-start'};
|
|
16
|
+
`;
|