@sikka/hawa 0.23.10-next → 0.23.11-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/accordion/index.d.mts +1 -1
  2. package/dist/accordion/index.d.ts +1 -1
  3. package/dist/alert/index.d.mts +1 -1
  4. package/dist/alert/index.d.ts +1 -1
  5. package/dist/avatar/index.d.mts +1 -1
  6. package/dist/avatar/index.d.ts +1 -1
  7. package/dist/avatar/index.js +1 -1
  8. package/dist/avatar/index.mjs +1 -1
  9. package/dist/backToTop/index.mjs +4 -2
  10. package/dist/blocks/index.js +33 -33
  11. package/dist/blocks/index.mjs +1 -1
  12. package/dist/blocks/pricing/index.js +40 -40
  13. package/dist/blocks/pricing/index.mjs +38 -38
  14. package/dist/carousel/index.d.mts +13 -0
  15. package/dist/carousel/index.d.ts +13 -0
  16. package/dist/carousel/index.js +186 -0
  17. package/dist/carousel/index.mjs +144 -0
  18. package/dist/checkbox/index.d.mts +2 -1
  19. package/dist/checkbox/index.d.ts +2 -1
  20. package/dist/chip/index.d.mts +37 -2
  21. package/dist/chip/index.d.ts +37 -2
  22. package/dist/chip/index.mjs +83 -3
  23. package/dist/{chunk-3N6JJKMN.mjs → chunk-DGWAHQRX.mjs} +3 -7
  24. package/dist/chunk-HSOVWPQN.mjs +138 -0
  25. package/dist/chunk-LRLLDOQZ.mjs +178 -0
  26. package/dist/chunk-ND4BWUKH.mjs +34 -0
  27. package/dist/{chunk-2R2QPJT7.mjs → chunk-RYORXSDA.mjs} +175 -175
  28. package/dist/codeBlock/index.d.mts +23 -0
  29. package/dist/codeBlock/index.d.ts +23 -0
  30. package/dist/codeBlock/index.js +2772 -0
  31. package/dist/codeBlock/index.mjs +2656 -0
  32. package/dist/collapsible/index.d.mts +8 -0
  33. package/dist/collapsible/index.d.ts +8 -0
  34. package/dist/collapsible/index.js +49 -0
  35. package/dist/collapsible/index.mjs +10 -0
  36. package/dist/colorPicker/index.d.mts +30 -0
  37. package/dist/colorPicker/index.d.ts +30 -0
  38. package/dist/colorPicker/index.js +208 -0
  39. package/dist/colorPicker/index.mjs +6 -0
  40. package/dist/combobox/index.mjs +19 -43
  41. package/dist/commonTypes-2IGtJ5cq.d.mts +3 -0
  42. package/dist/commonTypes-2IGtJ5cq.d.ts +3 -0
  43. package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
  44. package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
  45. package/dist/commonTypes-3k5cNB1s.d.mts +4 -0
  46. package/dist/commonTypes-3k5cNB1s.d.ts +4 -0
  47. package/dist/{commonTypes-N7XOVCit.d.mts → commonTypes-Abm7GBJu.d.mts} +2 -1
  48. package/dist/{commonTypes-N7XOVCit.d.ts → commonTypes-Abm7GBJu.d.ts} +2 -1
  49. package/dist/commonTypes-Dqxlu-9C.d.mts +4 -0
  50. package/dist/commonTypes-Dqxlu-9C.d.ts +4 -0
  51. package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
  52. package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
  53. package/dist/dataTable/index.d.mts +1 -2
  54. package/dist/dataTable/index.d.ts +1 -2
  55. package/dist/dataTable/index.mjs +4 -2
  56. package/dist/destroyableCard/index.d.mts +12 -0
  57. package/dist/destroyableCard/index.d.ts +12 -0
  58. package/dist/destroyableCard/index.js +205 -0
  59. package/dist/destroyableCard/index.mjs +163 -0
  60. package/dist/dropdownMenu/index.d.mts +1 -1
  61. package/dist/dropdownMenu/index.d.ts +1 -1
  62. package/dist/dropdownMenu/index.mjs +342 -19
  63. package/dist/elements/index.d.mts +17 -17
  64. package/dist/elements/index.d.ts +17 -17
  65. package/dist/elements/index.js +162 -162
  66. package/dist/elements/index.mjs +1 -1
  67. package/dist/fileUploader/index.d.mts +5 -0
  68. package/dist/fileUploader/index.d.ts +5 -0
  69. package/dist/fileUploader/index.js +62 -0
  70. package/dist/fileUploader/index.mjs +25 -0
  71. package/dist/index.d.mts +17 -17
  72. package/dist/index.d.ts +17 -17
  73. package/dist/index.js +173 -173
  74. package/dist/index.mjs +177 -177
  75. package/dist/input/index.d.mts +1 -9
  76. package/dist/input/index.d.ts +1 -9
  77. package/dist/input/index.mjs +15 -97
  78. package/dist/interfaceSettings/index.d.mts +18 -0
  79. package/dist/interfaceSettings/index.d.ts +18 -0
  80. package/dist/interfaceSettings/index.js +419 -0
  81. package/dist/interfaceSettings/index.mjs +379 -0
  82. package/dist/label/index.d.mts +2 -1
  83. package/dist/label/index.d.ts +2 -1
  84. package/dist/label/index.mjs +3 -87
  85. package/dist/layout/index.js +36 -36
  86. package/dist/layout/index.mjs +2 -2
  87. package/dist/navigationMenu/index.d.mts +1 -2
  88. package/dist/navigationMenu/index.d.ts +1 -2
  89. package/dist/pagination/index.d.mts +12 -0
  90. package/dist/pagination/index.d.ts +12 -0
  91. package/dist/pagination/index.js +160 -0
  92. package/dist/pagination/index.mjs +118 -0
  93. package/dist/passwordInput/index.d.mts +13 -0
  94. package/dist/passwordInput/index.d.ts +13 -0
  95. package/dist/passwordInput/index.js +566 -0
  96. package/dist/passwordInput/index.mjs +523 -0
  97. package/dist/popover/index.d.mts +1 -1
  98. package/dist/popover/index.d.ts +1 -1
  99. package/dist/progressCircle/index.d.mts +16 -0
  100. package/dist/progressCircle/index.d.ts +16 -0
  101. package/dist/progressCircle/index.js +159 -0
  102. package/dist/progressCircle/index.mjs +117 -0
  103. package/dist/radio/index.d.mts +1 -4
  104. package/dist/radio/index.d.ts +1 -4
  105. package/dist/scrollIndicator/index.d.mts +9 -0
  106. package/dist/scrollIndicator/index.d.ts +9 -0
  107. package/dist/scrollIndicator/index.js +80 -0
  108. package/dist/scrollIndicator/index.mjs +43 -0
  109. package/dist/select/index.d.mts +1 -1
  110. package/dist/select/index.d.ts +1 -1
  111. package/dist/separator/index.d.mts +10 -0
  112. package/dist/separator/index.d.ts +10 -0
  113. package/dist/separator/index.js +66 -0
  114. package/dist/separator/index.mjs +24 -0
  115. package/dist/simpleTable/index.d.mts +30 -0
  116. package/dist/simpleTable/index.d.ts +30 -0
  117. package/dist/simpleTable/index.js +253 -0
  118. package/dist/simpleTable/index.mjs +217 -0
  119. package/dist/skeleton/index.d.mts +3 -3
  120. package/dist/skeleton/index.d.ts +3 -3
  121. package/dist/skeleton/index.mjs +3 -29
  122. package/dist/slider/index.d.mts +6 -0
  123. package/dist/slider/index.d.ts +6 -0
  124. package/dist/slider/index.js +66 -0
  125. package/dist/slider/index.mjs +24 -0
  126. package/dist/splitButton/index.d.mts +29 -2
  127. package/dist/splitButton/index.d.ts +29 -2
  128. package/dist/splitButton/index.mjs +355 -30
  129. package/dist/stopPropagationWrapper/index.d.mts +2 -2
  130. package/dist/stopPropagationWrapper/index.d.ts +2 -2
  131. package/dist/switch/index.d.mts +1 -1
  132. package/dist/switch/index.d.ts +1 -1
  133. package/dist/tabs/index.d.mts +21 -1
  134. package/dist/tabs/index.d.ts +21 -1
  135. package/dist/tabs/index.mjs +94 -14
  136. package/dist/toast/index.d.mts +23 -0
  137. package/dist/toast/index.d.ts +23 -0
  138. package/dist/toast/index.js +185 -0
  139. package/dist/toast/index.mjs +19 -0
  140. package/dist/toaster/index.d.mts +9 -0
  141. package/dist/toaster/index.d.ts +9 -0
  142. package/dist/toaster/index.js +302 -0
  143. package/dist/toaster/index.mjs +145 -0
  144. package/dist/tooltip/index.d.mts +3 -4
  145. package/dist/tooltip/index.d.ts +3 -4
  146. package/package.json +1 -1
  147. package/dist/chunk-72HYR6WB.mjs +0 -88
  148. package/dist/chunk-C4CBXIG5.mjs +0 -363
  149. package/dist/commonTypes-eIwARo5g.d.mts +0 -4
  150. package/dist/commonTypes-eIwARo5g.d.ts +0 -4
  151. package/dist/index-DUZFcPRO.d.mts +0 -38
  152. package/dist/index-DUZFcPRO.d.ts +0 -38
@@ -895,7 +895,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
895
895
  // components/elements/avatar/Avatar.tsx
896
896
  import React12 from "react";
897
897
 
898
- // components/elements/FileUploader.tsx
898
+ // components/elements/fileUploader/FileUploader.tsx
899
899
  import React11, { useRef as useRef2 } from "react";
900
900
 
901
901
  // components/elements/dataTable/DataTable.tsx
@@ -1399,8 +1399,14 @@ import React23 from "react";
1399
1399
  // components/elements/badge/Badge.tsx
1400
1400
  import React24, { useEffect as useEffect6, useState as useState9, useRef as useRef5 } from "react";
1401
1401
 
1402
- // components/elements/ProgressCircle.tsx
1403
- import React25 from "react";
1402
+ // components/elements/colorPicker/ColorPicker.tsx
1403
+ import React25, {
1404
+ useState as useState10,
1405
+ useEffect as useEffect7
1406
+ } from "react";
1407
+
1408
+ // components/elements/progressCircle/ProgressCircle.tsx
1409
+ import React26 from "react";
1404
1410
  var size2config = {
1405
1411
  xs: {
1406
1412
  radius: 15,
@@ -1432,7 +1438,7 @@ function getLimitedValue(input) {
1432
1438
  return input;
1433
1439
  }
1434
1440
  }
1435
- var ProgressCircle = React25.forwardRef((props, ref) => {
1441
+ var ProgressCircle = React26.forwardRef((props, ref) => {
1436
1442
  const {
1437
1443
  value: inputValue,
1438
1444
  size = "md",
@@ -1452,7 +1458,7 @@ var ProgressCircle = React25.forwardRef((props, ref) => {
1452
1458
  const circumference = normalizedRadius * 2 * Math.PI;
1453
1459
  const strokeDashoffset = value / 100 * circumference;
1454
1460
  const offset = circumference - strokeDashoffset;
1455
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
1461
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
1456
1462
  "div",
1457
1463
  {
1458
1464
  ref,
@@ -1461,7 +1467,7 @@ var ProgressCircle = React25.forwardRef((props, ref) => {
1461
1467
  className
1462
1468
  )
1463
1469
  },
1464
- /* @__PURE__ */ React25.createElement(
1470
+ /* @__PURE__ */ React26.createElement(
1465
1471
  "svg",
1466
1472
  {
1467
1473
  width: radius * 2,
@@ -1469,7 +1475,7 @@ var ProgressCircle = React25.forwardRef((props, ref) => {
1469
1475
  viewBox: `0 0 ${radius * 2} ${radius * 2}`,
1470
1476
  className: "hawa-rotate-180 hawa-transform"
1471
1477
  },
1472
- /* @__PURE__ */ React25.createElement(
1478
+ /* @__PURE__ */ React26.createElement(
1473
1479
  "circle",
1474
1480
  {
1475
1481
  r: normalizedRadius,
@@ -1485,7 +1491,7 @@ var ProgressCircle = React25.forwardRef((props, ref) => {
1485
1491
  )
1486
1492
  }
1487
1493
  ),
1488
- value > 0 ? /* @__PURE__ */ React25.createElement(
1494
+ value > 0 ? /* @__PURE__ */ React26.createElement(
1489
1495
  "circle",
1490
1496
  {
1491
1497
  r: normalizedRadius,
@@ -1505,22 +1511,22 @@ var ProgressCircle = React25.forwardRef((props, ref) => {
1505
1511
  }
1506
1512
  ) : null
1507
1513
  ),
1508
- /* @__PURE__ */ React25.createElement("div", { className: cn("hawa-absolute hawa-flex") }, children)
1514
+ /* @__PURE__ */ React26.createElement("div", { className: cn("hawa-absolute hawa-flex") }, children)
1509
1515
  ));
1510
1516
  });
1511
1517
  ProgressCircle.displayName = "ProgressCircle";
1512
1518
 
1513
- // components/elements/Pagination.tsx
1514
- import React26 from "react";
1519
+ // components/elements/pagination/Pagination.tsx
1520
+ import React27 from "react";
1515
1521
  import { Pagination as PaginationPrimitive } from "react-headless-pagination";
1516
1522
 
1517
- // components/elements/PasswordInput.tsx
1518
- import React27, { useEffect as useEffect7, useState as useState10 } from "react";
1523
+ // components/elements/passwordInput/PasswordInput.tsx
1524
+ import React28, { useEffect as useEffect8, useState as useState11 } from "react";
1519
1525
 
1520
- // components/elements/Slider.tsx
1521
- import * as React28 from "react";
1526
+ // components/elements/slider/Slider.tsx
1527
+ import * as React29 from "react";
1522
1528
  import * as SliderPrimitive from "@radix-ui/react-slider";
1523
- var Slider = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
1529
+ var Slider = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React29.createElement(
1524
1530
  SliderPrimitive.Root,
1525
1531
  {
1526
1532
  ref,
@@ -1530,26 +1536,26 @@ var Slider = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
1530
1536
  ),
1531
1537
  ...props
1532
1538
  },
1533
- /* @__PURE__ */ React28.createElement(SliderPrimitive.Track, { className: "hawa-relative hawa-h-2 hawa-w-full hawa-grow hawa-overflow-hidden hawa-rounded-full hawa-border hawa-bg-background" }, /* @__PURE__ */ React28.createElement(SliderPrimitive.Range, { className: "hawa-absolute hawa-h-full hawa-bg-primary" })),
1534
- /* @__PURE__ */ React28.createElement(SliderPrimitive.Thumb, { className: "hawa-block hawa-h-5 hawa-w-5 hawa-rounded-full hawa-border-2 hawa-border-primary hawa-bg-background hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50" })
1539
+ /* @__PURE__ */ React29.createElement(SliderPrimitive.Track, { className: "hawa-relative hawa-h-2 hawa-w-full hawa-grow hawa-overflow-hidden hawa-rounded-full hawa-border hawa-bg-background" }, /* @__PURE__ */ React29.createElement(SliderPrimitive.Range, { className: "hawa-absolute hawa-h-full hawa-bg-primary" })),
1540
+ /* @__PURE__ */ React29.createElement(SliderPrimitive.Thumb, { className: "hawa-block hawa-h-5 hawa-w-5 hawa-rounded-full hawa-border-2 hawa-border-primary hawa-bg-background hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50" })
1535
1541
  ));
1536
1542
  Slider.displayName = SliderPrimitive.Root.displayName;
1537
1543
 
1538
- // components/elements/SimpleTable.tsx
1539
- import * as React29 from "react";
1544
+ // components/elements/simpleTable/SimpleTable.tsx
1545
+ import * as React30 from "react";
1540
1546
  import {
1541
1547
  flexRender as flexRender2,
1542
1548
  getCoreRowModel as getCoreRowModel2,
1543
1549
  useReactTable as useReactTable2
1544
1550
  } from "@tanstack/react-table";
1545
1551
 
1546
- // components/elements/Separator.tsx
1547
- import * as React30 from "react";
1552
+ // components/elements/separator/Separator.tsx
1553
+ import * as React31 from "react";
1548
1554
  var Separator2 = ({
1549
1555
  className,
1550
1556
  orientation = "horizontal",
1551
1557
  ...props
1552
- }) => /* @__PURE__ */ React30.createElement(
1558
+ }) => /* @__PURE__ */ React31.createElement(
1553
1559
  "div",
1554
1560
  {
1555
1561
  className: cn(
@@ -1561,30 +1567,24 @@ var Separator2 = ({
1561
1567
  }
1562
1568
  );
1563
1569
 
1564
- // components/elements/ScrollIndicator.tsx
1565
- import React31, { useState as useState11, useEffect as useEffect8 } from "react";
1566
-
1567
- // components/elements/ColorPicker.tsx
1568
- import React32, {
1569
- useState as useState12,
1570
- useEffect as useEffect9
1571
- } from "react";
1570
+ // components/elements/scrollIndicator/ScrollIndicator.tsx
1571
+ import React32, { useState as useState12, useEffect as useEffect9 } from "react";
1572
1572
 
1573
- // components/elements/CodeBlock.tsx
1573
+ // components/elements/codeBlock/CodeBlock.tsx
1574
1574
  import React33, { useState as useState14 } from "react";
1575
1575
  import { Highlight, themes } from "prism-react-renderer";
1576
1576
 
1577
1577
  // components/hooks/useClipboard.ts
1578
1578
  import { useState as useState13 } from "react";
1579
1579
 
1580
- // components/elements/Carousel.tsx
1580
+ // components/elements/carousel/Carousel.tsx
1581
1581
  import React34, { useEffect as useEffect11, useState as useState15 } from "react";
1582
1582
  import useEmblaCarousel from "embla-carousel-react";
1583
1583
 
1584
- // components/elements/Count.tsx
1584
+ // components/elements/count/Count.tsx
1585
1585
  import React35 from "react";
1586
1586
 
1587
- // components/elements/Toast.tsx
1587
+ // components/elements/toast/Toast.tsx
1588
1588
  import * as React36 from "react";
1589
1589
  import * as ToastPrimitives from "@radix-ui/react-toast";
1590
1590
  import { cva as cva3 } from "class-variance-authority";
@@ -1708,16 +1708,16 @@ var ToastDescription = React36.forwardRef(({ className, ...props }, ref) => /* @
1708
1708
  ));
1709
1709
  ToastDescription.displayName = ToastPrimitives.Description.displayName;
1710
1710
 
1711
- // components/elements/Toaster.tsx
1711
+ // components/elements/toaster/Toaster.tsx
1712
1712
  import React38 from "react";
1713
1713
 
1714
1714
  // components/hooks/useToast.ts
1715
1715
  import * as React37 from "react";
1716
1716
 
1717
- // components/elements/DestroyableCard.tsx
1717
+ // components/elements/destroyableCard/DestroyableCard.tsx
1718
1718
  import React39, { useRef as useRef6, useState as useState17 } from "react";
1719
1719
 
1720
- // components/elements/InterfaceSettings.tsx
1720
+ // components/elements/interfaceSettings/InterfaceSettings.tsx
1721
1721
  import React40, { useState as useState18 } from "react";
1722
1722
 
1723
1723
  // components/blocks/cards/PricingCard.tsx
@@ -0,0 +1,13 @@
1
+ import React__default, { PropsWithChildren } from 'react';
2
+ import { EmblaOptionsType } from 'embla-carousel-react';
3
+
4
+ interface CarouselProps {
5
+ items: React__default.ReactNode[];
6
+ showArrows?: boolean;
7
+ autoplay?: boolean;
8
+ autoplayInterval?: number;
9
+ }
10
+ type Props = CarouselProps & EmblaOptionsType;
11
+ declare const Carousel: (props: PropsWithChildren<Props>) => React__default.JSX.Element;
12
+
13
+ export { Carousel };
@@ -0,0 +1,13 @@
1
+ import React__default, { PropsWithChildren } from 'react';
2
+ import { EmblaOptionsType } from 'embla-carousel-react';
3
+
4
+ interface CarouselProps {
5
+ items: React__default.ReactNode[];
6
+ showArrows?: boolean;
7
+ autoplay?: boolean;
8
+ autoplayInterval?: number;
9
+ }
10
+ type Props = CarouselProps & EmblaOptionsType;
11
+ declare const Carousel: (props: PropsWithChildren<Props>) => React__default.JSX.Element;
12
+
13
+ export { Carousel };
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // components/elements/carousel/index.ts
31
+ var carousel_exports = {};
32
+ __export(carousel_exports, {
33
+ Carousel: () => Carousel
34
+ });
35
+ module.exports = __toCommonJS(carousel_exports);
36
+
37
+ // components/elements/carousel/Carousel.tsx
38
+ var import_react = __toESM(require("react"));
39
+ var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
40
+
41
+ // components/util.ts
42
+ var import_clsx = require("clsx");
43
+ var import_tailwind_merge = require("tailwind-merge");
44
+ function cn(...inputs) {
45
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
46
+ }
47
+
48
+ // components/elements/carousel/Carousel.tsx
49
+ var Carousel = (props) => {
50
+ const {
51
+ children,
52
+ items,
53
+ showArrows,
54
+ autoplay,
55
+ autoplayInterval = 3e3,
56
+ ...options
57
+ } = props;
58
+ const [emblaRef, emblaApi] = (0, import_embla_carousel_react.default)({
59
+ loop: autoplay ? true : options.loop || false
60
+ });
61
+ const [selectedIndex, setSelectedIndex] = (0, import_react.useState)(0);
62
+ (0, import_react.useEffect)(() => {
63
+ function selectHandler() {
64
+ const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
65
+ setSelectedIndex(index || 0);
66
+ }
67
+ emblaApi == null ? void 0 : emblaApi.on("select", selectHandler);
68
+ return () => {
69
+ emblaApi == null ? void 0 : emblaApi.off("select", selectHandler);
70
+ };
71
+ }, [emblaApi]);
72
+ (0, import_react.useEffect)(() => {
73
+ let autoplayTimer;
74
+ if (autoplay && emblaApi) {
75
+ autoplayTimer = setInterval(() => {
76
+ emblaApi.scrollNext();
77
+ }, autoplayInterval);
78
+ }
79
+ return () => {
80
+ if (autoplayTimer)
81
+ clearInterval(autoplayTimer);
82
+ };
83
+ }, [emblaApi, autoplay, autoplayInterval]);
84
+ const length = import_react.default.Children.count(items);
85
+ const canScrollNext = !!(emblaApi == null ? void 0 : emblaApi.canScrollNext());
86
+ const canScrollPrev = !!(emblaApi == null ? void 0 : emblaApi.canScrollPrev());
87
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-flex hawa-h-full" }, items == null ? void 0 : items.map((item, i) => /* @__PURE__ */ import_react.default.createElement(
88
+ "div",
89
+ {
90
+ key: i,
91
+ className: "hawa-flex hawa-h-full hawa-min-w-0 hawa-flex-[0_0_100%] hawa-items-center hawa-justify-center"
92
+ },
93
+ item
94
+ ))))), /* @__PURE__ */ import_react.default.createElement(
95
+ Dots,
96
+ {
97
+ itemsLength: length,
98
+ selectedIndex,
99
+ onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
100
+ }
101
+ ), showArrows && /* @__PURE__ */ import_react.default.createElement(
102
+ CarouselControls,
103
+ {
104
+ canScrollNext,
105
+ canScrollPrev,
106
+ onNext: () => emblaApi == null ? void 0 : emblaApi.scrollNext(),
107
+ onPrev: () => emblaApi == null ? void 0 : emblaApi.scrollPrev()
108
+ }
109
+ ));
110
+ };
111
+ var Dots = ({ onDotClick, itemsLength, selectedIndex }) => {
112
+ const arr = new Array(itemsLength).fill(0);
113
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-z-50 hawa-my-2 hawa-flex hawa-justify-center hawa-gap-1" }, arr.map((_, index) => {
114
+ const selected = index === selectedIndex;
115
+ return /* @__PURE__ */ import_react.default.createElement(
116
+ "div",
117
+ {
118
+ onClick: () => onDotClick(index),
119
+ className: cn(
120
+ "hawa-h-2 hawa-rounded-full hawa-bg-primary hawa-transition-all hawa-duration-300 hover:hawa-cursor-pointer",
121
+ !selected ? "hawa-w-2 hawa-opacity-50" : "hawa-w-6 hawa-opacity-100"
122
+ ),
123
+ key: index
124
+ }
125
+ );
126
+ }));
127
+ };
128
+ var CarouselControls = (props) => {
129
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-flex hawa-justify-end hawa-gap-2 " }, /* @__PURE__ */ import_react.default.createElement(
130
+ "button",
131
+ {
132
+ onClick: () => {
133
+ if (props.canScrollPrev) {
134
+ props.onPrev();
135
+ }
136
+ },
137
+ disabled: !props.canScrollPrev,
138
+ className: cn(
139
+ "hawa-absolute hawa-start-0 hawa-top-1/2 -hawa-translate-y-2 hawa-rounded-full hawa-p-2 hawa-text-white ",
140
+ !props.canScrollPrev && "hawa-bg-primary/50",
141
+ props.canScrollPrev && "hawa-bg-primary"
142
+ )
143
+ },
144
+ /* @__PURE__ */ import_react.default.createElement(
145
+ "svg",
146
+ {
147
+ "aria-label": "Chevron Right Icon",
148
+ stroke: "currentColor",
149
+ fill: "currentColor",
150
+ viewBox: "0 0 16 16",
151
+ className: "hawa-h-2 hawa-w-2 hawa-shrink-0 hawa-rotate-180 hawa-transition-transform hawa-duration-200 "
152
+ },
153
+ /* @__PURE__ */ import_react.default.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
154
+ )
155
+ ), /* @__PURE__ */ import_react.default.createElement(
156
+ "button",
157
+ {
158
+ onClick: () => {
159
+ if (props.canScrollNext) {
160
+ props.onNext();
161
+ }
162
+ },
163
+ disabled: !props.canScrollNext,
164
+ className: cn(
165
+ "hawa-absolute hawa-end-0 hawa-top-1/2 -hawa-translate-y-2 hawa-rounded-full hawa-p-2 hawa-text-white ",
166
+ !props.canScrollNext && "hawa-bg-primary/50",
167
+ props.canScrollNext && "hawa-bg-primary"
168
+ )
169
+ },
170
+ /* @__PURE__ */ import_react.default.createElement(
171
+ "svg",
172
+ {
173
+ "aria-label": "Chevron Right Icon",
174
+ stroke: "currentColor",
175
+ fill: "currentColor",
176
+ viewBox: "0 0 16 16",
177
+ className: "hawa-h-2 hawa-w-2 hawa-shrink-0 hawa-transition-transform hawa-duration-200 "
178
+ },
179
+ /* @__PURE__ */ import_react.default.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
180
+ )
181
+ ));
182
+ };
183
+ // Annotate the CommonJS export names for ESM import in node:
184
+ 0 && (module.exports = {
185
+ Carousel
186
+ });
@@ -0,0 +1,144 @@
1
+ import {
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/carousel/Carousel.tsx
6
+ import React, { useEffect, useState } from "react";
7
+ import useEmblaCarousel from "embla-carousel-react";
8
+ var Carousel = (props) => {
9
+ const {
10
+ children,
11
+ items,
12
+ showArrows,
13
+ autoplay,
14
+ autoplayInterval = 3e3,
15
+ ...options
16
+ } = props;
17
+ const [emblaRef, emblaApi] = useEmblaCarousel({
18
+ loop: autoplay ? true : options.loop || false
19
+ });
20
+ const [selectedIndex, setSelectedIndex] = useState(0);
21
+ useEffect(() => {
22
+ function selectHandler() {
23
+ const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
24
+ setSelectedIndex(index || 0);
25
+ }
26
+ emblaApi == null ? void 0 : emblaApi.on("select", selectHandler);
27
+ return () => {
28
+ emblaApi == null ? void 0 : emblaApi.off("select", selectHandler);
29
+ };
30
+ }, [emblaApi]);
31
+ useEffect(() => {
32
+ let autoplayTimer;
33
+ if (autoplay && emblaApi) {
34
+ autoplayTimer = setInterval(() => {
35
+ emblaApi.scrollNext();
36
+ }, autoplayInterval);
37
+ }
38
+ return () => {
39
+ if (autoplayTimer)
40
+ clearInterval(autoplayTimer);
41
+ };
42
+ }, [emblaApi, autoplay, autoplayInterval]);
43
+ const length = React.Children.count(items);
44
+ const canScrollNext = !!(emblaApi == null ? void 0 : emblaApi.canScrollNext());
45
+ const canScrollPrev = !!(emblaApi == null ? void 0 : emblaApi.canScrollPrev());
46
+ return /* @__PURE__ */ React.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ React.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-h-full" }, items == null ? void 0 : items.map((item, i) => /* @__PURE__ */ React.createElement(
47
+ "div",
48
+ {
49
+ key: i,
50
+ className: "hawa-flex hawa-h-full hawa-min-w-0 hawa-flex-[0_0_100%] hawa-items-center hawa-justify-center"
51
+ },
52
+ item
53
+ ))))), /* @__PURE__ */ React.createElement(
54
+ Dots,
55
+ {
56
+ itemsLength: length,
57
+ selectedIndex,
58
+ onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
59
+ }
60
+ ), showArrows && /* @__PURE__ */ React.createElement(
61
+ CarouselControls,
62
+ {
63
+ canScrollNext,
64
+ canScrollPrev,
65
+ onNext: () => emblaApi == null ? void 0 : emblaApi.scrollNext(),
66
+ onPrev: () => emblaApi == null ? void 0 : emblaApi.scrollPrev()
67
+ }
68
+ ));
69
+ };
70
+ var Dots = ({ onDotClick, itemsLength, selectedIndex }) => {
71
+ const arr = new Array(itemsLength).fill(0);
72
+ return /* @__PURE__ */ React.createElement("div", { className: "hawa-z-50 hawa-my-2 hawa-flex hawa-justify-center hawa-gap-1" }, arr.map((_, index) => {
73
+ const selected = index === selectedIndex;
74
+ return /* @__PURE__ */ React.createElement(
75
+ "div",
76
+ {
77
+ onClick: () => onDotClick(index),
78
+ className: cn(
79
+ "hawa-h-2 hawa-rounded-full hawa-bg-primary hawa-transition-all hawa-duration-300 hover:hawa-cursor-pointer",
80
+ !selected ? "hawa-w-2 hawa-opacity-50" : "hawa-w-6 hawa-opacity-100"
81
+ ),
82
+ key: index
83
+ }
84
+ );
85
+ }));
86
+ };
87
+ var CarouselControls = (props) => {
88
+ return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-justify-end hawa-gap-2 " }, /* @__PURE__ */ React.createElement(
89
+ "button",
90
+ {
91
+ onClick: () => {
92
+ if (props.canScrollPrev) {
93
+ props.onPrev();
94
+ }
95
+ },
96
+ disabled: !props.canScrollPrev,
97
+ className: cn(
98
+ "hawa-absolute hawa-start-0 hawa-top-1/2 -hawa-translate-y-2 hawa-rounded-full hawa-p-2 hawa-text-white ",
99
+ !props.canScrollPrev && "hawa-bg-primary/50",
100
+ props.canScrollPrev && "hawa-bg-primary"
101
+ )
102
+ },
103
+ /* @__PURE__ */ React.createElement(
104
+ "svg",
105
+ {
106
+ "aria-label": "Chevron Right Icon",
107
+ stroke: "currentColor",
108
+ fill: "currentColor",
109
+ viewBox: "0 0 16 16",
110
+ className: "hawa-h-2 hawa-w-2 hawa-shrink-0 hawa-rotate-180 hawa-transition-transform hawa-duration-200 "
111
+ },
112
+ /* @__PURE__ */ React.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
113
+ )
114
+ ), /* @__PURE__ */ React.createElement(
115
+ "button",
116
+ {
117
+ onClick: () => {
118
+ if (props.canScrollNext) {
119
+ props.onNext();
120
+ }
121
+ },
122
+ disabled: !props.canScrollNext,
123
+ className: cn(
124
+ "hawa-absolute hawa-end-0 hawa-top-1/2 -hawa-translate-y-2 hawa-rounded-full hawa-p-2 hawa-text-white ",
125
+ !props.canScrollNext && "hawa-bg-primary/50",
126
+ props.canScrollNext && "hawa-bg-primary"
127
+ )
128
+ },
129
+ /* @__PURE__ */ React.createElement(
130
+ "svg",
131
+ {
132
+ "aria-label": "Chevron Right Icon",
133
+ stroke: "currentColor",
134
+ fill: "currentColor",
135
+ viewBox: "0 0 16 16",
136
+ className: "hawa-h-2 hawa-w-2 hawa-shrink-0 hawa-transition-transform hawa-duration-200 "
137
+ },
138
+ /* @__PURE__ */ React.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
139
+ )
140
+ ));
141
+ };
142
+ export {
143
+ Carousel
144
+ };
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- import { R as RadiusType } from '../commonTypes-PBumfOBg.mjs';
3
+
4
+ type RadiusType = "full" | "inherit" | "none";
4
5
 
5
6
  type CheckBoxTypes = {
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- import { R as RadiusType } from '../commonTypes-PBumfOBg.js';
3
+
4
+ type RadiusType = "full" | "inherit" | "none";
4
5
 
5
6
  type CheckBoxTypes = {
6
7
  id: string;
@@ -1,2 +1,37 @@
1
- export { b as Chip, a as ChipColors, C as ChipTypes } from '../index-DUZFcPRO.mjs';
2
- import 'react';
1
+ import React__default from 'react';
2
+
3
+ type RadiusType = "full" | "inherit" | "none";
4
+
5
+ type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
6
+ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
7
+ /** The text inside the chip */
8
+ label: string;
9
+ /** The small icon before the chip label */
10
+ icon?: JSX.Element;
11
+ /** The color of the chip, must be a tailwind color */
12
+ color?: ChipColors;
13
+ /** The size of the chip */
14
+ size?: "small" | "normal" | "large";
15
+ /** Enable/Disable the dot before the label of the chip */
16
+ dot?: boolean;
17
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
18
+ dotType?: "available" | "unavailable";
19
+ radius?: RadiusType;
20
+ };
21
+ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLSpanElement> & {
22
+ /** The text inside the chip */
23
+ label: string;
24
+ /** The small icon before the chip label */
25
+ icon?: JSX.Element | undefined;
26
+ /** The color of the chip, must be a tailwind color */
27
+ color?: ChipColors | undefined;
28
+ /** The size of the chip */
29
+ size?: "small" | "normal" | "large" | undefined;
30
+ /** Enable/Disable the dot before the label of the chip */
31
+ dot?: boolean | undefined;
32
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
33
+ dotType?: "available" | "unavailable" | undefined;
34
+ radius?: RadiusType | undefined;
35
+ } & React__default.RefAttributes<HTMLSpanElement>>;
36
+
37
+ export { Chip, type ChipColors, type ChipTypes };
@@ -1,2 +1,37 @@
1
- export { b as Chip, a as ChipColors, C as ChipTypes } from '../index-DUZFcPRO.js';
2
- import 'react';
1
+ import React__default from 'react';
2
+
3
+ type RadiusType = "full" | "inherit" | "none";
4
+
5
+ type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
6
+ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
7
+ /** The text inside the chip */
8
+ label: string;
9
+ /** The small icon before the chip label */
10
+ icon?: JSX.Element;
11
+ /** The color of the chip, must be a tailwind color */
12
+ color?: ChipColors;
13
+ /** The size of the chip */
14
+ size?: "small" | "normal" | "large";
15
+ /** Enable/Disable the dot before the label of the chip */
16
+ dot?: boolean;
17
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
18
+ dotType?: "available" | "unavailable";
19
+ radius?: RadiusType;
20
+ };
21
+ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLSpanElement> & {
22
+ /** The text inside the chip */
23
+ label: string;
24
+ /** The small icon before the chip label */
25
+ icon?: JSX.Element | undefined;
26
+ /** The color of the chip, must be a tailwind color */
27
+ color?: ChipColors | undefined;
28
+ /** The size of the chip */
29
+ size?: "small" | "normal" | "large" | undefined;
30
+ /** Enable/Disable the dot before the label of the chip */
31
+ dot?: boolean | undefined;
32
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
33
+ dotType?: "available" | "unavailable" | undefined;
34
+ radius?: RadiusType | undefined;
35
+ } & React__default.RefAttributes<HTMLSpanElement>>;
36
+
37
+ export { Chip, type ChipColors, type ChipTypes };