@dust-tt/sparkle 0.2.173 → 0.2.174

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.
@@ -14,8 +14,9 @@ type ItemProps = {
14
14
  hasAction?: boolean | "hover";
15
15
  className?: string;
16
16
  href?: string;
17
+ target?: string;
17
18
  };
18
- export declare function Item({ label, description, visual, icon, style, spacing, action, hasAction, onClick, selected, disabled, className, href, }: ItemProps): React.JSX.Element;
19
+ export declare function Item({ label, description, visual, icon, style, spacing, action, hasAction, onClick, selected, disabled, className, href, target }: ItemProps): React.JSX.Element;
19
20
  export declare namespace Item {
20
21
  var Entry: (props: EntryItemProps) => React.JSX.Element;
21
22
  var Avatar: ({ description, hasAction, ...otherProps }: AvatarItemProps) => React.JSX.Element;
package/dist/cjs/index.js CHANGED
@@ -77571,7 +77571,7 @@ var iconClasses$4 = {
77571
77571
  warning: "s-text-warning-400 group-hover:s-text-warning-300 group-active:s-text-warning-700 dark:group-hover:s-text-warning-600-dark dark:group-active:s-text-warning-400-dark",
77572
77572
  };
77573
77573
  function Item(_a) {
77574
- var label = _a.label, description = _a.description, visual = _a.visual, icon = _a.icon, _b = _a.style, style = _b === void 0 ? "action" : _b, _c = _a.spacing, spacing = _c === void 0 ? "sm" : _c, _d = _a.action, action = _d === void 0 ? SvgChevronRight$1 : _d, _e = _a.hasAction, hasAction = _e === void 0 ? true : _e, onClick = _a.onClick, _f = _a.selected, selected = _f === void 0 ? false : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.className, className = _h === void 0 ? "" : _h, href = _a.href;
77574
+ var label = _a.label, description = _a.description, visual = _a.visual, icon = _a.icon, _b = _a.style, style = _b === void 0 ? "action" : _b, _c = _a.spacing, spacing = _c === void 0 ? "sm" : _c, _d = _a.action, action = _d === void 0 ? SvgChevronRight$1 : _d, _e = _a.hasAction, hasAction = _e === void 0 ? true : _e, onClick = _a.onClick, _f = _a.selected, selected = _f === void 0 ? false : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.className, className = _h === void 0 ? "" : _h, href = _a.href, target = _a.target;
77575
77575
  var components = React.useContext(SparkleContext).components;
77576
77576
  var Link = href ? components.link : noHrefLink;
77577
77577
  var visualElement;
@@ -77585,7 +77585,8 @@ function Item(_a) {
77585
77585
  ? "s-text-action-400 dark:s-text-action-600-dark"
77586
77586
  : iconClasses$4[style]) }));
77587
77587
  }
77588
- return (React.createElement(Link, { className: classNames("s-duration-400 s-group s-box-border s-flex s-select-none s-text-sm s-transition-colors s-ease-out", spacingClasses[spacing], disabled ? "" : "s-cursor-pointer", className), onClick: selected || disabled ? undefined : onClick, "aria-label": label, href: href || "#" },
77588
+ var targetProps = target ? { target: target } : {};
77589
+ return (React.createElement(Link, __assign({ className: classNames("s-duration-400 s-group s-box-border s-flex s-select-none s-text-sm s-transition-colors s-ease-out", spacingClasses[spacing], disabled ? "" : "s-cursor-pointer", className), onClick: selected || disabled ? undefined : onClick, "aria-label": label, href: href || "#" }, targetProps),
77589
77590
  visualElement,
77590
77591
  React.createElement("div", { className: classNames("s-flex s-grow s-flex-col s-gap-0 s-overflow-hidden") },
77591
77592
  React.createElement("div", { className: classNames("s-transition-colors s-duration-200 s-ease-out", "s-grow s-truncate s-text-sm", labelStyleClasses[style], disabled
@@ -106282,13 +106283,14 @@ function RadioButton(_a) {
106282
106283
  function Popup(_a) {
106283
106284
  var show = _a.show, chipLabel = _a.chipLabel, description = _a.description, buttonLabel = _a.buttonLabel, buttonClick = _a.buttonClick, className = _a.className, onClose = _a.onClose;
106284
106285
  return (React.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 || "") },
106285
- React.createElement("div", { className: "s-flex" },
106286
- React.createElement(Chip, { color: "pink" }, chipLabel),
106287
- onClose && (React.createElement("div", { className: "-s-mr-1 -s-mt-1 s-flex s-grow s-items-start s-justify-end" },
106288
- React.createElement(IconButton, { icon: SvgXMark$1, onClick: onClose, variant: "secondary", size: "sm" })))),
106289
- React.createElement("div", { className: "s-text-sm s-font-normal s-text-element-900" }, description),
106290
- React.createElement("div", { className: "s-self-center" },
106291
- React.createElement(Button, { variant: "primary", size: "sm", label: buttonLabel, onClick: buttonClick }))));
106286
+ React.createElement("div", null,
106287
+ React.createElement("div", { className: "s-flex" },
106288
+ React.createElement(Chip, { color: "pink" }, chipLabel),
106289
+ onClose && (React.createElement("div", { className: "-s-mr-1 -s-mt-1 s-flex s-grow s-items-start s-justify-end" },
106290
+ React.createElement(IconButton, { icon: SvgXMark$1, onClick: onClose, variant: "secondary", size: "sm" })))),
106291
+ React.createElement("div", { className: "s-text-sm s-font-normal s-text-element-900" }, description),
106292
+ React.createElement("div", { className: "s-self-center" },
106293
+ React.createElement(Button, { variant: "primary", size: "sm", label: buttonLabel, onClick: buttonClick })))));
106292
106294
  }
106293
106295
 
106294
106296
  function TemplateItem(_a) {