@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.d.cts
CHANGED
|
@@ -503,6 +503,10 @@ interface ModalProps {
|
|
|
503
503
|
onCancel?: () => void;
|
|
504
504
|
okText?: string;
|
|
505
505
|
cancelText?: string;
|
|
506
|
+
/** Visual variant of the Ok button. Default `'primary'`. */
|
|
507
|
+
okVariant?: ButtonProps['variant'];
|
|
508
|
+
/** Visual variant of the Cancel button. Default `'ghost'`. */
|
|
509
|
+
cancelVariant?: ButtonProps['variant'];
|
|
506
510
|
hasFooter?: boolean;
|
|
507
511
|
title?: react__default.ReactNode;
|
|
508
512
|
children?: react__default.ReactNode;
|
|
@@ -521,7 +525,7 @@ interface ModalProps {
|
|
|
521
525
|
* Are you sure you want to delete this item?
|
|
522
526
|
* </Modal>
|
|
523
527
|
*/
|
|
524
|
-
declare function Modal({ width, size, open, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
528
|
+
declare function Modal({ width, size, open, onClose, onOk, onCancel, okText, cancelText, okVariant, cancelVariant, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
525
529
|
|
|
526
530
|
type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
527
531
|
interface DrawerProps {
|
|
@@ -542,6 +546,10 @@ interface DrawerProps {
|
|
|
542
546
|
width?: number | string;
|
|
543
547
|
okText?: string;
|
|
544
548
|
cancelText?: string;
|
|
549
|
+
/** Visual variant of the Ok button. Default `'primary'`. */
|
|
550
|
+
okVariant?: ButtonProps['variant'];
|
|
551
|
+
/** Visual variant of the Cancel button. Default `'ghost'`. */
|
|
552
|
+
cancelVariant?: ButtonProps['variant'];
|
|
545
553
|
onOk?: () => void;
|
|
546
554
|
onCancel?: () => void;
|
|
547
555
|
title?: react__default.ReactNode;
|
|
@@ -561,7 +569,7 @@ interface DrawerProps {
|
|
|
561
569
|
* <FilterForm />
|
|
562
570
|
* </Drawer>
|
|
563
571
|
*/
|
|
564
|
-
declare function Drawer({ open, onClose, hasFooter, placement, size, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
572
|
+
declare function Drawer({ open, onClose, hasFooter, placement, size, width, okText, cancelText, okVariant, cancelVariant, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
565
573
|
|
|
566
574
|
interface TooltipProps {
|
|
567
575
|
children: react__default.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -503,6 +503,10 @@ interface ModalProps {
|
|
|
503
503
|
onCancel?: () => void;
|
|
504
504
|
okText?: string;
|
|
505
505
|
cancelText?: string;
|
|
506
|
+
/** Visual variant of the Ok button. Default `'primary'`. */
|
|
507
|
+
okVariant?: ButtonProps['variant'];
|
|
508
|
+
/** Visual variant of the Cancel button. Default `'ghost'`. */
|
|
509
|
+
cancelVariant?: ButtonProps['variant'];
|
|
506
510
|
hasFooter?: boolean;
|
|
507
511
|
title?: react__default.ReactNode;
|
|
508
512
|
children?: react__default.ReactNode;
|
|
@@ -521,7 +525,7 @@ interface ModalProps {
|
|
|
521
525
|
* Are you sure you want to delete this item?
|
|
522
526
|
* </Modal>
|
|
523
527
|
*/
|
|
524
|
-
declare function Modal({ width, size, open, onClose, onOk, onCancel, okText, cancelText, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
528
|
+
declare function Modal({ width, size, open, onClose, onOk, onCancel, okText, cancelText, okVariant, cancelVariant, hasFooter, title, children, className, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
525
529
|
|
|
526
530
|
type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
527
531
|
interface DrawerProps {
|
|
@@ -542,6 +546,10 @@ interface DrawerProps {
|
|
|
542
546
|
width?: number | string;
|
|
543
547
|
okText?: string;
|
|
544
548
|
cancelText?: string;
|
|
549
|
+
/** Visual variant of the Ok button. Default `'primary'`. */
|
|
550
|
+
okVariant?: ButtonProps['variant'];
|
|
551
|
+
/** Visual variant of the Cancel button. Default `'ghost'`. */
|
|
552
|
+
cancelVariant?: ButtonProps['variant'];
|
|
545
553
|
onOk?: () => void;
|
|
546
554
|
onCancel?: () => void;
|
|
547
555
|
title?: react__default.ReactNode;
|
|
@@ -561,7 +569,7 @@ interface DrawerProps {
|
|
|
561
569
|
* <FilterForm />
|
|
562
570
|
* </Drawer>
|
|
563
571
|
*/
|
|
564
|
-
declare function Drawer({ open, onClose, hasFooter, placement, size, width, okText, cancelText, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
572
|
+
declare function Drawer({ open, onClose, hasFooter, placement, size, width, okText, cancelText, okVariant, cancelVariant, onOk, onCancel, title, children, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
565
573
|
|
|
566
574
|
interface TooltipProps {
|
|
567
575
|
children: react__default.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -709,6 +709,8 @@ function Modal({
|
|
|
709
709
|
onCancel,
|
|
710
710
|
okText = "Ok",
|
|
711
711
|
cancelText = "Cancel",
|
|
712
|
+
okVariant = "primary",
|
|
713
|
+
cancelVariant = "ghost",
|
|
712
714
|
hasFooter = true,
|
|
713
715
|
title,
|
|
714
716
|
children,
|
|
@@ -765,6 +767,7 @@ function Modal({
|
|
|
765
767
|
Button_default,
|
|
766
768
|
{
|
|
767
769
|
style: { width: 90 },
|
|
770
|
+
variant: cancelVariant,
|
|
768
771
|
content: cancelText,
|
|
769
772
|
onClick: onCancel
|
|
770
773
|
}
|
|
@@ -773,6 +776,7 @@ function Modal({
|
|
|
773
776
|
Button_default,
|
|
774
777
|
{
|
|
775
778
|
style: { width: 90 },
|
|
779
|
+
variant: okVariant,
|
|
776
780
|
content: okText,
|
|
777
781
|
onClick: onOk
|
|
778
782
|
}
|
|
@@ -799,6 +803,8 @@ function Drawer({
|
|
|
799
803
|
width,
|
|
800
804
|
okText = "Ok",
|
|
801
805
|
cancelText = "Cancel",
|
|
806
|
+
okVariant = "primary",
|
|
807
|
+
cancelVariant = "ghost",
|
|
802
808
|
onOk,
|
|
803
809
|
onCancel,
|
|
804
810
|
title,
|
|
@@ -854,8 +860,8 @@ function Drawer({
|
|
|
854
860
|
] }),
|
|
855
861
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-5", children }),
|
|
856
862
|
hasFooter && /* @__PURE__ */ 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: [
|
|
857
|
-
/* @__PURE__ */ jsx(Button_default, { style: { width: 90 }, content: cancelText, onClick: onCancel }),
|
|
858
|
-
/* @__PURE__ */ jsx(Button_default, { style: { width: 90 }, content: okText, onClick: onOk })
|
|
863
|
+
/* @__PURE__ */ jsx(Button_default, { style: { width: 90 }, variant: cancelVariant, content: cancelText, onClick: onCancel }),
|
|
864
|
+
/* @__PURE__ */ jsx(Button_default, { style: { width: 90 }, variant: okVariant, content: okText, onClick: onOk })
|
|
859
865
|
] })
|
|
860
866
|
]
|
|
861
867
|
}
|
|
@@ -4581,7 +4587,9 @@ var DENSITY_PAD_LEFT = {
|
|
|
4581
4587
|
"spacious": "pl-[calc(1rem-1px)]"
|
|
4582
4588
|
// px-4 = 1rem
|
|
4583
4589
|
};
|
|
4584
|
-
var
|
|
4590
|
+
var HOVER = "hover:bg-[color-mix(in_srgb,var(--color-accent)_8%,transparent)] hover:text-foreground";
|
|
4591
|
+
var ACTIVE_BG = "bg-[color-mix(in_srgb,var(--color-accent)_15%,transparent)]";
|
|
4592
|
+
var PRESS = "active:bg-[color-mix(in_srgb,var(--color-accent)_24%,transparent)]";
|
|
4585
4593
|
function List2({
|
|
4586
4594
|
items,
|
|
4587
4595
|
onItemClick,
|
|
@@ -4613,7 +4621,7 @@ function List2({
|
|
|
4613
4621
|
DENSITY_PADDING[density],
|
|
4614
4622
|
DENSITY_PAD_LEFT[density],
|
|
4615
4623
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset",
|
|
4616
|
-
isDisabled ? "border-l-transparent opacity-50 cursor-not-allowed" : isActive ? `border-l-accent
|
|
4624
|
+
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}`
|
|
4617
4625
|
].join(" "),
|
|
4618
4626
|
children: [
|
|
4619
4627
|
item.avatar && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: item.avatar }),
|