@undefine-ui/design-system 2.15.1 → 3.0.2

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
@@ -77,17 +77,19 @@ Storybook (`pnpm dev:storybook`) documents each component and token surface.
77
77
 
78
78
  ### Icon library
79
79
 
80
- The package includes a comprehensive icon library with 26 SVG icons organized by category.
80
+ The package includes a comprehensive icon library with 35 SVG icons organized by category.
81
81
 
82
82
  **Available icons:**
83
83
 
84
- - **Navigation:** NavArrowLeft, NavArrowRight, NavArrowDown, LongArrowUpLeftSolid
85
- - **User:** UserFill, UserOutline
84
+ - **Navigation:** NavArrowLeft, NavArrowRight, NavArrowDown, NavArrowDownSolid, LongArrowUpLeftSolid
85
+ - **User:** UserSolid, User, Building, Bank
86
86
  - **Form Controls:** CheckboxDefault, CheckboxSelect, CheckboxIndeterminate, RadioDefault, RadioSelect
87
- - **Actions:** Search, Copy, Trash, XMark, XMarkSolid, CloudUpload, Settings
88
- - **Feedback:** InfoCircleFill, InfoCircleOutline, ClipboardCheck, Loader, BellNotification
87
+ - **Actions:** Search, Copy, Trash, XMark, XMarkSolid, CloudUpload, Download, Settings, Plus, PlusSquare, Attachment
88
+ - **Feedback:** InfoCircleSolid, InfoCircle, CheckCircleSolid, HelpCircle, ClipboardCheck, Loader, BellNotification
89
89
  - **Visibility:** Eye, EyeClosed
90
- - **System:** KeyCommand
90
+ - **Date & Time:** Calendar, Clock
91
+ - **Data:** SortUp, SortDown
92
+ - **System:** KeyCommand, Circle
91
93
 
92
94
  **Usage:**
93
95
 
@@ -98,7 +100,7 @@ import { Icon } from '@undefine-ui/design-system';
98
100
  <Icon icon="Search" sx={{ width: 24, height: 24 }} />
99
101
 
100
102
  // With custom color
101
- <Icon icon="InfoCircleFill" sx={{ width: 32, height: 32, color: 'primary.main' }} />
103
+ <Icon icon="InfoCircleSolid" sx={{ width: 32, height: 32, color: 'primary.main' }} />
102
104
 
103
105
  // Different sizes
104
106
  <Icon icon="Loader" sx={{ width: 16, height: 16 }} />
@@ -230,6 +232,60 @@ import { Image } from '@undefine-ui/design-system';
230
232
  - Use `srcSet` with appropriate sizes for optimal image delivery
231
233
  - Set `observerMargin="400px"` to preload images slightly before viewport
232
234
 
235
+ ### Date Pickers (React Hook Form)
236
+
237
+ Form-ready date picker components integrated with React Hook Form. Includes `RHFDatePicker`, `RHFTimePicker`, and `RHFDateTimePicker` for seamless form state management.
238
+
239
+ **Usage:**
240
+
241
+ ```tsx
242
+ import { Form, RHFDatePicker, RHFTimePicker, RHFDateTimePicker } from '@undefine-ui/design-system';
243
+ import { useForm } from 'react-hook-form';
244
+
245
+ const MyForm = () => {
246
+ const methods = useForm({
247
+ defaultValues: {
248
+ birthDate: null,
249
+ meetingTime: null,
250
+ eventStart: null
251
+ }
252
+ });
253
+
254
+ return (
255
+ <Form methods={methods} onSubmit={(data) => console.log(data)}>
256
+ {/* Date Picker */}
257
+ <RHFDatePicker name="birthDate" label="Birth Date" />
258
+
259
+ {/* Time Picker */}
260
+ <RHFTimePicker name="meetingTime" label="Meeting Time" />
261
+
262
+ {/* DateTime Picker */}
263
+ <RHFDateTimePicker name="eventStart" label="Event Start" />
264
+
265
+ {/* Clearable variant */}
266
+ <RHFDatePicker name="deadline" label="Deadline" clearable />
267
+ </Form>
268
+ );
269
+ };
270
+ ```
271
+
272
+ **Props (shared by all variants):**
273
+
274
+ - `name` - Form field name for react-hook-form (required)
275
+ - `label` - Label for the picker input
276
+ - `helperText` - Helper text displayed below the input
277
+ - `clearable` - Enable clear button (default: `false`)
278
+ - `disabled` - Disable the picker (default: `false`)
279
+ - All MUI X DatePicker/TimePicker/DateTimePicker props are supported
280
+
281
+ **Features:**
282
+
283
+ - **Form integration:** Automatically syncs with react-hook-form state
284
+ - **Validation:** Displays validation errors from react-hook-form
285
+ - **Clearable:** Optional clear button to reset the value
286
+ - **Theme-styled:** Uses your theme's TextField styling
287
+ - **Click-to-open:** Opens picker on text field click
288
+
233
289
  ### OTP Input
234
290
 
235
291
  A one-time password input component with keyboard navigation, paste support, and validation. Perfect for email/SMS verification, PIN codes, and security codes.