@sikka/hawa 0.37.2-next → 0.38.1-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Radio-y9uhxitu.d.ts → Radio-lgoClQrv.d.ts} +2 -2
- package/dist/{Radio-BCD7k628.d.mts → Radio-uQ7DtzcI.d.mts} +2 -2
- package/dist/alert/index.js +43 -19
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +43 -19
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +43 -19
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +43 -19
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +43 -19
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +43 -19
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.d.mts +1 -0
- package/dist/blocks/auth/index.d.ts +1 -0
- package/dist/blocks/auth/index.js +251 -143
- package/dist/blocks/auth/index.mjs +205 -102
- package/dist/blocks/feedback/index.js +47 -59
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.d.mts +2 -1
- package/dist/blocks/index.d.ts +2 -1
- package/dist/blocks/index.js +501 -420
- package/dist/blocks/index.mjs +11 -9
- package/dist/blocks/misc/index.js +48 -51
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +47 -41
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +4 -0
- package/dist/button/index.d.ts +4 -0
- package/dist/button/index.js +43 -19
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +43 -19
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +43 -19
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +43 -19
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/checkbox/index.d.mts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/{chunk-ZTUWU652.mjs → chunk-EZBHA2IL.mjs} +3 -3
- package/dist/{chunk-ODOCZAWC.mjs → chunk-F23GAE2P.mjs} +1 -1
- package/dist/{chunk-DS3AACQJ.mjs → chunk-IC5WYNKN.mjs} +1 -1
- package/dist/{chunk-QXH7ZDMN.mjs → chunk-RTK6REIK.mjs} +3 -11
- package/dist/{chunk-QYWOI3DO.mjs → chunk-UDJFVH2I.mjs} +204 -144
- package/dist/{chunk-BPHQFAWM.mjs → chunk-UJ5SXC3M.mjs} +3 -11
- package/dist/{chunk-PXGL7ZXQ.mjs → chunk-UMOBOCED.mjs} +44 -19
- package/dist/{chunk-RNFJAEEU.mjs → chunk-V7O5MQZQ.mjs} +44 -19
- package/dist/{chunk-BTDR3VAG.mjs → chunk-WDCKXU54.mjs} +4 -21
- package/dist/{chunk-MDHDHEPZ.mjs → chunk-XFSBC5VI.mjs} +3 -11
- package/dist/codeBlock/index.js +43 -19
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +43 -19
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.d.mts +1 -1
- package/dist/colorPicker/index.d.ts +1 -1
- package/dist/colorPicker/index.js +35 -31
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +33 -29
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +1 -1
- package/dist/combobox/index.d.ts +1 -1
- package/dist/combobox/index.js +52 -48
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +52 -48
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dataTable/index.js +44 -29
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +44 -29
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +4 -0
- package/dist/datePicker/index.d.ts +4 -0
- package/dist/datePicker/index.js +44 -19
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +44 -19
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +43 -19
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +43 -19
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +46 -21
- package/dist/elements/index.d.ts +46 -21
- package/dist/elements/index.js +378 -309
- package/dist/elements/index.mjs +14 -23
- package/dist/fileDropzone/index.js +43 -19
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +43 -19
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +29 -3
- package/dist/index.d.mts +48 -22
- package/dist/index.d.ts +48 -22
- package/dist/index.js +808 -737
- package/dist/index.mjs +331 -264
- package/dist/input/index.d.mts +1 -1
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +46 -42
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +45 -41
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +64 -69
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +57 -62
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +43 -19
- package/dist/layout/index.mjs +2 -2
- package/dist/passwordInput/index.js +70 -66
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +59 -55
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +50 -55
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +47 -52
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.d.mts +37 -16
- package/dist/pinInput/index.d.ts +37 -16
- package/dist/pinInput/index.js +208 -78
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +203 -77
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/radio/index.d.mts +1 -1
- package/dist/radio/index.d.ts +1 -1
- package/dist/radio/index.js +55 -60
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +50 -55
- package/dist/radio/index.mjs.map +1 -1
- package/dist/scrollArea/index.js +2 -2
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs +2 -2
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/select/index.js +43 -39
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +43 -39
- package/dist/select/index.mjs.map +1 -1
- package/dist/signature/index.d.mts +1 -1
- package/dist/signature/index.d.ts +1 -1
- package/dist/signature/index.js.map +1 -1
- package/dist/signature/index.mjs.map +1 -1
- package/dist/sortButton/index.js +43 -19
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +43 -19
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +4 -0
- package/dist/splitButton/index.d.ts +4 -0
- package/dist/splitButton/index.js +43 -19
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +43 -19
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.d.mts +1 -1
- package/dist/stats/index.d.ts +1 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs.map +1 -1
- package/dist/tabs/index.js +2 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +2 -2
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/textarea/index.js +34 -30
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +34 -30
- package/dist/textarea/index.mjs.map +1 -1
- package/package.json +2 -1
@@ -5,10 +5,11 @@ import {
|
|
5
5
|
import {
|
6
6
|
Button,
|
7
7
|
Chip,
|
8
|
+
HelperText,
|
8
9
|
Label,
|
9
10
|
Skeleton,
|
10
11
|
cn
|
11
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-V7O5MQZQ.mjs";
|
12
13
|
|
13
14
|
// elements/alert/Alert.tsx
|
14
15
|
import React, { useRef, useState, useEffect } from "react";
|
@@ -288,16 +289,7 @@ var Input = forwardRef(
|
|
288
289
|
inputProps == null ? void 0 : inputProps.className
|
289
290
|
)
|
290
291
|
}
|
291
|
-
)), !forceHideHelperText && /* @__PURE__ */ React2.createElement(
|
292
|
-
"p",
|
293
|
-
{
|
294
|
-
className: cn(
|
295
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
296
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
297
|
-
)
|
298
|
-
},
|
299
|
-
props.helperText
|
300
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React2.createElement(
|
292
|
+
)), !forceHideHelperText && /* @__PURE__ */ React2.createElement(HelperText, { helperText: props.helperText }), !props.disabled && forceHideHelperText && /* @__PURE__ */ React2.createElement(
|
301
293
|
"div",
|
302
294
|
{
|
303
295
|
className: cn(
|
@@ -497,16 +489,7 @@ var Select = ({
|
|
497
489
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
498
490
|
}
|
499
491
|
),
|
500
|
-
!props.hideHelperText && /* @__PURE__ */ React3.createElement(
|
501
|
-
"p",
|
502
|
-
{
|
503
|
-
className: cn(
|
504
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
505
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
506
|
-
)
|
507
|
-
},
|
508
|
-
props.helperText
|
509
|
-
)
|
492
|
+
!props.hideHelperText && /* @__PURE__ */ React3.createElement(HelperText, { helperText: props.helperText })
|
510
493
|
);
|
511
494
|
};
|
512
495
|
|
@@ -2259,16 +2242,7 @@ var PhoneInput = ({
|
|
2259
2242
|
),
|
2260
2243
|
...inputProps
|
2261
2244
|
}
|
2262
|
-
))), /* @__PURE__ */ React4.createElement(
|
2263
|
-
"p",
|
2264
|
-
{
|
2265
|
-
className: cn(
|
2266
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
2267
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
2268
|
-
)
|
2269
|
-
},
|
2270
|
-
props.helperText
|
2271
|
-
));
|
2245
|
+
))), /* @__PURE__ */ React4.createElement(HelperText, { helperText: props.helperText }));
|
2272
2246
|
};
|
2273
2247
|
|
2274
2248
|
// elements/checkbox/Checkbox.tsx
|
@@ -2417,86 +2391,145 @@ var StopPropagationWrapper = (props) => {
|
|
2417
2391
|
};
|
2418
2392
|
|
2419
2393
|
// elements/pinInput/PinInput.tsx
|
2420
|
-
import
|
2421
|
-
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
}
|
2463
|
-
};
|
2464
|
-
return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React7.createElement(
|
2465
|
-
"div",
|
2466
|
-
{
|
2467
|
-
className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
|
2468
|
-
dir: "ltr"
|
2469
|
-
},
|
2470
|
-
pin.map((value, index) => /* @__PURE__ */ React7.createElement(
|
2471
|
-
"input",
|
2394
|
+
import * as React7 from "react";
|
2395
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
2396
|
+
|
2397
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
2398
|
+
import { forwardRef as forwardRef4, createElement as createElement3 } from "react";
|
2399
|
+
|
2400
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
2401
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
2402
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
2403
|
+
return Boolean(className) && array.indexOf(className) === index;
|
2404
|
+
}).join(" ");
|
2405
|
+
|
2406
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
2407
|
+
import { forwardRef as forwardRef3, createElement as createElement2 } from "react";
|
2408
|
+
|
2409
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
2410
|
+
var defaultAttributes = {
|
2411
|
+
xmlns: "http://www.w3.org/2000/svg",
|
2412
|
+
width: 24,
|
2413
|
+
height: 24,
|
2414
|
+
viewBox: "0 0 24 24",
|
2415
|
+
fill: "none",
|
2416
|
+
stroke: "currentColor",
|
2417
|
+
strokeWidth: 2,
|
2418
|
+
strokeLinecap: "round",
|
2419
|
+
strokeLinejoin: "round"
|
2420
|
+
};
|
2421
|
+
|
2422
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
2423
|
+
var Icon = forwardRef3(
|
2424
|
+
({
|
2425
|
+
color = "currentColor",
|
2426
|
+
size = 24,
|
2427
|
+
strokeWidth = 2,
|
2428
|
+
absoluteStrokeWidth,
|
2429
|
+
className = "",
|
2430
|
+
children,
|
2431
|
+
iconNode,
|
2432
|
+
...rest
|
2433
|
+
}, ref) => {
|
2434
|
+
return createElement2(
|
2435
|
+
"svg",
|
2472
2436
|
{
|
2473
|
-
|
2474
|
-
|
2475
|
-
|
2476
|
-
|
2477
|
-
|
2478
|
-
|
2479
|
-
|
2480
|
-
|
2481
|
-
|
2482
|
-
|
2483
|
-
),
|
2484
|
-
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2437
|
+
ref,
|
2438
|
+
...defaultAttributes,
|
2439
|
+
width: size,
|
2440
|
+
height: size,
|
2441
|
+
stroke: color,
|
2442
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
2443
|
+
className: mergeClasses("lucide", className),
|
2444
|
+
...rest
|
2445
|
+
},
|
2446
|
+
[
|
2447
|
+
...iconNode.map(([tag, attrs]) => createElement2(tag, attrs)),
|
2448
|
+
...Array.isArray(children) ? children : [children]
|
2449
|
+
]
|
2450
|
+
);
|
2451
|
+
}
|
2452
|
+
);
|
2453
|
+
|
2454
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
2455
|
+
var createLucideIcon = (iconName, iconNode) => {
|
2456
|
+
const Component = forwardRef4(
|
2457
|
+
({ className, ...props }, ref) => createElement3(Icon, {
|
2458
|
+
ref,
|
2459
|
+
iconNode,
|
2460
|
+
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
2461
|
+
...props
|
2462
|
+
})
|
2463
|
+
);
|
2464
|
+
Component.displayName = `${iconName}`;
|
2465
|
+
return Component;
|
2466
|
+
};
|
2467
|
+
|
2468
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
2469
|
+
var Dot = createLucideIcon("Dot", [
|
2470
|
+
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
2471
|
+
]);
|
2472
|
+
|
2473
|
+
// elements/pinInput/PinInput.tsx
|
2474
|
+
var PinInputRoot = React7.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
2475
|
+
OTPInput,
|
2476
|
+
{
|
2477
|
+
ref,
|
2478
|
+
containerClassName: cn(
|
2479
|
+
"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50",
|
2480
|
+
containerClassName
|
2481
|
+
),
|
2482
|
+
className: cn("disabled:hawa-cursor-not-allowed", className),
|
2483
|
+
...props
|
2484
|
+
}
|
2485
|
+
));
|
2486
|
+
PinInputRoot.displayName = "PinInputRoot";
|
2487
|
+
var PinInputGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
2488
|
+
"div",
|
2489
|
+
{
|
2490
|
+
ref,
|
2491
|
+
className: cn("hawa-flex hawa-items-center", className),
|
2492
|
+
...props
|
2493
|
+
}
|
2494
|
+
));
|
2495
|
+
PinInputGroup.displayName = "PinInputGroup";
|
2496
|
+
var PinInputSlot = React7.forwardRef(({ index, className, ...props }, ref) => {
|
2497
|
+
const pinInputContext = React7.useContext(OTPInputContext);
|
2498
|
+
const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];
|
2499
|
+
return /* @__PURE__ */ React7.createElement(
|
2500
|
+
"div",
|
2492
2501
|
{
|
2502
|
+
ref,
|
2493
2503
|
className: cn(
|
2494
|
-
"hawa-
|
2495
|
-
|
2496
|
-
|
2504
|
+
"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md",
|
2505
|
+
isActive && "hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2",
|
2506
|
+
className
|
2507
|
+
),
|
2508
|
+
...props
|
2497
2509
|
},
|
2498
|
-
|
2499
|
-
|
2510
|
+
char,
|
2511
|
+
hasFakeCaret && /* @__PURE__ */ React7.createElement("div", { className: "hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React7.createElement("div", { className: "hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000" }))
|
2512
|
+
);
|
2513
|
+
});
|
2514
|
+
PinInputSlot.displayName = "PinInputSlot";
|
2515
|
+
var PinInputSeperator = React7.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React7.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React7.createElement(Dot, null)));
|
2516
|
+
PinInputSeperator.displayName = "PinInputSeperator";
|
2517
|
+
var PinInput = ({
|
2518
|
+
separatorPosition = 0,
|
2519
|
+
...props
|
2520
|
+
}) => {
|
2521
|
+
const maxLength = props.maxLength || 6;
|
2522
|
+
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
2523
|
+
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
2524
|
+
const secondGroupLength = maxLength - firstGroupLength;
|
2525
|
+
return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React7.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React7.createElement(PinInputGroup, { className: "hawa-w-full" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React7.createElement(PinInputSlot, { key: index, index, className: "hawa-w-full" }))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React7.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React7.createElement(PinInputGroup, { className: "hawa-w-full" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React7.createElement(
|
2526
|
+
PinInputSlot,
|
2527
|
+
{
|
2528
|
+
key: index + firstGroupLength,
|
2529
|
+
index: index + firstGroupLength,
|
2530
|
+
className: "hawa-w-full"
|
2531
|
+
}
|
2532
|
+
)))), /* @__PURE__ */ React7.createElement(HelperText, { helperText: props.helperText }));
|
2500
2533
|
};
|
2501
2534
|
|
2502
2535
|
// elements/popover/Popover.tsx
|
@@ -2566,8 +2599,8 @@ var PopoverPortal = PopoverPrimitive.Portal;
|
|
2566
2599
|
var PopoverRoot = PopoverPrimitive.Root;
|
2567
2600
|
|
2568
2601
|
// elements/radio/Radio.tsx
|
2569
|
-
import React9, { useState as
|
2570
|
-
var Radio =
|
2602
|
+
import React9, { useState as useState3, useRef as useRef3, useEffect as useEffect3, forwardRef as forwardRef7 } from "react";
|
2603
|
+
var Radio = forwardRef7(
|
2571
2604
|
({
|
2572
2605
|
design = "default",
|
2573
2606
|
width = "default",
|
@@ -2602,12 +2635,12 @@ var Radio = forwardRef4(
|
|
2602
2635
|
const [parentDirection, setParentDirection] = React9.useState(
|
2603
2636
|
null
|
2604
2637
|
);
|
2605
|
-
const [selectedOption, setSelectedOption] =
|
2638
|
+
const [selectedOption, setSelectedOption] = useState3(
|
2606
2639
|
props.defaultValue || props.value
|
2607
2640
|
);
|
2608
|
-
const [openTooltip, setOpenTooltip] =
|
2641
|
+
const [openTooltip, setOpenTooltip] = useState3(null);
|
2609
2642
|
const parentRef = useRef3(null);
|
2610
|
-
|
2643
|
+
useEffect3(() => {
|
2611
2644
|
var _a2;
|
2612
2645
|
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
2613
2646
|
if (parentNode) {
|
@@ -2698,16 +2731,7 @@ var Radio = forwardRef4(
|
|
2698
2731
|
opt.label
|
2699
2732
|
);
|
2700
2733
|
})
|
2701
|
-
), !forceHideHelperText && /* @__PURE__ */ React9.createElement(
|
2702
|
-
"p",
|
2703
|
-
{
|
2704
|
-
className: cn(
|
2705
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
2706
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
2707
|
-
)
|
2708
|
-
},
|
2709
|
-
props.helperText
|
2710
|
-
));
|
2734
|
+
), !forceHideHelperText && /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText }));
|
2711
2735
|
case "bordered":
|
2712
2736
|
return /* @__PURE__ */ React9.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React9.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React9.createElement(
|
2713
2737
|
"div",
|
@@ -2796,16 +2820,7 @@ var Radio = forwardRef4(
|
|
2796
2820
|
},
|
2797
2821
|
opt.label
|
2798
2822
|
)
|
2799
|
-
))), /* @__PURE__ */ React9.createElement(
|
2800
|
-
"p",
|
2801
|
-
{
|
2802
|
-
className: cn(
|
2803
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
2804
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
2805
|
-
)
|
2806
|
-
},
|
2807
|
-
props.helperText
|
2808
|
-
));
|
2823
|
+
))), /* @__PURE__ */ React9.createElement(HelperText, { helperText: props.helperText }));
|
2809
2824
|
}
|
2810
2825
|
}
|
2811
2826
|
);
|
@@ -2853,16 +2868,7 @@ var Textarea = React10.forwardRef(
|
|
2853
2868
|
ref
|
2854
2869
|
}
|
2855
2870
|
),
|
2856
|
-
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React10.createElement(
|
2857
|
-
"p",
|
2858
|
-
{
|
2859
|
-
className: cn(
|
2860
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
2861
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
2862
|
-
)
|
2863
|
-
},
|
2864
|
-
props.helperText
|
2865
|
-
), showCount && countPosition === "bottom" && /* @__PURE__ */ React10.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))
|
2871
|
+
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React10.createElement(HelperText, { helperText: props.helperText }), showCount && countPosition === "bottom" && /* @__PURE__ */ React10.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))
|
2866
2872
|
);
|
2867
2873
|
}
|
2868
2874
|
);
|
@@ -2938,7 +2944,7 @@ var ScrollArea = React11.forwardRef(({ className, children, orientation = "verti
|
|
2938
2944
|
"div",
|
2939
2945
|
{
|
2940
2946
|
className: cn(
|
2941
|
-
"hawa-pointer-events-none hawa-absolute hawa-bg-background
|
2947
|
+
"hawa-pointer-events-none hawa-absolute hawa-bg-background hawa-h-full hawa-w-[50px] hawa-z-10 hawa-start-0 hawa-mask-fade-right",
|
2942
2948
|
showLeftFade ? "hawa-block" : "hawa-hidden"
|
2943
2949
|
)
|
2944
2950
|
}
|
@@ -2947,7 +2953,7 @@ var ScrollArea = React11.forwardRef(({ className, children, orientation = "verti
|
|
2947
2953
|
"div",
|
2948
2954
|
{
|
2949
2955
|
className: cn(
|
2950
|
-
"hawa-pointer-events-none hawa-absolute hawa-bg-background
|
2956
|
+
"hawa-pointer-events-none hawa-absolute hawa-bg-background hawa-mask-fade-left hawa-end-0 hawa-h-full hawa-w-[50px] hawa-z-10 ",
|
2951
2957
|
showRightFade ? "hawa-block" : "hawa-hidden"
|
2952
2958
|
)
|
2953
2959
|
}
|
@@ -3264,6 +3270,10 @@ export {
|
|
3264
3270
|
PhoneInput,
|
3265
3271
|
Checkbox,
|
3266
3272
|
StopPropagationWrapper,
|
3273
|
+
PinInputRoot,
|
3274
|
+
PinInputGroup,
|
3275
|
+
PinInputSlot,
|
3276
|
+
PinInputSeperator,
|
3267
3277
|
PinInput,
|
3268
3278
|
PopoverContent,
|
3269
3279
|
Popover,
|
@@ -3281,3 +3291,53 @@ export {
|
|
3281
3291
|
Separator,
|
3282
3292
|
Progress
|
3283
3293
|
};
|
3294
|
+
/*! Bundled license information:
|
3295
|
+
|
3296
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
3297
|
+
(**
|
3298
|
+
* @license lucide-react v0.379.0 - ISC
|
3299
|
+
*
|
3300
|
+
* This source code is licensed under the ISC license.
|
3301
|
+
* See the LICENSE file in the root directory of this source tree.
|
3302
|
+
*)
|
3303
|
+
|
3304
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
3305
|
+
(**
|
3306
|
+
* @license lucide-react v0.379.0 - ISC
|
3307
|
+
*
|
3308
|
+
* This source code is licensed under the ISC license.
|
3309
|
+
* See the LICENSE file in the root directory of this source tree.
|
3310
|
+
*)
|
3311
|
+
|
3312
|
+
lucide-react/dist/esm/Icon.js:
|
3313
|
+
(**
|
3314
|
+
* @license lucide-react v0.379.0 - ISC
|
3315
|
+
*
|
3316
|
+
* This source code is licensed under the ISC license.
|
3317
|
+
* See the LICENSE file in the root directory of this source tree.
|
3318
|
+
*)
|
3319
|
+
|
3320
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
3321
|
+
(**
|
3322
|
+
* @license lucide-react v0.379.0 - ISC
|
3323
|
+
*
|
3324
|
+
* This source code is licensed under the ISC license.
|
3325
|
+
* See the LICENSE file in the root directory of this source tree.
|
3326
|
+
*)
|
3327
|
+
|
3328
|
+
lucide-react/dist/esm/icons/dot.js:
|
3329
|
+
(**
|
3330
|
+
* @license lucide-react v0.379.0 - ISC
|
3331
|
+
*
|
3332
|
+
* This source code is licensed under the ISC license.
|
3333
|
+
* See the LICENSE file in the root directory of this source tree.
|
3334
|
+
*)
|
3335
|
+
|
3336
|
+
lucide-react/dist/esm/lucide-react.js:
|
3337
|
+
(**
|
3338
|
+
* @license lucide-react v0.379.0 - ISC
|
3339
|
+
*
|
3340
|
+
* This source code is licensed under the ISC license.
|
3341
|
+
* See the LICENSE file in the root directory of this source tree.
|
3342
|
+
*)
|
3343
|
+
*/
|
@@ -1,9 +1,10 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
+
HelperText,
|
3
4
|
Label,
|
4
5
|
Skeleton,
|
5
6
|
cn
|
6
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-UMOBOCED.mjs";
|
7
8
|
|
8
9
|
// elements/textarea/Textarea.tsx
|
9
10
|
import * as React from "react";
|
@@ -48,16 +49,7 @@ var Textarea = React.forwardRef(
|
|
48
49
|
ref
|
49
50
|
}
|
50
51
|
),
|
51
|
-
/* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React.createElement(
|
52
|
-
"p",
|
53
|
-
{
|
54
|
-
className: cn(
|
55
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
56
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
57
|
-
)
|
58
|
-
},
|
59
|
-
props.helperText
|
60
|
-
), showCount && countPosition === "bottom" && /* @__PURE__ */ React.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))
|
52
|
+
/* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React.createElement(HelperText, { helperText: props.helperText }), showCount && countPosition === "bottom" && /* @__PURE__ */ React.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))
|
61
53
|
);
|
62
54
|
}
|
63
55
|
);
|
@@ -399,30 +399,54 @@ var Button = React5.forwardRef(
|
|
399
399
|
children,
|
400
400
|
labelProps,
|
401
401
|
showHelperText = false,
|
402
|
+
inForm = false,
|
402
403
|
...props
|
403
404
|
}, ref) => {
|
404
405
|
const Comp = "button";
|
405
406
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
className: cn(
|
410
|
-
buttonVariants({ variant, size, className }),
|
411
|
-
centered && "hawa-justify-center"
|
412
|
-
),
|
413
|
-
ref,
|
414
|
-
...props
|
415
|
-
},
|
416
|
-
isLoading ? /* @__PURE__ */ React5.createElement(
|
417
|
-
Loading,
|
407
|
+
if (inForm) {
|
408
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
|
409
|
+
Comp,
|
418
410
|
{
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
411
|
+
className: cn(
|
412
|
+
buttonVariants({ variant, size, className }),
|
413
|
+
centered && "hawa-justify-center"
|
414
|
+
),
|
415
|
+
ref,
|
416
|
+
...props
|
417
|
+
},
|
418
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
419
|
+
Loading,
|
420
|
+
{
|
421
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
422
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
423
|
+
color: loadingColor,
|
424
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
425
|
+
}
|
426
|
+
) : children
|
427
|
+
), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
|
428
|
+
} else {
|
429
|
+
return /* @__PURE__ */ React5.createElement(
|
430
|
+
Comp,
|
431
|
+
{
|
432
|
+
className: cn(
|
433
|
+
buttonVariants({ variant, size, className }),
|
434
|
+
centered && "hawa-justify-center"
|
435
|
+
),
|
436
|
+
ref,
|
437
|
+
...props
|
438
|
+
},
|
439
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
440
|
+
Loading,
|
441
|
+
{
|
442
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
443
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
444
|
+
color: loadingColor,
|
445
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
446
|
+
}
|
447
|
+
) : children
|
448
|
+
);
|
449
|
+
}
|
426
450
|
}
|
427
451
|
);
|
428
452
|
Button.displayName = "Button";
|
@@ -557,6 +581,7 @@ function Skeleton({
|
|
557
581
|
|
558
582
|
export {
|
559
583
|
cn,
|
584
|
+
HelperText,
|
560
585
|
Tooltip,
|
561
586
|
Label,
|
562
587
|
Loading,
|
@@ -420,30 +420,54 @@ var Button = React5.forwardRef(
|
|
420
420
|
children,
|
421
421
|
labelProps,
|
422
422
|
showHelperText = false,
|
423
|
+
inForm = false,
|
423
424
|
...props
|
424
425
|
}, ref) => {
|
425
426
|
const Comp = "button";
|
426
427
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
className: cn(
|
431
|
-
buttonVariants({ variant, size, className }),
|
432
|
-
centered && "hawa-justify-center"
|
433
|
-
),
|
434
|
-
ref,
|
435
|
-
...props
|
436
|
-
},
|
437
|
-
isLoading ? /* @__PURE__ */ React5.createElement(
|
438
|
-
Loading,
|
428
|
+
if (inForm) {
|
429
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
|
430
|
+
Comp,
|
439
431
|
{
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
432
|
+
className: cn(
|
433
|
+
buttonVariants({ variant, size, className }),
|
434
|
+
centered && "hawa-justify-center"
|
435
|
+
),
|
436
|
+
ref,
|
437
|
+
...props
|
438
|
+
},
|
439
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
440
|
+
Loading,
|
441
|
+
{
|
442
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
443
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
444
|
+
color: loadingColor,
|
445
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
446
|
+
}
|
447
|
+
) : children
|
448
|
+
), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
|
449
|
+
} else {
|
450
|
+
return /* @__PURE__ */ React5.createElement(
|
451
|
+
Comp,
|
452
|
+
{
|
453
|
+
className: cn(
|
454
|
+
buttonVariants({ variant, size, className }),
|
455
|
+
centered && "hawa-justify-center"
|
456
|
+
),
|
457
|
+
ref,
|
458
|
+
...props
|
459
|
+
},
|
460
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
461
|
+
Loading,
|
462
|
+
{
|
463
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
464
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
465
|
+
color: loadingColor,
|
466
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
467
|
+
}
|
468
|
+
) : children
|
469
|
+
);
|
470
|
+
}
|
447
471
|
}
|
448
472
|
);
|
449
473
|
Button.displayName = "Button";
|
@@ -1601,6 +1625,7 @@ var MenuIcon = () => /* @__PURE__ */ React13.createElement(
|
|
1601
1625
|
export {
|
1602
1626
|
cn,
|
1603
1627
|
calculateLuminance,
|
1628
|
+
HelperText,
|
1604
1629
|
Tooltip,
|
1605
1630
|
Label,
|
1606
1631
|
Loading,
|