@nextlyhq/ui 0.0.2-alpha.71 → 0.0.2-alpha.73
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 +3 -1
- package/dist/format.cjs +6 -0
- package/dist/format.cjs.map +1 -1
- package/dist/format.d.cts +14 -1
- package/dist/format.d.ts +14 -1
- package/dist/format.mjs +6 -1
- package/dist/format.mjs.map +1 -1
- package/dist/index.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.scoped.css +1 -1
- package/dist/theme.css +32 -32
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -1497,10 +1497,17 @@ type AlertDialogDescriptionProps = ComponentPropsWithoutRef<typeof AlertDialogPr
|
|
|
1497
1497
|
*/
|
|
1498
1498
|
declare const AlertDialogDescription: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogDescriptionProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Description>>>;
|
|
1499
1499
|
/** @experimental */
|
|
1500
|
-
type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action
|
|
1500
|
+
type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
|
|
1501
|
+
/**
|
|
1502
|
+
* `"destructive"` when confirming deletes data; anything else a dialog
|
|
1503
|
+
* confirms (a save, a publish, a restore) stays `"primary"`, the default.
|
|
1504
|
+
*/
|
|
1505
|
+
variant?: "primary" | "destructive";
|
|
1506
|
+
};
|
|
1501
1507
|
/**
|
|
1502
|
-
* AlertDialogAction - The
|
|
1503
|
-
*
|
|
1508
|
+
* AlertDialogAction - The confirming action button (e.g., "Save", "Delete").
|
|
1509
|
+
* Primary by default: red is kept for confirming a deletion, so it means one
|
|
1510
|
+
* thing wherever it appears.
|
|
1504
1511
|
* @experimental
|
|
1505
1512
|
*/
|
|
1506
1513
|
declare const AlertDialogAction: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogActionProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Action>>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1497,10 +1497,17 @@ type AlertDialogDescriptionProps = ComponentPropsWithoutRef<typeof AlertDialogPr
|
|
|
1497
1497
|
*/
|
|
1498
1498
|
declare const AlertDialogDescription: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogDescriptionProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Description>>>;
|
|
1499
1499
|
/** @experimental */
|
|
1500
|
-
type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action
|
|
1500
|
+
type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
|
|
1501
|
+
/**
|
|
1502
|
+
* `"destructive"` when confirming deletes data; anything else a dialog
|
|
1503
|
+
* confirms (a save, a publish, a restore) stays `"primary"`, the default.
|
|
1504
|
+
*/
|
|
1505
|
+
variant?: "primary" | "destructive";
|
|
1506
|
+
};
|
|
1501
1507
|
/**
|
|
1502
|
-
* AlertDialogAction - The
|
|
1503
|
-
*
|
|
1508
|
+
* AlertDialogAction - The confirming action button (e.g., "Save", "Delete").
|
|
1509
|
+
* Primary by default: red is kept for confirming a deletion, so it means one
|
|
1510
|
+
* thing wherever it appears.
|
|
1504
1511
|
* @experimental
|
|
1505
1512
|
*/
|
|
1506
1513
|
declare const AlertDialogAction: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogActionProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Action>>>;
|
package/dist/index.mjs
CHANGED
|
@@ -1637,7 +1637,8 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
1637
1637
|
* AlertDialog Component
|
|
1638
1638
|
*
|
|
1639
1639
|
* A modal dialog for important confirmations that require user acknowledgment.
|
|
1640
|
-
* Built on Radix UI primitives
|
|
1640
|
+
* Built on Radix UI primitives. Its confirming action is primary; pass
|
|
1641
|
+
* `variant="destructive"` only when confirming deletes data.
|
|
1641
1642
|
*
|
|
1642
1643
|
* @example
|
|
1643
1644
|
* ```tsx
|
|
@@ -1654,7 +1655,9 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
1654
1655
|
* </AlertDialogHeader>
|
|
1655
1656
|
* <AlertDialogFooter>
|
|
1656
1657
|
* <AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
1657
|
-
* <AlertDialogAction onClick={handleDelete}>
|
|
1658
|
+
* <AlertDialogAction variant="destructive" onClick={handleDelete}>
|
|
1659
|
+
* Delete
|
|
1660
|
+
* </AlertDialogAction>
|
|
1658
1661
|
* </AlertDialogFooter>
|
|
1659
1662
|
* </AlertDialogContent>
|
|
1660
1663
|
* </AlertDialog>
|
|
@@ -1746,13 +1749,14 @@ const AlertDialogDescription = forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1746
1749
|
}));
|
|
1747
1750
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
1748
1751
|
/**
|
|
1749
|
-
* AlertDialogAction - The
|
|
1750
|
-
*
|
|
1752
|
+
* AlertDialogAction - The confirming action button (e.g., "Save", "Delete").
|
|
1753
|
+
* Primary by default: red is kept for confirming a deletion, so it means one
|
|
1754
|
+
* thing wherever it appears.
|
|
1751
1755
|
* @experimental
|
|
1752
1756
|
*/
|
|
1753
|
-
const AlertDialogAction = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
|
|
1757
|
+
const AlertDialogAction = forwardRef(({ className, children, variant = "primary", ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
|
|
1754
1758
|
ref,
|
|
1755
|
-
className: cn(buttonVariants({ variant
|
|
1759
|
+
className: cn(buttonVariants({ variant }), className),
|
|
1756
1760
|
...props,
|
|
1757
1761
|
children
|
|
1758
1762
|
}));
|
|
@@ -2706,7 +2710,9 @@ function Toaster({ theme = "system", ...props }) {
|
|
|
2706
2710
|
"--normal-bg": "var(--nx-popover)",
|
|
2707
2711
|
"--normal-text": "var(--nx-popover-foreground)",
|
|
2708
2712
|
"--normal-border": "var(--nx-border)",
|
|
2709
|
-
"--border-radius": "0px"
|
|
2713
|
+
"--border-radius": "0px",
|
|
2714
|
+
"--success-bg": "var(--nx-toast-success-bg)",
|
|
2715
|
+
"--success-text": "var(--nx-toast-success-text)"
|
|
2710
2716
|
},
|
|
2711
2717
|
...props
|
|
2712
2718
|
});
|