@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.
- package/dist/accordion/index.d.mts +1 -1
- package/dist/accordion/index.d.ts +1 -1
- package/dist/alert/index.d.mts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/avatar/index.d.mts +1 -1
- package/dist/avatar/index.d.ts +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/index.mjs +1 -1
- package/dist/backToTop/index.mjs +4 -2
- package/dist/blocks/index.js +33 -33
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/pricing/index.js +40 -40
- package/dist/blocks/pricing/index.mjs +38 -38
- package/dist/carousel/index.d.mts +13 -0
- package/dist/carousel/index.d.ts +13 -0
- package/dist/carousel/index.js +186 -0
- package/dist/carousel/index.mjs +144 -0
- package/dist/checkbox/index.d.mts +2 -1
- package/dist/checkbox/index.d.ts +2 -1
- package/dist/chip/index.d.mts +37 -2
- package/dist/chip/index.d.ts +37 -2
- package/dist/chip/index.mjs +83 -3
- package/dist/{chunk-3N6JJKMN.mjs → chunk-DGWAHQRX.mjs} +3 -7
- package/dist/chunk-HSOVWPQN.mjs +138 -0
- package/dist/chunk-LRLLDOQZ.mjs +178 -0
- package/dist/chunk-ND4BWUKH.mjs +34 -0
- package/dist/{chunk-2R2QPJT7.mjs → chunk-RYORXSDA.mjs} +175 -175
- package/dist/codeBlock/index.d.mts +23 -0
- package/dist/codeBlock/index.d.ts +23 -0
- package/dist/codeBlock/index.js +2772 -0
- package/dist/codeBlock/index.mjs +2656 -0
- package/dist/collapsible/index.d.mts +8 -0
- package/dist/collapsible/index.d.ts +8 -0
- package/dist/collapsible/index.js +49 -0
- package/dist/collapsible/index.mjs +10 -0
- package/dist/colorPicker/index.d.mts +30 -0
- package/dist/colorPicker/index.d.ts +30 -0
- package/dist/colorPicker/index.js +208 -0
- package/dist/colorPicker/index.mjs +6 -0
- package/dist/combobox/index.mjs +19 -43
- package/dist/commonTypes-2IGtJ5cq.d.mts +3 -0
- package/dist/commonTypes-2IGtJ5cq.d.ts +3 -0
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- package/dist/commonTypes-3k5cNB1s.d.mts +4 -0
- package/dist/commonTypes-3k5cNB1s.d.ts +4 -0
- package/dist/{commonTypes-N7XOVCit.d.mts → commonTypes-Abm7GBJu.d.mts} +2 -1
- package/dist/{commonTypes-N7XOVCit.d.ts → commonTypes-Abm7GBJu.d.ts} +2 -1
- package/dist/commonTypes-Dqxlu-9C.d.mts +4 -0
- package/dist/commonTypes-Dqxlu-9C.d.ts +4 -0
- package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
- package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
- package/dist/dataTable/index.d.mts +1 -2
- package/dist/dataTable/index.d.ts +1 -2
- package/dist/dataTable/index.mjs +4 -2
- package/dist/destroyableCard/index.d.mts +12 -0
- package/dist/destroyableCard/index.d.ts +12 -0
- package/dist/destroyableCard/index.js +205 -0
- package/dist/destroyableCard/index.mjs +163 -0
- package/dist/dropdownMenu/index.d.mts +1 -1
- package/dist/dropdownMenu/index.d.ts +1 -1
- package/dist/dropdownMenu/index.mjs +342 -19
- package/dist/elements/index.d.mts +17 -17
- package/dist/elements/index.d.ts +17 -17
- package/dist/elements/index.js +162 -162
- package/dist/elements/index.mjs +1 -1
- package/dist/fileUploader/index.d.mts +5 -0
- package/dist/fileUploader/index.d.ts +5 -0
- package/dist/fileUploader/index.js +62 -0
- package/dist/fileUploader/index.mjs +25 -0
- package/dist/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +173 -173
- package/dist/index.mjs +177 -177
- package/dist/input/index.d.mts +1 -9
- package/dist/input/index.d.ts +1 -9
- package/dist/input/index.mjs +15 -97
- package/dist/interfaceSettings/index.d.mts +18 -0
- package/dist/interfaceSettings/index.d.ts +18 -0
- package/dist/interfaceSettings/index.js +419 -0
- package/dist/interfaceSettings/index.mjs +379 -0
- package/dist/label/index.d.mts +2 -1
- package/dist/label/index.d.ts +2 -1
- package/dist/label/index.mjs +3 -87
- package/dist/layout/index.js +36 -36
- package/dist/layout/index.mjs +2 -2
- package/dist/navigationMenu/index.d.mts +1 -2
- package/dist/navigationMenu/index.d.ts +1 -2
- package/dist/pagination/index.d.mts +12 -0
- package/dist/pagination/index.d.ts +12 -0
- package/dist/pagination/index.js +160 -0
- package/dist/pagination/index.mjs +118 -0
- package/dist/passwordInput/index.d.mts +13 -0
- package/dist/passwordInput/index.d.ts +13 -0
- package/dist/passwordInput/index.js +566 -0
- package/dist/passwordInput/index.mjs +523 -0
- package/dist/popover/index.d.mts +1 -1
- package/dist/popover/index.d.ts +1 -1
- package/dist/progressCircle/index.d.mts +16 -0
- package/dist/progressCircle/index.d.ts +16 -0
- package/dist/progressCircle/index.js +159 -0
- package/dist/progressCircle/index.mjs +117 -0
- package/dist/radio/index.d.mts +1 -4
- package/dist/radio/index.d.ts +1 -4
- package/dist/scrollIndicator/index.d.mts +9 -0
- package/dist/scrollIndicator/index.d.ts +9 -0
- package/dist/scrollIndicator/index.js +80 -0
- package/dist/scrollIndicator/index.mjs +43 -0
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/separator/index.d.mts +10 -0
- package/dist/separator/index.d.ts +10 -0
- package/dist/separator/index.js +66 -0
- package/dist/separator/index.mjs +24 -0
- package/dist/simpleTable/index.d.mts +30 -0
- package/dist/simpleTable/index.d.ts +30 -0
- package/dist/simpleTable/index.js +253 -0
- package/dist/simpleTable/index.mjs +217 -0
- package/dist/skeleton/index.d.mts +3 -3
- package/dist/skeleton/index.d.ts +3 -3
- package/dist/skeleton/index.mjs +3 -29
- package/dist/slider/index.d.mts +6 -0
- package/dist/slider/index.d.ts +6 -0
- package/dist/slider/index.js +66 -0
- package/dist/slider/index.mjs +24 -0
- package/dist/splitButton/index.d.mts +29 -2
- package/dist/splitButton/index.d.ts +29 -2
- package/dist/splitButton/index.mjs +355 -30
- package/dist/stopPropagationWrapper/index.d.mts +2 -2
- package/dist/stopPropagationWrapper/index.d.ts +2 -2
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +21 -1
- package/dist/tabs/index.d.ts +21 -1
- package/dist/tabs/index.mjs +94 -14
- package/dist/toast/index.d.mts +23 -0
- package/dist/toast/index.d.ts +23 -0
- package/dist/toast/index.js +185 -0
- package/dist/toast/index.mjs +19 -0
- package/dist/toaster/index.d.mts +9 -0
- package/dist/toaster/index.d.ts +9 -0
- package/dist/toaster/index.js +302 -0
- package/dist/toaster/index.mjs +145 -0
- package/dist/tooltip/index.d.mts +3 -4
- package/dist/tooltip/index.d.ts +3 -4
- package/package.json +1 -1
- package/dist/chunk-72HYR6WB.mjs +0 -88
- package/dist/chunk-C4CBXIG5.mjs +0 -363
- package/dist/commonTypes-eIwARo5g.d.mts +0 -4
- package/dist/commonTypes-eIwARo5g.d.ts +0 -4
- package/dist/index-DUZFcPRO.d.mts +0 -38
- 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/
|
|
1403
|
-
import React25
|
|
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 =
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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__ */
|
|
1534
|
-
/* @__PURE__ */
|
|
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
|
|
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
|
|
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__ */
|
|
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
|
|
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
|
+
};
|
package/dist/checkbox/index.d.ts
CHANGED
package/dist/chip/index.d.mts
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 };
|
package/dist/chip/index.d.ts
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 };
|