@woobee/ui 0.2.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/README.md ADDED
@@ -0,0 +1,194 @@
1
+ # @woobee/ui
2
+
3
+ WooBee UI component library — reusable React components styled with Tailwind CSS.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @woobee/ui
9
+ ```
10
+
11
+ ### Peer Dependencies
12
+
13
+ - `react` >= 18
14
+ - `react-dom` >= 18
15
+
16
+ ## Setup
17
+
18
+ ### 1. Wrap your app with `ModalProvider`
19
+
20
+ Components like `Modal`, `Drawer`, and `ConfirmationBox` require the `ModalProvider` context:
21
+
22
+ ```tsx
23
+ import { ModalProvider } from '@woobee/ui'
24
+
25
+ function App() {
26
+ return (
27
+ <ModalProvider>
28
+ {/* your app */}
29
+ </ModalProvider>
30
+ )
31
+ }
32
+ ```
33
+
34
+ ### 2. Configure Custom Tailwind Colors
35
+
36
+ This library uses custom Tailwind color tokens. Add these to your Tailwind CSS configuration:
37
+
38
+ #### Tailwind v4 (`app.css` or `globals.css`)
39
+
40
+ ```css
41
+ @import "tailwindcss";
42
+
43
+ @theme {
44
+ /* Primary */
45
+ --color-primary-50: #f0f9ff;
46
+ --color-primary-100: #e0f2fe;
47
+ --color-primary-200: #bae6fd;
48
+ --color-primary-300: #7dd3fc;
49
+ --color-primary-400: #38bdf8;
50
+ --color-primary-500: #0ea5e9;
51
+ --color-primary-600: #0284c7;
52
+ --color-primary-700: #0369a1;
53
+ --color-primary-800: #075985;
54
+ --color-primary-900: #0c4a6e;
55
+
56
+ /* Brown */
57
+ --color-brown-500: #8B6914;
58
+ --color-brown-600: #7a5c11;
59
+
60
+ /* Charcoal */
61
+ --color-charcoal-50: #f5f5f5;
62
+ --color-charcoal-100: #e0e0e0;
63
+ --color-charcoal-200: #b0b0b0;
64
+ --color-charcoal-300: #808080;
65
+ --color-charcoal-400: #606060;
66
+ --color-charcoal-500: #404040;
67
+ --color-charcoal-600: #333333;
68
+ --color-charcoal-700: #262626;
69
+ --color-charcoal-800: #1a1a1a;
70
+ --color-charcoal-900: #111111;
71
+
72
+ /* Cream */
73
+ --color-cream-50: #fefdf8;
74
+ --color-cream-200: #f5f0e1;
75
+
76
+ /* Flamingo */
77
+ --color-flamingo-500: #f472b6;
78
+
79
+ /* Dark Blue */
80
+ --color-dark-blue-500: #1e3a5f;
81
+ }
82
+ ```
83
+
84
+ > **Note**: Adjust the exact color values to match your brand. The values above are defaults — refer to your main app's Tailwind theme for the canonical values.
85
+
86
+ ## Available Components
87
+
88
+ ### General
89
+
90
+ | Component | Import |
91
+ |-----------|--------|
92
+ | `Button` | `import { Button } from '@woobee/ui'` |
93
+ | `Tag` | `import { Tag } from '@woobee/ui'` |
94
+ | `TagGroup` | `import { TagGroup } from '@woobee/ui'` |
95
+ | `Tabs` | `import { Tabs } from '@woobee/ui'` |
96
+ | `Toggle` | `import { Toggle } from '@woobee/ui'` |
97
+ | `Loading` | `import { Loading } from '@woobee/ui'` |
98
+ | `CheckboxList` | `import { CheckboxList } from '@woobee/ui'` |
99
+ | `SortIcon` | `import { SortIcon } from '@woobee/ui'` |
100
+ | `InlinePrompt` | `import { InlinePrompt } from '@woobee/ui'` |
101
+
102
+ ### Overlays
103
+
104
+ | Component | Import |
105
+ |-----------|--------|
106
+ | `Modal` | `import { Modal } from '@woobee/ui'` |
107
+ | `Drawer` | `import { Drawer } from '@woobee/ui'` |
108
+ | `ConfirmationBox` | `import { ConfirmationBox } from '@woobee/ui'` |
109
+ | `Transition` | `import { Transition } from '@woobee/ui'` |
110
+
111
+ ### HTML Elements
112
+
113
+ | Component | Import |
114
+ |-----------|--------|
115
+ | `H1`, `H2`, `H3`, `H4`, `B` | `import { H1, H2, H3, H4, B } from '@woobee/ui'` |
116
+
117
+ ### Table
118
+
119
+ | Component | Import |
120
+ |-----------|--------|
121
+ | `Table`, `Thead`, `Tbody`, `Tr`, `Th`, `Td` | `import { Table, Thead, Tbody, Tr, Th, Td } from '@woobee/ui'` |
122
+
123
+ ### Form
124
+
125
+ | Component | Import |
126
+ |-----------|--------|
127
+ | `Input` | `import { Input } from '@woobee/ui'` |
128
+ | `Label` | `import { Label } from '@woobee/ui'` |
129
+ | `Select` | `import { Select } from '@woobee/ui'` |
130
+ | `SelectInput` | `import { SelectInput } from '@woobee/ui'` |
131
+ | `Textarea` | `import { Textarea } from '@woobee/ui'` |
132
+ | `TagInput` | `import { TagInput } from '@woobee/ui'` |
133
+
134
+ ### Utilities
135
+
136
+ | Utility | Import |
137
+ |---------|--------|
138
+ | `classNames` | `import { classNames } from '@woobee/ui'` |
139
+ | `classNameObject` | `import { classNameObject } from '@woobee/ui'` |
140
+
141
+ ## Usage Examples
142
+
143
+ ### Button
144
+
145
+ ```tsx
146
+ import { Button } from '@woobee/ui'
147
+
148
+ <Button variant="primary" size="medium" onClick={() => {}}>
149
+ Click Me
150
+ </Button>
151
+
152
+ <Button variant="secondary" loading={true}>
153
+ Loading...
154
+ </Button>
155
+ ```
156
+
157
+ ### Modal
158
+
159
+ ```tsx
160
+ import { Modal } from '@woobee/ui'
161
+
162
+ <Modal
163
+ open={isOpen}
164
+ title="Edit Item"
165
+ size="medium"
166
+ onClose={() => setIsOpen(false)}
167
+ onCancel={() => setIsOpen(false)}
168
+ onSubmit={handleSave}
169
+ submitText="Save"
170
+ >
171
+ <p>Modal content here</p>
172
+ </Modal>
173
+ ```
174
+
175
+ ### Toggle
176
+
177
+ ```tsx
178
+ import { Toggle } from '@woobee/ui'
179
+
180
+ <Toggle value={isEnabled} onChange={setIsEnabled} />
181
+ <Toggle value={isSmall} onChange={setIsSmall} size="small" />
182
+ ```
183
+
184
+ ## TypeScript
185
+
186
+ All components export their prop types. Import them alongside the component:
187
+
188
+ ```tsx
189
+ import { Button, type ButtonProps } from '@woobee/ui'
190
+ ```
191
+
192
+ ## License
193
+
194
+ MIT
package/SKIPPED.md ADDED
@@ -0,0 +1,58 @@
1
+ # Skipped Components
2
+
3
+ The following UI components from `woobee/src/components/ui` have been **excluded** from `@woobee/ui` in this initial release due to deep dependencies on app-specific code (Next.js router, app contexts, custom hooks, or heavy external libraries).
4
+
5
+ They can be added in future iterations once their dependencies are decoupled.
6
+
7
+ ---
8
+
9
+ ## Components with Next.js / Router Dependencies
10
+
11
+ | Component | Source File | Blocking Dependency |
12
+ |-----------|-----------|---------------------|
13
+ | **ButtonGroup** | `ui/ButtonGroup.js` | `next/link`, `useRouter`, `NAV_LINKS` constants, `NavigationModal` |
14
+ | **Breadcrumb** | `ui/Breadcrumb/index.js` | `next/link`, `useRouter` |
15
+ | **Tab** | `ui/Tab/index.js` | `next/link` |
16
+
17
+ ## Components with App Context Dependencies
18
+
19
+ | Component | Source File | Blocking Dependency |
20
+ |-----------|-----------|---------------------|
21
+ | **Info/View** | `ui/Info/View.js` | `useNotificationContext`, `copyToClipboard` |
22
+ | **Info/Action** | `ui/Info/Action.js` | `Popover` module component, `DotsSVG` icon |
23
+ | **Info/ListView** | `ui/Info/ListView.js` | `H3` from `ui/HTML` (now available — can be migrated) |
24
+ | **Info/TreeView** | `ui/Info/TreeView.js` | `H3` from `ui/HTML` (now available — can be migrated) |
25
+
26
+ ## Components with Custom Hook Dependencies
27
+
28
+ | Component | Source File | Blocking Dependency |
29
+ |-----------|-----------|---------------------|
30
+ | **Pagination** (full) | `ui/Pagination/index.js` | `useResizeListener` custom hook |
31
+ | **Pagination/Simple** | `ui/Pagination/Simple.js` | `LeftSVG`, `RightSVG` icon components |
32
+
33
+ ## Components with Heavy External Dependencies
34
+
35
+ | Component | Source File | Blocking Dependency |
36
+ |-----------|-----------|---------------------|
37
+ | **SelectMenu** | `ui/SelectMenu/index.js` | Complex (12KB+), custom `KeystrokeHandler` |
38
+ | **Notification / NotificationCenter** | `ui/Notification/*` | `react-dom/client` imperative API, class component |
39
+ | **AvatarByCharacter** | `ui/AvatarByCharacter/` | App-specific avatar logic |
40
+ | **DatePicker** | `ui/DatePicker/` | Custom date picker implementation |
41
+ | **DatePicker2** | `ui/DatePicker2/` | Custom date picker v2 |
42
+ | **DateRangePicker** | `ui/DateRangePicker/` | Date range selection logic |
43
+ | **TimePicker** | `ui/TimePicker/` | Custom time picker |
44
+ | **PhonePicker** | `ui/PhonePicker/` | Phone number input with country codes |
45
+ | **QuillEditor** | `ui/QuillEditor/` | Quill rich text editor dependency |
46
+ | **RichTextEditor** | `ui/RichTextEditor/` | Plate.js editor dependency |
47
+ | **Uploader** | `ui/Uploader/` | File upload with dropzone |
48
+ | **Poll** | `ui/Poll/` | Polling/survey UI |
49
+ | **Markdown** | `ui/Markdown/` | Markdown rendering |
50
+ | **UnderConstruction** | `ui/UnderConstruction/` | Placeholder page |
51
+
52
+ ---
53
+
54
+ ## Migration Notes
55
+
56
+ - **Info/ListView** and **Info/TreeView** only depend on `H3` from `ui/HTML`, which is now included in the package. These are good candidates for the next iteration.
57
+ - **Pagination/Simple** only needs two SVG icon components (`LeftSVG`, `RightSVG`) to be inlined — also a good next candidate.
58
+ - **SelectMenu** is a high-value component but needs its `KeystrokeHandler` and `Item` subcomponents to be included.