@mapfirst.ai/react 0.0.92 → 0.0.93

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/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var closeButtonStyles = {
172
172
  padding: "2px",
173
173
  borderRadius: "50%",
174
174
  backgroundColor: "white",
175
- border: "1px solid #03852e",
175
+ border: "1px solid #012b11",
176
176
  cursor: "pointer",
177
177
  display: "flex",
178
178
  alignItems: "center",
@@ -212,7 +212,7 @@ var chipStyles = {
212
212
  borderRadius: "9999px",
213
213
  padding: "0 16px",
214
214
  paddingRight: "20px",
215
- border: "1px solid #03852e",
215
+ border: "1px solid #012b11",
216
216
  display: "flex",
217
217
  alignItems: "center",
218
218
  gap: "8px",
@@ -365,7 +365,7 @@ var chipContainerStyles = {
365
365
  borderRadius: "9999px",
366
366
  padding: "0 16px",
367
367
  paddingRight: "20px",
368
- border: "1px solid #03852e",
368
+ border: "1px solid #012b11",
369
369
  display: "flex",
370
370
  gap: "8px",
371
371
  alignItems: "center",
@@ -447,15 +447,43 @@ var MinRatingFilterChip = ({ rating, onChange, onRemove, star = false }) => {
447
447
  height: "16px"
448
448
  },
449
449
  children: [
450
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
451
- StarIcon,
450
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
451
+ "svg",
452
452
  {
453
- fill: displayRating >= starNumber ? "#03852e" : "none",
453
+ viewBox: "0 0 24 24",
454
454
  style: {
455
455
  width: "16px",
456
456
  height: "16px",
457
457
  pointerEvents: "none"
458
- }
458
+ },
459
+ xmlns: "http://www.w3.org/2000/svg",
460
+ children: [
461
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("linearGradient", { id: `star-gradient-${index}`, children: [
462
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
463
+ "stop",
464
+ {
465
+ offset: fillState === "half" ? "50%" : "0%",
466
+ stopColor: "#03852e"
467
+ }
468
+ ),
469
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
470
+ "stop",
471
+ {
472
+ offset: fillState === "half" ? "50%" : "0%",
473
+ stopColor: "transparent"
474
+ }
475
+ )
476
+ ] }) }),
477
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
478
+ "path",
479
+ {
480
+ d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
481
+ fill: fillState === "full" ? "#03852e" : fillState === "half" ? `url(#star-gradient-${index})` : "transparent",
482
+ stroke: "#03852e",
483
+ strokeWidth: "1"
484
+ }
485
+ )
486
+ ]
459
487
  }
460
488
  ),
461
489
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
@@ -578,7 +606,7 @@ var chipStyles2 = {
578
606
  fontSize: "14px",
579
607
  borderRadius: "9999px",
580
608
  padding: "0 16px",
581
- border: "1px solid #03852e",
609
+ border: "1px solid #012b11",
582
610
  display: "flex",
583
611
  alignItems: "center",
584
612
  gap: "8px",
@@ -707,10 +735,13 @@ var PriceBoundaryChip = ({
707
735
  style: inputStyles,
708
736
  autoFocus: true
709
737
  }
710
- ) : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { style: { fontSize: "16px" }, children: [
711
- currency,
712
- value
713
- ] }) : showAddWhenEmpty ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
738
+ ) : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
739
+ "span",
740
+ {
741
+ style: { fontSize: "16px", fontWeight: 600, textAlign: "center" },
742
+ children: value
743
+ }
744
+ ) : showAddWhenEmpty ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
714
745
  "button",
715
746
  {
716
747
  type: "button",
@@ -727,7 +758,18 @@ var PriceBoundaryChip = ({
727
758
  children: "+"
728
759
  }
729
760
  ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { fontSize: "16px", color: "#737373" }, children: "-" }),
730
- (!showAddWhenEmpty || showAddWhenEmpty && isEditing) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { color: "#737373", fontSize: "12px" }, children: currency }),
761
+ (!showAddWhenEmpty || showAddWhenEmpty && isEditing) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
762
+ "span",
763
+ {
764
+ style: {
765
+ fontWeight: 600,
766
+ fontSize: "10px",
767
+ textTransform: "uppercase",
768
+ letterSpacing: "0.05em"
769
+ },
770
+ children: currency
771
+ }
772
+ ),
731
773
  !isEditing && (!showAddWhenEmpty || hasValue) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
732
774
  "button",
733
775
  {
@@ -812,7 +854,7 @@ var chipStyles3 = {
812
854
  borderRadius: "9999px",
813
855
  padding: "0 16px",
814
856
  paddingRight: "20px",
815
- border: "1px solid #03852e",
857
+ border: "1px solid #012b11",
816
858
  display: "flex",
817
859
  alignItems: "center",
818
860
  gap: "16px",
@@ -921,7 +963,7 @@ var chipStyles4 = {
921
963
  borderRadius: "9999px",
922
964
  padding: "0 16px",
923
965
  paddingRight: "20px",
924
- border: "1px solid #03852e",
966
+ border: "1px solid #012b11",
925
967
  display: "flex",
926
968
  alignItems: "center",
927
969
  gap: "8px",
@@ -1104,8 +1146,8 @@ var navButtonStyles = {
1104
1146
  top: "50%",
1105
1147
  transform: "translateY(-50%)",
1106
1148
  backgroundColor: "white",
1107
- color: "#003c30",
1108
- border: "1px solid #003c30",
1149
+ color: "#012b11",
1150
+ border: "1px solid #012b11",
1109
1151
  padding: "4px",
1110
1152
  borderRadius: "50%",
1111
1153
  display: "flex",
@@ -1123,7 +1165,7 @@ var FilterChips = ({
1123
1165
  nextFiltersLabel,
1124
1166
  formatCurrency: _formatCurrency,
1125
1167
  onFilterChange,
1126
- onResetFilters: _onResetFilters,
1168
+ onResetFilters,
1127
1169
  onClearAll
1128
1170
  }) => {
1129
1171
  const { scrollerRef, atStart, atEnd, scrollByDir } = useFilterScroll(
@@ -1154,7 +1196,6 @@ var FilterChips = ({
1154
1196
  style: {
1155
1197
  ...scrollContainerBase,
1156
1198
  padding: "8px",
1157
- // Hide scrollbar for webkit browsers
1158
1199
  WebkitOverflowScrolling: "touch"
1159
1200
  },
1160
1201
  children: [
@@ -1163,6 +1204,29 @@ var FilterChips = ({
1163
1204
  display: none;
1164
1205
  }
1165
1206
  ` }),
1207
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1208
+ "button",
1209
+ {
1210
+ style: {
1211
+ flexShrink: 0,
1212
+ backgroundColor: "#01ea5b",
1213
+ borderRadius: "50%",
1214
+ padding: "8px",
1215
+ cursor: "pointer",
1216
+ border: "none",
1217
+ display: "flex",
1218
+ alignItems: "center",
1219
+ justifyContent: "center"
1220
+ },
1221
+ onClick: onResetFilters,
1222
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1223
+ SearchIcon,
1224
+ {
1225
+ style: { width: "20px", height: "20px", color: "#012b11" }
1226
+ }
1227
+ )
1228
+ }
1229
+ ),
1166
1230
  filters.map((filter) => {
1167
1231
  var _a, _b;
1168
1232
  const renderStandardChip = () => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -1247,9 +1311,9 @@ var FilterChips = ({
1247
1311
  cursor: "pointer",
1248
1312
  fontSize: "14px",
1249
1313
  userSelect: "none",
1250
- backgroundColor: clearHover ? "#eee" : "white",
1314
+ backgroundColor: clearHover ? "#e5e5e5" : "transparent",
1251
1315
  color: "black",
1252
- border: "1px solid #03852e"
1316
+ border: "none"
1253
1317
  },
1254
1318
  onClick: onClearAll,
1255
1319
  onMouseEnter: () => setClearHover(true),
package/dist/index.mjs CHANGED
@@ -124,7 +124,7 @@ var closeButtonStyles = {
124
124
  padding: "2px",
125
125
  borderRadius: "50%",
126
126
  backgroundColor: "white",
127
- border: "1px solid #03852e",
127
+ border: "1px solid #012b11",
128
128
  cursor: "pointer",
129
129
  display: "flex",
130
130
  alignItems: "center",
@@ -164,7 +164,7 @@ var chipStyles = {
164
164
  borderRadius: "9999px",
165
165
  padding: "0 16px",
166
166
  paddingRight: "20px",
167
- border: "1px solid #03852e",
167
+ border: "1px solid #012b11",
168
168
  display: "flex",
169
169
  alignItems: "center",
170
170
  gap: "8px",
@@ -319,7 +319,7 @@ var chipContainerStyles = {
319
319
  borderRadius: "9999px",
320
320
  padding: "0 16px",
321
321
  paddingRight: "20px",
322
- border: "1px solid #03852e",
322
+ border: "1px solid #012b11",
323
323
  display: "flex",
324
324
  gap: "8px",
325
325
  alignItems: "center",
@@ -401,15 +401,43 @@ var MinRatingFilterChip = ({ rating, onChange, onRemove, star = false }) => {
401
401
  height: "16px"
402
402
  },
403
403
  children: [
404
- /* @__PURE__ */ jsx5(
405
- StarIcon,
404
+ /* @__PURE__ */ jsxs4(
405
+ "svg",
406
406
  {
407
- fill: displayRating >= starNumber ? "#03852e" : "none",
407
+ viewBox: "0 0 24 24",
408
408
  style: {
409
409
  width: "16px",
410
410
  height: "16px",
411
411
  pointerEvents: "none"
412
- }
412
+ },
413
+ xmlns: "http://www.w3.org/2000/svg",
414
+ children: [
415
+ /* @__PURE__ */ jsx5("defs", { children: /* @__PURE__ */ jsxs4("linearGradient", { id: `star-gradient-${index}`, children: [
416
+ /* @__PURE__ */ jsx5(
417
+ "stop",
418
+ {
419
+ offset: fillState === "half" ? "50%" : "0%",
420
+ stopColor: "#03852e"
421
+ }
422
+ ),
423
+ /* @__PURE__ */ jsx5(
424
+ "stop",
425
+ {
426
+ offset: fillState === "half" ? "50%" : "0%",
427
+ stopColor: "transparent"
428
+ }
429
+ )
430
+ ] }) }),
431
+ /* @__PURE__ */ jsx5(
432
+ "path",
433
+ {
434
+ d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
435
+ fill: fillState === "full" ? "#03852e" : fillState === "half" ? `url(#star-gradient-${index})` : "transparent",
436
+ stroke: "#03852e",
437
+ strokeWidth: "1"
438
+ }
439
+ )
440
+ ]
413
441
  }
414
442
  ),
415
443
  /* @__PURE__ */ jsx5(
@@ -535,7 +563,7 @@ var chipStyles2 = {
535
563
  fontSize: "14px",
536
564
  borderRadius: "9999px",
537
565
  padding: "0 16px",
538
- border: "1px solid #03852e",
566
+ border: "1px solid #012b11",
539
567
  display: "flex",
540
568
  alignItems: "center",
541
569
  gap: "8px",
@@ -664,10 +692,13 @@ var PriceBoundaryChip = ({
664
692
  style: inputStyles,
665
693
  autoFocus: true
666
694
  }
667
- ) : hasValue ? /* @__PURE__ */ jsxs5("span", { style: { fontSize: "16px" }, children: [
668
- currency,
669
- value
670
- ] }) : showAddWhenEmpty ? /* @__PURE__ */ jsx6(
695
+ ) : hasValue ? /* @__PURE__ */ jsx6(
696
+ "span",
697
+ {
698
+ style: { fontSize: "16px", fontWeight: 600, textAlign: "center" },
699
+ children: value
700
+ }
701
+ ) : showAddWhenEmpty ? /* @__PURE__ */ jsx6(
671
702
  "button",
672
703
  {
673
704
  type: "button",
@@ -684,7 +715,18 @@ var PriceBoundaryChip = ({
684
715
  children: "+"
685
716
  }
686
717
  ) : /* @__PURE__ */ jsx6("span", { style: { fontSize: "16px", color: "#737373" }, children: "-" }),
687
- (!showAddWhenEmpty || showAddWhenEmpty && isEditing) && /* @__PURE__ */ jsx6("span", { style: { color: "#737373", fontSize: "12px" }, children: currency }),
718
+ (!showAddWhenEmpty || showAddWhenEmpty && isEditing) && /* @__PURE__ */ jsx6(
719
+ "span",
720
+ {
721
+ style: {
722
+ fontWeight: 600,
723
+ fontSize: "10px",
724
+ textTransform: "uppercase",
725
+ letterSpacing: "0.05em"
726
+ },
727
+ children: currency
728
+ }
729
+ ),
688
730
  !isEditing && (!showAddWhenEmpty || hasValue) && /* @__PURE__ */ jsx6(
689
731
  "button",
690
732
  {
@@ -769,7 +811,7 @@ var chipStyles3 = {
769
811
  borderRadius: "9999px",
770
812
  padding: "0 16px",
771
813
  paddingRight: "20px",
772
- border: "1px solid #03852e",
814
+ border: "1px solid #012b11",
773
815
  display: "flex",
774
816
  alignItems: "center",
775
817
  gap: "16px",
@@ -882,7 +924,7 @@ var chipStyles4 = {
882
924
  borderRadius: "9999px",
883
925
  padding: "0 16px",
884
926
  paddingRight: "20px",
885
- border: "1px solid #03852e",
927
+ border: "1px solid #012b11",
886
928
  display: "flex",
887
929
  alignItems: "center",
888
930
  gap: "8px",
@@ -1065,8 +1107,8 @@ var navButtonStyles = {
1065
1107
  top: "50%",
1066
1108
  transform: "translateY(-50%)",
1067
1109
  backgroundColor: "white",
1068
- color: "#003c30",
1069
- border: "1px solid #003c30",
1110
+ color: "#012b11",
1111
+ border: "1px solid #012b11",
1070
1112
  padding: "4px",
1071
1113
  borderRadius: "50%",
1072
1114
  display: "flex",
@@ -1084,7 +1126,7 @@ var FilterChips = ({
1084
1126
  nextFiltersLabel,
1085
1127
  formatCurrency: _formatCurrency,
1086
1128
  onFilterChange,
1087
- onResetFilters: _onResetFilters,
1129
+ onResetFilters,
1088
1130
  onClearAll
1089
1131
  }) => {
1090
1132
  const { scrollerRef, atStart, atEnd, scrollByDir } = useFilterScroll(
@@ -1115,7 +1157,6 @@ var FilterChips = ({
1115
1157
  style: {
1116
1158
  ...scrollContainerBase,
1117
1159
  padding: "8px",
1118
- // Hide scrollbar for webkit browsers
1119
1160
  WebkitOverflowScrolling: "touch"
1120
1161
  },
1121
1162
  children: [
@@ -1124,6 +1165,29 @@ var FilterChips = ({
1124
1165
  display: none;
1125
1166
  }
1126
1167
  ` }),
1168
+ /* @__PURE__ */ jsx9(
1169
+ "button",
1170
+ {
1171
+ style: {
1172
+ flexShrink: 0,
1173
+ backgroundColor: "#01ea5b",
1174
+ borderRadius: "50%",
1175
+ padding: "8px",
1176
+ cursor: "pointer",
1177
+ border: "none",
1178
+ display: "flex",
1179
+ alignItems: "center",
1180
+ justifyContent: "center"
1181
+ },
1182
+ onClick: onResetFilters,
1183
+ children: /* @__PURE__ */ jsx9(
1184
+ SearchIcon,
1185
+ {
1186
+ style: { width: "20px", height: "20px", color: "#012b11" }
1187
+ }
1188
+ )
1189
+ }
1190
+ ),
1127
1191
  filters.map((filter) => {
1128
1192
  var _a, _b;
1129
1193
  const renderStandardChip = () => /* @__PURE__ */ jsx9(
@@ -1208,9 +1272,9 @@ var FilterChips = ({
1208
1272
  cursor: "pointer",
1209
1273
  fontSize: "14px",
1210
1274
  userSelect: "none",
1211
- backgroundColor: clearHover ? "#eee" : "white",
1275
+ backgroundColor: clearHover ? "#e5e5e5" : "transparent",
1212
1276
  color: "black",
1213
- border: "1px solid #03852e"
1277
+ border: "none"
1214
1278
  },
1215
1279
  onClick: onClearAll,
1216
1280
  onMouseEnter: () => setClearHover(true),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapfirst.ai/react",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "description": "React hooks for MapFirst SDK - Reactive state management for map properties",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",