nicklabs-ui 1.0.49 → 1.0.51

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
@@ -1098,6 +1098,8 @@ Notification toasts via the `useToast` composable.
1098
1098
 
1099
1099
  > `NToast` must be mounted once at the app root level.
1100
1100
 
1101
+ > When only a `description` is passed (no `title`), the description is rendered with title styling (bold, larger font) for better visual clarity.
1102
+
1101
1103
  **Setup**
1102
1104
 
1103
1105
  ```vue
@@ -1342,6 +1344,7 @@ Form wrapper with optional tab navigation and hero section header.
1342
1344
  | `title` | `string` | — | Form header title |
1343
1345
  | `description` | `string` | — | Form header description |
1344
1346
  | `tabs` | `string[]` | `[]` | Tab labels; active tab persisted to localStorage |
1347
+ | `modelValue` | `number` | — | Controlled tab index (v-model); when provided, overrides internal state |
1345
1348
 
1346
1349
  **Events**
1347
1350
 
@@ -1349,6 +1352,7 @@ Form wrapper with optional tab navigation and hero section header.
1349
1352
  |-------|---------|-------------|
1350
1353
  | `submit` | `Record<string, any>` | Form submitted with model data |
1351
1354
  | `reset` | — | Form reset |
1355
+ | `update:modelValue` | `number` | Tab changed — emitted on every tab click for v-model binding |
1352
1356
 
1353
1357
  **Slots**
1354
1358
 
@@ -1370,6 +1374,7 @@ Form wrapper with optional tab navigation and hero section header.
1370
1374
  title="User Profile"
1371
1375
  description="Manage your account details"
1372
1376
  :tabs="['Basic Info', 'Security', 'Preferences']"
1377
+ v-model="activeTab"
1373
1378
  @submit="handleSubmit"
1374
1379
  >
1375
1380
  <template #toolbar>
@@ -1392,10 +1397,11 @@ Form wrapper with optional tab navigation and hero section header.
1392
1397
  </template>
1393
1398
 
1394
1399
  <script setup>
1395
- import { reactive } from 'vue'
1400
+ import { ref, reactive } from 'vue'
1396
1401
  import { NForm, NInput, NButton } from 'nicklabs-ui'
1397
1402
 
1398
1403
  const formData = reactive({ name: '', email: '', password: '' })
1404
+ const activeTab = ref(0) // control tab externally
1399
1405
 
1400
1406
  function handleSubmit(model) {
1401
1407
  console.log('Submitted:', model)
@@ -1619,7 +1625,7 @@ const { toasts, toast, removeToast } = useToast()
1619
1625
 
1620
1626
  ```typescript
1621
1627
  interface ToastOptions {
1622
- title?: string // Optional heading
1628
+ title?: string // Optional heading; when omitted, description uses title styling
1623
1629
  duration?: number // Auto-dismiss ms (default: 4000)
1624
1630
  }
1625
1631
  ```