@dust-tt/sparkle 0.2.285 → 0.2.286

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.
package/dist/cjs/index.js CHANGED
@@ -85146,12 +85146,12 @@ var Input = React.forwardRef(function (_a, ref) {
85146
85146
  Input.displayName = "Input";
85147
85147
 
85148
85148
  function LinkWrapper(_a) {
85149
- var href = _a.href, target = _a.target, rel = _a.rel, replace = _a.replace, shallow = _a.shallow, className = _a.className, children = _a.children;
85149
+ var children = _a.children, href = _a.href, rel = _a.rel, replace = _a.replace, shallow = _a.shallow, target = _a.target;
85150
85150
  var components = React.useContext(SparkleContext).components;
85151
85151
  if (href) {
85152
- return (React.createElement(components.link, { href: href, target: target, rel: rel, replace: replace, shallow: shallow, className: className }, children));
85152
+ return (React.createElement(components.link, { href: href, target: target, rel: rel, replace: replace, shallow: shallow }, children));
85153
85153
  }
85154
- return React.createElement(React.Fragment, null, children);
85154
+ return children;
85155
85155
  }
85156
85156
 
85157
85157
  function ok$2() {}
@@ -106717,11 +106717,10 @@ var NavigationList = React__namespace.forwardRef(function (_a, ref) {
106717
106717
  });
106718
106718
  NavigationList.displayName = "NavigationList";
106719
106719
  var NavigationListItem = React__namespace.forwardRef(function (_a, ref) {
106720
- var className = _a.className, selected = _a.selected, label = _a.label, icon = _a.icon, href = _a.href, target = _a.target, rel = _a.rel, replace = _a.replace, shallow = _a.shallow, props = __rest(_a, ["className", "selected", "label", "icon", "href", "target", "rel", "replace", "shallow"]);
106721
- var _b = __read(React__namespace.useState(false), 2), isHovered = _b[0], setIsHovered = _b[1];
106722
- var _c = __read(React__namespace.useState(false), 2), isPressed = _c[0], setIsPressed = _c[1];
106720
+ var className = _a.className, selected = _a.selected, label = _a.label, icon = _a.icon, href = _a.href, target = _a.target, rel = _a.rel, replace = _a.replace, shallow = _a.shallow, moreMenu = _a.moreMenu, props = __rest(_a, ["className", "selected", "label", "icon", "href", "target", "rel", "replace", "shallow", "moreMenu"]);
106721
+ var _b = __read(React__namespace.useState(false), 2), isPressed = _b[0], setIsPressed = _b[1];
106723
106722
  var handleMouseDown = function (event) {
106724
- if (!event.target.closest(".new-button-class")) {
106723
+ if (!event.target.closest(".button-class")) {
106725
106724
  setIsPressed(true);
106726
106725
  }
106727
106726
  };
@@ -106729,15 +106728,13 @@ var NavigationListItem = React__namespace.forwardRef(function (_a, ref) {
106729
106728
  React__namespace.createElement("div", { className: listStyles({
106730
106729
  layout: "item",
106731
106730
  state: selected ? "selected" : isPressed ? "active" : "unselected",
106732
- }), onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () {
106733
- setIsHovered(false);
106731
+ }), onMouseLeave: function () {
106734
106732
  setIsPressed(false);
106735
106733
  }, onMouseDown: handleMouseDown, onMouseUp: function () { return setIsPressed(false); } },
106736
106734
  icon && React__namespace.createElement(Icon, { visual: icon, size: "sm" }),
106737
106735
  label && (React__namespace.createElement("span", { className: "s-grow s-overflow-hidden s-text-ellipsis s-whitespace-nowrap" }, label)),
106738
- isHovered && (React__namespace.createElement("div", { className: "-s-mr-2 s-flex s-h-4 s-items-center" },
106739
- React__namespace.createElement(Button, { variant: "ghost", icon: MoreIcon, size: "xs", onClick: function (e) { return e.stopPropagation(); }, onMouseDown: function (e) { return e.stopPropagation(); }, onMouseUp: function (e) { return e.stopPropagation(); } }))))));
106740
- return (React__namespace.createElement(LinkWrapper, { href: href, target: target, rel: rel, replace: replace, shallow: shallow, className: className }, content));
106736
+ selected && moreMenu && (React__namespace.createElement("div", { className: "-s-mr-2 s-flex s-h-4 s-items-center" }, moreMenu)))));
106737
+ return (React__namespace.createElement(LinkWrapper, { href: href, target: target, rel: rel, replace: replace, shallow: shallow }, content));
106741
106738
  });
106742
106739
  NavigationListItem.displayName = "NavigationListItem";
106743
106740
  var variantStyles = cva("", {
@@ -109794,9 +109791,9 @@ var NewDropdownMenuContent = React__namespace.forwardRef(function (_a, ref) {
109794
109791
  NewDropdownMenuContent.displayName = Content2.displayName;
109795
109792
  var NewDropdownMenuItem = React__namespace.forwardRef(function (_a, ref) {
109796
109793
  var children = _a.children, variant = _a.variant, description = _a.description, className = _a.className, inset = _a.inset, icon = _a.icon, label = _a.label, href = _a.href, target = _a.target, rel = _a.rel, asChild = _a.asChild, replace = _a.replace, shallow = _a.shallow, props = __rest(_a, ["children", "variant", "description", "className", "inset", "icon", "label", "href", "target", "rel", "asChild", "replace", "shallow"]);
109797
- var content = (React__namespace.createElement(Item2$1, __assign({ ref: ref, className: cn(menuStyleClasses.item({ variant: variant }), inset ? menuStyleClasses.inset : "", className) }, props, { asChild: !!href || asChild }),
109798
- React__namespace.createElement(ItemWithLabelIconAndDescription, { label: label, icon: icon, description: description }, children)));
109799
- return (React__namespace.createElement(LinkWrapper, { href: href, target: target, rel: rel, replace: replace, shallow: shallow }, content));
109794
+ return (React__namespace.createElement(Item2$1, __assign({ ref: ref, className: cn(menuStyleClasses.item({ variant: variant }), inset ? menuStyleClasses.inset : "", className) }, props, { asChild: asChild }),
109795
+ React__namespace.createElement(LinkWrapper, { href: href, target: target, rel: rel, replace: replace, shallow: shallow },
109796
+ React__namespace.createElement(ItemWithLabelIconAndDescription, { label: label, icon: icon, description: description }, children))));
109800
109797
  });
109801
109798
  NewDropdownMenuItem.displayName = Item2$1.displayName;
109802
109799
  var NewDropdownMenuCheckboxItem = React__namespace.forwardRef(function (_a, ref) {
@@ -112797,7 +112794,7 @@ var TabsTrigger = React__namespace.forwardRef(function (_a, ref) {
112797
112794
  var content = (React__namespace.createElement(Trigger, __assign({ ref: ref, className: cn("s-border-0 s-border-b-2 s-border-primary-800/0 s-pb-1 disabled:s-pointer-events-none data-[state=active]:s-border-primary-800", className), asChild: true }, props),
112798
112795
  React__namespace.createElement("div", null,
112799
112796
  React__namespace.createElement(Button, { variant: "ghost", size: "sm", label: label, icon: icon }))));
112800
- return (React__namespace.createElement(LinkWrapper, { href: href, target: target, rel: rel, replace: replace, shallow: shallow, className: className }, content));
112797
+ return (React__namespace.createElement(LinkWrapper, { href: href, target: target, rel: rel, replace: replace, shallow: shallow }, content));
112801
112798
  });
112802
112799
  var TabsContent = React__namespace.forwardRef(function (_a, ref) {
112803
112800
  var className = _a.className, props = __rest(_a, ["className"]);