@sikka/hawa 0.26.21 → 0.26.23
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/README.md +2 -18
- package/dist/alert/index.d.mts +1 -0
- package/dist/alert/index.d.ts +1 -0
- package/dist/blocks/auth/index.mjs +5 -4
- package/dist/blocks/feedback/index.js +114 -118
- package/dist/blocks/feedback/index.mjs +6 -5
- package/dist/blocks/index.js +28 -30
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +28 -30
- package/dist/blocks/misc/index.mjs +20 -17
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/carousel/index.d.mts +2 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +31 -16
- package/dist/carousel/index.mjs +30 -15
- package/dist/checkbox/index.d.mts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/chip/index.d.mts +1 -1
- package/dist/chip/index.d.ts +1 -1
- package/dist/{chunk-OTGCLEKC.mjs → chunk-2R7F2GL7.mjs} +20 -0
- package/dist/{chunk-POIP5U4M.mjs → chunk-4EGKGSGY.mjs} +1 -1
- package/dist/{chunk-APZM24KK.mjs → chunk-5YXZXYLH.mjs} +15 -18
- package/dist/{chunk-WPSUV4AD.mjs → chunk-F3DQJHTG.mjs} +29 -31
- package/dist/{chunk-VQQ6MUX5.mjs → chunk-FQ6WVEHW.mjs} +1 -1
- package/dist/{chunk-U3TZWNDZ.mjs → chunk-GVJYACGA.mjs} +1 -1
- package/dist/{chunk-Z5SL5QTQ.mjs → chunk-MQUAGP7K.mjs} +20 -0
- package/dist/{chunk-OAXF3RCQ.mjs → chunk-NMS5LCSQ.mjs} +1 -1
- package/dist/{chunk-4IOG44R3.mjs → chunk-OY66MBXP.mjs} +1 -1
- package/dist/{chunk-FDKCMEMD.mjs → chunk-R4HAAT6R.mjs} +1 -1
- package/dist/chunk-WUHNPHD5.mjs +0 -0
- package/dist/chunk-ZFXKCRJC.mjs +11 -0
- package/dist/codeBlock/index.d.mts +2 -1
- package/dist/codeBlock/index.d.ts +2 -1
- package/dist/codeBlock/index.js +21 -17
- package/dist/codeBlock/index.mjs +21 -12
- package/dist/collapsible/index.mjs +2 -0
- package/dist/colorPicker/index.d.mts +4 -0
- package/dist/colorPicker/index.d.ts +4 -0
- package/dist/colorPicker/index.js +80 -23
- package/dist/colorPicker/index.mjs +55 -15
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +1 -1
- package/dist/dataTable/index.mjs +1 -1
- package/dist/elements/index.d.mts +11 -2
- package/dist/elements/index.d.ts +11 -2
- package/dist/elements/index.js +104 -59
- package/dist/elements/index.mjs +69 -33
- package/dist/hooks/index.mjs +1 -0
- package/dist/index.css +377 -202
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +104 -59
- package/dist/index.mjs +117 -60
- package/dist/layout/index.mjs +3 -2
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +2 -2
- package/dist/tabs/index.d.ts +2 -2
- package/dist/tabs/index.js +15 -13
- package/dist/tabs/index.mjs +15 -13
- package/dist/textarea/index.d.mts +1 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +59 -36
- package/dist/textarea/index.mjs +59 -36
- package/package.json +11 -10
- package/dist/commonTypes-cyhMPvmz.d.mts +0 -4
- package/dist/commonTypes-cyhMPvmz.d.ts +0 -4
- /package/dist/{chunk-AREFDTXK.mjs → chunk-D36MPDGE.mjs} +0 -0
package/dist/index.mjs
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
3
|
+
}) : x)(function(x) {
|
4
|
+
if (typeof require !== "undefined")
|
5
|
+
return require.apply(this, arguments);
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
7
|
+
});
|
8
|
+
|
1
9
|
// elements/card/Card.tsx
|
2
10
|
import * as React from "react";
|
3
11
|
|
@@ -7,6 +15,25 @@ import { twMerge } from "tailwind-merge";
|
|
7
15
|
function cn(...inputs) {
|
8
16
|
return twMerge(clsx(inputs));
|
9
17
|
}
|
18
|
+
var parseColor = (color) => {
|
19
|
+
if (color.startsWith("#")) {
|
20
|
+
let r = parseInt(color.slice(1, 3), 16);
|
21
|
+
let g = parseInt(color.slice(3, 5), 16);
|
22
|
+
let b = parseInt(color.slice(5, 7), 16);
|
23
|
+
return [r, g, b];
|
24
|
+
} else if (color.startsWith("rgb")) {
|
25
|
+
return color.match(/\d+/g).map(Number);
|
26
|
+
}
|
27
|
+
return [255, 255, 255];
|
28
|
+
};
|
29
|
+
var calculateLuminance = (color) => {
|
30
|
+
var _a;
|
31
|
+
const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
|
32
|
+
c /= 255;
|
33
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
34
|
+
});
|
35
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
36
|
+
};
|
10
37
|
|
11
38
|
// elements/card/Card.tsx
|
12
39
|
var Card = React.forwardRef(
|
@@ -2473,7 +2500,7 @@ var DataTable = ({
|
|
2473
2500
|
/* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between" }, !props.showCount && /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }), props.showCount && /* @__PURE__ */ React22.createElement(
|
2474
2501
|
"div",
|
2475
2502
|
{
|
2476
|
-
className: "text-
|
2503
|
+
className: "text-muted-foreground text-sm",
|
2477
2504
|
dir: props.direction
|
2478
2505
|
},
|
2479
2506
|
/* @__PURE__ */ React22.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
|
@@ -3259,6 +3286,7 @@ var Textarea = React28.forwardRef(
|
|
3259
3286
|
forceHideHelperText,
|
3260
3287
|
textareaProps,
|
3261
3288
|
countPosition = "bottom",
|
3289
|
+
isLoading,
|
3262
3290
|
...props
|
3263
3291
|
}, ref) => {
|
3264
3292
|
return /* @__PURE__ */ React28.createElement(
|
@@ -3270,12 +3298,20 @@ var Textarea = React28.forwardRef(
|
|
3270
3298
|
className
|
3271
3299
|
)
|
3272
3300
|
},
|
3273
|
-
props.label && /* @__PURE__ */ React28.createElement(Label2, { ...labelProps }, props.label),
|
3274
|
-
|
3301
|
+
/* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React28.createElement(Label2, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React28.createElement(
|
3302
|
+
"div",
|
3303
|
+
{
|
3304
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
3305
|
+
},
|
3306
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
3307
|
+
"/",
|
3308
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
3309
|
+
)),
|
3310
|
+
isLoading ? /* @__PURE__ */ React28.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React28.createElement(
|
3275
3311
|
"textarea",
|
3276
3312
|
{
|
3277
3313
|
className: cn(
|
3278
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
3314
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
3279
3315
|
classNames == null ? void 0 : classNames.textarea
|
3280
3316
|
),
|
3281
3317
|
ref,
|
@@ -3291,20 +3327,7 @@ var Textarea = React28.forwardRef(
|
|
3291
3327
|
)
|
3292
3328
|
},
|
3293
3329
|
props.helperText
|
3294
|
-
), showCount && /* @__PURE__ */ React28.createElement(
|
3295
|
-
"div",
|
3296
|
-
{
|
3297
|
-
className: cn(
|
3298
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
3299
|
-
{
|
3300
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
3301
|
-
}
|
3302
|
-
)
|
3303
|
-
},
|
3304
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
3305
|
-
"/",
|
3306
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
3307
|
-
))
|
3330
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React28.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
3308
3331
|
);
|
3309
3332
|
}
|
3310
3333
|
);
|
@@ -3570,19 +3593,21 @@ var SortButton = (props) => {
|
|
3570
3593
|
import * as React31 from "react";
|
3571
3594
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
3572
3595
|
var TabsContext = React31.createContext({ orientation: "vertical" });
|
3573
|
-
var Tabs = React31.forwardRef(
|
3574
|
-
|
3575
|
-
|
3576
|
-
|
3577
|
-
|
3578
|
-
|
3579
|
-
|
3580
|
-
|
3581
|
-
|
3582
|
-
|
3583
|
-
|
3584
|
-
|
3585
|
-
)
|
3596
|
+
var Tabs = React31.forwardRef(
|
3597
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
3598
|
+
TabsPrimitive.Root,
|
3599
|
+
{
|
3600
|
+
ref,
|
3601
|
+
className: cn(
|
3602
|
+
"hawa-flex hawa-gap-2",
|
3603
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3604
|
+
className
|
3605
|
+
),
|
3606
|
+
...props
|
3607
|
+
},
|
3608
|
+
/* @__PURE__ */ React31.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
3609
|
+
)
|
3610
|
+
);
|
3586
3611
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
3587
3612
|
var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
3588
3613
|
const { orientation } = React31.useContext(TabsContext);
|
@@ -6058,6 +6083,9 @@ var ColorPicker = ({
|
|
6058
6083
|
colorPickerProps,
|
6059
6084
|
textInputProps,
|
6060
6085
|
labelProps,
|
6086
|
+
forceHideHelperText,
|
6087
|
+
isLoading,
|
6088
|
+
preview = false,
|
6061
6089
|
...props
|
6062
6090
|
}) => {
|
6063
6091
|
const [selectedColor, setSelectedColor] = useState12(props.color);
|
@@ -6078,7 +6106,7 @@ var ColorPicker = ({
|
|
6078
6106
|
props.handleChange(e);
|
6079
6107
|
}
|
6080
6108
|
};
|
6081
|
-
return /* @__PURE__ */ React43.createElement("div", { className: "hawa-flex hawa-w-
|
6109
|
+
return /* @__PURE__ */ React43.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React43.createElement(Label2, { ...labelProps }, props.label), isLoading ? /* @__PURE__ */ React43.createElement(Skeleton, { style: { height: 40, width: 148 } }) : /* @__PURE__ */ React43.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React43.createElement(
|
6082
6110
|
"div",
|
6083
6111
|
{
|
6084
6112
|
style: { height: 40, backgroundColor: selectedColor },
|
@@ -6087,6 +6115,7 @@ var ColorPicker = ({
|
|
6087
6115
|
/* @__PURE__ */ React43.createElement(
|
6088
6116
|
"input",
|
6089
6117
|
{
|
6118
|
+
disabled: preview,
|
6090
6119
|
type: "color",
|
6091
6120
|
value: selectedColor,
|
6092
6121
|
onChange: (e) => {
|
@@ -6105,16 +6134,23 @@ var ColorPicker = ({
|
|
6105
6134
|
), /* @__PURE__ */ React43.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React43.createElement(
|
6106
6135
|
"input",
|
6107
6136
|
{
|
6137
|
+
disabled: preview,
|
6108
6138
|
maxLength: 7,
|
6109
6139
|
type: "text",
|
6110
6140
|
onInput: handleTextInputChange,
|
6111
6141
|
value: selectedColor,
|
6112
6142
|
className: cn(
|
6113
|
-
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-
|
6143
|
+
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all",
|
6144
|
+
"hawa-border hawa-border-l-0 hawa-border-l-transparent"
|
6145
|
+
// "hawa-border hawa-border-x-0 hawa-border-x-transparent hawa-border-b-0 hawa-rounded-tr-none"
|
6114
6146
|
),
|
6147
|
+
style: {
|
6148
|
+
backgroundColor: preview ? selectedColor : "hsl(var(--background))",
|
6149
|
+
color: preview ? calculateLuminance(selectedColor) > 0.5 ? "black" : "white" : ""
|
6150
|
+
},
|
6115
6151
|
...textInputProps
|
6116
6152
|
}
|
6117
|
-
))), /* @__PURE__ */ React43.createElement(
|
6153
|
+
))), !forceHideHelperText && /* @__PURE__ */ React43.createElement(
|
6118
6154
|
"p",
|
6119
6155
|
{
|
6120
6156
|
className: cn(
|
@@ -6811,7 +6847,11 @@ var ScrollIndicator = ({
|
|
6811
6847
|
|
6812
6848
|
// elements/codeBlock/CodeBlock.tsx
|
6813
6849
|
import React54, { useState as useState16 } from "react";
|
6814
|
-
import {
|
6850
|
+
import {
|
6851
|
+
Highlight,
|
6852
|
+
themes,
|
6853
|
+
Prism
|
6854
|
+
} from "prism-react-renderer";
|
6815
6855
|
|
6816
6856
|
// hooks/useClipboard.ts
|
6817
6857
|
import { useState as useState15 } from "react";
|
@@ -6840,6 +6880,8 @@ function useClipboard({ timeout = 2e3 } = {}) {
|
|
6840
6880
|
}
|
6841
6881
|
|
6842
6882
|
// elements/codeBlock/CodeBlock.tsx
|
6883
|
+
(typeof global !== "undefined" ? global : window).Prism = Prism;
|
6884
|
+
__require("prismjs/components/prism-bash");
|
6843
6885
|
var CodeBlock = ({
|
6844
6886
|
tabs,
|
6845
6887
|
code,
|
@@ -6852,8 +6894,7 @@ var CodeBlock = ({
|
|
6852
6894
|
}) => {
|
6853
6895
|
const clipboard = useClipboard();
|
6854
6896
|
const [selectedTab, setSelectedTab] = useState16(0);
|
6855
|
-
const
|
6856
|
-
const theme = isDarkMode ? themes.vsDark : themes.vsLight;
|
6897
|
+
const theme = themes.oceanicNext;
|
6857
6898
|
let widthStyles = {
|
6858
6899
|
full: "hawa-w-full",
|
6859
6900
|
md: "hawa-w-full hawa-max-w-md",
|
@@ -6873,15 +6914,15 @@ var CodeBlock = ({
|
|
6873
6914
|
"div",
|
6874
6915
|
{
|
6875
6916
|
className: cn(
|
6876
|
-
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t
|
6877
|
-
fileName && tabs ? "hawa-bg-
|
6917
|
+
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-p-2 hawa-py-0.5 hawa-pb-0 hawa-font-mono hawa-text-foreground",
|
6918
|
+
fileName && tabs ? "hawa-bg-primary/10" : "hawa-bg-primary/15"
|
6878
6919
|
)
|
6879
6920
|
},
|
6880
6921
|
/* @__PURE__ */ React54.createElement(
|
6881
6922
|
"div",
|
6882
6923
|
{
|
6883
6924
|
className: cn(
|
6884
|
-
"mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-1 hawa-py-0.5 hawa-text-center hawa-text-[0.75rem]"
|
6925
|
+
"hawa-font-mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-1 hawa-py-0.5 hawa-text-center hawa-text-[0.75rem]"
|
6885
6926
|
)
|
6886
6927
|
},
|
6887
6928
|
fileName
|
@@ -6891,7 +6932,8 @@ var CodeBlock = ({
|
|
6891
6932
|
"div",
|
6892
6933
|
{
|
6893
6934
|
className: cn(
|
6894
|
-
|
6935
|
+
// hawa-bg-gray-300 dark:hawa-bg-red-600
|
6936
|
+
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-p-1 hawa-bg-primary/15 hawa-pb-0 hawa-font-mono hawa-text-foreground",
|
6895
6937
|
tabs && fileName && "hawa-rounded-t-none"
|
6896
6938
|
)
|
6897
6939
|
},
|
@@ -6908,7 +6950,7 @@ var CodeBlock = ({
|
|
6908
6950
|
{
|
6909
6951
|
onClick: () => setSelectedTab(i),
|
6910
6952
|
className: cn(
|
6911
|
-
"hawa-mb-
|
6953
|
+
"hawa-mb-0.5 hawa-w-full hawa-max-w-[52px] hawa-cursor-pointer hawa-rounded-inner hawa-p-2 hawa-py-0.5 hawa-text-center hawa-text-[0.7rem] hawa-transition-all hover:hawa-bg-muted-foreground/20"
|
6912
6954
|
)
|
6913
6955
|
},
|
6914
6956
|
tab.title
|
@@ -6919,7 +6961,7 @@ var CodeBlock = ({
|
|
6919
6961
|
"div",
|
6920
6962
|
{
|
6921
6963
|
className: cn(
|
6922
|
-
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-
|
6964
|
+
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-700 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
|
6923
6965
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
6924
6966
|
)
|
6925
6967
|
},
|
@@ -6948,12 +6990,12 @@ var CodeBlock = ({
|
|
6948
6990
|
size: "icon",
|
6949
6991
|
onClick: () => clipboard.copy(tabs ? tabs[selectedTab].code : code),
|
6950
6992
|
variant: "outline",
|
6951
|
-
className: "hawa-text-
|
6993
|
+
className: "hawa-text-gray-200 hawa-opacity-50 "
|
6952
6994
|
},
|
6953
6995
|
/* @__PURE__ */ React54.createElement(
|
6954
6996
|
"svg",
|
6955
6997
|
{
|
6956
|
-
"aria-label": "Copy
|
6998
|
+
"aria-label": "Copy",
|
6957
6999
|
stroke: "currentColor",
|
6958
7000
|
fill: "none",
|
6959
7001
|
strokeWidth: "2",
|
@@ -6980,11 +7022,13 @@ var Carousel = ({
|
|
6980
7022
|
showArrows,
|
6981
7023
|
options,
|
6982
7024
|
autoplay,
|
7025
|
+
direction = "ltr",
|
6983
7026
|
autoplayInterval = 3e3,
|
6984
7027
|
...props
|
6985
7028
|
}) => {
|
6986
7029
|
const [emblaRef, emblaApi] = useEmblaCarousel({
|
6987
7030
|
...options,
|
7031
|
+
direction,
|
6988
7032
|
loop: autoplay ? true : (options == null ? void 0 : options.loop) || false
|
6989
7033
|
});
|
6990
7034
|
const [selectedIndex, setSelectedIndex] = useState17(0);
|
@@ -7023,6 +7067,7 @@ var Carousel = ({
|
|
7023
7067
|
))))), /* @__PURE__ */ React55.createElement(
|
7024
7068
|
Dots,
|
7025
7069
|
{
|
7070
|
+
direction,
|
7026
7071
|
itemsLength: length,
|
7027
7072
|
selectedIndex,
|
7028
7073
|
onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
|
@@ -7037,22 +7082,34 @@ var Carousel = ({
|
|
7037
7082
|
}
|
7038
7083
|
));
|
7039
7084
|
};
|
7040
|
-
var Dots = ({
|
7085
|
+
var Dots = ({
|
7086
|
+
onDotClick,
|
7087
|
+
itemsLength,
|
7088
|
+
selectedIndex,
|
7089
|
+
direction
|
7090
|
+
}) => {
|
7041
7091
|
const arr = new Array(itemsLength).fill(0);
|
7042
|
-
return /* @__PURE__ */ React55.createElement(
|
7043
|
-
|
7044
|
-
|
7045
|
-
|
7046
|
-
|
7047
|
-
|
7048
|
-
|
7049
|
-
|
7050
|
-
|
7051
|
-
|
7052
|
-
|
7053
|
-
|
7054
|
-
|
7055
|
-
|
7092
|
+
return /* @__PURE__ */ React55.createElement(
|
7093
|
+
"div",
|
7094
|
+
{
|
7095
|
+
dir: direction,
|
7096
|
+
className: "hawa-z-50 hawa-my-2 hawa-flex hawa-justify-center hawa-gap-1"
|
7097
|
+
},
|
7098
|
+
arr.map((_, index) => {
|
7099
|
+
const selected = index === selectedIndex;
|
7100
|
+
return /* @__PURE__ */ React55.createElement(
|
7101
|
+
"div",
|
7102
|
+
{
|
7103
|
+
key: index,
|
7104
|
+
onClick: () => onDotClick(index),
|
7105
|
+
className: cn(
|
7106
|
+
"hawa-h-2 hawa-rounded-full hawa-bg-primary hawa-transition-all hawa-duration-300 hover:hawa-cursor-pointer",
|
7107
|
+
!selected ? "hawa-w-2 hawa-opacity-50" : "hawa-w-6 hawa-opacity-100"
|
7108
|
+
)
|
7109
|
+
}
|
7110
|
+
);
|
7111
|
+
})
|
7112
|
+
);
|
7056
7113
|
};
|
7057
7114
|
var CarouselControls = (props) => {
|
7058
7115
|
return /* @__PURE__ */ React55.createElement("div", { className: "hawa-flex hawa-justify-end hawa-gap-2 " }, /* @__PURE__ */ React55.createElement(
|
package/dist/layout/index.mjs
CHANGED
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
Sheet,
|
6
6
|
SheetContent,
|
7
7
|
SheetTrigger
|
8
|
-
} from "../chunk-
|
8
|
+
} from "../chunk-FQ6WVEHW.mjs";
|
9
9
|
import {
|
10
10
|
Button,
|
11
11
|
Card,
|
@@ -17,7 +17,8 @@ import {
|
|
17
17
|
Skeleton,
|
18
18
|
Tooltip,
|
19
19
|
cn
|
20
|
-
} from "../chunk-
|
20
|
+
} from "../chunk-MQUAGP7K.mjs";
|
21
|
+
import "../chunk-ZFXKCRJC.mjs";
|
21
22
|
|
22
23
|
// layout/stats/Stats.tsx
|
23
24
|
import React from "react";
|
package/dist/switch/index.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
3
|
-
import { R as RadiusType } from '../commonTypes-
|
3
|
+
import { R as RadiusType } from '../commonTypes-PBumfOBg.mjs';
|
4
4
|
|
5
5
|
interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
6
6
|
size?: "default" | "sm" | "lg";
|
package/dist/switch/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
3
|
-
import { R as RadiusType } from '../commonTypes-
|
3
|
+
import { R as RadiusType } from '../commonTypes-PBumfOBg.js';
|
4
4
|
|
5
5
|
interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
6
6
|
size?: "default" | "sm" | "lg";
|
package/dist/tabs/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default from 'react';
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
4
|
-
import { R as RadiusType
|
4
|
+
import { R as RadiusType } from '../commonTypes-PBumfOBg.mjs';
|
5
5
|
|
6
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
7
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
@@ -21,7 +21,7 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
|
21
21
|
};
|
22
22
|
|
23
23
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
24
|
-
orientation?:
|
24
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
25
25
|
} & React.RefAttributes<HTMLDivElement>>;
|
26
26
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
27
27
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
package/dist/tabs/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default from 'react';
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
4
|
-
import { R as RadiusType
|
4
|
+
import { R as RadiusType } from '../commonTypes-PBumfOBg.js';
|
5
5
|
|
6
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
7
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
@@ -21,7 +21,7 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
|
21
21
|
};
|
22
22
|
|
23
23
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
24
|
-
orientation?:
|
24
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
25
25
|
} & React.RefAttributes<HTMLDivElement>>;
|
26
26
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
27
27
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
package/dist/tabs/index.js
CHANGED
@@ -131,19 +131,21 @@ var Chip = import_react.default.forwardRef(
|
|
131
131
|
|
132
132
|
// elements/tabs/Tabs.tsx
|
133
133
|
var TabsContext = React2.createContext({ orientation: "vertical" });
|
134
|
-
var Tabs = React2.forwardRef(
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
)
|
134
|
+
var Tabs = React2.forwardRef(
|
135
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
136
|
+
TabsPrimitive.Root,
|
137
|
+
{
|
138
|
+
ref,
|
139
|
+
className: cn(
|
140
|
+
"hawa-flex hawa-gap-2",
|
141
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
142
|
+
className
|
143
|
+
),
|
144
|
+
...props
|
145
|
+
},
|
146
|
+
/* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
147
|
+
)
|
148
|
+
);
|
147
149
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
148
150
|
var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
|
149
151
|
const { orientation } = React2.useContext(TabsContext);
|
package/dist/tabs/index.mjs
CHANGED
@@ -89,19 +89,21 @@ var Chip = React.forwardRef(
|
|
89
89
|
|
90
90
|
// elements/tabs/Tabs.tsx
|
91
91
|
var TabsContext = React2.createContext({ orientation: "vertical" });
|
92
|
-
var Tabs = React2.forwardRef(
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
)
|
92
|
+
var Tabs = React2.forwardRef(
|
93
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
94
|
+
TabsPrimitive.Root,
|
95
|
+
{
|
96
|
+
ref,
|
97
|
+
className: cn(
|
98
|
+
"hawa-flex hawa-gap-2",
|
99
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
100
|
+
className
|
101
|
+
),
|
102
|
+
...props
|
103
|
+
},
|
104
|
+
/* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
105
|
+
)
|
106
|
+
);
|
105
107
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
106
108
|
var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
|
107
109
|
const { orientation } = React2.useContext(TabsContext);
|
package/dist/textarea/index.d.ts
CHANGED