@sikka/hawa 0.41.2-next → 0.42.1-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.
Files changed (101) hide show
  1. package/dist/{DropdownMenu-SFJtRGAw.d.ts → DropdownMenu-DgV8PvW3.d.ts} +1 -0
  2. package/dist/{DropdownMenu-FVVDS2rX.d.mts → DropdownMenu-dvd9brmT.d.mts} +1 -0
  3. package/dist/appLayout/index.js +3 -1
  4. package/dist/appLayout/index.js.map +1 -1
  5. package/dist/appLayout/index.mjs +3 -1
  6. package/dist/appLayout/index.mjs.map +1 -1
  7. package/dist/appTopbar/index.js +3 -1
  8. package/dist/appTopbar/index.js.map +1 -1
  9. package/dist/appTopbar/index.mjs +3 -1
  10. package/dist/appTopbar/index.mjs.map +1 -1
  11. package/dist/backToTop/index.js +4 -8
  12. package/dist/backToTop/index.js.map +1 -1
  13. package/dist/backToTop/index.mjs +4 -8
  14. package/dist/backToTop/index.mjs.map +1 -1
  15. package/dist/blocks/feedback/index.js +2 -4
  16. package/dist/blocks/feedback/index.mjs +1 -1
  17. package/dist/blocks/index.d.mts +1 -1
  18. package/dist/blocks/index.d.ts +1 -1
  19. package/dist/blocks/index.js +6 -7
  20. package/dist/blocks/index.mjs +4 -4
  21. package/dist/blocks/misc/index.js +1 -2
  22. package/dist/blocks/misc/index.mjs +1 -1
  23. package/dist/blocks/pricing/index.js +3 -6
  24. package/dist/blocks/pricing/index.mjs +2 -2
  25. package/dist/carousel/index.js +1 -2
  26. package/dist/carousel/index.js.map +1 -1
  27. package/dist/carousel/index.mjs +1 -2
  28. package/dist/carousel/index.mjs.map +1 -1
  29. package/dist/{chunk-SYGWSBJL.mjs → chunk-2LUXOXAL.mjs} +1 -2
  30. package/dist/{chunk-FP6763YO.mjs → chunk-DBOKFWWD.mjs} +3 -1
  31. package/dist/{chunk-K5S7P5ZO.mjs → chunk-DGM7WFJR.mjs} +2 -4
  32. package/dist/{chunk-2GEXJLRC.mjs → chunk-OXZBK6KQ.mjs} +1 -1
  33. package/dist/{chunk-7R25FOBM.mjs → chunk-Q3IS4SMU.mjs} +5 -8
  34. package/dist/{chunk-XCW5YNMS.mjs → chunk-QUN7JBW3.mjs} +1 -2
  35. package/dist/{chunk-I3AK6DXN.mjs → chunk-RGOMP4PW.mjs} +1 -2
  36. package/dist/codeBlock/index.mjs +1 -2
  37. package/dist/codeBlock/index.mjs.map +1 -1
  38. package/dist/command/index.js +1 -2
  39. package/dist/command/index.js.map +1 -1
  40. package/dist/command/index.mjs +1 -2
  41. package/dist/command/index.mjs.map +1 -1
  42. package/dist/dataTable/index.d.mts +7 -1
  43. package/dist/dataTable/index.d.ts +7 -1
  44. package/dist/dataTable/index.js +55 -12
  45. package/dist/dataTable/index.js.map +1 -1
  46. package/dist/dataTable/index.mjs +55 -12
  47. package/dist/dataTable/index.mjs.map +1 -1
  48. package/dist/dropdownMenu/index.d.mts +1 -0
  49. package/dist/dropdownMenu/index.d.ts +1 -0
  50. package/dist/dropdownMenu/index.js +3 -1
  51. package/dist/dropdownMenu/index.js.map +1 -1
  52. package/dist/dropdownMenu/index.mjs +3 -1
  53. package/dist/dropdownMenu/index.mjs.map +1 -1
  54. package/dist/elements/index.d.mts +8 -2
  55. package/dist/elements/index.d.ts +8 -2
  56. package/dist/elements/index.js +70 -42
  57. package/dist/elements/index.mjs +69 -40
  58. package/dist/glow/index.js +1 -2
  59. package/dist/glow/index.js.map +1 -1
  60. package/dist/glow/index.mjs +1 -2
  61. package/dist/glow/index.mjs.map +1 -1
  62. package/dist/hooks/index.js +1 -2
  63. package/dist/hooks/index.mjs +2 -2
  64. package/dist/index.css +6 -0
  65. package/dist/index.d.mts +8 -1
  66. package/dist/index.d.ts +8 -1
  67. package/dist/index.js +71 -44
  68. package/dist/index.mjs +72 -46
  69. package/dist/interfaceSettings/index.js +2 -4
  70. package/dist/interfaceSettings/index.js.map +1 -1
  71. package/dist/interfaceSettings/index.mjs +2 -4
  72. package/dist/interfaceSettings/index.mjs.map +1 -1
  73. package/dist/layout/index.d.mts +1 -1
  74. package/dist/layout/index.d.ts +1 -1
  75. package/dist/layout/index.js +3 -1
  76. package/dist/layout/index.mjs +3 -3
  77. package/dist/passwordInput/index.js +5 -10
  78. package/dist/passwordInput/index.js.map +1 -1
  79. package/dist/passwordInput/index.mjs +5 -10
  80. package/dist/passwordInput/index.mjs.map +1 -1
  81. package/dist/radio/index.js +2 -4
  82. package/dist/radio/index.js.map +1 -1
  83. package/dist/radio/index.mjs +2 -4
  84. package/dist/radio/index.mjs.map +1 -1
  85. package/dist/scrollArea/index.js +1 -2
  86. package/dist/scrollArea/index.js.map +1 -1
  87. package/dist/scrollArea/index.mjs +1 -2
  88. package/dist/scrollArea/index.mjs.map +1 -1
  89. package/dist/scrollIndicator/index.js +1 -2
  90. package/dist/scrollIndicator/index.js.map +1 -1
  91. package/dist/scrollIndicator/index.mjs +1 -2
  92. package/dist/scrollIndicator/index.mjs.map +1 -1
  93. package/dist/splitButton/index.js +3 -1
  94. package/dist/splitButton/index.js.map +1 -1
  95. package/dist/splitButton/index.mjs +3 -1
  96. package/dist/splitButton/index.mjs.map +1 -1
  97. package/dist/tabs/index.js +1 -2
  98. package/dist/tabs/index.js.map +1 -1
  99. package/dist/tabs/index.mjs +1 -2
  100. package/dist/tabs/index.mjs.map +1 -1
  101. package/package.json +1 -1
@@ -821,6 +821,7 @@ var DropdownMenu = ({
821
821
  side,
822
822
  className,
823
823
  classNames,
824
+ contentProps,
824
825
  triggerClassname,
825
826
  triggerProps,
826
827
  align,
@@ -878,7 +879,8 @@ var DropdownMenu = ({
878
879
  ),
879
880
  style: {
880
881
  maxHeight: "var(--radix-dropdown-menu-content-available-height)"
881
- }
882
+ },
883
+ ...contentProps
882
884
  },
883
885
  header && header,
884
886
  items && items.map((item, index) => {
@@ -3226,11 +3228,12 @@ var DataTable = ({
3226
3228
  translateFn,
3227
3229
  enableHideColumns,
3228
3230
  enableSelection,
3231
+ enableFiltering,
3229
3232
  enableSearch,
3230
3233
  enableGoTo,
3231
3234
  ...props
3232
3235
  }) => {
3233
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
3236
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
3234
3237
  const [sorting, setSorting] = React24.useState(
3235
3238
  props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
3236
3239
  );
@@ -3244,6 +3247,7 @@ var DataTable = ({
3244
3247
  return savedVisibility ? JSON.parse(savedVisibility) : {};
3245
3248
  });
3246
3249
  const [rowSelection, setRowSelection] = React24.useState({});
3250
+ const [selectedFilters, setSelectedFilters] = React24.useState([]);
3247
3251
  let mainColumns = enableSelection ? [
3248
3252
  {
3249
3253
  id: "select",
@@ -3323,6 +3327,19 @@ var DataTable = ({
3323
3327
  return newColumnVisibility;
3324
3328
  });
3325
3329
  }, [columns]);
3330
+ React24.useEffect(() => {
3331
+ var _a2;
3332
+ (_a2 = props.filters) == null ? void 0 : _a2.forEach((filter) => {
3333
+ var _a3;
3334
+ const activeFilter = selectedFilters.find(
3335
+ (selectedFilter) => {
3336
+ var _a4, _b2;
3337
+ return filter.accessorKey === ((_b2 = (_a4 = props.filters) == null ? void 0 : _a4.find((f) => f.value === selectedFilter)) == null ? void 0 : _b2.accessorKey);
3338
+ }
3339
+ );
3340
+ (_a3 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a3.setFilterValue(activeFilter || "");
3341
+ });
3342
+ }, [selectedFilters, props.filters]);
3326
3343
  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(
3327
3344
  Input,
3328
3345
  {
@@ -3406,7 +3423,33 @@ var DataTable = ({
3406
3423
  ) : column.id
3407
3424
  );
3408
3425
  })
3409
- ))), props.isLoading ? /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React24.createElement(
3426
+ ))), enableFiltering && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (_e = props.filters) == null ? void 0 : _e.map((filter) => {
3427
+ return /* @__PURE__ */ React24.createElement(
3428
+ Button,
3429
+ {
3430
+ variant: "outline",
3431
+ className: selectedFilters.includes(filter.value) ? "!hawa-bg-primary !hawa-text-primary-foreground" : "",
3432
+ size: "xs",
3433
+ onClick: () => {
3434
+ var _a2, _b2;
3435
+ let newSelectedFilters = selectedFilters.filter(
3436
+ (item) => {
3437
+ var _a3, _b3;
3438
+ return ((_b3 = (_a3 = props.filters) == null ? void 0 : _a3.find((f) => f.value === item)) == null ? void 0 : _b3.accessorKey) !== filter.accessorKey;
3439
+ }
3440
+ );
3441
+ if (!selectedFilters.includes(filter.value)) {
3442
+ newSelectedFilters.push(filter.value);
3443
+ (_a2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a2.setFilterValue(filter.value);
3444
+ } else {
3445
+ (_b2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _b2.setFilterValue("");
3446
+ }
3447
+ setSelectedFilters(newSelectedFilters);
3448
+ }
3449
+ },
3450
+ filter.label
3451
+ );
3452
+ })), props.isLoading ? /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React24.createElement(
3410
3453
  "div",
3411
3454
  {
3412
3455
  className: cn(
@@ -3435,7 +3478,7 @@ var DataTable = ({
3435
3478
  header.getContext()
3436
3479
  )
3437
3480
  );
3438
- })))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_e = table.getRowModel().rows) == null ? void 0 : _e.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
3481
+ })))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_f = table.getRowModel().rows) == null ? void 0 : _f.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
3439
3482
  TableRow,
3440
3483
  {
3441
3484
  key: row.id,
@@ -3467,7 +3510,7 @@ var DataTable = ({
3467
3510
  colSpan: columns.length,
3468
3511
  className: "hawa-h-24 hawa-text-center"
3469
3512
  },
3470
- (_f = props.texts) == null ? void 0 : _f.noData
3513
+ (_g = props.texts) == null ? void 0 : _g.noData
3471
3514
  ))))),
3472
3515
  /* @__PURE__ */ React24.createElement(
3473
3516
  "div",
@@ -3484,7 +3527,7 @@ var DataTable = ({
3484
3527
  className: "hawa-text-muted-foreground hawa-text-sm",
3485
3528
  dir: props.direction
3486
3529
  },
3487
- /* @__PURE__ */ React24.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
3530
+ /* @__PURE__ */ React24.createElement("span", null, (_h = props.texts) == null ? void 0 : _h.total),
3488
3531
  " ",
3489
3532
  /* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
3490
3533
  ), 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(
@@ -3495,11 +3538,11 @@ var DataTable = ({
3495
3538
  },
3496
3539
  table.getFilteredSelectedRowModel().rows.length,
3497
3540
  " ",
3498
- (_h = props.texts) == null ? void 0 : _h.of,
3541
+ (_i = props.texts) == null ? void 0 : _i.of,
3499
3542
  " ",
3500
3543
  table.getFilteredRowModel().rows.length,
3501
3544
  " ",
3502
- (_i = props.texts) == null ? void 0 : _i.selectedRows
3545
+ (_j = props.texts) == null ? void 0 : _j.selectedRows
3503
3546
  )), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
3504
3547
  DropdownMenu,
3505
3548
  {
@@ -3512,10 +3555,10 @@ var DataTable = ({
3512
3555
  table.getFilteredSelectedRowModel().rows
3513
3556
  )
3514
3557
  })),
3515
- trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_j = props.texts) == null ? void 0 : _j.bulkAction) || "Bulk Action")
3558
+ trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_k = props.texts) == null ? void 0 : _k.bulkAction) || "Bulk Action")
3516
3559
  }
3517
3560
  ))) : null,
3518
- /* @__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(
3561
+ /* @__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" }, (_l = props.texts) == null ? void 0 : _l.goTo), /* @__PURE__ */ React24.createElement(
3519
3562
  "input",
3520
3563
  {
3521
3564
  max: table.getPageCount(),
@@ -3552,11 +3595,11 @@ var DataTable = ({
3552
3595
  size: "icon",
3553
3596
  className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
3554
3597
  },
3555
- `${table.getState().pagination.pageSize} / ${(_l = props.texts) == null ? void 0 : _l.page}`
3598
+ `${table.getState().pagination.pageSize} / ${(_m = props.texts) == null ? void 0 : _m.page}`
3556
3599
  ),
3557
3600
  onItemSelect: (e) => table.setPageSize(Number(e))
3558
3601
  }
3559
- ), 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(
3602
+ ), 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, (_n = props.texts) == null ? void 0 : _n.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, (_o = props.texts) == null ? void 0 : _o.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(
3560
3603
  Button,
3561
3604
  {
3562
3605
  "aria-label": "Next Table Page",
@@ -3705,15 +3748,12 @@ var BackToTop = ({ ...props }) => {
3705
3748
  }
3706
3749
  };
3707
3750
  (0, import_react12.useEffect)(() => {
3708
- if (!props.anchor.current)
3709
- return;
3751
+ if (!props.anchor.current) return;
3710
3752
  props.anchor.current.addEventListener("scroll", onScroll);
3711
3753
  let interval = setInterval(() => {
3712
- if (!props.anchor.current)
3713
- return;
3754
+ if (!props.anchor.current) return;
3714
3755
  let newRect = props.anchor.current.getBoundingClientRect();
3715
- if (_rect.current == null)
3716
- return setRect(newRect);
3756
+ if (_rect.current == null) return setRect(newRect);
3717
3757
  if (!(_rect.current.top == newRect.top && _rect.current.left == newRect.left && _rect.current.width == newRect.width && _rect.current.height == newRect.height)) {
3718
3758
  setRect(newRect);
3719
3759
  }
@@ -3726,8 +3766,7 @@ var BackToTop = ({ ...props }) => {
3726
3766
  }, [onScroll, props.anchor]);
3727
3767
  const getStyles = () => {
3728
3768
  var _a;
3729
- if (!props.anchor.current || !self.current)
3730
- return {};
3769
+ if (!props.anchor.current || !self.current) return {};
3731
3770
  let corner = props.corner || "bottom-right";
3732
3771
  let [vertical, horizontal] = corner.split("-");
3733
3772
  let anchorRect = props.anchor.current.getBoundingClientRect();
@@ -3948,8 +3987,7 @@ var Radio = (0, import_react13.forwardRef)(
3948
3987
  {
3949
3988
  "aria-current": "page",
3950
3989
  onClick: () => {
3951
- if (props.disabled || opt.disabled)
3952
- return;
3990
+ if (props.disabled || opt.disabled) return;
3953
3991
  handleChange(opt);
3954
3992
  },
3955
3993
  className: cn(
@@ -3968,8 +4006,7 @@ var Radio = (0, import_react13.forwardRef)(
3968
4006
  key: o,
3969
4007
  "aria-current": "page",
3970
4008
  onClick: () => {
3971
- if (props.disabled || opt.disabled)
3972
- return;
4009
+ if (props.disabled || opt.disabled) return;
3973
4010
  handleChange(opt);
3974
4011
  },
3975
4012
  className: cn(
@@ -4256,8 +4293,7 @@ var FullCommand = ({
4256
4293
  {
4257
4294
  key: subIndex,
4258
4295
  onSelect: () => {
4259
- if (onActionClick)
4260
- onActionClick();
4296
+ if (onActionClick) onActionClick();
4261
4297
  subItem.action();
4262
4298
  }
4263
4299
  },
@@ -4907,8 +4943,7 @@ var ScrollArea = React41.forwardRef(({ className, children, orientation = "verti
4907
4943
  document.addEventListener("mouseup", onMouseUp);
4908
4944
  };
4909
4945
  const onMouseMove = (e) => {
4910
- if (!isDragging.current || !scrollAreaRef.current)
4911
- return;
4946
+ if (!isDragging.current || !scrollAreaRef.current) return;
4912
4947
  const dx = e.clientX - startPos.current.x;
4913
4948
  const dy = e.clientY - startPos.current.y;
4914
4949
  if (orientation === "vertical") {
@@ -7922,16 +7957,11 @@ var PasswordInput = ({
7922
7957
  (0, import_react49.useEffect)(() => {
7923
7958
  const calculateStrength = () => {
7924
7959
  let strengthScore = 0;
7925
- if (lengthCriteriaMet)
7926
- strengthScore += 1;
7927
- if (numberCriteriaMet)
7928
- strengthScore += 1;
7929
- if (specialCharCriteriaMet)
7930
- strengthScore += 1;
7931
- if (lowercaseCriteriaMet)
7932
- strengthScore += 1;
7933
- if (uppercaseCriteriaMet)
7934
- strengthScore += 1;
7960
+ if (lengthCriteriaMet) strengthScore += 1;
7961
+ if (numberCriteriaMet) strengthScore += 1;
7962
+ if (specialCharCriteriaMet) strengthScore += 1;
7963
+ if (lowercaseCriteriaMet) strengthScore += 1;
7964
+ if (uppercaseCriteriaMet) strengthScore += 1;
7935
7965
  return strengthScore;
7936
7966
  };
7937
7967
  const currentStrengthScore = calculateStrength();
@@ -8133,8 +8163,7 @@ var ScrollIndicator = ({
8133
8163
  }
8134
8164
  };
8135
8165
  (0, import_react50.useEffect)(() => {
8136
- if (!anchor.current)
8137
- return;
8166
+ if (!anchor.current) return;
8138
8167
  anchor.current.addEventListener("scroll", onScroll);
8139
8168
  return () => {
8140
8169
  var _a;
@@ -8352,8 +8381,7 @@ var Carousel = ({
8352
8381
  }, autoplayInterval);
8353
8382
  }
8354
8383
  return () => {
8355
- if (autoplayTimer)
8356
- clearInterval(autoplayTimer);
8384
+ if (autoplayTimer) clearInterval(autoplayTimer);
8357
8385
  };
8358
8386
  }, [emblaApi, autoplay, autoplayInterval]);
8359
8387
  const length = import_react52.default.Children.count(items);
@@ -26,10 +26,10 @@ import {
26
26
  TabsList,
27
27
  TabsTrigger,
28
28
  Textarea
29
- } from "../chunk-7R25FOBM.mjs";
29
+ } from "../chunk-Q3IS4SMU.mjs";
30
30
  import {
31
31
  useClipboard
32
- } from "../chunk-XCW5YNMS.mjs";
32
+ } from "../chunk-QUN7JBW3.mjs";
33
33
  import {
34
34
  Sheet,
35
35
  SheetClose,
@@ -41,7 +41,7 @@ import {
41
41
  SheetPortal,
42
42
  SheetTitle,
43
43
  SheetTrigger
44
- } from "../chunk-2GEXJLRC.mjs";
44
+ } from "../chunk-OXZBK6KQ.mjs";
45
45
  import {
46
46
  Button,
47
47
  Card,
@@ -81,10 +81,10 @@ import {
81
81
  buttonVariants,
82
82
  calculateLuminance,
83
83
  cn
84
- } from "../chunk-FP6763YO.mjs";
84
+ } from "../chunk-DBOKFWWD.mjs";
85
85
  import {
86
86
  __require
87
- } from "../chunk-SYGWSBJL.mjs";
87
+ } from "../chunk-2LUXOXAL.mjs";
88
88
 
89
89
  // elements/accordion/Accordion.tsx
90
90
  import * as React3 from "react";
@@ -940,11 +940,12 @@ var DataTable = ({
940
940
  translateFn,
941
941
  enableHideColumns,
942
942
  enableSelection,
943
+ enableFiltering,
943
944
  enableSearch,
944
945
  enableGoTo,
945
946
  ...props
946
947
  }) => {
947
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
948
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
948
949
  const [sorting, setSorting] = React10.useState(
949
950
  props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
950
951
  );
@@ -958,6 +959,7 @@ var DataTable = ({
958
959
  return savedVisibility ? JSON.parse(savedVisibility) : {};
959
960
  });
960
961
  const [rowSelection, setRowSelection] = React10.useState({});
962
+ const [selectedFilters, setSelectedFilters] = React10.useState([]);
961
963
  let mainColumns = enableSelection ? [
962
964
  {
963
965
  id: "select",
@@ -1037,6 +1039,19 @@ var DataTable = ({
1037
1039
  return newColumnVisibility;
1038
1040
  });
1039
1041
  }, [columns]);
1042
+ React10.useEffect(() => {
1043
+ var _a2;
1044
+ (_a2 = props.filters) == null ? void 0 : _a2.forEach((filter) => {
1045
+ var _a3;
1046
+ const activeFilter = selectedFilters.find(
1047
+ (selectedFilter) => {
1048
+ var _a4, _b2;
1049
+ return filter.accessorKey === ((_b2 = (_a4 = props.filters) == null ? void 0 : _a4.find((f) => f.value === selectedFilter)) == null ? void 0 : _b2.accessorKey);
1050
+ }
1051
+ );
1052
+ (_a3 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a3.setFilterValue(activeFilter || "");
1053
+ });
1054
+ }, [selectedFilters, props.filters]);
1040
1055
  return /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, (enableSearch || enableHideColumns) && /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-4" }, enableSearch && /* @__PURE__ */ React10.createElement(
1041
1056
  Input,
1042
1057
  {
@@ -1120,7 +1135,33 @@ var DataTable = ({
1120
1135
  ) : column.id
1121
1136
  );
1122
1137
  })
1123
- ))), props.isLoading ? /* @__PURE__ */ React10.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React10.createElement(
1138
+ ))), enableFiltering && /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (_e = props.filters) == null ? void 0 : _e.map((filter) => {
1139
+ return /* @__PURE__ */ React10.createElement(
1140
+ Button,
1141
+ {
1142
+ variant: "outline",
1143
+ className: selectedFilters.includes(filter.value) ? "!hawa-bg-primary !hawa-text-primary-foreground" : "",
1144
+ size: "xs",
1145
+ onClick: () => {
1146
+ var _a2, _b2;
1147
+ let newSelectedFilters = selectedFilters.filter(
1148
+ (item) => {
1149
+ var _a3, _b3;
1150
+ return ((_b3 = (_a3 = props.filters) == null ? void 0 : _a3.find((f) => f.value === item)) == null ? void 0 : _b3.accessorKey) !== filter.accessorKey;
1151
+ }
1152
+ );
1153
+ if (!selectedFilters.includes(filter.value)) {
1154
+ newSelectedFilters.push(filter.value);
1155
+ (_a2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a2.setFilterValue(filter.value);
1156
+ } else {
1157
+ (_b2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _b2.setFilterValue("");
1158
+ }
1159
+ setSelectedFilters(newSelectedFilters);
1160
+ }
1161
+ },
1162
+ filter.label
1163
+ );
1164
+ })), props.isLoading ? /* @__PURE__ */ React10.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React10.createElement(
1124
1165
  "div",
1125
1166
  {
1126
1167
  className: cn(
@@ -1149,7 +1190,7 @@ var DataTable = ({
1149
1190
  header.getContext()
1150
1191
  )
1151
1192
  );
1152
- })))), /* @__PURE__ */ React10.createElement(TableBody, null, ((_e = table.getRowModel().rows) == null ? void 0 : _e.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React10.createElement(
1193
+ })))), /* @__PURE__ */ React10.createElement(TableBody, null, ((_f = table.getRowModel().rows) == null ? void 0 : _f.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React10.createElement(
1153
1194
  TableRow,
1154
1195
  {
1155
1196
  key: row.id,
@@ -1181,7 +1222,7 @@ var DataTable = ({
1181
1222
  colSpan: columns.length,
1182
1223
  className: "hawa-h-24 hawa-text-center"
1183
1224
  },
1184
- (_f = props.texts) == null ? void 0 : _f.noData
1225
+ (_g = props.texts) == null ? void 0 : _g.noData
1185
1226
  ))))),
1186
1227
  /* @__PURE__ */ React10.createElement(
1187
1228
  "div",
@@ -1198,7 +1239,7 @@ var DataTable = ({
1198
1239
  className: "hawa-text-muted-foreground hawa-text-sm",
1199
1240
  dir: props.direction
1200
1241
  },
1201
- /* @__PURE__ */ React10.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
1242
+ /* @__PURE__ */ React10.createElement("span", null, (_h = props.texts) == null ? void 0 : _h.total),
1202
1243
  " ",
1203
1244
  /* @__PURE__ */ React10.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
1204
1245
  ), props.showCount && table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React10.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__ */ React10.createElement(
@@ -1209,11 +1250,11 @@ var DataTable = ({
1209
1250
  },
1210
1251
  table.getFilteredSelectedRowModel().rows.length,
1211
1252
  " ",
1212
- (_h = props.texts) == null ? void 0 : _h.of,
1253
+ (_i = props.texts) == null ? void 0 : _i.of,
1213
1254
  " ",
1214
1255
  table.getFilteredRowModel().rows.length,
1215
1256
  " ",
1216
- (_i = props.texts) == null ? void 0 : _i.selectedRows
1257
+ (_j = props.texts) == null ? void 0 : _j.selectedRows
1217
1258
  )), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React10.createElement("div", { className: "" }, /* @__PURE__ */ React10.createElement(
1218
1259
  DropdownMenu,
1219
1260
  {
@@ -1226,10 +1267,10 @@ var DataTable = ({
1226
1267
  table.getFilteredSelectedRowModel().rows
1227
1268
  )
1228
1269
  })),
1229
- trigger: /* @__PURE__ */ React10.createElement(Button, { size: "xs" }, ((_j = props.texts) == null ? void 0 : _j.bulkAction) || "Bulk Action")
1270
+ trigger: /* @__PURE__ */ React10.createElement(Button, { size: "xs" }, ((_k = props.texts) == null ? void 0 : _k.bulkAction) || "Bulk Action")
1230
1271
  }
1231
1272
  ))) : null,
1232
- /* @__PURE__ */ React10.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__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React10.createElement("span", { className: "hawa-text-sm" }, (_k = props.texts) == null ? void 0 : _k.goTo), /* @__PURE__ */ React10.createElement(
1273
+ /* @__PURE__ */ React10.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__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React10.createElement("span", { className: "hawa-text-sm" }, (_l = props.texts) == null ? void 0 : _l.goTo), /* @__PURE__ */ React10.createElement(
1233
1274
  "input",
1234
1275
  {
1235
1276
  max: table.getPageCount(),
@@ -1266,11 +1307,11 @@ var DataTable = ({
1266
1307
  size: "icon",
1267
1308
  className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
1268
1309
  },
1269
- `${table.getState().pagination.pageSize} / ${(_l = props.texts) == null ? void 0 : _l.page}`
1310
+ `${table.getState().pagination.pageSize} / ${(_m = props.texts) == null ? void 0 : _m.page}`
1270
1311
  ),
1271
1312
  onItemSelect: (e) => table.setPageSize(Number(e))
1272
1313
  }
1273
- ), table.getPageCount() > 1 && /* @__PURE__ */ React10.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React10.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React10.createElement("div", null, (_m = props.texts) == null ? void 0 : _m.page), /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React10.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React10.createElement("span", null, (_n = props.texts) == null ? void 0 : _n.of), /* @__PURE__ */ React10.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center hawa-bg--500" }, /* @__PURE__ */ React10.createElement(
1314
+ ), table.getPageCount() > 1 && /* @__PURE__ */ React10.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React10.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React10.createElement("div", null, (_n = props.texts) == null ? void 0 : _n.page), /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React10.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React10.createElement("span", null, (_o = props.texts) == null ? void 0 : _o.of), /* @__PURE__ */ React10.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center hawa-bg--500" }, /* @__PURE__ */ React10.createElement(
1274
1315
  Button,
1275
1316
  {
1276
1317
  "aria-label": "Next Table Page",
@@ -1419,15 +1460,12 @@ var BackToTop = ({ ...props }) => {
1419
1460
  }
1420
1461
  };
1421
1462
  useEffect3(() => {
1422
- if (!props.anchor.current)
1423
- return;
1463
+ if (!props.anchor.current) return;
1424
1464
  props.anchor.current.addEventListener("scroll", onScroll);
1425
1465
  let interval = setInterval(() => {
1426
- if (!props.anchor.current)
1427
- return;
1466
+ if (!props.anchor.current) return;
1428
1467
  let newRect = props.anchor.current.getBoundingClientRect();
1429
- if (_rect.current == null)
1430
- return setRect(newRect);
1468
+ if (_rect.current == null) return setRect(newRect);
1431
1469
  if (!(_rect.current.top == newRect.top && _rect.current.left == newRect.left && _rect.current.width == newRect.width && _rect.current.height == newRect.height)) {
1432
1470
  setRect(newRect);
1433
1471
  }
@@ -1440,8 +1478,7 @@ var BackToTop = ({ ...props }) => {
1440
1478
  }, [onScroll, props.anchor]);
1441
1479
  const getStyles = () => {
1442
1480
  var _a;
1443
- if (!props.anchor.current || !self.current)
1444
- return {};
1481
+ if (!props.anchor.current || !self.current) return {};
1445
1482
  let corner = props.corner || "bottom-right";
1446
1483
  let [vertical, horizontal] = corner.split("-");
1447
1484
  let anchorRect = props.anchor.current.getBoundingClientRect();
@@ -1632,8 +1669,7 @@ var FullCommand = ({
1632
1669
  {
1633
1670
  key: subIndex,
1634
1671
  onSelect: () => {
1635
- if (onActionClick)
1636
- onActionClick();
1672
+ if (onActionClick) onActionClick();
1637
1673
  subItem.action();
1638
1674
  }
1639
1675
  },
@@ -2655,16 +2691,11 @@ var PasswordInput = ({
2655
2691
  useEffect8(() => {
2656
2692
  const calculateStrength = () => {
2657
2693
  let strengthScore = 0;
2658
- if (lengthCriteriaMet)
2659
- strengthScore += 1;
2660
- if (numberCriteriaMet)
2661
- strengthScore += 1;
2662
- if (specialCharCriteriaMet)
2663
- strengthScore += 1;
2664
- if (lowercaseCriteriaMet)
2665
- strengthScore += 1;
2666
- if (uppercaseCriteriaMet)
2667
- strengthScore += 1;
2694
+ if (lengthCriteriaMet) strengthScore += 1;
2695
+ if (numberCriteriaMet) strengthScore += 1;
2696
+ if (specialCharCriteriaMet) strengthScore += 1;
2697
+ if (lowercaseCriteriaMet) strengthScore += 1;
2698
+ if (uppercaseCriteriaMet) strengthScore += 1;
2668
2699
  return strengthScore;
2669
2700
  };
2670
2701
  const currentStrengthScore = calculateStrength();
@@ -2852,8 +2883,7 @@ var ScrollIndicator = ({
2852
2883
  }
2853
2884
  };
2854
2885
  useEffect9(() => {
2855
- if (!anchor.current)
2856
- return;
2886
+ if (!anchor.current) return;
2857
2887
  anchor.current.addEventListener("scroll", onScroll);
2858
2888
  return () => {
2859
2889
  var _a;
@@ -3071,8 +3101,7 @@ var Carousel = ({
3071
3101
  }, autoplayInterval);
3072
3102
  }
3073
3103
  return () => {
3074
- if (autoplayTimer)
3075
- clearInterval(autoplayTimer);
3104
+ if (autoplayTimer) clearInterval(autoplayTimer);
3076
3105
  };
3077
3106
  }, [emblaApi, autoplay, autoplayInterval]);
3078
3107
  const length = React28.Children.count(items);
@@ -116,8 +116,7 @@ var Glow = ({
116
116
  });
117
117
  });
118
118
  const capture = (_a = element.current) == null ? void 0 : _a.closest(".glow-capture");
119
- if (capture)
120
- observer.observe(capture);
119
+ if (capture) observer.observe(capture);
121
120
  return () => observer.disconnect();
122
121
  }, []);
123
122
  return /* @__PURE__ */ import_react.default.createElement("div", { ref: element, className: "hawa-glow", style: { display: "grid" } }, /* @__PURE__ */ import_react.default.createElement(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/glow/index.ts","../../elements/glow/Glow.tsx"],"sourcesContent":["export * from \"./Glow\";\n","import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px`,\n } as CSSProperties\n }\n {...rest}\n />\n );\n};\n\nconst mask = `\nradial-gradient(var(--glow-size) var(--glow-size) at calc(var(--glow-x, -99999px) - var(--glow-left, 0px))\ncalc(var(--glow-y, -99999px) - var(--glow-top, 0px)), #000000 1%, transparent 50%)\n`;\n\nexport const Glow = ({\n className = \"\",\n style = {},\n\n color = \"#f50057\",\n debug = false,\n ...rest\n}) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n });\n\n const capture = element.current?.closest(\".glow-capture\");\n if (capture) observer.observe(capture);\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={element} className=\"hawa-glow\" style={{ display: \"grid\" }}>\n <div\n className={className}\n style={{\n ...style,\n gridArea: \"1/1/1/1\",\n }}\n {...rest}\n >\n {rest.children}\n </div>\n <div\n className={`glow-mask ${className}`}\n // @ts-ignore\n glow=\"true\"\n style={\n {\n ...style,\n \"--glow-color\": color,\n gridArea: \"1/1/1/1\",\n pointerEvents: \"none\",\n mask: debug ? undefined : mask,\n WebkitMask: debug ? undefined : mask,\n } as CSSProperties\n }\n {...rest}\n >\n {rest.children}\n </div>\n </div>\n );\n};\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AA,EACR,GACA,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,aAAa,SAAS;AAAA,MAEjC,MAAK;AAAA,MACL,OACE;AAAA,QACE,GAAG;AAAA,QACH,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,eAAe;AAAA,QACf,MAAM,QAAQ,SAAY;AAAA,QAC1B,YAAY,QAAQ,SAAY;AAAA,MAClC;AAAA,MAED,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,CACF;AAEJ;","names":["_a","_b","React"]}
1
+ {"version":3,"sources":["../../elements/glow/index.ts","../../elements/glow/Glow.tsx"],"sourcesContent":["export * from \"./Glow\";\n","import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px`,\n } as CSSProperties\n }\n {...rest}\n />\n );\n};\n\nconst mask = `\nradial-gradient(var(--glow-size) var(--glow-size) at calc(var(--glow-x, -99999px) - var(--glow-left, 0px))\ncalc(var(--glow-y, -99999px) - var(--glow-top, 0px)), #000000 1%, transparent 50%)\n`;\n\nexport const Glow = ({\n className = \"\",\n style = {},\n\n color = \"#f50057\",\n debug = false,\n ...rest\n}) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n });\n\n const capture = element.current?.closest(\".glow-capture\");\n if (capture) observer.observe(capture);\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={element} className=\"hawa-glow\" style={{ display: \"grid\" }}>\n <div\n className={className}\n style={{\n ...style,\n gridArea: \"1/1/1/1\",\n }}\n {...rest}\n >\n {rest.children}\n </div>\n <div\n className={`glow-mask ${className}`}\n // @ts-ignore\n glow=\"true\"\n style={\n {\n ...style,\n \"--glow-color\": color,\n gridArea: \"1/1/1/1\",\n pointerEvents: \"none\",\n mask: debug ? undefined : mask,\n WebkitMask: debug ? undefined : mask,\n } as CSSProperties\n }\n {...rest}\n >\n {rest.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAwD;AAEjD,IAAM,cAAc,CAAC,EAAE,YAAY,IAAI,OAAO,KAAK,GAAG,KAAK,MAAM;AACtE,QAAM,cAAU,qBAAuB,IAAI;AAE3C,8BAAU,MAAM;AALlB;AAMI,UAAM,OAAO,CAAC,MAAoB;AAChC,UAAI,EAAE,gBAAgB,SAAS;AAC7B,8BAAsB,MAAM;AARpC,cAAAA,KAAAC;AAUU,WAAAD,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAE1D,WAAAC,MAA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AAG,aAAQ,YAAR,mBAAiB,UAAU;AAAA;AAAA,EAElC,CAAC;AAED,8BAAU,MAAM;AAvElB;AAwEI,UAAM,WAAW,IAAI,eAAe,MAAM;AACxC,4BAAsB,MAAM;AAzElC,YAAAF,KAAA;AA0EQ,sBAAQ,YAAR,mBAAiB,MAAM;AAAA,UACrB;AAAA,UACA,IAAGA,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,SAAS;AAAA;AAE/B,sBAAQ,YAAR,mBAAiB,MAAM;AAAA,UACrB;AAAA,UACA,IAAG,aAAQ,YAAR,mBAAiB,UAAU;AAAA;AAAA,MAElC,CAAC;AAAA,IACH,CAAC;AAED,UAAM,WAAU,aAAQ,YAAR,mBAAiB,QAAQ;AACzC,QAAI,QAAS,UAAS,QAAQ,OAAO;AAErC,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,CAAC;AAEL,SACE,6BAAAE,QAAA,cAAC,SAAI,KAAK,SAAS,WAAU,aAAY,OAAO,EAAE,SAAS,OAAO,KAChE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,GAAG;AAAA,QACH,UAAU;AAAA,MACZ;AAAA,MACC,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,GACA,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,aAAa,SAAS;AAAA,MAEjC,MAAK;AAAA,MACL,OACE;AAAA,QACE,GAAG;AAAA,QACH,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,eAAe;AAAA,QACf,MAAM,QAAQ,SAAY;AAAA,QAC1B,YAAY,QAAQ,SAAY;AAAA,MAClC;AAAA,MAED,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,CACF;AAEJ;","names":["_a","_b","React"]}
@@ -80,8 +80,7 @@ var Glow = ({
80
80
  });
81
81
  });
82
82
  const capture = (_a = element.current) == null ? void 0 : _a.closest(".glow-capture");
83
- if (capture)
84
- observer.observe(capture);
83
+ if (capture) observer.observe(capture);
85
84
  return () => observer.disconnect();
86
85
  }, []);
87
86
  return /* @__PURE__ */ React.createElement("div", { ref: element, className: "hawa-glow", style: { display: "grid" } }, /* @__PURE__ */ React.createElement(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/glow/Glow.tsx"],"sourcesContent":["import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px`,\n } as CSSProperties\n }\n {...rest}\n />\n );\n};\n\nconst mask = `\nradial-gradient(var(--glow-size) var(--glow-size) at calc(var(--glow-x, -99999px) - var(--glow-left, 0px))\ncalc(var(--glow-y, -99999px) - var(--glow-top, 0px)), #000000 1%, transparent 50%)\n`;\n\nexport const Glow = ({\n className = \"\",\n style = {},\n\n color = \"#f50057\",\n debug = false,\n ...rest\n}) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n });\n\n const capture = element.current?.closest(\".glow-capture\");\n if (capture) observer.observe(capture);\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={element} className=\"hawa-glow\" style={{ display: \"grid\" }}>\n <div\n className={className}\n style={{\n ...style,\n gridArea: \"1/1/1/1\",\n }}\n {...rest}\n >\n {rest.children}\n </div>\n <div\n className={`glow-mask ${className}`}\n // @ts-ignore\n glow=\"true\"\n style={\n {\n ...style,\n \"--glow-color\": color,\n gridArea: \"1/1/1/1\",\n pointerEvents: \"none\",\n mask: debug ? undefined : mask,\n WebkitMask: debug ? undefined : mask,\n } as CSSProperties\n }\n {...rest}\n >\n {rest.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;AAAA,OAAO,SAAwB,WAAW,cAAc;AAEjD,IAAM,cAAc,CAAC,EAAE,YAAY,IAAI,OAAO,KAAK,GAAG,KAAK,MAAM;AACtE,QAAM,UAAU,OAAuB,IAAI;AAE3C,YAAU,MAAM;AALlB;AAMI,UAAM,OAAO,CAAC,MAAoB;AAChC,UAAI,EAAE,gBAAgB,SAAS;AAC7B,8BAAsB,MAAM;AARpC,cAAAA,KAAAC;AAUU,WAAAD,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAE1D,WAAAC,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,YAAY,YAAY,GAAG,EAAE,MAAM;AAAA,QAC5D,CAAC;AAAA,MACH;AAAA,IACF;AAEA,UAAM,QAAQ,MAAM;AAjBxB,UAAAD,KAAAC;AAkBM,OAAAD,MAAA,QAAQ,YAAR,gBAAAA,IAAiB,MAAM,eAAe;AACtC,OAAAC,MAAA,QAAQ,YAAR,gBAAA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AAE/B,sBAAQ,YAAR,mBAAiB,MAAM;AAAA,UACrB;AAAA,UACA,IAAG,aAAQ,YAAR,mBAAiB,UAAU;AAAA;AAAA,MAElC,CAAC;AAAA,IACH,CAAC;AAED,UAAM,WAAU,aAAQ,YAAR,mBAAiB,QAAQ;AACzC,QAAI;AAAS,eAAS,QAAQ,OAAO;AAErC,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,CAAC;AAEL,SACE,oCAAC,SAAI,KAAK,SAAS,WAAU,aAAY,OAAO,EAAE,SAAS,OAAO,KAChE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,QACL,GAAG;AAAA,QACH,UAAU;AAAA,MACZ;AAAA,MACC,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,GACA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,aAAa,SAAS;AAAA,MAEjC,MAAK;AAAA,MACL,OACE;AAAA,QACE,GAAG;AAAA,QACH,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,eAAe;AAAA,QACf,MAAM,QAAQ,SAAY;AAAA,QAC1B,YAAY,QAAQ,SAAY;AAAA,MAClC;AAAA,MAED,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,CACF;AAEJ;","names":["_a","_b"]}
1
+ {"version":3,"sources":["../../elements/glow/Glow.tsx"],"sourcesContent":["import React, { CSSProperties, useEffect, useRef } from \"react\";\n\nexport const GlowCapture = ({ className = \"\", size = 400, ...rest }) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n if (e.pointerType === \"mouse\") {\n requestAnimationFrame(() => {\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-x\", `${e.layerX}px`);\n // @ts-ignore\n element.current?.style.setProperty(\"--glow-y\", `${e.layerY}px`);\n });\n }\n };\n\n const leave = () => {\n element.current?.style.removeProperty(\"--glow-x\");\n element.current?.style.removeProperty(\"--glow-y\");\n };\n\n element.current?.addEventListener(\"pointermove\", move, { passive: true });\n element.current?.addEventListener(\"pointerleave\", leave, { passive: true });\n return () => {\n element.current?.removeEventListener(\"pointermove\", move);\n element.current?.removeEventListener(\"pointerleave\", leave);\n };\n }, []);\n\n return (\n <div\n ref={element}\n className={`hawa-glow-capture ${className}`}\n style={\n {\n position: \"relative\",\n \"--glow-size\": `${size}px`,\n } as CSSProperties\n }\n {...rest}\n />\n );\n};\n\nconst mask = `\nradial-gradient(var(--glow-size) var(--glow-size) at calc(var(--glow-x, -99999px) - var(--glow-left, 0px))\ncalc(var(--glow-y, -99999px) - var(--glow-top, 0px)), #000000 1%, transparent 50%)\n`;\n\nexport const Glow = ({\n className = \"\",\n style = {},\n\n color = \"#f50057\",\n debug = false,\n ...rest\n}) => {\n const element = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n element.current?.style.setProperty(\n \"--glow-top\",\n `${element.current?.offsetTop}px`,\n );\n element.current?.style.setProperty(\n \"--glow-left\",\n `${element.current?.offsetLeft}px`,\n );\n });\n });\n\n const capture = element.current?.closest(\".glow-capture\");\n if (capture) observer.observe(capture);\n\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={element} className=\"hawa-glow\" style={{ display: \"grid\" }}>\n <div\n className={className}\n style={{\n ...style,\n gridArea: \"1/1/1/1\",\n }}\n {...rest}\n >\n {rest.children}\n </div>\n <div\n className={`glow-mask ${className}`}\n // @ts-ignore\n glow=\"true\"\n style={\n {\n ...style,\n \"--glow-color\": color,\n gridArea: \"1/1/1/1\",\n pointerEvents: \"none\",\n mask: debug ? undefined : mask,\n WebkitMask: debug ? undefined : mask,\n } as CSSProperties\n }\n {...rest}\n >\n {rest.children}\n </div>\n </div>\n );\n};\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E,GAAG;AAAA,QACH,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,eAAe;AAAA,QACf,MAAM,QAAQ,SAAY;AAAA,QAC1B,YAAY,QAAQ,SAAY;AAAA,MAClC;AAAA,MAED,GAAG;AAAA;AAAA,IAEH,KAAK;AAAA,EACR,CACF;AAEJ;","names":["_a","_b"]}
@@ -143,8 +143,7 @@ function toast({ ...props }) {
143
143
  id,
144
144
  open: true,
145
145
  onOpenChange: (open) => {
146
- if (!open)
147
- dismiss();
146
+ if (!open) dismiss();
148
147
  }
149
148
  }
150
149
  });
@@ -18,11 +18,11 @@ import {
18
18
  useViewportSize,
19
19
  useWindowEvent,
20
20
  useWindowSize
21
- } from "../chunk-XCW5YNMS.mjs";
21
+ } from "../chunk-QUN7JBW3.mjs";
22
22
  import {
23
23
  useBreakpoint,
24
24
  useClickOutside
25
- } from "../chunk-SYGWSBJL.mjs";
25
+ } from "../chunk-2LUXOXAL.mjs";
26
26
  export {
27
27
  getHotkeyHandler,
28
28
  getHotkeyMatcher,