@popgrids/ui 0.0.36 → 0.0.38

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/index.cjs CHANGED
@@ -1466,6 +1466,87 @@ function InputGroupTextarea({ className, ...props }) {
1466
1466
  }
1467
1467
  );
1468
1468
  }
1469
+ var inputStatusVariants = classVarianceAuthority.cva(
1470
+ "inline-flex h-10 min-w-[54px] cursor-pointer items-stretch rounded-sm border-0 bg-transparent p-0 outline-none transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1471
+ {
1472
+ variants: {
1473
+ theme: {
1474
+ approve: "text-success-700 dark:text-success-200",
1475
+ publish: "text-success-700 dark:text-success-200",
1476
+ feedback: "text-success-700 dark:text-success-200",
1477
+ flagged: "text-warning-700 dark:text-warning-200",
1478
+ review: "text-warning-700 dark:text-warning-200",
1479
+ delete: "text-error-600 dark:text-error-300",
1480
+ blocked: "text-error-600 dark:text-error-300",
1481
+ reject: "text-error-600 dark:text-error-300"
1482
+ },
1483
+ variant: {
1484
+ community: "",
1485
+ content: ""
1486
+ }
1487
+ },
1488
+ defaultVariants: {
1489
+ theme: "approve",
1490
+ variant: "community"
1491
+ }
1492
+ }
1493
+ );
1494
+ var inputStatusInnerVariants = classVarianceAuthority.cva(
1495
+ "flex flex-1 items-center gap-0.5 overflow-hidden rounded-sm py-2.5 pr-1.5 pl-[10px]",
1496
+ {
1497
+ variants: {
1498
+ theme: {
1499
+ approve: "bg-success-100 dark:bg-success-200/16",
1500
+ publish: "bg-success-100 dark:bg-success-200/16",
1501
+ feedback: "bg-success-100 dark:bg-success-200/16",
1502
+ flagged: "bg-warning-100 dark:bg-warning-200/16",
1503
+ review: "bg-warning-100 dark:bg-warning-200/16",
1504
+ delete: "bg-error-100 dark:bg-error-300/16",
1505
+ blocked: "bg-error-100 dark:bg-error-300/16",
1506
+ reject: "bg-error-100 dark:bg-error-300/16"
1507
+ }
1508
+ },
1509
+ defaultVariants: {
1510
+ theme: "approve"
1511
+ }
1512
+ }
1513
+ );
1514
+ var STATUS_ICON = {
1515
+ flagged: icons.Hourglass03,
1516
+ review: icons.Hourglass03,
1517
+ approve: icons.ThumbsUp,
1518
+ publish: icons.CheckCircle,
1519
+ feedback: icons.MessageAlertSquare,
1520
+ delete: icons.ThumbsDown,
1521
+ blocked: icons.SlashCircle01,
1522
+ reject: icons.ThumbsDown
1523
+ };
1524
+ function InputStatus({
1525
+ className,
1526
+ theme = "approve",
1527
+ variant = "community",
1528
+ open = false,
1529
+ "aria-expanded": ariaExpanded,
1530
+ type = "button",
1531
+ ...props
1532
+ }) {
1533
+ const Icon = STATUS_ICON[theme];
1534
+ const expanded = ariaExpanded !== void 0 ? ariaExpanded : open;
1535
+ return /* @__PURE__ */ jsxRuntime.jsx(
1536
+ button.Button,
1537
+ {
1538
+ "data-slot": "input-status",
1539
+ type,
1540
+ "aria-expanded": expanded,
1541
+ className: cn(inputStatusVariants({ theme, variant }), className),
1542
+ ...props,
1543
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: inputStatusInnerVariants({ theme }), children: [
1544
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-5", "aria-hidden": true }),
1545
+ open ? /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronUp, { className: "size-4", "aria-hidden": true }) : /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDown, { className: "size-4", "aria-hidden": true })
1546
+ ] })
1547
+ }
1548
+ );
1549
+ }
1469
1550
  function Label({ className, render, ...props }) {
1470
1551
  const defaultProps = {
1471
1552
  "data-slot": "label",
@@ -1906,8 +1987,8 @@ var tagVariants = classVarianceAuthority.cva(
1906
1987
  {
1907
1988
  variants: {
1908
1989
  selected: {
1909
- false: "text-primary ring ring-primary ring-offset-0 focus-visible:bg-primary focus-visible:text-primary",
1910
- true: "bg-primary text-primary-foreground dark:text-primary-foreground focus-visible:bg-primary focus-visible:text-primary-foreground dark:focus-visible:bg-primary dark:focus-visible:text-primary-foreground"
1990
+ false: "text-primary dark:text-primary-foreground ring ring-primary dark:ring-1 dark:ring-primary-foreground ring-offset-0 focus-visible:bg-primary focus-visible:text-primary",
1991
+ true: "bg-primary text-primary-foreground dark:ring-1 dark:ring-primary-foreground dark:bg-primary-foreground/5 dark:text-primary-foreground focus-visible:bg-primary focus-visible:text-primary-foreground dark:focus-visible:bg-primary dark:focus-visible:text-primary-foreground"
1911
1992
  },
1912
1993
  interactive: {
1913
1994
  false: null,
@@ -2090,6 +2171,7 @@ exports.InputGroupButton = InputGroupButton;
2090
2171
  exports.InputGroupInput = InputGroupInput;
2091
2172
  exports.InputGroupText = InputGroupText;
2092
2173
  exports.InputGroupTextarea = InputGroupTextarea;
2174
+ exports.InputStatus = InputStatus;
2093
2175
  exports.Label = Label;
2094
2176
  exports.Loader = Loader;
2095
2177
  exports.Logo = Logo;