@zvoove/unity-ui 2.45.1 → 2.46.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
@@ -564,7 +564,8 @@ Primary action component with multiple variants.
564
564
  import { Button } from '@zvoove/unity-ui';
565
565
 
566
566
  <Button
567
- variant="filled" // ResponsiveType<'filled' | 'outlined' | 'text' | 'textSecondary' | 'elevated' | 'tonal' | 'linkPrimary' | 'linkSecondary' | 'positive' | 'negative'>
567
+ variant="filled" // ResponsiveType<'filled' | 'outlined' | 'text' | 'textSecondary' | 'elevated' | 'tonal' | 'linkPrimary' | 'linkSecondary' | 'positive' | 'negative' | 'warning' | 'neutral' | 'white' | 'subtle' | 'outlinedPositive' | 'outlinedNegative' | 'outlinedWarning' | 'outlinedNeutral' | 'outlinedSubtle' | 'linkPositive' | 'linkNegative' | 'linkWarning' | 'linkWhite' | 'textPositive' | 'textNegative' | 'textWarning' | 'textWhite' | 'textSubtle'>
568
+ contrast={false} // boolean — status variants only: use the container-tier color (lighter in light mode, darker in dark mode) instead of the vivid one
568
569
  size="lg" // ResponsiveType<'sm' | 'md' | 'lg'> (default: 'lg')
569
570
  icon="Plus" // CommonIconNames | Omit<IconProps, 'size' | 'color'>
570
571
  hideLabel={false} // ResponsiveType<boolean>
@@ -592,6 +593,29 @@ Variant guide:
592
593
  // Success action → positive
593
594
  <Button variant="positive" icon="check">Confirm</Button>
594
595
 
596
+ // Other status colors: warning, neutral, subtle. Each status color also has an
597
+ // `outlined` counterpart (outlinedPositive, outlinedNegative, outlinedWarning,
598
+ // outlinedNeutral, outlinedSubtle) for a less prominent action, a compact inline
599
+ // `link` counterpart (linkPositive, linkNegative, linkWarning) for a text-only
600
+ // action, and a button-shaped `text` counterpart (textPositive, textNegative,
601
+ // textWarning, textSubtle) for a full-sized text-only action. `link`/`text`
602
+ // counterparts use the same readable color as their `outlined` sibling, not the
603
+ // solid variant's (sometimes pale) background
604
+ <Button variant="warning" icon="warning">Proceed with caution</Button>
605
+ <Button variant="outlinedNegative" icon="delete">Delete</Button>
606
+ <Button variant="textPositive">Confirm</Button>
607
+
608
+ // contrast: swap a status variant to its container-tier color instead of the
609
+ // vivid one — use it to keep a status action legible when it sits on a
610
+ // background from the same color family (e.g. inside a matching colored InfoBox)
611
+ <Button variant="positive" contrast icon="check">Confirm</Button>
612
+
613
+ // white / linkWhite / textWhite: uses the `surface` color, which flips opposite
614
+ // of the current theme (white in light mode, dark in dark mode) — for an action
615
+ // on a background that itself flips opposite of the theme, like InfoBox's
616
+ // `default` variant
617
+ <Button variant="white">Confirm</Button>
618
+
595
619
  // Subtle/tertiary action → text
596
620
  <Button variant="text">Learn more</Button>
597
621
 
@@ -1312,10 +1336,11 @@ import { InfoBox } from '@zvoove/unity-ui';
1312
1336
  variant="positive" // 'default' | 'positive' | 'warning' | 'error' | 'subtle' | 'neutral' | 'outlined'
1313
1337
  icon="CheckCircle" // CommonIconNames
1314
1338
  elevated={true} // boolean (default: true)
1315
- borderRadius="sm" // 'none' | 'sm' | 'md' | 'lg' | 'xl' (default: 'sm')
1339
+ borderRadius="rounded" // 'none' | 'rounded' (default: 'rounded')
1340
+ leftBorder={true} // boolean (default: false); 4px border colored to match variant
1316
1341
  actions={[ // InfoBoxAction[] (optional)
1317
- { label: 'Learn more', onClick: handleLearnMore }, // defaults to text
1318
- { label: 'Continue', onClick: handleContinue }, // last defaults to filled
1342
+ { label: 'Learn more', onClick: handleLearnMore }, // defaults to a matching Button variant
1343
+ { label: 'Continue', onClick: handleContinue }, // last defaults to a matching Button variant
1319
1344
  ]}
1320
1345
  showCloseButton={true} // boolean (default: false)
1321
1346
  onClose={handleClose} // callback; InfoBox stays mounted
@@ -1327,6 +1352,12 @@ own width: content stays inline when it fits and moves the actions to a
1327
1352
  stacked row when the container is below the 480px boundary. A title always
1328
1353
  uses the stacked layout.
1329
1354
 
1355
+ Action buttons default to a Button variant matching the InfoBox's own `variant`
1356
+ (e.g. `error` → `negative` primary / `outlinedNegative` secondary, `default` →
1357
+ `white` primary / `textWhite` secondary) instead of the generic primary color,
1358
+ so they read as belonging to the same status. Pass `variant` on an individual
1359
+ action to override this.
1360
+
1330
1361
  ### ConfirmationCard
1331
1362
  Status card with actions.
1332
1363
  ```tsx