@arc-lo/ui 0.1.0 → 0.2.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/index.cjs +14 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
- package/{src/styles/theme.css → styles.css} +25 -3
package/dist/index.js
CHANGED
|
@@ -727,7 +727,10 @@ var Root3 = forwardRef(
|
|
|
727
727
|
}
|
|
728
728
|
);
|
|
729
729
|
Root3.displayName = "FeedbackBar.Root";
|
|
730
|
-
var
|
|
730
|
+
var btnBase = "arclo-feedback-btn inline-flex items-center justify-center rounded-md p-1.5 transition-colors cursor-pointer";
|
|
731
|
+
var btnStyle = {
|
|
732
|
+
color: themeVars.textMuted
|
|
733
|
+
};
|
|
731
734
|
var ThumbsUp = forwardRef(
|
|
732
735
|
({ className, ...props }, ref) => {
|
|
733
736
|
const { feedback, setFeedback } = useFeedbackBarContext();
|
|
@@ -740,8 +743,8 @@ var ThumbsUp = forwardRef(
|
|
|
740
743
|
"aria-label": "Good response",
|
|
741
744
|
"aria-pressed": active,
|
|
742
745
|
onClick: () => setFeedback(active ? null : "up"),
|
|
743
|
-
style: active ? { color: themeVars.accent } :
|
|
744
|
-
className: cn(
|
|
746
|
+
style: active ? { color: themeVars.accent } : btnStyle,
|
|
747
|
+
className: cn(btnBase, className),
|
|
745
748
|
...props,
|
|
746
749
|
children: /* @__PURE__ */ jsxs(
|
|
747
750
|
"svg",
|
|
@@ -751,7 +754,7 @@ var ThumbsUp = forwardRef(
|
|
|
751
754
|
viewBox: "0 0 24 24",
|
|
752
755
|
fill: "none",
|
|
753
756
|
stroke: "currentColor",
|
|
754
|
-
strokeWidth: "2",
|
|
757
|
+
strokeWidth: active ? "2.5" : "2",
|
|
755
758
|
strokeLinecap: "round",
|
|
756
759
|
strokeLinejoin: "round",
|
|
757
760
|
children: [
|
|
@@ -776,7 +779,8 @@ var ThumbsDown = forwardRef(({ className, ...props }, ref) => {
|
|
|
776
779
|
"aria-label": "Bad response",
|
|
777
780
|
"aria-pressed": active,
|
|
778
781
|
onClick: () => setFeedback(active ? null : "down"),
|
|
779
|
-
|
|
782
|
+
style: active ? { color: themeVars.error } : btnStyle,
|
|
783
|
+
className: cn(btnBase, className),
|
|
780
784
|
...props,
|
|
781
785
|
children: /* @__PURE__ */ jsxs(
|
|
782
786
|
"svg",
|
|
@@ -786,7 +790,7 @@ var ThumbsDown = forwardRef(({ className, ...props }, ref) => {
|
|
|
786
790
|
viewBox: "0 0 24 24",
|
|
787
791
|
fill: "none",
|
|
788
792
|
stroke: "currentColor",
|
|
789
|
-
strokeWidth: "2",
|
|
793
|
+
strokeWidth: active ? "2.5" : "2",
|
|
790
794
|
strokeLinecap: "round",
|
|
791
795
|
strokeLinejoin: "round",
|
|
792
796
|
children: [
|
|
@@ -815,7 +819,8 @@ var Copy = forwardRef(
|
|
|
815
819
|
type: "button",
|
|
816
820
|
"aria-label": copied ? "Copied" : "Copy",
|
|
817
821
|
onClick: handleCopy,
|
|
818
|
-
|
|
822
|
+
style: copied ? { color: "#10b981" } : btnStyle,
|
|
823
|
+
className: cn(btnBase, className),
|
|
819
824
|
...props,
|
|
820
825
|
children: copied ? /* @__PURE__ */ jsx(
|
|
821
826
|
"svg",
|
|
@@ -860,7 +865,8 @@ var Regenerate = forwardRef(({ onRegenerate, className, ...props }, ref) => {
|
|
|
860
865
|
type: "button",
|
|
861
866
|
"aria-label": "Regenerate response",
|
|
862
867
|
onClick: onRegenerate,
|
|
863
|
-
|
|
868
|
+
style: btnStyle,
|
|
869
|
+
className: cn(btnBase, className),
|
|
864
870
|
...props,
|
|
865
871
|
children: /* @__PURE__ */ jsxs(
|
|
866
872
|
"svg",
|