@sikka/hawa 0.25.0-next → 0.25.2-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 (85) hide show
  1. package/dist/blocks/auth/index.js +2 -1
  2. package/dist/blocks/auth/index.mjs +2 -1
  3. package/dist/blocks/index.js +2 -1
  4. package/dist/blocks/index.mjs +2 -2
  5. package/dist/carousel/index.d.mts +5 -5
  6. package/dist/carousel/index.d.ts +5 -5
  7. package/dist/carousel/index.js +11 -10
  8. package/dist/carousel/index.mjs +11 -10
  9. package/dist/chunk-KNHT2UBG.mjs +150 -0
  10. package/dist/{chunk-XE3FLWLT.mjs → chunk-MJMQDUCC.mjs} +1 -0
  11. package/dist/commonTypes-2IGtJ5cq.d.mts +3 -0
  12. package/dist/commonTypes-2IGtJ5cq.d.ts +3 -0
  13. package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
  14. package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
  15. package/dist/commonTypes-3k5cNB1s.d.mts +4 -0
  16. package/dist/commonTypes-3k5cNB1s.d.ts +4 -0
  17. package/dist/{commonTypes-3J1E3b61.d.mts → commonTypes-f_LVO3Sm.d.mts} +1 -2
  18. package/dist/{commonTypes-3J1E3b61.d.ts → commonTypes-f_LVO3Sm.d.ts} +1 -2
  19. package/dist/elements/index.d.mts +5 -5
  20. package/dist/elements/index.d.ts +5 -5
  21. package/dist/elements/index.js +12 -10
  22. package/dist/elements/index.mjs +12 -11
  23. package/dist/glow/index.d.mts +16 -0
  24. package/dist/glow/index.d.ts +16 -0
  25. package/dist/glow/index.js +155 -0
  26. package/dist/glow/index.mjs +117 -0
  27. package/dist/index.css +212 -206
  28. package/dist/index.d.mts +5 -5
  29. package/dist/index.d.ts +5 -5
  30. package/dist/index.js +13 -11
  31. package/dist/index.mjs +13 -11
  32. package/dist/input/index.d.mts +9 -2
  33. package/dist/input/index.d.ts +9 -2
  34. package/dist/input/index.mjs +1 -1
  35. package/dist/interfaceSettings/index.mjs +1 -1
  36. package/dist/label/index.d.mts +2 -1
  37. package/dist/label/index.d.ts +2 -1
  38. package/dist/label/index.mjs +98 -2
  39. package/dist/navigationMenu/index.d.mts +1 -2
  40. package/dist/navigationMenu/index.d.ts +1 -2
  41. package/dist/pagination/index.d.mts +1 -1
  42. package/dist/pagination/index.d.ts +1 -1
  43. package/dist/passwordInput/index.mjs +148 -27
  44. package/dist/phoneInput/index.d.mts +1 -1
  45. package/dist/phoneInput/index.d.ts +1 -1
  46. package/dist/phoneInput/index.mjs +140 -19
  47. package/dist/pinInput/index.js +1 -0
  48. package/dist/pinInput/index.mjs +1 -0
  49. package/dist/popover/index.d.mts +1 -2
  50. package/dist/popover/index.d.ts +1 -2
  51. package/dist/radio/index.d.mts +4 -1
  52. package/dist/radio/index.d.ts +4 -1
  53. package/dist/scrollArea/index.d.mts +1 -1
  54. package/dist/scrollArea/index.d.ts +1 -1
  55. package/dist/separator/index.d.mts +1 -1
  56. package/dist/separator/index.d.ts +1 -1
  57. package/dist/simpleTable/index.d.mts +1 -2
  58. package/dist/simpleTable/index.d.ts +1 -2
  59. package/dist/simpleTable/index.mjs +45 -21
  60. package/dist/skeleton/index.mjs +29 -3
  61. package/dist/sortButton/index.mjs +260 -9
  62. package/dist/splitButton/index.d.mts +3 -4
  63. package/dist/splitButton/index.d.ts +3 -4
  64. package/dist/splitButton/index.mjs +259 -10
  65. package/dist/switch/index.d.mts +1 -2
  66. package/dist/switch/index.d.ts +1 -2
  67. package/dist/tabs/index.d.mts +1 -1
  68. package/dist/tabs/index.d.ts +1 -1
  69. package/dist/textarea/index.d.mts +1 -1
  70. package/dist/textarea/index.d.ts +1 -1
  71. package/dist/toast/index.d.mts +1 -1
  72. package/dist/toast/index.d.ts +1 -1
  73. package/dist/toast/index.mjs +9 -139
  74. package/dist/toaster/index.d.mts +2 -2
  75. package/dist/toaster/index.d.ts +2 -2
  76. package/dist/toaster/index.mjs +17 -146
  77. package/dist/tooltip/index.d.mts +2 -2
  78. package/dist/tooltip/index.d.ts +2 -2
  79. package/package.json +12 -12
  80. package/dist/chunk-53XBVEMK.mjs +0 -131
  81. package/dist/chunk-DGWAHQRX.mjs +0 -259
  82. package/dist/chunk-ND4BWUKH.mjs +0 -34
  83. package/dist/commonTypes-LrR8QrYP.d.mts +0 -5
  84. package/dist/commonTypes-LrR8QrYP.d.ts +0 -5
  85. package/dist/{chunk-ABS2VEET.mjs → chunk-WRZFWCOQ.mjs} +3 -3
@@ -1,13 +1,9 @@
1
- import {
2
- Label,
3
- Skeleton
4
- } from "../chunk-53XBVEMK.mjs";
5
1
  import {
6
2
  cn
7
3
  } from "../chunk-TE3BKEXL.mjs";
8
4
 
9
5
  // components/elements/phoneInput/PhoneInput.tsx
10
- import React2, { useState, useRef, useEffect } from "react";
6
+ import React5, { useState, useRef, useEffect } from "react";
11
7
 
12
8
  // components/countries.ts
13
9
  var countries = [
@@ -1702,11 +1698,136 @@ var countries = [
1702
1698
  ];
1703
1699
  var countries_default = countries;
1704
1700
 
1705
- // components/elements/select/Select.tsx
1701
+ // components/elements/label/Label.tsx
1702
+ import * as React2 from "react";
1703
+
1704
+ // components/elements/tooltip/Tooltip.tsx
1706
1705
  import React from "react";
1706
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
1707
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
1708
+ TooltipPrimitive.Content,
1709
+ {
1710
+ ref,
1711
+ sideOffset,
1712
+ className: cn(
1713
+ "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
1714
+ className
1715
+ ),
1716
+ ...props
1717
+ }
1718
+ ));
1719
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
1720
+ var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
1721
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
1722
+ var Tooltip = ({
1723
+ side,
1724
+ open,
1725
+ content,
1726
+ children,
1727
+ defaultOpen,
1728
+ onOpenChange,
1729
+ triggerProps,
1730
+ contentProps,
1731
+ providerProps,
1732
+ delayDuration = 300,
1733
+ ...props
1734
+ }) => {
1735
+ return /* @__PURE__ */ React.createElement(
1736
+ TooltipPrimitive.TooltipProvider,
1737
+ {
1738
+ delayDuration,
1739
+ ...providerProps
1740
+ },
1741
+ /* @__PURE__ */ React.createElement(
1742
+ TooltipPrimitive.Root,
1743
+ {
1744
+ open,
1745
+ defaultOpen,
1746
+ onOpenChange,
1747
+ ...props
1748
+ },
1749
+ /* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
1750
+ /* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
1751
+ )
1752
+ );
1753
+ };
1754
+
1755
+ // components/elements/label/Label.tsx
1756
+ var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
1757
+ "label",
1758
+ {
1759
+ ref,
1760
+ className: cn(
1761
+ "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
1762
+ className
1763
+ ),
1764
+ ...props
1765
+ },
1766
+ children,
1767
+ required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
1768
+ ), hint && /* @__PURE__ */ React2.createElement(
1769
+ Tooltip,
1770
+ {
1771
+ content: hint,
1772
+ side: hintSide,
1773
+ triggerProps: {
1774
+ tabIndex: -1,
1775
+ onClick: (event) => event.preventDefault()
1776
+ }
1777
+ },
1778
+ /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
1779
+ "svg",
1780
+ {
1781
+ xmlns: "http://www.w3.org/2000/svg",
1782
+ className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
1783
+ viewBox: "0 0 24 24",
1784
+ fill: "none",
1785
+ stroke: "currentColor",
1786
+ strokeWidth: "2",
1787
+ strokeLinecap: "round",
1788
+ strokeLinejoin: "round"
1789
+ },
1790
+ /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
1791
+ /* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
1792
+ /* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
1793
+ ))
1794
+ )));
1795
+ Label.displayName = "Label";
1796
+
1797
+ // components/elements/select/Select.tsx
1798
+ import React4 from "react";
1707
1799
  import ReactSelect from "react-select";
1708
1800
  import CreatableSelect from "react-select/creatable";
1709
1801
  import clsx from "clsx";
1802
+
1803
+ // components/elements/skeleton/Skeleton.tsx
1804
+ import React3 from "react";
1805
+ function Skeleton({
1806
+ className,
1807
+ content,
1808
+ animation = "pulse",
1809
+ ...props
1810
+ }) {
1811
+ const animationStyles = {
1812
+ none: "hawa-rounded hawa-bg-muted",
1813
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
1814
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
1815
+ };
1816
+ return /* @__PURE__ */ React3.createElement(
1817
+ "div",
1818
+ {
1819
+ className: cn(
1820
+ animationStyles[animation],
1821
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
1822
+ className
1823
+ ),
1824
+ ...props
1825
+ },
1826
+ content && content
1827
+ );
1828
+ }
1829
+
1830
+ // components/elements/select/Select.tsx
1710
1831
  var Select = ({
1711
1832
  labelProps,
1712
1833
  labelKey = "label",
@@ -1714,10 +1835,10 @@ var Select = ({
1714
1835
  }) => {
1715
1836
  const NoOption = () => {
1716
1837
  var _a, _b;
1717
- return /* @__PURE__ */ React.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
1838
+ return /* @__PURE__ */ React4.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
1718
1839
  };
1719
1840
  const Control = ({ children, innerProps, innerRef }) => {
1720
- return /* @__PURE__ */ React.createElement(
1841
+ return /* @__PURE__ */ React4.createElement(
1721
1842
  "div",
1722
1843
  {
1723
1844
  ref: innerRef,
@@ -1730,7 +1851,7 @@ var Select = ({
1730
1851
  );
1731
1852
  };
1732
1853
  const Option = ({ children, innerProps, innerRef }) => {
1733
- return /* @__PURE__ */ React.createElement(
1854
+ return /* @__PURE__ */ React4.createElement(
1734
1855
  "div",
1735
1856
  {
1736
1857
  ref: innerRef,
@@ -1751,7 +1872,7 @@ var Select = ({
1751
1872
  ...menuProps
1752
1873
  }) => {
1753
1874
  const menuOpen = menuProps.selectProps.menuIsOpen;
1754
- return /* @__PURE__ */ React.createElement(
1875
+ return /* @__PURE__ */ React4.createElement(
1755
1876
  "div",
1756
1877
  {
1757
1878
  className: cn(
@@ -1765,7 +1886,7 @@ var Select = ({
1765
1886
  children
1766
1887
  );
1767
1888
  };
1768
- return /* @__PURE__ */ React.createElement(
1889
+ return /* @__PURE__ */ React4.createElement(
1769
1890
  "div",
1770
1891
  {
1771
1892
  className: cn(
@@ -1773,10 +1894,10 @@ var Select = ({
1773
1894
  props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
1774
1895
  )
1775
1896
  },
1776
- props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
1777
- props.isLoading ? /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
1897
+ props.label && /* @__PURE__ */ React4.createElement(Label, { ...labelProps }, props.label),
1898
+ props.isLoading ? /* @__PURE__ */ React4.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
1778
1899
  // TODO: enable keyboard to go to the next item in the list
1779
- /* @__PURE__ */ React.createElement(
1900
+ /* @__PURE__ */ React4.createElement(
1780
1901
  ReactSelect,
1781
1902
  {
1782
1903
  noOptionsMessage: NoOption,
@@ -1813,7 +1934,7 @@ var Select = ({
1813
1934
  isSearchable: props.isSearchable
1814
1935
  }
1815
1936
  )
1816
- ) : /* @__PURE__ */ React.createElement(
1937
+ ) : /* @__PURE__ */ React4.createElement(
1817
1938
  CreatableSelect,
1818
1939
  {
1819
1940
  formatCreateLabel: (inputValue) => {
@@ -1843,7 +1964,7 @@ var Select = ({
1843
1964
  onInputChange: (newValue, action) => props.onInputChange(newValue, action)
1844
1965
  }
1845
1966
  ),
1846
- !props.hideHelperText && /* @__PURE__ */ React.createElement(
1967
+ !props.hideHelperText && /* @__PURE__ */ React4.createElement(
1847
1968
  "p",
1848
1969
  {
1849
1970
  className: cn(
@@ -1879,7 +2000,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
1879
2000
  console.log("handleChange prop was not provided in <PhoneInput/>");
1880
2001
  }
1881
2002
  };
1882
- return /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React2.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React2.createElement(
2003
+ return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React5.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React5.createElement(
1883
2004
  Select,
1884
2005
  {
1885
2006
  width: "fit",
@@ -1895,7 +2016,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
1895
2016
  value: countryCode == null ? void 0 : countryCode.label,
1896
2017
  onChange: setCountryCode
1897
2018
  }
1898
- ), /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React2.createElement(
2019
+ ), /* @__PURE__ */ React5.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React5.createElement(
1899
2020
  "input",
1900
2021
  {
1901
2022
  ref: inputRef,
@@ -1908,7 +2029,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
1908
2029
  type: "tel",
1909
2030
  placeholder: "531045453"
1910
2031
  }
1911
- ))), /* @__PURE__ */ React2.createElement(
2032
+ ))), /* @__PURE__ */ React5.createElement(
1912
2033
  "p",
1913
2034
  {
1914
2035
  className: cn(
@@ -101,6 +101,7 @@ var PinInput = ({
101
101
  type: "text",
102
102
  maxLength: 1,
103
103
  value,
104
+ inputMode: "numeric",
104
105
  id: `input-${index}`,
105
106
  pattern: "[0-9]*",
106
107
  className: cn(
@@ -60,6 +60,7 @@ var PinInput = ({
60
60
  type: "text",
61
61
  maxLength: 1,
62
62
  value,
63
+ inputMode: "numeric",
63
64
  id: `input-${index}`,
64
65
  pattern: "[0-9]*",
65
66
  className: cn(
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
-
4
- type PositionType = "top" | "bottom" | "right" | "left";
3
+ import { P as PositionType } from '../commonTypes-2IGtJ5cq.mjs';
5
4
 
6
5
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
6
  interface PopoverProps {
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
-
4
- type PositionType = "top" | "bottom" | "right" | "left";
3
+ import { P as PositionType } from '../commonTypes-2IGtJ5cq.js';
5
4
 
6
5
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
6
  interface PopoverProps {
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { FC } from 'react';
3
- import { P as PositionType, O as OrientationType, D as DirectionType } from '../commonTypes-LrR8QrYP.mjs';
3
+
4
+ type DirectionType = "rtl" | "ltr";
5
+ type PositionType = "top" | "bottom" | "right" | "left";
6
+ type OrientationType = "vertical" | "horizontal";
4
7
 
5
8
  type LabelProps = {
6
9
  hint?: React.ReactNode;
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { FC } from 'react';
3
- import { P as PositionType, O as OrientationType, D as DirectionType } from '../commonTypes-LrR8QrYP.js';
3
+
4
+ type DirectionType = "rtl" | "ltr";
5
+ type PositionType = "top" | "bottom" | "right" | "left";
6
+ type OrientationType = "vertical" | "horizontal";
4
7
 
5
8
  type LabelProps = {
6
9
  hint?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
- import { O as OrientationType } from '../commonTypes-LrR8QrYP.mjs';
3
+ import { O as OrientationType } from '../commonTypes-GhKAraJw.mjs';
4
4
 
5
5
  declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
6
  orientation?: OrientationType | undefined;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
- import { O as OrientationType } from '../commonTypes-LrR8QrYP.js';
3
+ import { O as OrientationType } from '../commonTypes-GhKAraJw.js';
4
4
 
5
5
  declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
6
  orientation?: OrientationType | undefined;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { O as OrientationType } from '../commonTypes-GhKAraJw.mjs';
2
+ import { O as OrientationType } from '../commonTypes-3k5cNB1s.mjs';
3
3
 
4
4
  type SeparatorProps = {
5
5
  className?: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { O as OrientationType } from '../commonTypes-GhKAraJw.js';
2
+ import { O as OrientationType } from '../commonTypes-3k5cNB1s.js';
3
3
 
4
4
  type SeparatorProps = {
5
5
  className?: string;
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { RowData, ColumnDef } from '@tanstack/react-table';
3
-
4
- type DirectionType = "rtl" | "ltr";
3
+ import { D as DirectionType } from '../commonTypes-3k5cNB1s.mjs';
5
4
 
6
5
  type DataProps = {};
7
6
  type SimpleTableProps = {
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { RowData, ColumnDef } from '@tanstack/react-table';
3
-
4
- type DirectionType = "rtl" | "ltr";
3
+ import { D as DirectionType } from '../commonTypes-3k5cNB1s.js';
5
4
 
6
5
  type DataProps = {};
7
6
  type SimpleTableProps = {
@@ -1,21 +1,45 @@
1
- import {
2
- Skeleton
3
- } from "../chunk-ND4BWUKH.mjs";
4
1
  import {
5
2
  cn
6
3
  } from "../chunk-TE3BKEXL.mjs";
7
4
 
8
5
  // components/elements/simpleTable/SimpleTable.tsx
9
- import * as React2 from "react";
6
+ import * as React3 from "react";
10
7
  import {
11
8
  flexRender,
12
9
  getCoreRowModel,
13
10
  useReactTable
14
11
  } from "@tanstack/react-table";
15
12
 
13
+ // components/elements/skeleton/Skeleton.tsx
14
+ import React from "react";
15
+ function Skeleton({
16
+ className,
17
+ content,
18
+ animation = "pulse",
19
+ ...props
20
+ }) {
21
+ const animationStyles = {
22
+ none: "hawa-rounded hawa-bg-muted",
23
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
24
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
25
+ };
26
+ return /* @__PURE__ */ React.createElement(
27
+ "div",
28
+ {
29
+ className: cn(
30
+ animationStyles[animation],
31
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
32
+ className
33
+ ),
34
+ ...props
35
+ },
36
+ content && content
37
+ );
38
+ }
39
+
16
40
  // components/elements/table/Table.tsx
17
- import * as React from "react";
18
- var Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("div", { className: "hawa-relative hawa-w-full hawa-overflow-auto hawa-rounded hawa-border" }, /* @__PURE__ */ React.createElement(
41
+ import * as React2 from "react";
42
+ var Table = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative hawa-w-full hawa-overflow-auto hawa-rounded hawa-border" }, /* @__PURE__ */ React2.createElement(
19
43
  "table",
20
44
  {
21
45
  ref,
@@ -24,7 +48,7 @@ var Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ R
24
48
  }
25
49
  )));
26
50
  Table.displayName = "Table";
27
- var TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
51
+ var TableHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
28
52
  "thead",
29
53
  {
30
54
  ref,
@@ -33,8 +57,8 @@ var TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
33
57
  }
34
58
  ));
35
59
  TableHeader.displayName = "TableHeader";
36
- var TableHead = React.forwardRef(
37
- ({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React.createElement(
60
+ var TableHead = React2.forwardRef(
61
+ ({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React2.createElement(
38
62
  "th",
39
63
  {
40
64
  ref,
@@ -53,9 +77,9 @@ var TableHead = React.forwardRef(
53
77
  )
54
78
  );
55
79
  TableHead.displayName = "TableHead";
56
- var TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
80
+ var TableBody = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
57
81
  TableBody.displayName = "TableBody";
58
- var TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
82
+ var TableFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
59
83
  "tfoot",
60
84
  {
61
85
  ref,
@@ -67,7 +91,7 @@ var TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
67
91
  }
68
92
  ));
69
93
  TableFooter.displayName = "TableFooter";
70
- var TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
94
+ var TableRow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
71
95
  "tr",
72
96
  {
73
97
  ref,
@@ -81,14 +105,14 @@ var TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
81
105
  }
82
106
  ));
83
107
  TableRow.displayName = "TableRow";
84
- var TableCell = React.forwardRef(
108
+ var TableCell = React2.forwardRef(
85
109
  ({ className, enablePadding = true, padding = "default", ...props }, ref) => {
86
110
  let paddingStyles = {
87
111
  condensed: "hawa-p-0 hawa-px-4",
88
112
  default: "hawa-p-4",
89
113
  noPadding: "hawa-p-0"
90
114
  };
91
- return /* @__PURE__ */ React.createElement(
115
+ return /* @__PURE__ */ React2.createElement(
92
116
  "td",
93
117
  {
94
118
  ref,
@@ -110,7 +134,7 @@ var TableCell = React.forwardRef(
110
134
  }
111
135
  );
112
136
  TableCell.displayName = "TableCell";
113
- var TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
137
+ var TableCaption = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
114
138
  "caption",
115
139
  {
116
140
  ref,
@@ -136,7 +160,7 @@ var SimpleTable = ({
136
160
  columns,
137
161
  getCoreRowModel: getCoreRowModel()
138
162
  });
139
- return /* @__PURE__ */ React2.createElement(
163
+ return /* @__PURE__ */ React3.createElement(
140
164
  "div",
141
165
  {
142
166
  className: cn(
@@ -144,8 +168,8 @@ var SimpleTable = ({
144
168
  classNames
145
169
  )
146
170
  },
147
- props.isLoading ? /* @__PURE__ */ React2.createElement(Skeleton, { className: "h-[130px] w-full" }) : /* @__PURE__ */ React2.createElement("div", { className: "hawa-rounded" }, /* @__PURE__ */ React2.createElement(Table, null, table.getAllColumns().length > 0 && /* @__PURE__ */ React2.createElement(TableHeader, null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React2.createElement(TableRow, { key: headerGroup.id }, headerGroup.headers.map((header) => {
148
- return /* @__PURE__ */ React2.createElement(
171
+ props.isLoading ? /* @__PURE__ */ React3.createElement(Skeleton, { className: "h-[130px] w-full" }) : /* @__PURE__ */ React3.createElement("div", { className: "hawa-rounded" }, /* @__PURE__ */ React3.createElement(Table, null, table.getAllColumns().length > 0 && /* @__PURE__ */ React3.createElement(TableHeader, null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React3.createElement(TableRow, { key: headerGroup.id }, headerGroup.headers.map((header) => {
172
+ return /* @__PURE__ */ React3.createElement(
149
173
  TableHead,
150
174
  {
151
175
  condensed: props.condensed,
@@ -157,7 +181,7 @@ var SimpleTable = ({
157
181
  header.getContext()
158
182
  )
159
183
  );
160
- })))), /* @__PURE__ */ React2.createElement(TableBody, null, ((_a = table.getRowModel().rows) == null ? void 0 : _a.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React2.createElement(
184
+ })))), /* @__PURE__ */ React3.createElement(TableBody, null, ((_a = table.getRowModel().rows) == null ? void 0 : _a.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React3.createElement(
161
185
  TableRow,
162
186
  {
163
187
  key: row.id,
@@ -165,7 +189,7 @@ var SimpleTable = ({
165
189
  },
166
190
  row.getVisibleCells().map((cell) => {
167
191
  var _a2;
168
- return /* @__PURE__ */ React2.createElement(
192
+ return /* @__PURE__ */ React3.createElement(
169
193
  TableCell,
170
194
  {
171
195
  dir: props.direction,
@@ -178,7 +202,7 @@ var SimpleTable = ({
178
202
  )
179
203
  );
180
204
  })
181
- )) : /* @__PURE__ */ React2.createElement(TableRow, null, /* @__PURE__ */ React2.createElement(
205
+ )) : /* @__PURE__ */ React3.createElement(TableRow, null, /* @__PURE__ */ React3.createElement(
182
206
  TableCell,
183
207
  {
184
208
  colSpan: columns.length,
@@ -1,7 +1,33 @@
1
1
  import {
2
- Skeleton
3
- } from "../chunk-ND4BWUKH.mjs";
4
- import "../chunk-TE3BKEXL.mjs";
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/skeleton/Skeleton.tsx
6
+ import React from "react";
7
+ function Skeleton({
8
+ className,
9
+ content,
10
+ animation = "pulse",
11
+ ...props
12
+ }) {
13
+ const animationStyles = {
14
+ none: "hawa-rounded hawa-bg-muted",
15
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
16
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
17
+ };
18
+ return /* @__PURE__ */ React.createElement(
19
+ "div",
20
+ {
21
+ className: cn(
22
+ animationStyles[animation],
23
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
24
+ className
25
+ ),
26
+ ...props
27
+ },
28
+ content && content
29
+ );
30
+ }
5
31
  export {
6
32
  Skeleton
7
33
  };