@zvoove/unity-ui 2.45.1 → 2.47.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
package/dist/theme.css CHANGED
@@ -520,6 +520,19 @@
520
520
  transform: scale(1);
521
521
  }
522
522
  }
523
+
524
+ @keyframes ai-gradient-move {
525
+ 0% {
526
+ background-position:
527
+ 0% 0%,
528
+ 0% 50%;
529
+ }
530
+ 100% {
531
+ background-position:
532
+ 0% 0%,
533
+ 200% 50%;
534
+ }
535
+ }
523
536
  }
524
537
 
525
538
  @layer base {
@@ -753,6 +766,38 @@
753
766
  animation: indeterminate 2s ease-in-out infinite;
754
767
  }
755
768
 
769
+ /*
770
+ * Moving multi-color gradient ring for an "AI is working" affordance.
771
+ * Classic two-background border trick: an inner solid layer clipped to
772
+ * padding-box (the fill) sits on top of a gradient layer clipped to
773
+ * border-box (the ring) — pair with a transparent border of the desired
774
+ * width. The gradient repeats its first color at the end and animates
775
+ * exactly one pattern-width, so the loop has no visible seam.
776
+ */
777
+ .ai-gradient-border {
778
+ background-image:
779
+ linear-gradient(var(--color-surface), var(--color-surface)),
780
+ linear-gradient(
781
+ 90deg,
782
+ var(--color-primary),
783
+ var(--color-tertiary),
784
+ var(--color-pink),
785
+ var(--color-secondary),
786
+ var(--color-steel-blue),
787
+ var(--color-primary)
788
+ );
789
+ background-origin: border-box;
790
+ background-clip: padding-box, border-box;
791
+ background-size:
792
+ 100% 100%,
793
+ 300% 100%;
794
+ animation: ai-gradient-move 6s linear infinite;
795
+
796
+ @media (prefers-reduced-motion: reduce) {
797
+ animation: none;
798
+ }
799
+ }
800
+
756
801
  .animate-circular-indeterminate {
757
802
  animation: circular-indeterminate 1.2s ease-in-out infinite;
758
803
  }