entangle-ui 0.1.0-alpha.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sebastian Goล‚ฤ™biowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # โš›๏ธ Entangle UI
2
+
3
+ > Components quantumly entangled for professional editor interfaces
4
+
5
+ [![npm version](https://badge.fury.io/js/entangle-ui.svg)](https://www.npmjs.com/package/entangle-ui)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ **๐Ÿšง ALPHA VERSION - In active development, not ready for production**
9
+
10
+ ## ๐ŸŒŒ Philosophy
11
+
12
+ Entangle UI brings quantum mechanics principles to interface design. Components are **quantumly entangled** - when one changes state, others respond instantly across your entire application. Built specifically for professional editor interfaces, 3D tools, and precision applications where every interaction matters.
13
+
14
+ ## โšก Features
15
+
16
+ - **๐Ÿ”— Quantum Entanglement**: Components synchronize instantly across your app
17
+ - **๐ŸŽฏ Precision Controls**: Built for professional editor interfaces
18
+ - **โšซ Minimal & Powerful**: Maximum functionality, minimal visual footprint
19
+ - **๐Ÿ“ TypeScript First**: Complete type safety and IntelliSense support
20
+ - **๐ŸŒ™ Dark Matter Theme**: Designed for professionals who build worlds
21
+ - **๐Ÿงช Base UI Foundation**: Built on rock-solid headless components
22
+
23
+ ## ๐Ÿš€ Quick Start
24
+
25
+ ```bash
26
+ # Install alpha version
27
+ npm install entangle-ui@alpha
28
+ ```
29
+
30
+ ```tsx
31
+ import { Button, Input } from 'entangle-ui';
32
+
33
+ function App() {
34
+ return (
35
+ <div>
36
+ <Button>Entangle Reality</Button>
37
+ <Input placeholder="Enter coordinates..." precision={3} />
38
+ </div>
39
+ );
40
+ }
41
+ ```
42
+
43
+ ## ๐ŸŽฏ Built For
44
+
45
+ - ๐ŸŒ **Planet generators** & procedural tools
46
+ - ๐ŸŽฎ **Node-based editors** & visual programming
47
+ - ๐ŸŽจ **3D modeling interfaces** & CAD applications
48
+ - โš™๏ธ **Parameter control systems** & scientific tools
49
+ - ๐Ÿ”ฌ **Precision applications** requiring exact values
50
+
51
+ ## ๐Ÿ“š Documentation
52
+
53
+ - **[GitHub](https://github.com/yourusername/entangle-ui)** - Source code and issues
54
+
55
+ ## ๐Ÿงช Current Status (Alpha)
56
+
57
+ ### โœ… Available Components
58
+
59
+ - [ ] Button - Quantum interaction states
60
+ - [ ] Input - Precision numeric controls
61
+ - [ ] Slider - Fine-tuned value manipulation
62
+ - [ ] Toggle - Binary state quantum switches
63
+
64
+ ### ๐Ÿšง In Development
65
+
66
+ - Vector input controls
67
+ - Color precision pickers
68
+ - Node connection components
69
+ - 3D viewport controls
70
+
71
+ ### ๐Ÿ“‹ Roadmap
72
+
73
+ - Canvas integration helpers
74
+ - Advanced theming system
75
+ - Animation state management
76
+ - Plugin architecture
77
+
78
+ ## ๐Ÿ› ๏ธ Development
79
+
80
+ ```bash
81
+ # Clone the repository
82
+ git clone https://github.com/yourusername/entangle-ui.git
83
+ cd entangle-ui
84
+
85
+ # Install dependencies
86
+ npm install
87
+
88
+ # Start Storybook
89
+ npm run dev
90
+
91
+ # Run tests
92
+ npm run test
93
+
94
+ # Build library
95
+ npm run build
96
+ ```
97
+
98
+ ## ๐Ÿค Contributing
99
+
100
+ Entangle UI is in active alpha development. We welcome:
101
+
102
+ - ๐Ÿ› **Bug reports** - Help us squash quantum bugs
103
+ - ๐Ÿ’ก **Feature requests** - What components do you need?
104
+ - ๐Ÿ”ฌ **Testing** - Try it in your editor projects
105
+ - ๐Ÿ“– **Documentation** - Help us explain quantum principles
106
+
107
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
108
+
109
+ ## ๐Ÿ“„ License
110
+
111
+ MIT ยฉ [Your Name](https://github.com/yourusername)
112
+
113
+ ---
114
+
115
+ > *"Spooky action at a distance, but for UI components"* โš›๏ธ
116
+
117
+ **Built for creators who shape digital realities**
@@ -0,0 +1,5 @@
1
+ export { Theme, ThemeProvider, Tokens, createTheme, tokens } from '@/theme';
2
+ export { Button, ButtonProps, ButtonSize, ButtonVariant, Icon, IconProps, IconSize, Input, InputProps } from '@/components/primitives';
3
+ export { BaseComponent, Size, Variant } from '@/types/common';
4
+ export { Brand, DeepPartial, DeepReadonly, KeyOf, LiteralUnion, NonEmptyArray, Prettify, RequireFields, StrictExclude, ValueOf } from '@/types/utilities';
5
+ export { cn } from '@/utils/cn';
@@ -0,0 +1,542 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { ThemeProvider as ThemeProvider$1 } from '@emotion/react';
3
+ import React, { forwardRef } from 'react';
4
+ import styled from '@emotion/styled';
5
+
6
+ // src/theme/tokens.ts
7
+ const tokens = {
8
+ colors: {
9
+ background: {
10
+ primary: '#1a1a1a',
11
+ secondary: '#2d2d2d',
12
+ tertiary: '#3a3a3a',
13
+ elevated: '#404040',
14
+ },
15
+ surface: {
16
+ default: '#2d2d2d',
17
+ hover: '#363636',
18
+ active: '#404040',
19
+ disabled: '#1f1f1f',
20
+ },
21
+ border: {
22
+ default: '#4a4a4a',
23
+ focus: '#007acc',
24
+ error: '#f44336',
25
+ success: '#4caf50',
26
+ },
27
+ text: {
28
+ primary: '#ffffff',
29
+ secondary: '#cccccc',
30
+ muted: '#888888',
31
+ disabled: '#555555',
32
+ },
33
+ accent: {
34
+ primary: '#007acc',
35
+ secondary: '#005a9e',
36
+ success: '#4caf50',
37
+ warning: '#ff9800',
38
+ error: '#f44336',
39
+ },
40
+ },
41
+ spacing: {
42
+ xs: 2,
43
+ sm: 4,
44
+ md: 8,
45
+ lg: 12,
46
+ xl: 16,
47
+ xxl: 24,
48
+ xxxl: 32,
49
+ },
50
+ typography: {
51
+ fontSize: {
52
+ xs: 10,
53
+ sm: 11,
54
+ md: 12,
55
+ lg: 14,
56
+ xl: 16,
57
+ },
58
+ fontWeight: {
59
+ normal: 400,
60
+ medium: 500,
61
+ semibold: 600,
62
+ },
63
+ lineHeight: {
64
+ tight: 1.2,
65
+ normal: 1.4,
66
+ relaxed: 1.6,
67
+ },
68
+ fontFamily: {
69
+ mono: 'SF Mono, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
70
+ sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
71
+ },
72
+ },
73
+ borderRadius: {
74
+ none: 0,
75
+ sm: 2,
76
+ md: 4,
77
+ lg: 6,
78
+ },
79
+ shadows: {
80
+ sm: '0 1px 2px rgba(0, 0, 0, 0.2)',
81
+ md: '0 2px 4px rgba(0, 0, 0, 0.3)',
82
+ lg: '0 4px 8px rgba(0, 0, 0, 0.4)',
83
+ focus: '0 0 0 2px rgba(0, 122, 204, 0.4)',
84
+ },
85
+ transitions: {
86
+ fast: '100ms ease-out',
87
+ normal: '200ms ease-out',
88
+ slow: '300ms ease-out',
89
+ },
90
+ };
91
+
92
+ const mergeDeep$1 = (target, source) => {
93
+ const result = { ...target };
94
+ for (const key in source) {
95
+ const sourceValue = source[key];
96
+ if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {
97
+ result[key] = mergeDeep$1(result[key], sourceValue);
98
+ }
99
+ else if (sourceValue !== undefined) {
100
+ result[key] = sourceValue;
101
+ }
102
+ }
103
+ return result;
104
+ };
105
+ const ThemeProvider = ({ children, theme: customTheme }) => {
106
+ const theme = customTheme ? mergeDeep$1(tokens, customTheme) : tokens;
107
+ return (jsx(ThemeProvider$1, { theme: theme, children: children }));
108
+ };
109
+
110
+ // src/theme/createTheme.ts
111
+ const mergeDeep = (target, source) => {
112
+ const result = { ...target };
113
+ for (const key in source) {
114
+ const sourceValue = source[key];
115
+ if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {
116
+ result[key] = mergeDeep(result[key], sourceValue);
117
+ }
118
+ else if (sourceValue !== undefined) {
119
+ result[key] = sourceValue;
120
+ }
121
+ }
122
+ return result;
123
+ };
124
+ const createTheme = (customTokens) => {
125
+ return customTokens ? mergeDeep(tokens, customTokens) : tokens;
126
+ };
127
+
128
+ const cn = (...classes) => {
129
+ return classes.filter(Boolean).join(' ');
130
+ };
131
+
132
+ const BaseButton = forwardRef(({ className, disabled = false, children, ...props }, ref) => {
133
+ return (jsx("button", { ref: ref, className: cn(
134
+ // Reset tylko niektรณre style, nie wszystkie
135
+ 'bg-transparent p-0 m-0',
136
+ // Base interactive styles
137
+ 'cursor-pointer select-none', 'focus:outline-none',
138
+ // Disabled state
139
+ disabled && 'cursor-not-allowed', className), disabled: disabled, ...props, children: children }));
140
+ });
141
+ BaseButton.displayName = 'BaseButton';
142
+
143
+ const StyledButton = styled.button `
144
+ /* Reset */
145
+ margin: 0;
146
+ font-family: inherit;
147
+ cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};
148
+ user-select: none;
149
+
150
+ /* Layout */
151
+ display: inline-flex;
152
+ align-items: center;
153
+ justify-content: center;
154
+ font-weight: ${props => props.theme.typography.fontWeight.medium};
155
+ border-radius: ${props => props.theme.borderRadius.md}px;
156
+ transition: all ${props => props.theme.transitions.normal};
157
+ outline: none;
158
+
159
+ /* Size variants */
160
+ ${props => {
161
+ const sizes = {
162
+ sm: {
163
+ height: '24px',
164
+ padding: `0 ${props.theme.spacing.sm * 2}px`,
165
+ fontSize: `${props.theme.typography.fontSize.xs}px`,
166
+ gap: `${props.theme.spacing.xs}px`,
167
+ },
168
+ md: {
169
+ height: '28px',
170
+ padding: `0 ${props.theme.spacing.md + props.theme.spacing.xs}px`,
171
+ fontSize: `${props.theme.typography.fontSize.xs}px`,
172
+ gap: `${props.theme.spacing.sm + props.theme.spacing.xs}px`,
173
+ },
174
+ lg: {
175
+ height: '32px',
176
+ padding: `0 ${props.theme.spacing.xl}px`,
177
+ fontSize: `${props.theme.typography.fontSize.sm}px`,
178
+ gap: `${props.theme.spacing.md}px`,
179
+ },
180
+ };
181
+ const size = sizes[props.$size];
182
+ return `
183
+ height: ${size.height};
184
+ padding: ${size.padding};
185
+ font-size: ${size.fontSize};
186
+ gap: ${size.gap};
187
+ `;
188
+ }}
189
+
190
+ /* Variant styles */
191
+ ${props => {
192
+ const { colors } = props.theme;
193
+ switch (props.$variant) {
194
+ case 'default':
195
+ return `
196
+ background: transparent;
197
+ border: 1px solid ${colors.border.default};
198
+ color: ${colors.text.primary};
199
+
200
+ &:hover:not(:disabled) {
201
+ background: ${colors.surface.hover};
202
+ border-color: transparent;
203
+ }
204
+
205
+ &:active:not(:disabled) {
206
+ background: ${colors.surface.active};
207
+ }
208
+ `;
209
+ case 'ghost':
210
+ return `
211
+ background: transparent;
212
+ border: 1px solid transparent;
213
+ color: ${colors.text.secondary};
214
+
215
+ &:hover:not(:disabled) {
216
+ background: ${colors.surface.hover};
217
+ color: ${colors.text.primary};
218
+ }
219
+
220
+ &:active:not(:disabled) {
221
+ background: ${colors.surface.active};
222
+ }
223
+ `;
224
+ case 'filled':
225
+ return `
226
+ background: ${colors.accent.primary};
227
+ border: 1px solid ${colors.accent.primary};
228
+ color: white;
229
+
230
+ &:hover:not(:disabled) {
231
+ background: ${colors.accent.secondary};
232
+ border-color: ${colors.accent.secondary};
233
+ }
234
+
235
+ &:active:not(:disabled) {
236
+ background: ${colors.accent.secondary};
237
+ }
238
+ `;
239
+ default:
240
+ return '';
241
+ }
242
+ }}
243
+
244
+ /* Full width */
245
+ ${props => props.$fullWidth && 'width: 100%;'}
246
+
247
+ /* Disabled state */
248
+ &:disabled {
249
+ opacity: 0.5;
250
+ cursor: not-allowed;
251
+ }
252
+
253
+ /* Focus visible */
254
+ &:focus-visible {
255
+ box-shadow: ${props => props.theme.shadows.focus};
256
+ }
257
+ `;
258
+ /**
259
+ * Komponent spinnera ล‚adowania
260
+ */
261
+ const LoadingSpinner = styled.div `
262
+ width: 16px;
263
+ height: 16px;
264
+ border: 2px solid currentColor;
265
+ border-top-color: transparent;
266
+ border-radius: 50%;
267
+ animation: spin 1s linear infinite;
268
+
269
+ @keyframes spin {
270
+ to { transform: rotate(360deg); }
271
+ }
272
+ `;
273
+ /**
274
+ * Wrapper dla ikony
275
+ */
276
+ const IconWrapper = styled.span `
277
+ width: 16px;
278
+ height: 16px;
279
+ display: flex;
280
+ align-items: center;
281
+ justify-content: center;
282
+ `;
283
+ /**
284
+ * Wszechstronny komponent przycisku dla interfejsรณw edytora.
285
+ *
286
+ * Obsล‚uguje wiele wariantรณw, rozmiarรณw i stanรณw. Zoptymalizowany dla profesjonalnych
287
+ * interfejsรณw edytora z kompaktowymi wymiarami i precyzyjnymi interakcjami.
288
+ *
289
+ * @example
290
+ * ```tsx
291
+ * // Podstawowe uลผycie
292
+ * <Button variant="default" size="md">Zapisz</Button>
293
+ *
294
+ * // Z ikonฤ… i stanem ล‚adowania
295
+ * <Button
296
+ * icon={<SaveIcon />}
297
+ * loading={isSaving}
298
+ * onClick={handleSave}
299
+ * >
300
+ * Zapisz Projekt
301
+ * </Button>
302
+ *
303
+ * // Przycisk peล‚nej szerokoล›ci
304
+ * <Button variant="filled" fullWidth>
305
+ * Potwierdลบ
306
+ * </Button>
307
+ * ```
308
+ */
309
+ const Button = ({ children, className, size = 'md', variant = 'default', disabled = false, loading = false, icon, fullWidth = false, onClick, 'data-testid': testId, ...props }) => {
310
+ return (jsxs(StyledButton, { className: className, "$size": size, "$variant": variant, "$loading": loading, "$fullWidth": fullWidth, disabled: disabled || loading, onClick: onClick, "data-testid": testId, ...props, children: [loading ? (jsx(LoadingSpinner, {})) : icon ? (jsx(IconWrapper, { children: icon })) : null, children && jsx("span", { children: children })] }));
311
+ };
312
+
313
+ const StyledSVG = styled.svg `
314
+ /* Reset and base styles */
315
+ display: inline-block;
316
+ vertical-align: middle;
317
+ flex-shrink: 0;
318
+ user-select: none;
319
+
320
+ /* Size variants optimized for editor interfaces */
321
+ ${props => {
322
+ const sizes = {
323
+ sm: '12px',
324
+ md: '16px',
325
+ lg: '20px',
326
+ };
327
+ return `
328
+ width: ${sizes[props.$size]};
329
+ height: ${sizes[props.$size]};
330
+ `;
331
+ }}
332
+
333
+ /* Color variants using theme tokens */
334
+ ${props => {
335
+ const { theme } = props;
336
+ // Standard color mappings to theme
337
+ const colorMap = {
338
+ primary: theme.colors.text.primary,
339
+ secondary: theme.colors.text.secondary,
340
+ muted: theme.colors.text.muted,
341
+ accent: theme.colors.accent.primary,
342
+ success: theme.colors.accent.success,
343
+ warning: theme.colors.accent.warning,
344
+ error: theme.colors.accent.error,
345
+ };
346
+ // Use theme color if available, otherwise treat as custom color
347
+ const color = colorMap[props.$color] || props.$color;
348
+ return `
349
+ color: ${color};
350
+ fill: none;
351
+ stroke: currentColor;
352
+ stroke-width: 2;
353
+ stroke-linecap: round;
354
+ stroke-linejoin: round;
355
+ `;
356
+ }}
357
+
358
+ /* Ensure crisp rendering */
359
+ shape-rendering: geometricPrecision;
360
+ `;
361
+ const Icon = ({ children, size = 'md', color = 'primary', className, title, decorative = false, 'data-testid': testId, ...props }) => {
362
+ return (jsxs(StyledSVG, { className: className, "$size": size, "$color": color, viewBox: "0 0 24 24", fill: "none", "aria-hidden": decorative, role: decorative ? 'presentation' : 'img', "data-testid": testId, ...props, children: [title && !decorative && jsx("title", { children: title }), children] }));
363
+ };
364
+
365
+ const StyledInputContainer = styled.div `
366
+ display: flex;
367
+ flex-direction: column;
368
+ gap: ${props => props.theme.spacing.xs}px;
369
+ `;
370
+ const StyledLabel = styled.label `
371
+ font-size: ${props => props.theme.typography.fontSize.sm}px;
372
+ font-weight: ${props => props.theme.typography.fontWeight.medium};
373
+ color: ${props => props.$disabled ? props.theme.colors.text.disabled : props.theme.colors.text.secondary};
374
+ line-height: ${props => props.theme.typography.lineHeight.tight};
375
+ `;
376
+ const StyledInputWrapper = styled.div `
377
+ position: relative;
378
+ display: flex;
379
+ align-items: center;
380
+ border: 1px solid;
381
+ border-radius: ${props => props.theme.borderRadius.md}px;
382
+ transition: all ${props => props.theme.transitions.normal};
383
+ background: ${props => props.$disabled ? props.theme.colors.surface.disabled : props.theme.colors.surface.default};
384
+
385
+ /* Size variants */
386
+ ${props => {
387
+ const sizes = {
388
+ sm: {
389
+ height: '20px',
390
+ padding: `0 ${props.theme.spacing.sm}px`,
391
+ },
392
+ md: {
393
+ height: '24px',
394
+ padding: `0 ${props.theme.spacing.md}px`,
395
+ },
396
+ lg: {
397
+ height: '32px',
398
+ padding: `0 ${props.theme.spacing.lg}px`,
399
+ },
400
+ };
401
+ const size = sizes[props.$size];
402
+ return `
403
+ height: ${size.height};
404
+ padding: ${size.padding};
405
+ `;
406
+ }}
407
+
408
+ /* Border color states */
409
+ border-color: ${props => {
410
+ if (props.$error)
411
+ return props.theme.colors.border.error;
412
+ if (props.$focused)
413
+ return props.theme.colors.border.focus;
414
+ return props.theme.colors.border.default;
415
+ }};
416
+
417
+ /* Focus ring */
418
+ ${props => props.$focused && !props.$error && `
419
+ box-shadow: 0 0 0 2px ${props.theme.colors.accent.primary}20;
420
+ `}
421
+
422
+ /* Disabled state */
423
+ ${props => props.$disabled && `
424
+ opacity: 0.5;
425
+ cursor: not-allowed;
426
+ `}
427
+
428
+ /* Hover state */
429
+ &:hover:not(:focus-within) {
430
+ border-color: ${props => {
431
+ if (props.$disabled || props.$error)
432
+ return 'inherit';
433
+ return props.theme.colors.border.focus;
434
+ }};
435
+ }
436
+ `;
437
+ const StyledInput = styled.input `
438
+ flex: 1;
439
+ border: none;
440
+ outline: none;
441
+ background: transparent;
442
+ font-family: inherit;
443
+ color: ${props => props.theme.colors.text.primary};
444
+
445
+ ${props => {
446
+ const fontSize = {
447
+ sm: props.theme.typography.fontSize.xs,
448
+ md: props.theme.typography.fontSize.sm,
449
+ lg: props.theme.typography.fontSize.md,
450
+ };
451
+ return `font-size: ${fontSize[props.$size]}px;`;
452
+ }}
453
+
454
+ &::placeholder {
455
+ color: ${props => props.theme.colors.text.muted};
456
+ }
457
+
458
+ &:disabled {
459
+ cursor: not-allowed;
460
+ }
461
+
462
+ /* Remove number input arrows */
463
+ &::-webkit-outer-spin-button,
464
+ &::-webkit-inner-spin-button {
465
+ -webkit-appearance: none;
466
+ margin: 0;
467
+ }
468
+
469
+ &[type=number] {
470
+ -moz-appearance: textfield;
471
+ }
472
+ `;
473
+ const StyledIcon = styled.div `
474
+ display: flex;
475
+ align-items: center;
476
+ justify-content: center;
477
+ color: ${props => props.theme.colors.text.muted};
478
+
479
+ ${props => props.$position === 'start' ? 'margin-right: 6px;' : 'margin-left: 6px;'}
480
+
481
+ & > * {
482
+ width: 14px;
483
+ height: 14px;
484
+ }
485
+ `;
486
+ const StyledHelperText = styled.div `
487
+ font-size: ${props => props.theme.typography.fontSize.xs}px;
488
+ line-height: ${props => props.theme.typography.lineHeight.tight};
489
+ color: ${props => props.$error ? props.theme.colors.accent.error : props.theme.colors.text.muted};
490
+ `;
491
+ /**
492
+ * A versatile input component for text entry in editor interfaces.
493
+ *
494
+ * Provides a clean, consistent text input with support for labels, helper text,
495
+ * icons, and various states. Optimized for editor UIs with compact sizing.
496
+ *
497
+ * @example
498
+ * ```tsx
499
+ * // Basic text input
500
+ * <Input
501
+ * placeholder="Enter text..."
502
+ * value={text}
503
+ * onChange={(e) => setText(e.target.value)}
504
+ * />
505
+ *
506
+ * // With label and helper text
507
+ * <Input
508
+ * label="Project Name"
509
+ * placeholder="My Project"
510
+ * helperText="Choose a unique name for your project"
511
+ * value={name}
512
+ * onChange={(e) => setName(e.target.value)}
513
+ * />
514
+ *
515
+ * // With icons and error state
516
+ * <Input
517
+ * label="Email"
518
+ * type="email"
519
+ * startIcon={<SearchIcon />}
520
+ * error={!!emailError}
521
+ * errorMessage={emailError}
522
+ * value={email}
523
+ * onChange={(e) => setEmail(e.target.value)}
524
+ * />
525
+ * ```
526
+ */
527
+ const Input = ({ value, defaultValue, placeholder, type = 'text', size = 'md', disabled = false, error = false, required = false, readOnly = false, label, helperText, errorMessage, startIcon, endIcon, className, onChange, onFocus, onBlur, onKeyDown, 'data-testid': testId, ...props }) => {
528
+ const [focused, setFocused] = React.useState(false);
529
+ const inputId = React.useId();
530
+ const handleFocus = (event) => {
531
+ setFocused(true);
532
+ onFocus?.(event);
533
+ };
534
+ const handleBlur = (event) => {
535
+ setFocused(false);
536
+ onBlur?.(event);
537
+ };
538
+ return (jsxs(StyledInputContainer, { className: className, "$size": size, "$error": error, "$disabled": disabled, "$focused": focused, children: [label && (jsxs(StyledLabel, { htmlFor: inputId, "$disabled": disabled, children: [label, required && jsx("span", { style: { color: 'var(--accent-error)' }, children: " *" })] })), jsxs(StyledInputWrapper, { "$size": size, "$error": error, "$disabled": disabled, "$focused": focused, children: [startIcon && (jsx(StyledIcon, { "$position": "start", children: startIcon })), jsx(StyledInput, { id: inputId, type: type, value: value, defaultValue: defaultValue, placeholder: placeholder, disabled: disabled, required: required, readOnly: readOnly, "$size": size, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: onKeyDown, "data-testid": testId, ...props }), endIcon && (jsx(StyledIcon, { "$position": "end", children: endIcon }))] }), (helperText || (error && errorMessage)) && (jsx(StyledHelperText, { "$error": error, children: error && errorMessage ? errorMessage : helperText }))] }));
539
+ };
540
+
541
+ export { Button, Icon, Input, ThemeProvider, cn, createTheme, tokens };
542
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/theme/tokens.ts","../src/theme/ThemeProvider.tsx","../src/theme/createTheme.ts","../src/utils/cn.ts","../src/components/primitives/BaseButton/BaseButton.tsx","../src/components/primitives/Button/Button.tsx","../src/components/primitives/Icon/Icon.tsx","../src/components/primitives/Input/Input.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["mergeDeep","_jsx","EmotionThemeProvider","defaultTokens","_jsxs"],"mappings":";;;;;AAAA;AACa,MAAA,MAAM,GAAG;AACpB,IAAA,MAAM,EAAE;AACN,QAAA,UAAU,EAAE;AACV,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,SAAS,EAAE,SAAS;AACpB,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,QAAQ,EAAE,SAAS;AACpB,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,QAAQ,EAAE,SAAS;AACpB,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,OAAO,EAAE,SAAS;AACnB,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,SAAS,EAAE,SAAS;AACpB,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,QAAQ,EAAE,SAAS;AACpB,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAA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,OAAO,EAAA,CACG,CACd,CACkB,EAAA,CAAA,EAEpB,CAAC,UAAU,KAAK,KAAK,IAAI,YAAY,CAAC,MACrCA,GAAC,CAAA,gBAAgB,cAAS,KAAK,EAAA,QAAA,EAC5B,KAAK,IAAI,YAAY,GAAG,YAAY,GAAG,UAAU,GACjC,CACpB,CAAA,EAAA,CACoB;AAE3B;;;;"}
package/dist/index.js ADDED
@@ -0,0 +1,550 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('@emotion/react');
5
+ var React = require('react');
6
+ var styled = require('@emotion/styled');
7
+
8
+ // src/theme/tokens.ts
9
+ const tokens = {
10
+ colors: {
11
+ background: {
12
+ primary: '#1a1a1a',
13
+ secondary: '#2d2d2d',
14
+ tertiary: '#3a3a3a',
15
+ elevated: '#404040',
16
+ },
17
+ surface: {
18
+ default: '#2d2d2d',
19
+ hover: '#363636',
20
+ active: '#404040',
21
+ disabled: '#1f1f1f',
22
+ },
23
+ border: {
24
+ default: '#4a4a4a',
25
+ focus: '#007acc',
26
+ error: '#f44336',
27
+ success: '#4caf50',
28
+ },
29
+ text: {
30
+ primary: '#ffffff',
31
+ secondary: '#cccccc',
32
+ muted: '#888888',
33
+ disabled: '#555555',
34
+ },
35
+ accent: {
36
+ primary: '#007acc',
37
+ secondary: '#005a9e',
38
+ success: '#4caf50',
39
+ warning: '#ff9800',
40
+ error: '#f44336',
41
+ },
42
+ },
43
+ spacing: {
44
+ xs: 2,
45
+ sm: 4,
46
+ md: 8,
47
+ lg: 12,
48
+ xl: 16,
49
+ xxl: 24,
50
+ xxxl: 32,
51
+ },
52
+ typography: {
53
+ fontSize: {
54
+ xs: 10,
55
+ sm: 11,
56
+ md: 12,
57
+ lg: 14,
58
+ xl: 16,
59
+ },
60
+ fontWeight: {
61
+ normal: 400,
62
+ medium: 500,
63
+ semibold: 600,
64
+ },
65
+ lineHeight: {
66
+ tight: 1.2,
67
+ normal: 1.4,
68
+ relaxed: 1.6,
69
+ },
70
+ fontFamily: {
71
+ mono: 'SF Mono, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
72
+ sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
73
+ },
74
+ },
75
+ borderRadius: {
76
+ none: 0,
77
+ sm: 2,
78
+ md: 4,
79
+ lg: 6,
80
+ },
81
+ shadows: {
82
+ sm: '0 1px 2px rgba(0, 0, 0, 0.2)',
83
+ md: '0 2px 4px rgba(0, 0, 0, 0.3)',
84
+ lg: '0 4px 8px rgba(0, 0, 0, 0.4)',
85
+ focus: '0 0 0 2px rgba(0, 122, 204, 0.4)',
86
+ },
87
+ transitions: {
88
+ fast: '100ms ease-out',
89
+ normal: '200ms ease-out',
90
+ slow: '300ms ease-out',
91
+ },
92
+ };
93
+
94
+ const mergeDeep$1 = (target, source) => {
95
+ const result = { ...target };
96
+ for (const key in source) {
97
+ const sourceValue = source[key];
98
+ if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {
99
+ result[key] = mergeDeep$1(result[key], sourceValue);
100
+ }
101
+ else if (sourceValue !== undefined) {
102
+ result[key] = sourceValue;
103
+ }
104
+ }
105
+ return result;
106
+ };
107
+ const ThemeProvider = ({ children, theme: customTheme }) => {
108
+ const theme = customTheme ? mergeDeep$1(tokens, customTheme) : tokens;
109
+ return (jsxRuntime.jsx(react.ThemeProvider, { theme: theme, children: children }));
110
+ };
111
+
112
+ // src/theme/createTheme.ts
113
+ const mergeDeep = (target, source) => {
114
+ const result = { ...target };
115
+ for (const key in source) {
116
+ const sourceValue = source[key];
117
+ if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {
118
+ result[key] = mergeDeep(result[key], sourceValue);
119
+ }
120
+ else if (sourceValue !== undefined) {
121
+ result[key] = sourceValue;
122
+ }
123
+ }
124
+ return result;
125
+ };
126
+ const createTheme = (customTokens) => {
127
+ return customTokens ? mergeDeep(tokens, customTokens) : tokens;
128
+ };
129
+
130
+ const cn = (...classes) => {
131
+ return classes.filter(Boolean).join(' ');
132
+ };
133
+
134
+ const BaseButton = React.forwardRef(({ className, disabled = false, children, ...props }, ref) => {
135
+ return (jsxRuntime.jsx("button", { ref: ref, className: cn(
136
+ // Reset tylko niektรณre style, nie wszystkie
137
+ 'bg-transparent p-0 m-0',
138
+ // Base interactive styles
139
+ 'cursor-pointer select-none', 'focus:outline-none',
140
+ // Disabled state
141
+ disabled && 'cursor-not-allowed', className), disabled: disabled, ...props, children: children }));
142
+ });
143
+ BaseButton.displayName = 'BaseButton';
144
+
145
+ const StyledButton = styled.button `
146
+ /* Reset */
147
+ margin: 0;
148
+ font-family: inherit;
149
+ cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};
150
+ user-select: none;
151
+
152
+ /* Layout */
153
+ display: inline-flex;
154
+ align-items: center;
155
+ justify-content: center;
156
+ font-weight: ${props => props.theme.typography.fontWeight.medium};
157
+ border-radius: ${props => props.theme.borderRadius.md}px;
158
+ transition: all ${props => props.theme.transitions.normal};
159
+ outline: none;
160
+
161
+ /* Size variants */
162
+ ${props => {
163
+ const sizes = {
164
+ sm: {
165
+ height: '24px',
166
+ padding: `0 ${props.theme.spacing.sm * 2}px`,
167
+ fontSize: `${props.theme.typography.fontSize.xs}px`,
168
+ gap: `${props.theme.spacing.xs}px`,
169
+ },
170
+ md: {
171
+ height: '28px',
172
+ padding: `0 ${props.theme.spacing.md + props.theme.spacing.xs}px`,
173
+ fontSize: `${props.theme.typography.fontSize.xs}px`,
174
+ gap: `${props.theme.spacing.sm + props.theme.spacing.xs}px`,
175
+ },
176
+ lg: {
177
+ height: '32px',
178
+ padding: `0 ${props.theme.spacing.xl}px`,
179
+ fontSize: `${props.theme.typography.fontSize.sm}px`,
180
+ gap: `${props.theme.spacing.md}px`,
181
+ },
182
+ };
183
+ const size = sizes[props.$size];
184
+ return `
185
+ height: ${size.height};
186
+ padding: ${size.padding};
187
+ font-size: ${size.fontSize};
188
+ gap: ${size.gap};
189
+ `;
190
+ }}
191
+
192
+ /* Variant styles */
193
+ ${props => {
194
+ const { colors } = props.theme;
195
+ switch (props.$variant) {
196
+ case 'default':
197
+ return `
198
+ background: transparent;
199
+ border: 1px solid ${colors.border.default};
200
+ color: ${colors.text.primary};
201
+
202
+ &:hover:not(:disabled) {
203
+ background: ${colors.surface.hover};
204
+ border-color: transparent;
205
+ }
206
+
207
+ &:active:not(:disabled) {
208
+ background: ${colors.surface.active};
209
+ }
210
+ `;
211
+ case 'ghost':
212
+ return `
213
+ background: transparent;
214
+ border: 1px solid transparent;
215
+ color: ${colors.text.secondary};
216
+
217
+ &:hover:not(:disabled) {
218
+ background: ${colors.surface.hover};
219
+ color: ${colors.text.primary};
220
+ }
221
+
222
+ &:active:not(:disabled) {
223
+ background: ${colors.surface.active};
224
+ }
225
+ `;
226
+ case 'filled':
227
+ return `
228
+ background: ${colors.accent.primary};
229
+ border: 1px solid ${colors.accent.primary};
230
+ color: white;
231
+
232
+ &:hover:not(:disabled) {
233
+ background: ${colors.accent.secondary};
234
+ border-color: ${colors.accent.secondary};
235
+ }
236
+
237
+ &:active:not(:disabled) {
238
+ background: ${colors.accent.secondary};
239
+ }
240
+ `;
241
+ default:
242
+ return '';
243
+ }
244
+ }}
245
+
246
+ /* Full width */
247
+ ${props => props.$fullWidth && 'width: 100%;'}
248
+
249
+ /* Disabled state */
250
+ &:disabled {
251
+ opacity: 0.5;
252
+ cursor: not-allowed;
253
+ }
254
+
255
+ /* Focus visible */
256
+ &:focus-visible {
257
+ box-shadow: ${props => props.theme.shadows.focus};
258
+ }
259
+ `;
260
+ /**
261
+ * Komponent spinnera ล‚adowania
262
+ */
263
+ const LoadingSpinner = styled.div `
264
+ width: 16px;
265
+ height: 16px;
266
+ border: 2px solid currentColor;
267
+ border-top-color: transparent;
268
+ border-radius: 50%;
269
+ animation: spin 1s linear infinite;
270
+
271
+ @keyframes spin {
272
+ to { transform: rotate(360deg); }
273
+ }
274
+ `;
275
+ /**
276
+ * Wrapper dla ikony
277
+ */
278
+ const IconWrapper = styled.span `
279
+ width: 16px;
280
+ height: 16px;
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: center;
284
+ `;
285
+ /**
286
+ * Wszechstronny komponent przycisku dla interfejsรณw edytora.
287
+ *
288
+ * Obsล‚uguje wiele wariantรณw, rozmiarรณw i stanรณw. Zoptymalizowany dla profesjonalnych
289
+ * interfejsรณw edytora z kompaktowymi wymiarami i precyzyjnymi interakcjami.
290
+ *
291
+ * @example
292
+ * ```tsx
293
+ * // Podstawowe uลผycie
294
+ * <Button variant="default" size="md">Zapisz</Button>
295
+ *
296
+ * // Z ikonฤ… i stanem ล‚adowania
297
+ * <Button
298
+ * icon={<SaveIcon />}
299
+ * loading={isSaving}
300
+ * onClick={handleSave}
301
+ * >
302
+ * Zapisz Projekt
303
+ * </Button>
304
+ *
305
+ * // Przycisk peล‚nej szerokoล›ci
306
+ * <Button variant="filled" fullWidth>
307
+ * Potwierdลบ
308
+ * </Button>
309
+ * ```
310
+ */
311
+ const Button = ({ children, className, size = 'md', variant = 'default', disabled = false, loading = false, icon, fullWidth = false, onClick, 'data-testid': testId, ...props }) => {
312
+ return (jsxRuntime.jsxs(StyledButton, { className: className, "$size": size, "$variant": variant, "$loading": loading, "$fullWidth": fullWidth, disabled: disabled || loading, onClick: onClick, "data-testid": testId, ...props, children: [loading ? (jsxRuntime.jsx(LoadingSpinner, {})) : icon ? (jsxRuntime.jsx(IconWrapper, { children: icon })) : null, children && jsxRuntime.jsx("span", { children: children })] }));
313
+ };
314
+
315
+ const StyledSVG = styled.svg `
316
+ /* Reset and base styles */
317
+ display: inline-block;
318
+ vertical-align: middle;
319
+ flex-shrink: 0;
320
+ user-select: none;
321
+
322
+ /* Size variants optimized for editor interfaces */
323
+ ${props => {
324
+ const sizes = {
325
+ sm: '12px',
326
+ md: '16px',
327
+ lg: '20px',
328
+ };
329
+ return `
330
+ width: ${sizes[props.$size]};
331
+ height: ${sizes[props.$size]};
332
+ `;
333
+ }}
334
+
335
+ /* Color variants using theme tokens */
336
+ ${props => {
337
+ const { theme } = props;
338
+ // Standard color mappings to theme
339
+ const colorMap = {
340
+ primary: theme.colors.text.primary,
341
+ secondary: theme.colors.text.secondary,
342
+ muted: theme.colors.text.muted,
343
+ accent: theme.colors.accent.primary,
344
+ success: theme.colors.accent.success,
345
+ warning: theme.colors.accent.warning,
346
+ error: theme.colors.accent.error,
347
+ };
348
+ // Use theme color if available, otherwise treat as custom color
349
+ const color = colorMap[props.$color] || props.$color;
350
+ return `
351
+ color: ${color};
352
+ fill: none;
353
+ stroke: currentColor;
354
+ stroke-width: 2;
355
+ stroke-linecap: round;
356
+ stroke-linejoin: round;
357
+ `;
358
+ }}
359
+
360
+ /* Ensure crisp rendering */
361
+ shape-rendering: geometricPrecision;
362
+ `;
363
+ const Icon = ({ children, size = 'md', color = 'primary', className, title, decorative = false, 'data-testid': testId, ...props }) => {
364
+ return (jsxRuntime.jsxs(StyledSVG, { className: className, "$size": size, "$color": color, viewBox: "0 0 24 24", fill: "none", "aria-hidden": decorative, role: decorative ? 'presentation' : 'img', "data-testid": testId, ...props, children: [title && !decorative && jsxRuntime.jsx("title", { children: title }), children] }));
365
+ };
366
+
367
+ const StyledInputContainer = styled.div `
368
+ display: flex;
369
+ flex-direction: column;
370
+ gap: ${props => props.theme.spacing.xs}px;
371
+ `;
372
+ const StyledLabel = styled.label `
373
+ font-size: ${props => props.theme.typography.fontSize.sm}px;
374
+ font-weight: ${props => props.theme.typography.fontWeight.medium};
375
+ color: ${props => props.$disabled ? props.theme.colors.text.disabled : props.theme.colors.text.secondary};
376
+ line-height: ${props => props.theme.typography.lineHeight.tight};
377
+ `;
378
+ const StyledInputWrapper = styled.div `
379
+ position: relative;
380
+ display: flex;
381
+ align-items: center;
382
+ border: 1px solid;
383
+ border-radius: ${props => props.theme.borderRadius.md}px;
384
+ transition: all ${props => props.theme.transitions.normal};
385
+ background: ${props => props.$disabled ? props.theme.colors.surface.disabled : props.theme.colors.surface.default};
386
+
387
+ /* Size variants */
388
+ ${props => {
389
+ const sizes = {
390
+ sm: {
391
+ height: '20px',
392
+ padding: `0 ${props.theme.spacing.sm}px`,
393
+ },
394
+ md: {
395
+ height: '24px',
396
+ padding: `0 ${props.theme.spacing.md}px`,
397
+ },
398
+ lg: {
399
+ height: '32px',
400
+ padding: `0 ${props.theme.spacing.lg}px`,
401
+ },
402
+ };
403
+ const size = sizes[props.$size];
404
+ return `
405
+ height: ${size.height};
406
+ padding: ${size.padding};
407
+ `;
408
+ }}
409
+
410
+ /* Border color states */
411
+ border-color: ${props => {
412
+ if (props.$error)
413
+ return props.theme.colors.border.error;
414
+ if (props.$focused)
415
+ return props.theme.colors.border.focus;
416
+ return props.theme.colors.border.default;
417
+ }};
418
+
419
+ /* Focus ring */
420
+ ${props => props.$focused && !props.$error && `
421
+ box-shadow: 0 0 0 2px ${props.theme.colors.accent.primary}20;
422
+ `}
423
+
424
+ /* Disabled state */
425
+ ${props => props.$disabled && `
426
+ opacity: 0.5;
427
+ cursor: not-allowed;
428
+ `}
429
+
430
+ /* Hover state */
431
+ &:hover:not(:focus-within) {
432
+ border-color: ${props => {
433
+ if (props.$disabled || props.$error)
434
+ return 'inherit';
435
+ return props.theme.colors.border.focus;
436
+ }};
437
+ }
438
+ `;
439
+ const StyledInput = styled.input `
440
+ flex: 1;
441
+ border: none;
442
+ outline: none;
443
+ background: transparent;
444
+ font-family: inherit;
445
+ color: ${props => props.theme.colors.text.primary};
446
+
447
+ ${props => {
448
+ const fontSize = {
449
+ sm: props.theme.typography.fontSize.xs,
450
+ md: props.theme.typography.fontSize.sm,
451
+ lg: props.theme.typography.fontSize.md,
452
+ };
453
+ return `font-size: ${fontSize[props.$size]}px;`;
454
+ }}
455
+
456
+ &::placeholder {
457
+ color: ${props => props.theme.colors.text.muted};
458
+ }
459
+
460
+ &:disabled {
461
+ cursor: not-allowed;
462
+ }
463
+
464
+ /* Remove number input arrows */
465
+ &::-webkit-outer-spin-button,
466
+ &::-webkit-inner-spin-button {
467
+ -webkit-appearance: none;
468
+ margin: 0;
469
+ }
470
+
471
+ &[type=number] {
472
+ -moz-appearance: textfield;
473
+ }
474
+ `;
475
+ const StyledIcon = styled.div `
476
+ display: flex;
477
+ align-items: center;
478
+ justify-content: center;
479
+ color: ${props => props.theme.colors.text.muted};
480
+
481
+ ${props => props.$position === 'start' ? 'margin-right: 6px;' : 'margin-left: 6px;'}
482
+
483
+ & > * {
484
+ width: 14px;
485
+ height: 14px;
486
+ }
487
+ `;
488
+ const StyledHelperText = styled.div `
489
+ font-size: ${props => props.theme.typography.fontSize.xs}px;
490
+ line-height: ${props => props.theme.typography.lineHeight.tight};
491
+ color: ${props => props.$error ? props.theme.colors.accent.error : props.theme.colors.text.muted};
492
+ `;
493
+ /**
494
+ * A versatile input component for text entry in editor interfaces.
495
+ *
496
+ * Provides a clean, consistent text input with support for labels, helper text,
497
+ * icons, and various states. Optimized for editor UIs with compact sizing.
498
+ *
499
+ * @example
500
+ * ```tsx
501
+ * // Basic text input
502
+ * <Input
503
+ * placeholder="Enter text..."
504
+ * value={text}
505
+ * onChange={(e) => setText(e.target.value)}
506
+ * />
507
+ *
508
+ * // With label and helper text
509
+ * <Input
510
+ * label="Project Name"
511
+ * placeholder="My Project"
512
+ * helperText="Choose a unique name for your project"
513
+ * value={name}
514
+ * onChange={(e) => setName(e.target.value)}
515
+ * />
516
+ *
517
+ * // With icons and error state
518
+ * <Input
519
+ * label="Email"
520
+ * type="email"
521
+ * startIcon={<SearchIcon />}
522
+ * error={!!emailError}
523
+ * errorMessage={emailError}
524
+ * value={email}
525
+ * onChange={(e) => setEmail(e.target.value)}
526
+ * />
527
+ * ```
528
+ */
529
+ const Input = ({ value, defaultValue, placeholder, type = 'text', size = 'md', disabled = false, error = false, required = false, readOnly = false, label, helperText, errorMessage, startIcon, endIcon, className, onChange, onFocus, onBlur, onKeyDown, 'data-testid': testId, ...props }) => {
530
+ const [focused, setFocused] = React.useState(false);
531
+ const inputId = React.useId();
532
+ const handleFocus = (event) => {
533
+ setFocused(true);
534
+ onFocus?.(event);
535
+ };
536
+ const handleBlur = (event) => {
537
+ setFocused(false);
538
+ onBlur?.(event);
539
+ };
540
+ return (jsxRuntime.jsxs(StyledInputContainer, { className: className, "$size": size, "$error": error, "$disabled": disabled, "$focused": focused, children: [label && (jsxRuntime.jsxs(StyledLabel, { htmlFor: inputId, "$disabled": disabled, children: [label, required && jsxRuntime.jsx("span", { style: { color: 'var(--accent-error)' }, children: " *" })] })), jsxRuntime.jsxs(StyledInputWrapper, { "$size": size, "$error": error, "$disabled": disabled, "$focused": focused, children: [startIcon && (jsxRuntime.jsx(StyledIcon, { "$position": "start", children: startIcon })), jsxRuntime.jsx(StyledInput, { id: inputId, type: type, value: value, defaultValue: defaultValue, placeholder: placeholder, disabled: disabled, required: required, readOnly: readOnly, "$size": size, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: onKeyDown, "data-testid": testId, ...props }), endIcon && (jsxRuntime.jsx(StyledIcon, { "$position": "end", children: endIcon }))] }), (helperText || (error && errorMessage)) && (jsxRuntime.jsx(StyledHelperText, { "$error": error, children: error && errorMessage ? errorMessage : helperText }))] }));
541
+ };
542
+
543
+ exports.Button = Button;
544
+ exports.Icon = Icon;
545
+ exports.Input = Input;
546
+ exports.ThemeProvider = ThemeProvider;
547
+ exports.cn = cn;
548
+ exports.createTheme = createTheme;
549
+ exports.tokens = tokens;
550
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/theme/tokens.ts","../src/theme/ThemeProvider.tsx","../src/theme/createTheme.ts","../src/utils/cn.ts","../src/components/primitives/BaseButton/BaseButton.tsx","../src/components/primitives/Button/Button.tsx","../src/components/primitives/Icon/Icon.tsx","../src/components/primitives/Input/Input.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["mergeDeep","_jsx","EmotionThemeProvider","defaultTokens","forwardRef","_jsxs"],"mappings":";;;;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AAW,CACzD,EAAA,CAAA,CACf,EAEDI,eAAC,CAAA,kBAAkB,EACV,EAAA,OAAA,EAAA,IAAI,YACH,KAAK,EAAA,WAAA,EACF,QAAQ,EAAA,UAAA,EACT,OAAO,EAEhB,QAAA,EAAA,CAAA,SAAS,KACRJ,cAAA,CAAC,UAAU,EAAW,EAAA,WAAA,EAAA,OAAO,EAC1B,QAAA,EAAA,SAAS,GACC,CACd,EAEDA,eAAC,WAAW,EAAA,EACV,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAAA,OAAA,EACX,IAAI,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACP,aAAA,EAAA,MAAM,KACf,KAAK,EAAA,CACT,EAED,OAAO,KACNA,cAAA,CAAC,UAAU,EAAW,EAAA,WAAA,EAAA,KAAK,YACxB,OAAO,EAAA,CACG,CACd,CACkB,EAAA,CAAA,EAEpB,CAAC,UAAU,KAAK,KAAK,IAAI,YAAY,CAAC,MACrCA,cAAC,CAAA,gBAAgB,cAAS,KAAK,EAAA,QAAA,EAC5B,KAAK,IAAI,YAAY,GAAG,YAAY,GAAG,UAAU,GACjC,CACpB,CAAA,EAAA,CACoB;AAE3B;;;;;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "entangle-ui",
3
+ "version": "0.1.0-alpha.0",
4
+ "type": "module",
5
+ "description": "A specialized React component library for building professional editor interfaces",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.esm.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "README.md",
12
+ "CHANGELOG.md",
13
+ "LICENSE"
14
+ ],
15
+ "scripts": {
16
+ "dev": "storybook dev -p 6006",
17
+ "build": "rollup -c",
18
+ "build-storybook": "storybook build",
19
+ "test": "vitest run",
20
+ "test:ui": "vitest --ui",
21
+ "test:failed": "vitest run --reporter=./scripts/failed-tests-reporter.js",
22
+ "test:coverage": "vitest run --coverage",
23
+ "test:package-report": "npm run test:coverage && node scripts/generate-package-report.js",
24
+ "lint": "eslint src --ext .ts,.tsx",
25
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
26
+ "type-check": "tsc --noEmit",
27
+ "clean": "node -e \"require('fs').rmSync('dist', {recursive: true, force: true})\"",
28
+ "prepublishOnly": "npm run clean && npm run build"
29
+ },
30
+ "keywords": [
31
+ "react",
32
+ "typescript",
33
+ "ui-library",
34
+ "editor",
35
+ "components",
36
+ "ui-toolkit",
37
+ "design-system",
38
+ "react-components",
39
+ "editor-ui"
40
+ ],
41
+ "author": "Sebastian Goล‚ฤ™biowski <see.golebiowski@gmail.com>",
42
+ "license": "MIT",
43
+ "homepage": "https://github.com/SebastianWebdev/entangle-ui#readme",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/SebastianWebdev/entangle-ui.git"
47
+ },
48
+ "bugs": {
49
+ "url": "https://github.com/SebastianWebdev/entangle-ui/issues"
50
+ },
51
+ "peerDependencies": {
52
+ "react": ">=19.1.0",
53
+ "react-dom": ">=19.1.0"
54
+ },
55
+ "dependencies": {
56
+ "@base-ui-components/react": "^1.0.0-alpha.8",
57
+ "@emotion/react": "^11.14.0",
58
+ "@emotion/styled": "^11.14.0"
59
+ },
60
+ "devDependencies": {
61
+ "@rollup/plugin-alias": "^5.1.1",
62
+ "@rollup/plugin-typescript": "^12.1.2",
63
+ "@storybook/addon-controls": "^8.6.14",
64
+ "@storybook/addon-docs": "^8.6.14",
65
+ "@storybook/addon-essentials": "^8.6.14",
66
+ "@storybook/react-vite": "^8.6.14",
67
+ "@testing-library/dom": "^10.4.0",
68
+ "@testing-library/jest-dom": "^6.6.3",
69
+ "@testing-library/react": "^16.3.0",
70
+ "@testing-library/user-event": "^14.6.1",
71
+ "@types/react": "^19.1.5",
72
+ "@types/react-dom": "^19.1.5",
73
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
74
+ "@typescript-eslint/parser": "^8.32.1",
75
+ "@vitejs/plugin-react": "^4.5.0",
76
+ "@vitest/coverage-v8": "^3.1.4",
77
+ "@vitest/ui": "^3.1.4",
78
+ "eslint": "^9.27.0",
79
+ "jsdom": "^26.1.0",
80
+ "prettier": "^3.5.3",
81
+ "react": "^19.1.0",
82
+ "react-dom": "^19.1.0",
83
+ "rollup": "^4.41.0",
84
+ "rollup-plugin-dts": "^6.2.1",
85
+ "typescript": "^5.8.3",
86
+ "vite": "^6.3.5",
87
+ "vitest": "^3.1.4"
88
+ }
89
+ }