@zvoove/unity-ui 2.48.0 → 2.49.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/dist/llms.txt CHANGED
@@ -299,12 +299,12 @@ import { Typography } from '@zvoove/unity-ui';
299
299
  size="md" // 'sm' | 'md' | 'lg' (responsive — accepts breakpoint object). 'small' | 'medium' | 'large' are accepted but deprecated; will be removed in v3.0.0
300
300
  as="p" // 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
301
301
  color="on-surface" // ForegroundColors
302
- textAlign="left" // 'left' | 'center' | 'right'
302
+ textAlign="left" // 'left' | 'center' | 'right' | { minimum: 'left', tablet: 'center' }
303
303
  textTransform="uppercase" // 'uppercase' | 'lowercase' | 'capitalize'
304
- truncate={2} // number - max lines before truncation
305
- truncatedBy="word" // 'word' | 'letter' (default: 'word')
306
- hyphenate={true} // boolean (default: true)
307
- wrap={true} // boolean
304
+ truncate={2} // number | { minimum: 2, tablet: 3 }
305
+ truncatedBy="word" // 'word' | 'letter' | { minimum: 'word', tablet: 'letter' }
306
+ hyphenate={true} // boolean | { minimum: false, tablet: true }
307
+ wrap={true} // boolean | { minimum: true, tablet: false }
308
308
  >
309
309
  Text content
310
310
  </Typography>
@@ -398,6 +398,8 @@ import { Select } from '@zvoove/unity-ui';
398
398
  errorMessage="Required" // string
399
399
  disabled={false} // boolean
400
400
  hideLabel={false} // boolean
401
+ placeholder="Select…" // string — shown when no value is selected
402
+ required={false} // boolean — prevents deselection in single-select
401
403
  />
402
404
  ```
403
405
 
@@ -406,6 +408,9 @@ Common patterns:
406
408
  // Searchable select — for long option lists
407
409
  <Select name="country" label="Country" searchable={true} options={countries} />
408
410
 
411
+ // Required with placeholder — compact filter / toolbar
412
+ <Select name="status" label="Status" hideLabel required placeholder="Status" options={statusOptions} />
413
+
409
414
  // Multi-select
410
415
  <Select
411
416
  name="tags"
@@ -475,8 +480,8 @@ import { Switch } from '@zvoove/unity-ui';
475
480
  checked={false} // boolean
476
481
  onChange={handleChange} // ChangeEventHandler<HTMLInputElement>
477
482
  label="Enable notifications" // string | { on: string; off: string }
478
- labelPlacement="left" // 'left' | 'right' (default: 'left')
479
- justify="space-between" // JustifyContent
483
+ labelPlacement="left" // 'left' | 'right' | { minimum: 'left', tablet: 'right' }
484
+ justify="space-between" // JustifyContent | { minimum: 'space-between', tablet: 'flex-start' }
480
485
  disabled={false} // boolean
481
486
  withIcons={false} // boolean | { on: IconName; off: IconName }
482
487
  name="notifications" // string
@@ -709,7 +714,7 @@ import { Table } from '@zvoove/unity-ui';
709
714
  const columns = [
710
715
  { id: 'name', label: 'Name', orderable: true },
711
716
  { id: 'email', label: 'Email' },
712
- { id: 'role', label: 'Role', align: 'right' as const },
717
+ { id: 'role', label: 'Role', align: { minimum: 'right', tablet: 'left' }, width: { tablet: '160px' } },
713
718
  ] as const;
714
719
 
715
720
  <Table
@@ -1311,20 +1316,32 @@ import { Snackbar, useSnackbar } from '@zvoove/unity-ui';
1311
1316
  <Snackbar />
1312
1317
 
1313
1318
  // In any component:
1314
- const { addSnackbar } = useSnackbar();
1319
+ const { snackbar, update, dismiss, dismissAll } = useSnackbar();
1315
1320
 
1316
- addSnackbar('Operation successful', {
1321
+ const id = snackbar('Operation successful', {
1317
1322
  variant: 'positive', // 'default' | 'positive' | 'warning' | 'error' | 'subtle'
1318
1323
  placement: 'top-right', // 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
1319
1324
  icon: 'Check', // CommonIconNames
1320
1325
  showCloseButton: true, // boolean
1321
- actionLabel: 'Undo', // string
1322
- onAction: handleUndo, // (id: string) => void
1326
+ hideIcon: false, // boolean — hide the variant icon
1327
+ actions: [ // SnackbarAction[] flexible Button actions
1328
+ { label: 'Dismiss' }, // secondary (auto variant per snackbar variant)
1329
+ { label: 'Undo' }, // primary (last = filled style)
1330
+ ],
1323
1331
  onClose: handleClose, // (id: string) => void
1324
1332
  duration: 5000, // number (ms)
1325
1333
  });
1326
1334
  ```
1327
1335
 
1336
+ Action buttons render as real `<Button>` components. The last action defaults to
1337
+ the primary variant; preceding actions use the secondary variant. Each
1338
+ `SnackbarAction` accepts `{ label, onClick?, variant? }`.
1339
+
1340
+ `update(id, message, options?)` updates a snackbar in-place. Ideal for selection
1341
+ bars or counters.
1342
+
1343
+ > Legacy `actionLabel`/`onAction` still work but are deprecated.
1344
+
1328
1345
  ### InfoBox
1329
1346
  Inline informational message.
1330
1347
  ```tsx