@liiift-studio/mac-os9-ui 0.1.0 โ†’ 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,243 +1,243 @@
1
- # Mac OS 9 UI Component Library
2
-
3
- A pixel-perfect Mac OS 9 UI component library for React and TypeScript. Bring authentic retro Mac OS 9 styling to your web applications with accessible, well-typed components.
4
-
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
-
7
- ## Features
8
-
9
- - ๐ŸŽจ **Pixel-Perfect Design** - Faithful recreation of Mac OS 9 UI elements based on the original design system
10
- - ๐Ÿ“ฆ **TypeScript First** - Full TypeScript support with complete type definitions
11
- - โ™ฟ **Accessible** - WCAG 2.1 AA compliant components with proper ARIA attributes
12
- - ๐ŸŽญ **Dual Module Support** - ESM and CommonJS builds included
13
- - ๐Ÿ“– **Storybook Docs** - Interactive component documentation and examples
14
- - ๐Ÿงช **Fully Tested** - Comprehensive test coverage with Vitest
15
-
16
- ## Installation
17
-
18
- ```bash
19
- npm install mac-os9-ui
20
- ```
21
-
22
- ## Quick Start
23
-
24
- ```tsx
25
- import { Button, Window } from 'mac-os9-ui';
26
- import 'mac-os9-ui/styles';
27
-
28
- function App() {
29
- return (
30
- <Window title="My Application">
31
- <div style={{ padding: '16px' }}>
32
- <Button variant="primary">Click Me</Button>
33
- </div>
34
- </Window>
35
- );
36
- }
37
- ```
38
-
39
- ## Components
40
-
41
- ### Form Controls
42
- - **Button** - Classic Mac OS 9 buttons with variants (primary, default, cancel)
43
- - **Checkbox** - Mac OS 9 style checkboxes
44
- - **Radio** - Radio button groups
45
- - **TextField** - Text input fields
46
- - **Select** - Dropdown select menus
47
-
48
- ### Layout & Chrome
49
- - **Window** - Classic Mac OS 9 window container
50
- - **MenuBar** - Application menu bar with dropdown menus
51
- - **Tabs** - Tabbed navigation component
52
- - **Dialog** - Modal dialog windows
53
-
54
- ### Lists & Navigation
55
- - **ListView** - List view with Mac OS 9 styling
56
- - **FolderList** - Hierarchical folder/file list view
57
- - **Scrollbar** - Custom Mac OS 9 styled scrollbars
58
-
59
- ### Utilities
60
- - **Icon** - System icons (folder, document, trash, etc.)
61
- - **IconButton** - Icon-only button variant
62
-
63
- ## Usage Examples
64
-
65
- ### Creating a Window with Menu Bar
66
-
67
- ```tsx
68
- import { Window, MenuBar } from 'mac-os9-ui';
69
- import 'mac-os9-ui/styles';
70
-
71
- function MyApp() {
72
- const menuItems = [
73
- {
74
- label: 'File',
75
- items: [
76
- { label: 'New', onClick: () => console.log('New') },
77
- { label: 'Open...', onClick: () => console.log('Open') },
78
- { type: 'separator' },
79
- { label: 'Quit', onClick: () => console.log('Quit') },
80
- ],
81
- },
82
- {
83
- label: 'Edit',
84
- items: [
85
- { label: 'Cut', onClick: () => console.log('Cut') },
86
- { label: 'Copy', onClick: () => console.log('Copy') },
87
- { label: 'Paste', onClick: () => console.log('Paste') },
88
- ],
89
- },
90
- ];
91
-
92
- return (
93
- <Window title="My Application">
94
- <MenuBar items={menuItems} />
95
- {/* Your content here */}
96
- </Window>
97
- );
98
- }
99
- ```
100
-
101
- ### Using Form Controls
102
-
103
- ```tsx
104
- import { Button, Checkbox, TextField, Select } from 'mac-os9-ui';
105
- import { useState } from 'react';
106
-
107
- function MyForm() {
108
- const [checked, setChecked] = useState(false);
109
- const [text, setText] = useState('');
110
- const [selected, setSelected] = useState('');
111
-
112
- return (
113
- <div>
114
- <TextField
115
- label="Name"
116
- value={text}
117
- onChange={(e) => setText(e.target.value)}
118
- />
119
-
120
- <Checkbox
121
- label="I agree to the terms"
122
- checked={checked}
123
- onChange={(e) => setChecked(e.target.checked)}
124
- />
125
-
126
- <Select
127
- label="Choose an option"
128
- value={selected}
129
- onChange={(e) => setSelected(e.target.value)}
130
- options={[
131
- { value: 'option1', label: 'Option 1' },
132
- { value: 'option2', label: 'Option 2' },
133
- { value: 'option3', label: 'Option 3' },
134
- ]}
135
- />
136
-
137
- <Button variant="primary" onClick={() => console.log('Submit')}>
138
- Submit
139
- </Button>
140
- </div>
141
- );
142
- }
143
- ```
144
-
145
- ### Creating a Dialog
146
-
147
- ```tsx
148
- import { Dialog, Button } from 'mac-os9-ui';
149
- import { useState } from 'react';
150
-
151
- function MyComponent() {
152
- const [open, setOpen] = useState(false);
153
-
154
- return (
155
- <>
156
- <Button onClick={() => setOpen(true)}>Open Dialog</Button>
157
-
158
- <Dialog
159
- open={open}
160
- onClose={() => setOpen(false)}
161
- title="Confirm Action"
162
- >
163
- <p>Are you sure you want to proceed?</p>
164
- <div style={{ display: 'flex', gap: '8px', marginTop: '16px' }}>
165
- <Button variant="primary" onClick={() => setOpen(false)}>
166
- OK
167
- </Button>
168
- <Button onClick={() => setOpen(false)}>Cancel</Button>
169
- </div>
170
- </Dialog>
171
- </>
172
- );
173
- }
174
- ```
175
-
176
- ## Styling
177
-
178
- The library includes CSS files that need to be imported in your application:
179
-
180
- ```tsx
181
- import 'mac-os9-ui/styles';
182
- ```
183
-
184
- This imports the theme variables and base styles. All components use CSS Modules internally, so styles are scoped and won't conflict with your application's CSS.
185
-
186
- ## TypeScript Support
187
-
188
- All components are written in TypeScript and include full type definitions. Import types as needed:
189
-
190
- ```tsx
191
- import type { ButtonProps, WindowProps } from 'mac-os9-ui';
192
- ```
193
-
194
- ## Browser Support
195
-
196
- - Chrome/Edge (latest)
197
- - Firefox (latest)
198
- - Safari (latest)
199
-
200
- ## Development
201
-
202
- ```bash
203
- # Install dependencies
204
- npm install
205
-
206
- # Run Storybook for development
207
- npm run dev
208
-
209
- # Build the library
210
- npm run build
211
-
212
- # Run tests
213
- npm test
214
-
215
- # Run linting
216
- npm run lint
217
- ```
218
-
219
- ## Attribution
220
-
221
- This component library is based on the **Mac OS 9 UI Kit** created by [Michael Feeney](https://swallowmygraphicdesign.com/project/macostalgia).
222
-
223
- Original Figma design: [Mac OS 9 UI Kit](https://www.figma.com/design/vy2T5MCXFz7QWf4Ba86eqN/Mac-OS-9--UI-Kit--Community-)
224
-
225
- Design licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
226
-
227
- ## License
228
-
229
- MIT License - see [LICENSE](./LICENSE) file for details.
230
-
231
- ## Contributing
232
-
233
- Contributions are welcome! Please feel free to submit a Pull Request.
234
-
235
- ## Links
236
-
237
- - [GitHub Repository](https://github.com/Liiift-Studio/Mac-OS-9-React)
238
- - [Report Issues](https://github.com/Liiift-Studio/Mac-OS-9-React/issues)
239
- - [Changelog](./CHANGELOG.md)
240
-
241
- ---
242
-
243
- Made with ๐Ÿ’พ by [Liiift Studio](https://github.com/Liiift-Studio)
1
+ # Mac OS 9 UI Component Library
2
+
3
+ A pixel-perfect Mac OS 9 UI component library for React and TypeScript. Bring authentic retro Mac OS 9 styling to your web applications with accessible, well-typed components.
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ ## Features
8
+
9
+ - ๐ŸŽจ **Pixel-Perfect Design** - Faithful recreation of Mac OS 9 UI elements based on the original design system
10
+ - ๐Ÿ“ฆ **TypeScript First** - Full TypeScript support with complete type definitions
11
+ - โ™ฟ **Accessible** - WCAG 2.1 AA compliant components with proper ARIA attributes
12
+ - ๐ŸŽญ **Dual Module Support** - ESM and CommonJS builds included
13
+ - ๐Ÿ“– **Storybook Docs** - Interactive component documentation and examples
14
+ - ๐Ÿงช **Fully Tested** - Comprehensive test coverage with Vitest
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install @liiift-studio/mac-os9-ui
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ```tsx
25
+ import { Button, Window } from '@liiift-studio/mac-os9-ui';
26
+ import '@liiift-studio/mac-os9-ui/styles';
27
+
28
+ function App() {
29
+ return (
30
+ <Window title="My Application">
31
+ <div style={{ padding: '16px' }}>
32
+ <Button variant="primary">Click Me</Button>
33
+ </div>
34
+ </Window>
35
+ );
36
+ }
37
+ ```
38
+
39
+ ## Components
40
+
41
+ ### Form Controls
42
+ - **Button** - Classic Mac OS 9 buttons with variants (primary, default, cancel)
43
+ - **Checkbox** - Mac OS 9 style checkboxes
44
+ - **Radio** - Radio button groups
45
+ - **TextField** - Text input fields
46
+ - **Select** - Dropdown select menus
47
+
48
+ ### Layout & Chrome
49
+ - **Window** - Classic Mac OS 9 window container
50
+ - **MenuBar** - Application menu bar with dropdown menus
51
+ - **Tabs** - Tabbed navigation component
52
+ - **Dialog** - Modal dialog windows
53
+
54
+ ### Lists & Navigation
55
+ - **ListView** - List view with Mac OS 9 styling
56
+ - **FolderList** - Hierarchical folder/file list view
57
+ - **Scrollbar** - Custom Mac OS 9 styled scrollbars
58
+
59
+ ### Utilities
60
+ - **Icon** - System icons (folder, document, trash, etc.)
61
+ - **IconButton** - Icon-only button variant
62
+
63
+ ## Usage Examples
64
+
65
+ ### Creating a Window with Menu Bar
66
+
67
+ ```tsx
68
+ import { Window, MenuBar } from '@liiift-studio/mac-os9-ui';
69
+ import '@liiift-studio/mac-os9-ui/styles';
70
+
71
+ function MyApp() {
72
+ const menuItems = [
73
+ {
74
+ label: 'File',
75
+ items: [
76
+ { label: 'New', onClick: () => console.log('New') },
77
+ { label: 'Open...', onClick: () => console.log('Open') },
78
+ { type: 'separator' },
79
+ { label: 'Quit', onClick: () => console.log('Quit') },
80
+ ],
81
+ },
82
+ {
83
+ label: 'Edit',
84
+ items: [
85
+ { label: 'Cut', onClick: () => console.log('Cut') },
86
+ { label: 'Copy', onClick: () => console.log('Copy') },
87
+ { label: 'Paste', onClick: () => console.log('Paste') },
88
+ ],
89
+ },
90
+ ];
91
+
92
+ return (
93
+ <Window title="My Application">
94
+ <MenuBar items={menuItems} />
95
+ {/* Your content here */}
96
+ </Window>
97
+ );
98
+ }
99
+ ```
100
+
101
+ ### Using Form Controls
102
+
103
+ ```tsx
104
+ import { Button, Checkbox, TextField, Select } from '@liiift-studio/mac-os9-ui';
105
+ import { useState } from 'react';
106
+
107
+ function MyForm() {
108
+ const [checked, setChecked] = useState(false);
109
+ const [text, setText] = useState('');
110
+ const [selected, setSelected] = useState('');
111
+
112
+ return (
113
+ <div>
114
+ <TextField
115
+ label="Name"
116
+ value={text}
117
+ onChange={(e) => setText(e.target.value)}
118
+ />
119
+
120
+ <Checkbox
121
+ label="I agree to the terms"
122
+ checked={checked}
123
+ onChange={(e) => setChecked(e.target.checked)}
124
+ />
125
+
126
+ <Select
127
+ label="Choose an option"
128
+ value={selected}
129
+ onChange={(e) => setSelected(e.target.value)}
130
+ options={[
131
+ { value: 'option1', label: 'Option 1' },
132
+ { value: 'option2', label: 'Option 2' },
133
+ { value: 'option3', label: 'Option 3' },
134
+ ]}
135
+ />
136
+
137
+ <Button variant="primary" onClick={() => console.log('Submit')}>
138
+ Submit
139
+ </Button>
140
+ </div>
141
+ );
142
+ }
143
+ ```
144
+
145
+ ### Creating a Dialog
146
+
147
+ ```tsx
148
+ import { Dialog, Button } from '@liiift-studio/mac-os9-ui';
149
+ import { useState } from 'react';
150
+
151
+ function MyComponent() {
152
+ const [open, setOpen] = useState(false);
153
+
154
+ return (
155
+ <>
156
+ <Button onClick={() => setOpen(true)}>Open Dialog</Button>
157
+
158
+ <Dialog
159
+ open={open}
160
+ onClose={() => setOpen(false)}
161
+ title="Confirm Action"
162
+ >
163
+ <p>Are you sure you want to proceed?</p>
164
+ <div style={{ display: 'flex', gap: '8px', marginTop: '16px' }}>
165
+ <Button variant="primary" onClick={() => setOpen(false)}>
166
+ OK
167
+ </Button>
168
+ <Button onClick={() => setOpen(false)}>Cancel</Button>
169
+ </div>
170
+ </Dialog>
171
+ </>
172
+ );
173
+ }
174
+ ```
175
+
176
+ ## Styling
177
+
178
+ The library includes CSS files that need to be imported in your application:
179
+
180
+ ```tsx
181
+ import '@liiift-studio/mac-os9-ui/styles';
182
+ ```
183
+
184
+ This imports the theme variables and base styles. All components use CSS Modules internally, so styles are scoped and won't conflict with your application's CSS.
185
+
186
+ ## TypeScript Support
187
+
188
+ All components are written in TypeScript and include full type definitions. Import types as needed:
189
+
190
+ ```tsx
191
+ import type { ButtonProps, WindowProps } from '@liiift-studio/mac-os9-ui';
192
+ ```
193
+
194
+ ## Browser Support
195
+
196
+ - Chrome/Edge (latest)
197
+ - Firefox (latest)
198
+ - Safari (latest)
199
+
200
+ ## Development
201
+
202
+ ```bash
203
+ # Install dependencies
204
+ npm install
205
+
206
+ # Run Storybook for development
207
+ npm run dev
208
+
209
+ # Build the library
210
+ npm run build
211
+
212
+ # Run tests
213
+ npm test
214
+
215
+ # Run linting
216
+ npm run lint
217
+ ```
218
+
219
+ ## Attribution
220
+
221
+ This component library is based on the **Mac OS 9 UI Kit** created by [Michael Feeney](https://swallowmygraphicdesign.com/project/macostalgia).
222
+
223
+ Original Figma design: [Mac OS 9 UI Kit](https://www.figma.com/design/vy2T5MCXFz7QWf4Ba86eqN/Mac-OS-9--UI-Kit--Community-)
224
+
225
+ Design licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
226
+
227
+ ## License
228
+
229
+ MIT License - see [LICENSE](./LICENSE) file for details.
230
+
231
+ ## Contributing
232
+
233
+ Contributions are welcome! Please feel free to submit a Pull Request.
234
+
235
+ ## Links
236
+
237
+ - [GitHub Repository](https://github.com/Liiift-Studio/Mac-OS-9-React)
238
+ - [Report Issues](https://github.com/Liiift-Studio/Mac-OS-9-React/issues)
239
+ - [Changelog](./CHANGELOG.md)
240
+
241
+ ---
242
+
243
+ Made with ๐Ÿ’พ by [Liiift Studio](https://github.com/Liiift-Studio)