@sikka/hawa 0.6.10-next → 0.6.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.
- package/dist/index.css +7 -4
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +38 -7
- package/dist/index.mjs +47 -33
- package/package.json +2 -1
package/dist/index.css
CHANGED
|
@@ -572,6 +572,10 @@ video {
|
|
|
572
572
|
text-decoration: underline;
|
|
573
573
|
color: var(--button-primary-700);
|
|
574
574
|
}
|
|
575
|
+
.mono {
|
|
576
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
577
|
+
Liberation Mono, Courier New, monospace !important;
|
|
578
|
+
}
|
|
575
579
|
.inline-code {
|
|
576
580
|
font-size: 0.75rem !important;
|
|
577
581
|
width: -moz-fit-content;
|
|
@@ -902,6 +906,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
902
906
|
.hawa-mr-3 {
|
|
903
907
|
margin-right: 0.75rem;
|
|
904
908
|
}
|
|
909
|
+
.hawa-mr-4 {
|
|
910
|
+
margin-right: 1rem;
|
|
911
|
+
}
|
|
905
912
|
.hawa-mr-40 {
|
|
906
913
|
margin-right: 10rem;
|
|
907
914
|
}
|
|
@@ -1712,10 +1719,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1712
1719
|
--tw-bg-opacity: 1;
|
|
1713
1720
|
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
|
1714
1721
|
}
|
|
1715
|
-
.hawa-bg-gray-300 {
|
|
1716
|
-
--tw-bg-opacity: 1;
|
|
1717
|
-
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
|
1718
|
-
}
|
|
1719
1722
|
.hawa-bg-gray-50 {
|
|
1720
1723
|
--tw-bg-opacity: 1;
|
|
1721
1724
|
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1276,10 +1276,20 @@ function useClipboard() {
|
|
|
1276
1276
|
};
|
|
1277
1277
|
}
|
|
1278
1278
|
// components/elements/CodeBlock.tsx
|
|
1279
|
-
var
|
|
1280
|
-
|
|
1279
|
+
var import_prism_react_renderer = require("prism-react-renderer");
|
|
1280
|
+
var CodeBlock = function(_param) {
|
|
1281
|
+
var tabs = _param.tabs, code = _param.code, fileName = _param.fileName, _param_language = _param.language, language = _param_language === void 0 ? "javascript" : _param_language, _param_width = _param.// default to JavaScript if no language is provided
|
|
1282
|
+
width, width = _param_width === void 0 ? "full" : _param_width, props = _object_without_properties(_param, [
|
|
1283
|
+
"tabs",
|
|
1284
|
+
"code",
|
|
1285
|
+
"fileName",
|
|
1286
|
+
"language",
|
|
1287
|
+
"width"
|
|
1288
|
+
]);
|
|
1281
1289
|
var clipboard = useClipboard();
|
|
1282
1290
|
var _ref = _sliced_to_array((0, import_react8.useState)(0), 2), selectedTab = _ref[0], setSelectedTab = _ref[1];
|
|
1291
|
+
var isDarkMode = props.forcedDarkMode || document.body.classList.contains("dark");
|
|
1292
|
+
var theme = isDarkMode ? import_prism_react_renderer.themes.vsDark : import_prism_react_renderer.themes.vsLight;
|
|
1283
1293
|
var widthStyles = {
|
|
1284
1294
|
full: "hawa-w-full",
|
|
1285
1295
|
md: "hawa-w-full hawa-max-w-md",
|
|
@@ -1302,12 +1312,33 @@ var CodeBlock = function(param) {
|
|
|
1302
1312
|
})), fileName && /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1303
1313
|
className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-bg-gray-200 dark:hawa-bg-muted hawa-p-2 hawa-pb-0 hawa-text-foreground hawa-font-mono"
|
|
1304
1314
|
}, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1305
|
-
className: cn("hawa-mb-1 hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-2 hawa-py-1 hawa-text-center hawa-text-[1rem]")
|
|
1315
|
+
className: cn("hawa-mb-1 mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-2 hawa-py-1 hawa-text-center hawa-text-[1rem]")
|
|
1306
1316
|
}, fileName)), /* @__PURE__ */ import_react8.default.createElement("pre", null, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1307
|
-
className: cn("hawa-relative hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between
|
|
1308
|
-
}, /* @__PURE__ */ import_react8.default.createElement(
|
|
1309
|
-
|
|
1310
|
-
|
|
1317
|
+
className: cn("hawa-relative hawa-flex hawa-w-full hawa-flex-row hawa-border hawa-items-start hawa-justify-between hawa-bg-foreground/5 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ", tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded")
|
|
1318
|
+
}, /* @__PURE__ */ import_react8.default.createElement(import_prism_react_renderer.Highlight, {
|
|
1319
|
+
theme: theme,
|
|
1320
|
+
code: tabs ? tabs[selectedTab].code : code || "",
|
|
1321
|
+
language: language
|
|
1322
|
+
}, function(param) {
|
|
1323
|
+
var className = param.className, style = param.style, tokens = param.tokens, getLineProps = param.getLineProps, getTokenProps = param.getTokenProps;
|
|
1324
|
+
return /* @__PURE__ */ import_react8.default.createElement("pre", {
|
|
1325
|
+
className: "hawa-min-h-[37.75px] hawa-w-full hawa-overflow-auto hawa-p-4 hawa-text-foreground hawa-font-mono"
|
|
1326
|
+
}, tokens.map(function(line, i) {
|
|
1327
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", _object_spread({
|
|
1328
|
+
key: i
|
|
1329
|
+
}, getLineProps({
|
|
1330
|
+
line: line
|
|
1331
|
+
})), props.lineNumbers && /* @__PURE__ */ import_react8.default.createElement("span", {
|
|
1332
|
+
className: "hawa-mr-4"
|
|
1333
|
+
}, i + 1), line.map(function(token, key) {
|
|
1334
|
+
return /* @__PURE__ */ import_react8.default.createElement("span", _object_spread({
|
|
1335
|
+
key: key
|
|
1336
|
+
}, getTokenProps({
|
|
1337
|
+
token: token
|
|
1338
|
+
})));
|
|
1339
|
+
}));
|
|
1340
|
+
}));
|
|
1341
|
+
}), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1311
1342
|
className: "hawa-absolute hawa-right-0 hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-p-2"
|
|
1312
1343
|
}, /* @__PURE__ */ import_react8.default.createElement(Tooltip, {
|
|
1313
1344
|
open: clipboard.copied,
|
package/dist/index.mjs
CHANGED
|
@@ -600,14 +600,20 @@ function useClipboard({ timeout = 2e3 } = {}) {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// components/elements/CodeBlock.tsx
|
|
603
|
+
import { Highlight, themes } from "prism-react-renderer";
|
|
603
604
|
var CodeBlock = ({
|
|
604
605
|
tabs,
|
|
605
606
|
code,
|
|
606
607
|
fileName,
|
|
607
|
-
|
|
608
|
+
language = "javascript",
|
|
609
|
+
// default to JavaScript if no language is provided
|
|
610
|
+
width = "full",
|
|
611
|
+
...props
|
|
608
612
|
}) => {
|
|
609
613
|
const clipboard = useClipboard();
|
|
610
614
|
const [selectedTab, setSelectedTab] = useState4(0);
|
|
615
|
+
const isDarkMode = props.forcedDarkMode || document.body.classList.contains("dark");
|
|
616
|
+
const theme = isDarkMode ? themes.vsDark : themes.vsLight;
|
|
611
617
|
let widthStyles = {
|
|
612
618
|
full: "hawa-w-full",
|
|
613
619
|
md: "hawa-w-full hawa-max-w-md",
|
|
@@ -644,7 +650,7 @@ var CodeBlock = ({
|
|
|
644
650
|
"div",
|
|
645
651
|
{
|
|
646
652
|
className: cn(
|
|
647
|
-
"hawa-mb-1 hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-2 hawa-py-1 hawa-text-center hawa-text-[1rem]"
|
|
653
|
+
"hawa-mb-1 mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-2 hawa-py-1 hawa-text-center hawa-text-[1rem]"
|
|
648
654
|
)
|
|
649
655
|
},
|
|
650
656
|
fileName
|
|
@@ -653,11 +659,19 @@ var CodeBlock = ({
|
|
|
653
659
|
"div",
|
|
654
660
|
{
|
|
655
661
|
className: cn(
|
|
656
|
-
"hawa-relative hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between
|
|
662
|
+
"hawa-relative hawa-flex hawa-w-full hawa-flex-row hawa-border hawa-items-start hawa-justify-between hawa-bg-foreground/5 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
|
|
657
663
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
|
658
664
|
)
|
|
659
665
|
},
|
|
660
|
-
/* @__PURE__ */ React10.createElement(
|
|
666
|
+
/* @__PURE__ */ React10.createElement(
|
|
667
|
+
Highlight,
|
|
668
|
+
{
|
|
669
|
+
theme,
|
|
670
|
+
code: tabs ? tabs[selectedTab].code : code || "",
|
|
671
|
+
language
|
|
672
|
+
},
|
|
673
|
+
({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React10.createElement("pre", { className: "hawa-min-h-[37.75px] hawa-w-full hawa-overflow-auto hawa-p-4 hawa-text-foreground hawa-font-mono" }, tokens.map((line, i) => /* @__PURE__ */ React10.createElement("div", { key: i, ...getLineProps({ line }) }, props.lineNumbers && /* @__PURE__ */ React10.createElement("span", { className: "hawa-mr-4" }, i + 1), line.map((token, key) => /* @__PURE__ */ React10.createElement("span", { key, ...getTokenProps({ token }) })))))
|
|
674
|
+
),
|
|
661
675
|
/* @__PURE__ */ React10.createElement("div", { className: "hawa-absolute hawa-right-0 hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-p-2" }, /* @__PURE__ */ React10.createElement(
|
|
662
676
|
Tooltip,
|
|
663
677
|
{
|
|
@@ -1079,7 +1093,7 @@ var Switch = React15.forwardRef(({ className, size = "default", label, ...props
|
|
|
1079
1093
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
1080
1094
|
|
|
1081
1095
|
// components/elements/Radio.tsx
|
|
1082
|
-
import React16, { useState as useState7, useRef as useRef3, useEffect as
|
|
1096
|
+
import React16, { useState as useState7, useRef as useRef3, useEffect as useEffect5 } from "react";
|
|
1083
1097
|
var Radio = ({
|
|
1084
1098
|
design = "default",
|
|
1085
1099
|
width = "default",
|
|
@@ -1101,7 +1115,7 @@ var Radio = ({
|
|
|
1101
1115
|
null
|
|
1102
1116
|
);
|
|
1103
1117
|
const parentRef = useRef3(null);
|
|
1104
|
-
|
|
1118
|
+
useEffect5(() => {
|
|
1105
1119
|
const parentNode = parentRef.current?.parentNode;
|
|
1106
1120
|
if (parentNode) {
|
|
1107
1121
|
const dir = window.getComputedStyle(parentNode).direction;
|
|
@@ -1309,7 +1323,7 @@ var Label = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1309
1323
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
1310
1324
|
|
|
1311
1325
|
// components/elements/Alert.tsx
|
|
1312
|
-
import React20, { useRef as useRef4, useState as useState8, useEffect as
|
|
1326
|
+
import React20, { useRef as useRef4, useState as useState8, useEffect as useEffect6 } from "react";
|
|
1313
1327
|
import clsx6 from "clsx";
|
|
1314
1328
|
var Alert = ({
|
|
1315
1329
|
variant = "normal",
|
|
@@ -1322,7 +1336,7 @@ var Alert = ({
|
|
|
1322
1336
|
}) => {
|
|
1323
1337
|
const alertRef = useRef4(null);
|
|
1324
1338
|
const [closed, setClosed] = useState8(false);
|
|
1325
|
-
|
|
1339
|
+
useEffect6(() => {
|
|
1326
1340
|
if (duration) {
|
|
1327
1341
|
const timeoutHide = setTimeout(() => {
|
|
1328
1342
|
setClosed(true);
|
|
@@ -1843,7 +1857,7 @@ var ColorPicker = (props) => {
|
|
|
1843
1857
|
};
|
|
1844
1858
|
|
|
1845
1859
|
// components/elements/PinInput.tsx
|
|
1846
|
-
import React26, { useEffect as
|
|
1860
|
+
import React26, { useEffect as useEffect7, useState as useState10 } from "react";
|
|
1847
1861
|
import clsx7 from "clsx";
|
|
1848
1862
|
var PinInput = ({
|
|
1849
1863
|
label,
|
|
@@ -1862,7 +1876,7 @@ var PinInput = ({
|
|
|
1862
1876
|
previousInput?.focus();
|
|
1863
1877
|
}
|
|
1864
1878
|
};
|
|
1865
|
-
|
|
1879
|
+
useEffect7(() => {
|
|
1866
1880
|
let unfilled = pin.includes(void 0);
|
|
1867
1881
|
if (!unfilled && getPins) {
|
|
1868
1882
|
getPins(pin);
|
|
@@ -1916,7 +1930,7 @@ var PinInput = ({
|
|
|
1916
1930
|
};
|
|
1917
1931
|
|
|
1918
1932
|
// components/elements/FileDropzone.tsx
|
|
1919
|
-
import React27, { useEffect as
|
|
1933
|
+
import React27, { useEffect as useEffect8, useState as useState11 } from "react";
|
|
1920
1934
|
import { useDropzone } from "react-dropzone";
|
|
1921
1935
|
import clsx8 from "clsx";
|
|
1922
1936
|
var FileDropzone = ({
|
|
@@ -1960,7 +1974,7 @@ var FileDropzone = ({
|
|
|
1960
1974
|
);
|
|
1961
1975
|
}
|
|
1962
1976
|
});
|
|
1963
|
-
|
|
1977
|
+
useEffect8(
|
|
1964
1978
|
() => () => {
|
|
1965
1979
|
files?.forEach((file) => {
|
|
1966
1980
|
URL.revokeObjectURL(file.preview);
|
|
@@ -1968,7 +1982,7 @@ var FileDropzone = ({
|
|
|
1968
1982
|
},
|
|
1969
1983
|
[files]
|
|
1970
1984
|
);
|
|
1971
|
-
|
|
1985
|
+
useEffect8(() => {
|
|
1972
1986
|
setFiles(acceptedFiles);
|
|
1973
1987
|
}, [acceptedFiles, cmp]);
|
|
1974
1988
|
onClearFiles = () => {
|
|
@@ -1980,7 +1994,7 @@ var FileDropzone = ({
|
|
|
1980
1994
|
acceptedFiles.length = 0;
|
|
1981
1995
|
setFiles([]);
|
|
1982
1996
|
};
|
|
1983
|
-
|
|
1997
|
+
useEffect8(() => {
|
|
1984
1998
|
if (maxSize > 0) {
|
|
1985
1999
|
const k = 1024;
|
|
1986
2000
|
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
@@ -4816,7 +4830,7 @@ var Progress = React38.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
|
4816
4830
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
4817
4831
|
|
|
4818
4832
|
// components/elements/BackToTop.tsx
|
|
4819
|
-
import React39, { useState as useState14, useEffect as
|
|
4833
|
+
import React39, { useState as useState14, useEffect as useEffect9, useRef as useRef5 } from "react";
|
|
4820
4834
|
import { clsx as clsx10 } from "clsx";
|
|
4821
4835
|
var BackToTop = ({ ...props }) => {
|
|
4822
4836
|
const [visible, setVisible] = useState14(false);
|
|
@@ -4846,7 +4860,7 @@ var BackToTop = ({ ...props }) => {
|
|
|
4846
4860
|
props.anchor.current.scrollTo({ top: 0, behavior: "smooth" });
|
|
4847
4861
|
}
|
|
4848
4862
|
};
|
|
4849
|
-
|
|
4863
|
+
useEffect9(() => {
|
|
4850
4864
|
if (!props.anchor.current)
|
|
4851
4865
|
return;
|
|
4852
4866
|
props.anchor.current.addEventListener("scroll", onScroll);
|
|
@@ -5761,17 +5775,17 @@ var SidebarItem = ({
|
|
|
5761
5775
|
};
|
|
5762
5776
|
|
|
5763
5777
|
// components/layout/AppLayout.tsx
|
|
5764
|
-
import React50, { useEffect as
|
|
5778
|
+
import React50, { useEffect as useEffect11, useRef as useRef6, useState as useState18 } from "react";
|
|
5765
5779
|
import clsx11 from "clsx";
|
|
5766
5780
|
|
|
5767
5781
|
// components/hooks/useBreakpoint.ts
|
|
5768
|
-
import { useState as useState17, useEffect as
|
|
5782
|
+
import { useState as useState17, useEffect as useEffect10 } from "react";
|
|
5769
5783
|
var useBreakpoint = () => {
|
|
5770
5784
|
const [breakpoint, setBreakpoint] = useState17(window?.innerWidth);
|
|
5771
5785
|
const resize = () => {
|
|
5772
5786
|
setBreakpoint(window?.innerWidth);
|
|
5773
5787
|
};
|
|
5774
|
-
|
|
5788
|
+
useEffect10(() => {
|
|
5775
5789
|
if (typeof window !== "undefined") {
|
|
5776
5790
|
window?.addEventListener("resize", resize);
|
|
5777
5791
|
return () => {
|
|
@@ -5827,7 +5841,7 @@ var AppLayout = ({
|
|
|
5827
5841
|
});
|
|
5828
5842
|
const [openSideMenu, setOpenSideMenu] = useState18(size > 600 ? true : false);
|
|
5829
5843
|
let drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
5830
|
-
|
|
5844
|
+
useEffect11(() => {
|
|
5831
5845
|
const handleClickOutside = (event) => {
|
|
5832
5846
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
5833
5847
|
setOpenSideMenu(false);
|
|
@@ -7013,7 +7027,7 @@ var CodeConfirmation = (props) => {
|
|
|
7013
7027
|
};
|
|
7014
7028
|
|
|
7015
7029
|
// components/blocks/feedback/UserReferralSource.tsx
|
|
7016
|
-
import React59, { useEffect as
|
|
7030
|
+
import React59, { useEffect as useEffect12, useRef as useRef7, useState as useState22 } from "react";
|
|
7017
7031
|
import clsx12 from "clsx";
|
|
7018
7032
|
var UserReferralSource = ({
|
|
7019
7033
|
position = "bottom-right",
|
|
@@ -7029,7 +7043,7 @@ var UserReferralSource = ({
|
|
|
7029
7043
|
"bottom-right": "hawa-right-4",
|
|
7030
7044
|
"bottom-left": "hawa-left-4"
|
|
7031
7045
|
};
|
|
7032
|
-
|
|
7046
|
+
useEffect12(() => {
|
|
7033
7047
|
const timeoutHide = setTimeout(() => {
|
|
7034
7048
|
if (closingTimer >= 0) {
|
|
7035
7049
|
setClosingTimer(closingTimer - 1);
|
|
@@ -7099,7 +7113,7 @@ var UserReferralSource = ({
|
|
|
7099
7113
|
};
|
|
7100
7114
|
|
|
7101
7115
|
// components/blocks/feedback/FeedbackRating.tsx
|
|
7102
|
-
import React60, { useEffect as
|
|
7116
|
+
import React60, { useEffect as useEffect13, useRef as useRef8, useState as useState23 } from "react";
|
|
7103
7117
|
import clsx13 from "clsx";
|
|
7104
7118
|
var FeedbackRating = ({
|
|
7105
7119
|
position = "bottom-right",
|
|
@@ -7114,7 +7128,7 @@ var FeedbackRating = ({
|
|
|
7114
7128
|
"bottom-right": "hawa-right-4",
|
|
7115
7129
|
"bottom-left": "hawa-left-4"
|
|
7116
7130
|
};
|
|
7117
|
-
|
|
7131
|
+
useEffect13(() => {
|
|
7118
7132
|
const timeoutHide = setTimeout(() => {
|
|
7119
7133
|
if (closingTimer >= 0) {
|
|
7120
7134
|
setClosingTimer(closingTimer - 1);
|
|
@@ -7890,13 +7904,13 @@ var Usage = (props) => {
|
|
|
7890
7904
|
import { useState as useState27 } from "react";
|
|
7891
7905
|
|
|
7892
7906
|
// components/hooks/useHover.ts
|
|
7893
|
-
import { useEffect as
|
|
7907
|
+
import { useEffect as useEffect14, useRef as useRef9, useState as useState28 } from "react";
|
|
7894
7908
|
|
|
7895
7909
|
// components/hooks/useCarousel.ts
|
|
7896
7910
|
import { useState as useState29, useRef as useRef10 } from "react";
|
|
7897
7911
|
|
|
7898
7912
|
// components/hooks/useFocusWithin.ts
|
|
7899
|
-
import { useRef as useRef11, useState as useState30, useEffect as
|
|
7913
|
+
import { useRef as useRef11, useState as useState30, useEffect as useEffect15 } from "react";
|
|
7900
7914
|
function containsRelatedTarget(event) {
|
|
7901
7915
|
if (event.currentTarget instanceof HTMLElement && event.relatedTarget instanceof HTMLElement) {
|
|
7902
7916
|
return event.currentTarget.contains(event.relatedTarget);
|
|
@@ -7926,7 +7940,7 @@ function useFocusWithin({
|
|
|
7926
7940
|
onBlur?.(event);
|
|
7927
7941
|
}
|
|
7928
7942
|
};
|
|
7929
|
-
|
|
7943
|
+
useEffect15(() => {
|
|
7930
7944
|
if (ref.current) {
|
|
7931
7945
|
ref.current.addEventListener("focusin", handleFocusIn);
|
|
7932
7946
|
ref.current.addEventListener("focusout", handleFocusOut);
|
|
@@ -7941,7 +7955,7 @@ function useFocusWithin({
|
|
|
7941
7955
|
}
|
|
7942
7956
|
|
|
7943
7957
|
// components/hooks/useMediaQuery.ts
|
|
7944
|
-
import { useState as useState31, useEffect as
|
|
7958
|
+
import { useState as useState31, useEffect as useEffect16, useRef as useRef12 } from "react";
|
|
7945
7959
|
function attachMediaListener(query, callback) {
|
|
7946
7960
|
try {
|
|
7947
7961
|
query.addEventListener("change", callback);
|
|
@@ -7967,7 +7981,7 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
|
7967
7981
|
getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
|
|
7968
7982
|
);
|
|
7969
7983
|
const queryRef = useRef12();
|
|
7970
|
-
|
|
7984
|
+
useEffect16(() => {
|
|
7971
7985
|
if ("matchMedia" in window) {
|
|
7972
7986
|
queryRef.current = window.matchMedia(query);
|
|
7973
7987
|
setMatches(queryRef.current.matches);
|
|
@@ -7982,16 +7996,16 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
|
7982
7996
|
}
|
|
7983
7997
|
|
|
7984
7998
|
// components/hooks/useScrollPosition.ts
|
|
7985
|
-
import { useState as useState32, useEffect as
|
|
7999
|
+
import { useState as useState32, useEffect as useEffect17 } from "react";
|
|
7986
8000
|
|
|
7987
8001
|
// components/hooks/useTable.ts
|
|
7988
|
-
import { useState as useState33, useEffect as
|
|
8002
|
+
import { useState as useState33, useEffect as useEffect18 } from "react";
|
|
7989
8003
|
|
|
7990
8004
|
// components/hooks/useTabs.ts
|
|
7991
|
-
import { useEffect as
|
|
8005
|
+
import { useEffect as useEffect19, useState as useState34 } from "react";
|
|
7992
8006
|
function useTabs(initialTab = "") {
|
|
7993
8007
|
const [activeTab, setActiveTab] = useState34(initialTab);
|
|
7994
|
-
|
|
8008
|
+
useEffect19(() => {
|
|
7995
8009
|
const handleHashChange = () => {
|
|
7996
8010
|
const hash = window.location.hash.substring(1);
|
|
7997
8011
|
setActiveTab(hash || initialTab);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikka/hawa",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11-next",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"lucide-react": "^0.279.0",
|
|
52
52
|
"next": "^13.5.4",
|
|
53
53
|
"next-themes": "^0.2.1",
|
|
54
|
+
"prism-react-renderer": "^2.1.0",
|
|
54
55
|
"react": "18.2.0",
|
|
55
56
|
"react-dom": "18.2.0",
|
|
56
57
|
"react-dropzone": "^14.2.3",
|