@dust-tt/sparkle 0.2.582 → 0.2.583-rc-1
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 +1 -1
- package/dist/esm/components/NotificationButton.d.ts +1 -1
- package/dist/esm/components/NotificationButton.d.ts.map +1 -1
- package/dist/esm/components/NotificationButton.js +4 -3
- package/dist/esm/components/NotificationButton.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NotificationButton.tsx +8 -7
|
@@ -6,6 +6,6 @@ interface NotificationButtonProps {
|
|
|
6
6
|
counterProps: React.ComponentProps<typeof Counter>;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const NotificationButton:
|
|
9
|
+
declare const NotificationButton: React.ForwardRefExoticComponent<NotificationButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export { NotificationButton };
|
|
11
11
|
//# sourceMappingURL=NotificationButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationButton.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAGtD,UAAU,uBAAuB;IAC/B,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;IACjD,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"NotificationButton.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAGtD,UAAU,uBAAuB;IAC/B,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;IACjD,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,kBAAkB,gGAYtB,CAAC;AAIH,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -3,11 +3,12 @@ import React from "react";
|
|
|
3
3
|
import { Button } from "../components/Button";
|
|
4
4
|
import { Counter } from "../components/Counter";
|
|
5
5
|
import { cn } from "../lib/utils";
|
|
6
|
-
var NotificationButton = function (_a) {
|
|
6
|
+
var NotificationButton = React.forwardRef(function (_a, ref) {
|
|
7
7
|
var className = _a.className, buttonProps = _a.buttonProps, counterProps = _a.counterProps;
|
|
8
|
-
return (React.createElement("div", { className: cn("s-relative", className) },
|
|
8
|
+
return (React.createElement("div", { ref: ref, className: cn("s-relative", className) },
|
|
9
9
|
React.createElement(Button, __assign({}, buttonProps)),
|
|
10
10
|
counterProps.value > 0 && (React.createElement(Counter, __assign({}, counterProps, { className: "s-absolute -s-right-2 -s-top-2" })))));
|
|
11
|
-
};
|
|
11
|
+
});
|
|
12
|
+
NotificationButton.displayName = "NotificationButton";
|
|
12
13
|
export { NotificationButton };
|
|
13
14
|
//# sourceMappingURL=NotificationButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationButton.js","sourceRoot":"","sources":["../../../src/components/NotificationButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAQxC,IAAM,kBAAkB,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"NotificationButton.js","sourceRoot":"","sources":["../../../src/components/NotificationButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAQxC,IAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGzC,UAAC,EAAwC,EAAE,GAAG;QAA3C,SAAS,eAAA,EAAE,WAAW,iBAAA,EAAE,YAAY,kBAAA;IACvC,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;QACnD,oBAAC,MAAM,eAAK,WAAW,EAAI;QAC1B,YAAY,CAAC,KAAK,GAAG,CAAC,IAAI,CACzB,oBAAC,OAAO,eAAK,YAAY,IAAE,SAAS,EAAC,gCAAgC,IAAG,CACzE,CACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,19 +10,20 @@ interface NotificationButtonProps {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const NotificationButton =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}: NotificationButtonProps) => {
|
|
13
|
+
const NotificationButton = React.forwardRef<
|
|
14
|
+
HTMLDivElement,
|
|
15
|
+
NotificationButtonProps
|
|
16
|
+
>(({ className, buttonProps, counterProps }, ref) => {
|
|
18
17
|
return (
|
|
19
|
-
<div className={cn("s-relative", className)}>
|
|
18
|
+
<div ref={ref} className={cn("s-relative", className)}>
|
|
20
19
|
<Button {...buttonProps} />
|
|
21
20
|
{counterProps.value > 0 && (
|
|
22
21
|
<Counter {...counterProps} className="s-absolute -s-right-2 -s-top-2" />
|
|
23
22
|
)}
|
|
24
23
|
</div>
|
|
25
24
|
);
|
|
26
|
-
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
NotificationButton.displayName = "NotificationButton";
|
|
27
28
|
|
|
28
29
|
export { NotificationButton };
|