ywana-core8 0.1.102 → 0.2.1

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.
Files changed (172) hide show
  1. package/dist/index.css +4941 -324
  2. package/dist/index.js +42338 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/index.modern.js +37458 -31678
  5. package/dist/index.modern.js.map +1 -1
  6. package/dist/index.umd.js +39634 -34010
  7. package/dist/index.umd.js.map +1 -1
  8. package/package.json +26 -29
  9. package/src/Test.stories.jsx +28 -0
  10. package/src/desktop/Desktop.stories.jsx +110 -0
  11. package/src/desktop/WindowContext.js +135 -0
  12. package/src/desktop/WindowManager.js +355 -0
  13. package/src/desktop/desktop.css +55 -4
  14. package/src/desktop/desktop.js +312 -6
  15. package/src/desktop/index.js +7 -0
  16. package/src/desktop/window.css +229 -36
  17. package/src/desktop/window.js +254 -20
  18. package/src/desktop.backup/desktop.css +6 -0
  19. package/src/desktop.backup/desktop.js +13 -0
  20. package/src/desktop.backup/window.css +58 -0
  21. package/src/desktop.backup/window.js +27 -0
  22. package/src/html/Accordion.stories.jsx +178 -0
  23. package/src/html/Button.stories.jsx +175 -0
  24. package/src/html/Checkbox.stories.jsx +131 -0
  25. package/src/html/Chip.stories.jsx +189 -0
  26. package/src/html/Color.stories.jsx +234 -0
  27. package/src/html/Form.stories.jsx +271 -0
  28. package/src/html/Icon.stories.jsx +233 -0
  29. package/src/html/Progress.stories.jsx +247 -0
  30. package/src/html/Radio.stories.jsx +289 -0
  31. package/src/html/StyleTest.stories.jsx +81 -0
  32. package/src/html/Switch.stories.jsx +329 -0
  33. package/src/html/Tab.stories.jsx +239 -0
  34. package/src/html/Table.stories.jsx +188 -0
  35. package/src/html/Table2.stories.jsx +238 -0
  36. package/src/html/TextField2.stories.jsx +337 -0
  37. package/src/html/Tree.stories.jsx +285 -0
  38. package/src/html/accordion.example.js +0 -74
  39. package/src/html/accordion.js +1 -6
  40. package/src/html/button.js +2 -13
  41. package/src/html/checkbox.js +1 -9
  42. package/src/html/chip.js +2 -19
  43. package/src/html/color.js +1 -14
  44. package/src/html/form.js +4 -15
  45. package/src/html/header2.js +1 -12
  46. package/src/html/icon.js +1 -7
  47. package/src/html/index.js +1 -1
  48. package/src/html/list.js +1 -19
  49. package/src/html/menu.js +9 -5
  50. package/src/html/progress.js +5 -53
  51. package/src/html/property.js +6 -22
  52. package/src/html/radio.js +2 -16
  53. package/src/html/section.js +1 -6
  54. package/src/html/selector.js +2 -19
  55. package/src/html/switch.css +134 -100
  56. package/src/html/switch.example.js +46 -36
  57. package/src/html/switch.js +43 -192
  58. package/src/html/tab.js +3 -24
  59. package/src/html/text.js +1 -12
  60. package/src/html/textfield2.js +5 -42
  61. package/src/html/thumbnail.js +1 -12
  62. package/src/html/tokenfield.js +2 -21
  63. package/src/html/tree.js +3 -35
  64. package/src/index.js +1 -0
  65. package/__previewjs__/Wrapper.tsx +0 -14
  66. package/build-doc.sh +0 -10
  67. package/db/db.json +0 -89
  68. package/db/routes.json +0 -0
  69. package/dist/index.cjs +0 -36722
  70. package/dist/index.cjs.map +0 -1
  71. package/dist/index.css.map +0 -1
  72. package/doc/README.md +0 -196
  73. package/doc/evalulations/ACCORDION_EVALUATION.md +0 -583
  74. package/doc/evalulations/CHECKBOX_EVALUATION.md +0 -273
  75. package/doc/evalulations/CHIP_EVALUATION.md +0 -542
  76. package/doc/evalulations/COLOR_EVALUATION.md +0 -524
  77. package/doc/evalulations/COMPONENTS_EVALUATION.md +0 -477
  78. package/doc/evalulations/FORM_EVALUATION.md +0 -459
  79. package/doc/evalulations/HEADER_EVALUATION.md +0 -436
  80. package/doc/evalulations/ICON_EVALUATION.md +0 -254
  81. package/doc/evalulations/LIST_EVALUATION.md +0 -574
  82. package/doc/evalulations/PROGRESS_EVALUATION.md +0 -450
  83. package/doc/evalulations/RADIO_EVALUATION.md +0 -439
  84. package/doc/evalulations/RADIO_VISUAL_FIX.md +0 -183
  85. package/doc/evalulations/SECTION_IMPROVEMENTS.md +0 -153
  86. package/doc/evalulations/SWITCH_EVALUATION.md +0 -335
  87. package/doc/evalulations/SWITCH_VISUAL_FIX.md +0 -232
  88. package/doc/evalulations/TAB_EVALUATION.md +0 -626
  89. package/doc/evalulations/TEXTFIELD_EVALUATION.md +0 -747
  90. package/doc/evalulations/TOOLTIP_FIX.md +0 -157
  91. package/doc/evalulations/TREE_EVALUATION.md +0 -708
  92. package/doc/index.html +0 -0
  93. package/doc/package-lock.json +0 -17298
  94. package/doc/package.json +0 -34
  95. package/doc/public/index.html +0 -24
  96. package/doc/scripts/generate-examples.js +0 -129
  97. package/doc/src/App.css +0 -171
  98. package/doc/src/App.js +0 -114
  99. package/doc/src/components/ExamplePage.js +0 -129
  100. package/doc/src/components/WelcomePage.js +0 -84
  101. package/doc/src/index.css +0 -246
  102. package/doc/src/index.js +0 -17
  103. package/doc/src/theme.css +0 -256
  104. package/jest.config.js +0 -24
  105. package/preview.config.js +0 -38
  106. package/publish.sh +0 -6
  107. package/src/desktop/dektop.test.js +0 -11
  108. package/src/domain/CollectionAPI.test.js +0 -19
  109. package/src/domain/ContentEditor.test.js +0 -52
  110. package/src/domain2/CollectionAPI.test.js +0 -19
  111. package/src/domain2/CollectionContext.test.js +0 -71
  112. package/src/domain2/CollectionPage.test.js +0 -112
  113. package/src/domain2/DynamicForm.test.js +0 -47
  114. package/src/html/accordion.test.js +0 -37
  115. package/src/html/accordion.unit.test.js +0 -334
  116. package/src/html/button.example.new.js +0 -416
  117. package/src/html/button.test.js +0 -422
  118. package/src/html/checkbox.test.js +0 -285
  119. package/src/html/chip.test.js +0 -425
  120. package/src/html/color.example.js.backup +0 -527
  121. package/src/html/color.test.js +0 -377
  122. package/src/html/components.example.js.backup +0 -492
  123. package/src/html/components_enhanced.test.js +0 -581
  124. package/src/html/form.example.js.backup +0 -385
  125. package/src/html/form.test.js +0 -369
  126. package/src/html/header2.example.js.backup +0 -411
  127. package/src/html/header2.test.js +0 -377
  128. package/src/html/icon.example.js.backup +0 -268
  129. package/src/html/icon.test.js +0 -231
  130. package/src/html/label.test.js +0 -0
  131. package/src/html/list.example.js.backup +0 -404
  132. package/src/html/list.test.js +0 -383
  133. package/src/html/progress.example.js.backup +0 -424
  134. package/src/html/progress.test.js +0 -313
  135. package/src/html/property.example.js.backup +0 -553
  136. package/src/html/property.test.js +0 -371
  137. package/src/html/radio.example.js.backup +0 -389
  138. package/src/html/radio.test.js +0 -318
  139. package/src/html/section.example.js.backup +0 -99
  140. package/src/html/section.test.js +0 -131
  141. package/src/html/selector.test.js +0 -20
  142. package/src/html/switch.example.js.backup +0 -461
  143. package/src/html/switch.test.js +0 -355
  144. package/src/html/tab.example.js.backup +0 -446
  145. package/src/html/tab.test.js +0 -25
  146. package/src/html/tab_enhanced.test.js +0 -504
  147. package/src/html/table.test.js +0 -70
  148. package/src/html/table2.test.js +0 -582
  149. package/src/html/text.test.js +0 -15
  150. package/src/html/textfield.test.js +0 -51
  151. package/src/html/textfield2.example.js.backup +0 -1370
  152. package/src/html/textfield2.test.js +0 -950
  153. package/src/html/tokenfield.example.js.backup +0 -503
  154. package/src/html/tokenfield.test.js +0 -423
  155. package/src/html/tree.example.js.backup +0 -475
  156. package/src/html/tree.test.js +0 -43
  157. package/src/html/tree_enhanced.test.js +0 -495
  158. package/src/http/token.test.js +0 -50
  159. package/src/incubator/pdfViewer.js +0 -33
  160. package/src/incubator/wizard.test.js +0 -127
  161. package/src/site/site.test.js +0 -230
  162. package/src/site/view.test.js +0 -41
  163. package/src/widgets/calendar/Calendar.test.js +0 -28
  164. package/src/widgets/explorer/Explorer.test.js +0 -121
  165. package/src/widgets/ide/editor.test.js +0 -33
  166. package/src/widgets/kanban/Kanban.test.js +0 -78
  167. package/src/widgets/login/LoginBox.test.js +0 -12
  168. package/src/widgets/login/ResetPasswordBox.test.js +0 -34
  169. package/src/widgets/login/validations.test.js +0 -51
  170. package/src/widgets/planner/Planner.test.js +0 -60
  171. package/src/widgets/upload/Upload.test.js +0 -32
  172. package/table2.test.js +0 -454
@@ -1,13 +1,319 @@
1
- import React from 'react'
1
+ import React, { useRef, useEffect } from 'react'
2
+ import { WindowProvider, useWindows } from './WindowContext'
3
+ import { Window } from './window'
2
4
  import './desktop.css'
3
5
 
4
- export const Desktop = (props) => {
6
+ /**
7
+ * Desktop layout component - manages overall desktop structure and sizing
8
+ */
9
+ const DesktopLayout = ({ children, className = '', ...props }) => {
10
+ const desktopRef = useRef(null)
11
+ const { windowManager } = useWindows()
5
12
 
6
- const { children } = props
13
+ // Measure desktop size on mount and resize
14
+ useEffect(() => {
15
+ let currentSize = { width: 1200, height: 800 }
16
+
17
+ const measureDesktop = () => {
18
+ if (desktopRef.current) {
19
+ const rect = desktopRef.current.getBoundingClientRect()
20
+ const newSize = {
21
+ width: rect.width,
22
+ height: rect.height
23
+ }
24
+
25
+ // Only update if size actually changed
26
+ if (newSize.width !== currentSize.width || newSize.height !== currentSize.height) {
27
+ currentSize = newSize
28
+ windowManager.setDesktopSize(newSize)
29
+ }
30
+ }
31
+ }
32
+
33
+ // Initial measurement
34
+ measureDesktop()
35
+
36
+ // Listen for resize
37
+ const resizeObserver = new ResizeObserver(measureDesktop)
38
+ if (desktopRef.current) {
39
+ resizeObserver.observe(desktopRef.current)
40
+ }
41
+
42
+ return () => {
43
+ resizeObserver.disconnect()
44
+ }
45
+ }, [windowManager])
46
+
47
+ // Handle right-click context menu
48
+ const handleContextMenu = (e) => {
49
+ e.preventDefault()
50
+ // TODO: Show context menu
51
+ console.log('Desktop context menu at:', e.clientX, e.clientY)
52
+ }
53
+
54
+ return (
55
+ <div
56
+ ref={desktopRef}
57
+ className={`desktop ${className}`}
58
+ onContextMenu={handleContextMenu}
59
+ {...props}
60
+ >
61
+ {/* Desktop background */}
62
+ <div className="desktop__background" />
63
+
64
+ {/* Desktop content area */}
65
+ <div className="desktop__content">
66
+ {children}
67
+ </div>
68
+ </div>
69
+ )
70
+ }
71
+
72
+ /**
73
+ * Workspace - renders windows only
74
+ */
75
+ export const Workspace = ({ children }) => {
76
+ const { windows } = useWindows()
77
+
78
+ return (
79
+ <>
80
+ {children}
81
+
82
+ {/* Render windows using Window component */}
83
+ {windows.map(window => (
84
+ <Window
85
+ key={window.id}
86
+ id={window.id}
87
+ title={window.title}
88
+ icon={window.icon}
89
+ toolbar={window.toolbar}
90
+ statusBar={window.statusBar}
91
+ >
92
+ <div style={{ padding: '16px' }}>
93
+ <h3>Window: {window.title}</h3>
94
+ <p><strong>ID:</strong> {window.id}</p>
95
+ <p><strong>Position:</strong> {window.position.x}, {window.position.y}</p>
96
+ <p><strong>Size:</strong> {window.size.width} × {window.size.height}</p>
97
+ <p><strong>Z-Index:</strong> {window.zIndex}</p>
98
+ <p><strong>Status:</strong> {window.minimized ? 'Minimized' : window.maximized ? 'Maximized' : 'Normal'}</p>
99
+
100
+ <div style={{ marginTop: '16px', padding: '12px', background: '#f8f9fa', borderRadius: '4px' }}>
101
+ <p><strong>Window Content Area</strong></p>
102
+ <p>This is where your application content would go.</p>
103
+ <p>The window is fully draggable and has working minimize, maximize, and close buttons.</p>
104
+ </div>
105
+ </div>
106
+ </Window>
107
+ ))}
108
+ </>
109
+ )
110
+ }
111
+
112
+ /**
113
+ * DesktopTaskbar - handles window creation and management
114
+ */
115
+ export const DesktopTaskbar = () => {
116
+ const {
117
+ createWindow,
118
+ windows,
119
+ desktopSize,
120
+ activeWindowId,
121
+ focusWindow,
122
+ minimizeWindow,
123
+ closeWindow
124
+ } = useWindows()
125
+
126
+ const handleCreateWindow = () => {
127
+ const windowTypes = [
128
+ { title: 'File Explorer', icon: '📁', size: { width: 600, height: 400 } },
129
+ { title: 'Text Editor', icon: '📝', size: { width: 500, height: 350 } },
130
+ { title: 'Calculator', icon: '🧮', size: { width: 300, height: 400 } },
131
+ { title: 'Settings', icon: '⚙️', size: { width: 450, height: 300 } },
132
+ { title: 'Browser', icon: '🌐', size: { width: 800, height: 500 } }
133
+ ]
134
+
135
+ const randomType = windowTypes[Math.floor(Math.random() * windowTypes.length)]
136
+
137
+ createWindow({
138
+ title: randomType.title,
139
+ icon: randomType.icon,
140
+ size: randomType.size,
141
+ toolbar: randomType.title === 'Text Editor' ? (
142
+ <div style={{ display: 'flex', gap: '8px' }}>
143
+ <button style={{ padding: '4px 8px', fontSize: '12px' }}>File</button>
144
+ <button style={{ padding: '4px 8px', fontSize: '12px' }}>Edit</button>
145
+ <button style={{ padding: '4px 8px', fontSize: '12px' }}>View</button>
146
+ </div>
147
+ ) : null,
148
+ statusBar: randomType.title === 'Text Editor' ? (
149
+ <span>Ready | Line 1, Column 1</span>
150
+ ) : null
151
+ })
152
+ }
153
+
154
+ const handleWindowClick = (window) => {
155
+ if (window.minimized) {
156
+ // If minimized, restore it
157
+ minimizeWindow(window.id, false)
158
+ } else if (window.id === activeWindowId) {
159
+ // If already active, minimize it
160
+ minimizeWindow(window.id, true)
161
+ } else {
162
+ // If not active, focus it
163
+ focusWindow(window.id)
164
+ }
165
+ }
166
+
167
+ const handleWindowRightClick = (e, window) => {
168
+ e.preventDefault()
169
+ // Simple context menu simulation
170
+ const action = window.minimized ? 'Restore' : 'Minimize'
171
+ if (confirm(`${action} "${window.title}"?`)) {
172
+ minimizeWindow(window.id, !window.minimized)
173
+ }
174
+ }
175
+
176
+ const handleWindowMiddleClick = (e, window) => {
177
+ e.preventDefault()
178
+ if (confirm(`Close "${window.title}"?`)) {
179
+ closeWindow(window.id)
180
+ }
181
+ }
7
182
 
8
183
  return (
9
- <div className='desktop'>
10
- { children }
184
+ <div style={{
185
+ position: 'absolute',
186
+ bottom: 0,
187
+ left: 0,
188
+ right: 0,
189
+ height: '50px',
190
+ background: 'rgba(0,0,0,0.8)',
191
+ display: 'flex',
192
+ alignItems: 'center',
193
+ padding: '0 16px',
194
+ gap: '8px'
195
+ }}>
196
+ {/* Create window button */}
197
+ <button
198
+ onClick={handleCreateWindow}
199
+ style={{
200
+ padding: '8px 12px',
201
+ background: '#1976d2',
202
+ color: 'white',
203
+ border: 'none',
204
+ borderRadius: '4px',
205
+ cursor: 'pointer',
206
+ fontSize: '12px',
207
+ flexShrink: 0
208
+ }}
209
+ title="Create new window"
210
+ >
211
+ +
212
+ </button>
213
+
214
+ {/* Separator */}
215
+ <div style={{
216
+ width: '1px',
217
+ height: '30px',
218
+ background: 'rgba(255,255,255,0.3)',
219
+ flexShrink: 0
220
+ }} />
221
+
222
+ {/* Window icons */}
223
+ <div style={{
224
+ display: 'flex',
225
+ gap: '4px',
226
+ flex: 1,
227
+ overflow: 'hidden'
228
+ }}>
229
+ {windows.map(window => (
230
+ <button
231
+ key={window.id}
232
+ onClick={() => handleWindowClick(window)}
233
+ onContextMenu={(e) => handleWindowRightClick(e, window)}
234
+ onMouseDown={(e) => {
235
+ if (e.button === 1) { // Middle click
236
+ handleWindowMiddleClick(e, window)
237
+ }
238
+ }}
239
+ style={{
240
+ display: 'flex',
241
+ alignItems: 'center',
242
+ gap: '6px',
243
+ padding: '6px 12px',
244
+ background: window.id === activeWindowId
245
+ ? 'rgba(255,255,255,0.2)'
246
+ : window.minimized
247
+ ? 'rgba(255,255,255,0.05)'
248
+ : 'rgba(255,255,255,0.1)',
249
+ border: window.id === activeWindowId
250
+ ? '1px solid rgba(255,255,255,0.3)'
251
+ : '1px solid transparent',
252
+ borderRadius: '4px',
253
+ color: window.minimized ? 'rgba(255,255,255,0.6)' : 'white',
254
+ cursor: 'pointer',
255
+ fontSize: '12px',
256
+ maxWidth: '150px',
257
+ minWidth: '40px',
258
+ transition: 'all 0.15s ease',
259
+ position: 'relative'
260
+ }}
261
+ title={`${window.title}${window.minimized ? ' (Minimized)' : ''}\nLeft click: ${window.minimized ? 'Restore' : window.id === activeWindowId ? 'Minimize' : 'Focus'}\nRight click: Context menu\nMiddle click: Close`}
262
+ >
263
+ <span style={{ fontSize: '14px', flexShrink: 0 }}>
264
+ {window.icon || '🪟'}
265
+ </span>
266
+ <span style={{
267
+ whiteSpace: 'nowrap',
268
+ overflow: 'hidden',
269
+ textOverflow: 'ellipsis',
270
+ fontWeight: window.id === activeWindowId ? 'bold' : 'normal'
271
+ }}>
272
+ {window.title}
273
+ </span>
274
+ {/* Active indicator */}
275
+ {window.id === activeWindowId && !window.minimized && (
276
+ <div style={{
277
+ position: 'absolute',
278
+ bottom: '-1px',
279
+ left: '50%',
280
+ transform: 'translateX(-50%)',
281
+ width: '20px',
282
+ height: '2px',
283
+ background: '#1976d2',
284
+ borderRadius: '1px'
285
+ }} />
286
+ )}
287
+ </button>
288
+ ))}
289
+ </div>
290
+
291
+ {/* Debug info */}
292
+ <div style={{
293
+ color: 'rgba(255,255,255,0.7)',
294
+ fontSize: '11px',
295
+ fontFamily: 'monospace',
296
+ flexShrink: 0,
297
+ textAlign: 'right'
298
+ }}>
299
+ {desktopSize.width}×{desktopSize.height}
300
+ </div>
11
301
  </div>
12
302
  )
13
- }
303
+ }
304
+
305
+ /**
306
+ * Main Desktop component with WindowProvider
307
+ */
308
+ export const Desktop = ({ desktopSize, children, ...props }) => {
309
+ return (
310
+ <WindowProvider desktopSize={desktopSize}>
311
+ <DesktopLayout {...props}>
312
+ <Workspace>
313
+ {children}
314
+ </Workspace>
315
+ <DesktopTaskbar />
316
+ </DesktopLayout>
317
+ </WindowProvider>
318
+ )
319
+ }
@@ -0,0 +1,7 @@
1
+ // Desktop Components - Window management system for web applications
2
+ export { Desktop, Workspace, DesktopTaskbar } from './desktop'
3
+ export { Window } from './window'
4
+
5
+ // Window Management
6
+ export { WindowManager } from './WindowManager'
7
+ export { WindowProvider, useWindows, useWindow, useCreateWindow, useWindowStats } from './WindowContext'
@@ -1,58 +1,251 @@
1
+ /* Window Component Styles */
2
+
1
3
  .window {
2
- position: absolute;
3
- top: 1rem;
4
- left: 1rem;
5
- min-width: 20rem;
6
- min-height: 15rem;
7
- resize: both;
8
- background-color: rgb(227, 227, 227);
9
- display: grid;
4
+ background: white;
5
+ border: 1px solid #ccc;
6
+ border-radius: 8px;
7
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
8
+ display: flex;
9
+ flex-direction: column;
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
10
11
  overflow: hidden;
11
- resize: both;
12
+ user-select: none;
12
13
  }
13
14
 
14
- .window.normal {
15
- grid-template-areas:
16
- "header header header"
17
- "nav nav nav"
18
- "menu main aside"
19
- "footer footer footer";
20
- grid-template-columns: auto 1fr auto;
21
- grid-template-rows: 2rem auto 1fr auto;
15
+ .window:focus-within {
16
+ border-color: #1976d2;
17
+ box-shadow: 0 4px 16px rgba(25, 118, 210, 0.3);
22
18
  }
23
19
 
24
- .window>header {
25
- grid-area: header;
26
- padding: .3rem .3rem 0 0;
20
+ /* Window states */
21
+ .window--maximized {
22
+ border-radius: 0;
23
+ box-shadow: none;
24
+ }
25
+
26
+ .window--dragging {
27
+ pointer-events: none;
28
+ }
29
+
30
+ .window--dragging * {
31
+ pointer-events: none !important;
32
+ }
33
+
34
+ /* Allow clicks on window controls even during drag */
35
+ .window--dragging .window__control {
36
+ pointer-events: auto !important;
37
+ }
38
+
39
+ /* Window Header */
40
+ .window__header {
41
+ background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
42
+ border-bottom: 1px solid #dee2e6;
27
43
  display: flex;
28
44
  align-items: center;
45
+ justify-content: space-between;
46
+ padding: 8px 12px;
47
+ min-height: 32px;
48
+ }
49
+
50
+ .window__header:hover {
51
+ background: linear-gradient(to bottom, #f1f3f4, #e8eaed);
52
+ }
53
+
54
+ .window__header:active {
55
+ background: linear-gradient(to bottom, #e8eaed, #dadce0);
56
+ }
57
+
58
+ /* Title Bar */
59
+ .window__title-bar {
60
+ display: flex;
61
+ align-items: center;
62
+ gap: 8px;
63
+ flex: 1;
64
+ min-width: 0;
65
+ }
66
+
67
+ .window__icon {
68
+ font-size: 16px;
69
+ line-height: 1;
70
+ flex-shrink: 0;
71
+ }
72
+
73
+ .window__title {
74
+ font-size: 14px;
75
+ font-weight: 600;
76
+ color: #333;
77
+ white-space: nowrap;
29
78
  overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ }
81
+
82
+ /* Window Controls */
83
+ .window__controls {
84
+ display: flex;
85
+ gap: 4px;
86
+ flex-shrink: 0;
87
+ }
88
+
89
+ .window__control {
90
+ width: 24px;
91
+ height: 24px;
92
+ border: none;
93
+ border-radius: 4px;
94
+ background: transparent;
95
+ color: #666;
96
+ font-size: 14px;
97
+ font-weight: bold;
98
+ line-height: 1;
99
+ cursor: pointer;
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ transition: all 0.15s ease;
104
+ }
105
+
106
+ .window__control:hover {
107
+ background: rgba(0, 0, 0, 0.1);
108
+ color: #333;
30
109
  }
31
110
 
32
- .window>header>label {
111
+ .window__control:active {
112
+ background: rgba(0, 0, 0, 0.2);
113
+ transform: scale(0.95);
114
+ }
115
+
116
+ .window__control--minimize:hover {
117
+ background: #ffc107;
118
+ color: white;
119
+ }
120
+
121
+ .window__control--maximize:hover {
122
+ background: #28a745;
123
+ color: white;
124
+ }
125
+
126
+ .window__control--close:hover {
127
+ background: #dc3545;
128
+ color: white;
129
+ }
130
+
131
+ /* Toolbar */
132
+ .window__toolbar {
133
+ background: #f8f9fa;
134
+ border-bottom: 1px solid #dee2e6;
135
+ padding: 8px 12px;
136
+ display: flex;
137
+ align-items: center;
138
+ gap: 8px;
139
+ min-height: 40px;
140
+ }
141
+
142
+ /* Content */
143
+ .window__content {
33
144
  flex: 1;
145
+ overflow: auto;
146
+ background: white;
147
+ }
148
+
149
+ /* Status Bar */
150
+ .window__status-bar {
151
+ background: #f8f9fa;
152
+ border-top: 1px solid #dee2e6;
153
+ padding: 4px 12px;
154
+ font-size: 12px;
155
+ color: #666;
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: space-between;
159
+ min-height: 24px;
160
+ }
161
+
162
+ /* Dark theme support */
163
+ @media (prefers-color-scheme: dark) {
164
+ .window {
165
+ background: #2d3748;
166
+ border-color: #4a5568;
167
+ color: #e2e8f0;
168
+ }
169
+
170
+ .window__header {
171
+ background: linear-gradient(to bottom, #4a5568, #2d3748);
172
+ border-bottom-color: #4a5568;
173
+ }
174
+
175
+ .window__title {
176
+ color: #e2e8f0;
177
+ }
178
+
179
+ .window__control {
180
+ color: #a0aec0;
181
+ }
182
+
183
+ .window__control:hover {
184
+ background: rgba(255, 255, 255, 0.1);
185
+ color: #e2e8f0;
186
+ }
187
+
188
+ .window__toolbar,
189
+ .window__status-bar {
190
+ background: #4a5568;
191
+ border-color: #2d3748;
192
+ color: #e2e8f0;
193
+ }
194
+
195
+ .window__content {
196
+ background: #2d3748;
197
+ }
198
+ }
199
+
200
+ /* Responsive design */
201
+ @media (max-width: 768px) {
202
+ .window__header {
203
+ padding: 6px 8px;
204
+ min-height: 28px;
205
+ }
206
+
207
+ .window__title {
208
+ font-size: 13px;
209
+ }
210
+
211
+ .window__control {
212
+ width: 20px;
213
+ height: 20px;
214
+ font-size: 12px;
215
+ }
216
+
217
+ .window__toolbar {
218
+ padding: 6px 8px;
219
+ min-height: 36px;
220
+ }
221
+
222
+ .window__status-bar {
223
+ padding: 3px 8px;
224
+ font-size: 11px;
225
+ min-height: 20px;
226
+ }
34
227
  }
35
228
 
36
- .window>nav {
37
- grid-area: nav;
229
+ /* Animation for window operations */
230
+ .window {
231
+ transition: box-shadow 0.2s ease, border-color 0.2s ease;
38
232
  }
39
233
 
40
- .window>menu {
41
- grid-area: menu;
42
- padding: 0;
234
+ .window--maximized {
235
+ transition: all 0.3s ease;
43
236
  }
44
237
 
45
- .window>main {
46
- grid-area: main;
47
- padding: .5rem;
48
- overflow: hidden;
49
- border: solid 1px var(--divider-color);
238
+ .window--dragging {
239
+ transition: none !important;
50
240
  }
51
241
 
52
- .window>aside {
53
- grid-area: aside;
242
+ /* Focus ring for accessibility */
243
+ .window__control:focus {
244
+ outline: 2px solid #1976d2;
245
+ outline-offset: 2px;
54
246
  }
55
247
 
56
- .window>footer {
57
- grid-area: footer;
58
- }
248
+ /* Disable text selection during drag */
249
+ .window--dragging * {
250
+ user-select: none !important;
251
+ }