@sikka/hawa 0.40.0-next → 0.41.0-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/blocks/auth/index.js +100 -15
- package/dist/blocks/auth/index.mjs +104 -19
- package/dist/blocks/feedback/index.js +1 -2
- package/dist/blocks/feedback/index.mjs +6 -8
- package/dist/blocks/index.js +101 -17
- package/dist/blocks/index.mjs +3 -5
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/checkbox/index.js +2 -2
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +2 -2
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/{chunk-AJTYKC5R.mjs → chunk-4ZELUQQ7.mjs} +1 -1
- package/dist/{chunk-GN7EIDTE.mjs → chunk-55TPME67.mjs} +1 -1
- package/dist/{chunk-CTZRVSTI.mjs → chunk-F6SLF6DS.mjs} +1 -1
- package/dist/{chunk-UBUVHGW4.mjs → chunk-FJXDCBMQ.mjs} +16 -16
- package/dist/{chunk-CTNKKP2O.mjs → chunk-FK2C6C3B.mjs} +61 -61
- package/dist/{chunk-27G5FKOP.mjs → chunk-IS73LH5Y.mjs} +1 -1
- package/dist/{chunk-GU2DOJ7Q.mjs → chunk-JGP3PSJL.mjs} +85 -0
- package/dist/{chunk-QZIENYTE.mjs → chunk-NSMJTT6Y.mjs} +1 -1
- package/dist/{chunk-RT2Q3SH7.mjs → chunk-UHUOBAEP.mjs} +1 -1
- package/dist/{chunk-DYPGZ2IP.mjs → chunk-ZSX2KZ2D.mjs} +1 -1
- package/dist/dataTable/index.d.mts +6 -1
- package/dist/dataTable/index.d.ts +6 -1
- package/dist/dataTable/index.js +454 -240
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +472 -258
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +85 -0
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +85 -0
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +11 -1
- package/dist/elements/index.d.ts +11 -1
- package/dist/elements/index.js +616 -453
- package/dist/elements/index.mjs +252 -174
- package/dist/index.css +27 -127
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +619 -457
- package/dist/index.mjs +713 -551
- package/dist/layout/index.js +85 -0
- package/dist/layout/index.mjs +2 -2
- package/dist/logos/index.d.mts +5 -0
- package/dist/logos/index.d.ts +5 -0
- package/dist/logos/index.js +85 -0
- package/dist/logos/index.js.map +1 -1
- package/dist/logos/index.mjs +85 -0
- package/dist/logos/index.mjs.map +1 -1
- package/dist/pinInput/index.js +13 -13
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +13 -13
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/simpleTable/index.js +4 -4
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs +4 -4
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/table/index.js +4 -4
- package/dist/table/index.js.map +1 -1
- package/dist/table/index.mjs +4 -4
- package/dist/table/index.mjs.map +1 -1
- package/package.json +3 -5
package/dist/index.js
CHANGED
@@ -1583,6 +1583,91 @@ var Logos = {
|
|
1583
1583
|
},
|
1584
1584
|
/* @__PURE__ */ import_react6.default.createElement("path", { d: "M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" })
|
1585
1585
|
),
|
1586
|
+
telegram: (props) => /* @__PURE__ */ import_react6.default.createElement(
|
1587
|
+
"svg",
|
1588
|
+
{
|
1589
|
+
role: "img",
|
1590
|
+
viewBox: "0 0 24 24",
|
1591
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1592
|
+
...props
|
1593
|
+
},
|
1594
|
+
/* @__PURE__ */ import_react6.default.createElement("title", null, "Telegram"),
|
1595
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1596
|
+
"path",
|
1597
|
+
{
|
1598
|
+
fill: "currentColor",
|
1599
|
+
d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
|
1600
|
+
}
|
1601
|
+
)
|
1602
|
+
),
|
1603
|
+
youtube: (props) => /* @__PURE__ */ import_react6.default.createElement(
|
1604
|
+
"svg",
|
1605
|
+
{
|
1606
|
+
role: "img",
|
1607
|
+
viewBox: "0 0 24 24",
|
1608
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1609
|
+
...props
|
1610
|
+
},
|
1611
|
+
/* @__PURE__ */ import_react6.default.createElement("title", null, "YouTube"),
|
1612
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1613
|
+
"path",
|
1614
|
+
{
|
1615
|
+
fill: "currentColor",
|
1616
|
+
d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
1617
|
+
}
|
1618
|
+
)
|
1619
|
+
),
|
1620
|
+
tiktok: (props) => /* @__PURE__ */ import_react6.default.createElement(
|
1621
|
+
"svg",
|
1622
|
+
{
|
1623
|
+
role: "img",
|
1624
|
+
viewBox: "0 0 24 24",
|
1625
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1626
|
+
...props
|
1627
|
+
},
|
1628
|
+
/* @__PURE__ */ import_react6.default.createElement("title", null, "TikTok"),
|
1629
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1630
|
+
"path",
|
1631
|
+
{
|
1632
|
+
fill: "currentColor",
|
1633
|
+
d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
|
1634
|
+
}
|
1635
|
+
)
|
1636
|
+
),
|
1637
|
+
linkedin: (props) => /* @__PURE__ */ import_react6.default.createElement(
|
1638
|
+
"svg",
|
1639
|
+
{
|
1640
|
+
role: "img",
|
1641
|
+
viewBox: "0 0 24 24",
|
1642
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1643
|
+
...props
|
1644
|
+
},
|
1645
|
+
/* @__PURE__ */ import_react6.default.createElement("title", null, "LinkedIn"),
|
1646
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1647
|
+
"path",
|
1648
|
+
{
|
1649
|
+
fill: "currentColor",
|
1650
|
+
d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
|
1651
|
+
}
|
1652
|
+
)
|
1653
|
+
),
|
1654
|
+
behance: (props) => /* @__PURE__ */ import_react6.default.createElement(
|
1655
|
+
"svg",
|
1656
|
+
{
|
1657
|
+
role: "img",
|
1658
|
+
viewBox: "0 0 24 24",
|
1659
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1660
|
+
...props
|
1661
|
+
},
|
1662
|
+
/* @__PURE__ */ import_react6.default.createElement("title", null, "Behance"),
|
1663
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1664
|
+
"path",
|
1665
|
+
{
|
1666
|
+
fill: "currentColor",
|
1667
|
+
d: "M16.969 16.927a2.561 2.561 0 0 0 1.901.677 2.501 2.501 0 0 0 1.531-.475c.362-.235.636-.584.779-.99h2.585a5.091 5.091 0 0 1-1.9 2.896 5.292 5.292 0 0 1-3.091.88 5.839 5.839 0 0 1-2.284-.433 4.871 4.871 0 0 1-1.723-1.211 5.657 5.657 0 0 1-1.08-1.874 7.057 7.057 0 0 1-.383-2.393c-.005-.8.129-1.595.396-2.349a5.313 5.313 0 0 1 5.088-3.604 4.87 4.87 0 0 1 2.376.563c.661.362 1.231.87 1.668 1.485a6.2 6.2 0 0 1 .943 2.133c.194.821.263 1.666.205 2.508h-7.699c-.063.79.184 1.574.688 2.187ZM6.947 4.084a8.065 8.065 0 0 1 1.928.198 4.29 4.29 0 0 1 1.49.638c.418.303.748.711.958 1.182.241.579.357 1.203.341 1.83a3.506 3.506 0 0 1-.506 1.961 3.726 3.726 0 0 1-1.503 1.287 3.588 3.588 0 0 1 2.027 1.437c.464.747.697 1.615.67 2.494a4.593 4.593 0 0 1-.423 2.032 3.945 3.945 0 0 1-1.163 1.413 5.114 5.114 0 0 1-1.683.807 7.135 7.135 0 0 1-1.928.259H0V4.084h6.947Zm-.235 12.9c.308.004.616-.029.916-.099a2.18 2.18 0 0 0 .766-.332c.228-.158.411-.371.534-.619.142-.317.208-.663.191-1.009a2.08 2.08 0 0 0-.642-1.715 2.618 2.618 0 0 0-1.696-.505h-3.54v4.279h3.471Zm13.635-5.967a2.13 2.13 0 0 0-1.654-.619 2.336 2.336 0 0 0-1.163.259 2.474 2.474 0 0 0-.738.62 2.359 2.359 0 0 0-.396.792c-.074.239-.12.485-.137.734h4.769a3.239 3.239 0 0 0-.679-1.785l-.002-.001Zm-13.813-.648a2.254 2.254 0 0 0 1.423-.433c.399-.355.607-.88.56-1.413a1.916 1.916 0 0 0-.178-.891 1.298 1.298 0 0 0-.495-.533 1.851 1.851 0 0 0-.711-.274 3.966 3.966 0 0 0-.835-.073H3.241v3.631h3.293v-.014ZM21.62 5.122h-5.976v1.527h5.976V5.122Z"
|
1668
|
+
}
|
1669
|
+
)
|
1670
|
+
),
|
1586
1671
|
microsoft: (props) => /* @__PURE__ */ import_react6.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", ...props }, /* @__PURE__ */ import_react6.default.createElement(
|
1587
1672
|
"path",
|
1588
1673
|
{
|
@@ -2795,9 +2880,145 @@ var Avatar = ({
|
|
2795
2880
|
};
|
2796
2881
|
|
2797
2882
|
// elements/dataTable/DataTable.tsx
|
2798
|
-
var
|
2883
|
+
var React24 = __toESM(require("react"));
|
2799
2884
|
var import_react_table = require("@tanstack/react-table");
|
2800
2885
|
|
2886
|
+
// elements/checkbox/Checkbox.tsx
|
2887
|
+
var React21 = __toESM(require("react"));
|
2888
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
2889
|
+
var Checkbox = ({
|
2890
|
+
id,
|
2891
|
+
label,
|
2892
|
+
sublabel,
|
2893
|
+
helperText,
|
2894
|
+
disabled,
|
2895
|
+
size = "default",
|
2896
|
+
radius = "inherit",
|
2897
|
+
...props
|
2898
|
+
}) => {
|
2899
|
+
let labelLineHeightStyles = {
|
2900
|
+
xs: sublabel || helperText ? 0.5 : 0.1,
|
2901
|
+
sm: 0.6,
|
2902
|
+
default: 1,
|
2903
|
+
md: 0.8,
|
2904
|
+
lg: 0.9,
|
2905
|
+
xl: 1
|
2906
|
+
};
|
2907
|
+
return /* @__PURE__ */ React21.createElement(
|
2908
|
+
"div",
|
2909
|
+
{
|
2910
|
+
className: cn(
|
2911
|
+
"hawa-flex hawa-gap-2",
|
2912
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
2913
|
+
)
|
2914
|
+
},
|
2915
|
+
/* @__PURE__ */ React21.createElement(
|
2916
|
+
CheckboxElement,
|
2917
|
+
{
|
2918
|
+
...props,
|
2919
|
+
size,
|
2920
|
+
radius,
|
2921
|
+
disabled,
|
2922
|
+
id
|
2923
|
+
}
|
2924
|
+
),
|
2925
|
+
(label || helperText) && /* @__PURE__ */ React21.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React21.createElement(
|
2926
|
+
"label",
|
2927
|
+
{
|
2928
|
+
htmlFor: id,
|
2929
|
+
className: cn(
|
2930
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
2931
|
+
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
|
2932
|
+
),
|
2933
|
+
style: {
|
2934
|
+
// lineHeight: labelLineHeightStyles[size]
|
2935
|
+
lineHeight: 1
|
2936
|
+
}
|
2937
|
+
},
|
2938
|
+
label
|
2939
|
+
), sublabel && /* @__PURE__ */ React21.createElement(
|
2940
|
+
"label",
|
2941
|
+
{
|
2942
|
+
htmlFor: id,
|
2943
|
+
className: cn(
|
2944
|
+
"hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
|
2945
|
+
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
|
2946
|
+
)
|
2947
|
+
},
|
2948
|
+
sublabel
|
2949
|
+
), helperText && !disabled && /* @__PURE__ */ React21.createElement(
|
2950
|
+
"label",
|
2951
|
+
{
|
2952
|
+
htmlFor: id,
|
2953
|
+
className: cn(
|
2954
|
+
"hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
|
2955
|
+
disabled && "hawa-cursor-not-allowed hawa-opacity-70"
|
2956
|
+
)
|
2957
|
+
},
|
2958
|
+
helperText
|
2959
|
+
))
|
2960
|
+
);
|
2961
|
+
};
|
2962
|
+
var CheckboxElement = React21.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
2963
|
+
let checkboxRadius = {
|
2964
|
+
none: "hawa-rounded-none",
|
2965
|
+
inherit: "hawa-rounded-sm",
|
2966
|
+
full: "hawa-rounded-full"
|
2967
|
+
};
|
2968
|
+
let checkboxSizes = {
|
2969
|
+
xs: "hawa-w-3 hawa-h-3",
|
2970
|
+
sm: "hawa-w-6 hawa-h-6",
|
2971
|
+
default: "hawa-icon",
|
2972
|
+
md: "hawa-w-8 hawa-h-8",
|
2973
|
+
lg: "hawa-w-10 hawa-h-10",
|
2974
|
+
xl: "hawa-w-12 hawa-h-12"
|
2975
|
+
};
|
2976
|
+
let checkboxIndicatorSizes = {
|
2977
|
+
xs: "0.5em",
|
2978
|
+
default: "0.60em",
|
2979
|
+
sm: "0.75em",
|
2980
|
+
md: "0.875em",
|
2981
|
+
lg: "1em",
|
2982
|
+
xl: "1.25em"
|
2983
|
+
};
|
2984
|
+
return /* @__PURE__ */ React21.createElement(
|
2985
|
+
CheckboxPrimitive.Root,
|
2986
|
+
{
|
2987
|
+
ref,
|
2988
|
+
className: cn(
|
2989
|
+
"hawa-peer hawa-shrink-0 hawa-border hawa-border-primary hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50 data-[state=checked]:hawa-bg-primary data-[state=checked]:hawa-text-primary-foreground",
|
2990
|
+
checkboxSizes[size],
|
2991
|
+
checkboxRadius[radius],
|
2992
|
+
className
|
2993
|
+
),
|
2994
|
+
...props
|
2995
|
+
},
|
2996
|
+
/* @__PURE__ */ React21.createElement(
|
2997
|
+
CheckboxPrimitive.Indicator,
|
2998
|
+
{
|
2999
|
+
className: cn(
|
3000
|
+
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
3001
|
+
)
|
3002
|
+
},
|
3003
|
+
/* @__PURE__ */ React21.createElement(
|
3004
|
+
"svg",
|
3005
|
+
{
|
3006
|
+
"aria-label": "Check Mark",
|
3007
|
+
stroke: "currentColor",
|
3008
|
+
fill: "currentColor",
|
3009
|
+
strokeWidth: "0",
|
3010
|
+
viewBox: "0 0 512 512",
|
3011
|
+
height: checkboxIndicatorSizes[size],
|
3012
|
+
width: checkboxIndicatorSizes[size]
|
3013
|
+
},
|
3014
|
+
/* @__PURE__ */ React21.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
3015
|
+
),
|
3016
|
+
" "
|
3017
|
+
)
|
3018
|
+
);
|
3019
|
+
});
|
3020
|
+
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
3021
|
+
|
2801
3022
|
// elements/input/Input.tsx
|
2802
3023
|
var import_react11 = __toESM(require("react"));
|
2803
3024
|
var Input = (0, import_react11.forwardRef)(
|
@@ -2962,8 +3183,8 @@ var Input = (0, import_react11.forwardRef)(
|
|
2962
3183
|
);
|
2963
3184
|
|
2964
3185
|
// elements/table/Table.tsx
|
2965
|
-
var
|
2966
|
-
var Table =
|
3186
|
+
var React23 = __toESM(require("react"));
|
3187
|
+
var Table = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement("div", { className: "hawa-relative hawa-w-full hawa-overflow-auto hawa-rounded hawa-border" }, /* @__PURE__ */ React23.createElement(
|
2967
3188
|
"table",
|
2968
3189
|
{
|
2969
3190
|
ref,
|
@@ -2971,7 +3192,7 @@ var Table = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
2971
3192
|
...props
|
2972
3193
|
}
|
2973
3194
|
)));
|
2974
|
-
var TableHeader =
|
3195
|
+
var TableHeader = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2975
3196
|
"thead",
|
2976
3197
|
{
|
2977
3198
|
ref,
|
@@ -2979,18 +3200,18 @@ var TableHeader = React22.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
2979
3200
|
...props
|
2980
3201
|
}
|
2981
3202
|
));
|
2982
|
-
var TableHead =
|
2983
|
-
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */
|
3203
|
+
var TableHead = React23.forwardRef(
|
3204
|
+
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2984
3205
|
"th",
|
2985
3206
|
{
|
2986
3207
|
ref,
|
2987
3208
|
className: cn(
|
2988
|
-
"hawa-bg-muted/60 hawa-text-start hawa-align-middle hawa-font-medium hawa-text-muted-foreground dark:hawa-bg-muted/40 [&:has([role=checkbox])]:hawa-pr-0 [&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
3209
|
+
"hawa-bg-muted/60 hawa-text-nowrap hawa-text-start hawa-align-middle hawa-font-medium hawa-text-muted-foreground dark:hawa-bg-muted/40 [&:has([role=checkbox])]:hawa-pr-0 [&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
2989
3210
|
dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
2990
3211
|
condensed ? "hawa-h-8" : "hawa-h-12",
|
2991
3212
|
clickable ? "hawa-px-1" : "hawa-px-4",
|
2992
3213
|
//First and last columns
|
2993
|
-
clickable ? "
|
3214
|
+
clickable ? "[&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4",
|
2994
3215
|
//Columns in between
|
2995
3216
|
className
|
2996
3217
|
),
|
@@ -2998,8 +3219,8 @@ var TableHead = React22.forwardRef(
|
|
2998
3219
|
}
|
2999
3220
|
)
|
3000
3221
|
);
|
3001
|
-
var TableBody =
|
3002
|
-
var TableFooter =
|
3222
|
+
var TableBody = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
|
3223
|
+
var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
3003
3224
|
"tfoot",
|
3004
3225
|
{
|
3005
3226
|
ref,
|
@@ -3010,7 +3231,7 @@ var TableFooter = React22.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
3010
3231
|
...props
|
3011
3232
|
}
|
3012
3233
|
));
|
3013
|
-
var TableRow =
|
3234
|
+
var TableRow = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
3014
3235
|
"tr",
|
3015
3236
|
{
|
3016
3237
|
ref,
|
@@ -3023,14 +3244,14 @@ var TableRow = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
3023
3244
|
...props
|
3024
3245
|
}
|
3025
3246
|
));
|
3026
|
-
var TableCell =
|
3247
|
+
var TableCell = React23.forwardRef(
|
3027
3248
|
({ className, enablePadding = true, padding = "default", ...props }, ref) => {
|
3028
3249
|
let paddingStyles = {
|
3029
3250
|
condensed: "hawa-p-0 hawa-px-4",
|
3030
3251
|
default: "hawa-p-4",
|
3031
3252
|
noPadding: "hawa-p-0"
|
3032
3253
|
};
|
3033
|
-
return /* @__PURE__ */
|
3254
|
+
return /* @__PURE__ */ React23.createElement(
|
3034
3255
|
"td",
|
3035
3256
|
{
|
3036
3257
|
ref,
|
@@ -3040,7 +3261,7 @@ var TableCell = React22.forwardRef(
|
|
3040
3261
|
// enablePadding ? "hawa-p-4" : "hawa-p-0",
|
3041
3262
|
// props.disablePadding ? "hawa-p-0" : "hawa-p-4",
|
3042
3263
|
// props.condensed ? "hawa-p-0 hawa-px-4" : "hawa-p-4",
|
3043
|
-
"hawa-align-middle [&:has([role=checkbox])]:hawa-pr-0
|
3264
|
+
"hawa-align-middle [&:has([role=checkbox])]:hawa-pr-0",
|
3044
3265
|
"[&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
3045
3266
|
// "[&:not(:last-child)]:hawa-border-r",
|
3046
3267
|
props.dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
@@ -3051,7 +3272,7 @@ var TableCell = React22.forwardRef(
|
|
3051
3272
|
);
|
3052
3273
|
}
|
3053
3274
|
);
|
3054
|
-
var TableCaption =
|
3275
|
+
var TableCaption = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
3055
3276
|
"caption",
|
3056
3277
|
{
|
3057
3278
|
ref,
|
@@ -3079,27 +3300,61 @@ var DataTable = ({
|
|
3079
3300
|
paginationPosition = "bottom",
|
3080
3301
|
translateFn,
|
3081
3302
|
enableHideColumns,
|
3303
|
+
enableSelection,
|
3082
3304
|
enableSearch,
|
3083
3305
|
enableGoTo,
|
3084
3306
|
...props
|
3085
3307
|
}) => {
|
3086
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
3087
|
-
const [sorting, setSorting] =
|
3308
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
3309
|
+
const [sorting, setSorting] = React24.useState(
|
3088
3310
|
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
3089
3311
|
);
|
3090
|
-
const [columnFilters, setColumnFilters] =
|
3312
|
+
const [columnFilters, setColumnFilters] = React24.useState(
|
3091
3313
|
[]
|
3092
3314
|
);
|
3093
|
-
const [globalFilter, setGlobalFilter] =
|
3094
|
-
const [expanded, setExpanded] =
|
3095
|
-
const [columnVisibility, setColumnVisibility] =
|
3315
|
+
const [globalFilter, setGlobalFilter] = React24.useState("");
|
3316
|
+
const [expanded, setExpanded] = React24.useState({});
|
3317
|
+
const [columnVisibility, setColumnVisibility] = React24.useState(() => {
|
3096
3318
|
const savedVisibility = localStorage.getItem(LOCAL_STORAGE_KEY);
|
3097
3319
|
return savedVisibility ? JSON.parse(savedVisibility) : {};
|
3098
3320
|
});
|
3099
|
-
const [rowSelection, setRowSelection] =
|
3321
|
+
const [rowSelection, setRowSelection] = React24.useState({});
|
3322
|
+
let mainColumns = enableSelection ? [
|
3323
|
+
{
|
3324
|
+
id: "select",
|
3325
|
+
maxSize: 16,
|
3326
|
+
minSize: 16,
|
3327
|
+
size: 16,
|
3328
|
+
header: ({ table: table2 }) => /* @__PURE__ */ React24.createElement(
|
3329
|
+
Checkbox,
|
3330
|
+
{
|
3331
|
+
dir: props.direction,
|
3332
|
+
id: "select_all",
|
3333
|
+
"aria-label": "Select all",
|
3334
|
+
className: props.direction === "rtl" ? "hawa-ms-4" : "hawa-me-0",
|
3335
|
+
checked: table2.getIsAllPageRowsSelected() || table2.getIsSomePageRowsSelected() && "indeterminate",
|
3336
|
+
onCheckedChange: (value) => table2.toggleAllPageRowsSelected(!!value)
|
3337
|
+
}
|
3338
|
+
),
|
3339
|
+
cell: ({ row }) => /* @__PURE__ */ React24.createElement(
|
3340
|
+
Checkbox,
|
3341
|
+
{
|
3342
|
+
dir: props.direction,
|
3343
|
+
id: "select_row",
|
3344
|
+
className: props.direction === "rtl" ? "hawa-ms-4" : "hawa-me-4",
|
3345
|
+
checked: row.getIsSelected(),
|
3346
|
+
onCheckedChange: (value) => row.toggleSelected(!!value),
|
3347
|
+
"aria-label": "Select row"
|
3348
|
+
}
|
3349
|
+
),
|
3350
|
+
enableSorting: false,
|
3351
|
+
enableHiding: false
|
3352
|
+
},
|
3353
|
+
...columns
|
3354
|
+
] : columns;
|
3100
3355
|
const table = (0, import_react_table.useReactTable)({
|
3101
3356
|
data,
|
3102
|
-
columns,
|
3357
|
+
columns: mainColumns,
|
3103
3358
|
onExpandedChange: setExpanded,
|
3104
3359
|
getExpandedRowModel: (0, import_react_table.getExpandedRowModel)(),
|
3105
3360
|
onGlobalFilterChange: setGlobalFilter,
|
@@ -3125,10 +3380,10 @@ var DataTable = ({
|
|
3125
3380
|
label: `${item} / ${pageText}`,
|
3126
3381
|
value: item
|
3127
3382
|
}));
|
3128
|
-
|
3383
|
+
React24.useEffect(() => {
|
3129
3384
|
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(columnVisibility));
|
3130
3385
|
}, [columnVisibility]);
|
3131
|
-
|
3386
|
+
React24.useEffect(() => {
|
3132
3387
|
setColumnVisibility((prev) => {
|
3133
3388
|
let newColumnVisibility = {};
|
3134
3389
|
columns.forEach((column) => {
|
@@ -3143,7 +3398,7 @@ var DataTable = ({
|
|
3143
3398
|
return newColumnVisibility;
|
3144
3399
|
});
|
3145
3400
|
}, [columns]);
|
3146
|
-
return /* @__PURE__ */
|
3401
|
+
return /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, (enableSearch || enableHideColumns) && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-4" }, enableSearch && /* @__PURE__ */ React24.createElement(
|
3147
3402
|
Input,
|
3148
3403
|
{
|
3149
3404
|
inputProps: { title: "" },
|
@@ -3154,7 +3409,7 @@ var DataTable = ({
|
|
3154
3409
|
margin: "none",
|
3155
3410
|
className: "hawa-w-full md:hawa-max-w-sm",
|
3156
3411
|
endIconProps: { className: "!hawa-end-2" },
|
3157
|
-
endIcon: globalFilter ? /* @__PURE__ */
|
3412
|
+
endIcon: globalFilter ? /* @__PURE__ */ React24.createElement(
|
3158
3413
|
Button,
|
3159
3414
|
{
|
3160
3415
|
onClick: () => setGlobalFilter(""),
|
@@ -3162,7 +3417,7 @@ var DataTable = ({
|
|
3162
3417
|
size: "smallIcon",
|
3163
3418
|
"aria-label": "Clear Search"
|
3164
3419
|
},
|
3165
|
-
/* @__PURE__ */
|
3420
|
+
/* @__PURE__ */ React24.createElement(
|
3166
3421
|
"svg",
|
3167
3422
|
{
|
3168
3423
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -3176,43 +3431,45 @@ var DataTable = ({
|
|
3176
3431
|
strokeLinejoin: "round",
|
3177
3432
|
className: "hawa-icon hawa-text-muted-foreground"
|
3178
3433
|
},
|
3179
|
-
/* @__PURE__ */
|
3180
|
-
/* @__PURE__ */
|
3434
|
+
/* @__PURE__ */ React24.createElement("path", { d: "M18 6 6 18" }),
|
3435
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m6 6 12 12" })
|
3181
3436
|
)
|
3182
3437
|
) : null
|
3183
3438
|
}
|
3184
|
-
), enableHideColumns && /* @__PURE__ */
|
3439
|
+
), enableHideColumns && /* @__PURE__ */ React24.createElement(DropdownMenuRoot, null, /* @__PURE__ */ React24.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React24.createElement(
|
3185
3440
|
Button,
|
3186
3441
|
{
|
3187
3442
|
variant: "outline",
|
3188
3443
|
className: "hawa-flex hawa-flex-row hawa-gap-2"
|
3189
3444
|
},
|
3190
3445
|
((_d = props.texts) == null ? void 0 : _d.columns) || "Columns",
|
3191
|
-
/* @__PURE__ */
|
3446
|
+
/* @__PURE__ */ React24.createElement(
|
3192
3447
|
"svg",
|
3193
3448
|
{
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
height: "24",
|
3198
|
-
viewBox: "0 0 24 24",
|
3449
|
+
width: "15",
|
3450
|
+
height: "15",
|
3451
|
+
viewBox: "0 0 15 15",
|
3199
3452
|
fill: "none",
|
3200
|
-
|
3201
|
-
strokeWidth: "2",
|
3202
|
-
strokeLinecap: "round",
|
3203
|
-
strokeLinejoin: "round",
|
3204
|
-
className: "hawa-icon hawa-rotate-90"
|
3453
|
+
xmlns: "http://www.w3.org/2000/svg"
|
3205
3454
|
},
|
3206
|
-
/* @__PURE__ */
|
3455
|
+
/* @__PURE__ */ React24.createElement(
|
3456
|
+
"path",
|
3457
|
+
{
|
3458
|
+
d: "M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",
|
3459
|
+
fill: "currentColor",
|
3460
|
+
"fill-rule": "evenodd",
|
3461
|
+
"clip-rule": "evenodd"
|
3462
|
+
}
|
3463
|
+
)
|
3207
3464
|
)
|
3208
|
-
)), /* @__PURE__ */
|
3465
|
+
)), /* @__PURE__ */ React24.createElement(
|
3209
3466
|
DropdownMenuContent,
|
3210
3467
|
{
|
3211
3468
|
align: props.direction === "rtl" ? "start" : "end"
|
3212
3469
|
},
|
3213
3470
|
table.getAllColumns().filter((column) => column.getCanHide()).map((column) => {
|
3214
3471
|
var _a2, _b2;
|
3215
|
-
return /* @__PURE__ */
|
3472
|
+
return /* @__PURE__ */ React24.createElement(
|
3216
3473
|
DropdownMenuCheckboxItem,
|
3217
3474
|
{
|
3218
3475
|
key: column.id,
|
@@ -3224,26 +3481,28 @@ var DataTable = ({
|
|
3224
3481
|
) : column.id
|
3225
3482
|
);
|
3226
3483
|
})
|
3227
|
-
))), props.isLoading ? /* @__PURE__ */
|
3484
|
+
))), props.isLoading ? /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React24.createElement(
|
3228
3485
|
"div",
|
3229
3486
|
{
|
3230
3487
|
className: cn(
|
3231
|
-
"hawa-flex hawa-w-full
|
3488
|
+
"hawa-flex hawa-w-full hawa-gap-4",
|
3232
3489
|
paginationPosition === "top" ? "hawa-flex-col-reverse" : "hawa-flex-col"
|
3233
3490
|
)
|
3234
3491
|
},
|
3235
|
-
/* @__PURE__ */
|
3492
|
+
/* @__PURE__ */ React24.createElement("div", { className: "hawa-rounded-md" }, /* @__PURE__ */ React24.createElement(Table, null, !props.hideHeader && table.getAllColumns().length > 0 && /* @__PURE__ */ React24.createElement(TableHeader, null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React24.createElement(TableRow, { key: headerGroup.id }, headerGroup.headers.map((header) => {
|
3236
3493
|
var _a2;
|
3237
3494
|
let isSortable = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.sortable;
|
3238
|
-
return /* @__PURE__ */
|
3495
|
+
return /* @__PURE__ */ React24.createElement(
|
3239
3496
|
TableHead,
|
3240
3497
|
{
|
3498
|
+
key: header.id,
|
3241
3499
|
dir: props.direction,
|
3242
3500
|
condensed: props.condensed,
|
3243
3501
|
clickable: Boolean(isSortable),
|
3244
|
-
key: header.id,
|
3245
3502
|
style: {
|
3246
|
-
maxWidth: header.column.columnDef.maxSize
|
3503
|
+
maxWidth: `${header.column.columnDef.maxSize}px !important`,
|
3504
|
+
minWidth: `${header.column.columnDef.minSize}px !important`,
|
3505
|
+
width: `${header.column.columnDef.size}px !important`
|
3247
3506
|
}
|
3248
3507
|
},
|
3249
3508
|
header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
@@ -3251,7 +3510,7 @@ var DataTable = ({
|
|
3251
3510
|
header.getContext()
|
3252
3511
|
)
|
3253
3512
|
);
|
3254
|
-
})))), /* @__PURE__ */
|
3513
|
+
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_e = table.getRowModel().rows) == null ? void 0 : _e.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
|
3255
3514
|
TableRow,
|
3256
3515
|
{
|
3257
3516
|
key: row.id,
|
@@ -3259,15 +3518,17 @@ var DataTable = ({
|
|
3259
3518
|
},
|
3260
3519
|
row.getVisibleCells().map((cell) => {
|
3261
3520
|
var _a2;
|
3262
|
-
return /* @__PURE__ */
|
3521
|
+
return /* @__PURE__ */ React24.createElement(
|
3263
3522
|
TableCell,
|
3264
3523
|
{
|
3524
|
+
key: cell.id,
|
3525
|
+
dir: props.direction,
|
3265
3526
|
style: {
|
3266
|
-
maxWidth: cell.column.columnDef.maxSize
|
3527
|
+
maxWidth: `${cell.column.columnDef.maxSize}px !important`,
|
3528
|
+
minWidth: `${cell.column.columnDef.minSize}px !important`,
|
3529
|
+
width: `${cell.column.columnDef.size}px !important`
|
3267
3530
|
},
|
3268
|
-
|
3269
|
-
padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
|
3270
|
-
key: cell.id
|
3531
|
+
padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding
|
3271
3532
|
},
|
3272
3533
|
(0, import_react_table.flexRender)(
|
3273
3534
|
cell.column.columnDef.cell,
|
@@ -3275,7 +3536,7 @@ var DataTable = ({
|
|
3275
3536
|
)
|
3276
3537
|
);
|
3277
3538
|
})
|
3278
|
-
)) : /* @__PURE__ */
|
3539
|
+
)) : /* @__PURE__ */ React24.createElement(TableRow, null, /* @__PURE__ */ React24.createElement(
|
3279
3540
|
TableCell,
|
3280
3541
|
{
|
3281
3542
|
colSpan: columns.length,
|
@@ -3283,169 +3544,207 @@ var DataTable = ({
|
|
3283
3544
|
},
|
3284
3545
|
(_f = props.texts) == null ? void 0 : _f.noData
|
3285
3546
|
))))),
|
3286
|
-
/* @__PURE__ */
|
3547
|
+
/* @__PURE__ */ React24.createElement(
|
3287
3548
|
"div",
|
3288
3549
|
{
|
3289
|
-
className:
|
3290
|
-
|
3550
|
+
className: cn(
|
3551
|
+
"hawa-flex hawa-justify-between hawa-gap-4 tablet:hawa-gap-0",
|
3552
|
+
props.showSelectionCount ? "hawa-flex-col tablet:hawa-flex-row" : "hawa-flex-col mobile:hawa-flex-row"
|
3553
|
+
)
|
3291
3554
|
},
|
3292
|
-
/* @__PURE__ */
|
3293
|
-
" ",
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3297
|
-
|
3298
|
-
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
3305
|
-
|
3306
|
-
|
3307
|
-
|
3308
|
-
|
3555
|
+
!props.showCount && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }),
|
3556
|
+
props.showCount || table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount ? /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-h-auto hawa-gap-4" }, /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-h-auto hawa-items-center hawa-justify-between" }, props.showCount && /* @__PURE__ */ React24.createElement(
|
3557
|
+
"div",
|
3558
|
+
{
|
3559
|
+
className: "hawa-text-muted-foreground hawa-text-sm",
|
3560
|
+
dir: props.direction
|
3561
|
+
},
|
3562
|
+
/* @__PURE__ */ React24.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
|
3563
|
+
" ",
|
3564
|
+
/* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
3565
|
+
), props.showCount && table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React24.createElement("div", { className: "hawa-w-[0.5px] hawa-mx-2 hawa-bg-red-500 hawa-h-full" }), table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React24.createElement(
|
3566
|
+
"div",
|
3567
|
+
{
|
3568
|
+
className: "hawa-text-muted-foreground hawa-text-sm",
|
3569
|
+
dir: props.direction
|
3570
|
+
},
|
3571
|
+
table.getFilteredSelectedRowModel().rows.length,
|
3572
|
+
" ",
|
3573
|
+
(_h = props.texts) == null ? void 0 : _h.of,
|
3574
|
+
" ",
|
3575
|
+
table.getFilteredRowModel().rows.length,
|
3576
|
+
" ",
|
3577
|
+
(_i = props.texts) == null ? void 0 : _i.selectedRows
|
3578
|
+
)), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
|
3579
|
+
DropdownMenu,
|
3580
|
+
{
|
3581
|
+
size: "sm",
|
3582
|
+
width: "sm",
|
3583
|
+
direction: props.direction,
|
3584
|
+
items: (props.bulkActions || []).map((action) => ({
|
3585
|
+
...action,
|
3586
|
+
action: () => action.action(
|
3587
|
+
table.getFilteredSelectedRowModel().rows
|
3588
|
+
)
|
3589
|
+
})),
|
3590
|
+
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_j = props.texts) == null ? void 0 : _j.bulkAction) || "Bulk Action")
|
3591
|
+
}
|
3592
|
+
))) : null,
|
3593
|
+
/* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-items-center hawa-gap-2 hawa-bg--500 tablet:hawa-w-fit hawa-justify-between" }, enableGoTo && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-text-sm" }, (_k = props.texts) == null ? void 0 : _k.goTo), /* @__PURE__ */ React24.createElement(
|
3594
|
+
"input",
|
3595
|
+
{
|
3596
|
+
max: table.getPageCount(),
|
3597
|
+
min: 0,
|
3598
|
+
type: "number",
|
3599
|
+
defaultValue: table.getState().pagination.pageIndex + 1,
|
3600
|
+
onChange: (e) => {
|
3601
|
+
let page = Number(e.target.value) - 1;
|
3602
|
+
const max = table.getPageCount();
|
3603
|
+
if (!isNaN(page) && Number(page) > max) {
|
3604
|
+
page = max - 1;
|
3605
|
+
}
|
3606
|
+
table.setPageIndex(page);
|
3607
|
+
},
|
3608
|
+
className: "hawa-w-16 hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-text-sm placeholder:hawa-text-muted-foreground"
|
3609
|
+
}
|
3610
|
+
)), /* @__PURE__ */ React24.createElement(
|
3611
|
+
DropdownMenu,
|
3612
|
+
{
|
3613
|
+
size: "sm",
|
3614
|
+
width: "sm",
|
3615
|
+
direction: props.direction,
|
3616
|
+
items: itemsPerPageOptions || [
|
3617
|
+
{ label: `10 / ${pageText}`, value: 10 },
|
3618
|
+
{ label: `20 / ${pageText}`, value: 20 },
|
3619
|
+
{ label: `30 / ${pageText}`, value: 30 },
|
3620
|
+
{ label: `40 / ${pageText}`, value: 40 },
|
3621
|
+
{ label: `50 / ${pageText}`, value: 50 }
|
3622
|
+
],
|
3623
|
+
trigger: /* @__PURE__ */ React24.createElement(
|
3624
|
+
Button,
|
3625
|
+
{
|
3626
|
+
variant: "outline",
|
3627
|
+
size: "icon",
|
3628
|
+
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
|
3629
|
+
},
|
3630
|
+
`${table.getState().pagination.pageSize} / ${(_l = props.texts) == null ? void 0 : _l.page}`
|
3631
|
+
),
|
3632
|
+
onItemSelect: (e) => table.setPageSize(Number(e))
|
3633
|
+
}
|
3634
|
+
), table.getPageCount() > 1 && /* @__PURE__ */ React24.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React24.createElement("div", null, (_m = props.texts) == null ? void 0 : _m.page), /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React24.createElement("span", null, (_n = props.texts) == null ? void 0 : _n.of), /* @__PURE__ */ React24.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center hawa-bg--500" }, /* @__PURE__ */ React24.createElement(
|
3635
|
+
Button,
|
3636
|
+
{
|
3637
|
+
"aria-label": "Next Table Page",
|
3638
|
+
variant: "outline",
|
3639
|
+
size: "smallIcon",
|
3640
|
+
onClick: () => table.setPageIndex(0),
|
3641
|
+
disabled: !table.getCanPreviousPage(),
|
3642
|
+
className: cn(
|
3643
|
+
props.direction === "rtl" && "hawa-rotate-180"
|
3644
|
+
)
|
3309
3645
|
},
|
3310
|
-
|
3311
|
-
|
3312
|
-
)), /* @__PURE__ */ React23.createElement(
|
3313
|
-
DropdownMenu,
|
3314
|
-
{
|
3315
|
-
size: "sm",
|
3316
|
-
width: "sm",
|
3317
|
-
direction: props.direction,
|
3318
|
-
items: itemsPerPageOptions || [
|
3319
|
-
{ label: `10 / ${pageText}`, value: 10 },
|
3320
|
-
{ label: `20 / ${pageText}`, value: 20 },
|
3321
|
-
{ label: `30 / ${pageText}`, value: 30 },
|
3322
|
-
{ label: `40 / ${pageText}`, value: 40 },
|
3323
|
-
{ label: `50 / ${pageText}`, value: 50 }
|
3324
|
-
],
|
3325
|
-
trigger: /* @__PURE__ */ React23.createElement(
|
3326
|
-
Button,
|
3646
|
+
/* @__PURE__ */ React24.createElement(
|
3647
|
+
"svg",
|
3327
3648
|
{
|
3328
|
-
|
3329
|
-
|
3330
|
-
|
3649
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3650
|
+
width: "20",
|
3651
|
+
height: "20",
|
3652
|
+
viewBox: "0 0 24 24",
|
3653
|
+
fill: "none",
|
3654
|
+
stroke: "currentColor",
|
3655
|
+
strokeWidth: "2",
|
3656
|
+
strokeLinecap: "round",
|
3657
|
+
strokeLinejoin: "round"
|
3331
3658
|
},
|
3332
|
-
|
3333
|
-
|
3334
|
-
onItemSelect: (e) => table.setPageSize(Number(e))
|
3335
|
-
}
|
3336
|
-
), table.getPageCount() > 1 && /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm " }, /* @__PURE__ */ React23.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React23.createElement("div", null, (_j = props.texts) == null ? void 0 : _j.page), /* @__PURE__ */ React23.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React23.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React23.createElement("span", null, (_k = props.texts) == null ? void 0 : _k.of), /* @__PURE__ */ React23.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React23.createElement(
|
3337
|
-
Button,
|
3338
|
-
{
|
3339
|
-
"aria-label": "Next Table Page",
|
3340
|
-
variant: "outline",
|
3341
|
-
size: "smallIcon",
|
3342
|
-
onClick: () => table.setPageIndex(0),
|
3343
|
-
disabled: !table.getCanPreviousPage(),
|
3344
|
-
className: cn(
|
3345
|
-
props.direction === "rtl" && "hawa-rotate-180"
|
3659
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m11 17-5-5 5-5" }),
|
3660
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m18 17-5-5 5-5" })
|
3346
3661
|
)
|
3347
|
-
|
3348
|
-
|
3349
|
-
"svg",
|
3662
|
+
), /* @__PURE__ */ React24.createElement(
|
3663
|
+
Button,
|
3350
3664
|
{
|
3351
|
-
|
3352
|
-
|
3353
|
-
|
3354
|
-
|
3355
|
-
|
3356
|
-
|
3357
|
-
|
3358
|
-
|
3359
|
-
strokeLinejoin: "round"
|
3665
|
+
"aria-label": "Previous Table Page",
|
3666
|
+
variant: "outline",
|
3667
|
+
size: "smallIcon",
|
3668
|
+
onClick: () => table.previousPage(),
|
3669
|
+
disabled: !table.getCanPreviousPage(),
|
3670
|
+
className: cn(
|
3671
|
+
props.direction === "rtl" && "hawa-rotate-180"
|
3672
|
+
)
|
3360
3673
|
},
|
3361
|
-
/* @__PURE__ */
|
3362
|
-
|
3363
|
-
|
3364
|
-
|
3365
|
-
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
|
3674
|
+
/* @__PURE__ */ React24.createElement(
|
3675
|
+
"svg",
|
3676
|
+
{
|
3677
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3678
|
+
width: "20",
|
3679
|
+
height: "20",
|
3680
|
+
"aria-label": "Single Chevron Icon",
|
3681
|
+
viewBox: "0 0 24 24",
|
3682
|
+
fill: "none",
|
3683
|
+
stroke: "currentColor",
|
3684
|
+
strokeWidth: "2",
|
3685
|
+
strokeLinecap: "round",
|
3686
|
+
strokeLinejoin: "round"
|
3687
|
+
},
|
3688
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m15 18-6-6 6-6" })
|
3374
3689
|
)
|
3375
|
-
|
3376
|
-
|
3377
|
-
"svg",
|
3690
|
+
), /* @__PURE__ */ React24.createElement(
|
3691
|
+
Button,
|
3378
3692
|
{
|
3379
|
-
|
3380
|
-
|
3381
|
-
|
3382
|
-
|
3383
|
-
|
3384
|
-
|
3385
|
-
|
3386
|
-
|
3387
|
-
strokeLinecap: "round",
|
3388
|
-
strokeLinejoin: "round"
|
3693
|
+
"aria-label": "Next Table Page",
|
3694
|
+
variant: "outline",
|
3695
|
+
size: "smallIcon",
|
3696
|
+
onClick: () => table.nextPage(),
|
3697
|
+
disabled: !table.getCanNextPage(),
|
3698
|
+
className: cn(
|
3699
|
+
props.direction === "ltr" && "hawa-rotate-180"
|
3700
|
+
)
|
3389
3701
|
},
|
3390
|
-
/* @__PURE__ */
|
3391
|
-
|
3392
|
-
|
3393
|
-
|
3394
|
-
|
3395
|
-
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
|
3401
|
-
|
3702
|
+
/* @__PURE__ */ React24.createElement(
|
3703
|
+
"svg",
|
3704
|
+
{
|
3705
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3706
|
+
width: "20",
|
3707
|
+
height: "20",
|
3708
|
+
"aria-label": "Single Chevron Icon",
|
3709
|
+
viewBox: "0 0 24 24",
|
3710
|
+
fill: "none",
|
3711
|
+
stroke: "currentColor",
|
3712
|
+
strokeWidth: "2",
|
3713
|
+
strokeLinecap: "round",
|
3714
|
+
strokeLinejoin: "round"
|
3715
|
+
},
|
3716
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m15 18-6-6 6-6" })
|
3402
3717
|
)
|
3403
|
-
|
3404
|
-
|
3405
|
-
"svg",
|
3718
|
+
), /* @__PURE__ */ React24.createElement(
|
3719
|
+
Button,
|
3406
3720
|
{
|
3407
|
-
|
3408
|
-
|
3409
|
-
|
3410
|
-
|
3411
|
-
|
3412
|
-
|
3413
|
-
|
3414
|
-
|
3415
|
-
strokeLinecap: "round",
|
3416
|
-
strokeLinejoin: "round"
|
3721
|
+
"aria-label": "Next Table Page",
|
3722
|
+
variant: "outline",
|
3723
|
+
size: "smallIcon",
|
3724
|
+
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
3725
|
+
disabled: !table.getCanNextPage(),
|
3726
|
+
className: cn(
|
3727
|
+
props.direction === "ltr" && "hawa-rotate-180"
|
3728
|
+
)
|
3417
3729
|
},
|
3418
|
-
/* @__PURE__ */
|
3419
|
-
|
3420
|
-
|
3421
|
-
|
3422
|
-
|
3423
|
-
|
3424
|
-
|
3425
|
-
|
3426
|
-
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3730
|
+
/* @__PURE__ */ React24.createElement(
|
3731
|
+
"svg",
|
3732
|
+
{
|
3733
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3734
|
+
width: "20",
|
3735
|
+
height: "20",
|
3736
|
+
viewBox: "0 0 24 24",
|
3737
|
+
fill: "none",
|
3738
|
+
stroke: "currentColor",
|
3739
|
+
strokeWidth: "2",
|
3740
|
+
strokeLinecap: "round",
|
3741
|
+
strokeLinejoin: "round"
|
3742
|
+
},
|
3743
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m11 17-5-5 5-5" }),
|
3744
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m18 17-5-5 5-5" })
|
3430
3745
|
)
|
3431
|
-
|
3432
|
-
|
3433
|
-
"svg",
|
3434
|
-
{
|
3435
|
-
xmlns: "http://www.w3.org/2000/svg",
|
3436
|
-
width: "20",
|
3437
|
-
height: "20",
|
3438
|
-
viewBox: "0 0 24 24",
|
3439
|
-
fill: "none",
|
3440
|
-
stroke: "currentColor",
|
3441
|
-
strokeWidth: "2",
|
3442
|
-
strokeLinecap: "round",
|
3443
|
-
strokeLinejoin: "round"
|
3444
|
-
},
|
3445
|
-
/* @__PURE__ */ React23.createElement("path", { d: "m11 17-5-5 5-5" }),
|
3446
|
-
/* @__PURE__ */ React23.createElement("path", { d: "m18 17-5-5 5-5" })
|
3447
|
-
)
|
3448
|
-
))))
|
3746
|
+
))))
|
3747
|
+
)
|
3449
3748
|
));
|
3450
3749
|
};
|
3451
3750
|
|
@@ -3550,10 +3849,10 @@ var BackToTop = ({ ...props }) => {
|
|
3550
3849
|
var import_react13 = __toESM(require("react"));
|
3551
3850
|
|
3552
3851
|
// elements/popover/Popover.tsx
|
3553
|
-
var
|
3852
|
+
var React26 = __toESM(require("react"));
|
3554
3853
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
3555
|
-
var PopoverContent =
|
3556
|
-
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */
|
3854
|
+
var PopoverContent = React26.forwardRef(
|
3855
|
+
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React26.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React26.createElement(
|
3557
3856
|
PopoverPrimitive.Content,
|
3558
3857
|
{
|
3559
3858
|
ref,
|
@@ -3586,7 +3885,7 @@ var Popover = ({
|
|
3586
3885
|
trigger: "var(--radix-popover-trigger-width)",
|
3587
3886
|
default: "auto"
|
3588
3887
|
};
|
3589
|
-
return /* @__PURE__ */
|
3888
|
+
return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React26.createElement(
|
3590
3889
|
PopoverPrimitive.Trigger,
|
3591
3890
|
{
|
3592
3891
|
className: "hawa-w-full",
|
@@ -3594,7 +3893,7 @@ var Popover = ({
|
|
3594
3893
|
...triggerProps
|
3595
3894
|
},
|
3596
3895
|
trigger
|
3597
|
-
), /* @__PURE__ */
|
3896
|
+
), /* @__PURE__ */ React26.createElement(
|
3598
3897
|
PopoverContent,
|
3599
3898
|
{
|
3600
3899
|
side,
|
@@ -3885,14 +4184,14 @@ var Radio = (0, import_react13.forwardRef)(
|
|
3885
4184
|
);
|
3886
4185
|
|
3887
4186
|
// elements/combobox/Combobox.tsx
|
3888
|
-
var
|
4187
|
+
var React29 = __toESM(require("react"));
|
3889
4188
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
3890
4189
|
|
3891
4190
|
// elements/command/Command.tsx
|
3892
|
-
var
|
4191
|
+
var React28 = __toESM(require("react"));
|
3893
4192
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
3894
4193
|
var import_cmdk = require("cmdk");
|
3895
|
-
var Command =
|
4194
|
+
var Command = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3896
4195
|
import_cmdk.Command,
|
3897
4196
|
{
|
3898
4197
|
ref,
|
@@ -3904,15 +4203,15 @@ var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
3904
4203
|
}
|
3905
4204
|
));
|
3906
4205
|
var CommandDialog = ({ children, ...props }) => {
|
3907
|
-
return /* @__PURE__ */
|
4206
|
+
return /* @__PURE__ */ React28.createElement(import_react_dialog.Dialog, { ...props }, /* @__PURE__ */ React28.createElement(DialogContent, { className: "hawa-overflow-hidden hawa-p-0 hawa-shadow-lg" }, /* @__PURE__ */ React28.createElement(Command, { className: "[&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:hawa-pt-0 [&_[cmdk-group]]:hawa-px-2 [&_[cmdk-input-wrapper]_svg]:hawa-h-5 [&_[cmdk-input-wrapper]_svg]:hawa-w-5 [&_[cmdk-input]]:hawa-h-12 [&_[cmdk-item]]:hawa-px-2 [&_[cmdk-item]]:hawa-py-3 [&_[cmdk-item]_svg]:hawa-h-5 [&_[cmdk-item]_svg]:hawa-w-5" }, children)));
|
3908
4207
|
};
|
3909
|
-
var CommandInput =
|
4208
|
+
var CommandInput = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3910
4209
|
"div",
|
3911
4210
|
{
|
3912
4211
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
3913
4212
|
"cmdk-input-wrapper": ""
|
3914
4213
|
},
|
3915
|
-
/* @__PURE__ */
|
4214
|
+
/* @__PURE__ */ React28.createElement(
|
3916
4215
|
"svg",
|
3917
4216
|
{
|
3918
4217
|
"aria-label": "Search Icon",
|
@@ -3927,10 +4226,10 @@ var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3927
4226
|
strokeLinejoin: "round",
|
3928
4227
|
className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
|
3929
4228
|
},
|
3930
|
-
/* @__PURE__ */
|
3931
|
-
/* @__PURE__ */
|
4229
|
+
/* @__PURE__ */ React28.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
4230
|
+
/* @__PURE__ */ React28.createElement("path", { d: "m21 21-4.3-4.3" })
|
3932
4231
|
),
|
3933
|
-
/* @__PURE__ */
|
4232
|
+
/* @__PURE__ */ React28.createElement(
|
3934
4233
|
import_cmdk.Command.Input,
|
3935
4234
|
{
|
3936
4235
|
ref,
|
@@ -3942,7 +4241,7 @@ var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3942
4241
|
}
|
3943
4242
|
)
|
3944
4243
|
));
|
3945
|
-
var CommandList =
|
4244
|
+
var CommandList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3946
4245
|
import_cmdk.Command.List,
|
3947
4246
|
{
|
3948
4247
|
ref,
|
@@ -3953,7 +4252,7 @@ var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
3953
4252
|
...props
|
3954
4253
|
}
|
3955
4254
|
));
|
3956
|
-
var CommandEmpty =
|
4255
|
+
var CommandEmpty = React28.forwardRef((props, ref) => /* @__PURE__ */ React28.createElement(
|
3957
4256
|
import_cmdk.Command.Empty,
|
3958
4257
|
{
|
3959
4258
|
ref,
|
@@ -3961,7 +4260,7 @@ var CommandEmpty = React27.forwardRef((props, ref) => /* @__PURE__ */ React27.cr
|
|
3961
4260
|
...props
|
3962
4261
|
}
|
3963
4262
|
));
|
3964
|
-
var CommandGroup =
|
4263
|
+
var CommandGroup = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3965
4264
|
import_cmdk.Command.Group,
|
3966
4265
|
{
|
3967
4266
|
ref,
|
@@ -3972,7 +4271,7 @@ var CommandGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3972
4271
|
...props
|
3973
4272
|
}
|
3974
4273
|
));
|
3975
|
-
var CommandSeparator =
|
4274
|
+
var CommandSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3976
4275
|
import_cmdk.Command.Separator,
|
3977
4276
|
{
|
3978
4277
|
ref,
|
@@ -3980,7 +4279,7 @@ var CommandSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @
|
|
3980
4279
|
...props
|
3981
4280
|
}
|
3982
4281
|
));
|
3983
|
-
var CommandItem =
|
4282
|
+
var CommandItem = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3984
4283
|
import_cmdk.Command.Item,
|
3985
4284
|
{
|
3986
4285
|
ref,
|
@@ -3995,7 +4294,7 @@ var CommandShortcut = ({
|
|
3995
4294
|
className,
|
3996
4295
|
...props
|
3997
4296
|
}) => {
|
3998
|
-
return /* @__PURE__ */
|
4297
|
+
return /* @__PURE__ */ React28.createElement(
|
3999
4298
|
"span",
|
4000
4299
|
{
|
4001
4300
|
className: cn(
|
@@ -4012,22 +4311,22 @@ var FullCommand = ({
|
|
4012
4311
|
texts,
|
4013
4312
|
onActionClick
|
4014
4313
|
}) => {
|
4015
|
-
return /* @__PURE__ */
|
4314
|
+
return /* @__PURE__ */ React28.createElement(
|
4016
4315
|
Command,
|
4017
4316
|
{
|
4018
4317
|
dir: direction,
|
4019
4318
|
className: "hawa-rounded-lg hawa-border hawa-shadow-md !hawa-h-full"
|
4020
4319
|
},
|
4021
|
-
/* @__PURE__ */
|
4320
|
+
/* @__PURE__ */ React28.createElement(
|
4022
4321
|
CommandInput,
|
4023
4322
|
{
|
4024
4323
|
placeholder: (texts == null ? void 0 : texts.searchPlaceholder) || "Type a command or search..."
|
4025
4324
|
}
|
4026
4325
|
),
|
4027
|
-
/* @__PURE__ */
|
4326
|
+
/* @__PURE__ */ React28.createElement(CommandList, null, /* @__PURE__ */ React28.createElement(CommandEmpty, null, (texts == null ? void 0 : texts.emptyText) || "No results found."), items.map((item, index) => {
|
4028
4327
|
var _a;
|
4029
4328
|
if (item.type === "group") {
|
4030
|
-
return /* @__PURE__ */
|
4329
|
+
return /* @__PURE__ */ React28.createElement(CommandGroup, { heading: item.heading, key: index }, (_a = item.items) == null ? void 0 : _a.map((subItem, subIndex) => /* @__PURE__ */ React28.createElement(
|
4031
4330
|
CommandItem,
|
4032
4331
|
{
|
4033
4332
|
key: subIndex,
|
@@ -4037,12 +4336,12 @@ var FullCommand = ({
|
|
4037
4336
|
subItem.action();
|
4038
4337
|
}
|
4039
4338
|
},
|
4040
|
-
/* @__PURE__ */
|
4041
|
-
/* @__PURE__ */
|
4042
|
-
subItem.shortcut && /* @__PURE__ */
|
4339
|
+
/* @__PURE__ */ React28.createElement(subItem.icon, { className: "hawa-icon hawa-me-2" }),
|
4340
|
+
/* @__PURE__ */ React28.createElement("span", null, subItem.label),
|
4341
|
+
subItem.shortcut && /* @__PURE__ */ React28.createElement(CommandShortcut, null, subItem.shortcut)
|
4043
4342
|
)));
|
4044
4343
|
} else if (item.type === "separator") {
|
4045
|
-
return /* @__PURE__ */
|
4344
|
+
return /* @__PURE__ */ React28.createElement(CommandSeparator, { key: index });
|
4046
4345
|
}
|
4047
4346
|
return null;
|
4048
4347
|
}))
|
@@ -4053,13 +4352,13 @@ var AppCommand = ({
|
|
4053
4352
|
dialogProps,
|
4054
4353
|
onActionClick
|
4055
4354
|
}) => {
|
4056
|
-
return /* @__PURE__ */
|
4355
|
+
return /* @__PURE__ */ React28.createElement(import_react_dialog.Dialog, { ...dialogProps }, /* @__PURE__ */ React28.createElement(
|
4057
4356
|
DialogContent,
|
4058
4357
|
{
|
4059
4358
|
hideCloseButton: true,
|
4060
4359
|
className: "hawa-overflow-hidden !hawa-p-0 hawa-shadow-l "
|
4061
4360
|
},
|
4062
|
-
/* @__PURE__ */
|
4361
|
+
/* @__PURE__ */ React28.createElement(FullCommand, { ...commandProps, onActionClick })
|
4063
4362
|
));
|
4064
4363
|
};
|
4065
4364
|
CommandShortcut.displayName = "CommandShortcut";
|
@@ -4072,7 +4371,7 @@ Command.displayName = import_cmdk.Command.displayName;
|
|
4072
4371
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
4073
4372
|
|
4074
4373
|
// elements/combobox/Combobox.tsx
|
4075
|
-
var Combobox =
|
4374
|
+
var Combobox = React29.forwardRef(
|
4076
4375
|
({
|
4077
4376
|
labelKey = "label",
|
4078
4377
|
valueKey = "value",
|
@@ -4087,9 +4386,9 @@ var Combobox = React28.forwardRef(
|
|
4087
4386
|
...props
|
4088
4387
|
}, ref) => {
|
4089
4388
|
var _a, _b, _c;
|
4090
|
-
const [open, setOpen] =
|
4091
|
-
const [value, setValue] =
|
4092
|
-
const containerRef =
|
4389
|
+
const [open, setOpen] = React29.useState(false);
|
4390
|
+
const [value, setValue] = React29.useState(defaultValue);
|
4391
|
+
const containerRef = React29.useRef(null);
|
4093
4392
|
function getProperty(obj, key) {
|
4094
4393
|
return key.split(".").reduce((o, k) => (o || {})[k], obj);
|
4095
4394
|
}
|
@@ -4101,7 +4400,7 @@ var Combobox = React28.forwardRef(
|
|
4101
4400
|
const selectedItem = data.find(
|
4102
4401
|
(item) => getProperty(item, valueKey) === value
|
4103
4402
|
);
|
4104
|
-
return /* @__PURE__ */
|
4403
|
+
return /* @__PURE__ */ React29.createElement(
|
4105
4404
|
"div",
|
4106
4405
|
{
|
4107
4406
|
className: cn(
|
@@ -4110,8 +4409,8 @@ var Combobox = React28.forwardRef(
|
|
4110
4409
|
),
|
4111
4410
|
ref: containerRef
|
4112
4411
|
},
|
4113
|
-
props.label && /* @__PURE__ */
|
4114
|
-
/* @__PURE__ */
|
4412
|
+
props.label && /* @__PURE__ */ React29.createElement(Label2, { ...labelProps }, props.label),
|
4413
|
+
/* @__PURE__ */ React29.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React29.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React29.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React29.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React29.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React29.createElement(
|
4115
4414
|
"div",
|
4116
4415
|
{
|
4117
4416
|
className: cn(
|
@@ -4119,7 +4418,7 @@ var Combobox = React28.forwardRef(
|
|
4119
4418
|
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
4120
4419
|
)
|
4121
4420
|
}
|
4122
|
-
), /* @__PURE__ */
|
4421
|
+
), /* @__PURE__ */ React29.createElement(
|
4123
4422
|
"button",
|
4124
4423
|
{
|
4125
4424
|
role: "combobox",
|
@@ -4131,7 +4430,7 @@ var Combobox = React28.forwardRef(
|
|
4131
4430
|
)
|
4132
4431
|
},
|
4133
4432
|
selectedItem ? renderSelected ? renderSelected(selectedItem) : getProperty(selectedItem, labelKey) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || ". . .",
|
4134
|
-
/* @__PURE__ */
|
4433
|
+
/* @__PURE__ */ React29.createElement(
|
4135
4434
|
"svg",
|
4136
4435
|
{
|
4137
4436
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -4147,9 +4446,9 @@ var Combobox = React28.forwardRef(
|
|
4147
4446
|
strokeLinecap: "round",
|
4148
4447
|
strokeLinejoin: "round"
|
4149
4448
|
},
|
4150
|
-
/* @__PURE__ */
|
4449
|
+
/* @__PURE__ */ React29.createElement("path", { d: "m6 9 6 6 6-6" })
|
4151
4450
|
)
|
4152
|
-
), /* @__PURE__ */
|
4451
|
+
), /* @__PURE__ */ React29.createElement(HelperText, { helperText: props.helperText }))), /* @__PURE__ */ React29.createElement(
|
4153
4452
|
PopoverContent,
|
4154
4453
|
{
|
4155
4454
|
sideOffset: 0,
|
@@ -4157,7 +4456,7 @@ var Combobox = React28.forwardRef(
|
|
4157
4456
|
dir: direction,
|
4158
4457
|
container: containerRef.current
|
4159
4458
|
},
|
4160
|
-
/* @__PURE__ */
|
4459
|
+
/* @__PURE__ */ React29.createElement(
|
4161
4460
|
Command,
|
4162
4461
|
{
|
4163
4462
|
filter: (value2, search) => {
|
@@ -4166,7 +4465,7 @@ var Combobox = React28.forwardRef(
|
|
4166
4465
|
return 0;
|
4167
4466
|
}
|
4168
4467
|
},
|
4169
|
-
!props.hideInput && /* @__PURE__ */
|
4468
|
+
!props.hideInput && /* @__PURE__ */ React29.createElement(
|
4170
4469
|
CommandInput,
|
4171
4470
|
{
|
4172
4471
|
...inputProps,
|
@@ -4174,8 +4473,8 @@ var Combobox = React28.forwardRef(
|
|
4174
4473
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
4175
4474
|
}
|
4176
4475
|
),
|
4177
|
-
/* @__PURE__ */
|
4178
|
-
/* @__PURE__ */
|
4476
|
+
/* @__PURE__ */ React29.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."),
|
4477
|
+
/* @__PURE__ */ React29.createElement(CommandList, null, /* @__PURE__ */ React29.createElement(
|
4179
4478
|
CommandGroup,
|
4180
4479
|
{
|
4181
4480
|
className: cn(
|
@@ -4183,7 +4482,7 @@ var Combobox = React28.forwardRef(
|
|
4183
4482
|
data.length > 0 && "hawa-overflow-y-auto"
|
4184
4483
|
)
|
4185
4484
|
},
|
4186
|
-
data.map((item, i) => /* @__PURE__ */
|
4485
|
+
data.map((item, i) => /* @__PURE__ */ React29.createElement(
|
4187
4486
|
CommandItem,
|
4188
4487
|
{
|
4189
4488
|
key: i,
|
@@ -4200,7 +4499,7 @@ var Combobox = React28.forwardRef(
|
|
4200
4499
|
setOpen(false);
|
4201
4500
|
}
|
4202
4501
|
},
|
4203
|
-
/* @__PURE__ */
|
4502
|
+
/* @__PURE__ */ React29.createElement(
|
4204
4503
|
"svg",
|
4205
4504
|
{
|
4206
4505
|
"aria-label": "Check Icon",
|
@@ -4219,7 +4518,7 @@ var Combobox = React28.forwardRef(
|
|
4219
4518
|
),
|
4220
4519
|
style: { marginInlineEnd: "0.5rem" }
|
4221
4520
|
},
|
4222
|
-
/* @__PURE__ */
|
4521
|
+
/* @__PURE__ */ React29.createElement("polyline", { points: "20 6 9 17 4 12" })
|
4223
4522
|
),
|
4224
4523
|
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
4225
4524
|
))
|
@@ -4231,8 +4530,8 @@ var Combobox = React28.forwardRef(
|
|
4231
4530
|
);
|
4232
4531
|
|
4233
4532
|
// elements/textarea/Textarea.tsx
|
4234
|
-
var
|
4235
|
-
var Textarea =
|
4533
|
+
var React30 = __toESM(require("react"));
|
4534
|
+
var Textarea = React30.forwardRef(
|
4236
4535
|
({
|
4237
4536
|
className,
|
4238
4537
|
classNames,
|
@@ -4244,7 +4543,7 @@ var Textarea = React29.forwardRef(
|
|
4244
4543
|
isLoading,
|
4245
4544
|
...props
|
4246
4545
|
}, ref) => {
|
4247
|
-
return /* @__PURE__ */
|
4546
|
+
return /* @__PURE__ */ React30.createElement(
|
4248
4547
|
"div",
|
4249
4548
|
{
|
4250
4549
|
className: cn(
|
@@ -4253,7 +4552,7 @@ var Textarea = React29.forwardRef(
|
|
4253
4552
|
className
|
4254
4553
|
)
|
4255
4554
|
},
|
4256
|
-
/* @__PURE__ */
|
4555
|
+
/* @__PURE__ */ React30.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React30.createElement(Label2, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React30.createElement(
|
4257
4556
|
"div",
|
4258
4557
|
{
|
4259
4558
|
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
@@ -4262,7 +4561,7 @@ var Textarea = React29.forwardRef(
|
|
4262
4561
|
"/",
|
4263
4562
|
textareaProps == null ? void 0 : textareaProps.maxLength
|
4264
4563
|
)),
|
4265
|
-
isLoading ? /* @__PURE__ */
|
4564
|
+
isLoading ? /* @__PURE__ */ React30.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React30.createElement(
|
4266
4565
|
"textarea",
|
4267
4566
|
{
|
4268
4567
|
...textareaProps,
|
@@ -4273,7 +4572,7 @@ var Textarea = React29.forwardRef(
|
|
4273
4572
|
ref
|
4274
4573
|
}
|
4275
4574
|
),
|
4276
|
-
/* @__PURE__ */
|
4575
|
+
/* @__PURE__ */ React30.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React30.createElement(HelperText, { helperText: props.helperText }), showCount && countPosition === "bottom" && /* @__PURE__ */ React30.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
4277
4576
|
);
|
4278
4577
|
}
|
4279
4578
|
);
|
@@ -4536,7 +4835,7 @@ var SortButton = (props) => {
|
|
4536
4835
|
};
|
4537
4836
|
|
4538
4837
|
// elements/tabs/Tabs.tsx
|
4539
|
-
var
|
4838
|
+
var React42 = __toESM(require("react"));
|
4540
4839
|
|
4541
4840
|
// hooks/useIsomorphicEffect.ts
|
4542
4841
|
var import_react16 = require("react");
|
@@ -4549,7 +4848,7 @@ var import_react17 = require("react");
|
|
4549
4848
|
var import_react18 = require("react");
|
4550
4849
|
|
4551
4850
|
// hooks/useToast.ts
|
4552
|
-
var
|
4851
|
+
var React35 = __toESM(require("react"));
|
4553
4852
|
var TOAST_LIMIT = 5;
|
4554
4853
|
var TOAST_REMOVE_DELAY = 1e5;
|
4555
4854
|
var count = 0;
|
@@ -4635,8 +4934,8 @@ function toast({ ...props }) {
|
|
4635
4934
|
return { id, dismiss, update };
|
4636
4935
|
}
|
4637
4936
|
function useToast() {
|
4638
|
-
const [state, setState] =
|
4639
|
-
|
4937
|
+
const [state, setState] = React35.useState(memoryState);
|
4938
|
+
React35.useEffect(() => {
|
4640
4939
|
listeners.push(setState);
|
4641
4940
|
return () => {
|
4642
4941
|
const index = listeners.indexOf(setState);
|
@@ -5107,15 +5406,15 @@ var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
5107
5406
|
var import_tailwind_variants = require("tailwind-variants");
|
5108
5407
|
|
5109
5408
|
// elements/scrollArea/ScrollArea.tsx
|
5110
|
-
var
|
5409
|
+
var React41 = __toESM(require("react"));
|
5111
5410
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
|
5112
|
-
var ScrollArea =
|
5113
|
-
const scrollAreaRef =
|
5114
|
-
const isDragging =
|
5115
|
-
const startPos =
|
5116
|
-
const scrollPos =
|
5117
|
-
const [showLeftFade, setShowLeftFade] =
|
5118
|
-
const [showRightFade, setShowRightFade] =
|
5411
|
+
var ScrollArea = React41.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => {
|
5412
|
+
const scrollAreaRef = React41.useRef(null);
|
5413
|
+
const isDragging = React41.useRef(false);
|
5414
|
+
const startPos = React41.useRef({ x: 0, y: 0 });
|
5415
|
+
const scrollPos = React41.useRef({ top: 0, left: 0 });
|
5416
|
+
const [showLeftFade, setShowLeftFade] = React41.useState(false);
|
5417
|
+
const [showRightFade, setShowRightFade] = React41.useState(false);
|
5119
5418
|
const checkOverflow = () => {
|
5120
5419
|
if (scrollAreaRef.current) {
|
5121
5420
|
const { scrollLeft, scrollWidth, clientWidth } = scrollAreaRef.current;
|
@@ -5152,7 +5451,7 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
5152
5451
|
document.removeEventListener("mousemove", onMouseMove);
|
5153
5452
|
document.removeEventListener("mouseup", onMouseUp);
|
5154
5453
|
};
|
5155
|
-
|
5454
|
+
React41.useEffect(() => {
|
5156
5455
|
checkOverflow();
|
5157
5456
|
if (scrollAreaRef.current) {
|
5158
5457
|
scrollAreaRef.current.addEventListener("scroll", checkOverflow);
|
@@ -5165,14 +5464,14 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
5165
5464
|
window.removeEventListener("resize", checkOverflow);
|
5166
5465
|
};
|
5167
5466
|
}, []);
|
5168
|
-
return /* @__PURE__ */
|
5467
|
+
return /* @__PURE__ */ React41.createElement(
|
5169
5468
|
ScrollAreaPrimitive.Root,
|
5170
5469
|
{
|
5171
5470
|
ref,
|
5172
5471
|
className: cn("hawa-relative hawa-overflow-hidden", className),
|
5173
5472
|
...props
|
5174
5473
|
},
|
5175
|
-
/* @__PURE__ */
|
5474
|
+
/* @__PURE__ */ React41.createElement(
|
5176
5475
|
"div",
|
5177
5476
|
{
|
5178
5477
|
className: cn(
|
@@ -5181,7 +5480,7 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
5181
5480
|
)
|
5182
5481
|
}
|
5183
5482
|
),
|
5184
|
-
/* @__PURE__ */
|
5483
|
+
/* @__PURE__ */ React41.createElement(
|
5185
5484
|
"div",
|
5186
5485
|
{
|
5187
5486
|
className: cn(
|
@@ -5190,7 +5489,7 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
5190
5489
|
)
|
5191
5490
|
}
|
5192
5491
|
),
|
5193
|
-
/* @__PURE__ */
|
5492
|
+
/* @__PURE__ */ React41.createElement(
|
5194
5493
|
ScrollAreaPrimitive.Viewport,
|
5195
5494
|
{
|
5196
5495
|
ref: scrollAreaRef,
|
@@ -5199,12 +5498,12 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
5199
5498
|
},
|
5200
5499
|
children
|
5201
5500
|
),
|
5202
|
-
/* @__PURE__ */
|
5203
|
-
/* @__PURE__ */
|
5501
|
+
/* @__PURE__ */ React41.createElement(ScrollBar, { orientation }),
|
5502
|
+
/* @__PURE__ */ React41.createElement(ScrollAreaPrimitive.Corner, null)
|
5204
5503
|
);
|
5205
5504
|
});
|
5206
5505
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
5207
|
-
var ScrollBar =
|
5506
|
+
var ScrollBar = React41.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React41.createElement(
|
5208
5507
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
5209
5508
|
{
|
5210
5509
|
ref,
|
@@ -5217,7 +5516,7 @@ var ScrollBar = React40.forwardRef(({ className, orientation = "vertical", ...pr
|
|
5217
5516
|
),
|
5218
5517
|
...props
|
5219
5518
|
},
|
5220
|
-
/* @__PURE__ */
|
5519
|
+
/* @__PURE__ */ React41.createElement(
|
5221
5520
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
5222
5521
|
{
|
5223
5522
|
className: cn(
|
@@ -5288,9 +5587,9 @@ var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
|
5288
5587
|
],
|
5289
5588
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
5290
5589
|
});
|
5291
|
-
var TabsContext =
|
5292
|
-
var Tabs =
|
5293
|
-
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */
|
5590
|
+
var TabsContext = React42.createContext({ orientation: "horizontal", variant: "default", scrollable: false });
|
5591
|
+
var Tabs = React42.forwardRef(
|
5592
|
+
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
5294
5593
|
TabsPrimitive.Root,
|
5295
5594
|
{
|
5296
5595
|
ref,
|
@@ -5301,14 +5600,14 @@ var Tabs = React41.forwardRef(
|
|
5301
5600
|
),
|
5302
5601
|
...props
|
5303
5602
|
},
|
5304
|
-
/* @__PURE__ */
|
5603
|
+
/* @__PURE__ */ React42.createElement(TabsContext.Provider, { value: { orientation, variant, scrollable } }, props.children)
|
5305
5604
|
)
|
5306
5605
|
);
|
5307
|
-
var TabsList =
|
5308
|
-
const { orientation, variant, scrollable } =
|
5606
|
+
var TabsList = React42.forwardRef(({ className, classNames, ...props }, ref) => {
|
5607
|
+
const { orientation, variant, scrollable } = React42.useContext(TabsContext);
|
5309
5608
|
const { width } = useViewportSize();
|
5310
5609
|
if (scrollable && width < 768 && orientation === "horizontal") {
|
5311
|
-
return /* @__PURE__ */
|
5610
|
+
return /* @__PURE__ */ React42.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React42.createElement(
|
5312
5611
|
TabsPrimitive.List,
|
5313
5612
|
{
|
5314
5613
|
ref,
|
@@ -5321,7 +5620,7 @@ var TabsList = React41.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
5321
5620
|
}
|
5322
5621
|
));
|
5323
5622
|
} else {
|
5324
|
-
return /* @__PURE__ */
|
5623
|
+
return /* @__PURE__ */ React42.createElement(
|
5325
5624
|
TabsPrimitive.List,
|
5326
5625
|
{
|
5327
5626
|
ref,
|
@@ -5336,11 +5635,11 @@ var TabsList = React41.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
5336
5635
|
);
|
5337
5636
|
}
|
5338
5637
|
});
|
5339
|
-
var TabsTrigger =
|
5638
|
+
var TabsTrigger = React42.forwardRef(
|
5340
5639
|
({ className, chipProps, withPopover = false, onPopoverClick, ...props }, ref) => {
|
5341
|
-
const { orientation, variant } =
|
5640
|
+
const { orientation, variant } = React42.useContext(TabsContext);
|
5342
5641
|
if (withPopover) {
|
5343
|
-
return /* @__PURE__ */
|
5642
|
+
return /* @__PURE__ */ React42.createElement(Popover2.Root, { open: props.showPopover }, /* @__PURE__ */ React42.createElement(Popover2.Anchor, { asChild: true }, /* @__PURE__ */ React42.createElement(
|
5344
5643
|
TabsPrimitive.Trigger,
|
5345
5644
|
{
|
5346
5645
|
className: cn(
|
@@ -5351,8 +5650,8 @@ var TabsTrigger = React41.forwardRef(
|
|
5351
5650
|
...props
|
5352
5651
|
},
|
5353
5652
|
props.children,
|
5354
|
-
chipProps && /* @__PURE__ */
|
5355
|
-
)), /* @__PURE__ */
|
5653
|
+
chipProps && /* @__PURE__ */ React42.createElement(Chip, { ...chipProps })
|
5654
|
+
)), /* @__PURE__ */ React42.createElement(
|
5356
5655
|
Popover2.Content,
|
5357
5656
|
{
|
5358
5657
|
onClick: onPopoverClick,
|
@@ -5362,10 +5661,10 @@ var TabsTrigger = React41.forwardRef(
|
|
5362
5661
|
"hawa-arrow-default-top hawa-mt-2"
|
5363
5662
|
)
|
5364
5663
|
},
|
5365
|
-
/* @__PURE__ */
|
5664
|
+
/* @__PURE__ */ React42.createElement("div", { className: "hawa-p-2" }, " ", props.popoverContent)
|
5366
5665
|
));
|
5367
5666
|
} else {
|
5368
|
-
return /* @__PURE__ */
|
5667
|
+
return /* @__PURE__ */ React42.createElement(
|
5369
5668
|
TabsPrimitive.Trigger,
|
5370
5669
|
{
|
5371
5670
|
className: cn(
|
@@ -5376,12 +5675,12 @@ var TabsTrigger = React41.forwardRef(
|
|
5376
5675
|
...props
|
5377
5676
|
},
|
5378
5677
|
props.children,
|
5379
|
-
chipProps && /* @__PURE__ */
|
5678
|
+
chipProps && /* @__PURE__ */ React42.createElement(Chip, { ...chipProps })
|
5380
5679
|
);
|
5381
5680
|
}
|
5382
5681
|
}
|
5383
5682
|
);
|
5384
|
-
var TabsContent =
|
5683
|
+
var TabsContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
5385
5684
|
TabsPrimitive.Content,
|
5386
5685
|
{
|
5387
5686
|
ref,
|
@@ -5573,15 +5872,15 @@ var Select = ({
|
|
5573
5872
|
};
|
5574
5873
|
|
5575
5874
|
// elements/switch/Switch.tsx
|
5576
|
-
var
|
5875
|
+
var React44 = __toESM(require("react"));
|
5577
5876
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
|
5578
|
-
var Switch =
|
5877
|
+
var Switch = React44.forwardRef(
|
5579
5878
|
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
5580
|
-
const [parentDirection, setParentDirection] =
|
5879
|
+
const [parentDirection, setParentDirection] = React44.useState(
|
5581
5880
|
null
|
5582
5881
|
);
|
5583
|
-
const parentRef =
|
5584
|
-
|
5882
|
+
const parentRef = React44.useRef(null);
|
5883
|
+
React44.useEffect(() => {
|
5585
5884
|
var _a;
|
5586
5885
|
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
5587
5886
|
if (parentNode) {
|
@@ -5609,13 +5908,13 @@ var Switch = React43.forwardRef(
|
|
5609
5908
|
full: "hawa-rounded-full",
|
5610
5909
|
inherit: "hawa-rounded-inner"
|
5611
5910
|
};
|
5612
|
-
return /* @__PURE__ */
|
5911
|
+
return /* @__PURE__ */ React44.createElement(
|
5613
5912
|
"div",
|
5614
5913
|
{
|
5615
5914
|
className: "hawa-flex hawa-flex-row hawa-items-center",
|
5616
5915
|
ref: parentRef
|
5617
5916
|
},
|
5618
|
-
/* @__PURE__ */
|
5917
|
+
/* @__PURE__ */ React44.createElement(
|
5619
5918
|
SwitchPrimitives.Root,
|
5620
5919
|
{
|
5621
5920
|
className: cn(
|
@@ -5629,7 +5928,7 @@ var Switch = React43.forwardRef(
|
|
5629
5928
|
...props,
|
5630
5929
|
ref
|
5631
5930
|
},
|
5632
|
-
/* @__PURE__ */
|
5931
|
+
/* @__PURE__ */ React44.createElement(
|
5633
5932
|
SwitchPrimitives.Thumb,
|
5634
5933
|
{
|
5635
5934
|
className: cn(
|
@@ -5643,148 +5942,12 @@ var Switch = React43.forwardRef(
|
|
5643
5942
|
}
|
5644
5943
|
)
|
5645
5944
|
),
|
5646
|
-
label && /* @__PURE__ */
|
5945
|
+
label && /* @__PURE__ */ React44.createElement("span", { className: "hawa-mx-2 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label)
|
5647
5946
|
);
|
5648
5947
|
}
|
5649
5948
|
);
|
5650
5949
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
5651
5950
|
|
5652
|
-
// elements/checkbox/Checkbox.tsx
|
5653
|
-
var React44 = __toESM(require("react"));
|
5654
|
-
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
5655
|
-
var Checkbox = ({
|
5656
|
-
id,
|
5657
|
-
label,
|
5658
|
-
sublabel,
|
5659
|
-
helperText,
|
5660
|
-
disabled,
|
5661
|
-
size = "default",
|
5662
|
-
radius = "inherit",
|
5663
|
-
...props
|
5664
|
-
}) => {
|
5665
|
-
let labelLineHeightStyles = {
|
5666
|
-
xs: sublabel || helperText ? 0.5 : 0.1,
|
5667
|
-
sm: 0.6,
|
5668
|
-
default: 1,
|
5669
|
-
md: 0.8,
|
5670
|
-
lg: 0.9,
|
5671
|
-
xl: 1
|
5672
|
-
};
|
5673
|
-
return /* @__PURE__ */ React44.createElement(
|
5674
|
-
"div",
|
5675
|
-
{
|
5676
|
-
className: cn(
|
5677
|
-
"hawa-flex hawa-gap-2",
|
5678
|
-
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
5679
|
-
)
|
5680
|
-
},
|
5681
|
-
/* @__PURE__ */ React44.createElement(
|
5682
|
-
CheckboxElement,
|
5683
|
-
{
|
5684
|
-
...props,
|
5685
|
-
size,
|
5686
|
-
radius,
|
5687
|
-
disabled,
|
5688
|
-
id
|
5689
|
-
}
|
5690
|
-
),
|
5691
|
-
(label || helperText) && /* @__PURE__ */ React44.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React44.createElement(
|
5692
|
-
"label",
|
5693
|
-
{
|
5694
|
-
htmlFor: id,
|
5695
|
-
className: cn(
|
5696
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
5697
|
-
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
5698
|
-
),
|
5699
|
-
style: {
|
5700
|
-
// lineHeight: labelLineHeightStyles[size]
|
5701
|
-
lineHeight: 1
|
5702
|
-
}
|
5703
|
-
},
|
5704
|
-
label
|
5705
|
-
), sublabel && /* @__PURE__ */ React44.createElement(
|
5706
|
-
"label",
|
5707
|
-
{
|
5708
|
-
htmlFor: id,
|
5709
|
-
className: cn(
|
5710
|
-
"hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
|
5711
|
-
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
|
5712
|
-
)
|
5713
|
-
},
|
5714
|
-
sublabel
|
5715
|
-
), helperText && !disabled && /* @__PURE__ */ React44.createElement(
|
5716
|
-
"label",
|
5717
|
-
{
|
5718
|
-
htmlFor: id,
|
5719
|
-
className: cn(
|
5720
|
-
"hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
|
5721
|
-
disabled && "hawa-cursor-not-allowed hawa-opacity-70"
|
5722
|
-
)
|
5723
|
-
},
|
5724
|
-
helperText
|
5725
|
-
))
|
5726
|
-
);
|
5727
|
-
};
|
5728
|
-
var CheckboxElement = React44.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
5729
|
-
let checkboxRadius = {
|
5730
|
-
none: "hawa-rounded-none",
|
5731
|
-
inherit: "hawa-rounded-sm",
|
5732
|
-
full: "hawa-rounded-full"
|
5733
|
-
};
|
5734
|
-
let checkboxSizes = {
|
5735
|
-
xs: "hawa-w-3 hawa-h-3",
|
5736
|
-
sm: "hawa-w-6 hawa-h-6",
|
5737
|
-
default: "hawa-icon",
|
5738
|
-
md: "hawa-w-8 hawa-h-8",
|
5739
|
-
lg: "hawa-w-10 hawa-h-10",
|
5740
|
-
xl: "hawa-w-12 hawa-h-12"
|
5741
|
-
};
|
5742
|
-
let checkboxIndicatorSizes = {
|
5743
|
-
xs: "0.5em",
|
5744
|
-
default: "0.60em",
|
5745
|
-
sm: "0.75em",
|
5746
|
-
md: "0.875em",
|
5747
|
-
lg: "1em",
|
5748
|
-
xl: "1.25em"
|
5749
|
-
};
|
5750
|
-
return /* @__PURE__ */ React44.createElement(
|
5751
|
-
CheckboxPrimitive.Root,
|
5752
|
-
{
|
5753
|
-
ref,
|
5754
|
-
className: cn(
|
5755
|
-
"hawa-peer hawa-shrink-0 hawa-border hawa-border-primary hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50 data-[state=checked]:hawa-bg-primary data-[state=checked]:hawa-text-primary-foreground",
|
5756
|
-
checkboxSizes[size],
|
5757
|
-
checkboxRadius[radius],
|
5758
|
-
className
|
5759
|
-
),
|
5760
|
-
...props
|
5761
|
-
},
|
5762
|
-
/* @__PURE__ */ React44.createElement(
|
5763
|
-
CheckboxPrimitive.Indicator,
|
5764
|
-
{
|
5765
|
-
className: cn(
|
5766
|
-
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
5767
|
-
)
|
5768
|
-
},
|
5769
|
-
/* @__PURE__ */ React44.createElement(
|
5770
|
-
"svg",
|
5771
|
-
{
|
5772
|
-
"aria-label": "Check Mark",
|
5773
|
-
stroke: "currentColor",
|
5774
|
-
fill: "currentColor",
|
5775
|
-
strokeWidth: "0",
|
5776
|
-
viewBox: "0 0 512 512",
|
5777
|
-
height: checkboxIndicatorSizes[size],
|
5778
|
-
width: checkboxIndicatorSizes[size]
|
5779
|
-
},
|
5780
|
-
/* @__PURE__ */ React44.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
5781
|
-
),
|
5782
|
-
" "
|
5783
|
-
)
|
5784
|
-
);
|
5785
|
-
});
|
5786
|
-
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
5787
|
-
|
5788
5951
|
// elements/progress/Progress.tsx
|
5789
5952
|
var React45 = __toESM(require("react"));
|
5790
5953
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
@@ -7716,19 +7879,19 @@ var PhoneInput = ({
|
|
7716
7879
|
var React50 = __toESM(require("react"));
|
7717
7880
|
var import_input_otp = require("input-otp");
|
7718
7881
|
|
7719
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7882
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7720
7883
|
var import_react41 = require("react");
|
7721
7884
|
|
7722
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7885
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7723
7886
|
var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7724
7887
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7725
7888
|
return Boolean(className) && array.indexOf(className) === index;
|
7726
7889
|
}).join(" ");
|
7727
7890
|
|
7728
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7891
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7729
7892
|
var import_react40 = require("react");
|
7730
7893
|
|
7731
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7894
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7732
7895
|
var defaultAttributes = {
|
7733
7896
|
xmlns: "http://www.w3.org/2000/svg",
|
7734
7897
|
width: 24,
|
@@ -7741,7 +7904,7 @@ var defaultAttributes = {
|
|
7741
7904
|
strokeLinejoin: "round"
|
7742
7905
|
};
|
7743
7906
|
|
7744
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7907
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7745
7908
|
var Icon = (0, import_react40.forwardRef)(
|
7746
7909
|
({
|
7747
7910
|
color = "currentColor",
|
@@ -7773,7 +7936,7 @@ var Icon = (0, import_react40.forwardRef)(
|
|
7773
7936
|
}
|
7774
7937
|
);
|
7775
7938
|
|
7776
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7939
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7777
7940
|
var createLucideIcon = (iconName, iconNode) => {
|
7778
7941
|
const Component = (0, import_react41.forwardRef)(
|
7779
7942
|
({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
|
@@ -7787,7 +7950,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
7787
7950
|
return Component;
|
7788
7951
|
};
|
7789
7952
|
|
7790
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7953
|
+
// ../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
7791
7954
|
var Dot = createLucideIcon("Dot", [
|
7792
7955
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
7793
7956
|
]);
|
@@ -12226,9 +12389,8 @@ var FeedbackForm = (props) => {
|
|
12226
12389
|
console.log("Form is submitted but onSubmit prop is missing");
|
12227
12390
|
}
|
12228
12391
|
}),
|
12229
|
-
className: "hawa-flex hawa-flex-col hawa-gap-
|
12392
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
12230
12393
|
},
|
12231
|
-
/* @__PURE__ */ import_react78.default.createElement(Label2, null),
|
12232
12394
|
/* @__PURE__ */ import_react78.default.createElement(
|
12233
12395
|
import_react_hook_form7.Controller,
|
12234
12396
|
{
|
@@ -13596,7 +13758,7 @@ var Usage = (props) => {
|
|
13596
13758
|
|
13597
13759
|
lucide-react/dist/esm/shared/src/utils.js:
|
13598
13760
|
(**
|
13599
|
-
* @license lucide-react v0.
|
13761
|
+
* @license lucide-react v0.381.0 - ISC
|
13600
13762
|
*
|
13601
13763
|
* This source code is licensed under the ISC license.
|
13602
13764
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13604,7 +13766,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
13604
13766
|
|
13605
13767
|
lucide-react/dist/esm/defaultAttributes.js:
|
13606
13768
|
(**
|
13607
|
-
* @license lucide-react v0.
|
13769
|
+
* @license lucide-react v0.381.0 - ISC
|
13608
13770
|
*
|
13609
13771
|
* This source code is licensed under the ISC license.
|
13610
13772
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13612,7 +13774,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
13612
13774
|
|
13613
13775
|
lucide-react/dist/esm/Icon.js:
|
13614
13776
|
(**
|
13615
|
-
* @license lucide-react v0.
|
13777
|
+
* @license lucide-react v0.381.0 - ISC
|
13616
13778
|
*
|
13617
13779
|
* This source code is licensed under the ISC license.
|
13618
13780
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13620,7 +13782,7 @@ lucide-react/dist/esm/Icon.js:
|
|
13620
13782
|
|
13621
13783
|
lucide-react/dist/esm/createLucideIcon.js:
|
13622
13784
|
(**
|
13623
|
-
* @license lucide-react v0.
|
13785
|
+
* @license lucide-react v0.381.0 - ISC
|
13624
13786
|
*
|
13625
13787
|
* This source code is licensed under the ISC license.
|
13626
13788
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13628,7 +13790,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
13628
13790
|
|
13629
13791
|
lucide-react/dist/esm/icons/dot.js:
|
13630
13792
|
(**
|
13631
|
-
* @license lucide-react v0.
|
13793
|
+
* @license lucide-react v0.381.0 - ISC
|
13632
13794
|
*
|
13633
13795
|
* This source code is licensed under the ISC license.
|
13634
13796
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13636,7 +13798,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
13636
13798
|
|
13637
13799
|
lucide-react/dist/esm/lucide-react.js:
|
13638
13800
|
(**
|
13639
|
-
* @license lucide-react v0.
|
13801
|
+
* @license lucide-react v0.381.0 - ISC
|
13640
13802
|
*
|
13641
13803
|
* This source code is licensed under the ISC license.
|
13642
13804
|
* See the LICENSE file in the root directory of this source tree.
|