Skip to content

Commit

Permalink
fix: default button border
Browse files Browse the repository at this point in the history
  • Loading branch information
ronymmoura committed Nov 2, 2024
1 parent 40ca5be commit 07900ce
Show file tree
Hide file tree
Showing 29 changed files with 191 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/kamalion-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kamalion/ui",
"version": "1.2.0",
"version": "1.2.1",
"type": "module",
"private": false,
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const buttonVariants = cva(
{
variants: {
variant: {
default: "bg-white hover:bg-zinc-100 active:bg-zinc-200",
default: "bg-white hover:bg-zinc-100 active:bg-zinc-200 border",
accent: `text-white bg-accent border-[--input-ring]
hover:bg-accent/70
active:bg-accent/90
Expand Down
2 changes: 1 addition & 1 deletion packages/kamalion-ui/types/components/Box/BoxContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
type BoxContentProps = React.HTMLAttributes<HTMLDivElement>;
export declare function BoxContent({ className, children }: BoxContentProps): import("react/jsx-runtime").JSX.Element;
export declare function BoxContent({ className, children, ...rest }: BoxContentProps): import("react/jsx-runtime").JSX.Element;
export {};
2 changes: 1 addition & 1 deletion packages/kamalion-ui/types/components/Box/BoxHeader.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
type BoxHeaderProps = React.HTMLAttributes<HTMLDivElement>;
export declare function BoxHeader({ className, children }: BoxHeaderProps): import("react/jsx-runtime").JSX.Element;
export declare function BoxHeader({ className, children, ...rest }: BoxHeaderProps): import("react/jsx-runtime").JSX.Element;
export {};
2 changes: 1 addition & 1 deletion packages/kamalion-ui/types/components/Box/BoxRoot.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
type BoxRootProps = React.HTMLAttributes<HTMLDivElement>;
export declare function BoxRoot({ className, children }: BoxRootProps): import("react/jsx-runtime").JSX.Element;
export declare function BoxRoot({ className, children, ...rest }: BoxRootProps): import("react/jsx-runtime").JSX.Element;
export {};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export declare const buttonVariants: (props?: ({
variant?: "default" | "accent" | "success" | "danger" | "ghost" | null | undefined;
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as DialogPrimitive from "@radix-ui/react-dialog";
import React from "react";
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
export { DialogContent };
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as DialogPrimitive from "@radix-ui/react-dialog";
import React from "react";
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
export { DialogDescription };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare const DialogFooter: {
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export { DialogFooter };
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from "react";
declare const DialogHeader: {
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export { DialogHeader };
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as DialogPrimitive from "@radix-ui/react-dialog";
import React from "react";
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
export { DialogOverlay };
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as DialogPrimitive from "@radix-ui/react-dialog";
declare const DialogPortal: {
({ ...props }: DialogPrimitive.DialogPortalProps): import("react/jsx-runtime").JSX.Element;
displayName: string | undefined;
};
export { DialogPortal };
4 changes: 4 additions & 0 deletions packages/kamalion-ui/types/components/Dialog/DialogTitle.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as DialogPrimitive from "@radix-ui/react-dialog";
import React from "react";
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
export { DialogTitle };
21 changes: 21 additions & 0 deletions packages/kamalion-ui/types/components/Dialog/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as DialogPrimitive from "@radix-ui/react-dialog";
export declare const Dialog: {
Root: import("react").FC<DialogPrimitive.DialogProps>;
Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
Portal: {
({ ...props }: DialogPrimitive.DialogPortalProps): import("react/jsx-runtime").JSX.Element;
displayName: string | undefined;
};
Overlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
Content: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
Header: {
({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
Footer: {
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
Title: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
Description: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as React from "react";
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
export type InputCheckboxState = CheckboxPrimitive.CheckedState;
type InputCheckboxProps = {
noControl?: boolean;
};
declare const InputCheckbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & InputCheckboxProps & React.RefAttributes<HTMLButtonElement>>;
export { InputCheckbox };
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as React from "react";
import { DayPickerSingleProps } from "react-day-picker";
export interface InputDatePickerProps extends Omit<DayPickerSingleProps, "mode"> {
triggerClassName?: string;
name?: string;
mode?: "single";
}
declare const InputDatePicker: {
({ className, triggerClassName, name, ...props }: InputDatePickerProps): import("react/jsx-runtime").JSX.Element | null;
displayName: string;
};
declare const InputDatePicker: React.ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverProps & InputDatePickerProps & React.RefAttributes<never>>;
export { InputDatePicker };
19 changes: 19 additions & 0 deletions packages/kamalion-ui/types/components/Input/InputMask.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from "react";
import { PatternFormatProps } from "react-number-format";
type MaskType = "date" | "tel" | "cel" | "hiddenCel" | "cpf" | "cnpj" | "cep";
type MaskPropsType = {
[key in MaskType]: PatternFormatProps & {
returnFormattedValue?: boolean;
};
};
declare const maskProps: MaskPropsType;
type InputMaskType = keyof typeof maskProps;
export type InputMaskProps = Omit<PatternFormatProps, "type" | "format"> & {
type: InputMaskType;
noControl?: boolean;
};
declare const InputMask: React.ForwardRefExoticComponent<Omit<PatternFormatProps, "type" | "format"> & {
type: InputMaskType;
noControl?: boolean;
} & React.RefAttributes<HTMLInputElement>>;
export { InputMask };
17 changes: 17 additions & 0 deletions packages/kamalion-ui/types/components/Input/InputNumber.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as React from "react";
import { NumericFormatProps } from "react-number-format";
type MaskType = "money" | "percent" | "number";
type MaskPropsType = {
[key in MaskType]: NumericFormatProps;
};
declare const maskProps: MaskPropsType;
type InputNumberType = keyof typeof maskProps;
export type InputNumberProps = Omit<NumericFormatProps, "type"> & {
type?: InputNumberType;
noControl?: boolean;
};
declare const InputNumber: React.ForwardRefExoticComponent<Omit<NumericFormatProps, "type"> & {
type?: InputNumberType;
noControl?: boolean;
} & React.RefAttributes<HTMLInputElement>>;
export { InputNumber };
2 changes: 2 additions & 0 deletions packages/kamalion-ui/types/components/Input/InputSelect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as SelectPrimitive from "@radix-ui/react-select";
type InputSelectProps = {
className?: string;
triggerClassName?: string;
position?: "popper" | "item-aligned" | undefined;
noControl?: boolean;
};
declare const InputSelect: React.ForwardRefExoticComponent<SelectPrimitive.SelectProps & InputSelectProps & React.RefAttributes<never>>;
export { InputSelect };
6 changes: 4 additions & 2 deletions packages/kamalion-ui/types/components/Input/InputText.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as React from "react";
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
declare const InputText: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
declare const InputText: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
displayType?: "input" | "text";
noControl?: boolean;
} & React.RefAttributes<HTMLInputElement>>;
export { InputText };
23 changes: 18 additions & 5 deletions packages/kamalion-ui/types/components/Input/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,28 @@ import { InputRoot } from "./InputRoot";
export declare const Input: {
Root: typeof InputRoot;
Label: typeof InputLabel;
Text: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
Text: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
displayType?: "input" | "text";
noControl?: boolean;
} & import("react").RefAttributes<HTMLInputElement>>;
Textarea: import("react").ForwardRefExoticComponent<import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & import("react").RefAttributes<HTMLTextAreaElement>>;
DatePicker: {
({ className, triggerClassName, name, ...props }: import("./InputDatePicker").InputDatePickerProps): import("react/jsx-runtime").JSX.Element | null;
displayName: string;
};
DatePicker: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverProps & import("./InputDatePicker").InputDatePickerProps & import("react").RefAttributes<never>>;
Select: import("react").ForwardRefExoticComponent<import("@radix-ui/react-select").SelectProps & {
className?: string;
triggerClassName?: string;
position?: "popper" | "item-aligned" | undefined;
noControl?: boolean;
} & import("react").RefAttributes<never>>;
SelectItem: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-select").SelectItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
Number: import("react").ForwardRefExoticComponent<Omit<import("react-number-format").NumericFormatProps, "type"> & {
type?: "number" | "money" | "percent";
noControl?: boolean;
} & import("react").RefAttributes<HTMLInputElement>>;
Mask: import("react").ForwardRefExoticComponent<Omit<import("react-number-format").PatternFormatProps, "type" | "format"> & {
type: "tel" | "date" | "cel" | "hiddenCel" | "cpf" | "cnpj" | "cep";
noControl?: boolean;
} & import("react").RefAttributes<HTMLInputElement>>;
Checkbox: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
noControl?: boolean;
} & import("react").RefAttributes<HTMLButtonElement>>;
};
4 changes: 4 additions & 0 deletions packages/kamalion-ui/types/components/Progress/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as React from "react";
import * as ProgressPrimitive from "@radix-ui/react-progress";
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
export { Progress };
2 changes: 2 additions & 0 deletions packages/kamalion-ui/types/components/Skeleton/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
export { Skeleton };
19 changes: 19 additions & 0 deletions packages/kamalion-ui/types/components/Toast/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ReactNode } from "react";
export type ToastType = "success" | "danger" | "info" | "warning";
export type ToastTypeMap = {
[key in ToastType]: {
color: string;
icon: ReactNode;
iconBg: string;
border: string;
};
};
interface Props {
message: string;
type: ToastType;
isVisible: boolean;
onClose: () => void;
onFinished: (e: unknown) => void;
}
export declare function Toast({ message, type, isVisible, onClose, onFinished, }: Props): import("react/jsx-runtime").JSX.Element;
export {};
3 changes: 3 additions & 0 deletions packages/kamalion-ui/types/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export * from "./Accordion";
export * from "./Box";
export * from "./Button";
export * from "./Calendar";
export * from "./Dialog";
export * from "./Form";
export * from "./Input";
export * from "./Page";
export * from "./Popover";
export * from "./Skeleton";
export * from "./Toast";
2 changes: 2 additions & 0 deletions packages/kamalion-ui/types/hooks/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./useDialog";
export * from "./useToast";
16 changes: 16 additions & 0 deletions packages/kamalion-ui/types/hooks/useDialog.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ReactNode } from "react";
type ShowDialogProps = {
content: React.ReactNode;
title?: string;
contentClassName?: string;
onClose?: () => void;
};
interface DialogContextProps {
showDialog: (props: ShowDialogProps) => void;
closeDialog: () => void;
}
export declare function DialogProvider({ children }: {
children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
export declare function useDialog(): DialogContextProps;
export {};
14 changes: 14 additions & 0 deletions packages/kamalion-ui/types/hooks/useToast.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ReactNode } from "react";
import { ToastType } from "../components";
interface ToastProviderProps {
showToast: ({ message, type }: {
message: string;
type?: ToastType;
}) => void;
}
export declare const ToastContext: import("react").Context<ToastProviderProps | null>;
export declare function ToastProvider({ children }: {
children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
export declare function useToast(): ToastProviderProps;
export {};
1 change: 1 addition & 0 deletions packages/kamalion-ui/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./components";
export * from "./stores";
export * from "./util";
export * from "./hooks";

0 comments on commit 07900ce

Please sign in to comment.