@algolia/satellite 1.0.0-beta.168 → 1.0.0-beta.169

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.
@@ -395,7 +395,7 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
395
395
  })]
396
396
  }), createPortal( /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayContainer.ClickAwayContainer, {
397
397
  element: menuRef.current,
398
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.Card, _objectSpread(_objectSpread({}, menuPopper.attributes), {}, {
398
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.Card, _objectSpread(_objectSpread({}, menuPopper.attributes), {}, {
399
399
  className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2["default"])(["z-dropdown"]))), menuClassName),
400
400
  style: _objectSpread(_objectSpread(_objectSpread({}, menuPopper.styles.popper), hideMenu && {
401
401
  display: "none"
@@ -406,41 +406,43 @@ var AutoComplete = exports.AutoComplete = function AutoComplete(_ref) {
406
406
  ref: menuRef,
407
407
  elevation: "300",
408
408
  fullBleed: true,
409
- children: [items.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, combobox.getMenuProps({
410
- className: (0, _satellitePrefixer["default"])(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2["default"])(["min-h-10"])))
411
- })), {}, {
412
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
413
- role: "option",
414
- "aria-disabled": "true",
415
- "aria-selected": "false",
416
- children: emptyState !== null && emptyState !== void 0 ? emptyState : /*#__PURE__*/(0, _jsxRuntime.jsx)(_AutoCompleteEmptyState["default"], {
417
- title: locale.emptyStateTitle
418
- })
419
- })
420
- })) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollIndicator["default"], {
421
- className: menuSize === "large" ? (0, _satellitePrefixer["default"])(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2["default"])(["max-h-96"]))) : (0, _satellitePrefixer["default"])(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2["default"])(["max-h-64"]))),
422
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", _objectSpread(_objectSpread({}, combobox.getMenuProps()), {}, {
423
- children: items.map(function (item, index) {
424
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", _objectSpread(_objectSpread({}, combobox.getItemProps({
425
- item: item,
426
- className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2["default"])(["autocomplete-result flex items-center min-h-10 px-4 cursor-pointer"]))), index === combobox.highlightedIndex && (0, _satellitePrefixer["default"])(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100"]))), item.disabled && (0, _satellitePrefixer["default"])(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2["default"])(["cursor-not-allowed"]))))
427
- })), {}, {
428
- children: item.value === SHOW_ALL_ITEMS_ID ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
429
- className: (0, _satellitePrefixer["default"])(_templateObject27 || (_templateObject27 = (0, _taggedTemplateLiteral2["default"])(["w-full py-2 truncate text-center text-grey-900"]))),
430
- children: item.label
431
- }, item.value) : /*#__PURE__*/(0, _jsxRuntime.jsx)(OptionItem, {
432
- multiple: Boolean(multiple),
433
- inputValue: inputValue,
434
- highlighted: index === combobox.highlightedIndex,
435
- option: item
436
- })
437
- }), String(item.value));
409
+ children: hideMenu ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread({}, combobox.getMenuProps())) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
410
+ children: [items.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, combobox.getMenuProps({
411
+ className: (0, _satellitePrefixer["default"])(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2["default"])(["min-h-10"])))
412
+ })), {}, {
413
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
414
+ role: "option",
415
+ "aria-disabled": "true",
416
+ "aria-selected": "false",
417
+ children: emptyState !== null && emptyState !== void 0 ? emptyState : /*#__PURE__*/(0, _jsxRuntime.jsx)(_AutoCompleteEmptyState["default"], {
418
+ title: locale.emptyStateTitle
419
+ })
438
420
  })
439
- }))
440
- }), !!menuFooter && /*#__PURE__*/(0, _jsxRuntime.jsx)("footer", {
441
- className: (0, _satellitePrefixer["default"])(_templateObject28 || (_templateObject28 = (0, _taggedTemplateLiteral2["default"])(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"]))),
442
- children: menuFooter
443
- })]
421
+ })) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollIndicator["default"], {
422
+ className: menuSize === "large" ? (0, _satellitePrefixer["default"])(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2["default"])(["max-h-96"]))) : (0, _satellitePrefixer["default"])(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2["default"])(["max-h-64"]))),
423
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", _objectSpread(_objectSpread({}, combobox.getMenuProps()), {}, {
424
+ children: items.map(function (item, index) {
425
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", _objectSpread(_objectSpread({}, combobox.getItemProps({
426
+ item: item,
427
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2["default"])(["autocomplete-result flex items-center min-h-10 px-4 cursor-pointer"]))), index === combobox.highlightedIndex && (0, _satellitePrefixer["default"])(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100"]))), item.disabled && (0, _satellitePrefixer["default"])(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2["default"])(["cursor-not-allowed"]))))
428
+ })), {}, {
429
+ children: item.value === SHOW_ALL_ITEMS_ID ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
430
+ className: (0, _satellitePrefixer["default"])(_templateObject27 || (_templateObject27 = (0, _taggedTemplateLiteral2["default"])(["w-full py-2 truncate text-center text-grey-900"]))),
431
+ children: item.label
432
+ }, item.value) : /*#__PURE__*/(0, _jsxRuntime.jsx)(OptionItem, {
433
+ multiple: Boolean(multiple),
434
+ inputValue: inputValue,
435
+ highlighted: index === combobox.highlightedIndex,
436
+ option: item
437
+ })
438
+ }), String(item.value));
439
+ })
440
+ }))
441
+ }), !!menuFooter && /*#__PURE__*/(0, _jsxRuntime.jsx)("footer", {
442
+ className: (0, _satellitePrefixer["default"])(_templateObject28 || (_templateObject28 = (0, _taggedTemplateLiteral2["default"])(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"]))),
443
+ children: menuFooter
444
+ })]
445
+ })
444
446
  }))
445
447
  }))]
446
448
  })
@@ -25,6 +25,7 @@ import { DefaultOptionItem } from "./components/DefaultOptionItem";
25
25
  import { DEFAULT_AUTOCOMPLETE_LOCALE, defaultCreateFromInputValue, filter, optionToString } from "./utils";
26
26
  import { jsx as _jsx } from "react/jsx-runtime";
27
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
+ import { Fragment as _Fragment } from "react/jsx-runtime";
28
29
  var MENU_POPPER_OPTIONS = {
29
30
  strategy: "fixed",
30
31
  placement: "bottom-start",
@@ -389,7 +390,7 @@ export var AutoComplete = function AutoComplete(_ref) {
389
390
  })]
390
391
  }), createPortal( /*#__PURE__*/_jsx(ClickAwayContainer, {
391
392
  element: menuRef.current,
392
- children: /*#__PURE__*/_jsxs(Card, _objectSpread(_objectSpread({}, menuPopper.attributes), {}, {
393
+ children: /*#__PURE__*/_jsx(Card, _objectSpread(_objectSpread({}, menuPopper.attributes), {}, {
393
394
  className: cx(stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["z-dropdown"]))), menuClassName),
394
395
  style: _objectSpread(_objectSpread(_objectSpread({}, menuPopper.styles.popper), hideMenu && {
395
396
  display: "none"
@@ -400,41 +401,43 @@ export var AutoComplete = function AutoComplete(_ref) {
400
401
  ref: menuRef,
401
402
  elevation: "300",
402
403
  fullBleed: true,
403
- children: [items.length === 0 ? /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, combobox.getMenuProps({
404
- className: stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["min-h-10"])))
405
- })), {}, {
406
- children: /*#__PURE__*/_jsx("div", {
407
- role: "option",
408
- "aria-disabled": "true",
409
- "aria-selected": "false",
410
- children: emptyState !== null && emptyState !== void 0 ? emptyState : /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
411
- title: locale.emptyStateTitle
412
- })
413
- })
414
- })) : /*#__PURE__*/_jsx(ScrollIndicator, {
415
- className: menuSize === "large" ? stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["max-h-96"]))) : stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["max-h-64"]))),
416
- children: /*#__PURE__*/_jsx("ul", _objectSpread(_objectSpread({}, combobox.getMenuProps()), {}, {
417
- children: items.map(function (item, index) {
418
- return /*#__PURE__*/_jsx("li", _objectSpread(_objectSpread({}, combobox.getItemProps({
419
- item: item,
420
- className: cx(stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["autocomplete-result flex items-center min-h-10 px-4 cursor-pointer"]))), index === combobox.highlightedIndex && stl(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["bg-grey-100"]))), item.disabled && stl(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["cursor-not-allowed"]))))
421
- })), {}, {
422
- children: item.value === SHOW_ALL_ITEMS_ID ? /*#__PURE__*/_jsx("span", {
423
- className: stl(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["w-full py-2 truncate text-center text-grey-900"]))),
424
- children: item.label
425
- }, item.value) : /*#__PURE__*/_jsx(OptionItem, {
426
- multiple: Boolean(multiple),
427
- inputValue: inputValue,
428
- highlighted: index === combobox.highlightedIndex,
429
- option: item
430
- })
431
- }), String(item.value));
404
+ children: hideMenu ? /*#__PURE__*/_jsx("div", _objectSpread({}, combobox.getMenuProps())) : /*#__PURE__*/_jsxs(_Fragment, {
405
+ children: [items.length === 0 ? /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, combobox.getMenuProps({
406
+ className: stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["min-h-10"])))
407
+ })), {}, {
408
+ children: /*#__PURE__*/_jsx("div", {
409
+ role: "option",
410
+ "aria-disabled": "true",
411
+ "aria-selected": "false",
412
+ children: emptyState !== null && emptyState !== void 0 ? emptyState : /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
413
+ title: locale.emptyStateTitle
414
+ })
432
415
  })
433
- }))
434
- }), !!menuFooter && /*#__PURE__*/_jsx("footer", {
435
- className: stl(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"]))),
436
- children: menuFooter
437
- })]
416
+ })) : /*#__PURE__*/_jsx(ScrollIndicator, {
417
+ className: menuSize === "large" ? stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["max-h-96"]))) : stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["max-h-64"]))),
418
+ children: /*#__PURE__*/_jsx("ul", _objectSpread(_objectSpread({}, combobox.getMenuProps()), {}, {
419
+ children: items.map(function (item, index) {
420
+ return /*#__PURE__*/_jsx("li", _objectSpread(_objectSpread({}, combobox.getItemProps({
421
+ item: item,
422
+ className: cx(stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["autocomplete-result flex items-center min-h-10 px-4 cursor-pointer"]))), index === combobox.highlightedIndex && stl(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["bg-grey-100"]))), item.disabled && stl(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["cursor-not-allowed"]))))
423
+ })), {}, {
424
+ children: item.value === SHOW_ALL_ITEMS_ID ? /*#__PURE__*/_jsx("span", {
425
+ className: stl(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["w-full py-2 truncate text-center text-grey-900"]))),
426
+ children: item.label
427
+ }, item.value) : /*#__PURE__*/_jsx(OptionItem, {
428
+ multiple: Boolean(multiple),
429
+ inputValue: inputValue,
430
+ highlighted: index === combobox.highlightedIndex,
431
+ option: item
432
+ })
433
+ }), String(item.value));
434
+ })
435
+ }))
436
+ }), !!menuFooter && /*#__PURE__*/_jsx("footer", {
437
+ className: stl(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"]))),
438
+ children: menuFooter
439
+ })]
440
+ })
438
441
  }))
439
442
  }))]
440
443
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/satellite",
3
- "version": "1.0.0-beta.168",
3
+ "version": "1.0.0-beta.169",
4
4
  "description": "Algolia design system React components",
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",