@sikka/hawa 0.42.9-next → 0.42.11-next

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.
@@ -47,7 +47,7 @@ type AppSidebarItemProps = {
47
47
  label: string;
48
48
  badge?: {
49
49
  label: string;
50
- color: ChipColors;
50
+ color?: ChipColors;
51
51
  };
52
52
  icon?: any;
53
53
  subitems?: SubItem[];
@@ -58,6 +58,10 @@ type SubItem = {
58
58
  value: string;
59
59
  label: string;
60
60
  slug?: string;
61
+ badge?: {
62
+ label: string;
63
+ color?: ChipColors;
64
+ };
61
65
  icon?: any;
62
66
  onMouseDown?: (e: React.MouseEvent) => void;
63
67
  onClick?: (e: React.MouseEvent) => void;
@@ -47,7 +47,7 @@ type AppSidebarItemProps = {
47
47
  label: string;
48
48
  badge?: {
49
49
  label: string;
50
- color: ChipColors;
50
+ color?: ChipColors;
51
51
  };
52
52
  icon?: any;
53
53
  subitems?: SubItem[];
@@ -58,6 +58,10 @@ type SubItem = {
58
58
  value: string;
59
59
  label: string;
60
60
  slug?: string;
61
+ badge?: {
62
+ label: string;
63
+ color?: ChipColors;
64
+ };
61
65
  icon?: any;
62
66
  onMouseDown?: (e: React.MouseEvent) => void;
63
67
  onClick?: (e: React.MouseEvent) => void;
@@ -1154,11 +1154,19 @@ var SidebarItem = ({
1154
1154
  "span",
1155
1155
  {
1156
1156
  className: cn(
1157
- "hawa-transition-all",
1157
+ "hawa-transition-all hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap",
1158
1158
  isOpen ? "hawa-opacity-100" : "hawa-opacity-0"
1159
1159
  )
1160
1160
  },
1161
- item.label
1161
+ item.label,
1162
+ item.badge && /* @__PURE__ */ React11.createElement(
1163
+ Chip,
1164
+ {
1165
+ label: item.badge.label,
1166
+ color: item.badge.color,
1167
+ size: "small"
1168
+ }
1169
+ )
1162
1170
  )
1163
1171
  )
1164
1172
  ),
@@ -1195,7 +1203,15 @@ var SidebarItem = ({
1195
1203
  )
1196
1204
  },
1197
1205
  subitem.icon && subitem.icon,
1198
- subitem.label
1206
+ subitem.label,
1207
+ subitem.badge && /* @__PURE__ */ React11.createElement(
1208
+ Chip,
1209
+ {
1210
+ label: subitem.badge.label,
1211
+ color: subitem.badge.color,
1212
+ size: "small"
1213
+ }
1214
+ )
1199
1215
  ))
1200
1216
  ))
1201
1217
  );
@@ -1234,7 +1250,14 @@ var SidebarItem = ({
1234
1250
  },
1235
1251
  item.label,
1236
1252
  " ",
1237
- item.badge && /* @__PURE__ */ React11.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
1253
+ item.badge && /* @__PURE__ */ React11.createElement(
1254
+ Chip,
1255
+ {
1256
+ label: item.badge.label,
1257
+ color: item.badge.color,
1258
+ size: "small"
1259
+ }
1260
+ )
1238
1261
  ))
1239
1262
  );
1240
1263
  }