@react-fabric/searchbar 1.0.0-beta.61 → 1.0.0-beta.63

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 (32) hide show
  1. package/dist/cjs/filterbar/FilterEdit.js +1 -1
  2. package/dist/cjs/filterbar/FilterForm.js +1 -1
  3. package/dist/cjs/filterbar/FilterView.js +2 -2
  4. package/dist/cjs/filterbar/QueryForm.js +1 -1
  5. package/dist/cjs/i18n/{ar.json.js → ar/searchbar.json.js} +1 -0
  6. package/dist/cjs/i18n/index.js +4 -4
  7. package/dist/cjs/searchbar/SearchBar.js +1 -1
  8. package/dist/cjs/types/index.js +1 -0
  9. package/dist/esm/filterbar/FilterEdit.js +1 -1
  10. package/dist/esm/filterbar/FilterForm.js +1 -1
  11. package/dist/esm/filterbar/FilterView.js +2 -2
  12. package/dist/esm/filterbar/QueryForm.js +1 -1
  13. package/dist/esm/i18n/{ar.json.js → ar/searchbar.json.js} +1 -0
  14. package/dist/esm/i18n/index.js +2 -2
  15. package/dist/esm/searchbar/SearchBar.js +1 -1
  16. package/dist/esm/types/index.js +1 -0
  17. package/dist/types/filterbar/FilterBar.d.ts +1 -1
  18. package/dist/types/searchbar/SearchBar.d.ts +1 -1
  19. package/dist/types/types/index.d.ts +2 -2
  20. package/package.json +15 -15
  21. package/src/filterbar/FilterBar.tsx +1 -1
  22. package/src/filterbar/FilterEdit.tsx +1 -1
  23. package/src/filterbar/FilterForm.tsx +1 -1
  24. package/src/filterbar/FilterView.tsx +2 -2
  25. package/src/filterbar/QueryForm.tsx +1 -1
  26. package/src/i18n/{ar.json → ar/searchbar.json} +1 -0
  27. package/src/i18n/index.ts +2 -2
  28. package/src/searchbar/SearchBar.tsx +1 -1
  29. package/src/types/index.ts +2 -2
  30. /package/dist/cjs/i18n/{en.json.js → en/searchbar.json.js} +0 -0
  31. /package/dist/esm/i18n/{en.json.js → en/searchbar.json.js} +0 -0
  32. /package/src/i18n/{en.json → en/searchbar.json} +0 -0
@@ -25,7 +25,7 @@ var FilterEdit = function FilterEdit(_ref) {
25
25
  setQueryEdit(!!filter && "query" in filter);
26
26
  }, [filter]);
27
27
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
28
- className: "px-2 py-1 bg-base outline min-w-[420px]",
28
+ className: "px-2 py-1 bg-default outline min-w-[420px]",
29
29
  children: [!utilities.isEmpty(fields) && /*#__PURE__*/jsxRuntime.jsx("div", {
30
30
  className: "pb-4 flex justify-end",
31
31
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
@@ -359,7 +359,7 @@ var FilterForm = function FilterForm(_ref) {
359
359
  })
360
360
  })
361
361
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
362
- className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-base",
362
+ className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-default",
363
363
  children: [onRemove && /*#__PURE__*/jsxRuntime.jsx("div", {
364
364
  className: "flex-1",
365
365
  children: /*#__PURE__*/jsxRuntime.jsx(core.Button, {
@@ -68,7 +68,7 @@ var FilterView = function FilterView(_ref) {
68
68
  return "";
69
69
  }, [filter]);
70
70
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
71
- className: "p-2 bg-base relative",
71
+ className: "p-2 bg-default relative",
72
72
  children: ["query" in filter && /*#__PURE__*/jsxRuntime.jsx("div", {
73
73
  className: "absolute top-2 end-2 z-10",
74
74
  children: /*#__PURE__*/jsxRuntime.jsx(core.Copy, {
@@ -76,7 +76,7 @@ var FilterView = function FilterView(_ref) {
76
76
  text: view
77
77
  })
78
78
  }), /*#__PURE__*/jsxRuntime.jsx("pre", {
79
- className: "overflow-auto bg-base outline text-sm p-2 max-h-96 max-w-3xl min-w-[24rem]",
79
+ className: "overflow-auto bg-default outline text-sm p-2 max-h-96 max-w-3xl min-w-[24rem]",
80
80
  children: view
81
81
  }), !filter.required && /*#__PURE__*/jsxRuntime.jsx(core.Button, {
82
82
  size: "sm",
@@ -113,7 +113,7 @@ var QueryForm = function QueryForm(_ref) {
113
113
  });
114
114
  }
115
115
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
116
- className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-base",
116
+ className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-default",
117
117
  children: [onRemove && /*#__PURE__*/jsxRuntime.jsx("div", {
118
118
  className: "flex-1",
119
119
  children: /*#__PURE__*/jsxRuntime.jsx(core.Button, {
@@ -44,6 +44,7 @@ var operator = {
44
44
  ANY: "أي من",
45
45
  BETWEEN: "بين هذا وذاك",
46
46
  ENDS: "ينتهي مع",
47
+ EQ: "=",
47
48
  EXISTS: "موجود",
48
49
  GT: ">",
49
50
  GTE: "≥",
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var core = require('@react-fabric/core');
4
- var ar = require('./ar.json.js');
5
- var en = require('./en.json.js');
4
+ var searchbar$1 = require('./ar/searchbar.json.js');
5
+ var searchbar = require('./en/searchbar.json.js');
6
6
 
7
7
  /*
8
8
  * React Fabric
@@ -28,6 +28,6 @@ var en = require('./en.json.js');
28
28
  */
29
29
 
30
30
  core.addTranslationBundle("searchbar", {
31
- en: en.default,
32
- ar: ar.default
31
+ en: searchbar.default,
32
+ ar: searchbar$1.default
33
33
  });
@@ -22,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
22
  * It can be collapsed to hide filters and has options for customization.
23
23
  *
24
24
  * @param {SearchBarProps} props - The properties for the SearchBar component.
25
- * @returns {JSX.Element} The rendered SearchBar component.
25
+ * @returns {React.ReactElement} The rendered SearchBar component.
26
26
  *
27
27
  * @example
28
28
  * ```jsx
@@ -35,6 +35,7 @@ var FIELD_TYPE = /*#__PURE__*/function (FIELD_TYPE) {
35
35
  FIELD_TYPE["BOOLEAN"] = "BOOLEAN";
36
36
  FIELD_TYPE["DATE"] = "DATE";
37
37
  FIELD_TYPE["DATETIME"] = "DATETIME";
38
+ // GEO = "GEO",
38
39
  FIELD_TYPE["NONE"] = "NONE";
39
40
  return FIELD_TYPE;
40
41
  }({});
@@ -25,7 +25,7 @@ var FilterEdit = function FilterEdit(_ref) {
25
25
  setQueryEdit(!!filter && "query" in filter);
26
26
  }, [filter]);
27
27
  return /*#__PURE__*/jsxs("div", {
28
- className: "px-2 py-1 bg-base outline min-w-[420px]",
28
+ className: "px-2 py-1 bg-default outline min-w-[420px]",
29
29
  children: [!isEmpty(fields) && /*#__PURE__*/jsx("div", {
30
30
  className: "pb-4 flex justify-end",
31
31
  children: /*#__PURE__*/jsx("span", {
@@ -359,7 +359,7 @@ var FilterForm = function FilterForm(_ref) {
359
359
  })
360
360
  })
361
361
  }), /*#__PURE__*/jsxs("div", {
362
- className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-base",
362
+ className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-default",
363
363
  children: [onRemove && /*#__PURE__*/jsx("div", {
364
364
  className: "flex-1",
365
365
  children: /*#__PURE__*/jsx(Button, {
@@ -68,7 +68,7 @@ var FilterView = function FilterView(_ref) {
68
68
  return "";
69
69
  }, [filter]);
70
70
  return /*#__PURE__*/jsxs("div", {
71
- className: "p-2 bg-base relative",
71
+ className: "p-2 bg-default relative",
72
72
  children: ["query" in filter && /*#__PURE__*/jsx("div", {
73
73
  className: "absolute top-2 end-2 z-10",
74
74
  children: /*#__PURE__*/jsx(Copy, {
@@ -76,7 +76,7 @@ var FilterView = function FilterView(_ref) {
76
76
  text: view
77
77
  })
78
78
  }), /*#__PURE__*/jsx("pre", {
79
- className: "overflow-auto bg-base outline text-sm p-2 max-h-96 max-w-3xl min-w-[24rem]",
79
+ className: "overflow-auto bg-default outline text-sm p-2 max-h-96 max-w-3xl min-w-[24rem]",
80
80
  children: view
81
81
  }), !filter.required && /*#__PURE__*/jsx(Button, {
82
82
  size: "sm",
@@ -113,7 +113,7 @@ var QueryForm = function QueryForm(_ref) {
113
113
  });
114
114
  }
115
115
  }), /*#__PURE__*/jsxs("div", {
116
- className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-base",
116
+ className: "flex mt-4 justify-end gap-1 sticky bottom-1 bg-default",
117
117
  children: [onRemove && /*#__PURE__*/jsx("div", {
118
118
  className: "flex-1",
119
119
  children: /*#__PURE__*/jsx(Button, {
@@ -42,6 +42,7 @@ var operator = {
42
42
  ANY: "أي من",
43
43
  BETWEEN: "بين هذا وذاك",
44
44
  ENDS: "ينتهي مع",
45
+ EQ: "=",
45
46
  EXISTS: "موجود",
46
47
  GT: ">",
47
48
  GTE: "≥",
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { addTranslationBundle } from '@react-fabric/core';
4
- import ar from './ar.json.js';
5
- import en from './en.json.js';
4
+ import ar from './ar/searchbar.json.js';
5
+ import en from './en/searchbar.json.js';
6
6
 
7
7
  /*
8
8
  * React Fabric
@@ -22,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
22
  * It can be collapsed to hide filters and has options for customization.
23
23
  *
24
24
  * @param {SearchBarProps} props - The properties for the SearchBar component.
25
- * @returns {JSX.Element} The rendered SearchBar component.
25
+ * @returns {React.ReactElement} The rendered SearchBar component.
26
26
  *
27
27
  * @example
28
28
  * ```jsx
@@ -35,6 +35,7 @@ var FIELD_TYPE = /*#__PURE__*/function (FIELD_TYPE) {
35
35
  FIELD_TYPE["BOOLEAN"] = "BOOLEAN";
36
36
  FIELD_TYPE["DATE"] = "DATE";
37
37
  FIELD_TYPE["DATETIME"] = "DATETIME";
38
+ // GEO = "GEO",
38
39
  FIELD_TYPE["NONE"] = "NONE";
39
40
  return FIELD_TYPE;
40
41
  }({});
@@ -6,7 +6,7 @@ import { type FilterBarProps } from "../types";
6
6
  * It also supports toggling between included and excluded filters.
7
7
  *
8
8
  * @param {FilterBarProps} props - The properties for the FilterBar component.
9
- * @returns {JSX.Element} The rendered FilterBar component.
9
+ * @returns {React.ReactElement} The rendered FilterBar component.
10
10
  *
11
11
  * @example
12
12
  * ```jsx
@@ -6,7 +6,7 @@ import { type FilterBarProps, type SearchBarProps } from "../types";
6
6
  * It can be collapsed to hide filters and has options for customization.
7
7
  *
8
8
  * @param {SearchBarProps} props - The properties for the SearchBar component.
9
- * @returns {JSX.Element} The rendered SearchBar component.
9
+ * @returns {React.ReactElement} The rendered SearchBar component.
10
10
  *
11
11
  * @example
12
12
  * ```jsx
@@ -135,11 +135,11 @@ interface BaseSearchBarProps extends Partial<ChildrenProp>, RefProp<HTMLInputEle
135
135
  /**
136
136
  *
137
137
  */
138
- decorateStart?: JSX.Element | string | number | boolean;
138
+ decorateStart?: React.ReactElement | string | number | boolean;
139
139
  /**
140
140
  *
141
141
  */
142
- decorateEnd?: JSX.Element | string | number | boolean;
142
+ decorateEnd?: React.ReactElement | string | number | boolean;
143
143
  /**
144
144
  * On filter collapsed
145
145
  * @param collapsed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/searchbar",
3
- "version": "1.0.0-beta.61",
3
+ "version": "1.0.0-beta.63",
4
4
  "description": "RUF: Searchbar with filters package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -33,27 +33,27 @@
33
33
  "watch": "npm-run-all -p watch:rollup watch:dts"
34
34
  },
35
35
  "dependencies": {
36
- "@floating-ui/react": "~0.27.16",
36
+ "@floating-ui/react": "~0.27.19",
37
37
  "@hookform/resolvers": "~5.2.2",
38
- "@react-fabric/core": "^1.0.0-beta.61",
39
- "@react-fabric/form": "^1.0.0-beta.61",
40
- "@react-fabric/monaco": "^1.0.0-beta.61",
41
- "@react-fabric/utilities": "^1.0.0-beta.61",
38
+ "@react-fabric/core": "^1.0.0-beta.63",
39
+ "@react-fabric/form": "^1.0.0-beta.63",
40
+ "@react-fabric/monaco": "^1.0.0-beta.63",
41
+ "@react-fabric/utilities": "^1.0.0-beta.63",
42
42
  "classnames": "~2.5.1",
43
- "react-hook-form": "~7.65.0"
43
+ "react-hook-form": "~7.71.2"
44
44
  },
45
45
  "peerDependencies": {
46
- "i18next": "~25.6.0",
47
- "react": "~19.2.0",
48
- "react-dom": "~19.2.0",
49
- "react-i18next": "~16.2.1"
46
+ "i18next": "~25.8.18",
47
+ "react": "~19.2.4",
48
+ "react-dom": "~19.2.4",
49
+ "react-i18next": "~16.5.8"
50
50
  },
51
51
  "devDependencies": {
52
- "@react-fabric/superdate": "^1.0.0-beta.61"
52
+ "@react-fabric/superdate": "^1.0.0-beta.63"
53
53
  },
54
54
  "engines": {
55
- "node": ">=18.12.0",
56
- "npm": ">=8.19.0"
55
+ "node": ">=22.18.0",
56
+ "npm": ">=10.8.0"
57
57
  },
58
- "gitHead": "a0b0c571bf9c189fa3355bbc3b896ecc4b9d6a04"
58
+ "gitHead": "6e0652b15c6384fbc316842862572e21299a5466"
59
59
  }
@@ -45,7 +45,7 @@ import { FilterTag } from "./FilterTag";
45
45
  * It also supports toggling between included and excluded filters.
46
46
  *
47
47
  * @param {FilterBarProps} props - The properties for the FilterBar component.
48
- * @returns {JSX.Element} The rendered FilterBar component.
48
+ * @returns {React.ReactElement} The rendered FilterBar component.
49
49
  *
50
50
  * @example
51
51
  * ```jsx
@@ -47,7 +47,7 @@ export const FilterEdit = ({
47
47
  }, [filter]);
48
48
 
49
49
  return (
50
- <div className="px-2 py-1 bg-base outline min-w-[420px]">
50
+ <div className="px-2 py-1 bg-default outline min-w-[420px]">
51
51
  {!isEmpty(fields) && (
52
52
  <div className="pb-4 flex justify-end">
53
53
  <span
@@ -359,7 +359,7 @@ export const FilterForm = ({
359
359
  }
360
360
  />
361
361
  </Controller>
362
- <div className="flex mt-4 justify-end gap-1 sticky bottom-1 bg-base">
362
+ <div className="flex mt-4 justify-end gap-1 sticky bottom-1 bg-default">
363
363
  {onRemove && (
364
364
  <div className="flex-1">
365
365
  <Button
@@ -67,13 +67,13 @@ export const FilterView = ({
67
67
  }, [filter]);
68
68
 
69
69
  return (
70
- <div className="p-2 bg-base relative">
70
+ <div className="p-2 bg-default relative">
71
71
  {"query" in filter && (
72
72
  <div className="absolute top-2 end-2 z-10">
73
73
  <Copy size="sm" text={view as AnyObject} />
74
74
  </div>
75
75
  )}
76
- <pre className="overflow-auto bg-base outline text-sm p-2 max-h-96 max-w-3xl min-w-[24rem]">
76
+ <pre className="overflow-auto bg-default outline text-sm p-2 max-h-96 max-w-3xl min-w-[24rem]">
77
77
  {view}
78
78
  </pre>
79
79
  {!filter.required && (
@@ -137,7 +137,7 @@ export const QueryForm = ({
137
137
  </div>
138
138
  )}
139
139
  </Controller>
140
- <div className="flex mt-4 justify-end gap-1 sticky bottom-1 bg-base">
140
+ <div className="flex mt-4 justify-end gap-1 sticky bottom-1 bg-default">
141
141
  {onRemove && (
142
142
  <div className="flex-1">
143
143
  <Button
@@ -41,6 +41,7 @@
41
41
  "ANY": "أي من",
42
42
  "BETWEEN": "بين هذا وذاك",
43
43
  "ENDS": "ينتهي مع",
44
+ "EQ": "=",
44
45
  "EXISTS": "موجود",
45
46
  "GT": ">",
46
47
  "GTE": "≥",
package/src/i18n/index.ts CHANGED
@@ -22,7 +22,7 @@
22
22
  */
23
23
 
24
24
  import { addTranslationBundle } from "@react-fabric/core";
25
- import ar from "./ar.json";
26
- import en from "./en.json";
25
+ import ar from "./ar/searchbar.json";
26
+ import en from "./en/searchbar.json";
27
27
 
28
28
  addTranslationBundle("searchbar", { en, ar });
@@ -52,7 +52,7 @@ type SearchActions =
52
52
  * It can be collapsed to hide filters and has options for customization.
53
53
  *
54
54
  * @param {SearchBarProps} props - The properties for the SearchBar component.
55
- * @returns {JSX.Element} The rendered SearchBar component.
55
+ * @returns {React.ReactElement} The rendered SearchBar component.
56
56
  *
57
57
  * @example
58
58
  * ```jsx
@@ -255,11 +255,11 @@ interface BaseSearchBarProps
255
255
  /**
256
256
  *
257
257
  */
258
- decorateStart?: JSX.Element | string | number | boolean;
258
+ decorateStart?: React.ReactElement | string | number | boolean;
259
259
  /**
260
260
  *
261
261
  */
262
- decorateEnd?: JSX.Element | string | number | boolean;
262
+ decorateEnd?: React.ReactElement | string | number | boolean;
263
263
  /**
264
264
  * On filter collapsed
265
265
  * @param collapsed
File without changes