@sikka/hawa 0.16.4-next → 0.16.5-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.
package/dist/index.css CHANGED
@@ -2552,6 +2552,10 @@ input[type="number"]::-webkit-inner-spin-button,
2552
2552
  --tw-text-opacity: 1;
2553
2553
  color: rgb(34 197 94 / var(--tw-text-opacity));
2554
2554
  }
2555
+ .hawa-text-green-600 {
2556
+ --tw-text-opacity: 1;
2557
+ color: rgb(22 163 74 / var(--tw-text-opacity));
2558
+ }
2555
2559
  .hawa-text-helper-color {
2556
2560
  color: hsl(var(--helper-text));
2557
2561
  }
@@ -2603,6 +2607,10 @@ input[type="number"]::-webkit-inner-spin-button,
2603
2607
  --tw-text-opacity: 1;
2604
2608
  color: rgb(239 68 68 / var(--tw-text-opacity));
2605
2609
  }
2610
+ .hawa-text-red-600 {
2611
+ --tw-text-opacity: 1;
2612
+ color: rgb(220 38 38 / var(--tw-text-opacity));
2613
+ }
2606
2614
  .hawa-text-secondary-foreground {
2607
2615
  color: hsl(var(--secondary-foreground));
2608
2616
  }
@@ -3659,6 +3667,10 @@ body {
3659
3667
  --tw-text-opacity: 1;
3660
3668
  color: rgb(107 114 128 / var(--tw-text-opacity));
3661
3669
  }
3670
+ :is(.hawa-dark .dark\:hawa-text-green-500) {
3671
+ --tw-text-opacity: 1;
3672
+ color: rgb(34 197 94 / var(--tw-text-opacity));
3673
+ }
3662
3674
  :is(.hawa-dark .dark\:hawa-text-green-800) {
3663
3675
  --tw-text-opacity: 1;
3664
3676
  color: rgb(22 101 52 / var(--tw-text-opacity));
@@ -3678,6 +3690,10 @@ body {
3678
3690
  --tw-text-opacity: 1;
3679
3691
  color: rgb(254 226 226 / var(--tw-text-opacity));
3680
3692
  }
3693
+ :is(.hawa-dark .dark\:hawa-text-red-500) {
3694
+ --tw-text-opacity: 1;
3695
+ color: rgb(239 68 68 / var(--tw-text-opacity));
3696
+ }
3681
3697
  :is(.hawa-dark .dark\:hawa-text-white) {
3682
3698
  --tw-text-opacity: 1;
3683
3699
  color: rgb(255 255 255 / var(--tw-text-opacity));
package/dist/index.d.mts CHANGED
@@ -940,11 +940,12 @@ declare const StopPropagationWrapper: (props: any) => React__default.JSX.Element
940
940
 
941
941
  declare const FileUploader: ({ handleFile, className }: any) => React__default.JSX.Element;
942
942
 
943
- type StatTypes = {
943
+ interface StatTypes extends React__default.HTMLAttributes<HTMLDivElement> {
944
944
  label?: string;
945
945
  color?: string;
946
946
  number?: string;
947
947
  helperText?: string;
948
+ helperTextColor?: "default" | "positive" | "negative" | "muted";
948
949
  chart?: any;
949
950
  icon?: any;
950
951
  variant?: "default" | "plain" | "contained" | "outlined" | "brutalist" | "dropshadow";
@@ -952,7 +953,7 @@ type StatTypes = {
952
953
  isLoading?: boolean;
953
954
  handleClick?: (e: React__default.MouseEvent) => void;
954
955
  className?: string;
955
- };
956
+ }
956
957
  declare const Stats: FC<StatTypes>;
957
958
 
958
959
  type AppLayoutSidebarItemProps = {
package/dist/index.d.ts CHANGED
@@ -940,11 +940,12 @@ declare const StopPropagationWrapper: (props: any) => React__default.JSX.Element
940
940
 
941
941
  declare const FileUploader: ({ handleFile, className }: any) => React__default.JSX.Element;
942
942
 
943
- type StatTypes = {
943
+ interface StatTypes extends React__default.HTMLAttributes<HTMLDivElement> {
944
944
  label?: string;
945
945
  color?: string;
946
946
  number?: string;
947
947
  helperText?: string;
948
+ helperTextColor?: "default" | "positive" | "negative" | "muted";
948
949
  chart?: any;
949
950
  icon?: any;
950
951
  variant?: "default" | "plain" | "contained" | "outlined" | "brutalist" | "dropshadow";
@@ -952,7 +953,7 @@ type StatTypes = {
952
953
  isLoading?: boolean;
953
954
  handleClick?: (e: React__default.MouseEvent) => void;
954
955
  className?: string;
955
- };
956
+ }
956
957
  declare const Stats: FC<StatTypes>;
957
958
 
958
959
  type AppLayoutSidebarItemProps = {
package/dist/index.js CHANGED
@@ -7057,28 +7057,39 @@ var NavigationMenu = function(props) {
7057
7057
  // components/layout/Stats.tsx
7058
7058
  var import_react36 = __toESM(require("react"));
7059
7059
  var Stats = function(_param) {
7060
- var _param_variant = _param.variant, variant = _param_variant === void 0 ? "default" : _param_variant, props = _object_without_properties(_param, [
7060
+ var label = _param.label, icon = _param.icon, isLoading = _param.isLoading, number = _param.number, helperText = _param.helperText, _param_helperTextColor = _param.helperTextColor, helperTextColor = _param_helperTextColor === void 0 ? "default" : _param_helperTextColor, chart = _param.chart, _param_variant = _param.variant, variant = _param_variant === void 0 ? "default" : _param_variant, props = _object_without_properties(_param, [
7061
+ "label",
7062
+ "icon",
7063
+ "isLoading",
7064
+ "number",
7065
+ "helperText",
7066
+ "helperTextColor",
7067
+ "chart",
7061
7068
  "variant"
7062
7069
  ]);
7063
- return /* @__PURE__ */ import_react36.default.createElement(Card, {
7064
- onMouseDown: props.handleClick,
7065
- clickable: Boolean(props.handleClick),
7066
- className: cn(props.className)
7067
- }, /* @__PURE__ */ import_react36.default.createElement("div", {
7070
+ var helperTextColorStyles = {
7071
+ default: "",
7072
+ positive: "hawa-text-green-600 dark:hawa-text-green-500",
7073
+ negative: "hawa-text-red-600 dark:hawa-text-red-500",
7074
+ muted: "hawa-text-muted-foreground"
7075
+ };
7076
+ return /* @__PURE__ */ import_react36.default.createElement(Card, _object_spread_props(_object_spread({}, props), {
7077
+ clickable: Boolean(props.onClick)
7078
+ }), /* @__PURE__ */ import_react36.default.createElement("div", {
7068
7079
  className: "hawa-flex hawa-flex-row hawa-justify-between hawa-p-4 hawa-items-center"
7069
7080
  }, /* @__PURE__ */ import_react36.default.createElement(CardTitle, {
7070
7081
  className: "hawa-text-sm hawa-font-medium"
7071
- }, props.label), props.icon && /* @__PURE__ */ import_react36.default.createElement("span", null, props.icon)), /* @__PURE__ */ import_react36.default.createElement(CardContent, null, props.isLoading ? /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
7082
+ }, label), icon && /* @__PURE__ */ import_react36.default.createElement("span", null, icon)), /* @__PURE__ */ import_react36.default.createElement(CardContent, null, isLoading ? /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
7072
7083
  className: "hawa-h-8 hawa-w-3/4"
7073
7084
  }) : /* @__PURE__ */ import_react36.default.createElement("div", {
7074
7085
  className: "hawa-text-2xl hawa-font-bold"
7075
- }, props.number), props.isLoading && props.helperText ? /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
7086
+ }, number), isLoading && helperText ? /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
7076
7087
  className: "hawa-mt-2 hawa-h-4 hawa-w-1/2"
7077
7088
  }) : /* @__PURE__ */ import_react36.default.createElement("p", {
7078
- className: cn("hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start", props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0")
7079
- }, props.helperText), props.isLoading && props.chart ? /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
7089
+ className: cn("hawa-my-0 hawa-text-xs hawa-transition-all hawa-text-start", helperTextColorStyles[helperTextColor], helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0")
7090
+ }, helperText), isLoading && chart ? /* @__PURE__ */ import_react36.default.createElement(Skeleton, {
7080
7091
  className: "hawa-mt-2 hawa-h-4 hawa-w-1/2"
7081
- }) : props.chart));
7092
+ }) : chart));
7082
7093
  };
7083
7094
  // components/layout/Sidebar.tsx
7084
7095
  var React62 = __toESM(require("react"));
package/dist/index.mjs CHANGED
@@ -6864,26 +6864,34 @@ var NavigationMenu = (props) => {
6864
6864
 
6865
6865
  // components/layout/Stats.tsx
6866
6866
  import React61 from "react";
6867
- var Stats = ({ variant = "default", ...props }) => {
6868
- return /* @__PURE__ */ React61.createElement(
6869
- Card,
6867
+ var Stats = ({
6868
+ label,
6869
+ icon,
6870
+ isLoading,
6871
+ number,
6872
+ helperText,
6873
+ helperTextColor = "default",
6874
+ chart,
6875
+ variant = "default",
6876
+ ...props
6877
+ }) => {
6878
+ let helperTextColorStyles = {
6879
+ default: "",
6880
+ positive: "hawa-text-green-600 dark:hawa-text-green-500",
6881
+ negative: "hawa-text-red-600 dark:hawa-text-red-500",
6882
+ muted: "hawa-text-muted-foreground"
6883
+ };
6884
+ return /* @__PURE__ */ React61.createElement(Card, { ...props, clickable: Boolean(props.onClick) }, /* @__PURE__ */ React61.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between hawa-p-4 hawa-items-center" }, /* @__PURE__ */ React61.createElement(CardTitle, { className: "hawa-text-sm hawa-font-medium" }, label), icon && /* @__PURE__ */ React61.createElement("span", null, icon)), /* @__PURE__ */ React61.createElement(CardContent, null, isLoading ? /* @__PURE__ */ React61.createElement(Skeleton, { className: "hawa-h-8 hawa-w-3/4" }) : /* @__PURE__ */ React61.createElement("div", { className: "hawa-text-2xl hawa-font-bold" }, number), isLoading && helperText ? /* @__PURE__ */ React61.createElement(Skeleton, { className: "hawa-mt-2 hawa-h-4 hawa-w-1/2" }) : /* @__PURE__ */ React61.createElement(
6885
+ "p",
6870
6886
  {
6871
- onMouseDown: props.handleClick,
6872
- clickable: Boolean(props.handleClick),
6873
- className: cn(props.className)
6887
+ className: cn(
6888
+ "hawa-my-0 hawa-text-xs hawa-transition-all hawa-text-start",
6889
+ helperTextColorStyles[helperTextColor],
6890
+ helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0"
6891
+ )
6874
6892
  },
6875
- /* @__PURE__ */ React61.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between hawa-p-4 hawa-items-center" }, /* @__PURE__ */ React61.createElement(CardTitle, { className: "hawa-text-sm hawa-font-medium" }, props.label), props.icon && /* @__PURE__ */ React61.createElement("span", null, props.icon)),
6876
- /* @__PURE__ */ React61.createElement(CardContent, null, props.isLoading ? /* @__PURE__ */ React61.createElement(Skeleton, { className: "hawa-h-8 hawa-w-3/4" }) : /* @__PURE__ */ React61.createElement("div", { className: "hawa-text-2xl hawa-font-bold" }, props.number), props.isLoading && props.helperText ? /* @__PURE__ */ React61.createElement(Skeleton, { className: "hawa-mt-2 hawa-h-4 hawa-w-1/2" }) : /* @__PURE__ */ React61.createElement(
6877
- "p",
6878
- {
6879
- className: cn(
6880
- "hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start",
6881
- props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0"
6882
- )
6883
- },
6884
- props.helperText
6885
- ), props.isLoading && props.chart ? /* @__PURE__ */ React61.createElement(Skeleton, { className: "hawa-mt-2 hawa-h-4 hawa-w-1/2" }) : props.chart)
6886
- );
6893
+ helperText
6894
+ ), isLoading && chart ? /* @__PURE__ */ React61.createElement(Skeleton, { className: "hawa-mt-2 hawa-h-4 hawa-w-1/2" }) : chart));
6887
6895
  };
6888
6896
 
6889
6897
  // components/layout/Sidebar.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.16.4-next",
3
+ "version": "0.16.5-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {