@sikka/hawa 0.40.1-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 +87 -2
- package/dist/blocks/auth/index.mjs +91 -6
- package/dist/blocks/feedback/index.js +1 -2
- package/dist/blocks/feedback/index.mjs +6 -8
- package/dist/blocks/index.js +88 -4
- 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-QSEQS7DS.mjs → chunk-FJXDCBMQ.mjs} +3 -3
- 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 +603 -440
- 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 +606 -444
- package/dist/index.mjs +700 -538
- 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/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 +1 -1
package/dist/index.mjs
CHANGED
@@ -1332,6 +1332,91 @@ var Logos = {
|
|
1332
1332
|
},
|
1333
1333
|
/* @__PURE__ */ React11.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" })
|
1334
1334
|
),
|
1335
|
+
telegram: (props) => /* @__PURE__ */ React11.createElement(
|
1336
|
+
"svg",
|
1337
|
+
{
|
1338
|
+
role: "img",
|
1339
|
+
viewBox: "0 0 24 24",
|
1340
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1341
|
+
...props
|
1342
|
+
},
|
1343
|
+
/* @__PURE__ */ React11.createElement("title", null, "Telegram"),
|
1344
|
+
/* @__PURE__ */ React11.createElement(
|
1345
|
+
"path",
|
1346
|
+
{
|
1347
|
+
fill: "currentColor",
|
1348
|
+
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"
|
1349
|
+
}
|
1350
|
+
)
|
1351
|
+
),
|
1352
|
+
youtube: (props) => /* @__PURE__ */ React11.createElement(
|
1353
|
+
"svg",
|
1354
|
+
{
|
1355
|
+
role: "img",
|
1356
|
+
viewBox: "0 0 24 24",
|
1357
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1358
|
+
...props
|
1359
|
+
},
|
1360
|
+
/* @__PURE__ */ React11.createElement("title", null, "YouTube"),
|
1361
|
+
/* @__PURE__ */ React11.createElement(
|
1362
|
+
"path",
|
1363
|
+
{
|
1364
|
+
fill: "currentColor",
|
1365
|
+
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"
|
1366
|
+
}
|
1367
|
+
)
|
1368
|
+
),
|
1369
|
+
tiktok: (props) => /* @__PURE__ */ React11.createElement(
|
1370
|
+
"svg",
|
1371
|
+
{
|
1372
|
+
role: "img",
|
1373
|
+
viewBox: "0 0 24 24",
|
1374
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1375
|
+
...props
|
1376
|
+
},
|
1377
|
+
/* @__PURE__ */ React11.createElement("title", null, "TikTok"),
|
1378
|
+
/* @__PURE__ */ React11.createElement(
|
1379
|
+
"path",
|
1380
|
+
{
|
1381
|
+
fill: "currentColor",
|
1382
|
+
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"
|
1383
|
+
}
|
1384
|
+
)
|
1385
|
+
),
|
1386
|
+
linkedin: (props) => /* @__PURE__ */ React11.createElement(
|
1387
|
+
"svg",
|
1388
|
+
{
|
1389
|
+
role: "img",
|
1390
|
+
viewBox: "0 0 24 24",
|
1391
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1392
|
+
...props
|
1393
|
+
},
|
1394
|
+
/* @__PURE__ */ React11.createElement("title", null, "LinkedIn"),
|
1395
|
+
/* @__PURE__ */ React11.createElement(
|
1396
|
+
"path",
|
1397
|
+
{
|
1398
|
+
fill: "currentColor",
|
1399
|
+
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"
|
1400
|
+
}
|
1401
|
+
)
|
1402
|
+
),
|
1403
|
+
behance: (props) => /* @__PURE__ */ React11.createElement(
|
1404
|
+
"svg",
|
1405
|
+
{
|
1406
|
+
role: "img",
|
1407
|
+
viewBox: "0 0 24 24",
|
1408
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1409
|
+
...props
|
1410
|
+
},
|
1411
|
+
/* @__PURE__ */ React11.createElement("title", null, "Behance"),
|
1412
|
+
/* @__PURE__ */ React11.createElement(
|
1413
|
+
"path",
|
1414
|
+
{
|
1415
|
+
fill: "currentColor",
|
1416
|
+
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"
|
1417
|
+
}
|
1418
|
+
)
|
1419
|
+
),
|
1335
1420
|
microsoft: (props) => /* @__PURE__ */ React11.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", ...props }, /* @__PURE__ */ React11.createElement(
|
1336
1421
|
"path",
|
1337
1422
|
{
|
@@ -2544,7 +2629,7 @@ var Avatar = ({
|
|
2544
2629
|
};
|
2545
2630
|
|
2546
2631
|
// elements/dataTable/DataTable.tsx
|
2547
|
-
import * as
|
2632
|
+
import * as React24 from "react";
|
2548
2633
|
import {
|
2549
2634
|
flexRender,
|
2550
2635
|
getCoreRowModel,
|
@@ -2555,9 +2640,145 @@ import {
|
|
2555
2640
|
useReactTable
|
2556
2641
|
} from "@tanstack/react-table";
|
2557
2642
|
|
2643
|
+
// elements/checkbox/Checkbox.tsx
|
2644
|
+
import * as React21 from "react";
|
2645
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
2646
|
+
var Checkbox = ({
|
2647
|
+
id,
|
2648
|
+
label,
|
2649
|
+
sublabel,
|
2650
|
+
helperText,
|
2651
|
+
disabled,
|
2652
|
+
size = "default",
|
2653
|
+
radius = "inherit",
|
2654
|
+
...props
|
2655
|
+
}) => {
|
2656
|
+
let labelLineHeightStyles = {
|
2657
|
+
xs: sublabel || helperText ? 0.5 : 0.1,
|
2658
|
+
sm: 0.6,
|
2659
|
+
default: 1,
|
2660
|
+
md: 0.8,
|
2661
|
+
lg: 0.9,
|
2662
|
+
xl: 1
|
2663
|
+
};
|
2664
|
+
return /* @__PURE__ */ React21.createElement(
|
2665
|
+
"div",
|
2666
|
+
{
|
2667
|
+
className: cn(
|
2668
|
+
"hawa-flex hawa-gap-2",
|
2669
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
2670
|
+
)
|
2671
|
+
},
|
2672
|
+
/* @__PURE__ */ React21.createElement(
|
2673
|
+
CheckboxElement,
|
2674
|
+
{
|
2675
|
+
...props,
|
2676
|
+
size,
|
2677
|
+
radius,
|
2678
|
+
disabled,
|
2679
|
+
id
|
2680
|
+
}
|
2681
|
+
),
|
2682
|
+
(label || helperText) && /* @__PURE__ */ React21.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React21.createElement(
|
2683
|
+
"label",
|
2684
|
+
{
|
2685
|
+
htmlFor: id,
|
2686
|
+
className: cn(
|
2687
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
2688
|
+
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
|
2689
|
+
),
|
2690
|
+
style: {
|
2691
|
+
// lineHeight: labelLineHeightStyles[size]
|
2692
|
+
lineHeight: 1
|
2693
|
+
}
|
2694
|
+
},
|
2695
|
+
label
|
2696
|
+
), sublabel && /* @__PURE__ */ React21.createElement(
|
2697
|
+
"label",
|
2698
|
+
{
|
2699
|
+
htmlFor: id,
|
2700
|
+
className: cn(
|
2701
|
+
"hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
|
2702
|
+
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
|
2703
|
+
)
|
2704
|
+
},
|
2705
|
+
sublabel
|
2706
|
+
), helperText && !disabled && /* @__PURE__ */ React21.createElement(
|
2707
|
+
"label",
|
2708
|
+
{
|
2709
|
+
htmlFor: id,
|
2710
|
+
className: cn(
|
2711
|
+
"hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
|
2712
|
+
disabled && "hawa-cursor-not-allowed hawa-opacity-70"
|
2713
|
+
)
|
2714
|
+
},
|
2715
|
+
helperText
|
2716
|
+
))
|
2717
|
+
);
|
2718
|
+
};
|
2719
|
+
var CheckboxElement = React21.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
2720
|
+
let checkboxRadius = {
|
2721
|
+
none: "hawa-rounded-none",
|
2722
|
+
inherit: "hawa-rounded-sm",
|
2723
|
+
full: "hawa-rounded-full"
|
2724
|
+
};
|
2725
|
+
let checkboxSizes = {
|
2726
|
+
xs: "hawa-w-3 hawa-h-3",
|
2727
|
+
sm: "hawa-w-6 hawa-h-6",
|
2728
|
+
default: "hawa-icon",
|
2729
|
+
md: "hawa-w-8 hawa-h-8",
|
2730
|
+
lg: "hawa-w-10 hawa-h-10",
|
2731
|
+
xl: "hawa-w-12 hawa-h-12"
|
2732
|
+
};
|
2733
|
+
let checkboxIndicatorSizes = {
|
2734
|
+
xs: "0.5em",
|
2735
|
+
default: "0.60em",
|
2736
|
+
sm: "0.75em",
|
2737
|
+
md: "0.875em",
|
2738
|
+
lg: "1em",
|
2739
|
+
xl: "1.25em"
|
2740
|
+
};
|
2741
|
+
return /* @__PURE__ */ React21.createElement(
|
2742
|
+
CheckboxPrimitive.Root,
|
2743
|
+
{
|
2744
|
+
ref,
|
2745
|
+
className: cn(
|
2746
|
+
"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",
|
2747
|
+
checkboxSizes[size],
|
2748
|
+
checkboxRadius[radius],
|
2749
|
+
className
|
2750
|
+
),
|
2751
|
+
...props
|
2752
|
+
},
|
2753
|
+
/* @__PURE__ */ React21.createElement(
|
2754
|
+
CheckboxPrimitive.Indicator,
|
2755
|
+
{
|
2756
|
+
className: cn(
|
2757
|
+
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
2758
|
+
)
|
2759
|
+
},
|
2760
|
+
/* @__PURE__ */ React21.createElement(
|
2761
|
+
"svg",
|
2762
|
+
{
|
2763
|
+
"aria-label": "Check Mark",
|
2764
|
+
stroke: "currentColor",
|
2765
|
+
fill: "currentColor",
|
2766
|
+
strokeWidth: "0",
|
2767
|
+
viewBox: "0 0 512 512",
|
2768
|
+
height: checkboxIndicatorSizes[size],
|
2769
|
+
width: checkboxIndicatorSizes[size]
|
2770
|
+
},
|
2771
|
+
/* @__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" })
|
2772
|
+
),
|
2773
|
+
" "
|
2774
|
+
)
|
2775
|
+
);
|
2776
|
+
});
|
2777
|
+
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
2778
|
+
|
2558
2779
|
// elements/input/Input.tsx
|
2559
|
-
import
|
2560
|
-
var Input =
|
2780
|
+
import React22, { forwardRef as forwardRef13 } from "react";
|
2781
|
+
var Input = forwardRef13(
|
2561
2782
|
({
|
2562
2783
|
margin = "none",
|
2563
2784
|
width = "full",
|
@@ -2601,7 +2822,7 @@ var Input = forwardRef12(
|
|
2601
2822
|
props.onChange(newEvent);
|
2602
2823
|
}
|
2603
2824
|
};
|
2604
|
-
return /* @__PURE__ */
|
2825
|
+
return /* @__PURE__ */ React22.createElement(
|
2605
2826
|
"div",
|
2606
2827
|
{
|
2607
2828
|
className: cn(
|
@@ -2612,8 +2833,8 @@ var Input = forwardRef12(
|
|
2612
2833
|
"hawa-w-full hawa-gap-2"
|
2613
2834
|
)
|
2614
2835
|
},
|
2615
|
-
props.label && /* @__PURE__ */
|
2616
|
-
/* @__PURE__ */
|
2836
|
+
props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label),
|
2837
|
+
/* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ React22.createElement(
|
2617
2838
|
"span",
|
2618
2839
|
{
|
2619
2840
|
className: cn(
|
@@ -2622,12 +2843,12 @@ var Input = forwardRef12(
|
|
2622
2843
|
)
|
2623
2844
|
},
|
2624
2845
|
props.outsidePrefix
|
2625
|
-
), props.isLoading ? /* @__PURE__ */
|
2846
|
+
), props.isLoading ? /* @__PURE__ */ React22.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React22.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ React22.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React22.createElement(
|
2626
2847
|
Skeleton,
|
2627
2848
|
{
|
2628
2849
|
animation: "none",
|
2629
2850
|
className: "hawa-h-[40px] hawa-w-full !hawa-bg-destructive/[0.3]",
|
2630
|
-
content: /* @__PURE__ */
|
2851
|
+
content: /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React22.createElement(
|
2631
2852
|
"svg",
|
2632
2853
|
{
|
2633
2854
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -2641,12 +2862,12 @@ var Input = forwardRef12(
|
|
2641
2862
|
strokeLinejoin: "round",
|
2642
2863
|
className: "hawa-text-destructive"
|
2643
2864
|
},
|
2644
|
-
/* @__PURE__ */
|
2645
|
-
/* @__PURE__ */
|
2646
|
-
/* @__PURE__ */
|
2647
|
-
), /* @__PURE__ */
|
2865
|
+
/* @__PURE__ */ React22.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
2866
|
+
/* @__PURE__ */ React22.createElement("path", { d: "M12 9v4" }),
|
2867
|
+
/* @__PURE__ */ React22.createElement("path", { d: "M12 17h.01" })
|
2868
|
+
), /* @__PURE__ */ React22.createElement("span", null, /* @__PURE__ */ React22.createElement("span", { className: "hawa-text-destructive" }, props.loadingErrorMesssage || "Error loading data")))
|
2648
2869
|
}
|
2649
|
-
)) : /* @__PURE__ */
|
2870
|
+
)) : /* @__PURE__ */ React22.createElement(React22.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React22.createElement(
|
2650
2871
|
"div",
|
2651
2872
|
{
|
2652
2873
|
className: cn(
|
@@ -2654,7 +2875,7 @@ var Input = forwardRef12(
|
|
2654
2875
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
2655
2876
|
)
|
2656
2877
|
}
|
2657
|
-
), /* @__PURE__ */
|
2878
|
+
), /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2" }, /* @__PURE__ */ React22.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React22.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React22.createElement(
|
2658
2879
|
"div",
|
2659
2880
|
{
|
2660
2881
|
className: cn(
|
@@ -2663,7 +2884,7 @@ var Input = forwardRef12(
|
|
2663
2884
|
)
|
2664
2885
|
},
|
2665
2886
|
props.endIcon
|
2666
|
-
), /* @__PURE__ */
|
2887
|
+
), /* @__PURE__ */ React22.createElement(
|
2667
2888
|
"input",
|
2668
2889
|
{
|
2669
2890
|
required: true,
|
@@ -2689,7 +2910,7 @@ var Input = forwardRef12(
|
|
2689
2910
|
inputProps == null ? void 0 : inputProps.className
|
2690
2911
|
)
|
2691
2912
|
}
|
2692
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
2913
|
+
)), !forceHideHelperText && /* @__PURE__ */ React22.createElement(HelperText, { helperText: props.helperText }), !props.disabled && forceHideHelperText && /* @__PURE__ */ React22.createElement(
|
2693
2914
|
"div",
|
2694
2915
|
{
|
2695
2916
|
className: cn(
|
@@ -2698,7 +2919,7 @@ var Input = forwardRef12(
|
|
2698
2919
|
)
|
2699
2920
|
},
|
2700
2921
|
props.helperText
|
2701
|
-
), showCount && /* @__PURE__ */
|
2922
|
+
), showCount && /* @__PURE__ */ React22.createElement(
|
2702
2923
|
"div",
|
2703
2924
|
{
|
2704
2925
|
className: cn(
|
@@ -2719,8 +2940,8 @@ var Input = forwardRef12(
|
|
2719
2940
|
);
|
2720
2941
|
|
2721
2942
|
// elements/table/Table.tsx
|
2722
|
-
import * as
|
2723
|
-
var Table =
|
2943
|
+
import * as React23 from "react";
|
2944
|
+
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(
|
2724
2945
|
"table",
|
2725
2946
|
{
|
2726
2947
|
ref,
|
@@ -2728,7 +2949,7 @@ var Table = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
2728
2949
|
...props
|
2729
2950
|
}
|
2730
2951
|
)));
|
2731
|
-
var TableHeader =
|
2952
|
+
var TableHeader = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2732
2953
|
"thead",
|
2733
2954
|
{
|
2734
2955
|
ref,
|
@@ -2736,18 +2957,18 @@ var TableHeader = React22.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
2736
2957
|
...props
|
2737
2958
|
}
|
2738
2959
|
));
|
2739
|
-
var TableHead =
|
2740
|
-
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */
|
2960
|
+
var TableHead = React23.forwardRef(
|
2961
|
+
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2741
2962
|
"th",
|
2742
2963
|
{
|
2743
2964
|
ref,
|
2744
2965
|
className: cn(
|
2745
|
-
"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",
|
2966
|
+
"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",
|
2746
2967
|
dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
2747
2968
|
condensed ? "hawa-h-8" : "hawa-h-12",
|
2748
2969
|
clickable ? "hawa-px-1" : "hawa-px-4",
|
2749
2970
|
//First and last columns
|
2750
|
-
clickable ? "
|
2971
|
+
clickable ? "[&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4",
|
2751
2972
|
//Columns in between
|
2752
2973
|
className
|
2753
2974
|
),
|
@@ -2755,8 +2976,8 @@ var TableHead = React22.forwardRef(
|
|
2755
2976
|
}
|
2756
2977
|
)
|
2757
2978
|
);
|
2758
|
-
var TableBody =
|
2759
|
-
var TableFooter =
|
2979
|
+
var TableBody = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
|
2980
|
+
var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2760
2981
|
"tfoot",
|
2761
2982
|
{
|
2762
2983
|
ref,
|
@@ -2767,7 +2988,7 @@ var TableFooter = React22.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
2767
2988
|
...props
|
2768
2989
|
}
|
2769
2990
|
));
|
2770
|
-
var TableRow =
|
2991
|
+
var TableRow = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2771
2992
|
"tr",
|
2772
2993
|
{
|
2773
2994
|
ref,
|
@@ -2780,14 +3001,14 @@ var TableRow = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
2780
3001
|
...props
|
2781
3002
|
}
|
2782
3003
|
));
|
2783
|
-
var TableCell =
|
3004
|
+
var TableCell = React23.forwardRef(
|
2784
3005
|
({ className, enablePadding = true, padding = "default", ...props }, ref) => {
|
2785
3006
|
let paddingStyles = {
|
2786
3007
|
condensed: "hawa-p-0 hawa-px-4",
|
2787
3008
|
default: "hawa-p-4",
|
2788
3009
|
noPadding: "hawa-p-0"
|
2789
3010
|
};
|
2790
|
-
return /* @__PURE__ */
|
3011
|
+
return /* @__PURE__ */ React23.createElement(
|
2791
3012
|
"td",
|
2792
3013
|
{
|
2793
3014
|
ref,
|
@@ -2797,7 +3018,7 @@ var TableCell = React22.forwardRef(
|
|
2797
3018
|
// enablePadding ? "hawa-p-4" : "hawa-p-0",
|
2798
3019
|
// props.disablePadding ? "hawa-p-0" : "hawa-p-4",
|
2799
3020
|
// props.condensed ? "hawa-p-0 hawa-px-4" : "hawa-p-4",
|
2800
|
-
"hawa-align-middle [&:has([role=checkbox])]:hawa-pr-0
|
3021
|
+
"hawa-align-middle [&:has([role=checkbox])]:hawa-pr-0",
|
2801
3022
|
"[&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
2802
3023
|
// "[&:not(:last-child)]:hawa-border-r",
|
2803
3024
|
props.dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
@@ -2808,7 +3029,7 @@ var TableCell = React22.forwardRef(
|
|
2808
3029
|
);
|
2809
3030
|
}
|
2810
3031
|
);
|
2811
|
-
var TableCaption =
|
3032
|
+
var TableCaption = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
2812
3033
|
"caption",
|
2813
3034
|
{
|
2814
3035
|
ref,
|
@@ -2836,27 +3057,61 @@ var DataTable = ({
|
|
2836
3057
|
paginationPosition = "bottom",
|
2837
3058
|
translateFn,
|
2838
3059
|
enableHideColumns,
|
3060
|
+
enableSelection,
|
2839
3061
|
enableSearch,
|
2840
3062
|
enableGoTo,
|
2841
3063
|
...props
|
2842
3064
|
}) => {
|
2843
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
2844
|
-
const [sorting, setSorting] =
|
3065
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
3066
|
+
const [sorting, setSorting] = React24.useState(
|
2845
3067
|
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
2846
3068
|
);
|
2847
|
-
const [columnFilters, setColumnFilters] =
|
3069
|
+
const [columnFilters, setColumnFilters] = React24.useState(
|
2848
3070
|
[]
|
2849
3071
|
);
|
2850
|
-
const [globalFilter, setGlobalFilter] =
|
2851
|
-
const [expanded, setExpanded] =
|
2852
|
-
const [columnVisibility, setColumnVisibility] =
|
3072
|
+
const [globalFilter, setGlobalFilter] = React24.useState("");
|
3073
|
+
const [expanded, setExpanded] = React24.useState({});
|
3074
|
+
const [columnVisibility, setColumnVisibility] = React24.useState(() => {
|
2853
3075
|
const savedVisibility = localStorage.getItem(LOCAL_STORAGE_KEY);
|
2854
3076
|
return savedVisibility ? JSON.parse(savedVisibility) : {};
|
2855
3077
|
});
|
2856
|
-
const [rowSelection, setRowSelection] =
|
3078
|
+
const [rowSelection, setRowSelection] = React24.useState({});
|
3079
|
+
let mainColumns = enableSelection ? [
|
3080
|
+
{
|
3081
|
+
id: "select",
|
3082
|
+
maxSize: 16,
|
3083
|
+
minSize: 16,
|
3084
|
+
size: 16,
|
3085
|
+
header: ({ table: table2 }) => /* @__PURE__ */ React24.createElement(
|
3086
|
+
Checkbox,
|
3087
|
+
{
|
3088
|
+
dir: props.direction,
|
3089
|
+
id: "select_all",
|
3090
|
+
"aria-label": "Select all",
|
3091
|
+
className: props.direction === "rtl" ? "hawa-ms-4" : "hawa-me-0",
|
3092
|
+
checked: table2.getIsAllPageRowsSelected() || table2.getIsSomePageRowsSelected() && "indeterminate",
|
3093
|
+
onCheckedChange: (value) => table2.toggleAllPageRowsSelected(!!value)
|
3094
|
+
}
|
3095
|
+
),
|
3096
|
+
cell: ({ row }) => /* @__PURE__ */ React24.createElement(
|
3097
|
+
Checkbox,
|
3098
|
+
{
|
3099
|
+
dir: props.direction,
|
3100
|
+
id: "select_row",
|
3101
|
+
className: props.direction === "rtl" ? "hawa-ms-4" : "hawa-me-4",
|
3102
|
+
checked: row.getIsSelected(),
|
3103
|
+
onCheckedChange: (value) => row.toggleSelected(!!value),
|
3104
|
+
"aria-label": "Select row"
|
3105
|
+
}
|
3106
|
+
),
|
3107
|
+
enableSorting: false,
|
3108
|
+
enableHiding: false
|
3109
|
+
},
|
3110
|
+
...columns
|
3111
|
+
] : columns;
|
2857
3112
|
const table = useReactTable({
|
2858
3113
|
data,
|
2859
|
-
columns,
|
3114
|
+
columns: mainColumns,
|
2860
3115
|
onExpandedChange: setExpanded,
|
2861
3116
|
getExpandedRowModel: getExpandedRowModel(),
|
2862
3117
|
onGlobalFilterChange: setGlobalFilter,
|
@@ -2882,10 +3137,10 @@ var DataTable = ({
|
|
2882
3137
|
label: `${item} / ${pageText}`,
|
2883
3138
|
value: item
|
2884
3139
|
}));
|
2885
|
-
|
3140
|
+
React24.useEffect(() => {
|
2886
3141
|
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(columnVisibility));
|
2887
3142
|
}, [columnVisibility]);
|
2888
|
-
|
3143
|
+
React24.useEffect(() => {
|
2889
3144
|
setColumnVisibility((prev) => {
|
2890
3145
|
let newColumnVisibility = {};
|
2891
3146
|
columns.forEach((column) => {
|
@@ -2900,7 +3155,7 @@ var DataTable = ({
|
|
2900
3155
|
return newColumnVisibility;
|
2901
3156
|
});
|
2902
3157
|
}, [columns]);
|
2903
|
-
return /* @__PURE__ */
|
3158
|
+
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(
|
2904
3159
|
Input,
|
2905
3160
|
{
|
2906
3161
|
inputProps: { title: "" },
|
@@ -2911,7 +3166,7 @@ var DataTable = ({
|
|
2911
3166
|
margin: "none",
|
2912
3167
|
className: "hawa-w-full md:hawa-max-w-sm",
|
2913
3168
|
endIconProps: { className: "!hawa-end-2" },
|
2914
|
-
endIcon: globalFilter ? /* @__PURE__ */
|
3169
|
+
endIcon: globalFilter ? /* @__PURE__ */ React24.createElement(
|
2915
3170
|
Button,
|
2916
3171
|
{
|
2917
3172
|
onClick: () => setGlobalFilter(""),
|
@@ -2919,7 +3174,7 @@ var DataTable = ({
|
|
2919
3174
|
size: "smallIcon",
|
2920
3175
|
"aria-label": "Clear Search"
|
2921
3176
|
},
|
2922
|
-
/* @__PURE__ */
|
3177
|
+
/* @__PURE__ */ React24.createElement(
|
2923
3178
|
"svg",
|
2924
3179
|
{
|
2925
3180
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -2933,43 +3188,45 @@ var DataTable = ({
|
|
2933
3188
|
strokeLinejoin: "round",
|
2934
3189
|
className: "hawa-icon hawa-text-muted-foreground"
|
2935
3190
|
},
|
2936
|
-
/* @__PURE__ */
|
2937
|
-
/* @__PURE__ */
|
3191
|
+
/* @__PURE__ */ React24.createElement("path", { d: "M18 6 6 18" }),
|
3192
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m6 6 12 12" })
|
2938
3193
|
)
|
2939
3194
|
) : null
|
2940
3195
|
}
|
2941
|
-
), enableHideColumns && /* @__PURE__ */
|
3196
|
+
), enableHideColumns && /* @__PURE__ */ React24.createElement(DropdownMenuRoot, null, /* @__PURE__ */ React24.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React24.createElement(
|
2942
3197
|
Button,
|
2943
3198
|
{
|
2944
3199
|
variant: "outline",
|
2945
3200
|
className: "hawa-flex hawa-flex-row hawa-gap-2"
|
2946
3201
|
},
|
2947
3202
|
((_d = props.texts) == null ? void 0 : _d.columns) || "Columns",
|
2948
|
-
/* @__PURE__ */
|
3203
|
+
/* @__PURE__ */ React24.createElement(
|
2949
3204
|
"svg",
|
2950
3205
|
{
|
2951
|
-
|
2952
|
-
|
2953
|
-
|
2954
|
-
height: "24",
|
2955
|
-
viewBox: "0 0 24 24",
|
3206
|
+
width: "15",
|
3207
|
+
height: "15",
|
3208
|
+
viewBox: "0 0 15 15",
|
2956
3209
|
fill: "none",
|
2957
|
-
|
2958
|
-
strokeWidth: "2",
|
2959
|
-
strokeLinecap: "round",
|
2960
|
-
strokeLinejoin: "round",
|
2961
|
-
className: "hawa-icon hawa-rotate-90"
|
3210
|
+
xmlns: "http://www.w3.org/2000/svg"
|
2962
3211
|
},
|
2963
|
-
/* @__PURE__ */
|
3212
|
+
/* @__PURE__ */ React24.createElement(
|
3213
|
+
"path",
|
3214
|
+
{
|
3215
|
+
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",
|
3216
|
+
fill: "currentColor",
|
3217
|
+
"fill-rule": "evenodd",
|
3218
|
+
"clip-rule": "evenodd"
|
3219
|
+
}
|
3220
|
+
)
|
2964
3221
|
)
|
2965
|
-
)), /* @__PURE__ */
|
3222
|
+
)), /* @__PURE__ */ React24.createElement(
|
2966
3223
|
DropdownMenuContent,
|
2967
3224
|
{
|
2968
3225
|
align: props.direction === "rtl" ? "start" : "end"
|
2969
3226
|
},
|
2970
3227
|
table.getAllColumns().filter((column) => column.getCanHide()).map((column) => {
|
2971
3228
|
var _a2, _b2;
|
2972
|
-
return /* @__PURE__ */
|
3229
|
+
return /* @__PURE__ */ React24.createElement(
|
2973
3230
|
DropdownMenuCheckboxItem,
|
2974
3231
|
{
|
2975
3232
|
key: column.id,
|
@@ -2981,26 +3238,28 @@ var DataTable = ({
|
|
2981
3238
|
) : column.id
|
2982
3239
|
);
|
2983
3240
|
})
|
2984
|
-
))), props.isLoading ? /* @__PURE__ */
|
3241
|
+
))), props.isLoading ? /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React24.createElement(
|
2985
3242
|
"div",
|
2986
3243
|
{
|
2987
3244
|
className: cn(
|
2988
|
-
"hawa-flex hawa-w-full
|
3245
|
+
"hawa-flex hawa-w-full hawa-gap-4",
|
2989
3246
|
paginationPosition === "top" ? "hawa-flex-col-reverse" : "hawa-flex-col"
|
2990
3247
|
)
|
2991
3248
|
},
|
2992
|
-
/* @__PURE__ */
|
3249
|
+
/* @__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) => {
|
2993
3250
|
var _a2;
|
2994
3251
|
let isSortable = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.sortable;
|
2995
|
-
return /* @__PURE__ */
|
3252
|
+
return /* @__PURE__ */ React24.createElement(
|
2996
3253
|
TableHead,
|
2997
3254
|
{
|
3255
|
+
key: header.id,
|
2998
3256
|
dir: props.direction,
|
2999
3257
|
condensed: props.condensed,
|
3000
3258
|
clickable: Boolean(isSortable),
|
3001
|
-
key: header.id,
|
3002
3259
|
style: {
|
3003
|
-
maxWidth: header.column.columnDef.maxSize
|
3260
|
+
maxWidth: `${header.column.columnDef.maxSize}px !important`,
|
3261
|
+
minWidth: `${header.column.columnDef.minSize}px !important`,
|
3262
|
+
width: `${header.column.columnDef.size}px !important`
|
3004
3263
|
}
|
3005
3264
|
},
|
3006
3265
|
header.isPlaceholder ? null : flexRender(
|
@@ -3008,7 +3267,7 @@ var DataTable = ({
|
|
3008
3267
|
header.getContext()
|
3009
3268
|
)
|
3010
3269
|
);
|
3011
|
-
})))), /* @__PURE__ */
|
3270
|
+
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_e = table.getRowModel().rows) == null ? void 0 : _e.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
|
3012
3271
|
TableRow,
|
3013
3272
|
{
|
3014
3273
|
key: row.id,
|
@@ -3016,15 +3275,17 @@ var DataTable = ({
|
|
3016
3275
|
},
|
3017
3276
|
row.getVisibleCells().map((cell) => {
|
3018
3277
|
var _a2;
|
3019
|
-
return /* @__PURE__ */
|
3278
|
+
return /* @__PURE__ */ React24.createElement(
|
3020
3279
|
TableCell,
|
3021
3280
|
{
|
3281
|
+
key: cell.id,
|
3282
|
+
dir: props.direction,
|
3022
3283
|
style: {
|
3023
|
-
maxWidth: cell.column.columnDef.maxSize
|
3284
|
+
maxWidth: `${cell.column.columnDef.maxSize}px !important`,
|
3285
|
+
minWidth: `${cell.column.columnDef.minSize}px !important`,
|
3286
|
+
width: `${cell.column.columnDef.size}px !important`
|
3024
3287
|
},
|
3025
|
-
|
3026
|
-
padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
|
3027
|
-
key: cell.id
|
3288
|
+
padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding
|
3028
3289
|
},
|
3029
3290
|
flexRender(
|
3030
3291
|
cell.column.columnDef.cell,
|
@@ -3032,7 +3293,7 @@ var DataTable = ({
|
|
3032
3293
|
)
|
3033
3294
|
);
|
3034
3295
|
})
|
3035
|
-
)) : /* @__PURE__ */
|
3296
|
+
)) : /* @__PURE__ */ React24.createElement(TableRow, null, /* @__PURE__ */ React24.createElement(
|
3036
3297
|
TableCell,
|
3037
3298
|
{
|
3038
3299
|
colSpan: columns.length,
|
@@ -3040,174 +3301,212 @@ var DataTable = ({
|
|
3040
3301
|
},
|
3041
3302
|
(_f = props.texts) == null ? void 0 : _f.noData
|
3042
3303
|
))))),
|
3043
|
-
/* @__PURE__ */
|
3304
|
+
/* @__PURE__ */ React24.createElement(
|
3044
3305
|
"div",
|
3045
3306
|
{
|
3046
|
-
className:
|
3047
|
-
|
3307
|
+
className: cn(
|
3308
|
+
"hawa-flex hawa-justify-between hawa-gap-4 tablet:hawa-gap-0",
|
3309
|
+
props.showSelectionCount ? "hawa-flex-col tablet:hawa-flex-row" : "hawa-flex-col mobile:hawa-flex-row"
|
3310
|
+
)
|
3048
3311
|
},
|
3049
|
-
/* @__PURE__ */
|
3050
|
-
" ",
|
3051
|
-
|
3052
|
-
|
3053
|
-
|
3054
|
-
|
3055
|
-
max: table.getPageCount(),
|
3056
|
-
min: 0,
|
3057
|
-
type: "number",
|
3058
|
-
defaultValue: table.getState().pagination.pageIndex + 1,
|
3059
|
-
onChange: (e) => {
|
3060
|
-
let page = Number(e.target.value) - 1;
|
3061
|
-
const max = table.getPageCount();
|
3062
|
-
if (!isNaN(page) && Number(page) > max) {
|
3063
|
-
page = max - 1;
|
3064
|
-
}
|
3065
|
-
table.setPageIndex(page);
|
3312
|
+
!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" }),
|
3313
|
+
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(
|
3314
|
+
"div",
|
3315
|
+
{
|
3316
|
+
className: "hawa-text-muted-foreground hawa-text-sm",
|
3317
|
+
dir: props.direction
|
3066
3318
|
},
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3071
|
-
|
3072
|
-
|
3073
|
-
|
3074
|
-
|
3075
|
-
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3083
|
-
|
3319
|
+
/* @__PURE__ */ React24.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
|
3320
|
+
" ",
|
3321
|
+
/* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
3322
|
+
), 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(
|
3323
|
+
"div",
|
3324
|
+
{
|
3325
|
+
className: "hawa-text-muted-foreground hawa-text-sm",
|
3326
|
+
dir: props.direction
|
3327
|
+
},
|
3328
|
+
table.getFilteredSelectedRowModel().rows.length,
|
3329
|
+
" ",
|
3330
|
+
(_h = props.texts) == null ? void 0 : _h.of,
|
3331
|
+
" ",
|
3332
|
+
table.getFilteredRowModel().rows.length,
|
3333
|
+
" ",
|
3334
|
+
(_i = props.texts) == null ? void 0 : _i.selectedRows
|
3335
|
+
)), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
|
3336
|
+
DropdownMenu,
|
3337
|
+
{
|
3338
|
+
size: "sm",
|
3339
|
+
width: "sm",
|
3340
|
+
direction: props.direction,
|
3341
|
+
items: (props.bulkActions || []).map((action) => ({
|
3342
|
+
...action,
|
3343
|
+
action: () => action.action(
|
3344
|
+
table.getFilteredSelectedRowModel().rows
|
3345
|
+
)
|
3346
|
+
})),
|
3347
|
+
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_j = props.texts) == null ? void 0 : _j.bulkAction) || "Bulk Action")
|
3348
|
+
}
|
3349
|
+
))) : null,
|
3350
|
+
/* @__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(
|
3351
|
+
"input",
|
3352
|
+
{
|
3353
|
+
max: table.getPageCount(),
|
3354
|
+
min: 0,
|
3355
|
+
type: "number",
|
3356
|
+
defaultValue: table.getState().pagination.pageIndex + 1,
|
3357
|
+
onChange: (e) => {
|
3358
|
+
let page = Number(e.target.value) - 1;
|
3359
|
+
const max = table.getPageCount();
|
3360
|
+
if (!isNaN(page) && Number(page) > max) {
|
3361
|
+
page = max - 1;
|
3362
|
+
}
|
3363
|
+
table.setPageIndex(page);
|
3364
|
+
},
|
3365
|
+
className: "hawa-w-16 hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-text-sm placeholder:hawa-text-muted-foreground"
|
3366
|
+
}
|
3367
|
+
)), /* @__PURE__ */ React24.createElement(
|
3368
|
+
DropdownMenu,
|
3369
|
+
{
|
3370
|
+
size: "sm",
|
3371
|
+
width: "sm",
|
3372
|
+
direction: props.direction,
|
3373
|
+
items: itemsPerPageOptions || [
|
3374
|
+
{ label: `10 / ${pageText}`, value: 10 },
|
3375
|
+
{ label: `20 / ${pageText}`, value: 20 },
|
3376
|
+
{ label: `30 / ${pageText}`, value: 30 },
|
3377
|
+
{ label: `40 / ${pageText}`, value: 40 },
|
3378
|
+
{ label: `50 / ${pageText}`, value: 50 }
|
3379
|
+
],
|
3380
|
+
trigger: /* @__PURE__ */ React24.createElement(
|
3381
|
+
Button,
|
3382
|
+
{
|
3383
|
+
variant: "outline",
|
3384
|
+
size: "icon",
|
3385
|
+
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
|
3386
|
+
},
|
3387
|
+
`${table.getState().pagination.pageSize} / ${(_l = props.texts) == null ? void 0 : _l.page}`
|
3388
|
+
),
|
3389
|
+
onItemSelect: (e) => table.setPageSize(Number(e))
|
3390
|
+
}
|
3391
|
+
), 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(
|
3392
|
+
Button,
|
3393
|
+
{
|
3394
|
+
"aria-label": "Next Table Page",
|
3395
|
+
variant: "outline",
|
3396
|
+
size: "smallIcon",
|
3397
|
+
onClick: () => table.setPageIndex(0),
|
3398
|
+
disabled: !table.getCanPreviousPage(),
|
3399
|
+
className: cn(
|
3400
|
+
props.direction === "rtl" && "hawa-rotate-180"
|
3401
|
+
)
|
3402
|
+
},
|
3403
|
+
/* @__PURE__ */ React24.createElement(
|
3404
|
+
"svg",
|
3084
3405
|
{
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3406
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3407
|
+
width: "20",
|
3408
|
+
height: "20",
|
3409
|
+
viewBox: "0 0 24 24",
|
3410
|
+
fill: "none",
|
3411
|
+
stroke: "currentColor",
|
3412
|
+
strokeWidth: "2",
|
3413
|
+
strokeLinecap: "round",
|
3414
|
+
strokeLinejoin: "round"
|
3088
3415
|
},
|
3089
|
-
|
3090
|
-
|
3091
|
-
onItemSelect: (e) => table.setPageSize(Number(e))
|
3092
|
-
}
|
3093
|
-
), 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(
|
3094
|
-
Button,
|
3095
|
-
{
|
3096
|
-
"aria-label": "Next Table Page",
|
3097
|
-
variant: "outline",
|
3098
|
-
size: "smallIcon",
|
3099
|
-
onClick: () => table.setPageIndex(0),
|
3100
|
-
disabled: !table.getCanPreviousPage(),
|
3101
|
-
className: cn(
|
3102
|
-
props.direction === "rtl" && "hawa-rotate-180"
|
3416
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m11 17-5-5 5-5" }),
|
3417
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m18 17-5-5 5-5" })
|
3103
3418
|
)
|
3104
|
-
|
3105
|
-
|
3106
|
-
"svg",
|
3419
|
+
), /* @__PURE__ */ React24.createElement(
|
3420
|
+
Button,
|
3107
3421
|
{
|
3108
|
-
|
3109
|
-
|
3110
|
-
|
3111
|
-
|
3112
|
-
|
3113
|
-
|
3114
|
-
|
3115
|
-
|
3116
|
-
strokeLinejoin: "round"
|
3422
|
+
"aria-label": "Previous Table Page",
|
3423
|
+
variant: "outline",
|
3424
|
+
size: "smallIcon",
|
3425
|
+
onClick: () => table.previousPage(),
|
3426
|
+
disabled: !table.getCanPreviousPage(),
|
3427
|
+
className: cn(
|
3428
|
+
props.direction === "rtl" && "hawa-rotate-180"
|
3429
|
+
)
|
3117
3430
|
},
|
3118
|
-
/* @__PURE__ */
|
3119
|
-
|
3120
|
-
|
3121
|
-
|
3122
|
-
|
3123
|
-
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3431
|
+
/* @__PURE__ */ React24.createElement(
|
3432
|
+
"svg",
|
3433
|
+
{
|
3434
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3435
|
+
width: "20",
|
3436
|
+
height: "20",
|
3437
|
+
"aria-label": "Single Chevron Icon",
|
3438
|
+
viewBox: "0 0 24 24",
|
3439
|
+
fill: "none",
|
3440
|
+
stroke: "currentColor",
|
3441
|
+
strokeWidth: "2",
|
3442
|
+
strokeLinecap: "round",
|
3443
|
+
strokeLinejoin: "round"
|
3444
|
+
},
|
3445
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m15 18-6-6 6-6" })
|
3131
3446
|
)
|
3132
|
-
|
3133
|
-
|
3134
|
-
"svg",
|
3447
|
+
), /* @__PURE__ */ React24.createElement(
|
3448
|
+
Button,
|
3135
3449
|
{
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
|
3142
|
-
|
3143
|
-
|
3144
|
-
strokeLinecap: "round",
|
3145
|
-
strokeLinejoin: "round"
|
3450
|
+
"aria-label": "Next Table Page",
|
3451
|
+
variant: "outline",
|
3452
|
+
size: "smallIcon",
|
3453
|
+
onClick: () => table.nextPage(),
|
3454
|
+
disabled: !table.getCanNextPage(),
|
3455
|
+
className: cn(
|
3456
|
+
props.direction === "ltr" && "hawa-rotate-180"
|
3457
|
+
)
|
3146
3458
|
},
|
3147
|
-
/* @__PURE__ */
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3459
|
+
/* @__PURE__ */ React24.createElement(
|
3460
|
+
"svg",
|
3461
|
+
{
|
3462
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3463
|
+
width: "20",
|
3464
|
+
height: "20",
|
3465
|
+
"aria-label": "Single Chevron Icon",
|
3466
|
+
viewBox: "0 0 24 24",
|
3467
|
+
fill: "none",
|
3468
|
+
stroke: "currentColor",
|
3469
|
+
strokeWidth: "2",
|
3470
|
+
strokeLinecap: "round",
|
3471
|
+
strokeLinejoin: "round"
|
3472
|
+
},
|
3473
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m15 18-6-6 6-6" })
|
3159
3474
|
)
|
3160
|
-
|
3161
|
-
|
3162
|
-
"svg",
|
3475
|
+
), /* @__PURE__ */ React24.createElement(
|
3476
|
+
Button,
|
3163
3477
|
{
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
|
3171
|
-
|
3172
|
-
strokeLinecap: "round",
|
3173
|
-
strokeLinejoin: "round"
|
3478
|
+
"aria-label": "Next Table Page",
|
3479
|
+
variant: "outline",
|
3480
|
+
size: "smallIcon",
|
3481
|
+
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
3482
|
+
disabled: !table.getCanNextPage(),
|
3483
|
+
className: cn(
|
3484
|
+
props.direction === "ltr" && "hawa-rotate-180"
|
3485
|
+
)
|
3174
3486
|
},
|
3175
|
-
/* @__PURE__ */
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3179
|
-
|
3180
|
-
|
3181
|
-
|
3182
|
-
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3487
|
+
/* @__PURE__ */ React24.createElement(
|
3488
|
+
"svg",
|
3489
|
+
{
|
3490
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3491
|
+
width: "20",
|
3492
|
+
height: "20",
|
3493
|
+
viewBox: "0 0 24 24",
|
3494
|
+
fill: "none",
|
3495
|
+
stroke: "currentColor",
|
3496
|
+
strokeWidth: "2",
|
3497
|
+
strokeLinecap: "round",
|
3498
|
+
strokeLinejoin: "round"
|
3499
|
+
},
|
3500
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m11 17-5-5 5-5" }),
|
3501
|
+
/* @__PURE__ */ React24.createElement("path", { d: "m18 17-5-5 5-5" })
|
3187
3502
|
)
|
3188
|
-
|
3189
|
-
|
3190
|
-
"svg",
|
3191
|
-
{
|
3192
|
-
xmlns: "http://www.w3.org/2000/svg",
|
3193
|
-
width: "20",
|
3194
|
-
height: "20",
|
3195
|
-
viewBox: "0 0 24 24",
|
3196
|
-
fill: "none",
|
3197
|
-
stroke: "currentColor",
|
3198
|
-
strokeWidth: "2",
|
3199
|
-
strokeLinecap: "round",
|
3200
|
-
strokeLinejoin: "round"
|
3201
|
-
},
|
3202
|
-
/* @__PURE__ */ React23.createElement("path", { d: "m11 17-5-5 5-5" }),
|
3203
|
-
/* @__PURE__ */ React23.createElement("path", { d: "m18 17-5-5 5-5" })
|
3204
|
-
)
|
3205
|
-
))))
|
3503
|
+
))))
|
3504
|
+
)
|
3206
3505
|
));
|
3207
3506
|
};
|
3208
3507
|
|
3209
3508
|
// elements/backToTop/BackToTop.tsx
|
3210
|
-
import
|
3509
|
+
import React25, { useState as useState5, useEffect as useEffect4, useRef as useRef3 } from "react";
|
3211
3510
|
var BackToTop = ({ ...props }) => {
|
3212
3511
|
const [visible, setVisible] = useState5(false);
|
3213
3512
|
const [rect, _setRect] = useState5(null);
|
@@ -3273,7 +3572,7 @@ var BackToTop = ({ ...props }) => {
|
|
3273
3572
|
};
|
3274
3573
|
return style;
|
3275
3574
|
};
|
3276
|
-
return /* @__PURE__ */
|
3575
|
+
return /* @__PURE__ */ React25.createElement(
|
3277
3576
|
Button,
|
3278
3577
|
{
|
3279
3578
|
className: cn(
|
@@ -3288,7 +3587,7 @@ var BackToTop = ({ ...props }) => {
|
|
3288
3587
|
ref: self,
|
3289
3588
|
size: "icon"
|
3290
3589
|
},
|
3291
|
-
/* @__PURE__ */
|
3590
|
+
/* @__PURE__ */ React25.createElement(
|
3292
3591
|
"svg",
|
3293
3592
|
{
|
3294
3593
|
className: cn(
|
@@ -3298,19 +3597,19 @@ var BackToTop = ({ ...props }) => {
|
|
3298
3597
|
viewBox: "0 0 20 20",
|
3299
3598
|
fill: "currentColor"
|
3300
3599
|
},
|
3301
|
-
/* @__PURE__ */
|
3600
|
+
/* @__PURE__ */ React25.createElement("path", { d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" })
|
3302
3601
|
)
|
3303
3602
|
);
|
3304
3603
|
};
|
3305
3604
|
|
3306
3605
|
// elements/radio/Radio.tsx
|
3307
|
-
import
|
3606
|
+
import React27, { useState as useState6, useRef as useRef4, useEffect as useEffect5, forwardRef as forwardRef16 } from "react";
|
3308
3607
|
|
3309
3608
|
// elements/popover/Popover.tsx
|
3310
|
-
import * as
|
3609
|
+
import * as React26 from "react";
|
3311
3610
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
3312
|
-
var PopoverContent =
|
3313
|
-
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */
|
3611
|
+
var PopoverContent = React26.forwardRef(
|
3612
|
+
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React26.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React26.createElement(
|
3314
3613
|
PopoverPrimitive.Content,
|
3315
3614
|
{
|
3316
3615
|
ref,
|
@@ -3343,7 +3642,7 @@ var Popover = ({
|
|
3343
3642
|
trigger: "var(--radix-popover-trigger-width)",
|
3344
3643
|
default: "auto"
|
3345
3644
|
};
|
3346
|
-
return /* @__PURE__ */
|
3645
|
+
return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React26.createElement(
|
3347
3646
|
PopoverPrimitive.Trigger,
|
3348
3647
|
{
|
3349
3648
|
className: "hawa-w-full",
|
@@ -3351,7 +3650,7 @@ var Popover = ({
|
|
3351
3650
|
...triggerProps
|
3352
3651
|
},
|
3353
3652
|
trigger
|
3354
|
-
), /* @__PURE__ */
|
3653
|
+
), /* @__PURE__ */ React26.createElement(
|
3355
3654
|
PopoverContent,
|
3356
3655
|
{
|
3357
3656
|
side,
|
@@ -3373,7 +3672,7 @@ var PopoverPortal = PopoverPrimitive.Portal;
|
|
3373
3672
|
var PopoverRoot = PopoverPrimitive.Root;
|
3374
3673
|
|
3375
3674
|
// elements/radio/Radio.tsx
|
3376
|
-
var Radio =
|
3675
|
+
var Radio = forwardRef16(
|
3377
3676
|
({
|
3378
3677
|
design = "default",
|
3379
3678
|
width = "default",
|
@@ -3406,7 +3705,7 @@ var Radio = forwardRef15(
|
|
3406
3705
|
default: "hawa-max-w-fit",
|
3407
3706
|
full: "hawa-w-full"
|
3408
3707
|
};
|
3409
|
-
const [parentDirection, setParentDirection] =
|
3708
|
+
const [parentDirection, setParentDirection] = React27.useState(
|
3410
3709
|
null
|
3411
3710
|
);
|
3412
3711
|
const [selectedOption, setSelectedOption] = useState6(
|
@@ -3440,7 +3739,7 @@ var Radio = forwardRef15(
|
|
3440
3739
|
];
|
3441
3740
|
switch (design) {
|
3442
3741
|
case "tabs":
|
3443
|
-
return /* @__PURE__ */
|
3742
|
+
return /* @__PURE__ */ React27.createElement(
|
3444
3743
|
"div",
|
3445
3744
|
{
|
3446
3745
|
className: cn(
|
@@ -3448,8 +3747,8 @@ var Radio = forwardRef15(
|
|
3448
3747
|
containerClassNames == null ? void 0 : containerClassNames.tabs
|
3449
3748
|
)
|
3450
3749
|
},
|
3451
|
-
props.label && /* @__PURE__ */
|
3452
|
-
/* @__PURE__ */
|
3750
|
+
props.label && /* @__PURE__ */ React27.createElement(Label2, { ...labelProps }, props.label),
|
3751
|
+
/* @__PURE__ */ React27.createElement(
|
3453
3752
|
"ul",
|
3454
3753
|
{
|
3455
3754
|
ref: parentRef,
|
@@ -3462,21 +3761,21 @@ var Radio = forwardRef15(
|
|
3462
3761
|
)
|
3463
3762
|
},
|
3464
3763
|
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
3465
|
-
return opt.tooltip ? /* @__PURE__ */
|
3764
|
+
return opt.tooltip ? /* @__PURE__ */ React27.createElement(
|
3466
3765
|
PopoverRoot,
|
3467
3766
|
{
|
3468
3767
|
key: o,
|
3469
3768
|
open: o === openTooltip,
|
3470
3769
|
onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
|
3471
3770
|
},
|
3472
|
-
/* @__PURE__ */
|
3771
|
+
/* @__PURE__ */ React27.createElement(
|
3473
3772
|
PopoverTrigger,
|
3474
3773
|
{
|
3475
3774
|
onMouseEnter: () => setOpenTooltip(o),
|
3476
3775
|
onMouseLeave: () => setOpenTooltip(null),
|
3477
3776
|
asChild: true
|
3478
3777
|
},
|
3479
|
-
/* @__PURE__ */
|
3778
|
+
/* @__PURE__ */ React27.createElement(
|
3480
3779
|
"li",
|
3481
3780
|
{
|
3482
3781
|
"aria-current": "page",
|
@@ -3494,8 +3793,8 @@ var Radio = forwardRef15(
|
|
3494
3793
|
opt.label
|
3495
3794
|
)
|
3496
3795
|
),
|
3497
|
-
/* @__PURE__ */
|
3498
|
-
) : /* @__PURE__ */
|
3796
|
+
/* @__PURE__ */ React27.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
|
3797
|
+
) : /* @__PURE__ */ React27.createElement(
|
3499
3798
|
"li",
|
3500
3799
|
{
|
3501
3800
|
key: o,
|
@@ -3515,10 +3814,10 @@ var Radio = forwardRef15(
|
|
3515
3814
|
);
|
3516
3815
|
})
|
3517
3816
|
),
|
3518
|
-
!forceHideHelperText && /* @__PURE__ */
|
3817
|
+
!forceHideHelperText && /* @__PURE__ */ React27.createElement(HelperText, { helperText: props.helperText })
|
3519
3818
|
);
|
3520
3819
|
case "bordered":
|
3521
|
-
return /* @__PURE__ */
|
3820
|
+
return /* @__PURE__ */ React27.createElement(
|
3522
3821
|
"div",
|
3523
3822
|
{
|
3524
3823
|
className: cn(
|
@@ -3527,7 +3826,7 @@ var Radio = forwardRef15(
|
|
3527
3826
|
containerClassNames == null ? void 0 : containerClassNames.bordered
|
3528
3827
|
)
|
3529
3828
|
},
|
3530
|
-
props.options && props.options.map((opt, i) => /* @__PURE__ */
|
3829
|
+
props.options && props.options.map((opt, i) => /* @__PURE__ */ React27.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React27.createElement(
|
3531
3830
|
"div",
|
3532
3831
|
{
|
3533
3832
|
className: cn(
|
@@ -3536,7 +3835,7 @@ var Radio = forwardRef15(
|
|
3536
3835
|
),
|
3537
3836
|
key: i + 1
|
3538
3837
|
},
|
3539
|
-
/* @__PURE__ */
|
3838
|
+
/* @__PURE__ */ React27.createElement(
|
3540
3839
|
"input",
|
3541
3840
|
{
|
3542
3841
|
disabled: opt.disabled,
|
@@ -3547,7 +3846,7 @@ var Radio = forwardRef15(
|
|
3547
3846
|
onChange: () => handleChange(opt)
|
3548
3847
|
}
|
3549
3848
|
),
|
3550
|
-
/* @__PURE__ */
|
3849
|
+
/* @__PURE__ */ React27.createElement(
|
3551
3850
|
"label",
|
3552
3851
|
{
|
3553
3852
|
htmlFor: opt.value.toString(),
|
@@ -3561,7 +3860,7 @@ var Radio = forwardRef15(
|
|
3561
3860
|
)))
|
3562
3861
|
);
|
3563
3862
|
case "cards":
|
3564
|
-
return /* @__PURE__ */
|
3863
|
+
return /* @__PURE__ */ React27.createElement(
|
3565
3864
|
"ul",
|
3566
3865
|
{
|
3567
3866
|
className: cn(
|
@@ -3570,7 +3869,7 @@ var Radio = forwardRef15(
|
|
3570
3869
|
containerClassNames == null ? void 0 : containerClassNames.cards
|
3571
3870
|
)
|
3572
3871
|
},
|
3573
|
-
(_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */
|
3872
|
+
(_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React27.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React27.createElement(
|
3574
3873
|
"input",
|
3575
3874
|
{
|
3576
3875
|
type: "radio",
|
@@ -3581,7 +3880,7 @@ var Radio = forwardRef15(
|
|
3581
3880
|
required: true,
|
3582
3881
|
disabled: opt.disabled
|
3583
3882
|
}
|
3584
|
-
), /* @__PURE__ */
|
3883
|
+
), /* @__PURE__ */ React27.createElement(
|
3585
3884
|
"label",
|
3586
3885
|
{
|
3587
3886
|
htmlFor: opt.value.toString(),
|
@@ -3590,11 +3889,11 @@ var Radio = forwardRef15(
|
|
3590
3889
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
|
3591
3890
|
)
|
3592
3891
|
},
|
3593
|
-
/* @__PURE__ */
|
3892
|
+
/* @__PURE__ */ React27.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React27.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React27.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
3594
3893
|
)))
|
3595
3894
|
);
|
3596
3895
|
default:
|
3597
|
-
return /* @__PURE__ */
|
3896
|
+
return /* @__PURE__ */ React27.createElement(
|
3598
3897
|
"div",
|
3599
3898
|
{
|
3600
3899
|
className: cn(
|
@@ -3602,8 +3901,8 @@ var Radio = forwardRef15(
|
|
3602
3901
|
containerClassNames == null ? void 0 : containerClassNames.default
|
3603
3902
|
)
|
3604
3903
|
},
|
3605
|
-
props.label && /* @__PURE__ */
|
3606
|
-
/* @__PURE__ */
|
3904
|
+
props.label && /* @__PURE__ */ React27.createElement(Label2, { ...labelProps }, props.label),
|
3905
|
+
/* @__PURE__ */ React27.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React27.createElement(
|
3607
3906
|
"div",
|
3608
3907
|
{
|
3609
3908
|
className: cn(
|
@@ -3612,7 +3911,7 @@ var Radio = forwardRef15(
|
|
3612
3911
|
),
|
3613
3912
|
key: i + 1
|
3614
3913
|
},
|
3615
|
-
/* @__PURE__ */
|
3914
|
+
/* @__PURE__ */ React27.createElement(
|
3616
3915
|
"input",
|
3617
3916
|
{
|
3618
3917
|
disabled: opt.disabled,
|
@@ -3623,7 +3922,7 @@ var Radio = forwardRef15(
|
|
3623
3922
|
onChange: () => handleChange(opt)
|
3624
3923
|
}
|
3625
3924
|
),
|
3626
|
-
/* @__PURE__ */
|
3925
|
+
/* @__PURE__ */ React27.createElement(
|
3627
3926
|
"label",
|
3628
3927
|
{
|
3629
3928
|
htmlFor: opt.value.toString(),
|
@@ -3635,21 +3934,21 @@ var Radio = forwardRef15(
|
|
3635
3934
|
opt.label
|
3636
3935
|
)
|
3637
3936
|
))),
|
3638
|
-
/* @__PURE__ */
|
3937
|
+
/* @__PURE__ */ React27.createElement(HelperText, { helperText: props.helperText })
|
3639
3938
|
);
|
3640
3939
|
}
|
3641
3940
|
}
|
3642
3941
|
);
|
3643
3942
|
|
3644
3943
|
// elements/combobox/Combobox.tsx
|
3645
|
-
import * as
|
3944
|
+
import * as React29 from "react";
|
3646
3945
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
3647
3946
|
|
3648
3947
|
// elements/command/Command.tsx
|
3649
|
-
import * as
|
3948
|
+
import * as React28 from "react";
|
3650
3949
|
import { Dialog as Dialog2 } from "@radix-ui/react-dialog";
|
3651
3950
|
import { Command as CommandPrimitive } from "cmdk";
|
3652
|
-
var Command =
|
3951
|
+
var Command = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3653
3952
|
CommandPrimitive,
|
3654
3953
|
{
|
3655
3954
|
ref,
|
@@ -3661,15 +3960,15 @@ var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
3661
3960
|
}
|
3662
3961
|
));
|
3663
3962
|
var CommandDialog = ({ children, ...props }) => {
|
3664
|
-
return /* @__PURE__ */
|
3963
|
+
return /* @__PURE__ */ React28.createElement(Dialog2, { ...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)));
|
3665
3964
|
};
|
3666
|
-
var CommandInput =
|
3965
|
+
var CommandInput = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3667
3966
|
"div",
|
3668
3967
|
{
|
3669
3968
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
3670
3969
|
"cmdk-input-wrapper": ""
|
3671
3970
|
},
|
3672
|
-
/* @__PURE__ */
|
3971
|
+
/* @__PURE__ */ React28.createElement(
|
3673
3972
|
"svg",
|
3674
3973
|
{
|
3675
3974
|
"aria-label": "Search Icon",
|
@@ -3684,10 +3983,10 @@ var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3684
3983
|
strokeLinejoin: "round",
|
3685
3984
|
className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
|
3686
3985
|
},
|
3687
|
-
/* @__PURE__ */
|
3688
|
-
/* @__PURE__ */
|
3986
|
+
/* @__PURE__ */ React28.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
3987
|
+
/* @__PURE__ */ React28.createElement("path", { d: "m21 21-4.3-4.3" })
|
3689
3988
|
),
|
3690
|
-
/* @__PURE__ */
|
3989
|
+
/* @__PURE__ */ React28.createElement(
|
3691
3990
|
CommandPrimitive.Input,
|
3692
3991
|
{
|
3693
3992
|
ref,
|
@@ -3699,7 +3998,7 @@ var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3699
3998
|
}
|
3700
3999
|
)
|
3701
4000
|
));
|
3702
|
-
var CommandList =
|
4001
|
+
var CommandList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3703
4002
|
CommandPrimitive.List,
|
3704
4003
|
{
|
3705
4004
|
ref,
|
@@ -3710,7 +4009,7 @@ var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
3710
4009
|
...props
|
3711
4010
|
}
|
3712
4011
|
));
|
3713
|
-
var CommandEmpty =
|
4012
|
+
var CommandEmpty = React28.forwardRef((props, ref) => /* @__PURE__ */ React28.createElement(
|
3714
4013
|
CommandPrimitive.Empty,
|
3715
4014
|
{
|
3716
4015
|
ref,
|
@@ -3718,7 +4017,7 @@ var CommandEmpty = React27.forwardRef((props, ref) => /* @__PURE__ */ React27.cr
|
|
3718
4017
|
...props
|
3719
4018
|
}
|
3720
4019
|
));
|
3721
|
-
var CommandGroup =
|
4020
|
+
var CommandGroup = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3722
4021
|
CommandPrimitive.Group,
|
3723
4022
|
{
|
3724
4023
|
ref,
|
@@ -3729,7 +4028,7 @@ var CommandGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3729
4028
|
...props
|
3730
4029
|
}
|
3731
4030
|
));
|
3732
|
-
var CommandSeparator =
|
4031
|
+
var CommandSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3733
4032
|
CommandPrimitive.Separator,
|
3734
4033
|
{
|
3735
4034
|
ref,
|
@@ -3737,7 +4036,7 @@ var CommandSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @
|
|
3737
4036
|
...props
|
3738
4037
|
}
|
3739
4038
|
));
|
3740
|
-
var CommandItem =
|
4039
|
+
var CommandItem = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
3741
4040
|
CommandPrimitive.Item,
|
3742
4041
|
{
|
3743
4042
|
ref,
|
@@ -3752,7 +4051,7 @@ var CommandShortcut = ({
|
|
3752
4051
|
className,
|
3753
4052
|
...props
|
3754
4053
|
}) => {
|
3755
|
-
return /* @__PURE__ */
|
4054
|
+
return /* @__PURE__ */ React28.createElement(
|
3756
4055
|
"span",
|
3757
4056
|
{
|
3758
4057
|
className: cn(
|
@@ -3769,22 +4068,22 @@ var FullCommand = ({
|
|
3769
4068
|
texts,
|
3770
4069
|
onActionClick
|
3771
4070
|
}) => {
|
3772
|
-
return /* @__PURE__ */
|
4071
|
+
return /* @__PURE__ */ React28.createElement(
|
3773
4072
|
Command,
|
3774
4073
|
{
|
3775
4074
|
dir: direction,
|
3776
4075
|
className: "hawa-rounded-lg hawa-border hawa-shadow-md !hawa-h-full"
|
3777
4076
|
},
|
3778
|
-
/* @__PURE__ */
|
4077
|
+
/* @__PURE__ */ React28.createElement(
|
3779
4078
|
CommandInput,
|
3780
4079
|
{
|
3781
4080
|
placeholder: (texts == null ? void 0 : texts.searchPlaceholder) || "Type a command or search..."
|
3782
4081
|
}
|
3783
4082
|
),
|
3784
|
-
/* @__PURE__ */
|
4083
|
+
/* @__PURE__ */ React28.createElement(CommandList, null, /* @__PURE__ */ React28.createElement(CommandEmpty, null, (texts == null ? void 0 : texts.emptyText) || "No results found."), items.map((item, index) => {
|
3785
4084
|
var _a;
|
3786
4085
|
if (item.type === "group") {
|
3787
|
-
return /* @__PURE__ */
|
4086
|
+
return /* @__PURE__ */ React28.createElement(CommandGroup, { heading: item.heading, key: index }, (_a = item.items) == null ? void 0 : _a.map((subItem, subIndex) => /* @__PURE__ */ React28.createElement(
|
3788
4087
|
CommandItem,
|
3789
4088
|
{
|
3790
4089
|
key: subIndex,
|
@@ -3794,12 +4093,12 @@ var FullCommand = ({
|
|
3794
4093
|
subItem.action();
|
3795
4094
|
}
|
3796
4095
|
},
|
3797
|
-
/* @__PURE__ */
|
3798
|
-
/* @__PURE__ */
|
3799
|
-
subItem.shortcut && /* @__PURE__ */
|
4096
|
+
/* @__PURE__ */ React28.createElement(subItem.icon, { className: "hawa-icon hawa-me-2" }),
|
4097
|
+
/* @__PURE__ */ React28.createElement("span", null, subItem.label),
|
4098
|
+
subItem.shortcut && /* @__PURE__ */ React28.createElement(CommandShortcut, null, subItem.shortcut)
|
3800
4099
|
)));
|
3801
4100
|
} else if (item.type === "separator") {
|
3802
|
-
return /* @__PURE__ */
|
4101
|
+
return /* @__PURE__ */ React28.createElement(CommandSeparator, { key: index });
|
3803
4102
|
}
|
3804
4103
|
return null;
|
3805
4104
|
}))
|
@@ -3810,13 +4109,13 @@ var AppCommand = ({
|
|
3810
4109
|
dialogProps,
|
3811
4110
|
onActionClick
|
3812
4111
|
}) => {
|
3813
|
-
return /* @__PURE__ */
|
4112
|
+
return /* @__PURE__ */ React28.createElement(Dialog2, { ...dialogProps }, /* @__PURE__ */ React28.createElement(
|
3814
4113
|
DialogContent,
|
3815
4114
|
{
|
3816
4115
|
hideCloseButton: true,
|
3817
4116
|
className: "hawa-overflow-hidden !hawa-p-0 hawa-shadow-l "
|
3818
4117
|
},
|
3819
|
-
/* @__PURE__ */
|
4118
|
+
/* @__PURE__ */ React28.createElement(FullCommand, { ...commandProps, onActionClick })
|
3820
4119
|
));
|
3821
4120
|
};
|
3822
4121
|
CommandShortcut.displayName = "CommandShortcut";
|
@@ -3829,7 +4128,7 @@ Command.displayName = CommandPrimitive.displayName;
|
|
3829
4128
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
3830
4129
|
|
3831
4130
|
// elements/combobox/Combobox.tsx
|
3832
|
-
var Combobox =
|
4131
|
+
var Combobox = React29.forwardRef(
|
3833
4132
|
({
|
3834
4133
|
labelKey = "label",
|
3835
4134
|
valueKey = "value",
|
@@ -3844,9 +4143,9 @@ var Combobox = React28.forwardRef(
|
|
3844
4143
|
...props
|
3845
4144
|
}, ref) => {
|
3846
4145
|
var _a, _b, _c;
|
3847
|
-
const [open, setOpen] =
|
3848
|
-
const [value, setValue] =
|
3849
|
-
const containerRef =
|
4146
|
+
const [open, setOpen] = React29.useState(false);
|
4147
|
+
const [value, setValue] = React29.useState(defaultValue);
|
4148
|
+
const containerRef = React29.useRef(null);
|
3850
4149
|
function getProperty(obj, key) {
|
3851
4150
|
return key.split(".").reduce((o, k) => (o || {})[k], obj);
|
3852
4151
|
}
|
@@ -3858,7 +4157,7 @@ var Combobox = React28.forwardRef(
|
|
3858
4157
|
const selectedItem = data.find(
|
3859
4158
|
(item) => getProperty(item, valueKey) === value
|
3860
4159
|
);
|
3861
|
-
return /* @__PURE__ */
|
4160
|
+
return /* @__PURE__ */ React29.createElement(
|
3862
4161
|
"div",
|
3863
4162
|
{
|
3864
4163
|
className: cn(
|
@@ -3867,8 +4166,8 @@ var Combobox = React28.forwardRef(
|
|
3867
4166
|
),
|
3868
4167
|
ref: containerRef
|
3869
4168
|
},
|
3870
|
-
props.label && /* @__PURE__ */
|
3871
|
-
/* @__PURE__ */
|
4169
|
+
props.label && /* @__PURE__ */ React29.createElement(Label2, { ...labelProps }, props.label),
|
4170
|
+
/* @__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(
|
3872
4171
|
"div",
|
3873
4172
|
{
|
3874
4173
|
className: cn(
|
@@ -3876,7 +4175,7 @@ var Combobox = React28.forwardRef(
|
|
3876
4175
|
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
3877
4176
|
)
|
3878
4177
|
}
|
3879
|
-
), /* @__PURE__ */
|
4178
|
+
), /* @__PURE__ */ React29.createElement(
|
3880
4179
|
"button",
|
3881
4180
|
{
|
3882
4181
|
role: "combobox",
|
@@ -3888,7 +4187,7 @@ var Combobox = React28.forwardRef(
|
|
3888
4187
|
)
|
3889
4188
|
},
|
3890
4189
|
selectedItem ? renderSelected ? renderSelected(selectedItem) : getProperty(selectedItem, labelKey) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || ". . .",
|
3891
|
-
/* @__PURE__ */
|
4190
|
+
/* @__PURE__ */ React29.createElement(
|
3892
4191
|
"svg",
|
3893
4192
|
{
|
3894
4193
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -3904,9 +4203,9 @@ var Combobox = React28.forwardRef(
|
|
3904
4203
|
strokeLinecap: "round",
|
3905
4204
|
strokeLinejoin: "round"
|
3906
4205
|
},
|
3907
|
-
/* @__PURE__ */
|
4206
|
+
/* @__PURE__ */ React29.createElement("path", { d: "m6 9 6 6 6-6" })
|
3908
4207
|
)
|
3909
|
-
), /* @__PURE__ */
|
4208
|
+
), /* @__PURE__ */ React29.createElement(HelperText, { helperText: props.helperText }))), /* @__PURE__ */ React29.createElement(
|
3910
4209
|
PopoverContent,
|
3911
4210
|
{
|
3912
4211
|
sideOffset: 0,
|
@@ -3914,7 +4213,7 @@ var Combobox = React28.forwardRef(
|
|
3914
4213
|
dir: direction,
|
3915
4214
|
container: containerRef.current
|
3916
4215
|
},
|
3917
|
-
/* @__PURE__ */
|
4216
|
+
/* @__PURE__ */ React29.createElement(
|
3918
4217
|
Command,
|
3919
4218
|
{
|
3920
4219
|
filter: (value2, search) => {
|
@@ -3923,7 +4222,7 @@ var Combobox = React28.forwardRef(
|
|
3923
4222
|
return 0;
|
3924
4223
|
}
|
3925
4224
|
},
|
3926
|
-
!props.hideInput && /* @__PURE__ */
|
4225
|
+
!props.hideInput && /* @__PURE__ */ React29.createElement(
|
3927
4226
|
CommandInput,
|
3928
4227
|
{
|
3929
4228
|
...inputProps,
|
@@ -3931,8 +4230,8 @@ var Combobox = React28.forwardRef(
|
|
3931
4230
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
3932
4231
|
}
|
3933
4232
|
),
|
3934
|
-
/* @__PURE__ */
|
3935
|
-
/* @__PURE__ */
|
4233
|
+
/* @__PURE__ */ React29.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."),
|
4234
|
+
/* @__PURE__ */ React29.createElement(CommandList, null, /* @__PURE__ */ React29.createElement(
|
3936
4235
|
CommandGroup,
|
3937
4236
|
{
|
3938
4237
|
className: cn(
|
@@ -3940,7 +4239,7 @@ var Combobox = React28.forwardRef(
|
|
3940
4239
|
data.length > 0 && "hawa-overflow-y-auto"
|
3941
4240
|
)
|
3942
4241
|
},
|
3943
|
-
data.map((item, i) => /* @__PURE__ */
|
4242
|
+
data.map((item, i) => /* @__PURE__ */ React29.createElement(
|
3944
4243
|
CommandItem,
|
3945
4244
|
{
|
3946
4245
|
key: i,
|
@@ -3957,7 +4256,7 @@ var Combobox = React28.forwardRef(
|
|
3957
4256
|
setOpen(false);
|
3958
4257
|
}
|
3959
4258
|
},
|
3960
|
-
/* @__PURE__ */
|
4259
|
+
/* @__PURE__ */ React29.createElement(
|
3961
4260
|
"svg",
|
3962
4261
|
{
|
3963
4262
|
"aria-label": "Check Icon",
|
@@ -3976,7 +4275,7 @@ var Combobox = React28.forwardRef(
|
|
3976
4275
|
),
|
3977
4276
|
style: { marginInlineEnd: "0.5rem" }
|
3978
4277
|
},
|
3979
|
-
/* @__PURE__ */
|
4278
|
+
/* @__PURE__ */ React29.createElement("polyline", { points: "20 6 9 17 4 12" })
|
3980
4279
|
),
|
3981
4280
|
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
3982
4281
|
))
|
@@ -3988,8 +4287,8 @@ var Combobox = React28.forwardRef(
|
|
3988
4287
|
);
|
3989
4288
|
|
3990
4289
|
// elements/textarea/Textarea.tsx
|
3991
|
-
import * as
|
3992
|
-
var Textarea =
|
4290
|
+
import * as React30 from "react";
|
4291
|
+
var Textarea = React30.forwardRef(
|
3993
4292
|
({
|
3994
4293
|
className,
|
3995
4294
|
classNames,
|
@@ -4001,7 +4300,7 @@ var Textarea = React29.forwardRef(
|
|
4001
4300
|
isLoading,
|
4002
4301
|
...props
|
4003
4302
|
}, ref) => {
|
4004
|
-
return /* @__PURE__ */
|
4303
|
+
return /* @__PURE__ */ React30.createElement(
|
4005
4304
|
"div",
|
4006
4305
|
{
|
4007
4306
|
className: cn(
|
@@ -4010,7 +4309,7 @@ var Textarea = React29.forwardRef(
|
|
4010
4309
|
className
|
4011
4310
|
)
|
4012
4311
|
},
|
4013
|
-
/* @__PURE__ */
|
4312
|
+
/* @__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(
|
4014
4313
|
"div",
|
4015
4314
|
{
|
4016
4315
|
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
@@ -4019,7 +4318,7 @@ var Textarea = React29.forwardRef(
|
|
4019
4318
|
"/",
|
4020
4319
|
textareaProps == null ? void 0 : textareaProps.maxLength
|
4021
4320
|
)),
|
4022
|
-
isLoading ? /* @__PURE__ */
|
4321
|
+
isLoading ? /* @__PURE__ */ React30.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React30.createElement(
|
4023
4322
|
"textarea",
|
4024
4323
|
{
|
4025
4324
|
...textareaProps,
|
@@ -4030,14 +4329,14 @@ var Textarea = React29.forwardRef(
|
|
4030
4329
|
ref
|
4031
4330
|
}
|
4032
4331
|
),
|
4033
|
-
/* @__PURE__ */
|
4332
|
+
/* @__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))
|
4034
4333
|
);
|
4035
4334
|
}
|
4036
4335
|
);
|
4037
4336
|
Textarea.displayName = "Textarea";
|
4038
4337
|
|
4039
4338
|
// elements/fileDropzone/FileDropzone.tsx
|
4040
|
-
import
|
4339
|
+
import React31, { useEffect as useEffect6, useState as useState8 } from "react";
|
4041
4340
|
import { useDropzone } from "react-dropzone";
|
4042
4341
|
import clsx2 from "clsx";
|
4043
4342
|
var FileDropzone = ({
|
@@ -4115,7 +4414,7 @@ var FileDropzone = ({
|
|
4115
4414
|
const errs = fileRejections.map((rej, i) => {
|
4116
4415
|
switch (rej.errors[0].code) {
|
4117
4416
|
case "file-too-large":
|
4118
|
-
return /* @__PURE__ */
|
4417
|
+
return /* @__PURE__ */ React31.createElement(
|
4119
4418
|
Alert,
|
4120
4419
|
{
|
4121
4420
|
key: i,
|
@@ -4125,7 +4424,7 @@ var FileDropzone = ({
|
|
4125
4424
|
}
|
4126
4425
|
);
|
4127
4426
|
case "too-many-files":
|
4128
|
-
return /* @__PURE__ */
|
4427
|
+
return /* @__PURE__ */ React31.createElement(
|
4129
4428
|
Alert,
|
4130
4429
|
{
|
4131
4430
|
key: i,
|
@@ -4135,7 +4434,7 @@ var FileDropzone = ({
|
|
4135
4434
|
}
|
4136
4435
|
);
|
4137
4436
|
case "file-invalid-type":
|
4138
|
-
return /* @__PURE__ */
|
4437
|
+
return /* @__PURE__ */ React31.createElement(
|
4139
4438
|
Alert,
|
4140
4439
|
{
|
4141
4440
|
key: i,
|
@@ -4145,7 +4444,7 @@ var FileDropzone = ({
|
|
4145
4444
|
}
|
4146
4445
|
);
|
4147
4446
|
default:
|
4148
|
-
return /* @__PURE__ */
|
4447
|
+
return /* @__PURE__ */ React31.createElement(
|
4149
4448
|
Alert,
|
4150
4449
|
{
|
4151
4450
|
key: i,
|
@@ -4156,7 +4455,7 @@ var FileDropzone = ({
|
|
4156
4455
|
);
|
4157
4456
|
}
|
4158
4457
|
});
|
4159
|
-
const thumbs = files == null ? void 0 : files.map((file, index) => /* @__PURE__ */
|
4458
|
+
const thumbs = files == null ? void 0 : files.map((file, index) => /* @__PURE__ */ React31.createElement("div", { className: "hawa-relative hawa-rounded", key: index }, /* @__PURE__ */ React31.createElement(
|
4160
4459
|
"button",
|
4161
4460
|
{
|
4162
4461
|
onClick: (e) => {
|
@@ -4169,7 +4468,7 @@ var FileDropzone = ({
|
|
4169
4468
|
className: "hawa-absolute hawa-left-0 hawa-ml-auto hawa-inline-flex hawa-items-center hawa-rounded-inner hawa-rounded-bl-none hawa-rounded-tr-none hawa-bg-gray-900 hawa-p-1.5 hawa-text-sm hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-200 hover:hawa-text-gray-900 dark:hover:hawa-bg-gray-600 dark:hover:hawa-text-white",
|
4170
4469
|
"data-modal-toggle": "defaultModal"
|
4171
4470
|
},
|
4172
|
-
/* @__PURE__ */
|
4471
|
+
/* @__PURE__ */ React31.createElement(
|
4173
4472
|
"svg",
|
4174
4473
|
{
|
4175
4474
|
"aria-hidden": "true",
|
@@ -4177,7 +4476,7 @@ var FileDropzone = ({
|
|
4177
4476
|
fill: "currentColor",
|
4178
4477
|
viewBox: "0 0 20 20"
|
4179
4478
|
},
|
4180
|
-
/* @__PURE__ */
|
4479
|
+
/* @__PURE__ */ React31.createElement(
|
4181
4480
|
"path",
|
4182
4481
|
{
|
4183
4482
|
fillRule: "evenodd",
|
@@ -4186,8 +4485,8 @@ var FileDropzone = ({
|
|
4186
4485
|
}
|
4187
4486
|
)
|
4188
4487
|
),
|
4189
|
-
/* @__PURE__ */
|
4190
|
-
), /* @__PURE__ */
|
4488
|
+
/* @__PURE__ */ React31.createElement("span", { className: "hawa-sr-only" }, "Close modal")
|
4489
|
+
), /* @__PURE__ */ React31.createElement(
|
4191
4490
|
"div",
|
4192
4491
|
{
|
4193
4492
|
style: {
|
@@ -4206,7 +4505,7 @@ var FileDropzone = ({
|
|
4206
4505
|
key: file.name
|
4207
4506
|
}
|
4208
4507
|
)));
|
4209
|
-
return /* @__PURE__ */
|
4508
|
+
return /* @__PURE__ */ React31.createElement("div", null, label && /* @__PURE__ */ React31.createElement("div", { className: "hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label), /* @__PURE__ */ React31.createElement(
|
4210
4509
|
"div",
|
4211
4510
|
{
|
4212
4511
|
className: clsx2(
|
@@ -4214,7 +4513,7 @@ var FileDropzone = ({
|
|
4214
4513
|
isDragActive ? "hawa-bg-muted" : "hawa-bg-muted/20 hover:hawa-bg-muted/50 "
|
4215
4514
|
)
|
4216
4515
|
},
|
4217
|
-
/* @__PURE__ */
|
4516
|
+
/* @__PURE__ */ React31.createElement("div", { ...getRootProps({}) }, /* @__PURE__ */ React31.createElement("p", { ...getInputProps() }), /* @__PURE__ */ React31.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center" }, /* @__PURE__ */ React31.createElement(
|
4218
4517
|
"svg",
|
4219
4518
|
{
|
4220
4519
|
stroke: "currentColor",
|
@@ -4226,28 +4525,28 @@ var FileDropzone = ({
|
|
4226
4525
|
height: "1.5em",
|
4227
4526
|
width: "1.5em"
|
4228
4527
|
},
|
4229
|
-
/* @__PURE__ */
|
4230
|
-
/* @__PURE__ */
|
4231
|
-
/* @__PURE__ */
|
4232
|
-
/* @__PURE__ */
|
4233
|
-
/* @__PURE__ */
|
4234
|
-
/* @__PURE__ */
|
4235
|
-
/* @__PURE__ */
|
4236
|
-
/* @__PURE__ */
|
4237
|
-
/* @__PURE__ */
|
4238
|
-
/* @__PURE__ */
|
4239
|
-
), typeof texts.clickHereToUpload === "function" ? texts.clickHereToUpload() : texts.clickHereToUpload), /* @__PURE__ */
|
4240
|
-
acceptedFiles.length > 0 && /* @__PURE__ */
|
4241
|
-
acceptedFiles.length > 0 && thumbs && showPreview ? /* @__PURE__ */
|
4242
|
-
/* @__PURE__ */
|
4243
|
-
), disclaimer && /* @__PURE__ */
|
4528
|
+
/* @__PURE__ */ React31.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
4529
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" }),
|
4530
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M13 13l9 3l-4 2l-2 4l-3 -9" }),
|
4531
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M3 3l0 .01" }),
|
4532
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M7 3l0 .01" }),
|
4533
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M11 3l0 .01" }),
|
4534
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M15 3l0 .01" }),
|
4535
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M3 7l0 .01" }),
|
4536
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M3 11l0 .01" }),
|
4537
|
+
/* @__PURE__ */ React31.createElement("path", { d: "M3 15l0 .01" })
|
4538
|
+
), typeof texts.clickHereToUpload === "function" ? texts.clickHereToUpload() : texts.clickHereToUpload), /* @__PURE__ */ React31.createElement("div", { className: "hawa-select-none hawa-pt-2 hawa-text-center hawa-text-xs" }, texts.acceptedFileTypes, " ", accept.split(",")), /* @__PURE__ */ React31.createElement("div", { className: "hawa-select-none hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs" }, texts.maxFileSize, " ", max)),
|
4539
|
+
acceptedFiles.length > 0 && /* @__PURE__ */ React31.createElement("div", { className: "hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2 " }, /* @__PURE__ */ React31.createElement(Button, { onClick: clearAllFiles }, "Clear All")),
|
4540
|
+
acceptedFiles.length > 0 && thumbs && showPreview ? /* @__PURE__ */ React31.createElement("aside", { className: "hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2" }, thumbs) : null,
|
4541
|
+
/* @__PURE__ */ React31.createElement("div", { className: "px-4" }, ((_b = (_a = fileRejections[0]) == null ? void 0 : _a.errors[0]) == null ? void 0 : _b.code) && errs)
|
4542
|
+
), disclaimer && /* @__PURE__ */ React31.createElement("div", { className: "hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50" }, (_c = texts.disclaimer) != null ? _c : "By uploading a file you agree to our", " ", /* @__PURE__ */ React31.createElement(
|
4244
4543
|
"a",
|
4245
4544
|
{
|
4246
4545
|
href: termsLink,
|
4247
4546
|
className: "clickable-link hawa-text-muted-foreground/50"
|
4248
4547
|
},
|
4249
4548
|
(_d = texts.terms) != null ? _d : "Terms"
|
4250
|
-
), " ", (_e = texts.and) != null ? _e : "and", " ", /* @__PURE__ */
|
4549
|
+
), " ", (_e = texts.and) != null ? _e : "and", " ", /* @__PURE__ */ React31.createElement(
|
4251
4550
|
"a",
|
4252
4551
|
{
|
4253
4552
|
href: privacyLink,
|
@@ -4258,9 +4557,9 @@ var FileDropzone = ({
|
|
4258
4557
|
};
|
4259
4558
|
|
4260
4559
|
// elements/sortButton/SortButton.tsx
|
4261
|
-
import
|
4560
|
+
import React32 from "react";
|
4262
4561
|
var SortButton = (props) => {
|
4263
|
-
return /* @__PURE__ */
|
4562
|
+
return /* @__PURE__ */ React32.createElement(
|
4264
4563
|
Button,
|
4265
4564
|
{
|
4266
4565
|
variant: "ghost",
|
@@ -4272,7 +4571,7 @@ var SortButton = (props) => {
|
|
4272
4571
|
onClick: props.onSort
|
4273
4572
|
},
|
4274
4573
|
props.label,
|
4275
|
-
/* @__PURE__ */
|
4574
|
+
/* @__PURE__ */ React32.createElement(
|
4276
4575
|
"svg",
|
4277
4576
|
{
|
4278
4577
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -4284,16 +4583,16 @@ var SortButton = (props) => {
|
|
4284
4583
|
strokeLinejoin: "round",
|
4285
4584
|
className: props.condensed ? "hawa-h-3 hawa-w-3" : "hawa-icon"
|
4286
4585
|
},
|
4287
|
-
/* @__PURE__ */
|
4288
|
-
/* @__PURE__ */
|
4289
|
-
/* @__PURE__ */
|
4290
|
-
/* @__PURE__ */
|
4586
|
+
/* @__PURE__ */ React32.createElement("path", { d: "m21 16-4 4-4-4" }),
|
4587
|
+
/* @__PURE__ */ React32.createElement("path", { d: "M17 20V4" }),
|
4588
|
+
/* @__PURE__ */ React32.createElement("path", { d: "m3 8 4-4 4 4" }),
|
4589
|
+
/* @__PURE__ */ React32.createElement("path", { d: "M7 4v16" })
|
4291
4590
|
)
|
4292
4591
|
);
|
4293
4592
|
};
|
4294
4593
|
|
4295
4594
|
// elements/tabs/Tabs.tsx
|
4296
|
-
import * as
|
4595
|
+
import * as React42 from "react";
|
4297
4596
|
|
4298
4597
|
// hooks/useIsomorphicEffect.ts
|
4299
4598
|
import { useEffect as useEffect7, useLayoutEffect } from "react";
|
@@ -4306,7 +4605,7 @@ import { useState as useState9 } from "react";
|
|
4306
4605
|
import { useEffect as useEffect8, useRef as useRef6, useState as useState10 } from "react";
|
4307
4606
|
|
4308
4607
|
// hooks/useToast.ts
|
4309
|
-
import * as
|
4608
|
+
import * as React35 from "react";
|
4310
4609
|
var TOAST_LIMIT = 5;
|
4311
4610
|
var TOAST_REMOVE_DELAY = 1e5;
|
4312
4611
|
var count = 0;
|
@@ -4392,8 +4691,8 @@ function toast({ ...props }) {
|
|
4392
4691
|
return { id, dismiss, update };
|
4393
4692
|
}
|
4394
4693
|
function useToast() {
|
4395
|
-
const [state, setState] =
|
4396
|
-
|
4694
|
+
const [state, setState] = React35.useState(memoryState);
|
4695
|
+
React35.useEffect(() => {
|
4397
4696
|
listeners.push(setState);
|
4398
4697
|
return () => {
|
4399
4698
|
const index = listeners.indexOf(setState);
|
@@ -4864,15 +5163,15 @@ import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4864
5163
|
import { tv } from "tailwind-variants";
|
4865
5164
|
|
4866
5165
|
// elements/scrollArea/ScrollArea.tsx
|
4867
|
-
import * as
|
5166
|
+
import * as React41 from "react";
|
4868
5167
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
4869
|
-
var ScrollArea =
|
4870
|
-
const scrollAreaRef =
|
4871
|
-
const isDragging =
|
4872
|
-
const startPos =
|
4873
|
-
const scrollPos =
|
4874
|
-
const [showLeftFade, setShowLeftFade] =
|
4875
|
-
const [showRightFade, setShowRightFade] =
|
5168
|
+
var ScrollArea = React41.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => {
|
5169
|
+
const scrollAreaRef = React41.useRef(null);
|
5170
|
+
const isDragging = React41.useRef(false);
|
5171
|
+
const startPos = React41.useRef({ x: 0, y: 0 });
|
5172
|
+
const scrollPos = React41.useRef({ top: 0, left: 0 });
|
5173
|
+
const [showLeftFade, setShowLeftFade] = React41.useState(false);
|
5174
|
+
const [showRightFade, setShowRightFade] = React41.useState(false);
|
4876
5175
|
const checkOverflow = () => {
|
4877
5176
|
if (scrollAreaRef.current) {
|
4878
5177
|
const { scrollLeft, scrollWidth, clientWidth } = scrollAreaRef.current;
|
@@ -4909,7 +5208,7 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
4909
5208
|
document.removeEventListener("mousemove", onMouseMove);
|
4910
5209
|
document.removeEventListener("mouseup", onMouseUp);
|
4911
5210
|
};
|
4912
|
-
|
5211
|
+
React41.useEffect(() => {
|
4913
5212
|
checkOverflow();
|
4914
5213
|
if (scrollAreaRef.current) {
|
4915
5214
|
scrollAreaRef.current.addEventListener("scroll", checkOverflow);
|
@@ -4922,14 +5221,14 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
4922
5221
|
window.removeEventListener("resize", checkOverflow);
|
4923
5222
|
};
|
4924
5223
|
}, []);
|
4925
|
-
return /* @__PURE__ */
|
5224
|
+
return /* @__PURE__ */ React41.createElement(
|
4926
5225
|
ScrollAreaPrimitive.Root,
|
4927
5226
|
{
|
4928
5227
|
ref,
|
4929
5228
|
className: cn("hawa-relative hawa-overflow-hidden", className),
|
4930
5229
|
...props
|
4931
5230
|
},
|
4932
|
-
/* @__PURE__ */
|
5231
|
+
/* @__PURE__ */ React41.createElement(
|
4933
5232
|
"div",
|
4934
5233
|
{
|
4935
5234
|
className: cn(
|
@@ -4938,7 +5237,7 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
4938
5237
|
)
|
4939
5238
|
}
|
4940
5239
|
),
|
4941
|
-
/* @__PURE__ */
|
5240
|
+
/* @__PURE__ */ React41.createElement(
|
4942
5241
|
"div",
|
4943
5242
|
{
|
4944
5243
|
className: cn(
|
@@ -4947,7 +5246,7 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
4947
5246
|
)
|
4948
5247
|
}
|
4949
5248
|
),
|
4950
|
-
/* @__PURE__ */
|
5249
|
+
/* @__PURE__ */ React41.createElement(
|
4951
5250
|
ScrollAreaPrimitive.Viewport,
|
4952
5251
|
{
|
4953
5252
|
ref: scrollAreaRef,
|
@@ -4956,12 +5255,12 @@ var ScrollArea = React40.forwardRef(({ className, children, orientation = "verti
|
|
4956
5255
|
},
|
4957
5256
|
children
|
4958
5257
|
),
|
4959
|
-
/* @__PURE__ */
|
4960
|
-
/* @__PURE__ */
|
5258
|
+
/* @__PURE__ */ React41.createElement(ScrollBar, { orientation }),
|
5259
|
+
/* @__PURE__ */ React41.createElement(ScrollAreaPrimitive.Corner, null)
|
4961
5260
|
);
|
4962
5261
|
});
|
4963
5262
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
4964
|
-
var ScrollBar =
|
5263
|
+
var ScrollBar = React41.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React41.createElement(
|
4965
5264
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
4966
5265
|
{
|
4967
5266
|
ref,
|
@@ -4974,7 +5273,7 @@ var ScrollBar = React40.forwardRef(({ className, orientation = "vertical", ...pr
|
|
4974
5273
|
),
|
4975
5274
|
...props
|
4976
5275
|
},
|
4977
|
-
/* @__PURE__ */
|
5276
|
+
/* @__PURE__ */ React41.createElement(
|
4978
5277
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
4979
5278
|
{
|
4980
5279
|
className: cn(
|
@@ -5045,9 +5344,9 @@ var tabsTriggerVariant = tv({
|
|
5045
5344
|
],
|
5046
5345
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
5047
5346
|
});
|
5048
|
-
var TabsContext =
|
5049
|
-
var Tabs =
|
5050
|
-
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */
|
5347
|
+
var TabsContext = React42.createContext({ orientation: "horizontal", variant: "default", scrollable: false });
|
5348
|
+
var Tabs = React42.forwardRef(
|
5349
|
+
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
5051
5350
|
TabsPrimitive.Root,
|
5052
5351
|
{
|
5053
5352
|
ref,
|
@@ -5058,14 +5357,14 @@ var Tabs = React41.forwardRef(
|
|
5058
5357
|
),
|
5059
5358
|
...props
|
5060
5359
|
},
|
5061
|
-
/* @__PURE__ */
|
5360
|
+
/* @__PURE__ */ React42.createElement(TabsContext.Provider, { value: { orientation, variant, scrollable } }, props.children)
|
5062
5361
|
)
|
5063
5362
|
);
|
5064
|
-
var TabsList =
|
5065
|
-
const { orientation, variant, scrollable } =
|
5363
|
+
var TabsList = React42.forwardRef(({ className, classNames, ...props }, ref) => {
|
5364
|
+
const { orientation, variant, scrollable } = React42.useContext(TabsContext);
|
5066
5365
|
const { width } = useViewportSize();
|
5067
5366
|
if (scrollable && width < 768 && orientation === "horizontal") {
|
5068
|
-
return /* @__PURE__ */
|
5367
|
+
return /* @__PURE__ */ React42.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React42.createElement(
|
5069
5368
|
TabsPrimitive.List,
|
5070
5369
|
{
|
5071
5370
|
ref,
|
@@ -5078,7 +5377,7 @@ var TabsList = React41.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
5078
5377
|
}
|
5079
5378
|
));
|
5080
5379
|
} else {
|
5081
|
-
return /* @__PURE__ */
|
5380
|
+
return /* @__PURE__ */ React42.createElement(
|
5082
5381
|
TabsPrimitive.List,
|
5083
5382
|
{
|
5084
5383
|
ref,
|
@@ -5093,11 +5392,11 @@ var TabsList = React41.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
5093
5392
|
);
|
5094
5393
|
}
|
5095
5394
|
});
|
5096
|
-
var TabsTrigger =
|
5395
|
+
var TabsTrigger = React42.forwardRef(
|
5097
5396
|
({ className, chipProps, withPopover = false, onPopoverClick, ...props }, ref) => {
|
5098
|
-
const { orientation, variant } =
|
5397
|
+
const { orientation, variant } = React42.useContext(TabsContext);
|
5099
5398
|
if (withPopover) {
|
5100
|
-
return /* @__PURE__ */
|
5399
|
+
return /* @__PURE__ */ React42.createElement(Popover2.Root, { open: props.showPopover }, /* @__PURE__ */ React42.createElement(Popover2.Anchor, { asChild: true }, /* @__PURE__ */ React42.createElement(
|
5101
5400
|
TabsPrimitive.Trigger,
|
5102
5401
|
{
|
5103
5402
|
className: cn(
|
@@ -5108,8 +5407,8 @@ var TabsTrigger = React41.forwardRef(
|
|
5108
5407
|
...props
|
5109
5408
|
},
|
5110
5409
|
props.children,
|
5111
|
-
chipProps && /* @__PURE__ */
|
5112
|
-
)), /* @__PURE__ */
|
5410
|
+
chipProps && /* @__PURE__ */ React42.createElement(Chip, { ...chipProps })
|
5411
|
+
)), /* @__PURE__ */ React42.createElement(
|
5113
5412
|
Popover2.Content,
|
5114
5413
|
{
|
5115
5414
|
onClick: onPopoverClick,
|
@@ -5119,10 +5418,10 @@ var TabsTrigger = React41.forwardRef(
|
|
5119
5418
|
"hawa-arrow-default-top hawa-mt-2"
|
5120
5419
|
)
|
5121
5420
|
},
|
5122
|
-
/* @__PURE__ */
|
5421
|
+
/* @__PURE__ */ React42.createElement("div", { className: "hawa-p-2" }, " ", props.popoverContent)
|
5123
5422
|
));
|
5124
5423
|
} else {
|
5125
|
-
return /* @__PURE__ */
|
5424
|
+
return /* @__PURE__ */ React42.createElement(
|
5126
5425
|
TabsPrimitive.Trigger,
|
5127
5426
|
{
|
5128
5427
|
className: cn(
|
@@ -5133,12 +5432,12 @@ var TabsTrigger = React41.forwardRef(
|
|
5133
5432
|
...props
|
5134
5433
|
},
|
5135
5434
|
props.children,
|
5136
|
-
chipProps && /* @__PURE__ */
|
5435
|
+
chipProps && /* @__PURE__ */ React42.createElement(Chip, { ...chipProps })
|
5137
5436
|
);
|
5138
5437
|
}
|
5139
5438
|
}
|
5140
5439
|
);
|
5141
|
-
var TabsContent =
|
5440
|
+
var TabsContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
5142
5441
|
TabsPrimitive.Content,
|
5143
5442
|
{
|
5144
5443
|
ref,
|
@@ -5155,7 +5454,7 @@ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
5155
5454
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
5156
5455
|
|
5157
5456
|
// elements/select/Select.tsx
|
5158
|
-
import
|
5457
|
+
import React43 from "react";
|
5159
5458
|
import ReactSelect from "react-select";
|
5160
5459
|
import CreatableSelect from "react-select/creatable";
|
5161
5460
|
import clsx3 from "clsx";
|
@@ -5166,10 +5465,10 @@ var Select = ({
|
|
5166
5465
|
}) => {
|
5167
5466
|
const NoOption = () => {
|
5168
5467
|
var _a, _b;
|
5169
|
-
return /* @__PURE__ */
|
5468
|
+
return /* @__PURE__ */ React43.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
5170
5469
|
};
|
5171
5470
|
const Control = ({ children, innerProps, innerRef }) => {
|
5172
|
-
return /* @__PURE__ */
|
5471
|
+
return /* @__PURE__ */ React43.createElement(
|
5173
5472
|
"div",
|
5174
5473
|
{
|
5175
5474
|
ref: innerRef,
|
@@ -5182,7 +5481,7 @@ var Select = ({
|
|
5182
5481
|
);
|
5183
5482
|
};
|
5184
5483
|
const Option = ({ children, innerProps, innerRef }) => {
|
5185
|
-
return /* @__PURE__ */
|
5484
|
+
return /* @__PURE__ */ React43.createElement(
|
5186
5485
|
"div",
|
5187
5486
|
{
|
5188
5487
|
ref: innerRef,
|
@@ -5203,7 +5502,7 @@ var Select = ({
|
|
5203
5502
|
...menuProps
|
5204
5503
|
}) => {
|
5205
5504
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
5206
|
-
return /* @__PURE__ */
|
5505
|
+
return /* @__PURE__ */ React43.createElement(
|
5207
5506
|
"div",
|
5208
5507
|
{
|
5209
5508
|
className: cn(
|
@@ -5221,7 +5520,7 @@ var Select = ({
|
|
5221
5520
|
let selectContainerStyles = "hawa-rounded hawa-block hawa-w-full hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm";
|
5222
5521
|
let selectPlaceholderStyles = "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1";
|
5223
5522
|
let selectIndicatorContainerStyles = "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ";
|
5224
|
-
return /* @__PURE__ */
|
5523
|
+
return /* @__PURE__ */ React43.createElement(
|
5225
5524
|
"div",
|
5226
5525
|
{
|
5227
5526
|
className: cn(
|
@@ -5229,10 +5528,10 @@ var Select = ({
|
|
5229
5528
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
5230
5529
|
)
|
5231
5530
|
},
|
5232
|
-
props.label && /* @__PURE__ */
|
5233
|
-
props.isLoading ? /* @__PURE__ */
|
5531
|
+
props.label && /* @__PURE__ */ React43.createElement(Label2, { ...labelProps }, props.label),
|
5532
|
+
props.isLoading ? /* @__PURE__ */ React43.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
5234
5533
|
// TODO: enable keyboard to go to the next item in the list
|
5235
|
-
/* @__PURE__ */
|
5534
|
+
/* @__PURE__ */ React43.createElement(
|
5236
5535
|
ReactSelect,
|
5237
5536
|
{
|
5238
5537
|
noOptionsMessage: NoOption,
|
@@ -5266,7 +5565,7 @@ var Select = ({
|
|
5266
5565
|
// {...e}
|
5267
5566
|
// />
|
5268
5567
|
// ),
|
5269
|
-
ValueContainer: (e) => /* @__PURE__ */
|
5568
|
+
ValueContainer: (e) => /* @__PURE__ */ React43.createElement(
|
5270
5569
|
"div",
|
5271
5570
|
{
|
5272
5571
|
className: cn(
|
@@ -5276,7 +5575,7 @@ var Select = ({
|
|
5276
5575
|
...e
|
5277
5576
|
}
|
5278
5577
|
),
|
5279
|
-
MultiValueContainer: (e) => /* @__PURE__ */
|
5578
|
+
MultiValueContainer: (e) => /* @__PURE__ */ React43.createElement(
|
5280
5579
|
"div",
|
5281
5580
|
{
|
5282
5581
|
className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
|
@@ -5295,7 +5594,7 @@ var Select = ({
|
|
5295
5594
|
isSearchable: props.isSearchable
|
5296
5595
|
}
|
5297
5596
|
)
|
5298
|
-
) : /* @__PURE__ */
|
5597
|
+
) : /* @__PURE__ */ React43.createElement(
|
5299
5598
|
CreatableSelect,
|
5300
5599
|
{
|
5301
5600
|
formatCreateLabel: (inputValue) => {
|
@@ -5325,20 +5624,20 @@ var Select = ({
|
|
5325
5624
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
5326
5625
|
}
|
5327
5626
|
),
|
5328
|
-
!props.hideHelperText && /* @__PURE__ */
|
5627
|
+
!props.hideHelperText && /* @__PURE__ */ React43.createElement(HelperText, { helperText: props.helperText })
|
5329
5628
|
);
|
5330
5629
|
};
|
5331
5630
|
|
5332
5631
|
// elements/switch/Switch.tsx
|
5333
|
-
import * as
|
5632
|
+
import * as React44 from "react";
|
5334
5633
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
5335
|
-
var Switch =
|
5634
|
+
var Switch = React44.forwardRef(
|
5336
5635
|
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
5337
|
-
const [parentDirection, setParentDirection] =
|
5636
|
+
const [parentDirection, setParentDirection] = React44.useState(
|
5338
5637
|
null
|
5339
5638
|
);
|
5340
|
-
const parentRef =
|
5341
|
-
|
5639
|
+
const parentRef = React44.useRef(null);
|
5640
|
+
React44.useEffect(() => {
|
5342
5641
|
var _a;
|
5343
5642
|
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
5344
5643
|
if (parentNode) {
|
@@ -5366,13 +5665,13 @@ var Switch = React43.forwardRef(
|
|
5366
5665
|
full: "hawa-rounded-full",
|
5367
5666
|
inherit: "hawa-rounded-inner"
|
5368
5667
|
};
|
5369
|
-
return /* @__PURE__ */
|
5668
|
+
return /* @__PURE__ */ React44.createElement(
|
5370
5669
|
"div",
|
5371
5670
|
{
|
5372
5671
|
className: "hawa-flex hawa-flex-row hawa-items-center",
|
5373
5672
|
ref: parentRef
|
5374
5673
|
},
|
5375
|
-
/* @__PURE__ */
|
5674
|
+
/* @__PURE__ */ React44.createElement(
|
5376
5675
|
SwitchPrimitives.Root,
|
5377
5676
|
{
|
5378
5677
|
className: cn(
|
@@ -5386,7 +5685,7 @@ var Switch = React43.forwardRef(
|
|
5386
5685
|
...props,
|
5387
5686
|
ref
|
5388
5687
|
},
|
5389
|
-
/* @__PURE__ */
|
5688
|
+
/* @__PURE__ */ React44.createElement(
|
5390
5689
|
SwitchPrimitives.Thumb,
|
5391
5690
|
{
|
5392
5691
|
className: cn(
|
@@ -5400,148 +5699,12 @@ var Switch = React43.forwardRef(
|
|
5400
5699
|
}
|
5401
5700
|
)
|
5402
5701
|
),
|
5403
|
-
label && /* @__PURE__ */
|
5702
|
+
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)
|
5404
5703
|
);
|
5405
5704
|
}
|
5406
5705
|
);
|
5407
5706
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
5408
5707
|
|
5409
|
-
// elements/checkbox/Checkbox.tsx
|
5410
|
-
import * as React44 from "react";
|
5411
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
5412
|
-
var Checkbox = ({
|
5413
|
-
id,
|
5414
|
-
label,
|
5415
|
-
sublabel,
|
5416
|
-
helperText,
|
5417
|
-
disabled,
|
5418
|
-
size = "default",
|
5419
|
-
radius = "inherit",
|
5420
|
-
...props
|
5421
|
-
}) => {
|
5422
|
-
let labelLineHeightStyles = {
|
5423
|
-
xs: sublabel || helperText ? 0.5 : 0.1,
|
5424
|
-
sm: 0.6,
|
5425
|
-
default: 1,
|
5426
|
-
md: 0.8,
|
5427
|
-
lg: 0.9,
|
5428
|
-
xl: 1
|
5429
|
-
};
|
5430
|
-
return /* @__PURE__ */ React44.createElement(
|
5431
|
-
"div",
|
5432
|
-
{
|
5433
|
-
className: cn(
|
5434
|
-
"hawa-flex hawa-gap-2",
|
5435
|
-
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
5436
|
-
)
|
5437
|
-
},
|
5438
|
-
/* @__PURE__ */ React44.createElement(
|
5439
|
-
CheckboxElement,
|
5440
|
-
{
|
5441
|
-
...props,
|
5442
|
-
size,
|
5443
|
-
radius,
|
5444
|
-
disabled,
|
5445
|
-
id
|
5446
|
-
}
|
5447
|
-
),
|
5448
|
-
(label || helperText) && /* @__PURE__ */ React44.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React44.createElement(
|
5449
|
-
"label",
|
5450
|
-
{
|
5451
|
-
htmlFor: id,
|
5452
|
-
className: cn(
|
5453
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
5454
|
-
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
5455
|
-
),
|
5456
|
-
style: {
|
5457
|
-
// lineHeight: labelLineHeightStyles[size]
|
5458
|
-
lineHeight: 1
|
5459
|
-
}
|
5460
|
-
},
|
5461
|
-
label
|
5462
|
-
), sublabel && /* @__PURE__ */ React44.createElement(
|
5463
|
-
"label",
|
5464
|
-
{
|
5465
|
-
htmlFor: id,
|
5466
|
-
className: cn(
|
5467
|
-
"hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
|
5468
|
-
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
|
5469
|
-
)
|
5470
|
-
},
|
5471
|
-
sublabel
|
5472
|
-
), helperText && !disabled && /* @__PURE__ */ React44.createElement(
|
5473
|
-
"label",
|
5474
|
-
{
|
5475
|
-
htmlFor: id,
|
5476
|
-
className: cn(
|
5477
|
-
"hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
|
5478
|
-
disabled && "hawa-cursor-not-allowed hawa-opacity-70"
|
5479
|
-
)
|
5480
|
-
},
|
5481
|
-
helperText
|
5482
|
-
))
|
5483
|
-
);
|
5484
|
-
};
|
5485
|
-
var CheckboxElement = React44.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
5486
|
-
let checkboxRadius = {
|
5487
|
-
none: "hawa-rounded-none",
|
5488
|
-
inherit: "hawa-rounded-sm",
|
5489
|
-
full: "hawa-rounded-full"
|
5490
|
-
};
|
5491
|
-
let checkboxSizes = {
|
5492
|
-
xs: "hawa-w-3 hawa-h-3",
|
5493
|
-
sm: "hawa-w-6 hawa-h-6",
|
5494
|
-
default: "hawa-icon",
|
5495
|
-
md: "hawa-w-8 hawa-h-8",
|
5496
|
-
lg: "hawa-w-10 hawa-h-10",
|
5497
|
-
xl: "hawa-w-12 hawa-h-12"
|
5498
|
-
};
|
5499
|
-
let checkboxIndicatorSizes = {
|
5500
|
-
xs: "0.5em",
|
5501
|
-
default: "0.60em",
|
5502
|
-
sm: "0.75em",
|
5503
|
-
md: "0.875em",
|
5504
|
-
lg: "1em",
|
5505
|
-
xl: "1.25em"
|
5506
|
-
};
|
5507
|
-
return /* @__PURE__ */ React44.createElement(
|
5508
|
-
CheckboxPrimitive.Root,
|
5509
|
-
{
|
5510
|
-
ref,
|
5511
|
-
className: cn(
|
5512
|
-
"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",
|
5513
|
-
checkboxSizes[size],
|
5514
|
-
checkboxRadius[radius],
|
5515
|
-
className
|
5516
|
-
),
|
5517
|
-
...props
|
5518
|
-
},
|
5519
|
-
/* @__PURE__ */ React44.createElement(
|
5520
|
-
CheckboxPrimitive.Indicator,
|
5521
|
-
{
|
5522
|
-
className: cn(
|
5523
|
-
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
5524
|
-
)
|
5525
|
-
},
|
5526
|
-
/* @__PURE__ */ React44.createElement(
|
5527
|
-
"svg",
|
5528
|
-
{
|
5529
|
-
"aria-label": "Check Mark",
|
5530
|
-
stroke: "currentColor",
|
5531
|
-
fill: "currentColor",
|
5532
|
-
strokeWidth: "0",
|
5533
|
-
viewBox: "0 0 512 512",
|
5534
|
-
height: checkboxIndicatorSizes[size],
|
5535
|
-
width: checkboxIndicatorSizes[size]
|
5536
|
-
},
|
5537
|
-
/* @__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" })
|
5538
|
-
),
|
5539
|
-
" "
|
5540
|
-
)
|
5541
|
-
);
|
5542
|
-
});
|
5543
|
-
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
5544
|
-
|
5545
5708
|
// elements/progress/Progress.tsx
|
5546
5709
|
import * as React45 from "react";
|
5547
5710
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
@@ -11995,9 +12158,8 @@ var FeedbackForm = (props) => {
|
|
11995
12158
|
console.log("Form is submitted but onSubmit prop is missing");
|
11996
12159
|
}
|
11997
12160
|
}),
|
11998
|
-
className: "hawa-flex hawa-flex-col hawa-gap-
|
12161
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
11999
12162
|
},
|
12000
|
-
/* @__PURE__ */ React92.createElement(Label2, null),
|
12001
12163
|
/* @__PURE__ */ React92.createElement(
|
12002
12164
|
Controller7,
|
12003
12165
|
{
|