@rpg-engine/long-bow 0.8.214 → 0.8.216

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.214",
3
+ "version": "0.8.216",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -556,9 +556,10 @@ const Container = styled.div`
556
556
  display: flex;
557
557
  flex-direction: column;
558
558
  width: 100%;
559
- height: 100%;
559
+ height: calc(100% - 48px);
560
560
  gap: 0.5rem;
561
561
  position: relative;
562
+ overflow: hidden;
562
563
  `;
563
564
 
564
565
  const HeaderRow = styled.div`
@@ -4,7 +4,8 @@ import {
4
4
  UserAccountTypes,
5
5
  ItemType,
6
6
  } from '@rpg-engine/shared';
7
- import React, { useEffect } from 'react';
7
+ import React, { useEffect, useState } from 'react';
8
+ import { FaFilter } from 'react-icons/fa';
8
9
  import styled from 'styled-components';
9
10
  import { ScrollableContent } from '../../shared/ScrollableContent/ScrollableContent';
10
11
  import { StoreCharacterSkinRow } from '../StoreCharacterSkinRow';
@@ -115,29 +116,40 @@ export const StoreItemsSection: React.FC<IStoreItemsSectionProps> = ({
115
116
  );
116
117
  };
117
118
 
119
+ const [showFilters, setShowFilters] = useState(false);
120
+
118
121
  return (
119
122
  <StoreContainer>
120
- <SearchHeader>
121
- <SearchBarContainer>
122
- <SearchBar
123
- value={searchQuery}
124
- onChange={setSearchQuery}
125
- placeholder="Search items..."
123
+ <FilterBar>
124
+ <FilterToggle $active={showFilters} onClick={() => setShowFilters(prev => !prev)}>
125
+ <FaFilter size={12} />
126
+ <span>Filter</span>
127
+ </FilterToggle>
128
+ </FilterBar>
129
+
130
+ {showFilters && (
131
+ <SearchHeader>
132
+ <SearchBarContainer>
133
+ <SearchBar
134
+ value={searchQuery}
135
+ onChange={setSearchQuery}
136
+ placeholder="Search items..."
137
+ />
138
+ </SearchBarContainer>
139
+ <SegmentedToggle
140
+ options={categoryOptions.map(opt => ({ id: opt.value, label: opt.option }))}
141
+ activeId={selectedCategory}
142
+ onChange={id => setSelectedCategory(id as ItemType | 'all')}
126
143
  />
127
- </SearchBarContainer>
128
- <SegmentedToggle
129
- options={categoryOptions.map(opt => ({ id: opt.value, label: opt.option }))}
130
- activeId={selectedCategory}
131
- onChange={id => setSelectedCategory(id as ItemType | 'all')}
132
- />
133
- </SearchHeader>
144
+ </SearchHeader>
145
+ )}
134
146
 
135
147
  <ScrollableContent
136
148
  items={filteredItems}
137
149
  renderItem={renderStoreItem}
138
150
  emptyMessage="No items match your filters."
139
151
  layout="list"
140
- maxHeight="50vh"
152
+ maxHeight="none"
141
153
  />
142
154
  </StoreContainer>
143
155
  );
@@ -160,3 +172,26 @@ const SearchHeader = styled.div`
160
172
  const SearchBarContainer = styled.div`
161
173
  flex: 0.75;
162
174
  `;
175
+
176
+ const FilterBar = styled.div`
177
+ display: flex;
178
+ padding-top: 0.25rem;
179
+ `;
180
+
181
+ const FilterToggle = styled.button<{ $active: boolean }>`
182
+ display: flex;
183
+ align-items: center;
184
+ gap: 0.4rem;
185
+ background: ${({ $active }) => ($active ? 'rgba(255,255,255,0.15)' : 'transparent')};
186
+ border: 1px solid rgba(255, 255, 255, 0.3);
187
+ color: #fff;
188
+ padding: 0.3rem 0.6rem;
189
+ border-radius: 4px;
190
+ cursor: pointer;
191
+ font-family: 'Press Start 2P', cursive;
192
+ font-size: 0.55rem;
193
+
194
+ &:hover {
195
+ background: rgba(255, 255, 255, 0.1);
196
+ }
197
+ `;