@rpg-engine/long-bow 0.2.41 → 0.2.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.2.41",
3
+ "version": "0.2.43",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
+ import { uiFonts } from '../constants/uiFonts';
3
4
 
4
5
  export enum ButtonTypes {
5
6
  RPGUIButton = 'rpgui-button',
@@ -26,5 +27,5 @@ export const Button: React.FC<IButtonProps &
26
27
 
27
28
  const ButtonContainer = styled.button<any>`
28
29
  height: 45px;
29
- font-size: 11.5px;
30
+ font-size: ${uiFonts.size.small};
30
31
  `;
@@ -3,7 +3,8 @@ import dayjs from 'dayjs';
3
3
  import React, { useEffect, useState } from 'react';
4
4
  import { ErrorBoundary } from 'react-error-boundary';
5
5
  import styled from 'styled-components';
6
- import { colors } from '../../constants/uiColors';
6
+ import { uiColors } from '../../constants/uiColors';
7
+ import { uiFonts } from '../../constants/uiFonts';
7
8
  import { Button, ButtonTypes } from '../Button';
8
9
  import { Input } from '../Input';
9
10
  import { RPGUIContainer, RPGUIContainerTypes } from '../RPGUIContainer';
@@ -165,7 +166,7 @@ const CustomContainer = styled(RPGUIContainer)`
165
166
  }
166
167
 
167
168
  .dark-background {
168
- background-color: ${colors.darkGrey} !important;
169
+ background-color: ${uiColors.darkGray} !important;
169
170
  }
170
171
 
171
172
  .chat-body {
@@ -187,7 +188,7 @@ const Form = styled.form`
187
188
  const MessageText = styled.p`
188
189
  display: block !important;
189
190
  width: 100%;
190
- font-size: 0.7rem !important;
191
+ font-size: ${uiFonts.size.xsmall} !important;
191
192
  overflow-y: auto;
192
193
  margin: 0;
193
194
  `;
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import Draggable, { DraggableData } from 'react-draggable';
3
3
  import styled from 'styled-components';
4
+ import { uiFonts } from '../constants/uiFonts';
4
5
  import { useOutsideClick } from '../hooks/useOutsideAlerter';
5
6
  import { IPosition } from '../types/eventTypes';
6
7
  import { RPGUIContainerTypes } from './RPGUIContainer';
@@ -134,7 +135,7 @@ const TitleContainer = styled.div`
134
135
  const Title = styled.h1`
135
136
  color: white;
136
137
  z-index: 22;
137
- font-size: 0.6rem;
138
+ font-size: ${uiFonts.size.large};
138
139
  `;
139
140
 
140
141
  interface ICustomIconProps {
@@ -144,7 +145,7 @@ interface ICustomIconProps {
144
145
  const Icon = styled.img`
145
146
  color: white;
146
147
  z-index: 22;
147
- font-size: 10px;
148
+ font-size: ${uiFonts.size.xsmall};
148
149
  width: ${(props: ICustomIconProps) => props.width};
149
150
  margin-right: 0.5rem;
150
151
  `;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
+ import { uiFonts } from '../../../constants/uiFonts';
3
4
 
4
5
  interface IProps {
5
6
  label: string;
@@ -19,7 +20,7 @@ const Container = styled.div`
19
20
  top: 1rem;
20
21
  left: 4rem;
21
22
 
22
- font-size: 0.5rem;
23
+ font-size: ${uiFonts.size.xxsmall};
23
24
  color: white;
24
25
  background-color: black;
25
26
  border-radius: 5px;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
+ import { uiFonts } from '../constants/uiFonts';
3
4
 
4
5
  interface IListMenuOption {
5
6
  id: string;
@@ -11,7 +12,6 @@ export interface IListMenuProps {
11
12
  y: number;
12
13
  options: IListMenuOption[];
13
14
  onSelected: (selectedOptionId: string) => void;
14
- fontSize?: number;
15
15
  }
16
16
 
17
17
  export const ListMenu: React.FC<IListMenuProps> = ({
@@ -19,10 +19,9 @@ export const ListMenu: React.FC<IListMenuProps> = ({
19
19
  onSelected,
20
20
  x,
21
21
  y,
22
- fontSize = 0.8,
23
22
  }) => {
24
23
  return (
25
- <Container x={x} y={y} fontSize={fontSize}>
24
+ <Container x={x} y={y}>
26
25
  <ul className="rpgui-list-imp" style={{ overflow: 'hidden' }}>
27
26
  {options.map((params, index) => (
28
27
  <ListElement
@@ -42,7 +41,6 @@ export const ListMenu: React.FC<IListMenuProps> = ({
42
41
  interface IContainerProps {
43
42
  x?: number;
44
43
  y?: number;
45
- fontSize?: number;
46
44
  }
47
45
 
48
46
  const Container = styled.div<IContainerProps>`
@@ -56,7 +54,7 @@ const Container = styled.div<IContainerProps>`
56
54
  left: ${props => props.x || 0}px;
57
55
 
58
56
  li {
59
- font-size: ${props => props.fontSize}em;
57
+ font-size: ${uiFonts.size.xsmall};
60
58
  }
61
59
  `;
62
60
 
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
+ import { uiFonts } from '../constants/uiFonts';
3
4
 
4
5
  export interface IBarProps {
5
6
  max: number;
@@ -59,7 +60,7 @@ export const ProgressBar: React.FC<IBarProps> = ({
59
60
  };
60
61
 
61
62
  const ProgressBarText = styled.span`
62
- font-size: 1rem;
63
+ font-size: ${uiFonts.size.small} !important;
63
64
  color: white;
64
65
  text-align: center;
65
66
  z-index: 1;
@@ -1,5 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import styled from 'styled-components';
3
+ import { uiFonts } from '../../constants/uiFonts';
3
4
  import SelectArrow from '../Arrow/SelectArrow';
4
5
  import { Ellipsis } from '../shared/Ellipsis';
5
6
 
@@ -80,6 +81,11 @@ const Item = styled.span`
80
81
  position: absolute;
81
82
  top: 12px;
82
83
  width: 100%;
84
+
85
+ p {
86
+ margin: 0 auto;
87
+ font-size: ${uiFonts.size.small};
88
+ }
83
89
  `;
84
90
 
85
91
  const TextOverlay = styled.div`
@@ -1,6 +1,8 @@
1
1
  import { IQuest } from '@rpg-engine/shared';
2
2
  import React, { useEffect, useState } from 'react';
3
3
  import styled from 'styled-components';
4
+ import { uiColors } from '../../constants/uiColors';
5
+ import { uiFonts } from '../../constants/uiFonts';
4
6
  import SelectArrow from '../Arrow/SelectArrow';
5
7
  import { Button, ButtonTypes } from '../Button';
6
8
  import { DraggableContainer } from '../DraggableContainer';
@@ -198,7 +200,6 @@ const QuestSplitDiv = styled.div`
198
200
  `;
199
201
 
200
202
  const QuestColumn = styled(Column)`
201
- background: #4e4a4e;
202
203
  padding-top: 5px;
203
204
  margin-bottom: 20px;
204
205
  display: flex;
@@ -206,24 +207,26 @@ const QuestColumn = styled(Column)`
206
207
  `;
207
208
 
208
209
  const TitleContainer = styled.div`
209
- background: #4e4a4e;
210
210
  width: 100%;
211
211
  display: flex;
212
212
  flex-wrap: wrap;
213
213
  justify-content: flex-start;
214
214
  align-items: center;
215
+ margin-top: 1rem;
215
216
  `;
216
217
 
217
218
  const Title = styled.h1`
218
219
  color: white;
219
220
  z-index: 22;
220
- font-size: 0.6rem;
221
+ font-size: ${uiFonts.size.medium} !important;
222
+ color: ${uiColors.yellow} !important;
221
223
  `;
222
224
 
223
225
  const Thumbnail = styled.img`
224
226
  color: white;
225
227
  z-index: 22;
226
- font-size: 10px;
227
- width: 64px;
228
+ width: 32px * 1.5;
228
229
  margin-right: 0.5rem;
230
+ position: relative;
231
+ top: -4px;
229
232
  `;
@@ -1,6 +1,7 @@
1
1
  import { IQuest } from '@rpg-engine/shared';
2
2
  import React from 'react';
3
3
  import styled from 'styled-components';
4
+ import { uiFonts } from '../constants/uiFonts';
4
5
  import { DraggableContainer } from './DraggableContainer';
5
6
  import { RPGUIContainerTypes } from './RPGUIContainer';
6
7
 
@@ -72,7 +73,7 @@ const QuestDraggableContainer = styled(DraggableContainer)`
72
73
 
73
74
  const Title = styled.h1`
74
75
  z-index: 22;
75
- font-size: 0.6rem;
76
+ font-size: ${uiFonts.size.medium} !important;
76
77
  color: yellow !important;
77
78
  `;
78
79
 
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
- import { DraggableContainer } from './DraggableContainer';
4
3
  import { v4 as uuidv4 } from 'uuid';
4
+ import { uiFonts } from '../constants/uiFonts';
5
+ import { DraggableContainer } from './DraggableContainer';
5
6
 
6
7
  interface IListMenuOption {
7
8
  id: string;
@@ -56,7 +57,6 @@ const ScrollListContainer = styled(DraggableContainer)`
56
57
 
57
58
  const SkillSplitDiv = styled.div`
58
59
  width: 100%;
59
- font-size: 11px;
60
60
  margin-bottom: 10px;
61
61
  hr {
62
62
  margin: 0px;
@@ -75,4 +75,5 @@ const ListContainer = styled.ul`
75
75
  `;
76
76
  const ListElement = styled.li`
77
77
  margin-right: 0.5rem;
78
+ font-size: ${uiFonts.size.small};
78
79
  `;
@@ -2,7 +2,7 @@ import { ISkill, ISkillDetails } from '@rpg-engine/shared';
2
2
  import _ from 'lodash';
3
3
  import React from 'react';
4
4
  import styled from 'styled-components';
5
- import { colors } from '../constants/uiColors';
5
+ import { uiColors } from '../constants/uiColors';
6
6
  import { DraggableContainer } from './DraggableContainer';
7
7
  import { SkillProgressBar } from './SkillProgressBar';
8
8
 
@@ -15,7 +15,7 @@ export interface ISkillContainerProps {
15
15
 
16
16
  const skillProps = {
17
17
  attributes: {
18
- color: colors.cardinal,
18
+ color: uiColors.purple,
19
19
  values: {
20
20
  stamina: 'spell-icons/regenerate.png',
21
21
  magic: 'spell-icons/fireball.png',
@@ -26,7 +26,7 @@ const skillProps = {
26
26
  },
27
27
  },
28
28
  combat: {
29
- color: colors.purple,
29
+ color: uiColors.cardinal,
30
30
  values: {
31
31
  first: 'gloves/leather-gloves.png',
32
32
  club: 'maces/club.png',
@@ -38,7 +38,7 @@ const skillProps = {
38
38
  },
39
39
  },
40
40
  crafting: {
41
- color: colors.blue,
41
+ color: uiColors.blue,
42
42
  values: {
43
43
  fishing: 'foods/fish.png',
44
44
  mining: 'crafting-resources/iron-ingot.png',
@@ -101,7 +101,7 @@ export const SkillsContainer: React.FC<ISkillContainerProps> = ({
101
101
 
102
102
  <SkillProgressBar
103
103
  skillName={'Level'}
104
- bgColor={colors.navyBlue}
104
+ bgColor={uiColors.navyBlue}
105
105
  level={Math.round(skill.level) || 0}
106
106
  skillPoints={Math.round(skill.experience) || 0}
107
107
  skillPointsToNextLevel={Math.round(skill.xpToNextLevel) || 0}
@@ -2,7 +2,8 @@ import { ITradeResponseItem } from '@rpg-engine/shared';
2
2
  import capitalize from 'lodash/capitalize';
3
3
  import React, { useState } from 'react';
4
4
  import styled from 'styled-components';
5
- import { colors } from '../../constants/uiColors';
5
+ import { uiColors } from '../../constants/uiColors';
6
+ import { uiFonts } from '../../constants/uiFonts';
6
7
  import SelectArrow from '../Arrow/SelectArrow';
7
8
  import { Ellipsis } from '../shared/Ellipsis';
8
9
  import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
@@ -102,7 +103,7 @@ const ItemWrapper = styled.div`
102
103
  margin-bottom: 1rem;
103
104
 
104
105
  &:hover {
105
- background-color: ${colors.darkGrey};
106
+ background-color: ${uiColors.darkGray};
106
107
  }
107
108
  padding: 0.5rem;
108
109
  `;
@@ -133,7 +134,6 @@ const NameValue = styled.div`
133
134
  `;
134
135
 
135
136
  const Item = styled.span`
136
- font-size: 1rem;
137
137
  color: white;
138
138
  text-align: center;
139
139
  z-index: 1;
@@ -165,5 +165,5 @@ const QuantityContainer = styled.div<IContainerProps>`
165
165
  `;
166
166
 
167
167
  const QuantityDisplay = styled.div`
168
- font-size: 0.8rem;
168
+ font-size: ${uiFonts.size.small};
169
169
  `;
@@ -1,10 +1,20 @@
1
- export const colors = {
2
- darkGrey: '#3e3e3e',
1
+ export const uiColors = {
2
+ lightGray: '#757161',
3
+ gray: '#4E4A4E',
4
+ darkGray: '#3e3e3e',
3
5
  darkYellow: '#FFC857',
4
- orange: '#E9724C',
6
+ yellow: '#FFFF00',
7
+ orange: '#D27D2C',
5
8
  cardinal: '#C5283D',
9
+ red: '#D04648',
10
+ darkRed: '#442434',
6
11
  raisinBlack: '#191923',
7
12
  navyBlue: '#0E79B2',
8
- purple: '#8C3D8C',
9
- blue: '#3772FF',
13
+ purple: '#6833A3',
14
+ darkPurple: '#522761',
15
+ blue: '#597DCE',
16
+ darkBlue: '#30346D',
17
+ brown: '#854C30',
18
+ lightGreen: '#6DAA2C',
19
+ brownGreen: '#346524',
10
20
  };
@@ -0,0 +1,12 @@
1
+ export const uiFonts = {
2
+ size: {
3
+ xxsmall: '8px',
4
+ xsmall: '9px',
5
+ small: '12px',
6
+ medium: '14px',
7
+ large: '16px',
8
+ xLarge: '18px',
9
+ xxLarge: '20px',
10
+ xxxLarge: '24px',
11
+ },
12
+ };
Binary file
Binary file