@dmitriikapustin/ui 0.2.6 → 0.2.7

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 CHANGED
@@ -10,14 +10,23 @@ npm install @dmitriikapustin/ui
10
10
 
11
11
  ## Usage
12
12
 
13
+ **Step 1.** Import design tokens stylesheet **once** in your app's root layout (e.g. `app/layout.tsx` for Next.js, or `main.tsx` for Vite):
14
+
13
15
  ```tsx
14
- import { Button, Input, Badge } from '@dmitriikapustin/ui';
15
16
  import '@dmitriikapustin/ui/styles.css';
17
+ ```
18
+
19
+ This registers all CSS custom properties (`--bg`, `--fg`, `--brand-primary`, `--radius-lg`, etc.) on `:root`. Components reference these tokens — without this import, components render without colors / typography / spacing.
20
+
21
+ **Step 2.** Use components anywhere:
22
+
23
+ ```tsx
24
+ import { Button, Input, Badge } from '@dmitriikapustin/ui';
16
25
 
17
26
  export function App() {
18
27
  return (
19
28
  <div>
20
- <Button variant="primary">Get Started</Button>
29
+ <Button variant="primary" size="hero">Get Started</Button>
21
30
  <Input label="Email" placeholder="you@example.com" />
22
31
  <Badge color="success">Active</Badge>
23
32
  </div>
@@ -41,10 +50,10 @@ Dark mode activates via `[data-theme="dark"]` on `<html>`.
41
50
  Button, Input, Badge, Tag, Toggle, Avatar, Spinner, Divider, MenuItem, IconButton, Logo, StatBadge, Textarea, Select, Checkbox, Radio, Link, Tooltip, Skeleton, Icons
42
51
 
43
52
  ### Molecules
44
- Card, FormField, SearchBar, Stat, Alert, Tabs, ChatInput, ChatMessage, TopPromo, ProfileNav, IconWithText, StampCard, PasswordInput, Breadcrumbs, Toast, Pagination, CodeInput, Modal, DropdownMenu
53
+ Card, IconBadge, Gallery, FormField, SearchBar, Stat, Alert, Tabs, ChatInput, ChatMessage, TopPromo, ProfileNav, IconWithText, StampCard, PasswordInput, Breadcrumbs, Toast, Pagination, CodeInput, Modal, DropdownMenu
45
54
 
46
55
  ### Organisms
47
- Header, Footer, PricingCard, TestimonialCard, FeatureGrid, Sidebar, AppCard, AppTopLine, EmptyState, HeroSection, LogoCloud, StatsBar, CTASection, BentoGrid, FAQSection, ComparisonTable, PromoBento, PromoShowcase, PromoSplit, PromoTrustGrid, PromoDevicesCTA, PromoTestimonials, PromoHero, PromoPricing, PromoActionCards
56
+ Header, Footer, PricingCard, TestimonialCard, FeatureGrid, Sidebar, AppCard, AppTopLine, EmptyState, HeroSection, LogoCloud, StatsBar, CTASection, BentoGrid, FAQSection, ComparisonTable, PromoBento, PromoShowcase, PromoSplit, PromoTrustGrid, PromoDevicesCTA, PromoTestimonials, PromoHero, PromoHeroForm, PromoPricing, PromoActionCards
48
57
 
49
58
  ### Templates
50
59
  ArticleHero, ArticleBody, ArticleHeading, ArticleFigure, ArticleTable, ArticleList, ArticleNote, ArticleChatBlock, ArticleLinkButton, ArticleFooter, ArticleLayout, LandingLayout, ArticleLineChart, ArticleBarChart, ArticleScatterChart
package/dist/index.css ADDED
@@ -0,0 +1,161 @@
1
+ /* css-inject-plain:/Users/dimakozh/Desktop/projects/kapustin.cc/packages/ui/src/styles.css */
2
+ :root {
3
+ --neutral-50: #fafafa;
4
+ --neutral-100: #f7f7f7;
5
+ --neutral-200: #f3f3f3;
6
+ --neutral-300: #e0e0e0;
7
+ --neutral-400: #babbbd;
8
+ --neutral-500: #737373;
9
+ --neutral-600: #4c4c4c;
10
+ --neutral-700: #404040;
11
+ --neutral-800: #262626;
12
+ --neutral-900: #18181b;
13
+ --neutral-950: #0a0a0a;
14
+ --brand-primary: #18181b;
15
+ --brand-primary-light: #4c4c4c;
16
+ --brand-primary-dark: #0a0a0a;
17
+ --brand-secondary: #f3f3f3;
18
+ --brand-secondary-light: #f7f7f7;
19
+ --brand-secondary-dark: #e0e0e0;
20
+ --brand-accent: #18181b;
21
+ --brand-accent-light: #4c4c4c;
22
+ --brand-accent-dark: #0a0a0a;
23
+ --color-accent: #02ad41;
24
+ --color-accent-light: #34c759;
25
+ --color-accent-dark: #029236;
26
+ --color-success: #22c55e;
27
+ --color-success-light: #86efac;
28
+ --color-success-dark: #16a34a;
29
+ --color-warning: #f59e0b;
30
+ --color-warning-light: #fcd34d;
31
+ --color-warning-dark: #d97706;
32
+ --color-error: #ef4444;
33
+ --color-error-light: #fca5a5;
34
+ --color-error-dark: #dc2626;
35
+ --color-info: #3b82f6;
36
+ --color-info-light: #93c5fd;
37
+ --color-info-dark: #2563eb;
38
+ --bg: #ffffff;
39
+ --bg-secondary: #f7f7f7;
40
+ --bg-tertiary: #f3f3f3;
41
+ --fg: #18181b;
42
+ --fg-secondary: #4c4c4c;
43
+ --fg-muted: #babbbd;
44
+ --border-color: #e0e0e0;
45
+ --border-color-strong: #babbbd;
46
+ --font-sans:
47
+ var(--font-onest),
48
+ system-ui,
49
+ -apple-system,
50
+ sans-serif;
51
+ --font-mono:
52
+ "Geist Mono",
53
+ "SF Mono",
54
+ "Fira Code",
55
+ monospace;
56
+ --text-xs: 0.75rem;
57
+ --text-sm: 0.875rem;
58
+ --text-base: 1rem;
59
+ --text-lg: 1.125rem;
60
+ --text-xl: 1.25rem;
61
+ --text-2xl: 1.5rem;
62
+ --text-3xl: 1.875rem;
63
+ --text-4xl: 2.25rem;
64
+ --text-5xl: 3rem;
65
+ --text-6xl: 3.75rem;
66
+ --space-1: 0.25rem;
67
+ --space-2: 0.5rem;
68
+ --space-3: 0.75rem;
69
+ --space-4: 1rem;
70
+ --space-5: 1.25rem;
71
+ --space-6: 1.5rem;
72
+ --space-8: 2rem;
73
+ --space-10: 2.5rem;
74
+ --space-12: 3rem;
75
+ --space-16: 4rem;
76
+ --space-20: 5rem;
77
+ --space-24: 6rem;
78
+ --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
79
+ --shadow-sm: 0 7px 7px 0 rgb(0 0 0 / 0.07);
80
+ --shadow-md: 0 7px 13px 0 rgb(0 0 0 / 0.05);
81
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
82
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
83
+ --radius-sm: 0.25rem;
84
+ --radius-md: 0.5rem;
85
+ --radius-lg: 1rem;
86
+ --radius-xl: 1rem;
87
+ --radius-2xl: 1rem;
88
+ --radius-full: 9999px;
89
+ --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
90
+ --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
91
+ --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
92
+ --button-primary-border-gradient:
93
+ linear-gradient(
94
+ 275.38deg,
95
+ rgba(255, 255, 255, 0.07) 1.53%,
96
+ rgba(255, 255, 255, 0.028) 94.58%);
97
+ }
98
+ [data-theme=dark] {
99
+ --bg: #09090b;
100
+ --bg-secondary: #18181b;
101
+ --bg-tertiary: #27272a;
102
+ --fg: #fafafa;
103
+ --fg-secondary: #a1a1aa;
104
+ --fg-muted: #71717a;
105
+ --border-color: #27272a;
106
+ --border-color-strong: #3f3f46;
107
+ --brand-primary: #818cf8;
108
+ --brand-primary-light: #a5b4fc;
109
+ --brand-primary-dark: #6366f1;
110
+ --brand-secondary: #f472b6;
111
+ --brand-secondary-light: #f9a8d4;
112
+ --brand-secondary-dark: #ec4899;
113
+ --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
114
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
115
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
116
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
117
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
118
+ --button-primary-border-gradient:
119
+ linear-gradient(
120
+ 275.38deg,
121
+ rgba(255, 255, 255, 0.04) 1.53%,
122
+ rgba(255, 255, 255, 0.02) 94.58%);
123
+ }
124
+ [data-theme=dark] .logo-img {
125
+ filter: invert(1);
126
+ }
127
+ :root,
128
+ :host {
129
+ --font-sans: var(--font-sans);
130
+ --font-mono: var(--font-mono);
131
+ }
132
+ * {
133
+ border-color: var(--border-color);
134
+ }
135
+ body {
136
+ background: var(--bg);
137
+ color: var(--fg);
138
+ font-family: var(--font-sans);
139
+ line-height: 1.6;
140
+ -webkit-font-smoothing: antialiased;
141
+ -moz-osx-font-smoothing: grayscale;
142
+ }
143
+ ::selection {
144
+ background: var(--brand-primary);
145
+ color: white;
146
+ }
147
+ ::-webkit-scrollbar {
148
+ width: 8px;
149
+ height: 8px;
150
+ }
151
+ ::-webkit-scrollbar-track {
152
+ background: var(--bg-secondary);
153
+ }
154
+ ::-webkit-scrollbar-thumb {
155
+ background: var(--fg-muted);
156
+ border-radius: var(--radius-full);
157
+ }
158
+ ::-webkit-scrollbar-thumb:hover {
159
+ background: var(--fg-secondary);
160
+ }
161
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
@@ -0,0 +1,180 @@
1
+ /* ─── Design Tokens ─── */
2
+ :root {
3
+ /* Neutral Palette */
4
+ --neutral-50: #fafafa;
5
+ --neutral-100: #f7f7f7;
6
+ --neutral-200: #f3f3f3;
7
+ --neutral-300: #e0e0e0;
8
+ --neutral-400: #babbbd;
9
+ --neutral-500: #737373;
10
+ --neutral-600: #4c4c4c;
11
+ --neutral-700: #404040;
12
+ --neutral-800: #262626;
13
+ --neutral-900: #18181b;
14
+ --neutral-950: #0a0a0a;
15
+
16
+ /* Brand Colors */
17
+ --brand-primary: #18181b;
18
+ --brand-primary-light: #4c4c4c;
19
+ --brand-primary-dark: #0a0a0a;
20
+ --brand-secondary: #f3f3f3;
21
+ --brand-secondary-light: #f7f7f7;
22
+ --brand-secondary-dark: #e0e0e0;
23
+ --brand-accent: #18181b;
24
+ --brand-accent-light: #4c4c4c;
25
+ --brand-accent-dark: #0a0a0a;
26
+
27
+ /* Accent */
28
+ --color-accent: #02ad41;
29
+ --color-accent-light: #34c759;
30
+ --color-accent-dark: #029236;
31
+
32
+ /* Semantic Colors */
33
+ --color-success: #22c55e;
34
+ --color-success-light: #86efac;
35
+ --color-success-dark: #16a34a;
36
+ --color-warning: #f59e0b;
37
+ --color-warning-light: #fcd34d;
38
+ --color-warning-dark: #d97706;
39
+ --color-error: #ef4444;
40
+ --color-error-light: #fca5a5;
41
+ --color-error-dark: #dc2626;
42
+ --color-info: #3b82f6;
43
+ --color-info-light: #93c5fd;
44
+ --color-info-dark: #2563eb;
45
+
46
+ /* Surfaces */
47
+ --bg: #ffffff;
48
+ --bg-secondary: #f7f7f7;
49
+ --bg-tertiary: #f3f3f3;
50
+ --fg: #18181b;
51
+ --fg-secondary: #4c4c4c;
52
+ --fg-muted: #babbbd;
53
+ --border-color: #e0e0e0;
54
+ --border-color-strong: #babbbd;
55
+
56
+ /* Typography */
57
+ --font-sans: var(--font-onest), system-ui, -apple-system, sans-serif;
58
+ --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
59
+ --text-xs: 0.75rem;
60
+ --text-sm: 0.875rem;
61
+ --text-base: 1rem;
62
+ --text-lg: 1.125rem;
63
+ --text-xl: 1.25rem;
64
+ --text-2xl: 1.5rem;
65
+ --text-3xl: 1.875rem;
66
+ --text-4xl: 2.25rem;
67
+ --text-5xl: 3rem;
68
+ --text-6xl: 3.75rem;
69
+
70
+ /* Spacing */
71
+ --space-1: 0.25rem;
72
+ --space-2: 0.5rem;
73
+ --space-3: 0.75rem;
74
+ --space-4: 1rem;
75
+ --space-5: 1.25rem;
76
+ --space-6: 1.5rem;
77
+ --space-8: 2rem;
78
+ --space-10: 2.5rem;
79
+ --space-12: 3rem;
80
+ --space-16: 4rem;
81
+ --space-20: 5rem;
82
+ --space-24: 6rem;
83
+
84
+ /* Shadows */
85
+ --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
86
+ --shadow-sm: 0 7px 7px 0 rgb(0 0 0 / 0.07);
87
+ --shadow-md: 0 7px 13px 0 rgb(0 0 0 / 0.05);
88
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
89
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
90
+
91
+ /* Border Radius */
92
+ --radius-sm: 0.25rem;
93
+ --radius-md: 0.5rem;
94
+ --radius-lg: 1rem;
95
+ --radius-xl: 1rem;
96
+ --radius-2xl: 1rem;
97
+ --radius-full: 9999px;
98
+
99
+ /* Transitions */
100
+ --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
101
+ --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
102
+ --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
103
+
104
+ /* Component-specific tokens */
105
+ --button-primary-border-gradient: linear-gradient(275.38deg, rgba(255, 255, 255, 0.07) 1.53%, rgba(255, 255, 255, 0.028) 94.58%);
106
+ }
107
+
108
+ /* Dark Mode */
109
+ [data-theme="dark"] {
110
+ --bg: #09090b;
111
+ --bg-secondary: #18181b;
112
+ --bg-tertiary: #27272a;
113
+ --fg: #fafafa;
114
+ --fg-secondary: #a1a1aa;
115
+ --fg-muted: #71717a;
116
+ --border-color: #27272a;
117
+ --border-color-strong: #3f3f46;
118
+
119
+ --brand-primary: #818cf8;
120
+ --brand-primary-light: #a5b4fc;
121
+ --brand-primary-dark: #6366f1;
122
+ --brand-secondary: #f472b6;
123
+ --brand-secondary-light: #f9a8d4;
124
+ --brand-secondary-dark: #ec4899;
125
+
126
+ --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
127
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
128
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
129
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
130
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
131
+
132
+ --button-primary-border-gradient: linear-gradient(275.38deg, rgba(255, 255, 255, 0.04) 1.53%, rgba(255, 255, 255, 0.02) 94.58%);
133
+ }
134
+
135
+ /* Logo dark-mode: invert dark SVG fills to light when loaded via <img> */
136
+ [data-theme="dark"] .logo-img {
137
+ filter: invert(1);
138
+ }
139
+
140
+ @theme inline {
141
+ --color-background: var(--bg);
142
+ --color-foreground: var(--fg);
143
+ --font-sans: var(--font-sans);
144
+ --font-mono: var(--font-mono);
145
+ }
146
+
147
+ /* ─── Base Styles ─── */
148
+ * {
149
+ border-color: var(--border-color);
150
+ }
151
+
152
+ body {
153
+ background: var(--bg);
154
+ color: var(--fg);
155
+ font-family: var(--font-sans);
156
+ line-height: 1.6;
157
+ -webkit-font-smoothing: antialiased;
158
+ -moz-osx-font-smoothing: grayscale;
159
+ }
160
+
161
+ ::selection {
162
+ background: var(--brand-primary);
163
+ color: white;
164
+ }
165
+
166
+ /* Scrollbar */
167
+ ::-webkit-scrollbar {
168
+ width: 8px;
169
+ height: 8px;
170
+ }
171
+ ::-webkit-scrollbar-track {
172
+ background: var(--bg-secondary);
173
+ }
174
+ ::-webkit-scrollbar-thumb {
175
+ background: var(--fg-muted);
176
+ border-radius: var(--radius-full);
177
+ }
178
+ ::-webkit-scrollbar-thumb:hover {
179
+ background: var(--fg-secondary);
180
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmitriikapustin/ui",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Universal UI/UX Kit — React 19 component library with Atomic Design, CSS custom properties, and SCSS modules",
5
5
  "author": "Kapustin Team",
6
6
  "license": "MIT",
@@ -18,7 +18,8 @@
18
18
  "types": "./dist/index.d.cts",
19
19
  "default": "./dist/index.cjs"
20
20
  }
21
- }
21
+ },
22
+ "./styles.css": "./dist/styles.css"
22
23
  },
23
24
  "files": [
24
25
  "dist",
@@ -26,7 +27,7 @@
26
27
  ],
27
28
  "sideEffects": true,
28
29
  "scripts": {
29
- "build": "tsup && rm -f dist/index.css",
30
+ "build": "tsup && cp src/styles.css dist/styles.css",
30
31
  "dev": "tsup --watch",
31
32
  "typecheck": "tsc --noEmit",
32
33
  "clean": "rm -rf dist"