@lctafrica/ui 1.1.6 → 1.2.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/components/ui/ModalFooter.d.ts +4 -2
- package/dist/components/ui/button/Button.d.ts +1 -2
- package/dist/components/ui/confirm-modal/ConfirmModal.d.ts +4 -3
- package/dist/components/ui/confirm-modal/components/ConfirmModalIcon.d.ts +4 -0
- package/dist/components/ui/modal/Modal.d.ts +4 -1
- package/dist/components/ui/modal/modal-theme-variants.d.ts +5 -0
- package/dist/components/ui/prompt-modal/PromptModal.d.ts +5 -4
- package/dist/components/ui/text/Text.d.ts +1 -3
- package/dist/components/ui/text/text-variants.d.ts +3 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3921 -3789
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { ModalThemeVariantsProps } from './modal/modal-theme-variants';
|
|
2
|
+
export type ModalFooterProps = {
|
|
2
3
|
onCancel?(): void;
|
|
3
4
|
onConfirm?(): void;
|
|
4
5
|
confirmButtonLabel?: string;
|
|
5
6
|
cancelButtonLabel?: string;
|
|
7
|
+
variant?: ModalThemeVariantsProps["variant"];
|
|
6
8
|
};
|
|
7
|
-
export declare function ModalFooter({ onCancel, cancelButtonLabel, onConfirm, confirmButtonLabel, }:
|
|
9
|
+
export declare function ModalFooter({ onCancel, cancelButtonLabel, onConfirm, confirmButtonLabel, variant, }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "primary" | "primary-destructive" | "secondary" | "secondary-destructive" | "outline" | "outline-destructive" | "ghost" | "ghost-destructive" | "link-destructive" | null | undefined;
|
|
4
|
+
variant?: "link" | "primary" | "primary-destructive" | "primary-success" | "secondary" | "secondary-destructive" | "secondary-success" | "outline" | "outline-destructive" | "outline-success" | "ghost" | "ghost-destructive" | "ghost-success" | "link-destructive" | "link-success" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl" | "icon-2xl" | null | undefined;
|
|
6
|
-
defaultVariants?: "size" | "variant" | null | undefined;
|
|
7
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
7
|
export type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
9
8
|
asChild?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ModalProps } from '../modal/Modal';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { ModalThemeVariantsProps } from '../modal/modal-theme-variants';
|
|
3
|
+
import { ModalFooterProps } from '../ModalFooter';
|
|
4
|
+
export type ConfirmModalProps = ModalProps & ModalFooterProps & ModalThemeVariantsProps;
|
|
5
|
+
export declare function ConfirmModal({ onCancel, onConfirm, confirmButtonLabel, cancelButtonLabel, children, headerLeft, headingClassName, descriptionClassName, className, variant, ...rest }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,9 @@ export type ModalProps = {
|
|
|
6
6
|
description?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
className?: string;
|
|
9
|
+
headingClassName?: string;
|
|
10
|
+
descriptionClassName?: string;
|
|
9
11
|
shouldShowCloseButton?: boolean;
|
|
12
|
+
headerLeft?: ReactNode;
|
|
10
13
|
};
|
|
11
|
-
export declare function Modal({ isOpen, onClose, description, title, children, className, shouldShowCloseButton, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Modal({ isOpen, onClose, description, title, children, className, descriptionClassName, headingClassName, shouldShowCloseButton, headerLeft, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const modalThemeVariants: (props?: ({
|
|
3
|
+
variant?: "informative" | "destructive" | "success" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export type ModalThemeVariantsProps = VariantProps<typeof modalThemeVariants>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ModalProps } from '../modal/Modal';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { ModalThemeVariantsProps } from '../modal/modal-theme-variants';
|
|
3
|
+
import { ModalFooterProps } from '../ModalFooter';
|
|
4
|
+
export type PromptModalProps = Omit<ModalProps, "children"> & Omit<ModalFooterProps, "onConfirm"> & {
|
|
4
5
|
promptLabel?: string;
|
|
5
6
|
promptPlaceHolder?: string;
|
|
6
7
|
onConfirm(promptInput: string): void;
|
|
7
|
-
};
|
|
8
|
-
export declare function PromptModal({ onCancel, onConfirm, confirmButtonLabel, cancelButtonLabel, promptLabel, promptPlaceHolder, ...rest }: PromptModalProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
} & ModalThemeVariantsProps;
|
|
9
|
+
export declare function PromptModal({ onCancel, onConfirm, confirmButtonLabel, cancelButtonLabel, promptLabel, promptPlaceHolder, variant, headingClassName, descriptionClassName, className, ...rest }: PromptModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
|
|
4
|
-
variant?: "heading" | "description" | "subheading" | "paragraph" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
3
|
+
import { textVariants } from './text-variants';
|
|
6
4
|
interface Props extends VariantProps<typeof textVariants> {
|
|
7
5
|
children: React.ReactNode;
|
|
8
6
|
className?: string;
|