@undefine-ui/design-system 2.14.2 → 2.15.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.
- package/README.md +73 -1
- package/dist/index.cjs +389 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +860 -848
- package/dist/index.d.ts +860 -848
- package/dist/index.js +384 -257
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -291,6 +291,78 @@ import { OTPInput, Field } from '@undefine-ui/design-system';
|
|
|
291
291
|
|
|
292
292
|
The `Field.OTP` component automatically integrates with React Hook Form, providing validation and error handling out of the box.
|
|
293
293
|
|
|
294
|
+
### Empty Content
|
|
295
|
+
|
|
296
|
+
A flexible empty state component for displaying placeholder content when data is unavailable. Perfect for empty lists, search results, or any state where content hasn't been loaded yet.
|
|
297
|
+
|
|
298
|
+
**Usage:**
|
|
299
|
+
|
|
300
|
+
```tsx
|
|
301
|
+
import { EmptyContent } from '@undefine-ui/design-system';
|
|
302
|
+
|
|
303
|
+
// Basic usage
|
|
304
|
+
<EmptyContent title="No data" />
|
|
305
|
+
|
|
306
|
+
// With description
|
|
307
|
+
<EmptyContent
|
|
308
|
+
title="No results found"
|
|
309
|
+
description="Try adjusting your search or filter to find what you're looking for."
|
|
310
|
+
/>
|
|
311
|
+
|
|
312
|
+
// With image
|
|
313
|
+
<EmptyContent
|
|
314
|
+
title="No notifications"
|
|
315
|
+
description="You're all caught up!"
|
|
316
|
+
imgUrl="/assets/icons/empty/ic-notification.svg"
|
|
317
|
+
/>
|
|
318
|
+
|
|
319
|
+
// Filled variant (with background)
|
|
320
|
+
<EmptyContent
|
|
321
|
+
filled
|
|
322
|
+
title="No items in cart"
|
|
323
|
+
description="Add items to your cart to see them here."
|
|
324
|
+
/>
|
|
325
|
+
|
|
326
|
+
// With action button
|
|
327
|
+
<EmptyContent
|
|
328
|
+
title="No projects yet"
|
|
329
|
+
description="Create your first project to get started."
|
|
330
|
+
action={
|
|
331
|
+
<Button variant="contained">Create Project</Button>
|
|
332
|
+
}
|
|
333
|
+
/>
|
|
334
|
+
|
|
335
|
+
// Custom styling with slotProps
|
|
336
|
+
<EmptyContent
|
|
337
|
+
title="Custom Styled"
|
|
338
|
+
description="Customize title and description styles."
|
|
339
|
+
slotProps={{
|
|
340
|
+
title: { color: 'primary.main', fontWeight: 700 },
|
|
341
|
+
description: { color: 'text.secondary', maxWidth: 300 }
|
|
342
|
+
}}
|
|
343
|
+
/>
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
**Props:**
|
|
347
|
+
|
|
348
|
+
- `title` - Title text to display (default: `'No data'`)
|
|
349
|
+
- `description` - Description text below the title
|
|
350
|
+
- `imgUrl` - URL for an optional image to display
|
|
351
|
+
- `filled` - Show filled background variant with border (default: `false`)
|
|
352
|
+
- `action` - Optional action element (button, link, etc.)
|
|
353
|
+
- `slotProps` - Custom styles for `img`, `title`, and `description` slots
|
|
354
|
+
- `sx` - MUI sx prop for container styling
|
|
355
|
+
- All `StackProps` from MUI are supported
|
|
356
|
+
|
|
357
|
+
**Features:**
|
|
358
|
+
|
|
359
|
+
- **Flexible layout:** Centers content vertically and horizontally
|
|
360
|
+
- **Filled variant:** Adds background color and dashed border
|
|
361
|
+
- **Image support:** Display custom illustrations or icons
|
|
362
|
+
- **Action slot:** Add buttons or links for user interaction
|
|
363
|
+
- **Customizable:** Style individual elements via slotProps
|
|
364
|
+
- **Theme integration:** Uses theme variables for consistent styling
|
|
365
|
+
|
|
294
366
|
### Logo assets
|
|
295
367
|
|
|
296
368
|
The package exports two Logo components:
|
|
@@ -351,7 +423,7 @@ Everything is re-exported from `src/index.ts`. Key groups:
|
|
|
351
423
|
|
|
352
424
|
| Group | Exports |
|
|
353
425
|
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
354
|
-
| Components | `CopyButton`, `HookForm` helpers (`Form`, `Field`, `RHFSwitch`, etc.), `Icon`, `Image`, `Logo`, `LoadingScreen`, `OTPInput`, `Table`, `Upload`
|
|
426
|
+
| Components | `CopyButton`, `EmptyContent`, `HookForm` helpers (`Form`, `Field`, `RHFSwitch`, etc.), `Icon`, `Image`, `Logo`, `LoadingScreen`, `OTPInput`, `Table`, `Upload` |
|
|
355
427
|
| Hooks | `useBoolean`, `useCopyToClipboard`, `useEventListener`, `useLocalStorage`, `useResponsive`, `useSettings`, `useSetState`, `useScrollOffsetTop`, `usePopover`, `useCountdown` |
|
|
356
428
|
| Contexts | `SettingsProvider`, `SettingsContext`, `defaultSettings`, `SettingsValueProps` |
|
|
357
429
|
| Theme | `ThemeProvider`, `createTheme`, `colorSchemes`, `components`, `palette`, `radius`, `shadows`, `customSpacing`, utilities such as `varAlpha`, `bgGradient`, `hideScrollX/Y` |
|