@dust-tt/sparkle 0.2.172 → 0.2.173-pr2

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.
@@ -6,3 +6,4 @@ declare const meta: {
6
6
  };
7
7
  export default meta;
8
8
  export declare const PaginatedCitationsGridExample: () => React.JSX.Element;
9
+ export declare const WithFewItems: () => React.JSX.Element;
package/dist/esm/index.js CHANGED
@@ -77881,7 +77881,7 @@ function PaginatedCitationsGrid(_a) {
77881
77881
  var items = _a.items, _b = _a.maxItemsPerPage, maxItemsPerPage = _b === void 0 ? 9 : _b;
77882
77882
  var _c = __read(useState(1), 2), currentPage = _c[0], setCurrentPage = _c[1];
77883
77883
  var cols = 3;
77884
- var rows = Math.ceil(maxItemsPerPage / cols);
77884
+ var rows = Math.ceil(Math.min(maxItemsPerPage, items.length) / cols);
77885
77885
  if (items.length === 0) {
77886
77886
  return null;
77887
77887
  }
@@ -106261,7 +106261,7 @@ function RadioButton(_a) {
106261
106261
 
106262
106262
  function Popup(_a) {
106263
106263
  var show = _a.show, chipLabel = _a.chipLabel, description = _a.description, buttonLabel = _a.buttonLabel, buttonClick = _a.buttonClick, className = _a.className, onClose = _a.onClose;
106264
- return (React__default.createElement(Xe$1, { show: show, enter: "s-transition-opacity s-duration-300", appear: true, enterFrom: "s-opacity-0", enterTo: "s-opacity-100", leave: "s-transition-opacity s-duration-300", leaveFrom: "s-opacity-100", leaveTo: "s-opacity-0", className: classNames("s-z-30 s-flex s-w-64 s-flex-col s-gap-3 s-rounded-xl s-border s-border-pink-100 s-bg-pink-50 s-p-4 s-shadow-xl", className || "") },
106264
+ return (React__default.createElement(Xe$1, { show: show, enter: "s-transition-opacity s-duration-300", appear: true, enterFrom: "s-opacity-0", enterTo: "s-opacity-100", leave: "s-transition-opacity s-duration-300", leaveFrom: "s-opacity-100", leaveTo: "s-opacity-0", as: "div", className: classNames("s-z-30 s-flex s-w-64 s-flex-col s-gap-3 s-rounded-xl s-border s-border-pink-100 s-bg-pink-50 s-p-4 s-shadow-xl", className || "") },
106265
106265
  React__default.createElement("div", { className: "s-flex" },
106266
106266
  React__default.createElement(Chip, { color: "pink" }, chipLabel),
106267
106267
  onClose && (React__default.createElement("div", { className: "-s-mr-1 -s-mt-1 s-flex s-grow s-items-start s-justify-end" },