moldekit-react 0.0.4 → 0.0.5

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.
@@ -0,0 +1,3 @@
1
+ import { MkButtonProps } from './MkButton.props.ts';
2
+ declare function MkButton({ variant, color, size, fullWidth, iconName, className, disabled, children, ...props }: MkButtonProps): import("react/jsx-runtime").JSX.Element;
3
+ export default MkButton;
@@ -0,0 +1,7 @@
1
+ export interface MkButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
+ variant?: 'filled' | 'outlined' | 'transparent' | 'iconOnly';
3
+ color?: 'primary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
4
+ size?: 'small' | 'medium' | 'large';
5
+ fullWidth?: boolean;
6
+ iconName?: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default as MkButton } from './MkButton';
2
+ export * from './MkButton.props';
@@ -0,0 +1,3 @@
1
+ export declare const IconMap: {
2
+ home: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
3
+ };
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ type TypographyProps = {
3
+ children: React.ReactNode;
4
+ };
5
+ export declare const H1: React.FC<TypographyProps>;
6
+ export declare const H2: React.FC<TypographyProps>;
7
+ export declare const H3: React.FC<TypographyProps>;
8
+ export declare const H4: React.FC<TypographyProps>;
9
+ export declare const H5: React.FC<TypographyProps>;
10
+ export declare const H6: React.FC<TypographyProps>;
11
+ export declare const Body1: React.FC<TypographyProps>;
12
+ export declare const Body2: React.FC<TypographyProps>;
13
+ export declare const Caption: React.FC<TypographyProps>;
14
+ export declare const Label: React.FC<TypographyProps>;
15
+ export {};
package/dist/index.cjs CHANGED
@@ -16,7 +16,7 @@ function MkButton({
16
16
  children,
17
17
  ...props
18
18
  }) {
19
- const baseStyles = "flex items-center justify-center text-center rounded-[7px] uppercase focus:outline-none transition-colors duration-300 disabled:pointer-events-none disabled:cursor-not-allowed";
19
+ const baseStyles = "flex items-center justify-center text-center rounded-[7px] uppercase focus:outline-none transition-colors duration-300disabled:pointer-events-none disabled:cursor-not-allowed";
20
20
  const variantStyles = {
21
21
  filled: "font-medium rounded-[7px] uppercase focus:outline-none transition-colors duration-300 disabled:pointer-events-none disabled:cursor-not-allowed",
22
22
  outlined: "font-medium rounded-[7px] uppercase border focus:outline-none transition-colors duration-300 disabled:pointer-events-none disabled:cursor-not-allowed",
@@ -52,17 +52,16 @@ function MkButton({
52
52
  medium: "px-4 py-2 text-base",
53
53
  large: "px-6 py-3 text-lg"
54
54
  };
55
- const variantStyleClass = variantStyles[variant] ?? "";
56
- const variantColorMap = colorStyles[variant] ?? {};
57
- const colorStyleClass = variantColorMap[color] ?? "";
58
- const sizeStyleClass = variant === "iconOnly" ? "p-2 w-10 h-10" : sizeStyles[size] ?? "";
55
+ const variantStyleClass = variantStyles[variant];
56
+ const colorStyleClass = colorStyles[variant][color];
57
+ const sizeStyleClass = variant === "iconOnly" ? "p-2 w-10 h-10" : sizeStyles[size];
59
58
  const fullWidthClass = fullWidth ? "w-full" : "";
60
59
  return /* @__PURE__ */ jsxRuntime.jsxs(
61
60
  "button",
62
61
  {
63
62
  type: "button",
64
63
  disabled,
65
- className: `${baseStyles}
64
+ className: `${baseStyles}
66
65
  ${variantStyleClass}
67
66
  ${colorStyleClass}
68
67
  ${sizeStyleClass}
@@ -0,0 +1,2 @@
1
+ export { MkButton } from './components/MkButton';
2
+ export type { MkButtonProps } from './components/MkButton';
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ function MkButton({
12
12
  children,
13
13
  ...props
14
14
  }) {
15
- const baseStyles = "flex items-center justify-center text-center rounded-[7px] uppercase focus:outline-none transition-colors duration-300 disabled:pointer-events-none disabled:cursor-not-allowed";
15
+ const baseStyles = "flex items-center justify-center text-center rounded-[7px] uppercase focus:outline-none transition-colors duration-300disabled:pointer-events-none disabled:cursor-not-allowed";
16
16
  const variantStyles = {
17
17
  filled: "font-medium rounded-[7px] uppercase focus:outline-none transition-colors duration-300 disabled:pointer-events-none disabled:cursor-not-allowed",
18
18
  outlined: "font-medium rounded-[7px] uppercase border focus:outline-none transition-colors duration-300 disabled:pointer-events-none disabled:cursor-not-allowed",
@@ -48,17 +48,16 @@ function MkButton({
48
48
  medium: "px-4 py-2 text-base",
49
49
  large: "px-6 py-3 text-lg"
50
50
  };
51
- const variantStyleClass = variantStyles[variant] ?? "";
52
- const variantColorMap = colorStyles[variant] ?? {};
53
- const colorStyleClass = variantColorMap[color] ?? "";
54
- const sizeStyleClass = variant === "iconOnly" ? "p-2 w-10 h-10" : sizeStyles[size] ?? "";
51
+ const variantStyleClass = variantStyles[variant];
52
+ const colorStyleClass = colorStyles[variant][color];
53
+ const sizeStyleClass = variant === "iconOnly" ? "p-2 w-10 h-10" : sizeStyles[size];
55
54
  const fullWidthClass = fullWidth ? "w-full" : "";
56
55
  return /* @__PURE__ */ jsxs(
57
56
  "button",
58
57
  {
59
58
  type: "button",
60
59
  disabled,
61
- className: `${baseStyles}
60
+ className: `${baseStyles}
62
61
  ${variantStyleClass}
63
62
  ${colorStyleClass}
64
63
  ${sizeStyleClass}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moldekit-react",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "Anderson Nieves",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "lint": "eslint .",
28
28
  "dev": "storybook dev -p 6006",
29
29
  "test": "vitest",
30
- "build:lib": "tsc -p tsconfig.build.json && vite build",
30
+ "build:lib": "tsc --noEmit && vite build",
31
31
  "build:storybook": "storybook build"
32
32
  },
33
33
  "dependencies": {
@@ -67,6 +67,7 @@
67
67
  "typescript": "~5.8.3",
68
68
  "typescript-eslint": "^8.39.1",
69
69
  "vite": "^7.1.2",
70
+ "vite-plugin-dts": "^4.5.4",
70
71
  "vitest": "^3.2.4"
71
72
  }
72
73
  }