@rpg-engine/long-bow 0.3.43 → 0.3.44

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.
Files changed (115) hide show
  1. package/dist/components/Abstractions/SlotsContainer.d.ts +0 -1
  2. package/dist/components/Button.d.ts +2 -3
  3. package/dist/components/Chat/Chat.d.ts +2 -12
  4. package/dist/components/CheckButton.d.ts +2 -1
  5. package/dist/components/DraggableContainer.d.ts +0 -1
  6. package/dist/components/Equipment/EquipmentSet.d.ts +0 -8
  7. package/dist/components/Input.d.ts +0 -1
  8. package/dist/components/Item/Inventory/ItemContainer.d.ts +0 -12
  9. package/dist/components/Item/Inventory/ItemSlot.d.ts +0 -9
  10. package/dist/components/NPCDialog/NPCDialogText.d.ts +2 -4
  11. package/dist/components/RangeSlider.d.ts +0 -1
  12. package/dist/index.d.ts +0 -8
  13. package/dist/long-bow.cjs.development.js +515 -7465
  14. package/dist/long-bow.cjs.development.js.map +1 -1
  15. package/dist/long-bow.cjs.production.min.js +1 -1
  16. package/dist/long-bow.cjs.production.min.js.map +1 -1
  17. package/dist/long-bow.esm.js +520 -7461
  18. package/dist/long-bow.esm.js.map +1 -1
  19. package/dist/mocks/equipmentSet.mocks.d.ts +2 -15
  20. package/dist/mocks/skills.mocks.d.ts +121 -2
  21. package/package.json +2 -5
  22. package/src/components/Abstractions/SlotsContainer.tsx +0 -3
  23. package/src/components/Button.tsx +8 -18
  24. package/src/components/Chat/Chat.tsx +105 -106
  25. package/src/components/CheckButton.tsx +1 -1
  26. package/src/components/DraggableContainer.tsx +1 -4
  27. package/src/components/Dropdown.tsx +1 -7
  28. package/src/components/Equipment/EquipmentSet.tsx +0 -46
  29. package/src/components/Input.tsx +2 -6
  30. package/src/components/Item/Inventory/ItemContainer.tsx +6 -104
  31. package/src/components/Item/Inventory/ItemSlot.tsx +34 -234
  32. package/src/components/NPCDialog/NPCDialog.tsx +28 -4
  33. package/src/components/NPCDialog/NPCDialogText.tsx +15 -75
  34. package/src/components/RangeSlider.tsx +14 -37
  35. package/src/components/SkillsContainer.tsx +1 -1
  36. package/src/components/TimeWidget/TimeWidget.tsx +0 -1
  37. package/src/components/TradingMenu/TradingItemRow.tsx +6 -43
  38. package/src/components/TradingMenu/TradingMenu.tsx +1 -1
  39. package/src/components/TradingMenu/items.mock.ts +0 -1
  40. package/src/components/shared/SpriteFromAtlas.tsx +1 -4
  41. package/src/hooks/useOutsideAlerter.ts +2 -2
  42. package/src/index.tsx +0 -8
  43. package/src/mocks/atlas/items/items.json +314 -6086
  44. package/src/mocks/atlas/items/items.png +0 -0
  45. package/src/mocks/equipmentSet.mocks.ts +4 -49
  46. package/src/mocks/itemContainer.mocks.ts +6 -54
  47. package/src/mocks/skills.mocks.ts +2 -8
  48. package/src/stories/Chat.stories.tsx +3 -20
  49. package/src/stories/EquipmentSet.stories.tsx +0 -10
  50. package/src/stories/ItemContainer.stories.tsx +15 -84
  51. package/src/stories/RangeSlider.stories.tsx +9 -10
  52. package/dist/components/CaracterStatus/CaracterStatus.d.ts +0 -9
  53. package/dist/components/Chatdeprecated/ChatDeprecated.d.ts +0 -13
  54. package/dist/components/CircularController/CircularController.d.ts +0 -10
  55. package/dist/components/CraftBook/CraftBook.d.ts +0 -15
  56. package/dist/components/CraftBook/MockItems.d.ts +0 -2
  57. package/dist/components/DropdownSelectorContainer.d.ts +0 -13
  58. package/dist/components/Item/Inventory/ItemQuantitySelector.d.ts +0 -7
  59. package/dist/components/RadioInput/RadioButton.d.ts +0 -8
  60. package/dist/components/RadioInput/RadioInput.d.ts +0 -13
  61. package/dist/components/RadioInput/instruments.d.ts +0 -4
  62. package/dist/components/Spellbook/QuickSpells.d.ts +0 -10
  63. package/dist/components/Spellbook/Spell.d.ts +0 -11
  64. package/dist/components/Spellbook/Spellbook.d.ts +0 -15
  65. package/dist/components/Spellbook/SpellbookShortcuts.d.ts +0 -10
  66. package/dist/components/Spellbook/constants.d.ts +0 -3
  67. package/dist/components/Spellbook/mockSpells.d.ts +0 -2
  68. package/dist/components/itemSelector/ItemSelector.d.ts +0 -14
  69. package/dist/constants/uiDevices.d.ts +0 -1
  70. package/dist/stories/CaracterStatus.stories.d.ts +0 -5
  71. package/dist/stories/ChatDeprecated.stories.d.ts +0 -5
  72. package/dist/stories/CircullarController.stories.d.ts +0 -5
  73. package/dist/stories/CraftBook.stories.d.ts +0 -4
  74. package/dist/stories/DropdownSelectorContainer.stories.d.ts +0 -5
  75. package/dist/stories/ItemQuantitySelector.stories.d.ts +0 -5
  76. package/dist/stories/ItemSelector.stories.d.ts +0 -4
  77. package/dist/stories/QuickSpells.stories.d.ts +0 -5
  78. package/dist/stories/RadioInput.stories.d.ts +0 -5
  79. package/dist/stories/Spellbook.stories.d.ts +0 -5
  80. package/src/.DS_Store +0 -0
  81. package/src/components/.DS_Store +0 -0
  82. package/src/components/CaracterStatus/CaracterStatus.tsx +0 -86
  83. package/src/components/CaracterStatus/Character.png +0 -0
  84. package/src/components/Chatdeprecated/ChatDeprecated.tsx +0 -200
  85. package/src/components/CircularController/CircularController.tsx +0 -162
  86. package/src/components/CraftBook/CraftBook.tsx +0 -230
  87. package/src/components/CraftBook/MockItems.ts +0 -46
  88. package/src/components/DropdownSelectorContainer.tsx +0 -42
  89. package/src/components/Item/Inventory/ItemQuantitySelector.tsx +0 -142
  90. package/src/components/NPCDialog/.DS_Store +0 -0
  91. package/src/components/NPCDialog/img/.DS_Store +0 -0
  92. package/src/components/NPCDialog/img/press-button.gif +0 -0
  93. package/src/components/RadioInput/RadioButton.tsx +0 -98
  94. package/src/components/RadioInput/RadioInput.tsx +0 -99
  95. package/src/components/RadioInput/instruments.ts +0 -16
  96. package/src/components/Spellbook/QuickSpells.tsx +0 -120
  97. package/src/components/Spellbook/Spell.tsx +0 -201
  98. package/src/components/Spellbook/Spellbook.tsx +0 -144
  99. package/src/components/Spellbook/SpellbookShortcuts.tsx +0 -77
  100. package/src/components/Spellbook/constants.ts +0 -12
  101. package/src/components/Spellbook/mockSpells.ts +0 -60
  102. package/src/components/itemSelector/ItemSelector.tsx +0 -136
  103. package/src/constants/uiDevices.ts +0 -5
  104. package/src/mocks/.DS_Store +0 -0
  105. package/src/mocks/atlas/.DS_Store +0 -0
  106. package/src/stories/CaracterStatus.stories.tsx +0 -29
  107. package/src/stories/ChatDeprecated.stories.tsx +0 -170
  108. package/src/stories/CircullarController.stories.tsx +0 -33
  109. package/src/stories/CraftBook.stories.tsx +0 -40
  110. package/src/stories/DropdownSelectorContainer.stories.tsx +0 -41
  111. package/src/stories/ItemQuantitySelector.stories.tsx +0 -26
  112. package/src/stories/ItemSelector.stories.tsx +0 -77
  113. package/src/stories/QuickSpells.stories.tsx +0 -38
  114. package/src/stories/RadioInput.stories.tsx +0 -35
  115. package/src/stories/Spellbook.stories.tsx +0 -107
@@ -1,16 +1,3 @@
1
- import { IEquipmentSet, IItem } from '@rpg-engine/shared';
2
- interface IEquipmentSetItems {
3
- leftHand: IItem;
4
- head: IItem;
5
- armor: IItem;
6
- legs: IItem;
7
- boot: IItem;
8
- neck: IItem;
9
- ring: IItem;
10
- accessory: IItem;
11
- inventory: IItem;
12
- rightHand: IItem;
13
- }
14
- export declare const items: IEquipmentSetItems;
1
+ import { IEquipmentSet } from '@rpg-engine/shared';
2
+ export declare const items: any;
15
3
  export declare const equipmentSetMock: IEquipmentSet;
16
- export {};
@@ -1,2 +1,121 @@
1
- import { ISkill } from '@rpg-engine/shared';
2
- export declare const skillMock: ISkill;
1
+ import { SkillType } from '@rpg-engine/shared';
2
+ export declare const skillMock: {
3
+ _id: string;
4
+ stamina: {
5
+ type: SkillType;
6
+ level: number;
7
+ skillPoints: number;
8
+ skillPointsToNextLevel: number;
9
+ };
10
+ magic: {
11
+ type: SkillType;
12
+ level: number;
13
+ skillPoints: number;
14
+ skillPointsToNextLevel: number;
15
+ };
16
+ magicResistance: {
17
+ type: SkillType;
18
+ level: number;
19
+ skillPoints: number;
20
+ skillPointsToNextLevel: number;
21
+ };
22
+ strength: {
23
+ type: SkillType;
24
+ level: number;
25
+ skillPoints: number;
26
+ skillPointsToNextLevel: number;
27
+ };
28
+ resistance: {
29
+ type: SkillType;
30
+ level: number;
31
+ skillPoints: number;
32
+ skillPointsToNextLevel: number;
33
+ };
34
+ dexterity: {
35
+ type: SkillType;
36
+ level: number;
37
+ skillPoints: number;
38
+ skillPointsToNextLevel: number;
39
+ };
40
+ first: {
41
+ type: SkillType;
42
+ level: number;
43
+ skillPoints: number;
44
+ skillPointsToNextLevel: number;
45
+ };
46
+ club: {
47
+ type: SkillType;
48
+ level: number;
49
+ skillPoints: number;
50
+ skillPointsToNextLevel: number;
51
+ };
52
+ sword: {
53
+ type: SkillType;
54
+ level: number;
55
+ skillPoints: number;
56
+ skillPointsToNextLevel: number;
57
+ };
58
+ dagger: {
59
+ type: SkillType;
60
+ level: number;
61
+ skillPoints: number;
62
+ skillPointsToNextLevel: number;
63
+ };
64
+ axe: {
65
+ type: SkillType;
66
+ level: number;
67
+ skillPoints: number;
68
+ skillPointsToNextLevel: number;
69
+ };
70
+ distance: {
71
+ type: SkillType;
72
+ level: number;
73
+ skillPoints: number;
74
+ skillPointsToNextLevel: number;
75
+ };
76
+ shielding: {
77
+ type: SkillType;
78
+ level: number;
79
+ skillPoints: number;
80
+ skillPointsToNextLevel: number;
81
+ };
82
+ fishing: {
83
+ type: SkillType;
84
+ level: number;
85
+ skillPoints: number;
86
+ skillPointsToNextLevel: number;
87
+ };
88
+ mining: {
89
+ type: SkillType;
90
+ level: number;
91
+ skillPoints: number;
92
+ skillPointsToNextLevel: number;
93
+ };
94
+ lumberjacking: {
95
+ type: SkillType;
96
+ level: number;
97
+ skillPoints: number;
98
+ skillPointsToNextLevel: number;
99
+ };
100
+ cooking: {
101
+ type: SkillType;
102
+ level: number;
103
+ skillPoints: number;
104
+ skillPointsToNextLevel: number;
105
+ };
106
+ alchemy: {
107
+ type: SkillType;
108
+ level: number;
109
+ skillPoints: number;
110
+ skillPointsToNextLevel: number;
111
+ };
112
+ level: number;
113
+ xpGainRate: number;
114
+ experience: number;
115
+ xpToNextLevel: number;
116
+ ownerType: string;
117
+ owner: string;
118
+ createdAt: string;
119
+ updatedAt: string;
120
+ __v: number;
121
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.3.43",
3
+ "version": "0.3.44",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -83,18 +83,15 @@
83
83
  },
84
84
  "dependencies": {
85
85
  "@rollup/plugin-image": "^2.1.1",
86
- "@rpg-engine/shared": "^0.6.73",
86
+ "@rpg-engine/shared": "^0.6.79",
87
87
  "dayjs": "^1.11.2",
88
- "font-awesome": "^4.7.0",
89
88
  "fs-extra": "^10.1.0",
90
- "is-mobile": "^3.1.1",
91
89
  "lodash": "^4.17.21",
92
90
  "lodash-es": "^4.17.21",
93
91
  "mobx": "^6.6.0",
94
92
  "mobx-react": "^7.5.0",
95
93
  "react-draggable": "^4.4.5",
96
94
  "react-error-boundary": "^3.1.4",
97
- "react-icons": "^4.7.1",
98
95
  "rollup-plugin-image-files": "^1.4.2",
99
96
  "rpgui": "^1.0.3"
100
97
  }
@@ -9,7 +9,6 @@ interface IProps {
9
9
  onClose?: () => void;
10
10
  onPositionChange?: (position: IPosition) => void;
11
11
  onOutsideClick?: () => void;
12
- initialPosition?: IPosition;
13
12
  }
14
13
 
15
14
  export const SlotsContainer: React.FC<IProps> = ({
@@ -18,7 +17,6 @@ export const SlotsContainer: React.FC<IProps> = ({
18
17
  onClose,
19
18
  onPositionChange,
20
19
  onOutsideClick,
21
- initialPosition,
22
20
  }) => {
23
21
  return (
24
22
  <DraggableContainer
@@ -37,7 +35,6 @@ export const SlotsContainer: React.FC<IProps> = ({
37
35
  }
38
36
  }}
39
37
  onOutsideClick={onOutsideClick}
40
- initialPosition={initialPosition}
41
38
  >
42
39
  {children}
43
40
  </DraggableContainer>
@@ -7,35 +7,25 @@ export enum ButtonTypes {
7
7
  RPGUIGoldButton = 'rpgui-button golden',
8
8
  }
9
9
 
10
- export interface IButtonProps
11
- extends React.ButtonHTMLAttributes<HTMLButtonElement> {
10
+ export interface IButtonProps {
12
11
  disabled?: boolean;
13
12
  children: React.ReactNode;
14
13
  buttonType: ButtonTypes;
15
- onClick?: (e: any) => void;
16
14
  }
17
15
 
18
- export const Button = ({
19
- disabled = false,
20
- children,
21
- buttonType,
22
- onClick,
23
- ...props
24
- }: IButtonProps) => {
16
+ export const Button: React.FC<IButtonProps &
17
+ React.DetailedHTMLProps<
18
+ React.ButtonHTMLAttributes<HTMLButtonElement>,
19
+ HTMLButtonElement
20
+ >> = ({ disabled = false, children, buttonType, ...props }) => {
25
21
  return (
26
- <ButtonContainer
27
- className={`${buttonType}`}
28
- disabled={disabled}
29
- {...props}
30
- onTouchStart={onClick}
31
- onClick={onClick}
32
- >
22
+ <ButtonContainer className={`${buttonType}`} disabled={disabled} {...props}>
33
23
  <p>{children}</p>
34
24
  </ButtonContainer>
35
25
  );
36
26
  };
37
27
 
38
- const ButtonContainer = styled.button`
28
+ const ButtonContainer = styled.button<any>`
39
29
  height: 45px;
40
30
  font-size: ${uiFonts.size.small};
41
31
  `;
@@ -2,46 +2,34 @@ import { IChatMessage } from '@rpg-engine/shared';
2
2
  import dayjs from 'dayjs';
3
3
  import React, { useEffect, useState } from 'react';
4
4
  import { ErrorBoundary } from 'react-error-boundary';
5
- import { RxPaperPlane } from 'react-icons/rx';
6
5
  import styled from 'styled-components';
6
+ import { uiColors } from '../../constants/uiColors';
7
+ import { uiFonts } from '../../constants/uiFonts';
8
+ import { Button, ButtonTypes } from '../Button';
9
+ import { Input } from '../Input';
10
+ import { RPGUIContainer, RPGUIContainerTypes } from '../RPGUIContainer';
7
11
  import { Column } from '../shared/Column';
8
12
 
9
13
  interface IEmitter {
10
14
  _id: string;
11
15
  name: string;
12
16
  }
13
-
14
- interface IStyles {
15
- textColor?: string;
16
- buttonColor?: string;
17
- buttonBackgroundColor?: string;
18
- width?: string;
19
- height?: string;
20
- }
21
-
22
17
  export interface IChatProps {
23
18
  chatMessages: IChatMessage[];
24
19
  onSendChatMessage: (message: string) => void;
25
20
  onCloseButton: () => void;
26
- onFocus?: () => void;
27
- onBlur?: () => void;
28
21
  opacity?: number;
29
- sendMessage: boolean;
30
- styles?: IStyles;
22
+ width?: string;
23
+ height?: string;
31
24
  }
32
25
 
33
26
  export const Chat: React.FC<IChatProps> = ({
34
27
  chatMessages,
35
28
  onSendChatMessage,
36
- onFocus,
37
- onBlur,
38
- styles = {
39
- textColor: '#c65102',
40
- buttonColor: '#005b96',
41
- buttonBackgroundColor: 'rgba(0,0,0,.2)',
42
- width: '80%',
43
- height: 'auto',
44
- },
29
+ opacity = 1,
30
+ width = '100%',
31
+ height = '250px',
32
+ onCloseButton,
45
33
  }) => {
46
34
  const [message, setMessage] = useState('');
47
35
 
@@ -82,103 +70,114 @@ export const Chat: React.FC<IChatProps> = ({
82
70
  const onRenderChatMessages = (chatMessages: IChatMessage[]) => {
83
71
  return chatMessages?.length ? (
84
72
  chatMessages?.map(({ _id, createdAt, emitter, message }, index) => (
85
- <Message color={styles?.textColor || '#c65102'} key={`${_id}_${index}`}>
86
- {onRenderMessageLines(emitter, createdAt as string, message)}
87
- </Message>
73
+ <MessageText key={`${_id}_${index}`}>
74
+ {onRenderMessageLines(emitter, createdAt, message)}
75
+ </MessageText>
88
76
  ))
89
77
  ) : (
90
- <Message color={styles?.textColor || '#c65102'}>
91
- No messages available.
92
- </Message>
78
+ <MessageText>No messages available.</MessageText>
93
79
  );
94
80
  };
95
81
 
96
82
  return (
97
- <ChatContainer
98
- width={styles?.width || '80%'}
99
- height={styles?.height || 'auto'}
100
- >
101
- <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>
102
- <MessagesContainer className="chat-body">
103
- {onRenderChatMessages(chatMessages)}
104
- </MessagesContainer>
105
-
106
- <Form onSubmit={handleSubmit}>
107
- <Column flex={70}>
108
- <TextField
109
- value={message}
110
- id="inputMessage"
111
- onChange={e => getInputValue(e.target.value)}
112
- height={20}
113
- type="text"
114
- autoComplete="off"
115
- onFocus={onFocus}
116
- onBlur={onBlur}
117
- onTouchStart={onFocus}
118
- autoFocus
119
- />
120
- </Column>
121
- <Column justifyContent="flex-end">
122
- <Button
123
- buttonColor={styles?.buttonColor || '#005b96'}
124
- buttonBackgroundColor={
125
- styles?.buttonBackgroundColor || 'rgba(0,0,0,.5)'
126
- }
127
- id="chat-send-button"
128
- style={{ borderRadius: '20%' }}
129
- >
130
- <RxPaperPlane size={15} />
131
- </Button>
132
- </Column>
133
- </Form>
134
- </ErrorBoundary>
135
- </ChatContainer>
83
+ <Container>
84
+ <CustomContainer
85
+ type={RPGUIContainerTypes.FramedGrey}
86
+ width={width}
87
+ height={height}
88
+ className="chat-container"
89
+ opacity={opacity}
90
+ >
91
+ <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>
92
+ {onCloseButton && (
93
+ <CloseButton onClick={onCloseButton} onTouchStart={onCloseButton}>
94
+ X
95
+ </CloseButton>
96
+ )}
97
+ <RPGUIContainer
98
+ type={RPGUIContainerTypes.FramedGrey}
99
+ width={'100%'}
100
+ height={'80%'}
101
+ className="chat-body dark-background"
102
+ >
103
+ {onRenderChatMessages(chatMessages)}
104
+ </RPGUIContainer>
105
+
106
+ <Form onSubmit={handleSubmit}>
107
+ <Column flex={70}>
108
+ <CustomInput
109
+ value={message}
110
+ id="inputMessage"
111
+ onChange={e => getInputValue(e.target.value)}
112
+ height={20}
113
+ className="chat-input dark-background"
114
+ type="text"
115
+ autoComplete="off"
116
+ />
117
+ </Column>
118
+ <Column justifyContent="flex-end">
119
+ <Button
120
+ buttonType={ButtonTypes.RPGUIButton}
121
+ id="chat-send-button"
122
+ >
123
+ Send
124
+ </Button>
125
+ </Column>
126
+ </Form>
127
+ </ErrorBoundary>
128
+ </CustomContainer>
129
+ </Container>
136
130
  );
137
131
  };
138
132
 
139
- interface IContainerProps {
140
- width: string;
141
- height: string;
142
- }
143
-
144
- interface IMessageProps {
145
- color: string;
146
- }
147
-
148
- interface IButtonProps {
149
- buttonColor: string;
150
- buttonBackgroundColor: string;
151
- }
133
+ const Container = styled.div`
134
+ position: relative;
135
+ `;
152
136
 
153
- const ChatContainer = styled.div<IContainerProps>`
154
- height: ${props => props.height};
155
- width: ${({ width }) => width};
156
- padding: 10px;
157
- background-color: rgba(0, 0, 0, 0.2);
158
- height: auto;
137
+ const CloseButton = styled.div`
138
+ position: absolute;
139
+ top: 2px;
140
+ right: 0px;
141
+ color: white;
142
+ z-index: 22;
143
+ font-size: 0.7rem;
159
144
  `;
160
145
 
161
- const TextField = styled.input`
146
+ const CustomInput = styled(Input)`
147
+ height: 30px;
162
148
  width: 100%;
163
- background-color: rgba(0, 0, 0, 0.25) !important;
164
- border: none !important;
165
- max-height: 28px !important;
149
+
150
+ .rpgui-content .input {
151
+ min-height: 39px;
152
+ }
166
153
  `;
167
154
 
168
- const MessagesContainer = styled.div`
169
- height: 70%;
170
- margin-bottom: 10px;
155
+ interface ICustomContainerProps {
156
+ opacity: number;
157
+ }
158
+
159
+ const CustomContainer = styled(RPGUIContainer)`
160
+ display: block;
161
+
162
+ opacity: ${(props: ICustomContainerProps) => props.opacity};
163
+
164
+ &:hover {
165
+ opacity: 1;
166
+ }
167
+
168
+ .dark-background {
169
+ background-color: ${uiColors.darkGray} !important;
170
+ }
171
+
171
172
  .chat-body {
172
- max-height: auto;
173
+ &.rpgui-container.framed-grey {
174
+ background: unset;
175
+ }
176
+ max-height: 170px;
173
177
  overflow-y: auto;
174
178
  }
175
179
  `;
176
180
 
177
- const Message = styled.div<IMessageProps>`
178
- margin-bottom: 8px;
179
- color: ${({ color }) => color};
180
- `;
181
-
182
181
  const Form = styled.form`
183
182
  display: flex;
184
183
  width: 100%;
@@ -186,10 +185,10 @@ const Form = styled.form`
186
185
  align-items: center;
187
186
  `;
188
187
 
189
- const Button = styled.button<IButtonProps>`
190
- color: ${({ buttonColor }) => buttonColor};
191
- background-color: ${({ buttonBackgroundColor }) => buttonBackgroundColor};
192
- width: 28px;
193
- height: 28px;
194
- border: none !important;
188
+ const MessageText = styled.p`
189
+ display: block !important;
190
+ width: 100%;
191
+ font-size: ${uiFonts.size.xsmall} !important;
192
+ overflow-y: auto;
193
+ margin: 0;
195
194
  `;
@@ -10,7 +10,7 @@ export interface ICheckProps {
10
10
  onChange: (selectedValues: IChecklistSelectedValues) => void;
11
11
  }
12
12
 
13
- export interface IChecklistSelectedValues {
13
+ interface IChecklistSelectedValues {
14
14
  [label: string]: boolean;
15
15
  }
16
16
 
@@ -19,7 +19,6 @@ export interface IDraggableContainerProps {
19
19
  cancelDrag?: string;
20
20
  onPositionChange?: (position: IPosition) => void;
21
21
  onOutsideClick?: () => void;
22
- initialPosition?: IPosition;
23
22
  }
24
23
 
25
24
  export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
@@ -35,7 +34,6 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
35
34
  cancelDrag,
36
35
  onPositionChange,
37
36
  onOutsideClick,
38
- initialPosition = { x: 0, y: 0 },
39
37
  }) => {
40
38
  const draggableRef = useRef(null);
41
39
 
@@ -68,7 +66,6 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
68
66
  });
69
67
  }
70
68
  }}
71
- defaultPosition={initialPosition}
72
69
  >
73
70
  <Container
74
71
  ref={draggableRef}
@@ -123,7 +120,7 @@ const CloseButton = styled.div`
123
120
  right: 0px;
124
121
  color: white;
125
122
  z-index: 22;
126
- font-size: 1.1rem;
123
+ font-size: 0.8rem;
127
124
  `;
128
125
 
129
126
  const TitleContainer = styled.div`
@@ -28,7 +28,7 @@ export const Dropdown: React.FC<IDropdownProps> = ({
28
28
  useEffect(() => {
29
29
  const firstOption = options[0];
30
30
 
31
- if (firstOption && !selectedValue) {
31
+ if (firstOption) {
32
32
  setSelectedValue(firstOption.value);
33
33
  setSelectedOption(firstOption.option);
34
34
  }
@@ -46,7 +46,6 @@ export const Dropdown: React.FC<IDropdownProps> = ({
46
46
  id={`dropdown-${dropdownId}`}
47
47
  className="rpgui-dropdown-imp rpgui-dropdown-imp-header"
48
48
  onClick={() => setOpened(prev => !prev)}
49
- onTouchStart={() => setOpened(prev => !prev)}
50
49
  >
51
50
  <label>▼</label> {selectedOption}
52
51
  </DropdownSelect>
@@ -61,11 +60,6 @@ export const Dropdown: React.FC<IDropdownProps> = ({
61
60
  setSelectedOption(option.option);
62
61
  setOpened(false);
63
62
  }}
64
- onTouchStart={() => {
65
- setSelectedValue(option.value);
66
- setSelectedOption(option.option);
67
- setOpened(false);
68
- }}
69
63
  >
70
64
  {option.option}
71
65
  </li>
@@ -8,7 +8,6 @@ import {
8
8
  } from '@rpg-engine/shared';
9
9
  import React from 'react';
10
10
  import styled from 'styled-components';
11
- import { IPosition } from '../../types/eventTypes';
12
11
  import { DraggableContainer } from '../DraggableContainer';
13
12
  import { ItemSlot } from '../Item/Inventory/ItemSlot';
14
13
  import { RPGUIContainerTypes } from '../RPGUIContainer';
@@ -21,21 +20,6 @@ export interface IEquipmentSetProps {
21
20
  item: IItem,
22
21
  itemContainerType: ItemContainerType | null
23
22
  ) => void;
24
- onItemDragStart?: (
25
- item: IItem,
26
- slotIndex: number,
27
- itemContainerType: ItemContainerType | null
28
- ) => void;
29
- onItemDragEnd?: (quantity?: number) => void;
30
- onItemPlaceDrop?: (
31
- item: IItem | null,
32
- slotIndex: number,
33
- itemContainerType: ItemContainerType | null
34
- ) => void;
35
- onItemOutsideDrop?: (item: IItem, position: IPosition) => void;
36
- dragScale?: number;
37
- checkIfItemCanBeMoved: () => boolean;
38
- checkIfItemShouldDragEnd?: () => boolean;
39
23
  onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
40
24
  onSelected?: (optionId: string) => void;
41
25
  initialPosition?: { x: number; y: number };
@@ -52,13 +36,6 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
52
36
  onItemClick,
53
37
  atlasIMG,
54
38
  atlasJSON,
55
- onItemDragEnd,
56
- onItemDragStart,
57
- onItemPlaceDrop,
58
- onItemOutsideDrop,
59
- checkIfItemCanBeMoved,
60
- checkIfItemShouldDragEnd,
61
- dragScale,
62
39
  }) => {
63
40
  const {
64
41
  neck,
@@ -125,27 +102,6 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
125
102
  onSelected={(optionId: string) => {
126
103
  if (onSelected) onSelected(optionId);
127
104
  }}
128
- onDragStart={(item, slotIndex, itemContainerType) => {
129
- if (!item) {
130
- return;
131
- }
132
-
133
- if (onItemDragStart)
134
- onItemDragStart(item, slotIndex, itemContainerType);
135
- }}
136
- onDragEnd={quantity => {
137
- if (onItemDragEnd) onItemDragEnd(quantity);
138
- }}
139
- dragScale={dragScale}
140
- checkIfItemCanBeMoved={checkIfItemCanBeMoved}
141
- checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}
142
- onPlaceDrop={(item, slotIndex, itemContainerType) => {
143
- if (onItemPlaceDrop)
144
- onItemPlaceDrop(item, slotIndex, itemContainerType);
145
- }}
146
- onOutsideDrop={(item, position) => {
147
- if (onItemOutsideDrop) onItemOutsideDrop(item, position);
148
- }}
149
105
  atlasIMG={atlasIMG}
150
106
  atlasJSON={atlasJSON}
151
107
  />
@@ -178,7 +134,6 @@ const EquipmentSetContainer = styled.div`
178
134
  justify-content: center;
179
135
  flex-wrap: wrap;
180
136
  flex-direction: row;
181
- touch-action: none;
182
137
  `;
183
138
 
184
139
  const EquipmentColumn = styled.div`
@@ -186,5 +141,4 @@ const EquipmentColumn = styled.div`
186
141
  justify-content: center;
187
142
  flex-wrap: wrap;
188
143
  flex-direction: column;
189
- touch-action: none;
190
144
  `;
@@ -4,12 +4,8 @@ export interface IInputProps
4
4
  extends React.DetailedHTMLProps<
5
5
  React.InputHTMLAttributes<HTMLInputElement>,
6
6
  HTMLInputElement
7
- > {
8
- innerRef?: React.Ref<HTMLInputElement>;
9
- }
7
+ > {}
10
8
 
11
9
  export const Input: React.FC<IInputProps> = ({ ...props }) => {
12
- const { innerRef, ...rest } = props;
13
-
14
- return <input {...rest} ref={props.innerRef} />;
10
+ return <input {...props} />;
15
11
  };