goobs-frontend 0.122.1 → 0.122.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.
Files changed (319) hide show
  1. package/package.json +2 -1
  2. package/src/components/Accordion/index.tsx +1 -1
  3. package/src/components/BigCalendar/CalendarFilters.tsx +350 -0
  4. package/src/components/BigCalendar/index.tsx +897 -0
  5. package/src/components/Card/index.tsx +51 -19
  6. package/src/components/ComplexTextEditor/index.tsx +1 -1
  7. package/src/components/ConfirmationCodeInput/index.tsx +1 -1
  8. package/src/components/DataGrid/FilterSection/index.tsx +6 -8
  9. package/src/components/DataGrid/Footer/index.tsx +0 -1
  10. package/src/components/DataGrid/ManageRow/index.tsx +3 -3
  11. package/src/components/DataGrid/Table/CreationRow/index.tsx +6 -9
  12. package/src/components/DataGrid/Table/index.tsx +7 -2
  13. package/src/components/DataGrid/Toolbar/index.tsx +106 -0
  14. package/src/components/DataGrid/index.tsx +32 -24
  15. package/src/components/Field/Date/DateField/index.tsx +8 -6
  16. package/src/components/Field/Date/DateRange/index.tsx +274 -181
  17. package/src/components/Field/Dropdown/MultiSelect/index.tsx +69 -93
  18. package/src/components/Field/Dropdown/SearchableHistory/index.tsx +79 -110
  19. package/src/components/Field/Dropdown/SearchableSimple/index.tsx +54 -75
  20. package/src/components/Field/IPAM/Address/index.tsx +3 -3
  21. package/src/components/Field/PhoneNumber/index.tsx +2 -2
  22. package/src/components/Field/Search/index.tsx +7 -0
  23. package/src/components/Field/Text/index.tsx +3 -1
  24. package/src/components/Field/Time/TimeRange/index.tsx +2 -2
  25. package/src/components/Form/DataGrid/index.tsx +5 -0
  26. package/src/components/Form/Dialog/index.tsx +27 -29
  27. package/src/components/Form/Popup/index.tsx +25 -40
  28. package/src/components/FormControl/index.tsx +9 -6
  29. package/src/components/FormControlLabel/index.tsx +9 -3
  30. package/src/components/Icons/AccessTime.tsx +4 -3
  31. package/src/components/Icons/AccountBalance.tsx +4 -3
  32. package/src/components/Icons/AccountBalanceWallet.tsx +4 -3
  33. package/src/components/Icons/AccountTree.tsx +4 -3
  34. package/src/components/Icons/Add.tsx +4 -3
  35. package/src/components/Icons/AddCircle.tsx +4 -3
  36. package/src/components/Icons/AddCircleOutline.tsx +4 -3
  37. package/src/components/Icons/AddPhotoAlternate.tsx +4 -3
  38. package/src/components/Icons/AddShoppingCart.tsx +4 -3
  39. package/src/components/Icons/AddTask.tsx +4 -3
  40. package/src/components/Icons/AdminPanelSettings.tsx +4 -3
  41. package/src/components/Icons/Analytics.tsx +4 -3
  42. package/src/components/Icons/Animation.tsx +4 -3
  43. package/src/components/Icons/Apartment.tsx +4 -3
  44. package/src/components/Icons/Apple.tsx +4 -3
  45. package/src/components/Icons/ArrowBack.tsx +4 -3
  46. package/src/components/Icons/ArrowDropDown.tsx +4 -3
  47. package/src/components/Icons/ArrowDropDownCircle.tsx +4 -3
  48. package/src/components/Icons/ArrowDropUp.tsx +4 -3
  49. package/src/components/Icons/ArrowForward.tsx +4 -3
  50. package/src/components/Icons/Article.tsx +4 -3
  51. package/src/components/Icons/Assessment.tsx +4 -3
  52. package/src/components/Icons/Assignment.tsx +4 -3
  53. package/src/components/Icons/AttachFile.tsx +4 -3
  54. package/src/components/Icons/AttachMoney.tsx +4 -3
  55. package/src/components/Icons/Attachment.tsx +4 -3
  56. package/src/components/Icons/AutoAwesome.tsx +4 -3
  57. package/src/components/Icons/AutoGraph.tsx +4 -3
  58. package/src/components/Icons/Autorenew.tsx +4 -3
  59. package/src/components/Icons/Bank.tsx +4 -3
  60. package/src/components/Icons/BarChart.tsx +4 -3
  61. package/src/components/Icons/Block.tsx +4 -3
  62. package/src/components/Icons/BugReport.tsx +4 -3
  63. package/src/components/Icons/Build.tsx +4 -3
  64. package/src/components/Icons/Business.tsx +4 -3
  65. package/src/components/Icons/BusinessCenter.tsx +4 -3
  66. package/src/components/Icons/Calculate.tsx +4 -3
  67. package/src/components/Icons/Calendar.tsx +4 -3
  68. package/src/components/Icons/CalendarMonth.tsx +4 -3
  69. package/src/components/Icons/CalendarToday.tsx +4 -3
  70. package/src/components/Icons/Campaign.tsx +4 -3
  71. package/src/components/Icons/Cancel.tsx +4 -3
  72. package/src/components/Icons/CardGiftcard.tsx +4 -3
  73. package/src/components/Icons/CardMembership.tsx +4 -3
  74. package/src/components/Icons/Category.tsx +4 -3
  75. package/src/components/Icons/Chat.tsx +4 -3
  76. package/src/components/Icons/Check.tsx +4 -3
  77. package/src/components/Icons/CheckBoxIcon.tsx +4 -3
  78. package/src/components/Icons/CheckCircle.tsx +4 -3
  79. package/src/components/Icons/CheckCircleOutline.tsx +4 -3
  80. package/src/components/Icons/ChevronLeft.tsx +4 -3
  81. package/src/components/Icons/ChevronRight.tsx +4 -3
  82. package/src/components/Icons/CircleOutline.tsx +4 -3
  83. package/src/components/Icons/Clear.tsx +4 -3
  84. package/src/components/Icons/Close.tsx +4 -3
  85. package/src/components/Icons/CloudSync.tsx +4 -3
  86. package/src/components/Icons/CloudUpload.tsx +4 -3
  87. package/src/components/Icons/Code.tsx +4 -3
  88. package/src/components/Icons/CompareArrows.tsx +4 -3
  89. package/src/components/Icons/Construction.tsx +4 -3
  90. package/src/components/Icons/Contacts.tsx +4 -3
  91. package/src/components/Icons/ContentCopy.tsx +4 -3
  92. package/src/components/Icons/ContractIcon.tsx +4 -3
  93. package/src/components/Icons/Create.tsx +4 -3
  94. package/src/components/Icons/CreateNewFolder.tsx +4 -3
  95. package/src/components/Icons/CreditCard.tsx +4 -3
  96. package/src/components/Icons/CreditCardOff.tsx +4 -3
  97. package/src/components/Icons/CurrencyExchange.tsx +4 -3
  98. package/src/components/Icons/Dashboard.tsx +4 -3
  99. package/src/components/Icons/DateRange.tsx +4 -3
  100. package/src/components/Icons/Delete.tsx +4 -3
  101. package/src/components/Icons/Description.tsx +4 -3
  102. package/src/components/Icons/DesktopWindows.tsx +4 -3
  103. package/src/components/Icons/DeviceHub.tsx +4 -3
  104. package/src/components/Icons/Devices.tsx +4 -3
  105. package/src/components/Icons/Dns.tsx +4 -3
  106. package/src/components/Icons/Domain.tsx +4 -3
  107. package/src/components/Icons/Download.tsx +4 -3
  108. package/src/components/Icons/Drag.tsx +4 -3
  109. package/src/components/Icons/DragIndicator.tsx +4 -3
  110. package/src/components/Icons/DuplicateIcon.tsx +4 -3
  111. package/src/components/Icons/Edit.tsx +4 -3
  112. package/src/components/Icons/Email.tsx +4 -3
  113. package/src/components/Icons/EmojiEvents.tsx +4 -3
  114. package/src/components/Icons/Engineering.tsx +4 -3
  115. package/src/components/Icons/Error.tsx +4 -3
  116. package/src/components/Icons/ErrorOutline.tsx +4 -3
  117. package/src/components/Icons/Event.tsx +4 -3
  118. package/src/components/Icons/EventAvailable.tsx +4 -3
  119. package/src/components/Icons/EventBusy.tsx +4 -3
  120. package/src/components/Icons/ExpandLess.tsx +4 -3
  121. package/src/components/Icons/ExpandMore.tsx +4 -3
  122. package/src/components/Icons/Extension.tsx +4 -3
  123. package/src/components/Icons/Favorite.tsx +4 -3
  124. package/src/components/Icons/FavoriteBorder.tsx +4 -3
  125. package/src/components/Icons/FavoriteBorderIcon.tsx +4 -3
  126. package/src/components/Icons/FavoriteIcon.tsx +4 -3
  127. package/src/components/Icons/Feedback.tsx +4 -3
  128. package/src/components/Icons/FileCopy.tsx +4 -3
  129. package/src/components/Icons/Filing.tsx +4 -3
  130. package/src/components/Icons/FilterList.tsx +4 -3
  131. package/src/components/Icons/Fingerprint.tsx +4 -3
  132. package/src/components/Icons/FirstPage.tsx +4 -3
  133. package/src/components/Icons/FormatAlignCenter.tsx +4 -3
  134. package/src/components/Icons/FormatAlignLeft.tsx +4 -3
  135. package/src/components/Icons/FormatAlignRight.tsx +4 -3
  136. package/src/components/Icons/FormatBold.tsx +4 -3
  137. package/src/components/Icons/FormatItalic.tsx +4 -3
  138. package/src/components/Icons/FormatListBulleted.tsx +4 -3
  139. package/src/components/Icons/FormatListNumbered.tsx +4 -3
  140. package/src/components/Icons/FormatUnderlined.tsx +4 -3
  141. package/src/components/Icons/Gavel.tsx +4 -3
  142. package/src/components/Icons/Gesture.tsx +4 -3
  143. package/src/components/Icons/Google.tsx +4 -3
  144. package/src/components/Icons/GridView.tsx +4 -3
  145. package/src/components/Icons/GridViewIcon.tsx +4 -3
  146. package/src/components/Icons/Group.tsx +4 -3
  147. package/src/components/Icons/GroupWork.tsx +4 -3
  148. package/src/components/Icons/Groups.tsx +4 -3
  149. package/src/components/Icons/Handshake.tsx +4 -3
  150. package/src/components/Icons/Help.tsx +4 -3
  151. package/src/components/Icons/History.tsx +4 -3
  152. package/src/components/Icons/Home.tsx +4 -3
  153. package/src/components/Icons/HomeWork.tsx +4 -3
  154. package/src/components/Icons/HourglassEmpty.tsx +4 -3
  155. package/src/components/Icons/Hub.tsx +4 -3
  156. package/src/components/Icons/ImageIcon.tsx +4 -3
  157. package/src/components/Icons/IndeterminateCheckBox.tsx +6 -4
  158. package/src/components/Icons/Info.tsx +4 -3
  159. package/src/components/Icons/InfoOutline.tsx +4 -3
  160. package/src/components/Icons/Insights.tsx +4 -3
  161. package/src/components/Icons/IntegrationInstructions.tsx +4 -3
  162. package/src/components/Icons/Inventory.tsx +4 -3
  163. package/src/components/Icons/KeyboardArrowDown.tsx +4 -3
  164. package/src/components/Icons/KeyboardArrowLeft.tsx +4 -3
  165. package/src/components/Icons/KeyboardArrowRight.tsx +4 -3
  166. package/src/components/Icons/KeyboardReturn.tsx +4 -3
  167. package/src/components/Icons/Lan.tsx +4 -3
  168. package/src/components/Icons/LastPage.tsx +4 -3
  169. package/src/components/Icons/Launch.tsx +4 -3
  170. package/src/components/Icons/Layers.tsx +4 -3
  171. package/src/components/Icons/Link.tsx +4 -3
  172. package/src/components/Icons/ListAlt.tsx +4 -3
  173. package/src/components/Icons/LocalGasStation.tsx +4 -3
  174. package/src/components/Icons/LocalOffer.tsx +4 -3
  175. package/src/components/Icons/LocalShipping.tsx +4 -3
  176. package/src/components/Icons/LocationCity.tsx +4 -3
  177. package/src/components/Icons/LocationIcon.tsx +4 -3
  178. package/src/components/Icons/LocationOn.tsx +4 -3
  179. package/src/components/Icons/LocationSearching.tsx +4 -3
  180. package/src/components/Icons/Lock.tsx +4 -3
  181. package/src/components/Icons/Login.tsx +4 -3
  182. package/src/components/Icons/LogoutRounded.tsx +4 -3
  183. package/src/components/Icons/LooksFour.tsx +4 -3
  184. package/src/components/Icons/LooksOne.tsx +4 -3
  185. package/src/components/Icons/LooksThree.tsx +4 -3
  186. package/src/components/Icons/LooksTwo.tsx +4 -3
  187. package/src/components/Icons/Loop.tsx +4 -3
  188. package/src/components/Icons/LowPriority.tsx +4 -3
  189. package/src/components/Icons/Loyalty.tsx +4 -3
  190. package/src/components/Icons/Map.tsx +4 -3
  191. package/src/components/Icons/Menu.tsx +7 -3
  192. package/src/components/Icons/MenuBook.tsx +4 -3
  193. package/src/components/Icons/MonetizationOn.tsx +4 -3
  194. package/src/components/Icons/Money.tsx +4 -3
  195. package/src/components/Icons/MoreHoriz.tsx +4 -3
  196. package/src/components/Icons/MoreVert.tsx +4 -3
  197. package/src/components/Icons/Mouse.tsx +4 -3
  198. package/src/components/Icons/Navigation.tsx +7 -3
  199. package/src/components/Icons/NetworkCheck.tsx +4 -3
  200. package/src/components/Icons/NotificationActive.tsx +4 -3
  201. package/src/components/Icons/NotificationImportant.tsx +4 -3
  202. package/src/components/Icons/Notifications.tsx +4 -3
  203. package/src/components/Icons/Outlook.tsx +4 -3
  204. package/src/components/Icons/Pause.tsx +4 -3
  205. package/src/components/Icons/Payment.tsx +4 -3
  206. package/src/components/Icons/PdfIcon.tsx +4 -3
  207. package/src/components/Icons/PendingActions.tsx +4 -3
  208. package/src/components/Icons/People.tsx +4 -3
  209. package/src/components/Icons/Person.tsx +4 -3
  210. package/src/components/Icons/PersonAdd.tsx +4 -3
  211. package/src/components/Icons/PersonOutline.tsx +4 -3
  212. package/src/components/Icons/Phone.tsx +4 -3
  213. package/src/components/Icons/PlayArrow.tsx +4 -3
  214. package/src/components/Icons/PlaylistAddCheck.tsx +4 -3
  215. package/src/components/Icons/PointOfSale.tsx +4 -3
  216. package/src/components/Icons/Policy.tsx +4 -3
  217. package/src/components/Icons/PostAdd.tsx +4 -3
  218. package/src/components/Icons/PrecisionManufacturing.tsx +4 -3
  219. package/src/components/Icons/Preview.tsx +4 -3
  220. package/src/components/Icons/Print.tsx +4 -3
  221. package/src/components/Icons/PriorityHigh.tsx +4 -3
  222. package/src/components/Icons/Psychology.tsx +4 -3
  223. package/src/components/Icons/Public.tsx +4 -3
  224. package/src/components/Icons/QrCode.tsx +4 -3
  225. package/src/components/Icons/QrCodeScanner.tsx +4 -3
  226. package/src/components/Icons/RadioButtonChecked.tsx +4 -3
  227. package/src/components/Icons/RateReview.tsx +4 -3
  228. package/src/components/Icons/Receipt.tsx +4 -3
  229. package/src/components/Icons/Redo.tsx +4 -3
  230. package/src/components/Icons/Refresh.tsx +4 -3
  231. package/src/components/Icons/Remove.tsx +4 -3
  232. package/src/components/Icons/Repeat.tsx +4 -3
  233. package/src/components/Icons/ReportProblem.tsx +4 -3
  234. package/src/components/Icons/RequestQuote.tsx +4 -3
  235. package/src/components/Icons/Restore.tsx +4 -3
  236. package/src/components/Icons/Router.tsx +4 -3
  237. package/src/components/Icons/Save.tsx +4 -3
  238. package/src/components/Icons/Schedule.tsx +4 -3
  239. package/src/components/Icons/School.tsx +4 -3
  240. package/src/components/Icons/ScreenRotation.tsx +4 -3
  241. package/src/components/Icons/Search.tsx +4 -3
  242. package/src/components/Icons/Security.tsx +4 -3
  243. package/src/components/Icons/Send.tsx +4 -3
  244. package/src/components/Icons/Settings.tsx +5 -3
  245. package/src/components/Icons/Shield.tsx +4 -3
  246. package/src/components/Icons/ShoppingBasket.tsx +4 -3
  247. package/src/components/Icons/ShowChart.tsx +4 -3
  248. package/src/components/Icons/ShowHideEye.tsx +4 -3
  249. package/src/components/Icons/SkipNext.tsx +4 -3
  250. package/src/components/Icons/SmartButtonIcon.tsx +4 -3
  251. package/src/components/Icons/Smartphone.tsx +4 -3
  252. package/src/components/Icons/Sms.tsx +4 -3
  253. package/src/components/Icons/Sort.tsx +4 -3
  254. package/src/components/Icons/Spa.tsx +4 -3
  255. package/src/components/Icons/Speed.tsx +4 -3
  256. package/src/components/Icons/Star.tsx +4 -3
  257. package/src/components/Icons/StarBorder.tsx +4 -3
  258. package/src/components/Icons/StarIcon.tsx +4 -3
  259. package/src/components/Icons/Stop.tsx +4 -3
  260. package/src/components/Icons/Storage.tsx +4 -3
  261. package/src/components/Icons/Store.tsx +4 -3
  262. package/src/components/Icons/StoreMallDirectory.tsx +4 -3
  263. package/src/components/Icons/StrikethroughS.tsx +4 -3
  264. package/src/components/Icons/SupervisedUserCircle.tsx +4 -3
  265. package/src/components/Icons/Support.tsx +4 -3
  266. package/src/components/Icons/Sync.tsx +4 -3
  267. package/src/components/Icons/TableIcon.tsx +4 -3
  268. package/src/components/Icons/Tablet.tsx +4 -3
  269. package/src/components/Icons/TemplateIcon.tsx +4 -3
  270. package/src/components/Icons/TextFieldsIcon.tsx +4 -3
  271. package/src/components/Icons/ThumbUp.tsx +4 -3
  272. package/src/components/Icons/Timeline.tsx +4 -3
  273. package/src/components/Icons/Timer.tsx +4 -3
  274. package/src/components/Icons/Transfer.tsx +4 -3
  275. package/src/components/Icons/TrendingDown.tsx +4 -3
  276. package/src/components/Icons/TrendingUp.tsx +4 -3
  277. package/src/components/Icons/Undo.tsx +4 -3
  278. package/src/components/Icons/VerifiedUser.tsx +4 -3
  279. package/src/components/Icons/VideoLibraryIcon.tsx +4 -3
  280. package/src/components/Icons/Videocam.tsx +4 -3
  281. package/src/components/Icons/ViewCompact.tsx +4 -3
  282. package/src/components/Icons/ViewCompactIcon.tsx +4 -3
  283. package/src/components/Icons/ViewHeadlineIcon.tsx +4 -3
  284. package/src/components/Icons/ViewIcon.tsx +4 -3
  285. package/src/components/Icons/ViewList.tsx +4 -3
  286. package/src/components/Icons/ViewModule.tsx +4 -3
  287. package/src/components/Icons/ViewSidebar.tsx +4 -3
  288. package/src/components/Icons/Visibility.tsx +4 -3
  289. package/src/components/Icons/VisibilityOff.tsx +4 -3
  290. package/src/components/Icons/VpnKey.tsx +4 -3
  291. package/src/components/Icons/VpnLock.tsx +4 -3
  292. package/src/components/Icons/Warning.tsx +4 -3
  293. package/src/components/Icons/WarningAmber.tsx +4 -3
  294. package/src/components/Icons/WaterDrop.tsx +4 -3
  295. package/src/components/Icons/Web.tsx +4 -3
  296. package/src/components/Icons/Widgets.tsx +4 -3
  297. package/src/components/Icons/Wifi.tsx +4 -3
  298. package/src/components/Icons/WifiOff.tsx +4 -3
  299. package/src/components/Icons/Work.tsx +4 -3
  300. package/src/components/Icons/WorkspacePremium.tsx +4 -3
  301. package/src/components/InputLabel/index.tsx +9 -3
  302. package/src/components/MenuItem/index.tsx +9 -3
  303. package/src/components/Pagination/index.tsx +1 -1
  304. package/src/components/Paper/index.tsx +30 -8
  305. package/src/components/ProgressBar/index.tsx +0 -2
  306. package/src/components/ProjectBoard/board/index.tsx +11 -5
  307. package/src/components/Select/index.tsx +43 -10
  308. package/src/components/Stepper/index.tsx +16 -5
  309. package/src/components/ToggleButton/index.tsx +37 -4
  310. package/src/components/Toolbar/leftCenter/index.tsx +5 -1
  311. package/src/index.ts +15 -0
  312. package/src/theme/accordion.ts +54 -34
  313. package/src/theme/bigcalendar.ts +692 -0
  314. package/src/theme/checkbox.ts +45 -9
  315. package/src/theme/datagrid.ts +8 -0
  316. package/src/theme/drawer.ts +3 -1
  317. package/src/theme/formField.ts +34 -1
  318. package/src/theme/pagination.ts +0 -2
  319. package/src/theme/treeview.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goobs-frontend",
3
- "version": "0.122.1",
3
+ "version": "0.122.2",
4
4
  "type": "module",
5
5
  "description": "A comprehensive React-based libary for building modern web applications",
6
6
  "license": "MIT",
@@ -30,6 +30,7 @@
30
30
  "dependencies": {
31
31
  "@storybook/addon-links": "^9",
32
32
  "@types/lodash": "^4",
33
+ "date-fns": "^4.1.0",
33
34
  "formik": "^2",
34
35
  "highlight.js": "^11",
35
36
  "jotai": "^2",
@@ -335,7 +335,7 @@ const Accordion: FC<AccordionProps> = props => {
335
335
  position: 'absolute',
336
336
  left: '8px',
337
337
  top: '50%',
338
- transform: 'translateY(-50%)',
338
+ transform: `translateY(-50%) ${computedStyles.icon.transform || ''}`,
339
339
  zIndex: 1,
340
340
  }}
341
341
  />
@@ -0,0 +1,350 @@
1
+ 'use client'
2
+
3
+ import React, { useState, useCallback, useMemo } from 'react'
4
+ import Accordion from '../Accordion'
5
+ import SearchableSimple, {
6
+ type DropdownOption,
7
+ } from '../Field/Dropdown/SearchableSimple'
8
+ import Chip from '../Chip'
9
+ import Typography from '../Typography'
10
+ import DateRange from '../Field/Date/DateRange'
11
+ import * as Icons from '../Icons'
12
+ import { FormFieldStyles } from '../../theme'
13
+
14
+ const { FilterListIcon, ClearIcon } = Icons
15
+
16
+ export interface CalendarFilterOptions {
17
+ searchText?: string
18
+ eventTypes?: string[]
19
+ dateRange?: {
20
+ start?: Date | null
21
+ end?: Date | null
22
+ }
23
+ resources?: string[]
24
+ tags?: string[]
25
+ status?: string[]
26
+ customFilters?: Record<string, any>
27
+ }
28
+
29
+ interface CalendarFiltersProps {
30
+ filters: CalendarFilterOptions
31
+ onFiltersChange: (filters: CalendarFilterOptions) => void
32
+ availableResources?: { id: string; title: string }[]
33
+ cities?: string[]
34
+ propertyTypes?: string[]
35
+ bedroomOptions?: Array<string | number>
36
+ priceRanges?: string[]
37
+ // Remove external custom components; inline standardized dropdowns instead
38
+ expanded?: boolean
39
+ styles?: FormFieldStyles
40
+ }
41
+
42
+ export const CalendarFilters: React.FC<CalendarFiltersProps> = ({
43
+ filters,
44
+ onFiltersChange,
45
+ availableResources = [],
46
+ cities = [],
47
+ propertyTypes = [],
48
+ bedroomOptions = [],
49
+ priceRanges = [],
50
+ expanded = true,
51
+ styles,
52
+ }) => {
53
+ const [isExpanded, setIsExpanded] = useState(expanded)
54
+ const theme = styles?.theme ?? 'sacred'
55
+
56
+ // search removed
57
+
58
+ const handleDateRangeChange = useCallback(
59
+ (range: { start: Date | null; end: Date | null }) => {
60
+ onFiltersChange({
61
+ ...filters,
62
+ dateRange: {
63
+ start: range.start ?? null,
64
+ end: range.end ?? null,
65
+ },
66
+ })
67
+ },
68
+ [filters, onFiltersChange]
69
+ )
70
+
71
+ // tag toggle replaced by dropdown
72
+
73
+ const clearAllFilters = useCallback(() => {
74
+ onFiltersChange({})
75
+ }, [onFiltersChange])
76
+
77
+ const activeFilterCount = useMemo(() => {
78
+ let count = 0
79
+ if (filters.searchText) count++
80
+ // Removed event types filter
81
+ if (filters.dateRange?.start || filters.dateRange?.end) count++
82
+ if (filters.resources?.length) count++
83
+ if (filters.tags?.length) count++
84
+ if (filters.customFilters && Object.keys(filters.customFilters).length)
85
+ count++
86
+ return count
87
+ }, [filters])
88
+
89
+ const accordionSummary = useMemo(
90
+ () => (
91
+ <div
92
+ style={{
93
+ display: 'flex',
94
+ alignItems: 'center',
95
+ gap: '12px',
96
+ width: '100%',
97
+ }}
98
+ >
99
+ <FilterListIcon styles={{ theme: styles?.theme ?? 'sacred' }} />
100
+ <Typography
101
+ styles={{
102
+ theme,
103
+ fontSize: '1rem',
104
+ fontWeight: 600,
105
+ ...(theme === 'sacred'
106
+ ? {
107
+ variant: 'cinzelh5',
108
+ color: '#FFD700',
109
+ textShadow: '0 0 6px rgba(255, 215, 0, 0.5)',
110
+ }
111
+ : {}),
112
+ }}
113
+ >
114
+ Filters
115
+ </Typography>
116
+ {activeFilterCount > 0 && (
117
+ <Chip
118
+ label={`${activeFilterCount} active`}
119
+ styles={{
120
+ theme: styles?.theme || 'sacred',
121
+ color: styles?.theme === 'sacred' ? '#FFD700' : '#3b82f6',
122
+ }}
123
+ />
124
+ )}
125
+ <div style={{ flexGrow: 1 }} />
126
+ {activeFilterCount > 0 && (
127
+ <div
128
+ onClick={e => {
129
+ e.stopPropagation()
130
+ clearAllFilters()
131
+ }}
132
+ style={{
133
+ cursor: 'pointer',
134
+ padding: '4px',
135
+ borderRadius: '4px',
136
+ display: 'flex',
137
+ alignItems: 'center',
138
+ justifyContent: 'center',
139
+ transition: 'background-color 0.2s',
140
+ }}
141
+ onMouseEnter={e => {
142
+ e.currentTarget.style.backgroundColor =
143
+ styles?.theme === 'sacred'
144
+ ? 'rgba(255, 215, 0, 0.1)'
145
+ : 'rgba(0, 0, 0, 0.04)'
146
+ }}
147
+ onMouseLeave={e => {
148
+ e.currentTarget.style.backgroundColor = 'transparent'
149
+ }}
150
+ >
151
+ <ClearIcon
152
+ styles={{ theme: styles?.theme ?? 'sacred', size: 16 }}
153
+ />
154
+ </div>
155
+ )}
156
+ </div>
157
+ ),
158
+ [activeFilterCount, styles, theme, clearAllFilters]
159
+ )
160
+
161
+ const containerStyle: React.CSSProperties = {
162
+ display: 'flex',
163
+ flexDirection: 'column',
164
+ gap: '16px',
165
+ padding: '16px',
166
+ }
167
+
168
+ const sectionStyle: React.CSSProperties = {
169
+ display: 'flex',
170
+ flexDirection: 'column',
171
+ gap: '8px',
172
+ }
173
+
174
+ // removed chip container
175
+
176
+ return (
177
+ <Accordion
178
+ summary={accordionSummary}
179
+ expanded={isExpanded}
180
+ onChange={(_, expanded) => {
181
+ console.log('Accordion onChange called, expanded:', expanded)
182
+ setIsExpanded(expanded)
183
+ }}
184
+ styles={{
185
+ theme,
186
+ marginBottom: '16px',
187
+ ...(theme === 'sacred'
188
+ ? {
189
+ summaryColor: '#FFD700',
190
+ summaryTextShadow: '0 0 8px rgba(255, 215, 0, 0.6)',
191
+ }
192
+ : {}),
193
+ }}
194
+ details={
195
+ <div style={containerStyle}>
196
+ {/* Removed global search */}
197
+
198
+ {/* Date Range */}
199
+ <DateRange
200
+ value={{
201
+ start: filters.dateRange?.start || null,
202
+ end: filters.dateRange?.end || null,
203
+ }}
204
+ onChange={handleDateRangeChange}
205
+ startLabel="Start Date"
206
+ endLabel="End Date"
207
+ disableFutureDateValidation
208
+ {...(styles ? { styles } : {})}
209
+ />
210
+
211
+ {/* Two-row grid of dropdowns */}
212
+ <div
213
+ style={{
214
+ display: 'grid',
215
+ gridTemplateColumns: '1fr 1fr',
216
+ gap: '16px',
217
+ }}
218
+ >
219
+ {(cities.length > 0 || availableResources.length > 0) && (
220
+ <div style={sectionStyle}>
221
+ <SearchableSimple
222
+ label="City"
223
+ options={
224
+ cities.length > 0
225
+ ? cities.map<DropdownOption>(c => ({ value: c }))
226
+ : availableResources.map<DropdownOption>(r => ({
227
+ value: r.title,
228
+ _id: r.id,
229
+ }))
230
+ }
231
+ {...(() => {
232
+ const defCity = filters.customFilters?.city as
233
+ | string
234
+ | undefined
235
+ if (defCity) return { defaultValue: defCity }
236
+ const resId = (filters.resources || [])[0]
237
+ const found = availableResources.find(r => r.id === resId)
238
+ return found?.title ? { defaultValue: found.title } : {}
239
+ })()}
240
+ onChange={opt => {
241
+ if (cities.length > 0) {
242
+ onFiltersChange({
243
+ ...filters,
244
+ customFilters: {
245
+ ...filters.customFilters,
246
+ city: opt?.value || '',
247
+ },
248
+ })
249
+ } else {
250
+ onFiltersChange({
251
+ ...filters,
252
+ resources: opt?.value ? [opt._id || opt.value] : [],
253
+ })
254
+ }
255
+ }}
256
+ styles={{ theme: styles?.theme ?? 'sacred' }}
257
+ />
258
+ </div>
259
+ )}
260
+ {/* Status removed */}
261
+ {propertyTypes.length > 0 && (
262
+ <div style={sectionStyle}>
263
+ <SearchableSimple
264
+ label="Property Type"
265
+ options={propertyTypes.map<DropdownOption>(t => ({
266
+ value: t,
267
+ }))}
268
+ {...(() => {
269
+ const def = filters.customFilters?.propertyType as
270
+ | string
271
+ | undefined
272
+ return def ? { defaultValue: def } : {}
273
+ })()}
274
+ onChange={opt =>
275
+ onFiltersChange({
276
+ ...filters,
277
+ customFilters: {
278
+ ...filters.customFilters,
279
+ propertyType: opt?.value || '',
280
+ },
281
+ })
282
+ }
283
+ styles={{ theme: styles?.theme ?? 'sacred' }}
284
+ />
285
+ </div>
286
+ )}
287
+ {bedroomOptions.length > 0 && (
288
+ <div style={sectionStyle}>
289
+ <SearchableSimple
290
+ label="Bedrooms"
291
+ options={bedroomOptions.map<DropdownOption>(b => ({
292
+ value: String(b),
293
+ }))}
294
+ {...(() => {
295
+ const def = filters.customFilters?.bedrooms as
296
+ | string
297
+ | undefined
298
+ return def ? { defaultValue: def } : {}
299
+ })()}
300
+ onChange={opt =>
301
+ onFiltersChange({
302
+ ...filters,
303
+ customFilters: {
304
+ ...filters.customFilters,
305
+ bedrooms: opt?.value || '',
306
+ },
307
+ })
308
+ }
309
+ styles={{ theme: styles?.theme ?? 'sacred' }}
310
+ />
311
+ </div>
312
+ )}
313
+ {priceRanges.length > 0 && (
314
+ <div style={sectionStyle}>
315
+ <SearchableSimple
316
+ label="Price Range"
317
+ options={priceRanges.map<DropdownOption>(p => ({ value: p }))}
318
+ {...(() => {
319
+ const def = filters.customFilters?.priceRange as
320
+ | string
321
+ | undefined
322
+ return def ? { defaultValue: def } : {}
323
+ })()}
324
+ onChange={opt =>
325
+ onFiltersChange({
326
+ ...filters,
327
+ customFilters: {
328
+ ...filters.customFilters,
329
+ priceRange: opt?.value || '',
330
+ },
331
+ })
332
+ }
333
+ styles={{ theme: styles?.theme ?? 'sacred' }}
334
+ />
335
+ </div>
336
+ )}
337
+ {/* Fourth slot reserved for future standardized dropdown */}
338
+ <div />
339
+ </div>
340
+
341
+ {/* Tags handled above */}
342
+
343
+ {/* Status handled above */}
344
+
345
+ {/* External custom components removed in favor of standardized inline dropdowns */}
346
+ </div>
347
+ }
348
+ />
349
+ )
350
+ }