@vectara/vectara-ui 9.5.2 → 9.5.3

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.
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import classNames from "classnames";
14
14
  import { VuiOptionsListItem } from "./OptionsListItem";
15
15
  import { useEffect, useRef } from "react";
@@ -18,6 +18,7 @@ import { VuiFlexItem } from "../flex/FlexItem";
18
18
  import { VuiSpinner } from "../spinner/Spinner";
19
19
  import { VuiText } from "../typography/Text";
20
20
  import { VuiSpacer } from "../spacer/Spacer";
21
+ import { VuiTextColor } from "../typography/TextColor";
21
22
  const SIZE = ["s", "m", "l"];
22
23
  // https://github.com/typescript-eslint/typescript-eslint/issues/4062
23
24
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
@@ -54,5 +55,5 @@ export const VuiOptionsList = (_a) => {
54
55
  onClick === null || onClick === void 0 ? void 0 : onClick(value);
55
56
  onSelectOption === null || onSelectOption === void 0 ? void 0 : onSelectOption(value);
56
57
  }, isSelectable: isSelectable, isSelected: isSelected }, rest), label));
57
- }), isLoading && (_jsxs(_Fragment, { children: [_jsx(VuiSpacer, { size: "xxs" }), _jsxs(VuiFlexContainer, Object.assign({ alignItems: "center", justifyContent: "center", spacing: "xs" }, { children: [_jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsx(VuiSpinner, { size: "xs" }) })), _jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsx(VuiText, { children: _jsx("p", { children: "Loading options\u2026" }) }) }))] }))] }))] })));
58
+ }), isLoading && (_jsxs("div", { children: [_jsx(VuiSpacer, { size: "xxs" }), _jsxs(VuiFlexContainer, Object.assign({ alignItems: "center", justifyContent: "center", spacing: "xs" }, { children: [_jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsx(VuiSpinner, { size: "xs" }) })), _jsx(VuiFlexItem, Object.assign({ grow: false }, { children: _jsx(VuiText, { children: _jsx("p", { children: _jsx(VuiTextColor, Object.assign({ color: "subdued" }, { children: "Loading options\u2026" })) }) }) }))] })), _jsx(VuiSpacer, { size: "xxs" })] }))] })));
58
59
  };
@@ -16,6 +16,8 @@ import { VuiPopover } from "../popover/Popover";
16
16
  import { VuiTextInput } from "../form";
17
17
  import { VuiSpacer } from "../spacer/Spacer";
18
18
  import { sortSelectedOptions } from "./sortSelectedOptions";
19
+ import { VuiText } from "../typography/Text";
20
+ import { VuiTextColor } from "../typography/TextColor";
19
21
  // https://github.com/typescript-eslint/typescript-eslint/issues/4062
20
22
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
21
23
  export const VuiSearchSelect = (_a) => {
@@ -97,5 +99,5 @@ export const VuiSearchSelect = (_a) => {
97
99
  const { value } = event.target;
98
100
  (_a = asyncSearch === null || asyncSearch === void 0 ? void 0 : asyncSearch.onSearchChange) === null || _a === void 0 ? void 0 : _a.call(asyncSearch, value);
99
101
  setSearchValue(value);
100
- }, "data-testid": rest["data-testid"] }), _jsx(VuiSpacer, { size: "xxs" })] })), _jsx(VuiOptionsList, { isSelectable: true, isScrollable: true, onScrollToBottom: asyncSearch === null || asyncSearch === void 0 ? void 0 : asyncSearch.onLazyLoad, onSelectOption: onSelectOption, selected: selectedOptions, options: visibleOptions, isLoading: asyncSearch === null || asyncSearch === void 0 ? void 0 : asyncSearch.isSearching })] })));
102
+ }, "data-testid": rest["data-testid"] }), _jsx(VuiSpacer, { size: "xxs" })] })), visibleOptions.length > 0 || (asyncSearch === null || asyncSearch === void 0 ? void 0 : asyncSearch.isSearching) ? (_jsx(VuiOptionsList, { isSelectable: true, isScrollable: true, onScrollToBottom: asyncSearch === null || asyncSearch === void 0 ? void 0 : asyncSearch.onLazyLoad, onSelectOption: onSelectOption, selected: selectedOptions, options: visibleOptions, isLoading: asyncSearch === null || asyncSearch === void 0 ? void 0 : asyncSearch.isSearching })) : searchValue.trim().length > 0 ? (_jsx(VuiText, Object.assign({ className: "vuiSearchSelect__emptyMessage", align: "center" }, { children: _jsx("p", { children: _jsx(VuiTextColor, Object.assign({ color: "subdued" }, { children: "No results found" })) }) }))) : (_jsx(VuiText, Object.assign({ className: "vuiSearchSelect__emptyMessage", align: "center" }, { children: _jsx("p", { children: _jsx(VuiTextColor, Object.assign({ color: "subdued" }, { children: "No options available" })) }) })))] })));
101
103
  };
@@ -11,3 +11,7 @@
11
11
  padding: $sizeXxs $sizeXs;
12
12
  border-bottom: 1px solid $borderColor;
13
13
  }
14
+
15
+ .vuiSearchSelect__emptyMessage {
16
+ padding: $sizeXxs $sizeXs;
17
+ }
@@ -3720,6 +3720,10 @@ h2.react-datepicker__current-month {
3720
3720
  border-bottom: 1px solid #cbd1de;
3721
3721
  }
3722
3722
 
3723
+ .vuiSearchSelect__emptyMessage {
3724
+ padding: 4px 8px;
3725
+ }
3726
+
3723
3727
  .vuiSpacer {
3724
3728
  flex-shrink: 0;
3725
3729
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectara/vectara-ui",
3
- "version": "9.5.2",
3
+ "version": "9.5.3",
4
4
  "homepage": "./",
5
5
  "description": "Vectara's design system, codified as a React and Sass component library",
6
6
  "author": "Vectara",