@rpg-engine/long-bow 0.8.55 → 0.8.57

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.8.55",
3
+ "version": "0.8.57",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -13,7 +13,6 @@ export interface IConfirmModalProps {
13
13
  const GlobalStyle = createGlobalStyle`
14
14
  body {
15
15
  overflow: hidden;
16
-
17
16
  width: 100%;
18
17
  height: 100%;
19
18
  }
@@ -39,7 +38,7 @@ export const ConfirmModal: React.FC<IConfirmModalProps> = ({
39
38
  return (
40
39
  <ModalPortal>
41
40
  <GlobalStyle />
42
- <Overlay onPointerDown={handleClose} />
41
+ <Overlay onClick={handleClose} />
43
42
  <ModalContainer>
44
43
  <ModalContent onPointerDown={stopPropagation}>
45
44
  <MessageContainer>
@@ -78,9 +77,10 @@ const Overlay = styled.div`
78
77
  left: 0;
79
78
  right: 0;
80
79
  bottom: 0;
81
- background-color: rgba(0, 0, 0, 1);
80
+ background-color: rgba(0, 0, 0, 0.6);
82
81
  z-index: 1000;
83
82
  animation: fadeIn 0.2s ease-out;
83
+ cursor: pointer;
84
84
 
85
85
  @keyframes fadeIn {
86
86
  from {
@@ -102,21 +102,23 @@ const ModalContainer = styled.div`
102
102
  align-items: center;
103
103
  justify-content: center;
104
104
  z-index: 1001;
105
+ pointer-events: none;
105
106
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
106
107
  env(safe-area-inset-bottom) env(safe-area-inset-left);
107
- touch-action: none;
108
108
  `;
109
109
 
110
110
  const ModalContent = styled.div`
111
- background: url('/assets/ui/paper-dialog.png') no-repeat center center;
112
- background-size: 100% 100%;
111
+ background-color: #2a2a2a;
112
+ border: 2px solid #444;
113
+ border-radius: 8px;
113
114
  padding: 20px;
114
115
  min-width: 300px;
115
116
  max-width: 90%;
116
117
  margin: 0 auto;
117
118
  animation: scaleIn 0.2s ease-out;
118
119
  transform-origin: center;
119
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
120
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.3);
121
+ pointer-events: auto;
120
122
 
121
123
  @keyframes scaleIn {
122
124
  from {
@@ -143,8 +145,8 @@ const MessageContainer = styled.div`
143
145
  const Message = styled.p`
144
146
  margin: 0;
145
147
  font-size: 16px;
146
- color: #333;
147
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
148
+ color: #fff;
149
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
148
150
 
149
151
  @media (max-width: 768px) {
150
152
  font-size: 18px;
@@ -15,10 +15,6 @@ export interface IDropdownProps {
15
15
  opensUp?: boolean; // Add a new prop to control the dropdown direction
16
16
  }
17
17
 
18
- const ITEM_HEIGHT = 35;
19
- const MAX_ITEMS_VISIBLE = 10;
20
- const MAX_HEIGHT = MAX_ITEMS_VISIBLE * ITEM_HEIGHT;
21
-
22
18
  export const Dropdown: React.FC<IDropdownProps> = ({
23
19
  options,
24
20
  width,
@@ -69,7 +65,6 @@ export const Dropdown: React.FC<IDropdownProps> = ({
69
65
  className="rpgui-dropdown-imp"
70
66
  opened={opened}
71
67
  opensUp={opensUp}
72
- optionsCount={options.length}
73
68
  >
74
69
  {options.map(option => {
75
70
  return (
@@ -93,16 +88,11 @@ export const Dropdown: React.FC<IDropdownProps> = ({
93
88
  const Container = styled.div<{ width: string | undefined }>`
94
89
  position: relative;
95
90
  width: ${props => props.width || '100%'};
96
- max-height: ${MAX_HEIGHT}px;
97
91
  `;
98
92
 
99
93
  const DropdownSelect = styled.p`
100
94
  width: 100%;
101
95
  box-sizing: border-box;
102
- white-space: nowrap;
103
- overflow: hidden;
104
- text-overflow: ellipsis;
105
- max-height: ${ITEM_HEIGHT}px;
106
96
 
107
97
  label {
108
98
  display: inline-block;
@@ -113,14 +103,10 @@ const DropdownSelect = styled.p`
113
103
  const DropdownOptions = styled.ul<{
114
104
  opened: boolean;
115
105
  opensUp: boolean;
116
- optionsCount: number;
117
106
  }>`
118
107
  position: absolute;
119
108
  width: 100%;
120
- max-height: ${props =>
121
- props.opened
122
- ? `${Math.min(props.optionsCount * ITEM_HEIGHT, MAX_HEIGHT)}px`
123
- : '0'};
109
+ max-height: 300px;
124
110
  overflow-y: auto;
125
111
  display: ${props => (props.opened ? 'block' : 'none')};
126
112
  box-sizing: border-box;
@@ -128,15 +114,7 @@ const DropdownOptions = styled.ul<{
128
114
  top: ${props => (props.opensUp ? 'auto' : '100%')};
129
115
  margin: 0;
130
116
  padding: 0;
131
-
132
- li {
133
- white-space: nowrap;
134
- overflow: hidden;
135
- text-overflow: ellipsis;
136
- padding: 8px 12px;
137
- min-height: ${ITEM_HEIGHT}px;
138
- max-height: ${ITEM_HEIGHT}px;
139
- box-sizing: border-box;
140
- line-height: 1.2;
117
+ @media (max-width: 768px) {
118
+ padding: 8px 0;
141
119
  }
142
120
  `;
@@ -6,7 +6,7 @@ import {
6
6
  ItemContainerType,
7
7
  ItemSlotType,
8
8
  ItemSubType,
9
- ItemType
9
+ ItemType,
10
10
  } from '@rpg-engine/shared';
11
11
 
12
12
  import { observer } from 'mobx-react-lite';