@liiift-studio/mac-os9-ui 0.1.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/ATTRIBUTION.md +100 -0
- package/LICENSE +50 -0
- package/README.md +243 -0
- package/dist/index.cjs +1625 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1703 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +1716 -0
- package/dist/index.d.ts +1716 -0
- package/dist/index.js +1561 -0
- package/dist/index.js.map +1 -0
- package/package.json +109 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1716 @@
|
|
|
1
|
+
import React$1, { ButtonHTMLAttributes, AnchorHTMLAttributes, SVGAttributes, InputHTMLAttributes, SelectHTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
interface BaseButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Button variant
|
|
6
|
+
* @default 'default'
|
|
7
|
+
*/
|
|
8
|
+
variant?: 'default' | 'primary' | 'danger';
|
|
9
|
+
/**
|
|
10
|
+
* Button size
|
|
11
|
+
* @default 'md'
|
|
12
|
+
*/
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
/**
|
|
15
|
+
* Whether the button is disabled
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the button should take full width
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Loading state - shows loading indicator and disables interaction
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Text to show when loading (replaces children)
|
|
31
|
+
*/
|
|
32
|
+
loadingText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Use Mac OS 9 style watch cursor during loading
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
useCursorLoading?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Icon to display before the button text
|
|
40
|
+
*/
|
|
41
|
+
leftIcon?: React$1.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Icon to display after the button text
|
|
44
|
+
*/
|
|
45
|
+
rightIcon?: React$1.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* If true, only displays icon (children used as aria-label)
|
|
48
|
+
*/
|
|
49
|
+
iconOnly?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Override aria-label
|
|
52
|
+
*/
|
|
53
|
+
ariaLabel?: string;
|
|
54
|
+
/**
|
|
55
|
+
* ID of element that describes this button
|
|
56
|
+
*/
|
|
57
|
+
ariaDescribedBy?: string;
|
|
58
|
+
/**
|
|
59
|
+
* For toggle buttons - indicates pressed state
|
|
60
|
+
*/
|
|
61
|
+
ariaPressed?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Additional CSS class names
|
|
64
|
+
*/
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Button content
|
|
68
|
+
*/
|
|
69
|
+
children: React$1.ReactNode;
|
|
70
|
+
}
|
|
71
|
+
interface ButtonAsButton extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof BaseButtonProps | 'aria-label' | 'aria-describedby' | 'aria-pressed'> {
|
|
72
|
+
/**
|
|
73
|
+
* Render as button element
|
|
74
|
+
* @default 'button'
|
|
75
|
+
*/
|
|
76
|
+
as?: 'button';
|
|
77
|
+
/**
|
|
78
|
+
* Associate button with a form by ID
|
|
79
|
+
*/
|
|
80
|
+
form?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Override form action URL
|
|
83
|
+
*/
|
|
84
|
+
formAction?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Override form method
|
|
87
|
+
*/
|
|
88
|
+
formMethod?: 'get' | 'post';
|
|
89
|
+
/**
|
|
90
|
+
* Skip form validation
|
|
91
|
+
*/
|
|
92
|
+
formNoValidate?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Where to display form response
|
|
95
|
+
*/
|
|
96
|
+
formTarget?: string;
|
|
97
|
+
}
|
|
98
|
+
interface ButtonAsLink extends BaseButtonProps, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseButtonProps | 'aria-label' | 'aria-describedby' | 'aria-pressed'> {
|
|
99
|
+
/**
|
|
100
|
+
* Render as anchor element
|
|
101
|
+
*/
|
|
102
|
+
as: 'a';
|
|
103
|
+
/**
|
|
104
|
+
* URL for the link
|
|
105
|
+
*/
|
|
106
|
+
href: string;
|
|
107
|
+
/**
|
|
108
|
+
* Where to open the link
|
|
109
|
+
*/
|
|
110
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
111
|
+
/**
|
|
112
|
+
* Relationship of linked resource
|
|
113
|
+
* Auto-fills "noopener noreferrer" for external links if not provided
|
|
114
|
+
*/
|
|
115
|
+
rel?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Prompt to download the linked resource
|
|
118
|
+
*/
|
|
119
|
+
download?: boolean | string;
|
|
120
|
+
}
|
|
121
|
+
type ButtonProps = ButtonAsButton | ButtonAsLink;
|
|
122
|
+
/**
|
|
123
|
+
* Mac OS 9 style Button component
|
|
124
|
+
*
|
|
125
|
+
* Polymorphic component that can render as button or link with consistent styling.
|
|
126
|
+
*
|
|
127
|
+
* Features:
|
|
128
|
+
* - Classic 3-layer bevel effect (highlight, shadow, drop shadow)
|
|
129
|
+
* - Polymorphic - renders as <button> or <a> based on `as` prop
|
|
130
|
+
* - Loading states with optional Mac OS 9 watch cursor
|
|
131
|
+
* - Icon support (left, right, or icon-only)
|
|
132
|
+
* - Full accessibility with ARIA support
|
|
133
|
+
* - Form integration props
|
|
134
|
+
* - Auto-security for external links
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```tsx
|
|
138
|
+
* // Button
|
|
139
|
+
* <Button onClick={handleClick}>Click Me</Button>
|
|
140
|
+
* <Button variant="primary" size="lg">Primary Action</Button>
|
|
141
|
+
* <Button loading loadingText="Saving...">Save</Button>
|
|
142
|
+
*
|
|
143
|
+
* // Link styled as button
|
|
144
|
+
* <Button as="a" href="/dashboard">Go to Dashboard</Button>
|
|
145
|
+
* <Button as="a" href="https://example.com" target="_blank">
|
|
146
|
+
* External Link
|
|
147
|
+
* </Button>
|
|
148
|
+
*
|
|
149
|
+
* // With icons
|
|
150
|
+
* <Button leftIcon={<FolderIcon />}>Open</Button>
|
|
151
|
+
* <Button iconOnly aria-label="Close">
|
|
152
|
+
* <CloseIcon />
|
|
153
|
+
* </Button>
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
157
|
+
|
|
158
|
+
interface IconProps extends SVGAttributes<SVGElement> {
|
|
159
|
+
/**
|
|
160
|
+
* Icon size
|
|
161
|
+
* @default 'md'
|
|
162
|
+
*/
|
|
163
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
164
|
+
/**
|
|
165
|
+
* Icon content (SVG path or element)
|
|
166
|
+
*/
|
|
167
|
+
children: React$1.ReactNode;
|
|
168
|
+
/**
|
|
169
|
+
* Optional label for accessibility
|
|
170
|
+
*/
|
|
171
|
+
label?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Additional CSS class names
|
|
174
|
+
*/
|
|
175
|
+
className?: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Icon component for Mac OS 9 UI
|
|
179
|
+
*
|
|
180
|
+
* Wraps SVG content with consistent sizing and styling.
|
|
181
|
+
* Use for inline icons in buttons, labels, etc.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```tsx
|
|
185
|
+
* <Icon size="sm">
|
|
186
|
+
* <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
|
187
|
+
* </Icon>
|
|
188
|
+
*
|
|
189
|
+
* <Icon label="Close" size="md">
|
|
190
|
+
* <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
|
|
191
|
+
* </Icon>
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
declare const Icon: React$1.ForwardRefExoticComponent<IconProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
195
|
+
|
|
196
|
+
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
197
|
+
/**
|
|
198
|
+
* Icon element to display
|
|
199
|
+
*/
|
|
200
|
+
icon: React$1.ReactNode;
|
|
201
|
+
/**
|
|
202
|
+
* Optional text label to display alongside icon
|
|
203
|
+
*/
|
|
204
|
+
label?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Label position relative to icon
|
|
207
|
+
* @default 'right'
|
|
208
|
+
*/
|
|
209
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
210
|
+
/**
|
|
211
|
+
* Button variant
|
|
212
|
+
* @default 'default'
|
|
213
|
+
*/
|
|
214
|
+
variant?: 'default' | 'primary' | 'danger';
|
|
215
|
+
/**
|
|
216
|
+
* Button size
|
|
217
|
+
* @default 'md'
|
|
218
|
+
*/
|
|
219
|
+
size?: 'sm' | 'md' | 'lg';
|
|
220
|
+
/**
|
|
221
|
+
* Whether button is disabled
|
|
222
|
+
* @default false
|
|
223
|
+
*/
|
|
224
|
+
disabled?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Additional CSS class names
|
|
227
|
+
*/
|
|
228
|
+
className?: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* IconButton component for Mac OS 9 UI
|
|
232
|
+
*
|
|
233
|
+
* Button with an icon, optionally with a text label.
|
|
234
|
+
* Supports all button variants and sizes.
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```tsx
|
|
238
|
+
* // Icon-only button
|
|
239
|
+
* <IconButton icon={<SaveIcon />} />
|
|
240
|
+
*
|
|
241
|
+
* // Icon with label
|
|
242
|
+
* <IconButton
|
|
243
|
+
* icon={<FolderIcon />}
|
|
244
|
+
* label="New Folder"
|
|
245
|
+
* variant="primary"
|
|
246
|
+
* />
|
|
247
|
+
*
|
|
248
|
+
* // Icon with label on different sides
|
|
249
|
+
* <IconButton
|
|
250
|
+
* icon={<SearchIcon />}
|
|
251
|
+
* label="Search"
|
|
252
|
+
* labelPosition="right"
|
|
253
|
+
* />
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
257
|
+
|
|
258
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
259
|
+
/**
|
|
260
|
+
* Whether the checkbox is checked
|
|
261
|
+
* For controlled component usage
|
|
262
|
+
*/
|
|
263
|
+
checked?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Default checked state
|
|
266
|
+
* For uncontrolled component usage
|
|
267
|
+
*/
|
|
268
|
+
defaultChecked?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Whether the checkbox is in an indeterminate state
|
|
271
|
+
* (neither checked nor unchecked, typically for "select all" scenarios)
|
|
272
|
+
* @default false
|
|
273
|
+
*/
|
|
274
|
+
indeterminate?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Whether the checkbox is disabled
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
disabled?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Label text for the checkbox
|
|
282
|
+
*/
|
|
283
|
+
label?: React$1.ReactNode;
|
|
284
|
+
/**
|
|
285
|
+
* Position of the label relative to the checkbox
|
|
286
|
+
* @default 'right'
|
|
287
|
+
*/
|
|
288
|
+
labelPosition?: 'left' | 'right';
|
|
289
|
+
/**
|
|
290
|
+
* Size of the checkbox
|
|
291
|
+
* @default 'md'
|
|
292
|
+
*/
|
|
293
|
+
size?: 'sm' | 'md' | 'lg';
|
|
294
|
+
/**
|
|
295
|
+
* Error state for form validation
|
|
296
|
+
* @default false
|
|
297
|
+
*/
|
|
298
|
+
error?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Override aria-label (for checkboxes without visible labels)
|
|
301
|
+
*/
|
|
302
|
+
ariaLabel?: string;
|
|
303
|
+
/**
|
|
304
|
+
* ID of element that describes this checkbox
|
|
305
|
+
*/
|
|
306
|
+
ariaDescribedBy?: string;
|
|
307
|
+
/**
|
|
308
|
+
* Additional CSS class names
|
|
309
|
+
*/
|
|
310
|
+
className?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Callback when checked state changes
|
|
313
|
+
*/
|
|
314
|
+
onChange?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Mac OS 9 style Checkbox component
|
|
318
|
+
*
|
|
319
|
+
* Classic checkbox with raised bevel effect and optional label.
|
|
320
|
+
* Supports checked, unchecked, indeterminate, and disabled states.
|
|
321
|
+
*
|
|
322
|
+
* Features:
|
|
323
|
+
* - Classic Mac OS 9 bevel styling
|
|
324
|
+
* - Indeterminate state support
|
|
325
|
+
* - Label positioning (left/right)
|
|
326
|
+
* - Controlled and uncontrolled modes
|
|
327
|
+
* - Full accessibility with ARIA support
|
|
328
|
+
* - Keyboard navigation (Space to toggle)
|
|
329
|
+
* - Form integration
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```tsx
|
|
333
|
+
* // Uncontrolled
|
|
334
|
+
* <Checkbox label="Accept terms" />
|
|
335
|
+
*
|
|
336
|
+
* // Controlled
|
|
337
|
+
* <Checkbox
|
|
338
|
+
* checked={isChecked}
|
|
339
|
+
* onChange={(e) => setIsChecked(e.target.checked)}
|
|
340
|
+
* label="Subscribe to newsletter"
|
|
341
|
+
* />
|
|
342
|
+
*
|
|
343
|
+
* // Indeterminate (for "select all")
|
|
344
|
+
* <Checkbox
|
|
345
|
+
* indeterminate={someSelected && !allSelected}
|
|
346
|
+
* checked={allSelected}
|
|
347
|
+
* onChange={handleSelectAll}
|
|
348
|
+
* label="Select all items"
|
|
349
|
+
* />
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
353
|
+
|
|
354
|
+
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
355
|
+
/**
|
|
356
|
+
* Whether the radio is checked
|
|
357
|
+
* For controlled component usage
|
|
358
|
+
*/
|
|
359
|
+
checked?: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Default checked state
|
|
362
|
+
* For uncontrolled component usage
|
|
363
|
+
*/
|
|
364
|
+
defaultChecked?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Whether the radio is disabled
|
|
367
|
+
* @default false
|
|
368
|
+
*/
|
|
369
|
+
disabled?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Label text for the radio
|
|
372
|
+
*/
|
|
373
|
+
label?: React$1.ReactNode;
|
|
374
|
+
/**
|
|
375
|
+
* Position of the label relative to the radio
|
|
376
|
+
* @default 'right'
|
|
377
|
+
*/
|
|
378
|
+
labelPosition?: 'left' | 'right';
|
|
379
|
+
/**
|
|
380
|
+
* Size of the radio
|
|
381
|
+
* @default 'md'
|
|
382
|
+
*/
|
|
383
|
+
size?: 'sm' | 'md' | 'lg';
|
|
384
|
+
/**
|
|
385
|
+
* Error state for form validation
|
|
386
|
+
* @default false
|
|
387
|
+
*/
|
|
388
|
+
error?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Override aria-label (for radios without visible labels)
|
|
391
|
+
*/
|
|
392
|
+
ariaLabel?: string;
|
|
393
|
+
/**
|
|
394
|
+
* ID of element that describes this radio
|
|
395
|
+
*/
|
|
396
|
+
ariaDescribedBy?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Additional CSS class names
|
|
399
|
+
*/
|
|
400
|
+
className?: string;
|
|
401
|
+
/**
|
|
402
|
+
* Value for the radio button (required for radio groups)
|
|
403
|
+
*/
|
|
404
|
+
value?: string | number;
|
|
405
|
+
/**
|
|
406
|
+
* Name for the radio group (all radios in a group should share the same name)
|
|
407
|
+
*/
|
|
408
|
+
name?: string;
|
|
409
|
+
/**
|
|
410
|
+
* Callback when checked state changes
|
|
411
|
+
*/
|
|
412
|
+
onChange?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Mac OS 9 style Radio component
|
|
416
|
+
*
|
|
417
|
+
* Classic radio button with raised bevel effect and optional label.
|
|
418
|
+
* Radio buttons work in groups - only one can be selected at a time.
|
|
419
|
+
*
|
|
420
|
+
* Features:
|
|
421
|
+
* - Classic Mac OS 9 circular bevel styling
|
|
422
|
+
* - Radio group support via `name` attribute
|
|
423
|
+
* - Label positioning (left/right)
|
|
424
|
+
* - Controlled and uncontrolled modes
|
|
425
|
+
* - Full accessibility with ARIA support
|
|
426
|
+
* - Keyboard navigation (Arrow keys to navigate group, Space to select)
|
|
427
|
+
* - Form integration
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```tsx
|
|
431
|
+
* // Uncontrolled radio group
|
|
432
|
+
* <div>
|
|
433
|
+
* <Radio name="size" value="small" label="Small" />
|
|
434
|
+
* <Radio name="size" value="medium" label="Medium" defaultChecked />
|
|
435
|
+
* <Radio name="size" value="large" label="Large" />
|
|
436
|
+
* </div>
|
|
437
|
+
*
|
|
438
|
+
* // Controlled radio group
|
|
439
|
+
* <div>
|
|
440
|
+
* <Radio
|
|
441
|
+
* name="color"
|
|
442
|
+
* value="red"
|
|
443
|
+
* checked={color === 'red'}
|
|
444
|
+
* onChange={(e) => setColor(e.target.value)}
|
|
445
|
+
* label="Red"
|
|
446
|
+
* />
|
|
447
|
+
* <Radio
|
|
448
|
+
* name="color"
|
|
449
|
+
* value="blue"
|
|
450
|
+
* checked={color === 'blue'}
|
|
451
|
+
* onChange={(e) => setColor(e.target.value)}
|
|
452
|
+
* label="Blue"
|
|
453
|
+
* />
|
|
454
|
+
* </div>
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
declare const Radio: React$1.ForwardRefExoticComponent<RadioProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
458
|
+
|
|
459
|
+
interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
460
|
+
/**
|
|
461
|
+
* Label text for the text field
|
|
462
|
+
*/
|
|
463
|
+
label?: React$1.ReactNode;
|
|
464
|
+
/**
|
|
465
|
+
* Position of the label relative to the text field
|
|
466
|
+
* @default 'top'
|
|
467
|
+
*/
|
|
468
|
+
labelPosition?: 'top' | 'left' | 'right';
|
|
469
|
+
/**
|
|
470
|
+
* Size of the text field
|
|
471
|
+
* @default 'md'
|
|
472
|
+
*/
|
|
473
|
+
size?: 'sm' | 'md' | 'lg';
|
|
474
|
+
/**
|
|
475
|
+
* Whether the text field takes full width of its container
|
|
476
|
+
* @default false
|
|
477
|
+
*/
|
|
478
|
+
fullWidth?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Error state for form validation
|
|
481
|
+
* @default false
|
|
482
|
+
*/
|
|
483
|
+
error?: boolean;
|
|
484
|
+
/**
|
|
485
|
+
* Error message to display below the field
|
|
486
|
+
*/
|
|
487
|
+
errorMessage?: string;
|
|
488
|
+
/**
|
|
489
|
+
* Helper text to display below the field
|
|
490
|
+
*/
|
|
491
|
+
helperText?: string;
|
|
492
|
+
/**
|
|
493
|
+
* Icon to display before the input (left side)
|
|
494
|
+
*/
|
|
495
|
+
leftIcon?: React$1.ReactNode;
|
|
496
|
+
/**
|
|
497
|
+
* Icon to display after the input (right side)
|
|
498
|
+
*/
|
|
499
|
+
rightIcon?: React$1.ReactNode;
|
|
500
|
+
/**
|
|
501
|
+
* Override aria-label
|
|
502
|
+
*/
|
|
503
|
+
ariaLabel?: string;
|
|
504
|
+
/**
|
|
505
|
+
* ID of element that describes this text field
|
|
506
|
+
*/
|
|
507
|
+
ariaDescribedBy?: string;
|
|
508
|
+
/**
|
|
509
|
+
* Additional CSS class names
|
|
510
|
+
*/
|
|
511
|
+
className?: string;
|
|
512
|
+
/**
|
|
513
|
+
* Custom wrapper class name
|
|
514
|
+
*/
|
|
515
|
+
wrapperClassName?: string;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Mac OS 9 style TextField component
|
|
519
|
+
*
|
|
520
|
+
* Classic text input with inset bevel effect and optional label.
|
|
521
|
+
*
|
|
522
|
+
* Features:
|
|
523
|
+
* - Classic Mac OS 9 inset bevel styling
|
|
524
|
+
* - Label positioning (top/left/right)
|
|
525
|
+
* - Size variants (sm/md/lg)
|
|
526
|
+
* - Error states with messages
|
|
527
|
+
* - Helper text support
|
|
528
|
+
* - Icon support (left/right)
|
|
529
|
+
* - Full accessibility with ARIA support
|
|
530
|
+
* - Keyboard navigation
|
|
531
|
+
* - Form integration
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* ```tsx
|
|
535
|
+
* // Basic text field
|
|
536
|
+
* <TextField placeholder="Enter text..." />
|
|
537
|
+
*
|
|
538
|
+
* // With label
|
|
539
|
+
* <TextField label="Username" placeholder="Enter username" />
|
|
540
|
+
*
|
|
541
|
+
* // With error
|
|
542
|
+
* <TextField
|
|
543
|
+
* label="Email"
|
|
544
|
+
* error
|
|
545
|
+
* errorMessage="Invalid email address"
|
|
546
|
+
* value={email}
|
|
547
|
+
* onChange={(e) => setEmail(e.target.value)}
|
|
548
|
+
* />
|
|
549
|
+
*
|
|
550
|
+
* // With icons
|
|
551
|
+
* <TextField
|
|
552
|
+
* leftIcon={<SearchIcon />}
|
|
553
|
+
* placeholder="Search..."
|
|
554
|
+
* />
|
|
555
|
+
* ```
|
|
556
|
+
*/
|
|
557
|
+
declare const TextField: React$1.ForwardRefExoticComponent<TextFieldProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
558
|
+
|
|
559
|
+
interface SelectOption {
|
|
560
|
+
value: string | number;
|
|
561
|
+
label: string;
|
|
562
|
+
disabled?: boolean;
|
|
563
|
+
}
|
|
564
|
+
interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
565
|
+
/**
|
|
566
|
+
* Label text for the select
|
|
567
|
+
*/
|
|
568
|
+
label?: React$1.ReactNode;
|
|
569
|
+
/**
|
|
570
|
+
* Position of the label relative to the select
|
|
571
|
+
* @default 'top'
|
|
572
|
+
*/
|
|
573
|
+
labelPosition?: 'top' | 'left' | 'right';
|
|
574
|
+
/**
|
|
575
|
+
* Size of the select
|
|
576
|
+
* @default 'md'
|
|
577
|
+
*/
|
|
578
|
+
size?: 'sm' | 'md' | 'lg';
|
|
579
|
+
/**
|
|
580
|
+
* Whether the select takes full width of its container
|
|
581
|
+
* @default false
|
|
582
|
+
*/
|
|
583
|
+
fullWidth?: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* Error state for form validation
|
|
586
|
+
* @default false
|
|
587
|
+
*/
|
|
588
|
+
error?: boolean;
|
|
589
|
+
/**
|
|
590
|
+
* Error message to display below the field
|
|
591
|
+
*/
|
|
592
|
+
errorMessage?: string;
|
|
593
|
+
/**
|
|
594
|
+
* Helper text to display below the field
|
|
595
|
+
*/
|
|
596
|
+
helperText?: string;
|
|
597
|
+
/**
|
|
598
|
+
* Options for the select dropdown
|
|
599
|
+
* Alternative to providing option elements as children
|
|
600
|
+
*/
|
|
601
|
+
options?: SelectOption[];
|
|
602
|
+
/**
|
|
603
|
+
* Placeholder text (creates a disabled first option)
|
|
604
|
+
*/
|
|
605
|
+
placeholder?: string;
|
|
606
|
+
/**
|
|
607
|
+
* Override aria-label
|
|
608
|
+
*/
|
|
609
|
+
ariaLabel?: string;
|
|
610
|
+
/**
|
|
611
|
+
* ID of element that describes this select
|
|
612
|
+
*/
|
|
613
|
+
ariaDescribedBy?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Additional CSS class names
|
|
616
|
+
*/
|
|
617
|
+
className?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Custom wrapper class name
|
|
620
|
+
*/
|
|
621
|
+
wrapperClassName?: string;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Mac OS 9 style Select component
|
|
625
|
+
*
|
|
626
|
+
* Classic dropdown select with raised bevel effect and optional label.
|
|
627
|
+
*
|
|
628
|
+
* Features:
|
|
629
|
+
* - Classic Mac OS 9 popup menu styling
|
|
630
|
+
* - Label positioning (top/left/right)
|
|
631
|
+
* - Size variants (sm/md/lg)
|
|
632
|
+
* - Error states with messages
|
|
633
|
+
* - Helper text support
|
|
634
|
+
* - Option groups support
|
|
635
|
+
* - Full accessibility with ARIA support
|
|
636
|
+
* - Keyboard navigation
|
|
637
|
+
* - Form integration
|
|
638
|
+
*
|
|
639
|
+
* @example
|
|
640
|
+
* ```tsx
|
|
641
|
+
* // With options prop
|
|
642
|
+
* <Select
|
|
643
|
+
* label="Choose a color"
|
|
644
|
+
* options={[
|
|
645
|
+
* { value: 'red', label: 'Red' },
|
|
646
|
+
* { value: 'blue', label: 'Blue' },
|
|
647
|
+
* { value: 'green', label: 'Green' }
|
|
648
|
+
* ]}
|
|
649
|
+
* placeholder="Select a color..."
|
|
650
|
+
* />
|
|
651
|
+
*
|
|
652
|
+
* // With children
|
|
653
|
+
* <Select label="Country">
|
|
654
|
+
* <option value="us">United States</option>
|
|
655
|
+
* <option value="ca">Canada</option>
|
|
656
|
+
* <option value="mx">Mexico</option>
|
|
657
|
+
* </Select>
|
|
658
|
+
* ```
|
|
659
|
+
*/
|
|
660
|
+
declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLSelectElement>>;
|
|
661
|
+
|
|
662
|
+
interface TabPanelProps {
|
|
663
|
+
/**
|
|
664
|
+
* Label for the tab
|
|
665
|
+
*/
|
|
666
|
+
label: string;
|
|
667
|
+
/**
|
|
668
|
+
* Content of the tab panel
|
|
669
|
+
*/
|
|
670
|
+
children: React$1.ReactNode;
|
|
671
|
+
/**
|
|
672
|
+
* Optional icon to display in the tab
|
|
673
|
+
*/
|
|
674
|
+
icon?: React$1.ReactNode;
|
|
675
|
+
/**
|
|
676
|
+
* Whether this tab is disabled
|
|
677
|
+
* @default false
|
|
678
|
+
*/
|
|
679
|
+
disabled?: boolean;
|
|
680
|
+
/**
|
|
681
|
+
* Value identifier for controlled tabs
|
|
682
|
+
*/
|
|
683
|
+
value?: string;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* TabPanel component - Individual tab content
|
|
687
|
+
* Must be used as a child of Tabs component
|
|
688
|
+
*/
|
|
689
|
+
declare const TabPanel: React$1.FC<TabPanelProps>;
|
|
690
|
+
interface TabsProps {
|
|
691
|
+
/**
|
|
692
|
+
* Tab panels as children
|
|
693
|
+
*/
|
|
694
|
+
children: ReactElement<TabPanelProps> | ReactElement<TabPanelProps>[];
|
|
695
|
+
/**
|
|
696
|
+
* Index of the default active tab (uncontrolled)
|
|
697
|
+
* @default 0
|
|
698
|
+
*/
|
|
699
|
+
defaultActiveTab?: number;
|
|
700
|
+
/**
|
|
701
|
+
* Index of the active tab (controlled)
|
|
702
|
+
*/
|
|
703
|
+
activeTab?: number;
|
|
704
|
+
/**
|
|
705
|
+
* Callback when tab changes
|
|
706
|
+
*/
|
|
707
|
+
onChange?: (index: number, value?: string) => void;
|
|
708
|
+
/**
|
|
709
|
+
* Size of the tabs
|
|
710
|
+
* @default 'md'
|
|
711
|
+
*/
|
|
712
|
+
size?: 'sm' | 'md' | 'lg';
|
|
713
|
+
/**
|
|
714
|
+
* Whether tabs take full width
|
|
715
|
+
* @default false
|
|
716
|
+
*/
|
|
717
|
+
fullWidth?: boolean;
|
|
718
|
+
/**
|
|
719
|
+
* Custom class name for the container
|
|
720
|
+
*/
|
|
721
|
+
className?: string;
|
|
722
|
+
/**
|
|
723
|
+
* Custom class name for the tab list
|
|
724
|
+
*/
|
|
725
|
+
tabListClassName?: string;
|
|
726
|
+
/**
|
|
727
|
+
* Custom class name for the tab panel container
|
|
728
|
+
*/
|
|
729
|
+
panelClassName?: string;
|
|
730
|
+
/**
|
|
731
|
+
* ARIA label for the tab list
|
|
732
|
+
*/
|
|
733
|
+
ariaLabel?: string;
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Mac OS 9 style Tabs component
|
|
737
|
+
*
|
|
738
|
+
* Classic tabbed navigation with raised tab appearance and inset panel.
|
|
739
|
+
*
|
|
740
|
+
* Features:
|
|
741
|
+
* - Classic Mac OS 9 tab styling
|
|
742
|
+
* - Controlled and uncontrolled modes
|
|
743
|
+
* - Keyboard navigation (Arrow keys, Home, End)
|
|
744
|
+
* - Full accessibility with ARIA
|
|
745
|
+
* - Optional icons in tabs
|
|
746
|
+
* - Disabled tab states
|
|
747
|
+
*
|
|
748
|
+
* @example
|
|
749
|
+
* ```tsx
|
|
750
|
+
* // Uncontrolled
|
|
751
|
+
* <Tabs>
|
|
752
|
+
* <TabPanel label="General">
|
|
753
|
+
* <p>General settings content</p>
|
|
754
|
+
* </TabPanel>
|
|
755
|
+
* <TabPanel label="Advanced">
|
|
756
|
+
* <p>Advanced settings content</p>
|
|
757
|
+
* </TabPanel>
|
|
758
|
+
* </Tabs>
|
|
759
|
+
*
|
|
760
|
+
* // Controlled
|
|
761
|
+
* <Tabs activeTab={activeIndex} onChange={setActiveIndex}>
|
|
762
|
+
* <TabPanel label="Tab 1">Content 1</TabPanel>
|
|
763
|
+
* <TabPanel label="Tab 2">Content 2</TabPanel>
|
|
764
|
+
* </Tabs>
|
|
765
|
+
* ```
|
|
766
|
+
*/
|
|
767
|
+
declare const Tabs: React$1.FC<TabsProps>;
|
|
768
|
+
|
|
769
|
+
interface WindowProps {
|
|
770
|
+
/**
|
|
771
|
+
* Window content
|
|
772
|
+
*/
|
|
773
|
+
children: React$1.ReactNode;
|
|
774
|
+
/**
|
|
775
|
+
* Window title (displays in title bar if no titleBar prop provided)
|
|
776
|
+
*/
|
|
777
|
+
title?: string;
|
|
778
|
+
/**
|
|
779
|
+
* Custom title bar component
|
|
780
|
+
* If provided, overrides the default title bar
|
|
781
|
+
*/
|
|
782
|
+
titleBar?: React$1.ReactNode;
|
|
783
|
+
/**
|
|
784
|
+
* Whether window is active/focused
|
|
785
|
+
* @default true
|
|
786
|
+
*/
|
|
787
|
+
active?: boolean;
|
|
788
|
+
/**
|
|
789
|
+
* Width of the window
|
|
790
|
+
* @default 'auto'
|
|
791
|
+
*/
|
|
792
|
+
width?: number | string;
|
|
793
|
+
/**
|
|
794
|
+
* Height of the window
|
|
795
|
+
* @default 'auto'
|
|
796
|
+
*/
|
|
797
|
+
height?: number | string;
|
|
798
|
+
/**
|
|
799
|
+
* Custom class name for the window container
|
|
800
|
+
*/
|
|
801
|
+
className?: string;
|
|
802
|
+
/**
|
|
803
|
+
* Custom class name for the content area
|
|
804
|
+
*/
|
|
805
|
+
contentClassName?: string;
|
|
806
|
+
/**
|
|
807
|
+
* Whether to show window controls (close, minimize, maximize)
|
|
808
|
+
* @default true
|
|
809
|
+
*/
|
|
810
|
+
showControls?: boolean;
|
|
811
|
+
/**
|
|
812
|
+
* Callback when close button is clicked
|
|
813
|
+
*/
|
|
814
|
+
onClose?: () => void;
|
|
815
|
+
/**
|
|
816
|
+
* Callback when minimize button is clicked
|
|
817
|
+
*/
|
|
818
|
+
onMinimize?: () => void;
|
|
819
|
+
/**
|
|
820
|
+
* Callback when maximize button is clicked
|
|
821
|
+
*/
|
|
822
|
+
onMaximize?: () => void;
|
|
823
|
+
/**
|
|
824
|
+
* Whether the window has a resize handle
|
|
825
|
+
* @default false
|
|
826
|
+
*/
|
|
827
|
+
resizable?: boolean;
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Mac OS 9 style Window component
|
|
831
|
+
*
|
|
832
|
+
* Classic window container with title bar and content area.
|
|
833
|
+
*
|
|
834
|
+
* Features:
|
|
835
|
+
* - Classic Mac OS 9 window styling with beveled edges
|
|
836
|
+
* - Optional title bar with window controls
|
|
837
|
+
* - Active/inactive states
|
|
838
|
+
* - Composable with custom TitleBar component
|
|
839
|
+
* - Flexible sizing
|
|
840
|
+
*
|
|
841
|
+
* @example
|
|
842
|
+
* ```tsx
|
|
843
|
+
* // Simple window with title
|
|
844
|
+
* <Window title="My Window">
|
|
845
|
+
* <p>Window content goes here</p>
|
|
846
|
+
* </Window>
|
|
847
|
+
*
|
|
848
|
+
* // Window with custom title bar
|
|
849
|
+
* <Window titleBar={<TitleBar title="Custom" />}>
|
|
850
|
+
* <p>Content</p>
|
|
851
|
+
* </Window>
|
|
852
|
+
*
|
|
853
|
+
* // Window with controls and callbacks
|
|
854
|
+
* <Window
|
|
855
|
+
* title="Document"
|
|
856
|
+
* onClose={() => console.log('Close')}
|
|
857
|
+
* onMinimize={() => console.log('Minimize')}
|
|
858
|
+
* >
|
|
859
|
+
* <p>Content</p>
|
|
860
|
+
* </Window>
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
declare const Window: React$1.ForwardRefExoticComponent<WindowProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
864
|
+
|
|
865
|
+
interface DialogProps extends Omit<WindowProps, 'active'> {
|
|
866
|
+
/**
|
|
867
|
+
* Whether the dialog is open
|
|
868
|
+
* @default false
|
|
869
|
+
*/
|
|
870
|
+
open?: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* Callback when dialog should close
|
|
873
|
+
* Called when backdrop is clicked or Escape is pressed
|
|
874
|
+
*/
|
|
875
|
+
onClose?: () => void;
|
|
876
|
+
/**
|
|
877
|
+
* Whether clicking the backdrop closes the dialog
|
|
878
|
+
* @default true
|
|
879
|
+
*/
|
|
880
|
+
closeOnBackdropClick?: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* Whether pressing Escape closes the dialog
|
|
883
|
+
* @default true
|
|
884
|
+
*/
|
|
885
|
+
closeOnEscape?: boolean;
|
|
886
|
+
/**
|
|
887
|
+
* Custom backdrop className
|
|
888
|
+
*/
|
|
889
|
+
backdropClassName?: string;
|
|
890
|
+
/**
|
|
891
|
+
* Whether to trap focus within the dialog
|
|
892
|
+
* @default true
|
|
893
|
+
*/
|
|
894
|
+
trapFocus?: boolean;
|
|
895
|
+
/**
|
|
896
|
+
* Initial focus element selector or ref
|
|
897
|
+
*/
|
|
898
|
+
initialFocus?: string | React$1.RefObject<HTMLElement>;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Mac OS 9 style Dialog component
|
|
902
|
+
*
|
|
903
|
+
* Modal dialog with backdrop, focus trapping, and keyboard handling.
|
|
904
|
+
* Built on top of the Window component.
|
|
905
|
+
*
|
|
906
|
+
* Features:
|
|
907
|
+
* - Classic Mac OS 9 dialog styling
|
|
908
|
+
* - Modal backdrop with click-to-close
|
|
909
|
+
* - Escape key to close
|
|
910
|
+
* - Focus trapping within dialog
|
|
911
|
+
* - Centered on screen
|
|
912
|
+
* - Prevents body scroll when open
|
|
913
|
+
*
|
|
914
|
+
* @example
|
|
915
|
+
* ```tsx
|
|
916
|
+
* const [open, setOpen] = useState(false);
|
|
917
|
+
*
|
|
918
|
+
* <Dialog
|
|
919
|
+
* open={open}
|
|
920
|
+
* onClose={() => setOpen(false)}
|
|
921
|
+
* title="Confirm"
|
|
922
|
+
* width={350}
|
|
923
|
+
* >
|
|
924
|
+
* <p>Are you sure?</p>
|
|
925
|
+
* <div>
|
|
926
|
+
* <Button onClick={() => setOpen(false)}>Cancel</Button>
|
|
927
|
+
* <Button variant="primary">OK</Button>
|
|
928
|
+
* </div>
|
|
929
|
+
* </Dialog>
|
|
930
|
+
* ```
|
|
931
|
+
*/
|
|
932
|
+
declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
933
|
+
|
|
934
|
+
interface Menu {
|
|
935
|
+
/**
|
|
936
|
+
* Menu label (displayed in the menu bar)
|
|
937
|
+
*/
|
|
938
|
+
label: string;
|
|
939
|
+
/**
|
|
940
|
+
* Menu items (content of the dropdown)
|
|
941
|
+
*/
|
|
942
|
+
items: React$1.ReactNode;
|
|
943
|
+
/**
|
|
944
|
+
* Whether the menu is disabled
|
|
945
|
+
* @default false
|
|
946
|
+
*/
|
|
947
|
+
disabled?: boolean;
|
|
948
|
+
}
|
|
949
|
+
interface MenuBarProps {
|
|
950
|
+
/**
|
|
951
|
+
* Array of menus to display
|
|
952
|
+
*/
|
|
953
|
+
menus: Menu[];
|
|
954
|
+
/**
|
|
955
|
+
* Index of the currently open menu (controlled)
|
|
956
|
+
*/
|
|
957
|
+
openMenuIndex?: number;
|
|
958
|
+
/**
|
|
959
|
+
* Callback when a menu is opened
|
|
960
|
+
*/
|
|
961
|
+
onMenuOpen?: (index: number) => void;
|
|
962
|
+
/**
|
|
963
|
+
* Callback when menus are closed
|
|
964
|
+
*/
|
|
965
|
+
onMenuClose?: () => void;
|
|
966
|
+
/**
|
|
967
|
+
* Custom class name for the menu bar
|
|
968
|
+
*/
|
|
969
|
+
className?: string;
|
|
970
|
+
/**
|
|
971
|
+
* Custom class name for menu dropdowns
|
|
972
|
+
*/
|
|
973
|
+
dropdownClassName?: string;
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Mac OS 9 style MenuBar component
|
|
977
|
+
*
|
|
978
|
+
* Horizontal menu bar with dropdown menus.
|
|
979
|
+
*
|
|
980
|
+
* Features:
|
|
981
|
+
* - Classic Mac OS 9 menu bar styling
|
|
982
|
+
* - Horizontal menu layout
|
|
983
|
+
* - Dropdown menus on click
|
|
984
|
+
* - Keyboard navigation (Left/Right for menus, Up/Down for items)
|
|
985
|
+
* - Click outside to close
|
|
986
|
+
* - Escape key to close
|
|
987
|
+
* - Controlled state (consumers manage open/closed)
|
|
988
|
+
* - Disabled menu support
|
|
989
|
+
*
|
|
990
|
+
* @example
|
|
991
|
+
* ```tsx
|
|
992
|
+
* const [openMenu, setOpenMenu] = useState<number | undefined>();
|
|
993
|
+
*
|
|
994
|
+
* <MenuBar
|
|
995
|
+
* openMenuIndex={openMenu}
|
|
996
|
+
* onMenuOpen={setOpenMenu}
|
|
997
|
+
* onMenuClose={() => setOpenMenu(undefined)}
|
|
998
|
+
* menus={[
|
|
999
|
+
* {
|
|
1000
|
+
* label: 'File',
|
|
1001
|
+
* items: (
|
|
1002
|
+
* <>
|
|
1003
|
+
* <MenuItem label="Open..." shortcut="⌘O" onClick={() => {}} />
|
|
1004
|
+
* <MenuItem label="Save" shortcut="⌘S" onClick={() => {}} />
|
|
1005
|
+
* </>
|
|
1006
|
+
* ),
|
|
1007
|
+
* },
|
|
1008
|
+
* {
|
|
1009
|
+
* label: 'Edit',
|
|
1010
|
+
* items: (
|
|
1011
|
+
* <>
|
|
1012
|
+
* <MenuItem label="Undo" shortcut="⌘Z" onClick={() => {}} />
|
|
1013
|
+
* <MenuItem label="Redo" shortcut="⇧⌘Z" onClick={() => {}} />
|
|
1014
|
+
* </>
|
|
1015
|
+
* ),
|
|
1016
|
+
* },
|
|
1017
|
+
* ]}
|
|
1018
|
+
* />
|
|
1019
|
+
* ```
|
|
1020
|
+
*/
|
|
1021
|
+
declare const MenuBar: React$1.ForwardRefExoticComponent<MenuBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1022
|
+
|
|
1023
|
+
interface MenuItemProps {
|
|
1024
|
+
/**
|
|
1025
|
+
* Menu item label text
|
|
1026
|
+
*/
|
|
1027
|
+
label: string;
|
|
1028
|
+
/**
|
|
1029
|
+
* Optional keyboard shortcut to display (e.g., "⌘S", "Ctrl+O")
|
|
1030
|
+
*/
|
|
1031
|
+
shortcut?: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* Whether the menu item is disabled
|
|
1034
|
+
* @default false
|
|
1035
|
+
*/
|
|
1036
|
+
disabled?: boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* Whether the menu item is selected/active
|
|
1039
|
+
* @default false
|
|
1040
|
+
*/
|
|
1041
|
+
selected?: boolean;
|
|
1042
|
+
/**
|
|
1043
|
+
* Whether the menu item has a separator after it
|
|
1044
|
+
* @default false
|
|
1045
|
+
*/
|
|
1046
|
+
separator?: boolean;
|
|
1047
|
+
/**
|
|
1048
|
+
* Whether the menu item has a checkmark (for toggle items)
|
|
1049
|
+
* @default false
|
|
1050
|
+
*/
|
|
1051
|
+
checked?: boolean;
|
|
1052
|
+
/**
|
|
1053
|
+
* Optional icon to display before the label
|
|
1054
|
+
*/
|
|
1055
|
+
icon?: React$1.ReactNode;
|
|
1056
|
+
/**
|
|
1057
|
+
* Callback when menu item is clicked
|
|
1058
|
+
*/
|
|
1059
|
+
onClick?: (event: React$1.MouseEvent<HTMLButtonElement>) => void;
|
|
1060
|
+
/**
|
|
1061
|
+
* Callback when menu item is focused
|
|
1062
|
+
*/
|
|
1063
|
+
onFocus?: (event: React$1.FocusEvent<HTMLButtonElement>) => void;
|
|
1064
|
+
/**
|
|
1065
|
+
* Callback when menu item loses focus
|
|
1066
|
+
*/
|
|
1067
|
+
onBlur?: (event: React$1.FocusEvent<HTMLButtonElement>) => void;
|
|
1068
|
+
/**
|
|
1069
|
+
* Custom class name for the menu item
|
|
1070
|
+
*/
|
|
1071
|
+
className?: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* Whether the item has a submenu indicator (arrow)
|
|
1074
|
+
* @default false
|
|
1075
|
+
*/
|
|
1076
|
+
hasSubmenu?: boolean;
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Mac OS 9 style MenuItem component
|
|
1080
|
+
*
|
|
1081
|
+
* Individual menu item for use within MenuBar or dropdown menus.
|
|
1082
|
+
*
|
|
1083
|
+
* Features:
|
|
1084
|
+
* - Classic Mac OS 9 menu item styling
|
|
1085
|
+
* - Disabled state support
|
|
1086
|
+
* - Keyboard shortcut display
|
|
1087
|
+
* - Checkmark support for toggle items
|
|
1088
|
+
* - Separator support
|
|
1089
|
+
* - Selected/active state
|
|
1090
|
+
* - Icon support
|
|
1091
|
+
* - Submenu indicator
|
|
1092
|
+
* - Full keyboard and mouse support
|
|
1093
|
+
*
|
|
1094
|
+
* @example
|
|
1095
|
+
* ```tsx
|
|
1096
|
+
* // Basic menu item
|
|
1097
|
+
* <MenuItem label="Open..." onClick={() => console.log('Open')} />
|
|
1098
|
+
*
|
|
1099
|
+
* // With keyboard shortcut
|
|
1100
|
+
* <MenuItem label="Save" shortcut="⌘S" onClick={() => console.log('Save')} />
|
|
1101
|
+
*
|
|
1102
|
+
* // Disabled item
|
|
1103
|
+
* <MenuItem label="Undo" disabled />
|
|
1104
|
+
*
|
|
1105
|
+
* // Checked item (toggle)
|
|
1106
|
+
* <MenuItem label="Show Grid" checked onClick={() => console.log('Toggle')} />
|
|
1107
|
+
*
|
|
1108
|
+
* // With separator
|
|
1109
|
+
* <MenuItem label="Preferences..." separator onClick={() => console.log('Prefs')} />
|
|
1110
|
+
*
|
|
1111
|
+
* // With submenu indicator
|
|
1112
|
+
* <MenuItem label="Recent Files" hasSubmenu />
|
|
1113
|
+
* ```
|
|
1114
|
+
*/
|
|
1115
|
+
declare const MenuItem: React$1.ForwardRefExoticComponent<MenuItemProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1116
|
+
|
|
1117
|
+
interface ScrollbarProps {
|
|
1118
|
+
/**
|
|
1119
|
+
* Scrollbar orientation
|
|
1120
|
+
* @default 'vertical'
|
|
1121
|
+
*/
|
|
1122
|
+
orientation?: 'vertical' | 'horizontal';
|
|
1123
|
+
/**
|
|
1124
|
+
* Current scroll position (0-1)
|
|
1125
|
+
*/
|
|
1126
|
+
value?: number;
|
|
1127
|
+
/**
|
|
1128
|
+
* Viewport size relative to content size (0-1)
|
|
1129
|
+
* Used to calculate thumb size
|
|
1130
|
+
*/
|
|
1131
|
+
viewportRatio?: number;
|
|
1132
|
+
/**
|
|
1133
|
+
* Callback when scroll position changes
|
|
1134
|
+
*/
|
|
1135
|
+
onChange?: (value: number) => void;
|
|
1136
|
+
/**
|
|
1137
|
+
* Additional CSS class names
|
|
1138
|
+
*/
|
|
1139
|
+
className?: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* Whether scrollbar is disabled
|
|
1142
|
+
* @default false
|
|
1143
|
+
*/
|
|
1144
|
+
disabled?: boolean;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Mac OS 9 style Scrollbar component
|
|
1148
|
+
*
|
|
1149
|
+
* Classic scrollbar with arrow buttons and draggable thumb.
|
|
1150
|
+
* Can be used standalone or integrated with scrollable content.
|
|
1151
|
+
*
|
|
1152
|
+
* @example
|
|
1153
|
+
* ```tsx
|
|
1154
|
+
* <Scrollbar
|
|
1155
|
+
* orientation="vertical"
|
|
1156
|
+
* value={0.5}
|
|
1157
|
+
* viewportRatio={0.3}
|
|
1158
|
+
* onChange={(value) => console.log('Scroll position:', value)}
|
|
1159
|
+
* />
|
|
1160
|
+
* ```
|
|
1161
|
+
*/
|
|
1162
|
+
declare const Scrollbar: React$1.ForwardRefExoticComponent<ScrollbarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1163
|
+
|
|
1164
|
+
interface ListColumn {
|
|
1165
|
+
/**
|
|
1166
|
+
* Column key/identifier
|
|
1167
|
+
*/
|
|
1168
|
+
key: string;
|
|
1169
|
+
/**
|
|
1170
|
+
* Column header label
|
|
1171
|
+
*/
|
|
1172
|
+
label: string;
|
|
1173
|
+
/**
|
|
1174
|
+
* Column width (px or percentage)
|
|
1175
|
+
* @default 'auto'
|
|
1176
|
+
*/
|
|
1177
|
+
width?: number | string;
|
|
1178
|
+
/**
|
|
1179
|
+
* Whether column is sortable
|
|
1180
|
+
* @default true
|
|
1181
|
+
*/
|
|
1182
|
+
sortable?: boolean;
|
|
1183
|
+
}
|
|
1184
|
+
interface ListItem {
|
|
1185
|
+
/**
|
|
1186
|
+
* Unique item ID
|
|
1187
|
+
*/
|
|
1188
|
+
id: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* Item data - keys should match column keys
|
|
1191
|
+
*/
|
|
1192
|
+
[key: string]: any;
|
|
1193
|
+
/**
|
|
1194
|
+
* Optional icon to display
|
|
1195
|
+
*/
|
|
1196
|
+
icon?: React$1.ReactNode;
|
|
1197
|
+
}
|
|
1198
|
+
interface ListViewProps {
|
|
1199
|
+
/**
|
|
1200
|
+
* Column definitions
|
|
1201
|
+
*/
|
|
1202
|
+
columns: ListColumn[];
|
|
1203
|
+
/**
|
|
1204
|
+
* List items
|
|
1205
|
+
*/
|
|
1206
|
+
items: ListItem[];
|
|
1207
|
+
/**
|
|
1208
|
+
* Selected item IDs
|
|
1209
|
+
*/
|
|
1210
|
+
selectedIds?: string[];
|
|
1211
|
+
/**
|
|
1212
|
+
* Callback when selection changes
|
|
1213
|
+
*/
|
|
1214
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
1215
|
+
/**
|
|
1216
|
+
* Callback when item is double-clicked
|
|
1217
|
+
*/
|
|
1218
|
+
onItemOpen?: (item: ListItem) => void;
|
|
1219
|
+
/**
|
|
1220
|
+
* Callback when column is clicked for sorting
|
|
1221
|
+
*/
|
|
1222
|
+
onSort?: (columnKey: string, direction: 'asc' | 'desc') => void;
|
|
1223
|
+
/**
|
|
1224
|
+
* Additional CSS class names
|
|
1225
|
+
*/
|
|
1226
|
+
className?: string;
|
|
1227
|
+
/**
|
|
1228
|
+
* Height of the list view
|
|
1229
|
+
*/
|
|
1230
|
+
height?: number | string;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* Mac OS 9 style ListView component
|
|
1234
|
+
*
|
|
1235
|
+
* Multi-column list with sortable headers and row selection.
|
|
1236
|
+
* Similar to Finder list view.
|
|
1237
|
+
*
|
|
1238
|
+
* @example
|
|
1239
|
+
* ```tsx
|
|
1240
|
+
* <ListView
|
|
1241
|
+
* columns={[
|
|
1242
|
+
* { key: 'name', label: 'Name' },
|
|
1243
|
+
* { key: 'modified', label: 'Date Modified' },
|
|
1244
|
+
* { key: 'size', label: 'Size' }
|
|
1245
|
+
* ]}
|
|
1246
|
+
* items={[
|
|
1247
|
+
* { id: '1', name: 'Document.txt', modified: 'Today', size: '2 KB' },
|
|
1248
|
+
* { id: '2', name: 'Images', modified: 'Yesterday', size: '--' }
|
|
1249
|
+
* ]}
|
|
1250
|
+
* selectedIds={['1']}
|
|
1251
|
+
* onSelectionChange={(ids) => console.log('Selected:', ids)}
|
|
1252
|
+
* />
|
|
1253
|
+
* ```
|
|
1254
|
+
*/
|
|
1255
|
+
declare const ListView: React$1.ForwardRefExoticComponent<ListViewProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1256
|
+
|
|
1257
|
+
interface FolderListProps extends Omit<WindowProps, 'children'> {
|
|
1258
|
+
/**
|
|
1259
|
+
* Column definitions for the list
|
|
1260
|
+
* @default [{ key: 'name', label: 'Name' }, { key: 'modified', label: 'Date Modified' }, { key: 'size', label: 'Size' }]
|
|
1261
|
+
*/
|
|
1262
|
+
columns?: ListColumn[];
|
|
1263
|
+
/**
|
|
1264
|
+
* Items to display in the list
|
|
1265
|
+
*/
|
|
1266
|
+
items: ListItem[];
|
|
1267
|
+
/**
|
|
1268
|
+
* Selected item IDs
|
|
1269
|
+
*/
|
|
1270
|
+
selectedIds?: string[];
|
|
1271
|
+
/**
|
|
1272
|
+
* Callback when selection changes
|
|
1273
|
+
*/
|
|
1274
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
1275
|
+
/**
|
|
1276
|
+
* Callback when item is double-clicked (opened)
|
|
1277
|
+
*/
|
|
1278
|
+
onItemOpen?: (item: ListItem) => void;
|
|
1279
|
+
/**
|
|
1280
|
+
* Callback when column header is clicked for sorting
|
|
1281
|
+
*/
|
|
1282
|
+
onSort?: (columnKey: string, direction: 'asc' | 'desc') => void;
|
|
1283
|
+
/**
|
|
1284
|
+
* Height of the list view area
|
|
1285
|
+
* @default 400
|
|
1286
|
+
*/
|
|
1287
|
+
listHeight?: number | string;
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Mac OS 9 style FolderList component
|
|
1291
|
+
*
|
|
1292
|
+
* Window with integrated ListView for browsing files and folders.
|
|
1293
|
+
* Similar to Finder list view in Mac OS 9.
|
|
1294
|
+
*
|
|
1295
|
+
* @example
|
|
1296
|
+
* ```tsx
|
|
1297
|
+
* <FolderList
|
|
1298
|
+
* title="My Documents"
|
|
1299
|
+
* items={[
|
|
1300
|
+
* { id: '1', name: 'Document.txt', modified: 'Today', size: '2 KB', icon: <FileIcon /> },
|
|
1301
|
+
* { id: '2', name: 'Images', modified: 'Yesterday', size: '--', icon: <FolderIcon /> }
|
|
1302
|
+
* ]}
|
|
1303
|
+
* selectedIds={['1']}
|
|
1304
|
+
* onSelectionChange={(ids) => console.log('Selected:', ids)}
|
|
1305
|
+
* onItemOpen={(item) => console.log('Open:', item.name)}
|
|
1306
|
+
* />
|
|
1307
|
+
* ```
|
|
1308
|
+
*/
|
|
1309
|
+
declare const FolderList: React$1.ForwardRefExoticComponent<FolderListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1310
|
+
|
|
1311
|
+
declare const SaveIcon: React$1.FC;
|
|
1312
|
+
declare const FolderIcon: React$1.FC;
|
|
1313
|
+
declare const CloseIcon: React$1.FC;
|
|
1314
|
+
declare const ArrowRightIcon: React$1.FC;
|
|
1315
|
+
declare const ArrowLeftIcon: React$1.FC;
|
|
1316
|
+
declare const DownloadIcon: React$1.FC;
|
|
1317
|
+
declare const LinkIcon: React$1.FC;
|
|
1318
|
+
declare const MailIcon: React$1.FC;
|
|
1319
|
+
declare const PrintIcon: React$1.FC;
|
|
1320
|
+
declare const TrashIcon: React$1.FC;
|
|
1321
|
+
declare const SearchIcon: React$1.FC;
|
|
1322
|
+
declare const UserIcon: React$1.FC;
|
|
1323
|
+
declare const LockIcon: React$1.FC;
|
|
1324
|
+
declare const CalendarIcon: React$1.FC;
|
|
1325
|
+
declare const DocumentIcon: React$1.FC;
|
|
1326
|
+
declare const FileIcon: React$1.FC;
|
|
1327
|
+
declare const ImageIcon: React$1.FC;
|
|
1328
|
+
declare const MusicIcon: React$1.FC;
|
|
1329
|
+
declare const VideoIcon: React$1.FC;
|
|
1330
|
+
declare const SettingsIcon: React$1.FC;
|
|
1331
|
+
declare const HomeIcon: React$1.FC;
|
|
1332
|
+
declare const StarIcon: React$1.FC;
|
|
1333
|
+
declare const HeartIcon: React$1.FC;
|
|
1334
|
+
declare const InfoIcon: React$1.FC;
|
|
1335
|
+
declare const WarningIcon: React$1.FC;
|
|
1336
|
+
declare const ErrorIcon: React$1.FC;
|
|
1337
|
+
declare const CheckIcon: React$1.FC;
|
|
1338
|
+
declare const PlusIcon: React$1.FC;
|
|
1339
|
+
declare const MinusIcon: React$1.FC;
|
|
1340
|
+
declare const RefreshIcon: React$1.FC;
|
|
1341
|
+
declare const MenuIcon: React$1.FC;
|
|
1342
|
+
declare const MoreIcon: React$1.FC;
|
|
1343
|
+
declare const ChevronUpIcon: React$1.FC;
|
|
1344
|
+
declare const ChevronDownIcon: React$1.FC;
|
|
1345
|
+
declare const EyeIcon: React$1.FC;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Color tokens based on Mac OS 9 grayscale palette
|
|
1349
|
+
* Extracted from Figma styles and component analysis
|
|
1350
|
+
*/
|
|
1351
|
+
declare const colors: {
|
|
1352
|
+
readonly gray100: "#FFFFFF";
|
|
1353
|
+
readonly gray200: "#EEEEEE";
|
|
1354
|
+
readonly gray300: "#DDDDDD";
|
|
1355
|
+
readonly gray400: "#CCCCCC";
|
|
1356
|
+
readonly gray500: "#999999";
|
|
1357
|
+
readonly gray600: "#666666";
|
|
1358
|
+
readonly gray700: "#4D4D4D";
|
|
1359
|
+
readonly gray800: "#333333";
|
|
1360
|
+
readonly gray900: "#262626";
|
|
1361
|
+
readonly lavender: "#CCCCFF";
|
|
1362
|
+
readonly azul: "#0066CC";
|
|
1363
|
+
readonly linkRed: "#CC0000";
|
|
1364
|
+
readonly background: "#EEEEEE";
|
|
1365
|
+
readonly foreground: "#262626";
|
|
1366
|
+
readonly border: "#262626";
|
|
1367
|
+
readonly text: "#262626";
|
|
1368
|
+
readonly textInverse: "#FFFFFF";
|
|
1369
|
+
readonly surface: "#EEEEEE";
|
|
1370
|
+
readonly surfaceInset: "#FFFFFF";
|
|
1371
|
+
readonly black: "#262626";
|
|
1372
|
+
readonly white: "#FFFFFF";
|
|
1373
|
+
readonly focus: "#000080";
|
|
1374
|
+
readonly error: "#CC0000";
|
|
1375
|
+
readonly success: "#008000";
|
|
1376
|
+
readonly warning: "#FF8C00";
|
|
1377
|
+
};
|
|
1378
|
+
/**
|
|
1379
|
+
* Typography tokens
|
|
1380
|
+
* Based on Figma text styles and authentic Mac OS 9 system fonts
|
|
1381
|
+
*
|
|
1382
|
+
* Mac OS 9 Typography:
|
|
1383
|
+
* - Charcoal: Primary system UI font (menus, buttons, dialogs)
|
|
1384
|
+
* - Geneva: Body text and secondary UI elements
|
|
1385
|
+
* - Chicago: Classic Mac system font (menu bar, earlier versions)
|
|
1386
|
+
* - Apple Garamond: Headlines and editorial content
|
|
1387
|
+
*/
|
|
1388
|
+
declare const typography: {
|
|
1389
|
+
readonly fontFamily: {
|
|
1390
|
+
readonly system: "Charcoal, \"Charcoal CY\", Chicago, \"Chicago Classic\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif";
|
|
1391
|
+
readonly body: "Geneva, \"Geneva CY\", \"Lucida Grande\", \"Lucida Sans Unicode\", sans-serif";
|
|
1392
|
+
readonly display: "\"Apple Garamond Light\", \"Apple Garamond\", Garamond, Georgia, serif";
|
|
1393
|
+
readonly chicago: "Chicago, \"Chicago Classic\", \"Charcoal CY\", Charcoal, monospace";
|
|
1394
|
+
readonly mono: "Monaco, \"Monaco CY\", \"SF Mono\", \"Courier New\", Courier, monospace";
|
|
1395
|
+
};
|
|
1396
|
+
readonly fontSize: {
|
|
1397
|
+
readonly xs: "9px";
|
|
1398
|
+
readonly sm: "10px";
|
|
1399
|
+
readonly md: "12px";
|
|
1400
|
+
readonly lg: "13px";
|
|
1401
|
+
readonly xl: "14px";
|
|
1402
|
+
readonly '2xl': "16px";
|
|
1403
|
+
readonly '3xl': "18px";
|
|
1404
|
+
readonly '4xl': "20px";
|
|
1405
|
+
readonly '5xl': "24px";
|
|
1406
|
+
};
|
|
1407
|
+
readonly fontWeight: {
|
|
1408
|
+
readonly normal: 700;
|
|
1409
|
+
readonly medium: 700;
|
|
1410
|
+
readonly semibold: 700;
|
|
1411
|
+
readonly bold: 700;
|
|
1412
|
+
readonly light: 400;
|
|
1413
|
+
};
|
|
1414
|
+
readonly lineHeight: {
|
|
1415
|
+
readonly tight: 1.2;
|
|
1416
|
+
readonly snug: 1.3;
|
|
1417
|
+
readonly normal: 1.4;
|
|
1418
|
+
readonly relaxed: 1.5;
|
|
1419
|
+
readonly loose: 1.6;
|
|
1420
|
+
};
|
|
1421
|
+
readonly letterSpacing: {
|
|
1422
|
+
readonly tighter: "-0.02em";
|
|
1423
|
+
readonly tight: "-0.01em";
|
|
1424
|
+
readonly normal: "0";
|
|
1425
|
+
readonly wide: "0.01em";
|
|
1426
|
+
readonly wider: "0.02em";
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
/**
|
|
1430
|
+
* Spacing tokens based on Mac OS 9 measurements
|
|
1431
|
+
* Mac OS 9 used tight spacing; using 2px as base unit
|
|
1432
|
+
*/
|
|
1433
|
+
declare const spacing: {
|
|
1434
|
+
readonly '0': "0";
|
|
1435
|
+
readonly px: "1px";
|
|
1436
|
+
readonly '0.5': "2px";
|
|
1437
|
+
readonly '1': "4px";
|
|
1438
|
+
readonly '1.5': "6px";
|
|
1439
|
+
readonly '2': "8px";
|
|
1440
|
+
readonly '2.5': "10px";
|
|
1441
|
+
readonly '3': "12px";
|
|
1442
|
+
readonly '4': "16px";
|
|
1443
|
+
readonly '5': "20px";
|
|
1444
|
+
readonly '6': "24px";
|
|
1445
|
+
readonly '8': "32px";
|
|
1446
|
+
readonly '10': "40px";
|
|
1447
|
+
readonly '12': "48px";
|
|
1448
|
+
readonly '16': "64px";
|
|
1449
|
+
readonly xs: "2px";
|
|
1450
|
+
readonly sm: "4px";
|
|
1451
|
+
readonly md: "8px";
|
|
1452
|
+
readonly lg: "12px";
|
|
1453
|
+
readonly xl: "16px";
|
|
1454
|
+
readonly '2xl': "24px";
|
|
1455
|
+
readonly '3xl': "32px";
|
|
1456
|
+
};
|
|
1457
|
+
/**
|
|
1458
|
+
* Shadow tokens for Mac OS 9 bevel effects
|
|
1459
|
+
* Exact values from Figma Window Shadow effect (67:95038)
|
|
1460
|
+
*
|
|
1461
|
+
* Classic 3-layer bevel:
|
|
1462
|
+
* 1. Hard drop shadow (2px, 2px, 0 blur) - creates depth
|
|
1463
|
+
* 2. Top-left highlight (light inner shadow)
|
|
1464
|
+
* 3. Bottom-right shadow (dark inner shadow)
|
|
1465
|
+
*/
|
|
1466
|
+
declare const shadows: {
|
|
1467
|
+
readonly bevel: "inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 rgba(38, 38, 38, 0.4), 2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1468
|
+
readonly inset: "inset -2px -2px 0 rgba(255, 255, 255, 0.6), inset 2px 2px 0 rgba(38, 38, 38, 0.4), 2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1469
|
+
readonly dropShadow: "2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1470
|
+
readonly innerHighlight: "inset 2px 2px 0 rgba(255, 255, 255, 0.6)";
|
|
1471
|
+
readonly innerShadow: "inset -2px -2px 0 rgba(38, 38, 38, 0.4)";
|
|
1472
|
+
readonly raised: {
|
|
1473
|
+
readonly highlight: "inset 2px 2px 0 rgba(255, 255, 255, 0.6)";
|
|
1474
|
+
readonly shadow: "inset -2px -2px 0 rgba(38, 38, 38, 0.4)";
|
|
1475
|
+
readonly full: "inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 rgba(38, 38, 38, 0.4), 2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1476
|
+
};
|
|
1477
|
+
readonly none: "none";
|
|
1478
|
+
};
|
|
1479
|
+
/**
|
|
1480
|
+
* Border tokens
|
|
1481
|
+
* Mac OS 9 used consistent 1px borders with sharp corners
|
|
1482
|
+
*/
|
|
1483
|
+
declare const borders: {
|
|
1484
|
+
readonly width: {
|
|
1485
|
+
readonly none: "0";
|
|
1486
|
+
readonly thin: "1px";
|
|
1487
|
+
readonly medium: "2px";
|
|
1488
|
+
readonly thick: "3px";
|
|
1489
|
+
};
|
|
1490
|
+
readonly style: {
|
|
1491
|
+
readonly solid: "solid";
|
|
1492
|
+
readonly dashed: "dashed";
|
|
1493
|
+
readonly dotted: "dotted";
|
|
1494
|
+
readonly none: "none";
|
|
1495
|
+
};
|
|
1496
|
+
readonly radius: {
|
|
1497
|
+
readonly none: "0";
|
|
1498
|
+
readonly sm: "0";
|
|
1499
|
+
readonly md: "0";
|
|
1500
|
+
readonly lg: "0";
|
|
1501
|
+
readonly full: "0";
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
/**
|
|
1505
|
+
* Z-index scale for layering
|
|
1506
|
+
*/
|
|
1507
|
+
declare const zIndex: {
|
|
1508
|
+
readonly base: 0;
|
|
1509
|
+
readonly dropdown: 1000;
|
|
1510
|
+
readonly sticky: 1100;
|
|
1511
|
+
readonly modal: 1200;
|
|
1512
|
+
readonly popover: 1300;
|
|
1513
|
+
readonly tooltip: 1400;
|
|
1514
|
+
};
|
|
1515
|
+
/**
|
|
1516
|
+
* Transition/Animation tokens
|
|
1517
|
+
* Mac OS 9 had minimal animations, but we add subtle ones for modern feel
|
|
1518
|
+
*/
|
|
1519
|
+
declare const transitions: {
|
|
1520
|
+
readonly duration: {
|
|
1521
|
+
readonly instant: "0ms";
|
|
1522
|
+
readonly fast: "100ms";
|
|
1523
|
+
readonly normal: "200ms";
|
|
1524
|
+
readonly slow: "300ms";
|
|
1525
|
+
};
|
|
1526
|
+
readonly timing: {
|
|
1527
|
+
readonly linear: "linear";
|
|
1528
|
+
readonly easeIn: "cubic-bezier(0.4, 0, 1, 1)";
|
|
1529
|
+
readonly easeOut: "cubic-bezier(0, 0, 0.2, 1)";
|
|
1530
|
+
readonly easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
declare const tokens: {
|
|
1534
|
+
readonly colors: {
|
|
1535
|
+
readonly gray100: "#FFFFFF";
|
|
1536
|
+
readonly gray200: "#EEEEEE";
|
|
1537
|
+
readonly gray300: "#DDDDDD";
|
|
1538
|
+
readonly gray400: "#CCCCCC";
|
|
1539
|
+
readonly gray500: "#999999";
|
|
1540
|
+
readonly gray600: "#666666";
|
|
1541
|
+
readonly gray700: "#4D4D4D";
|
|
1542
|
+
readonly gray800: "#333333";
|
|
1543
|
+
readonly gray900: "#262626";
|
|
1544
|
+
readonly lavender: "#CCCCFF";
|
|
1545
|
+
readonly azul: "#0066CC";
|
|
1546
|
+
readonly linkRed: "#CC0000";
|
|
1547
|
+
readonly background: "#EEEEEE";
|
|
1548
|
+
readonly foreground: "#262626";
|
|
1549
|
+
readonly border: "#262626";
|
|
1550
|
+
readonly text: "#262626";
|
|
1551
|
+
readonly textInverse: "#FFFFFF";
|
|
1552
|
+
readonly surface: "#EEEEEE";
|
|
1553
|
+
readonly surfaceInset: "#FFFFFF";
|
|
1554
|
+
readonly black: "#262626";
|
|
1555
|
+
readonly white: "#FFFFFF";
|
|
1556
|
+
readonly focus: "#000080";
|
|
1557
|
+
readonly error: "#CC0000";
|
|
1558
|
+
readonly success: "#008000";
|
|
1559
|
+
readonly warning: "#FF8C00";
|
|
1560
|
+
};
|
|
1561
|
+
readonly typography: {
|
|
1562
|
+
readonly fontFamily: {
|
|
1563
|
+
readonly system: "Charcoal, \"Charcoal CY\", Chicago, \"Chicago Classic\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif";
|
|
1564
|
+
readonly body: "Geneva, \"Geneva CY\", \"Lucida Grande\", \"Lucida Sans Unicode\", sans-serif";
|
|
1565
|
+
readonly display: "\"Apple Garamond Light\", \"Apple Garamond\", Garamond, Georgia, serif";
|
|
1566
|
+
readonly chicago: "Chicago, \"Chicago Classic\", \"Charcoal CY\", Charcoal, monospace";
|
|
1567
|
+
readonly mono: "Monaco, \"Monaco CY\", \"SF Mono\", \"Courier New\", Courier, monospace";
|
|
1568
|
+
};
|
|
1569
|
+
readonly fontSize: {
|
|
1570
|
+
readonly xs: "9px";
|
|
1571
|
+
readonly sm: "10px";
|
|
1572
|
+
readonly md: "12px";
|
|
1573
|
+
readonly lg: "13px";
|
|
1574
|
+
readonly xl: "14px";
|
|
1575
|
+
readonly '2xl': "16px";
|
|
1576
|
+
readonly '3xl': "18px";
|
|
1577
|
+
readonly '4xl': "20px";
|
|
1578
|
+
readonly '5xl': "24px";
|
|
1579
|
+
};
|
|
1580
|
+
readonly fontWeight: {
|
|
1581
|
+
readonly normal: 700;
|
|
1582
|
+
readonly medium: 700;
|
|
1583
|
+
readonly semibold: 700;
|
|
1584
|
+
readonly bold: 700;
|
|
1585
|
+
readonly light: 400;
|
|
1586
|
+
};
|
|
1587
|
+
readonly lineHeight: {
|
|
1588
|
+
readonly tight: 1.2;
|
|
1589
|
+
readonly snug: 1.3;
|
|
1590
|
+
readonly normal: 1.4;
|
|
1591
|
+
readonly relaxed: 1.5;
|
|
1592
|
+
readonly loose: 1.6;
|
|
1593
|
+
};
|
|
1594
|
+
readonly letterSpacing: {
|
|
1595
|
+
readonly tighter: "-0.02em";
|
|
1596
|
+
readonly tight: "-0.01em";
|
|
1597
|
+
readonly normal: "0";
|
|
1598
|
+
readonly wide: "0.01em";
|
|
1599
|
+
readonly wider: "0.02em";
|
|
1600
|
+
};
|
|
1601
|
+
};
|
|
1602
|
+
readonly spacing: {
|
|
1603
|
+
readonly '0': "0";
|
|
1604
|
+
readonly px: "1px";
|
|
1605
|
+
readonly '0.5': "2px";
|
|
1606
|
+
readonly '1': "4px";
|
|
1607
|
+
readonly '1.5': "6px";
|
|
1608
|
+
readonly '2': "8px";
|
|
1609
|
+
readonly '2.5': "10px";
|
|
1610
|
+
readonly '3': "12px";
|
|
1611
|
+
readonly '4': "16px";
|
|
1612
|
+
readonly '5': "20px";
|
|
1613
|
+
readonly '6': "24px";
|
|
1614
|
+
readonly '8': "32px";
|
|
1615
|
+
readonly '10': "40px";
|
|
1616
|
+
readonly '12': "48px";
|
|
1617
|
+
readonly '16': "64px";
|
|
1618
|
+
readonly xs: "2px";
|
|
1619
|
+
readonly sm: "4px";
|
|
1620
|
+
readonly md: "8px";
|
|
1621
|
+
readonly lg: "12px";
|
|
1622
|
+
readonly xl: "16px";
|
|
1623
|
+
readonly '2xl': "24px";
|
|
1624
|
+
readonly '3xl': "32px";
|
|
1625
|
+
};
|
|
1626
|
+
readonly borders: {
|
|
1627
|
+
readonly width: {
|
|
1628
|
+
readonly none: "0";
|
|
1629
|
+
readonly thin: "1px";
|
|
1630
|
+
readonly medium: "2px";
|
|
1631
|
+
readonly thick: "3px";
|
|
1632
|
+
};
|
|
1633
|
+
readonly style: {
|
|
1634
|
+
readonly solid: "solid";
|
|
1635
|
+
readonly dashed: "dashed";
|
|
1636
|
+
readonly dotted: "dotted";
|
|
1637
|
+
readonly none: "none";
|
|
1638
|
+
};
|
|
1639
|
+
readonly radius: {
|
|
1640
|
+
readonly none: "0";
|
|
1641
|
+
readonly sm: "0";
|
|
1642
|
+
readonly md: "0";
|
|
1643
|
+
readonly lg: "0";
|
|
1644
|
+
readonly full: "0";
|
|
1645
|
+
};
|
|
1646
|
+
};
|
|
1647
|
+
readonly shadows: {
|
|
1648
|
+
readonly bevel: "inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 rgba(38, 38, 38, 0.4), 2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1649
|
+
readonly inset: "inset -2px -2px 0 rgba(255, 255, 255, 0.6), inset 2px 2px 0 rgba(38, 38, 38, 0.4), 2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1650
|
+
readonly dropShadow: "2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1651
|
+
readonly innerHighlight: "inset 2px 2px 0 rgba(255, 255, 255, 0.6)";
|
|
1652
|
+
readonly innerShadow: "inset -2px -2px 0 rgba(38, 38, 38, 0.4)";
|
|
1653
|
+
readonly raised: {
|
|
1654
|
+
readonly highlight: "inset 2px 2px 0 rgba(255, 255, 255, 0.6)";
|
|
1655
|
+
readonly shadow: "inset -2px -2px 0 rgba(38, 38, 38, 0.4)";
|
|
1656
|
+
readonly full: "inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 rgba(38, 38, 38, 0.4), 2px 2px 0 rgba(38, 38, 38, 1)";
|
|
1657
|
+
};
|
|
1658
|
+
readonly none: "none";
|
|
1659
|
+
};
|
|
1660
|
+
readonly zIndex: {
|
|
1661
|
+
readonly base: 0;
|
|
1662
|
+
readonly dropdown: 1000;
|
|
1663
|
+
readonly sticky: 1100;
|
|
1664
|
+
readonly modal: 1200;
|
|
1665
|
+
readonly popover: 1300;
|
|
1666
|
+
readonly tooltip: 1400;
|
|
1667
|
+
};
|
|
1668
|
+
readonly transitions: {
|
|
1669
|
+
readonly duration: {
|
|
1670
|
+
readonly instant: "0ms";
|
|
1671
|
+
readonly fast: "100ms";
|
|
1672
|
+
readonly normal: "200ms";
|
|
1673
|
+
readonly slow: "300ms";
|
|
1674
|
+
};
|
|
1675
|
+
readonly timing: {
|
|
1676
|
+
readonly linear: "linear";
|
|
1677
|
+
readonly easeIn: "cubic-bezier(0.4, 0, 1, 1)";
|
|
1678
|
+
readonly easeOut: "cubic-bezier(0, 0, 0.2, 1)";
|
|
1679
|
+
readonly easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
};
|
|
1683
|
+
|
|
1684
|
+
/**
|
|
1685
|
+
* Base component props that all components should extend
|
|
1686
|
+
*/
|
|
1687
|
+
interface BaseComponentProps {
|
|
1688
|
+
/** Additional CSS class name */
|
|
1689
|
+
className?: string;
|
|
1690
|
+
/** Inline styles */
|
|
1691
|
+
style?: React.CSSProperties;
|
|
1692
|
+
/** Test ID for testing purposes */
|
|
1693
|
+
'data-testid'?: string;
|
|
1694
|
+
}
|
|
1695
|
+
/**
|
|
1696
|
+
* Common variant types for Mac OS 9 components
|
|
1697
|
+
*/
|
|
1698
|
+
type Variant = 'default' | 'primary' | 'secondary';
|
|
1699
|
+
/**
|
|
1700
|
+
* Common size types
|
|
1701
|
+
*/
|
|
1702
|
+
type Size = 'small' | 'medium' | 'large';
|
|
1703
|
+
/**
|
|
1704
|
+
* Common state types
|
|
1705
|
+
*/
|
|
1706
|
+
type State = 'default' | 'hover' | 'active' | 'disabled' | 'focused';
|
|
1707
|
+
/**
|
|
1708
|
+
* Component ref types
|
|
1709
|
+
*/
|
|
1710
|
+
type ButtonRef = HTMLButtonElement;
|
|
1711
|
+
type InputRef = HTMLInputElement;
|
|
1712
|
+
type SelectRef = HTMLSelectElement;
|
|
1713
|
+
type TextAreaRef = HTMLTextAreaElement;
|
|
1714
|
+
type DivRef = HTMLDivElement;
|
|
1715
|
+
|
|
1716
|
+
export { ArrowLeftIcon, ArrowRightIcon, type BaseComponentProps, Button, type ButtonProps, type ButtonRef, CalendarIcon, CheckIcon, Checkbox, type CheckboxProps, ChevronDownIcon, ChevronUpIcon, CloseIcon, Dialog, type DialogProps, type DivRef, DocumentIcon, DownloadIcon, ErrorIcon, EyeIcon, FileIcon, FolderIcon, FolderList, type FolderListProps, HeartIcon, HomeIcon, Icon, IconButton, type IconButtonProps, type IconProps, ImageIcon, InfoIcon, type InputRef, LinkIcon, type ListColumn, type ListItem, ListView, type ListViewProps, LockIcon, MailIcon, type Menu, MenuBar, type MenuBarProps, MenuIcon, MenuItem, type MenuItemProps, MinusIcon, MoreIcon, MusicIcon, PlusIcon, PrintIcon, Radio, type RadioProps, RefreshIcon, SaveIcon, Scrollbar, type ScrollbarProps, SearchIcon, Select, type SelectOption, type SelectProps, type SelectRef, SettingsIcon, type Size, StarIcon, type State, TabPanel, type TabPanelProps, Tabs, type TabsProps, type TextAreaRef, TextField, type TextFieldProps, TrashIcon, UserIcon, type Variant, VideoIcon, WarningIcon, Window, type WindowProps, borders, colors, shadows, spacing, tokens, transitions, typography, zIndex };
|