@react-fabric/searchbar 1.0.0-beta.53 → 1.0.0-beta.54

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.
@@ -84,7 +84,10 @@ var FilterTag = function FilterTag(_ref) {
84
84
  children: [filter.pinned && /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
85
85
  className: "flex-content",
86
86
  icon: (_filter$icon = filter.icon) !== null && _filter$icon !== void 0 ? _filter$icon : core.CoreIcons.pin
87
- }), label]
87
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
88
+ className: "truncate flex gap-x-0.5 flex-nowrap",
89
+ children: label
90
+ })]
88
91
  })
89
92
  }), /*#__PURE__*/jsxRuntime.jsx(FilterMenu.FilterMenu, {
90
93
  filter: filter,
@@ -113,7 +113,7 @@ var SearchBar = function SearchBar(_ref) {
113
113
  var _action$query, _action$query2;
114
114
  !multiple && fireSearch((_action$query = action.query) !== null && _action$query !== void 0 ? _action$query : emptyValue, state.filters);
115
115
  return _objectSpread(_objectSpread({}, state), {}, {
116
- dirty: false,
116
+ dirty: !!multiple,
117
117
  query: (_action$query2 = action.query) !== null && _action$query2 !== void 0 ? _action$query2 : emptyValue
118
118
  });
119
119
  }
@@ -181,7 +181,7 @@ var SearchBar = function SearchBar(_ref) {
181
181
  onInput: function onInput() {
182
182
  return dispatch({
183
183
  type: "dirty",
184
- dirty: true
184
+ dirty: !multiple
185
185
  });
186
186
  },
187
187
  onSelect: updateHistory,
@@ -84,7 +84,10 @@ var FilterTag = function FilterTag(_ref) {
84
84
  children: [filter.pinned && /*#__PURE__*/jsx(Icon, {
85
85
  className: "flex-content",
86
86
  icon: (_filter$icon = filter.icon) !== null && _filter$icon !== void 0 ? _filter$icon : CoreIcons.pin
87
- }), label]
87
+ }), /*#__PURE__*/jsx("div", {
88
+ className: "truncate flex gap-x-0.5 flex-nowrap",
89
+ children: label
90
+ })]
88
91
  })
89
92
  }), /*#__PURE__*/jsx(FilterMenu, {
90
93
  filter: filter,
@@ -113,7 +113,7 @@ var SearchBar = function SearchBar(_ref) {
113
113
  var _action$query, _action$query2;
114
114
  !multiple && fireSearch((_action$query = action.query) !== null && _action$query !== void 0 ? _action$query : emptyValue, state.filters);
115
115
  return _objectSpread(_objectSpread({}, state), {}, {
116
- dirty: false,
116
+ dirty: !!multiple,
117
117
  query: (_action$query2 = action.query) !== null && _action$query2 !== void 0 ? _action$query2 : emptyValue
118
118
  });
119
119
  }
@@ -181,7 +181,7 @@ var SearchBar = function SearchBar(_ref) {
181
181
  onInput: function onInput() {
182
182
  return dispatch({
183
183
  type: "dirty",
184
- dirty: true
184
+ dirty: !multiple
185
185
  });
186
186
  },
187
187
  onSelect: updateHistory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/searchbar",
3
- "version": "1.0.0-beta.53",
3
+ "version": "1.0.0-beta.54",
4
4
  "description": "RUF: Searchbar with filters package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -34,9 +34,9 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@floating-ui/react": "^0.27.9",
37
- "@react-fabric/core": "^1.0.0-beta.53",
38
- "@react-fabric/form": "^1.0.0-beta.53",
39
- "@react-fabric/monaco": "^1.0.0-beta.53",
37
+ "@react-fabric/core": "^1.0.0-beta.54",
38
+ "@react-fabric/form": "^1.0.0-beta.54",
39
+ "@react-fabric/monaco": "^1.0.0-beta.54",
40
40
  "@react-fabric/utilities": "^1.0.0-beta.52",
41
41
  "classnames": "^2.5.1",
42
42
  "react-hook-form": "^7.56.4"
@@ -48,11 +48,11 @@
48
48
  "react-i18next": "^15.5.2"
49
49
  },
50
50
  "devDependencies": {
51
- "@react-fabric/superdate": "^1.0.0-beta.53"
51
+ "@react-fabric/superdate": "^1.0.0-beta.54"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=18.12.0",
55
55
  "npm": ">=8.19.0"
56
56
  },
57
- "gitHead": "1042327831f9c908912c552d5c2704b765a6f9c2"
57
+ "gitHead": "242f15e3de29d365cce6f41f4ef99ab36bb6b995"
58
58
  }
@@ -118,7 +118,7 @@ export const FilterTag = ({
118
118
  icon={filter.icon ?? CoreIcons.pin}
119
119
  />
120
120
  )}
121
- {label}
121
+ <div className="truncate flex gap-x-0.5 flex-nowrap">{label}</div>
122
122
  </div>
123
123
  </Chip>
124
124
  <FilterMenu
@@ -135,7 +135,11 @@ export const SearchBar = ({
135
135
  }
136
136
  if (action.type === "query") {
137
137
  !multiple && fireSearch(action.query ?? emptyValue, state.filters);
138
- return { ...state, dirty: false, query: action.query ?? emptyValue };
138
+ return {
139
+ ...state,
140
+ dirty: !!multiple,
141
+ query: action.query ?? emptyValue,
142
+ };
139
143
  }
140
144
  if (action.type === "filter") {
141
145
  fireSearch(state.query, action.filters ?? []);
@@ -187,7 +191,7 @@ export const SearchBar = ({
187
191
  value={state.query}
188
192
  decorateEnd={decorateEnd}
189
193
  decorateStart={decorateStart}
190
- onInput={() => dispatch({ type: "dirty", dirty: true })}
194
+ onInput={() => dispatch({ type: "dirty", dirty: !multiple })}
191
195
  onSelect={updateHistory}
192
196
  data-ref="searchbarInput"
193
197
  onEnterPressed={() => fireSearch(state.query, state.filters)}