ui-prokit 1.0.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/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # UI ProKit
2
+
3
+ A modern, reusable UI component library built with React, TypeScript, and Tailwind CSS.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install ui-prokit
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Import Styles
14
+
15
+ First, import the styles in your app entry point (e.g., `main.tsx` or `App.tsx`):
16
+
17
+ ```tsx
18
+ import 'ui-prokit/styles.css';
19
+ ```
20
+
21
+ ### Using Components
22
+
23
+ ```tsx
24
+ import { Card, Button } from 'ui-prokit';
25
+
26
+ function App() {
27
+ return (
28
+ <Card padding="lg">
29
+ <h2>Welcome to UI ProKit</h2>
30
+ <Button variant="primary" size="lg">
31
+ Get Started
32
+ </Button>
33
+ </Card>
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Components
39
+
40
+ ### Card
41
+
42
+ A container component for displaying content in an elevated surface.
43
+
44
+ **Props:**
45
+ - `padding?: 'none' | 'sm' | 'md' | 'lg' | 'xl'` - Padding size (default: 'md')
46
+ - `hoverable?: boolean` - Show hover effect (default: true)
47
+ - `onClick?: () => void` - Click handler
48
+ - `className?: string` - Additional CSS classes
49
+
50
+ **Example:**
51
+ ```tsx
52
+ <Card padding="lg" onClick={() => console.log('clicked')}>
53
+ <h3>Card Title</h3>
54
+ <p>Card content</p>
55
+ </Card>
56
+ ```
57
+
58
+ ### Button
59
+
60
+ A button component with multiple variants and sizes.
61
+
62
+ **Props:**
63
+ - `variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'ghost'` - Visual style (default: 'primary')
64
+ - `size?: 'sm' | 'md' | 'lg'` - Button size (default: 'md')
65
+ - `loading?: boolean` - Show loading spinner (default: false)
66
+ - `leftIcon?: ReactNode` - Icon before text
67
+ - `rightIcon?: ReactNode` - Icon after text
68
+ - `fullWidth?: boolean` - Take full width (default: false)
69
+
70
+ **Example:**
71
+ ```tsx
72
+ <Button variant="primary" size="lg" loading={isLoading}>
73
+ Submit
74
+ </Button>
75
+
76
+ <Button variant="secondary" leftIcon={<IconComponent />}>
77
+ With Icon
78
+ </Button>
79
+ ```
80
+
81
+ ## Development
82
+
83
+ ```bash
84
+ # Install dependencies
85
+ npm install
86
+
87
+ # Build the library
88
+ npm run build
89
+
90
+ # Watch mode for development
91
+ npm run dev
92
+ ```
93
+
94
+ ## License
95
+
96
+ MIT
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ /**
4
+ * Visual style variant of the button
5
+ * @default 'primary'
6
+ */
7
+ variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'ghost';
8
+ /**
9
+ * Size of the button
10
+ * @default 'md'
11
+ */
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /**
14
+ * Whether the button is in a loading state
15
+ * @default false
16
+ */
17
+ loading?: boolean;
18
+ /**
19
+ * Icon to display before the button text
20
+ */
21
+ leftIcon?: React.ReactNode;
22
+ /**
23
+ * Icon to display after the button text
24
+ */
25
+ rightIcon?: React.ReactNode;
26
+ /**
27
+ * Makes the button take full width of its container
28
+ * @default false
29
+ */
30
+ fullWidth?: boolean;
31
+ /**
32
+ * Button content - can be omitted for icon-only buttons
33
+ */
34
+ children?: React.ReactNode;
35
+ }
36
+ /**
37
+ * Button component with multiple variants and sizes
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <Button variant="primary" size="lg">
42
+ * Click Me
43
+ * </Button>
44
+ *
45
+ * <Button variant="secondary" leftIcon={<Icon />}>
46
+ * With Icon
47
+ * </Button>
48
+ *
49
+ * <Button variant="ghost" leftIcon={<TrashIcon />} />
50
+ * ```
51
+ */
52
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ export interface CardProps {
3
+ /**
4
+ * Content to be rendered inside the card
5
+ */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Additional CSS classes to apply to the card
9
+ */
10
+ className?: string;
11
+ /**
12
+ * Padding size for the card content
13
+ * @default 'md'
14
+ */
15
+ padding?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
16
+ /**
17
+ * Click handler for the card
18
+ */
19
+ onClick?: () => void;
20
+ /**
21
+ * Whether to show hover effect
22
+ * @default true
23
+ */
24
+ hoverable?: boolean;
25
+ }
26
+ /**
27
+ * Card component for displaying content in a contained, elevated surface
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <Card padding="lg">
32
+ * <h2>Card Title</h2>
33
+ * <p>Card content goes here</p>
34
+ * </Card>
35
+ * ```
36
+ */
37
+ export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { Card } from './Card';
2
+ export type { CardProps } from './Card';
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),D="_card_hc8eo_2",E="_clickable_hc8eo_13",A="_paddingNone_hc8eo_18",N="_paddingSm_hc8eo_22",M="_paddingMd_hc8eo_26",$="_paddingLg_hc8eo_30",w="_paddingXl_hc8eo_34",a={card:D,clickable:E,paddingNone:A,paddingSm:N,paddingMd:M,paddingLg:$,paddingXl:w},k={none:a.paddingNone,sm:a.paddingSm,md:a.paddingMd,lg:a.paddingLg,xl:a.paddingXl},u=m.forwardRef(({children:t,className:r="",padding:i="md",onClick:n,hoverable:c=!0},o)=>{const d=c&&n?a.clickable:"",l=k[i];return e.jsx("div",{ref:o,className:`${a.card} ${l} ${d} ${r}`,onClick:n,children:t})});u.displayName="Card";const L="_button_fmuu7_2",j="_sizeSm_fmuu7_20",W="_sizeMd_fmuu7_27",R="_sizeLg_fmuu7_34",P="_variantPrimary_fmuu7_42",G="_variantSecondary_fmuu7_55",X="_variantDanger_fmuu7_68",T="_variantSuccess_fmuu7_77",q="_variantGhost_fmuu7_86",H="_fullWidth_fmuu7_100",O="_spinner_fmuu7_105",s={button:L,sizeSm:j,sizeMd:W,sizeLg:R,variantPrimary:P,variantSecondary:G,variantDanger:X,variantSuccess:T,variantGhost:q,fullWidth:H,spinner:O},V={primary:s.variantPrimary,secondary:s.variantSecondary,danger:s.variantDanger,success:s.variantSuccess,ghost:s.variantGhost},I={sm:s.sizeSm,md:s.sizeMd,lg:s.sizeLg},_=m.forwardRef(({children:t,variant:r="primary",size:i="md",loading:n=!1,leftIcon:c,rightIcon:o,fullWidth:d=!1,className:l="",disabled:F,...y},C)=>{const b=s.button,S=V[r],x=I[i],z=d?s.fullWidth:"",B=F||n;return e.jsxs("button",{ref:C,className:`${b} ${S} ${x} ${z} ${l}`,disabled:B,...y,children:[n&&e.jsxs("svg",{className:s.spinner,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!n&&c,t,!n&&o]})});_.displayName="Button";const g={primary:{50:"#EEF2F9",100:"#D6E2F0",200:"#B0C7E3",300:"#89ACD5",400:"#6691C8",500:"#4A6FA5",600:"#3C5A87",700:"#2F4568",800:"#21304A",900:"#131B2B"},neutral:{50:"#F9FAFB",100:"#F3F4F6",200:"#E5E7EB",300:"#D1D5DB",400:"#9CA3AF",500:"#6B7280",600:"#4B5563",700:"#374151",800:"#1F2937",900:"#111827"},success:{50:"#F0FDF4",500:"#22C55E",600:"#16A34A"},danger:{50:"#FEF2F2",500:"#EF4444",600:"#DC2626"},warning:{50:"#FFFBEB",500:"#F59E0B",600:"#D97706"}},p={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},f={sm:"0.25rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.25rem",full:"9999px"},v={xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem"},h={normal:400,medium:500,semibold:600,bold:700},J={colors:g,spacing:p,borderRadius:f,fontSize:v,fontWeight:h};exports.Button=_;exports.Card=u;exports.borderRadius=f;exports.colors=g;exports.designTokens=J;exports.fontSize=v;exports.fontWeight=h;exports.spacing=p;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/components/Card/Card.tsx","../src/components/Button/Button.tsx","../src/styles/tokens.ts"],"sourcesContent":["import React from 'react';\nimport styles from './Card.module.css';\n\nexport interface CardProps {\n /**\n * Content to be rendered inside the card\n */\n children: React.ReactNode;\n\n /**\n * Additional CSS classes to apply to the card\n */\n className?: string;\n\n /**\n * Padding size for the card content\n * @default 'md'\n */\n padding?: 'none' | 'sm' | 'md' | 'lg' | 'xl';\n\n /**\n * Click handler for the card\n */\n onClick?: () => void;\n\n /**\n * Whether to show hover effect\n * @default true\n */\n hoverable?: boolean;\n}\n\nconst paddingClasses = {\n none: styles.paddingNone,\n sm: styles.paddingSm,\n md: styles.paddingMd,\n lg: styles.paddingLg,\n xl: styles.paddingXl,\n};\n\n/**\n * Card component for displaying content in a contained, elevated surface\n *\n * @example\n * ```tsx\n * <Card padding=\"lg\">\n * <h2>Card Title</h2>\n * <p>Card content goes here</p>\n * </Card>\n * ```\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(\n (\n {\n children,\n className = '',\n padding = 'md',\n onClick,\n hoverable = true,\n },\n ref\n ) => {\n const clickableClass = hoverable && onClick ? styles.clickable : '';\n const paddingClass = paddingClasses[padding];\n\n return (\n <div\n ref={ref}\n className={`${styles.card} ${paddingClass} ${clickableClass} ${className}`}\n onClick={onClick}\n >\n {children}\n </div>\n );\n }\n);\n\nCard.displayName = 'Card';\n","import React from 'react';\nimport styles from './Button.module.css';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * Visual style variant of the button\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'ghost';\n\n /**\n * Size of the button\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Whether the button is in a loading state\n * @default false\n */\n loading?: boolean;\n\n /**\n * Icon to display before the button text\n */\n leftIcon?: React.ReactNode;\n\n /**\n * Icon to display after the button text\n */\n rightIcon?: React.ReactNode;\n\n /**\n * Makes the button take full width of its container\n * @default false\n */\n fullWidth?: boolean;\n\n /**\n * Button content - can be omitted for icon-only buttons\n */\n children?: React.ReactNode;\n}\n\nconst variantClasses = {\n primary: styles.variantPrimary,\n secondary: styles.variantSecondary,\n danger: styles.variantDanger,\n success: styles.variantSuccess,\n ghost: styles.variantGhost,\n};\n\nconst sizeClasses = {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n};\n\n/**\n * Button component with multiple variants and sizes\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">\n * Click Me\n * </Button>\n *\n * <Button variant=\"secondary\" leftIcon={<Icon />}>\n * With Icon\n * </Button>\n *\n * <Button variant=\"ghost\" leftIcon={<TrashIcon />} />\n * ```\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n children,\n variant = 'primary',\n size = 'md',\n loading = false,\n leftIcon,\n rightIcon,\n fullWidth = false,\n className = '',\n disabled,\n ...props\n },\n ref\n ) => {\n const baseClasses = styles.button;\n const variantClass = variantClasses[variant];\n const sizeClass = sizeClasses[size];\n const widthClass = fullWidth ? styles.fullWidth : '';\n const isDisabled = disabled || loading;\n\n return (\n <button\n ref={ref}\n className={`${baseClasses} ${variantClass} ${sizeClass} ${widthClass} ${className}`}\n disabled={isDisabled}\n {...props}\n >\n {loading && (\n <svg\n className={styles.spinner}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n )}\n {!loading && leftIcon}\n {children}\n {!loading && rightIcon}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n","/**\n * Design Tokens - JavaScript/TypeScript Export\n * Use these when you need to access design tokens in JS/TS\n * (e.g., for charts, calculations, or dynamic styling)\n */\n\nexport const colors = {\n primary: {\n 50: '#EEF2F9',\n 100: '#D6E2F0',\n 200: '#B0C7E3',\n 300: '#89ACD5',\n 400: '#6691C8',\n 500: '#4A6FA5',\n 600: '#3C5A87',\n 700: '#2F4568',\n 800: '#21304A',\n 900: '#131B2B',\n },\n neutral: {\n 50: '#F9FAFB',\n 100: '#F3F4F6',\n 200: '#E5E7EB',\n 300: '#D1D5DB',\n 400: '#9CA3AF',\n 500: '#6B7280',\n 600: '#4B5563',\n 700: '#374151',\n 800: '#1F2937',\n 900: '#111827',\n },\n success: {\n 50: '#F0FDF4',\n 500: '#22C55E',\n 600: '#16A34A',\n },\n danger: {\n 50: '#FEF2F2',\n 500: '#EF4444',\n 600: '#DC2626',\n },\n warning: {\n 50: '#FFFBEB',\n 500: '#F59E0B',\n 600: '#D97706',\n },\n} as const;\n\nexport const spacing = {\n xs: '0.25rem',\n sm: '0.5rem',\n md: '1rem',\n lg: '1.5rem',\n xl: '2rem',\n '2xl': '3rem',\n} as const;\n\nexport const borderRadius = {\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n '2xl': '1.25rem',\n full: '9999px',\n} as const;\n\nexport const fontSize = {\n xs: '0.75rem',\n sm: '0.875rem',\n base: '1rem',\n lg: '1.125rem',\n xl: '1.25rem',\n '2xl': '1.5rem',\n} as const;\n\nexport const fontWeight = {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n} as const;\n\nexport const designTokens = {\n colors,\n spacing,\n borderRadius,\n fontSize,\n fontWeight,\n} as const;\n"],"names":["paddingClasses","styles","Card","React","children","className","padding","onClick","hoverable","ref","clickableClass","paddingClass","jsx","variantClasses","sizeClasses","Button","variant","size","loading","leftIcon","rightIcon","fullWidth","disabled","props","baseClasses","variantClass","sizeClass","widthClass","isDisabled","jsxs","colors","spacing","borderRadius","fontSize","fontWeight","designTokens"],"mappings":"iYAgCMA,EAAiB,CACrB,KAAMC,EAAO,YACb,GAAIA,EAAO,UACX,GAAIA,EAAO,UACX,GAAIA,EAAO,UACX,GAAIA,EAAO,SACb,EAaaC,EAAOC,EAAM,WACxB,CACE,CACE,SAAAC,EACA,UAAAC,EAAY,GACZ,QAAAC,EAAU,KACV,QAAAC,EACA,UAAAC,EAAY,EAAA,EAEdC,IACG,CACH,MAAMC,EAAiBF,GAAaD,EAAUN,EAAO,UAAY,GAC3DU,EAAeX,EAAeM,CAAO,EAE3C,OACEM,EAAAA,IAAC,MAAA,CACC,IAAAH,EACA,UAAW,GAAGR,EAAO,IAAI,IAAIU,CAAY,IAAID,CAAc,IAAIL,CAAS,GACxE,QAAAE,EAEC,SAAAH,CAAA,CAAA,CAGP,CACF,EAEAF,EAAK,YAAc,kbCjCbW,EAAiB,CACrB,QAASZ,EAAO,eAChB,UAAWA,EAAO,iBAClB,OAAQA,EAAO,cACf,QAASA,EAAO,eAChB,MAAOA,EAAO,YAChB,EAEMa,EAAc,CAClB,GAAIb,EAAO,OACX,GAAIA,EAAO,OACX,GAA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,SAAA,EAEP,OAAQ,CACN,GAAI,UACJ,IAAK,UACL,IAAK,SAAA,EAEP,QAAS,CACP,GAAI,UACJ,IAAK,UACL,IAAK,SAAA,CAET,EAEaC,EAAU,CACrB,GAAI,UACJ,GAAI,SACJ,GAAI,OACJ,GAAI,SACJ,GAAI,OACJ,MAAO,MACT,EAEaC,EAAe,CAC1B,GAAI,UACJ,GAAI,SACJ,GAAI,UACJ,GAAI,OACJ,MAAO,UACP,KAAM,QACR,EAEaC,EAAW,CACtB,GAAI,UACJ,GAAI,WACJ,KAAM,OACN,GAAI,WACJ,GAAI,UACJ,MAAO,QACT,EAEaC,EAAa,CACxB,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,KAAM,GACR,EAEaC,EAAe,CAC1B,OAAAL,EACA,QAAAC,EACA,aAAAC,EACA,SAAAC,EACA,WAAAC,CACF"}
@@ -0,0 +1,6 @@
1
+ import './styles.css';
2
+ export { Card } from './components/Card';
3
+ export { Button } from './components/Button';
4
+ export type { CardProps } from './components/Card';
5
+ export type { ButtonProps } from './components/Button';
6
+ export { designTokens, colors, spacing, borderRadius, fontSize, fontWeight } from './styles/tokens';
package/dist/index.js ADDED
@@ -0,0 +1,204 @@
1
+ import { jsx as m, jsxs as l } from "react/jsx-runtime";
2
+ import _ from "react";
3
+ const y = "_card_hc8eo_2", b = "_clickable_hc8eo_13", z = "_paddingNone_hc8eo_18", S = "_paddingSm_hc8eo_22", x = "_paddingMd_hc8eo_26", B = "_paddingLg_hc8eo_30", D = "_paddingXl_hc8eo_34", n = {
4
+ card: y,
5
+ clickable: b,
6
+ paddingNone: z,
7
+ paddingSm: S,
8
+ paddingMd: x,
9
+ paddingLg: B,
10
+ paddingXl: D
11
+ }, E = {
12
+ none: n.paddingNone,
13
+ sm: n.paddingSm,
14
+ md: n.paddingMd,
15
+ lg: n.paddingLg,
16
+ xl: n.paddingXl
17
+ }, A = _.forwardRef(
18
+ ({
19
+ children: e,
20
+ className: r = "",
21
+ padding: t = "md",
22
+ onClick: a,
23
+ hoverable: i = !0
24
+ }, c) => {
25
+ const d = i && a ? n.clickable : "", o = E[t];
26
+ return /* @__PURE__ */ m(
27
+ "div",
28
+ {
29
+ ref: c,
30
+ className: `${n.card} ${o} ${d} ${r}`,
31
+ onClick: a,
32
+ children: e
33
+ }
34
+ );
35
+ }
36
+ );
37
+ A.displayName = "Card";
38
+ const N = "_button_fmuu7_2", $ = "_sizeSm_fmuu7_20", w = "_sizeMd_fmuu7_27", M = "_sizeLg_fmuu7_34", L = "_variantPrimary_fmuu7_42", k = "_variantSecondary_fmuu7_55", W = "_variantDanger_fmuu7_68", G = "_variantSuccess_fmuu7_77", P = "_variantGhost_fmuu7_86", R = "_fullWidth_fmuu7_100", X = "_spinner_fmuu7_105", s = {
39
+ button: N,
40
+ sizeSm: $,
41
+ sizeMd: w,
42
+ sizeLg: M,
43
+ variantPrimary: L,
44
+ variantSecondary: k,
45
+ variantDanger: W,
46
+ variantSuccess: G,
47
+ variantGhost: P,
48
+ fullWidth: R,
49
+ spinner: X
50
+ }, j = {
51
+ primary: s.variantPrimary,
52
+ secondary: s.variantSecondary,
53
+ danger: s.variantDanger,
54
+ success: s.variantSuccess,
55
+ ghost: s.variantGhost
56
+ }, H = {
57
+ sm: s.sizeSm,
58
+ md: s.sizeMd,
59
+ lg: s.sizeLg
60
+ }, T = _.forwardRef(
61
+ ({
62
+ children: e,
63
+ variant: r = "primary",
64
+ size: t = "md",
65
+ loading: a = !1,
66
+ leftIcon: i,
67
+ rightIcon: c,
68
+ fullWidth: d = !1,
69
+ className: o = "",
70
+ disabled: u,
71
+ ...g
72
+ }, p) => {
73
+ const f = s.button, v = j[r], h = H[t], F = d ? s.fullWidth : "", C = u || a;
74
+ return /* @__PURE__ */ l(
75
+ "button",
76
+ {
77
+ ref: p,
78
+ className: `${f} ${v} ${h} ${F} ${o}`,
79
+ disabled: C,
80
+ ...g,
81
+ children: [
82
+ a && /* @__PURE__ */ l(
83
+ "svg",
84
+ {
85
+ className: s.spinner,
86
+ xmlns: "http://www.w3.org/2000/svg",
87
+ fill: "none",
88
+ viewBox: "0 0 24 24",
89
+ children: [
90
+ /* @__PURE__ */ m(
91
+ "circle",
92
+ {
93
+ className: "opacity-25",
94
+ cx: "12",
95
+ cy: "12",
96
+ r: "10",
97
+ stroke: "currentColor",
98
+ strokeWidth: "4"
99
+ }
100
+ ),
101
+ /* @__PURE__ */ m(
102
+ "path",
103
+ {
104
+ className: "opacity-75",
105
+ fill: "currentColor",
106
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
107
+ }
108
+ )
109
+ ]
110
+ }
111
+ ),
112
+ !a && i,
113
+ e,
114
+ !a && c
115
+ ]
116
+ }
117
+ );
118
+ }
119
+ );
120
+ T.displayName = "Button";
121
+ const V = {
122
+ primary: {
123
+ 50: "#EEF2F9",
124
+ 100: "#D6E2F0",
125
+ 200: "#B0C7E3",
126
+ 300: "#89ACD5",
127
+ 400: "#6691C8",
128
+ 500: "#4A6FA5",
129
+ 600: "#3C5A87",
130
+ 700: "#2F4568",
131
+ 800: "#21304A",
132
+ 900: "#131B2B"
133
+ },
134
+ neutral: {
135
+ 50: "#F9FAFB",
136
+ 100: "#F3F4F6",
137
+ 200: "#E5E7EB",
138
+ 300: "#D1D5DB",
139
+ 400: "#9CA3AF",
140
+ 500: "#6B7280",
141
+ 600: "#4B5563",
142
+ 700: "#374151",
143
+ 800: "#1F2937",
144
+ 900: "#111827"
145
+ },
146
+ success: {
147
+ 50: "#F0FDF4",
148
+ 500: "#22C55E",
149
+ 600: "#16A34A"
150
+ },
151
+ danger: {
152
+ 50: "#FEF2F2",
153
+ 500: "#EF4444",
154
+ 600: "#DC2626"
155
+ },
156
+ warning: {
157
+ 50: "#FFFBEB",
158
+ 500: "#F59E0B",
159
+ 600: "#D97706"
160
+ }
161
+ }, q = {
162
+ xs: "0.25rem",
163
+ sm: "0.5rem",
164
+ md: "1rem",
165
+ lg: "1.5rem",
166
+ xl: "2rem",
167
+ "2xl": "3rem"
168
+ }, I = {
169
+ sm: "0.25rem",
170
+ md: "0.5rem",
171
+ lg: "0.75rem",
172
+ xl: "1rem",
173
+ "2xl": "1.25rem",
174
+ full: "9999px"
175
+ }, J = {
176
+ xs: "0.75rem",
177
+ sm: "0.875rem",
178
+ base: "1rem",
179
+ lg: "1.125rem",
180
+ xl: "1.25rem",
181
+ "2xl": "1.5rem"
182
+ }, K = {
183
+ normal: 400,
184
+ medium: 500,
185
+ semibold: 600,
186
+ bold: 700
187
+ }, U = {
188
+ colors: V,
189
+ spacing: q,
190
+ borderRadius: I,
191
+ fontSize: J,
192
+ fontWeight: K
193
+ };
194
+ export {
195
+ T as Button,
196
+ A as Card,
197
+ I as borderRadius,
198
+ V as colors,
199
+ U as designTokens,
200
+ J as fontSize,
201
+ K as fontWeight,
202
+ q as spacing
203
+ };
204
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/components/Card/Card.tsx","../src/components/Button/Button.tsx","../src/styles/tokens.ts"],"sourcesContent":["import React from 'react';\nimport styles from './Card.module.css';\n\nexport interface CardProps {\n /**\n * Content to be rendered inside the card\n */\n children: React.ReactNode;\n\n /**\n * Additional CSS classes to apply to the card\n */\n className?: string;\n\n /**\n * Padding size for the card content\n * @default 'md'\n */\n padding?: 'none' | 'sm' | 'md' | 'lg' | 'xl';\n\n /**\n * Click handler for the card\n */\n onClick?: () => void;\n\n /**\n * Whether to show hover effect\n * @default true\n */\n hoverable?: boolean;\n}\n\nconst paddingClasses = {\n none: styles.paddingNone,\n sm: styles.paddingSm,\n md: styles.paddingMd,\n lg: styles.paddingLg,\n xl: styles.paddingXl,\n};\n\n/**\n * Card component for displaying content in a contained, elevated surface\n *\n * @example\n * ```tsx\n * <Card padding=\"lg\">\n * <h2>Card Title</h2>\n * <p>Card content goes here</p>\n * </Card>\n * ```\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(\n (\n {\n children,\n className = '',\n padding = 'md',\n onClick,\n hoverable = true,\n },\n ref\n ) => {\n const clickableClass = hoverable && onClick ? styles.clickable : '';\n const paddingClass = paddingClasses[padding];\n\n return (\n <div\n ref={ref}\n className={`${styles.card} ${paddingClass} ${clickableClass} ${className}`}\n onClick={onClick}\n >\n {children}\n </div>\n );\n }\n);\n\nCard.displayName = 'Card';\n","import React from 'react';\nimport styles from './Button.module.css';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * Visual style variant of the button\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'ghost';\n\n /**\n * Size of the button\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Whether the button is in a loading state\n * @default false\n */\n loading?: boolean;\n\n /**\n * Icon to display before the button text\n */\n leftIcon?: React.ReactNode;\n\n /**\n * Icon to display after the button text\n */\n rightIcon?: React.ReactNode;\n\n /**\n * Makes the button take full width of its container\n * @default false\n */\n fullWidth?: boolean;\n\n /**\n * Button content - can be omitted for icon-only buttons\n */\n children?: React.ReactNode;\n}\n\nconst variantClasses = {\n primary: styles.variantPrimary,\n secondary: styles.variantSecondary,\n danger: styles.variantDanger,\n success: styles.variantSuccess,\n ghost: styles.variantGhost,\n};\n\nconst sizeClasses = {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n};\n\n/**\n * Button component with multiple variants and sizes\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">\n * Click Me\n * </Button>\n *\n * <Button variant=\"secondary\" leftIcon={<Icon />}>\n * With Icon\n * </Button>\n *\n * <Button variant=\"ghost\" leftIcon={<TrashIcon />} />\n * ```\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n children,\n variant = 'primary',\n size = 'md',\n loading = false,\n leftIcon,\n rightIcon,\n fullWidth = false,\n className = '',\n disabled,\n ...props\n },\n ref\n ) => {\n const baseClasses = styles.button;\n const variantClass = variantClasses[variant];\n const sizeClass = sizeClasses[size];\n const widthClass = fullWidth ? styles.fullWidth : '';\n const isDisabled = disabled || loading;\n\n return (\n <button\n ref={ref}\n className={`${baseClasses} ${variantClass} ${sizeClass} ${widthClass} ${className}`}\n disabled={isDisabled}\n {...props}\n >\n {loading && (\n <svg\n className={styles.spinner}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n )}\n {!loading && leftIcon}\n {children}\n {!loading && rightIcon}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n","/**\n * Design Tokens - JavaScript/TypeScript Export\n * Use these when you need to access design tokens in JS/TS\n * (e.g., for charts, calculations, or dynamic styling)\n */\n\nexport const colors = {\n primary: {\n 50: '#EEF2F9',\n 100: '#D6E2F0',\n 200: '#B0C7E3',\n 300: '#89ACD5',\n 400: '#6691C8',\n 500: '#4A6FA5',\n 600: '#3C5A87',\n 700: '#2F4568',\n 800: '#21304A',\n 900: '#131B2B',\n },\n neutral: {\n 50: '#F9FAFB',\n 100: '#F3F4F6',\n 200: '#E5E7EB',\n 300: '#D1D5DB',\n 400: '#9CA3AF',\n 500: '#6B7280',\n 600: '#4B5563',\n 700: '#374151',\n 800: '#1F2937',\n 900: '#111827',\n },\n success: {\n 50: '#F0FDF4',\n 500: '#22C55E',\n 600: '#16A34A',\n },\n danger: {\n 50: '#FEF2F2',\n 500: '#EF4444',\n 600: '#DC2626',\n },\n warning: {\n 50: '#FFFBEB',\n 500: '#F59E0B',\n 600: '#D97706',\n },\n} as const;\n\nexport const spacing = {\n xs: '0.25rem',\n sm: '0.5rem',\n md: '1rem',\n lg: '1.5rem',\n xl: '2rem',\n '2xl': '3rem',\n} as const;\n\nexport const borderRadius = {\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n '2xl': '1.25rem',\n full: '9999px',\n} as const;\n\nexport const fontSize = {\n xs: '0.75rem',\n sm: '0.875rem',\n base: '1rem',\n lg: '1.125rem',\n xl: '1.25rem',\n '2xl': '1.5rem',\n} as const;\n\nexport const fontWeight = {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n} as const;\n\nexport const designTokens = {\n colors,\n spacing,\n borderRadius,\n fontSize,\n fontWeight,\n} as const;\n"],"names":["paddingClasses","styles","Card","React","children","className","padding","onClick","hoverable","ref","clickableClass","paddingClass","jsx","variantClasses","sizeClasses","Button","variant","size","loading","leftIcon","rightIcon","fullWidth","disabled","props","baseClasses","variantClass","sizeClass","widthClass","isDisabled","jsxs","colors","spacing","borderRadius","fontSize","fontWeight","designTokens"],"mappings":";;;;;;;;;;GAgCMA,IAAiB;AAAA,EACrB,MAAMC,EAAO;AAAA,EACb,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AACb,GAaaC,IAAOC,EAAM;AAAA,EACxB,CACE;AAAA,IACE,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU;AAAA,IACV,SAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,EAAA,GAEdC,MACG;AACH,UAAMC,IAAiBF,KAAaD,IAAUN,EAAO,YAAY,IAC3DU,IAAeX,EAAeM,CAAO;AAE3C,WACE,gBAAAM;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,WAAW,GAAGR,EAAO,IAAI,IAAIU,CAAY,IAAID,CAAc,IAAIL,CAAS;AAAA,QACx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AA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,MAAM;AACR,GAEaC,IAAW;AAAA,EACtB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT,GAEaC,IAAa;AAAA,EACxB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AACR,GAEaC,IAAe;AAAA,EAC1B,QAAAL;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF;"}
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Design Tokens - JavaScript/TypeScript Export
3
+ * Use these when you need to access design tokens in JS/TS
4
+ * (e.g., for charts, calculations, or dynamic styling)
5
+ */
6
+ export declare const colors: {
7
+ readonly primary: {
8
+ readonly 50: "#EEF2F9";
9
+ readonly 100: "#D6E2F0";
10
+ readonly 200: "#B0C7E3";
11
+ readonly 300: "#89ACD5";
12
+ readonly 400: "#6691C8";
13
+ readonly 500: "#4A6FA5";
14
+ readonly 600: "#3C5A87";
15
+ readonly 700: "#2F4568";
16
+ readonly 800: "#21304A";
17
+ readonly 900: "#131B2B";
18
+ };
19
+ readonly neutral: {
20
+ readonly 50: "#F9FAFB";
21
+ readonly 100: "#F3F4F6";
22
+ readonly 200: "#E5E7EB";
23
+ readonly 300: "#D1D5DB";
24
+ readonly 400: "#9CA3AF";
25
+ readonly 500: "#6B7280";
26
+ readonly 600: "#4B5563";
27
+ readonly 700: "#374151";
28
+ readonly 800: "#1F2937";
29
+ readonly 900: "#111827";
30
+ };
31
+ readonly success: {
32
+ readonly 50: "#F0FDF4";
33
+ readonly 500: "#22C55E";
34
+ readonly 600: "#16A34A";
35
+ };
36
+ readonly danger: {
37
+ readonly 50: "#FEF2F2";
38
+ readonly 500: "#EF4444";
39
+ readonly 600: "#DC2626";
40
+ };
41
+ readonly warning: {
42
+ readonly 50: "#FFFBEB";
43
+ readonly 500: "#F59E0B";
44
+ readonly 600: "#D97706";
45
+ };
46
+ };
47
+ export declare const spacing: {
48
+ readonly xs: "0.25rem";
49
+ readonly sm: "0.5rem";
50
+ readonly md: "1rem";
51
+ readonly lg: "1.5rem";
52
+ readonly xl: "2rem";
53
+ readonly '2xl': "3rem";
54
+ };
55
+ export declare const borderRadius: {
56
+ readonly sm: "0.25rem";
57
+ readonly md: "0.5rem";
58
+ readonly lg: "0.75rem";
59
+ readonly xl: "1rem";
60
+ readonly '2xl': "1.25rem";
61
+ readonly full: "9999px";
62
+ };
63
+ export declare const fontSize: {
64
+ readonly xs: "0.75rem";
65
+ readonly sm: "0.875rem";
66
+ readonly base: "1rem";
67
+ readonly lg: "1.125rem";
68
+ readonly xl: "1.25rem";
69
+ readonly '2xl': "1.5rem";
70
+ };
71
+ export declare const fontWeight: {
72
+ readonly normal: 400;
73
+ readonly medium: 500;
74
+ readonly semibold: 600;
75
+ readonly bold: 700;
76
+ };
77
+ export declare const designTokens: {
78
+ readonly colors: {
79
+ readonly primary: {
80
+ readonly 50: "#EEF2F9";
81
+ readonly 100: "#D6E2F0";
82
+ readonly 200: "#B0C7E3";
83
+ readonly 300: "#89ACD5";
84
+ readonly 400: "#6691C8";
85
+ readonly 500: "#4A6FA5";
86
+ readonly 600: "#3C5A87";
87
+ readonly 700: "#2F4568";
88
+ readonly 800: "#21304A";
89
+ readonly 900: "#131B2B";
90
+ };
91
+ readonly neutral: {
92
+ readonly 50: "#F9FAFB";
93
+ readonly 100: "#F3F4F6";
94
+ readonly 200: "#E5E7EB";
95
+ readonly 300: "#D1D5DB";
96
+ readonly 400: "#9CA3AF";
97
+ readonly 500: "#6B7280";
98
+ readonly 600: "#4B5563";
99
+ readonly 700: "#374151";
100
+ readonly 800: "#1F2937";
101
+ readonly 900: "#111827";
102
+ };
103
+ readonly success: {
104
+ readonly 50: "#F0FDF4";
105
+ readonly 500: "#22C55E";
106
+ readonly 600: "#16A34A";
107
+ };
108
+ readonly danger: {
109
+ readonly 50: "#FEF2F2";
110
+ readonly 500: "#EF4444";
111
+ readonly 600: "#DC2626";
112
+ };
113
+ readonly warning: {
114
+ readonly 50: "#FFFBEB";
115
+ readonly 500: "#F59E0B";
116
+ readonly 600: "#D97706";
117
+ };
118
+ };
119
+ readonly spacing: {
120
+ readonly xs: "0.25rem";
121
+ readonly sm: "0.5rem";
122
+ readonly md: "1rem";
123
+ readonly lg: "1.5rem";
124
+ readonly xl: "2rem";
125
+ readonly '2xl': "3rem";
126
+ };
127
+ readonly borderRadius: {
128
+ readonly sm: "0.25rem";
129
+ readonly md: "0.5rem";
130
+ readonly lg: "0.75rem";
131
+ readonly xl: "1rem";
132
+ readonly '2xl': "1.25rem";
133
+ readonly full: "9999px";
134
+ };
135
+ readonly fontSize: {
136
+ readonly xs: "0.75rem";
137
+ readonly sm: "0.875rem";
138
+ readonly base: "1rem";
139
+ readonly lg: "1.125rem";
140
+ readonly xl: "1.25rem";
141
+ readonly '2xl': "1.5rem";
142
+ };
143
+ readonly fontWeight: {
144
+ readonly normal: 400;
145
+ readonly medium: 500;
146
+ readonly semibold: 600;
147
+ readonly bold: 700;
148
+ };
149
+ };
@@ -0,0 +1 @@
1
+ :root{--ui-color-primary-50: #EEF2F9;--ui-color-primary-100: #D6E2F0;--ui-color-primary-200: #B0C7E3;--ui-color-primary-300: #89ACD5;--ui-color-primary-400: #6691C8;--ui-color-primary-500: #4A6FA5;--ui-color-primary-600: #3C5A87;--ui-color-primary-700: #2F4568;--ui-color-primary-800: #21304A;--ui-color-primary-900: #131B2B;--ui-color-neutral-50: #F9FAFB;--ui-color-neutral-100: #F3F4F6;--ui-color-neutral-200: #E5E7EB;--ui-color-neutral-300: #D1D5DB;--ui-color-neutral-400: #9CA3AF;--ui-color-neutral-500: #6B7280;--ui-color-neutral-600: #4B5563;--ui-color-neutral-700: #374151;--ui-color-neutral-800: #1F2937;--ui-color-neutral-900: #111827;--ui-color-success-50: #F0FDF4;--ui-color-success-500: #22C55E;--ui-color-success-600: #16A34A;--ui-color-danger-50: #FEF2F2;--ui-color-danger-500: #EF4444;--ui-color-danger-600: #DC2626;--ui-color-warning-50: #FFFBEB;--ui-color-warning-500: #F59E0B;--ui-color-warning-600: #D97706;--ui-spacing-xs: .25rem;--ui-spacing-sm: .5rem;--ui-spacing-md: 1rem;--ui-spacing-lg: 1.5rem;--ui-spacing-xl: 2rem;--ui-spacing-2xl: 3rem;--ui-radius-sm: .25rem;--ui-radius-md: .5rem;--ui-radius-lg: .75rem;--ui-radius-xl: 1rem;--ui-radius-2xl: 1.25rem;--ui-radius-full: 9999px;--ui-button-radius-sm: .5rem;--ui-button-radius-md: 1.25rem;--ui-button-radius-lg: 1rem;--ui-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);--ui-shadow-md: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--ui-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--ui-shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--ui-shadow-2xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);--ui-font-size-xs: .75rem;--ui-font-size-sm: .875rem;--ui-font-size-base: 1rem;--ui-font-size-lg: 1.125rem;--ui-font-size-xl: 1.25rem;--ui-font-size-2xl: 1.5rem;--ui-font-weight-normal: 400;--ui-font-weight-medium: 500;--ui-font-weight-semibold: 600;--ui-font-weight-bold: 700;--ui-transition-fast: .15s;--ui-transition-base: .2s;--ui-transition-slow: .3s}*,*:before,*:after{box-sizing:border-box}._card_hc8eo_2{background-color:var(--ui-bg-card, white);border-radius:var(--ui-radius-xl, 1rem);box-shadow:var(--ui-shadow-md, 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06));transition:box-shadow var(--ui-transition-base, .2s) ease-in-out}._card_hc8eo_2:hover{box-shadow:var(--ui-shadow-lg, 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06))}._clickable_hc8eo_13{cursor:pointer}._paddingNone_hc8eo_18{padding:0}._paddingSm_hc8eo_22{padding:var(--ui-spacing-sm, .5rem)}._paddingMd_hc8eo_26{padding:var(--ui-spacing-md, 1rem)}._paddingLg_hc8eo_30{padding:var(--ui-spacing-lg, 1.5rem)}._paddingXl_hc8eo_34{padding:var(--ui-spacing-xl, 2rem)}._button_fmuu7_2{font-weight:var(--ui-font-weight-medium, 500);transition:background-color var(--ui-transition-base, .2s) ease,color var(--ui-transition-base, .2s) ease;display:inline-flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-family:inherit}._button_fmuu7_2:disabled{opacity:.5;cursor:not-allowed}._sizeSm_fmuu7_20{padding:8px 24px;font-size:var(--ui-font-size-sm, .875rem);gap:.375rem;border-radius:var(--ui-button-radius-lg, .5rem)}._sizeMd_fmuu7_27{padding:11px 33px;font-size:var(--ui-font-size-base, 1rem);gap:.5rem;border-radius:var(--ui-button-radius-md, 1.25rem)}._sizeLg_fmuu7_34{padding:14px 42px;font-size:var(--ui-font-size-lg, 1.125rem);gap:.625rem;border-radius:var( --ui-radius-2xl, 1rem)}._variantPrimary_fmuu7_42{background-color:var(--ui-color-primary-500, #4A6FA5);color:#fff}._variantPrimary_fmuu7_42:hover:not(:disabled){background-color:var(--ui-color-primary-600, #3C5A87)}._variantPrimary_fmuu7_42:active:not(:disabled){background-color:var(--ui-color-primary-700, #2F4568)}._variantSecondary_fmuu7_55{background-color:var(--ui-color-neutral-100, #F3F4F6);color:var(--ui-color-neutral-900, #111827)}._variantSecondary_fmuu7_55:hover:not(:disabled){background-color:var(--ui-color-neutral-200, #E5E7EB)}._variantSecondary_fmuu7_55:active:not(:disabled){background-color:var(--ui-color-neutral-300, #D1D5DB)}._variantDanger_fmuu7_68{background-color:var(--ui-color-danger-500, #EF4444);color:#fff}._variantDanger_fmuu7_68:hover:not(:disabled){background-color:var(--ui-color-danger-600, #DC2626)}._variantSuccess_fmuu7_77{background-color:var(--ui-color-success-500, #22C55E);color:#fff}._variantSuccess_fmuu7_77:hover:not(:disabled){background-color:var(--ui-color-success-600, #16A34A)}._variantGhost_fmuu7_86{background-color:transparent;color:var(--ui-color-neutral-700, #374151)}._variantGhost_fmuu7_86:hover:not(:disabled){background-color:var(--ui-color-neutral-100, #F3F4F6)}._variantGhost_fmuu7_86:active:not(:disabled){background-color:var(--ui-color-neutral-200, #E5E7EB)}._fullWidth_fmuu7_100{width:100%}._spinner_fmuu7_105{animation:_spin_fmuu7_105 1s linear infinite;height:1rem;width:1rem}@keyframes _spin_fmuu7_105{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "ui-prokit",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "A modern, reusable UI component library built with React and TypeScript",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./styles.css": "./dist/ui-prokit.css"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "dev": "vite",
27
+ "build": "tsc -p tsconfig.build.json && vite build",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "keywords": [
31
+ "react",
32
+ "components",
33
+ "ui",
34
+ "css-modules",
35
+ "typescript"
36
+ ],
37
+ "author": "Juti B",
38
+ "license": "MIT",
39
+ "peerDependencies": {
40
+ "react": "^18.0.0 || ^19.0.0",
41
+ "react-dom": "^18.0.0 || ^19.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/react": "^19.2.7",
45
+ "@types/react-dom": "^19.2.3",
46
+ "@vitejs/plugin-react": "^4.7.0",
47
+ "react": "^19.2.3",
48
+ "react-dom": "^19.2.3",
49
+ "typescript": "^5.9.3",
50
+ "vite": "^6.4.1"
51
+ }
52
+ }