@algolia/satellite 1.0.0-beta.170 → 1.0.0-beta.171

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