@geomak/ui 7.6.3 → 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.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
  }