@umituz/web-design-system 6.17.0 → 6.18.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/web-design-system",
3
- "version": "6.17.0",
3
+ "version": "6.18.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Web Design System - Tailwind v4 authored, precompiled CSS shipped. Atomic Design components (Atoms, Molecules, Organisms, Templates) for React applications.",
@@ -0,0 +1,17 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { createStyles } from '../infrastructure/utils/styles.util';
3
+
4
+ describe('createStyles utility', () => {
5
+ it('creates scoped class names matching prefix__property pattern', () => {
6
+ const styles = createStyles('LiveChat');
7
+ expect(styles.container).toBe('LiveChat__container');
8
+ expect(styles.message).toBe('LiveChat__message');
9
+ expect(styles['themeOption--selected']).toBe('LiveChat__themeOption--selected');
10
+ expect(styles.unknownKey).toBe('LiveChat__unknownKey');
11
+ });
12
+
13
+ it('handles empty property or symbol safely', () => {
14
+ const styles = createStyles('TestModule');
15
+ expect(styles['']).toBe('TestModule__');
16
+ });
17
+ });
@@ -16,6 +16,7 @@ import {
16
16
  defaultTheme,
17
17
  forestTheme,
18
18
  fieldTheme,
19
+ crimsonTheme,
19
20
  } from '../infrastructure/themes';
20
21
  import type { ThemeConfig } from '../domain/types';
21
22
 
@@ -34,6 +35,8 @@ describe('Theme System and Provider', () => {
34
35
  expect(getTheme('ocean').name).toBe('ocean');
35
36
  expect(getTheme('forest').name).toBe('forest');
36
37
  expect(getTheme('field').name).toBe('field');
38
+ expect(getTheme('crimson').name).toBe('crimson');
39
+ expect(crimsonTheme.mode).toBe('dark');
37
40
  expect(getTheme('default').name).toBe('default');
38
41
  expect(getTheme('non-existent').name).toBe('default');
39
42
  });
@@ -0,0 +1,180 @@
1
+ import type { ThemeConfig } from '../../domain/types';
2
+
3
+ export const crimsonTheme: ThemeConfig = {
4
+ name: 'crimson',
5
+ mode: 'dark',
6
+ colors: {
7
+ background: '#0b0b0f',
8
+ foreground: '#f4f4f7',
9
+ card: '#16161d',
10
+ cardForeground: '#f4f4f7',
11
+ popover: '#1c1c25',
12
+ popoverForeground: '#f4f4f7',
13
+ primary: '#f43f6b',
14
+ primaryForeground: '#ffffff',
15
+ primarySoft: 'rgba(244, 63, 107, 0.14)',
16
+ secondary: '#1c1c25',
17
+ secondaryForeground: '#a6a6b3',
18
+ muted: '#1c1c25',
19
+ mutedForeground: '#71717d',
20
+ accent: '#22222d',
21
+ accentForeground: '#f4f4f7',
22
+ border: '#23232d',
23
+ input: '#23232d',
24
+ destructive: '#e02a58',
25
+ destructiveForeground: '#ffffff',
26
+ ring: 'rgba(244, 63, 107, 0.4)',
27
+ success: '#34d399',
28
+ successForeground: '#ffffff',
29
+ warning: '#fbbf24',
30
+ warningForeground: '#ffffff',
31
+ info: '#62aaf6',
32
+ infoForeground: '#ffffff',
33
+ violet: '#a78bfa',
34
+ violetForeground: '#ffffff',
35
+ },
36
+ darkColors: {
37
+ background: '#0b0b0f',
38
+ foreground: '#f4f4f7',
39
+ card: '#16161d',
40
+ cardForeground: '#f4f4f7',
41
+ popover: '#1c1c25',
42
+ popoverForeground: '#f4f4f7',
43
+ primary: '#f43f6b',
44
+ primaryForeground: '#ffffff',
45
+ primarySoft: 'rgba(244, 63, 107, 0.14)',
46
+ secondary: '#1c1c25',
47
+ secondaryForeground: '#a6a6b3',
48
+ muted: '#1c1c25',
49
+ mutedForeground: '#71717d',
50
+ accent: '#22222d',
51
+ accentForeground: '#f4f4f7',
52
+ border: '#23232d',
53
+ input: '#23232d',
54
+ destructive: '#e02a58',
55
+ destructiveForeground: '#ffffff',
56
+ ring: 'rgba(244, 63, 107, 0.4)',
57
+ success: '#34d399',
58
+ successForeground: '#ffffff',
59
+ warning: '#fbbf24',
60
+ warningForeground: '#ffffff',
61
+ info: '#62aaf6',
62
+ infoForeground: '#ffffff',
63
+ violet: '#a78bfa',
64
+ violetForeground: '#ffffff',
65
+ },
66
+ typography: {
67
+ fontSans: "ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",
68
+ fontMono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
69
+ },
70
+ radii: {
71
+ xs: '4px',
72
+ sm: '8px',
73
+ md: '12px',
74
+ lg: '16px',
75
+ xl: '999px',
76
+ },
77
+ customVars: {
78
+ 'bg': '#0b0b0f',
79
+ 'bg-elevated': '#101016',
80
+ 'surface': '#16161d',
81
+ 'surface-hover': '#1c1c25',
82
+ 'surface-active': '#22222d',
83
+ 'border': '#23232d',
84
+ 'border-strong': '#33333f',
85
+ 'text': '#f4f4f7',
86
+ 'text-primary': '#f4f4f7',
87
+ 'text-secondary': '#a6a6b3',
88
+ 'text-muted': '#71717d',
89
+ 'accent': '#f43f6b',
90
+ 'accent-strong': '#e02a58',
91
+ 'accent-contrast': '#ffffff',
92
+ 'accent-soft': 'rgba(244, 63, 107, 0.14)',
93
+ 'accent-border': 'rgba(244, 63, 107, 0.4)',
94
+ 'live': '#ff3b5c',
95
+ 'live-soft': 'rgba(255, 59, 92, 0.16)',
96
+ 'success': '#34d399',
97
+ 'success-soft': 'rgba(52, 211, 153, 0.14)',
98
+ 'warning': '#fbbf24',
99
+ 'gold': '#f5b544',
100
+ 'gold-soft': 'rgba(245, 181, 68, 0.12)',
101
+ 'info': '#62aaf6',
102
+ 'info-soft': 'rgba(98, 170, 246, 0.14)',
103
+ 'violet': '#a78bfa',
104
+ 'violet-soft': 'rgba(167, 139, 250, 0.14)',
105
+ 'overlay': 'rgba(5, 5, 8, 0.72)',
106
+ 'scrim': 'linear-gradient(to top, rgba(8, 8, 12, 0.92) 0%, rgba(8, 8, 12, 0.55) 55%, rgba(8, 8, 12, 0) 100%)',
107
+ 'focus': '#ff8aa6',
108
+ 'space-1': '4px',
109
+ 'space-2': '8px',
110
+ 'space-3': '12px',
111
+ 'space-4': '16px',
112
+ 'space-5': '20px',
113
+ 'space-6': '24px',
114
+ 'space-8': '32px',
115
+ 'space-10': '40px',
116
+ 'space-12': '48px',
117
+ 'space-16': '64px',
118
+ 'radius-sm': '8px',
119
+ 'radius-md': '12px',
120
+ 'radius-lg': '16px',
121
+ 'radius-full': '999px',
122
+ 'leading-tight': '1.25',
123
+ 'leading-normal': '1.45',
124
+ 'weight-regular': '400',
125
+ 'weight-medium': '500',
126
+ 'weight-semibold': '600',
127
+ 'weight-bold': '700',
128
+ 'shadow-sm': '0 1px 2px rgba(0, 0, 0, 0.35)',
129
+ 'shadow-md': '0 4px 16px rgba(0, 0, 0, 0.35)',
130
+ 'shadow-lg': '0 12px 40px rgba(0, 0, 0, 0.45)',
131
+ 'sidebar-width': '240px',
132
+ 'header-height': '56px',
133
+ 'bottomnav-height': '60px',
134
+ 'content-max': '1320px',
135
+ 'chat-column': '356px',
136
+ 'speed-fast': '140ms',
137
+ 'speed': '200ms',
138
+ 'speed-slow': '320ms',
139
+ 'ease': 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
140
+ 'z-sticky': '30',
141
+ 'z-dropdown': '40',
142
+ 'z-overlay': '50',
143
+ 'z-toast': '60',
144
+ },
145
+ darkCustomVars: {
146
+ 'bg': '#0b0b0f',
147
+ 'bg-elevated': '#101016',
148
+ 'surface': '#16161d',
149
+ 'surface-hover': '#1c1c25',
150
+ 'surface-active': '#22222d',
151
+ 'border': '#23232d',
152
+ 'border-strong': '#33333f',
153
+ 'text': '#f4f4f7',
154
+ 'text-primary': '#f4f4f7',
155
+ 'text-secondary': '#a6a6b3',
156
+ 'text-muted': '#71717d',
157
+ 'accent': '#f43f6b',
158
+ 'accent-strong': '#e02a58',
159
+ 'accent-contrast': '#ffffff',
160
+ 'accent-soft': 'rgba(244, 63, 107, 0.14)',
161
+ 'accent-border': 'rgba(244, 63, 107, 0.4)',
162
+ 'live': '#ff3b5c',
163
+ 'live-soft': 'rgba(255, 59, 92, 0.16)',
164
+ 'success': '#34d399',
165
+ 'success-soft': 'rgba(52, 211, 153, 0.14)',
166
+ 'warning': '#fbbf24',
167
+ 'gold': '#f5b544',
168
+ 'gold-soft': 'rgba(245, 181, 68, 0.12)',
169
+ 'info': '#62aaf6',
170
+ 'info-soft': 'rgba(98, 170, 246, 0.14)',
171
+ 'violet': '#a78bfa',
172
+ 'violet-soft': 'rgba(167, 139, 250, 0.14)',
173
+ 'overlay': 'rgba(5, 5, 8, 0.72)',
174
+ 'scrim': 'linear-gradient(to top, rgba(8, 8, 12, 0.92) 0%, rgba(8, 8, 12, 0.55) 55%, rgba(8, 8, 12, 0) 100%)',
175
+ 'focus': '#ff8aa6',
176
+ 'shadow-sm': '0 1px 2px rgba(0, 0, 0, 0.35)',
177
+ 'shadow-md': '0 4px 16px rgba(0, 0, 0, 0.35)',
178
+ 'shadow-lg': '0 12px 40px rgba(0, 0, 0, 0.45)',
179
+ },
180
+ };
@@ -4,6 +4,7 @@ export { midnightTheme } from './midnight.theme';
4
4
  export { editorialTheme } from './editorial.theme';
5
5
  export { forestTheme } from './forest.theme';
6
6
  export { fieldTheme } from './field.theme';
7
+ export { crimsonTheme } from './crimson.theme';
7
8
  export { createTheme } from './create-theme';
8
9
  export type { ThemeOverrides } from './create-theme';
9
10
  export { registerTheme, getTheme, hasTheme, listThemes } from './registry';
@@ -5,6 +5,7 @@ import { midnightTheme } from './midnight.theme';
5
5
  import { editorialTheme } from './editorial.theme';
6
6
  import { forestTheme } from './forest.theme';
7
7
  import { fieldTheme } from './field.theme';
8
+ import { crimsonTheme } from './crimson.theme';
8
9
 
9
10
  const themeRegistry = new Map<string, ThemeConfig>([
10
11
  ['default', defaultTheme],
@@ -13,6 +14,7 @@ const themeRegistry = new Map<string, ThemeConfig>([
13
14
  ['editorial', editorialTheme],
14
15
  ['forest', forestTheme],
15
16
  ['field', fieldTheme],
17
+ ['crimson', crimsonTheme],
16
18
  ]);
17
19
 
18
20
  export function registerTheme(theme: ThemeConfig): void {
@@ -4,6 +4,8 @@ export {
4
4
  } from './cn.util';
5
5
  export type { ClassValue } from './cn.util';
6
6
 
7
+ export { createStyles } from './styles.util';
8
+
7
9
  export {
8
10
  getSpacing,
9
11
  getIconSize,
@@ -0,0 +1,5 @@
1
+ export function createStyles(prefix: string): Record<string, string> {
2
+ return new Proxy({} as Record<string, string>, {
3
+ get: (_, prop: string | symbol) => (typeof prop === 'string' ? `${prefix}__${prop}` : ''),
4
+ });
5
+ }