@edifice.io/react 2.2.2-develop-b2school.20250404170224 → 2.2.2-develop-b2school.20250407165159

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.
@@ -1,11 +1,11 @@
1
1
  import { ChangeEvent, ReactNode } from 'react';
2
2
  export interface ComboboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
- onSearchResultsChange: (model: (string | number)[]) => void;
4
3
  onSearchInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
5
4
  options: OptionListItemType[];
6
5
  value: string;
7
6
  isLoading: boolean;
8
7
  noResult: boolean;
8
+ onSearchResultsChange?: (model: (string | number)[]) => void;
9
9
  searchMinLength?: number;
10
10
  placeholder?: string;
11
11
  variant?: 'outline' | 'ghost';
@@ -24,7 +24,7 @@ const Combobox = ({
24
24
  t
25
25
  } = useTranslation(), [localValue, setLocalValue] = useState([]);
26
26
  useEffect(() => {
27
- onSearchResultsChange(localValue);
27
+ onSearchResultsChange == null || onSearchResultsChange(localValue);
28
28
  }, [localValue]);
29
29
  const handleOptionClick = (value2) => {
30
30
  setLocalValue([value2]);
@@ -20,7 +20,7 @@ const ComboboxTrigger = ({
20
20
  setVisible
21
21
  } = useDropdownContext(), containerProps = {
22
22
  ...triggerProps,
23
- className: clsx("d-flex align-items-center flex-wrap combobox-trigger", renderInputGroup ? "input-group" : "", triggerProps.className),
23
+ className: clsx("d-flex combobox-trigger", renderInputGroup ? "input-group flex-nowrap align-items-start" : "flex-wrap align-items-center", triggerProps.className),
24
24
  onClick: (event) => {
25
25
  event.stopPropagation();
26
26
  }
@@ -33,13 +33,15 @@ const ComboboxTrigger = ({
33
33
  const input = event.target;
34
34
  setVisible(input.value.length >= searchMinLength || !!hasDefault), input.focus();
35
35
  }
36
- }, classNameVariant = variant === "ghost" ? " border-0" : "", classNameInput = clsx(classNameVariant, renderSelectedItems ? " w-auto " : "");
36
+ }, classNameVariant = variant === "ghost" ? " border-0" : "", classNameInput = clsx(classNameVariant, renderSelectedItems ? "flex-fill w-auto " : "");
37
37
  return useEffect(() => {
38
38
  setVisible(value.length >= searchMinLength);
39
39
  }, [value, searchMinLength]), /* @__PURE__ */ jsxs(FormControl, { id: "search", ...containerProps, children: [
40
40
  !!renderInputGroup && /* @__PURE__ */ jsx("span", { className: "input-group-text pe-0" + classNameVariant, children: renderInputGroup }),
41
- renderSelectedItems,
42
- /* @__PURE__ */ jsx(Input, { ...inputProps, className: classNameInput, noValidationIcon: !0, placeholder, size: "md", type: "search", onKeyDown: itemProps.onMenuItemKeyDown })
41
+ /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center flex-wrap flex-fill", children: [
42
+ renderSelectedItems,
43
+ /* @__PURE__ */ jsx(Input, { ...inputProps, className: classNameInput, noValidationIcon: !0, placeholder, size: "md", type: "search", onKeyDown: itemProps.onMenuItemKeyDown })
44
+ ] })
43
45
  ] });
44
46
  };
45
47
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.2-develop-b2school.20250404170224",
3
+ "version": "2.2.2-develop-b2school.20250407165159",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -118,9 +118,9 @@
118
118
  "react-slugify": "^3.0.3",
119
119
  "swiper": "^10.1.0",
120
120
  "ua-parser-js": "^1.0.36",
121
- "@edifice.io/bootstrap": "2.2.2-develop-b2school.20250404170224",
122
- "@edifice.io/tiptap-extensions": "2.2.2-develop-b2school.20250404170224",
123
- "@edifice.io/utilities": "2.2.2-develop-b2school.20250404170224"
121
+ "@edifice.io/bootstrap": "2.2.2-develop-b2school.20250407165159",
122
+ "@edifice.io/tiptap-extensions": "2.2.2-develop-b2school.20250407165159",
123
+ "@edifice.io/utilities": "2.2.2-develop-b2school.20250407165159"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -151,8 +151,8 @@
151
151
  "vite": "^5.4.11",
152
152
  "vite-plugin-dts": "^4.1.0",
153
153
  "vite-tsconfig-paths": "^5.0.1",
154
- "@edifice.io/client": "2.2.2-develop-b2school.20250404170224",
155
- "@edifice.io/config": "2.2.2-develop-b2school.20250404170224"
154
+ "@edifice.io/client": "2.2.2-develop-b2school.20250407165159",
155
+ "@edifice.io/config": "2.2.2-develop-b2school.20250407165159"
156
156
  },
157
157
  "peerDependencies": {
158
158
  "@react-spring/web": "^9.7.5",