@geomak/ui 7.6.2 → 7.7.0
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 +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +8 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -745,6 +745,8 @@ function Modal({
|
|
|
745
745
|
onCancel,
|
|
746
746
|
okText = "Ok",
|
|
747
747
|
cancelText = "Cancel",
|
|
748
|
+
okVariant = "primary",
|
|
749
|
+
cancelVariant = "ghost",
|
|
748
750
|
hasFooter = true,
|
|
749
751
|
title,
|
|
750
752
|
children,
|
|
@@ -801,6 +803,7 @@ function Modal({
|
|
|
801
803
|
Button_default,
|
|
802
804
|
{
|
|
803
805
|
style: { width: 90 },
|
|
806
|
+
variant: cancelVariant,
|
|
804
807
|
content: cancelText,
|
|
805
808
|
onClick: onCancel
|
|
806
809
|
}
|
|
@@ -809,6 +812,7 @@ function Modal({
|
|
|
809
812
|
Button_default,
|
|
810
813
|
{
|
|
811
814
|
style: { width: 90 },
|
|
815
|
+
variant: okVariant,
|
|
812
816
|
content: okText,
|
|
813
817
|
onClick: onOk
|
|
814
818
|
}
|
|
@@ -835,6 +839,8 @@ function Drawer({
|
|
|
835
839
|
width,
|
|
836
840
|
okText = "Ok",
|
|
837
841
|
cancelText = "Cancel",
|
|
842
|
+
okVariant = "primary",
|
|
843
|
+
cancelVariant = "ghost",
|
|
838
844
|
onOk,
|
|
839
845
|
onCancel,
|
|
840
846
|
title,
|
|
@@ -890,8 +896,8 @@ function Drawer({
|
|
|
890
896
|
] }),
|
|
891
897
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-5", children }),
|
|
892
898
|
hasFooter && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-shrink-0 items-center gap-3 border-t border-border px-5 py-3 ${isRight ? "justify-start" : "justify-end"}`, children: [
|
|
893
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button_default, { style: { width: 90 }, content: cancelText, onClick: onCancel }),
|
|
894
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button_default, { style: { width: 90 }, content: okText, onClick: onOk })
|
|
899
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button_default, { style: { width: 90 }, variant: cancelVariant, content: cancelText, onClick: onCancel }),
|
|
900
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button_default, { style: { width: 90 }, variant: okVariant, content: okText, onClick: onOk })
|
|
895
901
|
] })
|
|
896
902
|
]
|
|
897
903
|
}
|
|
@@ -4617,7 +4623,9 @@ var DENSITY_PAD_LEFT = {
|
|
|
4617
4623
|
"spacious": "pl-[calc(1rem-1px)]"
|
|
4618
4624
|
// px-4 = 1rem
|
|
4619
4625
|
};
|
|
4620
|
-
var
|
|
4626
|
+
var HOVER = "hover:bg-[color-mix(in_srgb,var(--color-accent)_8%,transparent)] hover:text-foreground";
|
|
4627
|
+
var ACTIVE_BG = "bg-[color-mix(in_srgb,var(--color-accent)_15%,transparent)]";
|
|
4628
|
+
var PRESS = "active:bg-[color-mix(in_srgb,var(--color-accent)_24%,transparent)]";
|
|
4621
4629
|
function List2({
|
|
4622
4630
|
items,
|
|
4623
4631
|
onItemClick,
|
|
@@ -4649,7 +4657,7 @@ function List2({
|
|
|
4649
4657
|
DENSITY_PADDING[density],
|
|
4650
4658
|
DENSITY_PAD_LEFT[density],
|
|
4651
4659
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset",
|
|
4652
|
-
isDisabled ? "border-l-transparent opacity-50 cursor-not-allowed" : isActive ? `border-l-accent
|
|
4660
|
+
isDisabled ? "border-l-transparent opacity-50 cursor-not-allowed" : isActive ? `border-l-accent ${ACTIVE_BG} text-foreground font-medium ${PRESS}` : `border-l-transparent text-foreground-secondary ${HOVER} ${PRESS}`
|
|
4653
4661
|
].join(" "),
|
|
4654
4662
|
children: [
|
|
4655
4663
|
item.avatar && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: item.avatar }),
|