@eqtylab/equality 2.1.0 → 2.1.1

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.
@@ -43,3 +43,66 @@
43
43
  --badge-bg-color: var(--color-badge-background-compliant);
44
44
  --badge-fg-color: var(--color-badge-text-compliant);
45
45
  }
46
+ .split-badge {
47
+ display: inline-flex;
48
+ width: max-content;
49
+ align-items: center;
50
+ font-size: 0.75rem;
51
+ line-height: var(--tw-leading, calc(1 / 0.75));
52
+ --tw-font-weight: 500;
53
+ font-weight: 500;
54
+ --tw-numeric-spacing: tabular-nums;
55
+ font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
56
+ }
57
+ .split-badge__status {
58
+ display: inline-flex;
59
+ align-items: center;
60
+ gap: calc(0.25rem * 1);
61
+ min-height: calc(0.25rem * 5);
62
+ padding-inline: calc(0.25rem * 2);
63
+ padding-block: calc(0.25rem * 0.5);
64
+ border-top-left-radius: calc(infinity * 1px);
65
+ border-bottom-left-radius: calc(infinity * 1px);
66
+ border: 1px solid transparent;
67
+ background-color: var(--badge-bg-color);
68
+ color: var(--badge-fg-color);
69
+ }
70
+ .split-badge__sub-status {
71
+ display: inline-flex;
72
+ align-items: center;
73
+ min-height: calc(0.25rem * 5);
74
+ padding-inline: calc(0.25rem * 2);
75
+ padding-block: calc(0.25rem * 0.5);
76
+ border-top-right-radius: calc(infinity * 1px);
77
+ border-bottom-right-radius: calc(infinity * 1px);
78
+ margin-left: -1px;
79
+ border: 1px solid var(--badge-bg-color);
80
+ color: var(--badge-fg-color);
81
+ }
82
+ .split-badge .icon {
83
+ color: inherit;
84
+ }
85
+ @property --tw-font-weight {
86
+ syntax: "*";
87
+ inherits: false;
88
+ }
89
+ @property --tw-ordinal {
90
+ syntax: "*";
91
+ inherits: false;
92
+ }
93
+ @property --tw-slashed-zero {
94
+ syntax: "*";
95
+ inherits: false;
96
+ }
97
+ @property --tw-numeric-figure {
98
+ syntax: "*";
99
+ inherits: false;
100
+ }
101
+ @property --tw-numeric-spacing {
102
+ syntax: "*";
103
+ inherits: false;
104
+ }
105
+ @property --tw-numeric-fraction {
106
+ syntax: "*";
107
+ inherits: false;
108
+ }
package/dist/index.cjs CHANGED
@@ -3603,6 +3603,18 @@ var Heading = React16.forwardRef(
3603
3603
  Heading.displayName = "Heading";
3604
3604
  var ControlStatusBadge = ({ status, display = "both" }) => {
3605
3605
  const config = getStatusConfig(status);
3606
+ if (config.subLabel) {
3607
+ if (display === "icon-only") {
3608
+ return /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: config.icon, display: "icon-only", className: config.className, variant: null, children: config.label });
3609
+ }
3610
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(styles61__default.default["split-badge"], config.className), children: [
3611
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles61__default.default["split-badge__status"], children: [
3612
+ display !== "text-only" && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: config.icon, size: "xs", className: styles61__default.default["icon"] }),
3613
+ config.label
3614
+ ] }),
3615
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles61__default.default["split-badge__sub-status"], children: config.subLabel })
3616
+ ] });
3617
+ }
3606
3618
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: config.icon, display, className: config.className, variant: null, children: config.label });
3607
3619
  };
3608
3620
  var getStatusConfig = (status) => {
@@ -3615,7 +3627,7 @@ var getStatusConfig = (status) => {
3615
3627
  };
3616
3628
  case "not-started":
3617
3629
  return {
3618
- icon: "Circle",
3630
+ icon: "CircleDashed",
3619
3631
  className: styles61__default.default["badge--not-started"],
3620
3632
  label: "Not Started"
3621
3633
  };
@@ -3633,9 +3645,10 @@ var getStatusConfig = (status) => {
3633
3645
  };
3634
3646
  case "comment":
3635
3647
  return {
3636
- icon: "MessageCircle",
3648
+ icon: "Eye",
3637
3649
  className: styles61__default.default["badge--comment"],
3638
- label: "Comment"
3650
+ label: "In Review",
3651
+ subLabel: "General"
3639
3652
  };
3640
3653
  case "not-applicable":
3641
3654
  return {
@@ -3645,44 +3658,40 @@ var getStatusConfig = (status) => {
3645
3658
  };
3646
3659
  case "accepted":
3647
3660
  return {
3648
- icon: /* @__PURE__ */ jsxRuntime.jsx(MessageCircleCheckIcon, {}),
3661
+ icon: "Eye",
3649
3662
  className: styles61__default.default["badge--accepted"],
3650
- label: "Accepted"
3663
+ label: "In Review",
3664
+ subLabel: "Accepted"
3651
3665
  };
3652
3666
  case "questioned":
3653
3667
  return {
3654
- icon: "MessageCircleQuestion",
3668
+ icon: "Eye",
3655
3669
  className: styles61__default.default["badge--question"],
3656
- label: "Questioned"
3657
- };
3658
- case "general":
3659
- return {
3660
- icon: "MessageCircle",
3661
- className: styles61__default.default["badge--comment"],
3662
- label: "General"
3670
+ label: "In Review",
3671
+ subLabel: "Questioned"
3663
3672
  };
3664
3673
  case "compliant":
3665
3674
  return {
3666
- icon: "Check",
3675
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CircleCheckFillIcon, {}),
3667
3676
  className: styles61__default.default["badge--compliant"],
3668
3677
  label: "Compliant"
3669
3678
  };
3670
3679
  case "non-compliant":
3671
3680
  return {
3672
- icon: "TriangleAlert",
3681
+ icon: "X",
3673
3682
  className: styles61__default.default["badge--non-compliant"],
3674
3683
  label: "Non-compliant"
3675
3684
  };
3676
3685
  default:
3677
3686
  return {
3678
- icon: "Circle",
3687
+ icon: "CircleDashed",
3679
3688
  className: styles61__default.default["badge--not-started"],
3680
3689
  label: status
3681
3690
  };
3682
3691
  }
3683
3692
  };
3684
- var MessageCircleCheckIcon = ({ className }) => {
3685
- return /* @__PURE__ */ jsxRuntime.jsxs(
3693
+ var CircleCheckFillIcon = ({ className }) => {
3694
+ return /* @__PURE__ */ jsxRuntime.jsx(
3686
3695
  "svg",
3687
3696
  {
3688
3697
  className,
@@ -3690,15 +3699,8 @@ var MessageCircleCheckIcon = ({ className }) => {
3690
3699
  width: "12",
3691
3700
  height: "12",
3692
3701
  viewBox: "0 0 24 24",
3693
- fill: "none",
3694
- stroke: "currentColor",
3695
- "stroke-width": "2",
3696
- "stroke-linecap": "round",
3697
- "stroke-linejoin": "round",
3698
- children: [
3699
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }),
3700
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 12 2 2 4-4" })
3701
- ]
3702
+ fill: "currentColor",
3703
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM15.707 9.29297C15.3165 8.90245 14.6835 8.90244 14.293 9.29297L11 12.5859L9.70703 11.293C9.31651 10.9024 8.68349 10.9024 8.29297 11.293C7.90244 11.6835 7.90245 12.3165 8.29297 12.707L10.293 14.707C10.6835 15.0976 11.3165 15.0976 11.707 14.707L15.707 10.707C16.0976 10.3165 16.0976 9.68349 15.707 9.29297Z" })
3702
3704
  }
3703
3705
  );
3704
3706
  };