@sikka/hawa 0.7.3-next → 0.7.4-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
@@ -1122,9 +1122,6 @@ input[type="number"]::-webkit-inner-spin-button,
1122
1122
  .hawa-w-32 {
1123
1123
  width: 8rem;
1124
1124
  }
1125
- .hawa-w-36 {
1126
- width: 9rem;
1127
- }
1128
1125
  .hawa-w-4 {
1129
1126
  width: 1rem;
1130
1127
  }
package/dist/index.d.mts CHANGED
@@ -168,8 +168,8 @@ type TCheckBoxTypes = {
168
168
  sublabel?: any;
169
169
  helperText?: any;
170
170
  };
171
- type HawaCheckboxProps = TCheckBoxTypes & React$1.ComponentProps<typeof CheckboxElement>;
172
- declare const Checkbox: React$1.FC<HawaCheckboxProps>;
171
+ type CheckboxProps = TCheckBoxTypes & React$1.ComponentProps<typeof CheckboxElement>;
172
+ declare const Checkbox: React$1.FC<CheckboxProps>;
173
173
  declare const CheckboxElement: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
174
174
 
175
175
  declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
package/dist/index.d.ts CHANGED
@@ -168,8 +168,8 @@ type TCheckBoxTypes = {
168
168
  sublabel?: any;
169
169
  helperText?: any;
170
170
  };
171
- type HawaCheckboxProps = TCheckBoxTypes & React$1.ComponentProps<typeof CheckboxElement>;
172
- declare const Checkbox: React$1.FC<HawaCheckboxProps>;
171
+ type CheckboxProps = TCheckBoxTypes & React$1.ComponentProps<typeof CheckboxElement>;
172
+ declare const Checkbox: React$1.FC<CheckboxProps>;
173
173
  declare const CheckboxElement: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
174
174
 
175
175
  declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
package/dist/index.js CHANGED
@@ -1394,15 +1394,12 @@ var Checkbox = function(_param) {
1394
1394
  }, checkboxProps)), (label || helperText) && /* @__PURE__ */ React11.createElement("div", {
1395
1395
  className: "hawa-grid hawa-gap-1.5 hawa-leading-none"
1396
1396
  }, label && /* @__PURE__ */ React11.createElement("label", {
1397
- role: "checkbox",
1398
1397
  htmlFor: id,
1399
1398
  className: cn("hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-font-medium hawa-leading-none hawa-pt-0.5", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 ")
1400
1399
  }, label), sublabel && /* @__PURE__ */ React11.createElement("label", {
1401
- role: "checkbox",
1402
1400
  htmlFor: id,
1403
1401
  className: cn("hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-text-muted-foreground", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70")
1404
1402
  }, sublabel), helperText && !checkboxProps.disabled && /* @__PURE__ */ React11.createElement("label", {
1405
- role: "checkbox",
1406
1403
  htmlFor: id,
1407
1404
  className: cn("hawa-select-none hawa-text-xs hawa-text-red-500", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70")
1408
1405
  }, helperText)));
@@ -2455,7 +2452,8 @@ var FileDropzone = function(param) {
2455
2452
  setFiles(acceptedFiles);
2456
2453
  }, [
2457
2454
  acceptedFiles,
2458
- cmp
2455
+ cmp,
2456
+ setFiles
2459
2457
  ]);
2460
2458
  onClearFiles = function() {
2461
2459
  acceptedFiles.length = 0;
@@ -4989,6 +4987,7 @@ var Accordion = React36.forwardRef(function(_param, ref) /* @__PURE__ */ {
4989
4987
  }, /* @__PURE__ */ React36.createElement(AccordionTrigger, null, item.trigger), /* @__PURE__ */ React36.createElement(AccordionContent, null, item.content));
4990
4988
  }));
4991
4989
  });
4990
+ Accordion.displayName = "Accordion";
4992
4991
  var AccordionItem = React36.forwardRef(function(_param, ref) /* @__PURE__ */ {
4993
4992
  var className = _param.className, props = _object_without_properties(_param, [
4994
4993
  "className"
@@ -5310,7 +5309,10 @@ var BackToTop = function(_param) {
5310
5309
  (_props_anchor_current = props.anchor.current) === null || _props_anchor_current === void 0 ? void 0 : _props_anchor_current.removeEventListener("scroll", onScroll);
5311
5310
  clearInterval(interval);
5312
5311
  };
5313
- }, []);
5312
+ }, [
5313
+ onScroll,
5314
+ props.anchor
5315
+ ]);
5314
5316
  var getStyles = function() {
5315
5317
  var _self_current;
5316
5318
  if (!props.anchor.current || !self.current) return {};
@@ -6216,10 +6218,8 @@ var AppLayout = function(_param) {
6216
6218
  var isRTL = direction === "rtl";
6217
6219
  var _ref = _sliced_to_array((0, import_react31.useState)(""), 2), openedSidebarItem = _ref[0], setOpenedSidebarItem = _ref[1];
6218
6220
  var _ref1 = _sliced_to_array((0, import_react31.useState)(currentPage), 2), selectedItem = _ref1[0], setSelectedItem = _ref1[1];
6219
- var size;
6220
- if (typeof window !== "undefined") {
6221
- size = useBreakpoint_default();
6222
- } else {
6221
+ var size = useBreakpoint_default();
6222
+ if (typeof window == "undefined") {
6223
6223
  size = 1200;
6224
6224
  }
6225
6225
  var _ref2 = _sliced_to_array((0, import_react31.useState)(function() {
@@ -7934,7 +7934,7 @@ var NotFound = function(param) {
7934
7934
  className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold "
7935
7935
  }, (_texts_pageNotFound = texts === null || texts === void 0 ? void 0 : texts.pageNotFound) !== null && _texts_pageNotFound !== void 0 ? _texts_pageNotFound : "Page Not Found"), /* @__PURE__ */ import_react49.default.createElement("div", {
7936
7936
  className: "hawa-mb-4 hawa-text-center"
7937
- }, (_texts_ifLost = texts === null || texts === void 0 ? void 0 : texts.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, "If you're lost please contact us", " ", /* @__PURE__ */ import_react49.default.createElement("span", {
7937
+ }, (_texts_ifLost = texts === null || texts === void 0 ? void 0 : texts.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ import_react49.default.createElement("span", {
7938
7938
  className: "clickable-link"
7939
7939
  }, "help@sikka.io"))), /* @__PURE__ */ import_react49.default.createElement(Button, {
7940
7940
  className: "hawa-w-full"
package/dist/index.mjs CHANGED
@@ -751,7 +751,6 @@ var Checkbox = ({
751
751
  return /* @__PURE__ */ React11.createElement("div", { className: "hawa-items-top hawa-flex hawa-gap-2 " }, /* @__PURE__ */ React11.createElement(CheckboxElement, { id, ...checkboxProps }), (label || helperText) && /* @__PURE__ */ React11.createElement("div", { className: "hawa-grid hawa-gap-1.5 hawa-leading-none" }, label && /* @__PURE__ */ React11.createElement(
752
752
  "label",
753
753
  {
754
- role: "checkbox",
755
754
  htmlFor: id,
756
755
  className: cn(
757
756
  "hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-font-medium hawa-leading-none hawa-pt-0.5",
@@ -762,7 +761,6 @@ var Checkbox = ({
762
761
  ), sublabel && /* @__PURE__ */ React11.createElement(
763
762
  "label",
764
763
  {
765
- role: "checkbox",
766
764
  htmlFor: id,
767
765
  className: cn(
768
766
  "hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-text-muted-foreground",
@@ -773,7 +771,6 @@ var Checkbox = ({
773
771
  ), helperText && !checkboxProps.disabled && /* @__PURE__ */ React11.createElement(
774
772
  "label",
775
773
  {
776
- role: "checkbox",
777
774
  htmlFor: id,
778
775
  className: cn(
779
776
  "hawa-select-none hawa-text-xs hawa-text-red-500",
@@ -2036,7 +2033,7 @@ var FileDropzone = ({
2036
2033
  );
2037
2034
  useEffect8(() => {
2038
2035
  setFiles(acceptedFiles);
2039
- }, [acceptedFiles, cmp]);
2036
+ }, [acceptedFiles, cmp, setFiles]);
2040
2037
  onClearFiles = () => {
2041
2038
  acceptedFiles.length = 0;
2042
2039
  acceptedFiles.splice(0, acceptedFiles.length);
@@ -4617,6 +4614,7 @@ var SimpleTable = ({
4617
4614
  import * as React36 from "react";
4618
4615
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
4619
4616
  var Accordion = React36.forwardRef(({ items, className, ...props }, ref) => /* @__PURE__ */ React36.createElement(AccordionPrimitive.Root, { type: props.type, collapsible: true }, items.map((item, index) => /* @__PURE__ */ React36.createElement(AccordionItem, { key: index, value: `item-${index}` }, /* @__PURE__ */ React36.createElement(AccordionTrigger, null, item.trigger), /* @__PURE__ */ React36.createElement(AccordionContent, null, item.content)))));
4617
+ Accordion.displayName = "Accordion";
4620
4618
  var AccordionItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
4621
4619
  AccordionItem.displayName = "AccordionItem";
4622
4620
  var AccordionTrigger = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React36.createElement(AccordionPrimitive.Header, { className: "hawa-flex" }, /* @__PURE__ */ React36.createElement(
@@ -4949,7 +4947,7 @@ var BackToTop = ({ ...props }) => {
4949
4947
  props.anchor.current?.removeEventListener("scroll", onScroll);
4950
4948
  clearInterval(interval);
4951
4949
  };
4952
- }, []);
4950
+ }, [onScroll, props.anchor]);
4953
4951
  const getStyles = () => {
4954
4952
  if (!props.anchor.current || !self.current)
4955
4953
  return {};
@@ -5936,10 +5934,8 @@ var AppLayout = ({
5936
5934
  const isRTL = direction === "rtl";
5937
5935
  const [openedSidebarItem, setOpenedSidebarItem] = useState18("");
5938
5936
  const [selectedItem, setSelectedItem] = useState18(currentPage);
5939
- let size;
5940
- if (typeof window !== "undefined") {
5941
- size = useBreakpoint_default();
5942
- } else {
5937
+ let size = useBreakpoint_default();
5938
+ if (typeof window == "undefined") {
5943
5939
  size = 1200;
5944
5940
  }
5945
5941
  const [keepOpen, setKeepOpen] = useState18(() => {
@@ -7749,7 +7745,7 @@ var NotFound = ({
7749
7745
  variant = "contained",
7750
7746
  texts
7751
7747
  }) => {
7752
- return /* @__PURE__ */ React68.createElement(Card, null, /* @__PURE__ */ React68.createElement(CardContent, { headless: true }, /* @__PURE__ */ React68.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React68.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React68.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, texts?.pageNotFound ?? "Page Not Found"), /* @__PURE__ */ React68.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, texts?.ifLost ?? /* @__PURE__ */ React68.createElement(React68.Fragment, null, "If you're lost please contact us", " ", /* @__PURE__ */ React68.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React68.createElement(Button, { className: "hawa-w-full" }, texts?.home ?? "Home"))));
7748
+ return /* @__PURE__ */ React68.createElement(Card, null, /* @__PURE__ */ React68.createElement(CardContent, { headless: true }, /* @__PURE__ */ React68.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React68.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React68.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, texts?.pageNotFound ?? "Page Not Found"), /* @__PURE__ */ React68.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, texts?.ifLost ?? /* @__PURE__ */ React68.createElement(React68.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React68.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React68.createElement(Button, { className: "hawa-w-full" }, texts?.home ?? "Home"))));
7753
7749
  };
7754
7750
 
7755
7751
  // components/blocks/misc/NoPermission.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.7.3-next",
3
+ "version": "0.7.4-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {