@sikka/hawa 0.25.0-next → 0.25.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/blocks/auth/index.js +1 -0
- package/dist/blocks/auth/index.mjs +1 -0
- package/dist/blocks/index.js +1 -0
- package/dist/blocks/index.mjs +1 -1
- package/dist/chunk-KNHT2UBG.mjs +150 -0
- package/dist/{chunk-XE3FLWLT.mjs → chunk-MJMQDUCC.mjs} +1 -0
- 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-3J1E3b61.d.mts → commonTypes-f_LVO3Sm.d.mts} +1 -2
- package/dist/{commonTypes-3J1E3b61.d.ts → commonTypes-f_LVO3Sm.d.ts} +1 -2
- package/dist/elements/index.js +1 -0
- package/dist/elements/index.mjs +1 -1
- package/dist/glow/index.d.mts +16 -0
- package/dist/glow/index.d.ts +16 -0
- package/dist/glow/index.js +155 -0
- package/dist/glow/index.mjs +117 -0
- package/dist/index.css +212 -206
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/input/index.d.mts +9 -2
- package/dist/input/index.d.ts +9 -2
- package/dist/input/index.mjs +1 -1
- package/dist/interfaceSettings/index.mjs +1 -1
- package/dist/label/index.d.mts +2 -1
- package/dist/label/index.d.ts +2 -1
- package/dist/label/index.mjs +98 -2
- package/dist/navigationMenu/index.d.mts +1 -2
- package/dist/navigationMenu/index.d.ts +1 -2
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/passwordInput/index.mjs +148 -27
- package/dist/phoneInput/index.d.mts +1 -1
- package/dist/phoneInput/index.d.ts +1 -1
- package/dist/phoneInput/index.mjs +140 -19
- package/dist/pinInput/index.js +1 -0
- package/dist/pinInput/index.mjs +1 -0
- package/dist/popover/index.d.mts +1 -2
- package/dist/popover/index.d.ts +1 -2
- package/dist/radio/index.d.mts +4 -1
- package/dist/radio/index.d.ts +4 -1
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/simpleTable/index.d.mts +1 -2
- package/dist/simpleTable/index.d.ts +1 -2
- package/dist/simpleTable/index.mjs +45 -21
- package/dist/skeleton/index.mjs +29 -3
- package/dist/sortButton/index.mjs +260 -9
- package/dist/splitButton/index.d.mts +3 -4
- package/dist/splitButton/index.d.ts +3 -4
- package/dist/splitButton/index.mjs +259 -10
- package/dist/switch/index.d.mts +1 -2
- package/dist/switch/index.d.ts +1 -2
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toast/index.mjs +9 -139
- package/dist/toaster/index.d.mts +2 -2
- package/dist/toaster/index.d.ts +2 -2
- package/dist/toaster/index.mjs +17 -146
- package/dist/tooltip/index.d.mts +2 -2
- package/dist/tooltip/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-53XBVEMK.mjs +0 -131
- package/dist/chunk-DGWAHQRX.mjs +0 -259
- package/dist/chunk-ND4BWUKH.mjs +0 -34
- package/dist/commonTypes-LrR8QrYP.d.mts +0 -5
- package/dist/commonTypes-LrR8QrYP.d.ts +0 -5
- package/dist/{chunk-ABS2VEET.mjs → chunk-WRZFWCOQ.mjs} +3 -3
@@ -1,12 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
Button
|
3
|
-
} from "../chunk-DGWAHQRX.mjs";
|
4
1
|
import {
|
5
2
|
cn
|
6
3
|
} from "../chunk-TE3BKEXL.mjs";
|
7
4
|
|
8
5
|
// components/elements/splitButton/SplitButton.tsx
|
9
|
-
import * as
|
6
|
+
import * as React4 from "react";
|
10
7
|
|
11
8
|
// components/elements/dropdownMenu/DropdownMenu.tsx
|
12
9
|
import * as React from "react";
|
@@ -336,6 +333,258 @@ var DropdownMenu = ({
|
|
336
333
|
);
|
337
334
|
};
|
338
335
|
|
336
|
+
// components/elements/button/Button.tsx
|
337
|
+
import * as React3 from "react";
|
338
|
+
import { cva } from "class-variance-authority";
|
339
|
+
|
340
|
+
// components/elements/loading/Loading.tsx
|
341
|
+
import React2 from "react";
|
342
|
+
var Loading = ({
|
343
|
+
design = "spinner",
|
344
|
+
size = "sm",
|
345
|
+
themeMode = "light",
|
346
|
+
color,
|
347
|
+
...props
|
348
|
+
}) => {
|
349
|
+
let sizeStyles = {
|
350
|
+
button: "hawa-h-4 hawa-w-4",
|
351
|
+
xs: "hawa-h-1 hawa-w-1",
|
352
|
+
sm: "hawa-h-6 hawa-w-6",
|
353
|
+
normal: "hawa-h-8 hawa-w-8",
|
354
|
+
lg: "hawa-h-14 hawa-w-14",
|
355
|
+
xl: "hawa-h-24 hawa-w-24"
|
356
|
+
};
|
357
|
+
let animationStyles = {
|
358
|
+
pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
|
359
|
+
bounce: "hawa-animate-bounce"
|
360
|
+
};
|
361
|
+
switch (design.split("-")[0]) {
|
362
|
+
case "dots":
|
363
|
+
return /* @__PURE__ */ React2.createElement(
|
364
|
+
"div",
|
365
|
+
{
|
366
|
+
className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
|
367
|
+
},
|
368
|
+
/* @__PURE__ */ React2.createElement(
|
369
|
+
"div",
|
370
|
+
{
|
371
|
+
className: cn(
|
372
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
373
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
374
|
+
animationStyles[design.split("-")[1]],
|
375
|
+
color ? color : "hawa-bg-primary"
|
376
|
+
)
|
377
|
+
}
|
378
|
+
),
|
379
|
+
/* @__PURE__ */ React2.createElement(
|
380
|
+
"div",
|
381
|
+
{
|
382
|
+
className: cn(
|
383
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
384
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
385
|
+
animationStyles[design.split("-")[1]],
|
386
|
+
color ? color : "hawa-bg-primary"
|
387
|
+
)
|
388
|
+
}
|
389
|
+
),
|
390
|
+
/* @__PURE__ */ React2.createElement(
|
391
|
+
"div",
|
392
|
+
{
|
393
|
+
className: cn(
|
394
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
395
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
396
|
+
animationStyles[design.split("-")[1]],
|
397
|
+
color ? color : "hawa-bg-primary"
|
398
|
+
)
|
399
|
+
}
|
400
|
+
)
|
401
|
+
);
|
402
|
+
case "square":
|
403
|
+
return /* @__PURE__ */ React2.createElement(
|
404
|
+
"svg",
|
405
|
+
{
|
406
|
+
className: cn("squircle-container", sizeStyles[size]),
|
407
|
+
viewBox: "0 0 35 35",
|
408
|
+
height: "35",
|
409
|
+
width: "35"
|
410
|
+
},
|
411
|
+
/* @__PURE__ */ React2.createElement(
|
412
|
+
"rect",
|
413
|
+
{
|
414
|
+
className: "squircle-track",
|
415
|
+
x: "2.5",
|
416
|
+
y: "2.5",
|
417
|
+
fill: "none",
|
418
|
+
strokeWidth: "5px",
|
419
|
+
width: "32.5",
|
420
|
+
height: "32.5"
|
421
|
+
}
|
422
|
+
),
|
423
|
+
/* @__PURE__ */ React2.createElement(
|
424
|
+
"rect",
|
425
|
+
{
|
426
|
+
className: "square-car",
|
427
|
+
x: "2.5",
|
428
|
+
y: "2.5",
|
429
|
+
fill: "none",
|
430
|
+
strokeWidth: "5px",
|
431
|
+
width: "32.5",
|
432
|
+
height: "32.5",
|
433
|
+
pathLength: "100"
|
434
|
+
}
|
435
|
+
)
|
436
|
+
);
|
437
|
+
case "squircle":
|
438
|
+
return /* @__PURE__ */ React2.createElement(
|
439
|
+
"svg",
|
440
|
+
{
|
441
|
+
className: cn("squircle-container", sizeStyles[size]),
|
442
|
+
x: "0px",
|
443
|
+
y: "0px",
|
444
|
+
viewBox: "0 0 37 37",
|
445
|
+
height: "37",
|
446
|
+
width: "37",
|
447
|
+
preserveAspectRatio: "xMidYMid meet"
|
448
|
+
},
|
449
|
+
/* @__PURE__ */ React2.createElement(
|
450
|
+
"path",
|
451
|
+
{
|
452
|
+
className: "squircle-track",
|
453
|
+
fill: "none",
|
454
|
+
strokeWidth: "5",
|
455
|
+
pathLength: "100",
|
456
|
+
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
457
|
+
}
|
458
|
+
),
|
459
|
+
/* @__PURE__ */ React2.createElement(
|
460
|
+
"path",
|
461
|
+
{
|
462
|
+
className: "squircle-car",
|
463
|
+
fill: "none",
|
464
|
+
strokeWidth: "5",
|
465
|
+
pathLength: "100",
|
466
|
+
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
467
|
+
}
|
468
|
+
)
|
469
|
+
);
|
470
|
+
case "progress":
|
471
|
+
return /* @__PURE__ */ React2.createElement("div", { className: "progress-loading" });
|
472
|
+
case "orbit":
|
473
|
+
return /* @__PURE__ */ React2.createElement("div", { className: "orbit-container" });
|
474
|
+
default:
|
475
|
+
return /* @__PURE__ */ React2.createElement(
|
476
|
+
"svg",
|
477
|
+
{
|
478
|
+
className: cn("circle-container", sizeStyles[size]),
|
479
|
+
viewBox: "0 0 40 40",
|
480
|
+
height: "40",
|
481
|
+
width: "40"
|
482
|
+
},
|
483
|
+
/* @__PURE__ */ React2.createElement(
|
484
|
+
"circle",
|
485
|
+
{
|
486
|
+
className: cn("circle-track", {
|
487
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
488
|
+
"hawa-stroke-primary": themeMode === "light"
|
489
|
+
}),
|
490
|
+
cx: "20",
|
491
|
+
cy: "20",
|
492
|
+
r: "17.5",
|
493
|
+
pathLength: "100",
|
494
|
+
strokeWidth: "5px",
|
495
|
+
fill: "none"
|
496
|
+
}
|
497
|
+
),
|
498
|
+
/* @__PURE__ */ React2.createElement(
|
499
|
+
"circle",
|
500
|
+
{
|
501
|
+
className: cn("circle-car", {
|
502
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
503
|
+
"hawa-stroke-primary": themeMode === "light"
|
504
|
+
}),
|
505
|
+
cx: "20",
|
506
|
+
cy: "20",
|
507
|
+
r: "17.5",
|
508
|
+
pathLength: "100",
|
509
|
+
strokeWidth: "5px",
|
510
|
+
fill: "none"
|
511
|
+
}
|
512
|
+
)
|
513
|
+
);
|
514
|
+
}
|
515
|
+
};
|
516
|
+
|
517
|
+
// components/elements/button/Button.tsx
|
518
|
+
var buttonVariants = cva(
|
519
|
+
"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium 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",
|
520
|
+
{
|
521
|
+
variants: {
|
522
|
+
variant: {
|
523
|
+
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
524
|
+
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
525
|
+
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
526
|
+
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
527
|
+
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
528
|
+
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
529
|
+
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
530
|
+
combobox: "hawa-bg-background hawa-border",
|
531
|
+
neoBrutalism: "neo-brutalism"
|
532
|
+
// "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active",
|
533
|
+
},
|
534
|
+
size: {
|
535
|
+
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
536
|
+
heightless: "hawa-px-4 hawa-py-4",
|
537
|
+
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
538
|
+
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
539
|
+
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
540
|
+
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
541
|
+
icon: "hawa-h-10 hawa-w-10",
|
542
|
+
smallIcon: "hawa-h-7 hawa-w-7"
|
543
|
+
}
|
544
|
+
},
|
545
|
+
defaultVariants: {
|
546
|
+
variant: "default",
|
547
|
+
size: "default"
|
548
|
+
}
|
549
|
+
}
|
550
|
+
);
|
551
|
+
var Button = React3.forwardRef(
|
552
|
+
({
|
553
|
+
className,
|
554
|
+
variant,
|
555
|
+
size,
|
556
|
+
asChild = false,
|
557
|
+
centered = true,
|
558
|
+
isLoading,
|
559
|
+
children,
|
560
|
+
...props
|
561
|
+
}, ref) => {
|
562
|
+
const Comp = "button";
|
563
|
+
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
564
|
+
return /* @__PURE__ */ React3.createElement(
|
565
|
+
Comp,
|
566
|
+
{
|
567
|
+
className: cn(
|
568
|
+
buttonVariants({ variant, size, className }),
|
569
|
+
centered && "hawa-justify-center"
|
570
|
+
),
|
571
|
+
ref,
|
572
|
+
...props
|
573
|
+
},
|
574
|
+
isLoading ? /* @__PURE__ */ React3.createElement(
|
575
|
+
Loading,
|
576
|
+
{
|
577
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
578
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
579
|
+
color: loadingColor,
|
580
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
581
|
+
}
|
582
|
+
) : children
|
583
|
+
);
|
584
|
+
}
|
585
|
+
);
|
586
|
+
Button.displayName = "Button";
|
587
|
+
|
339
588
|
// components/elements/splitButton/SplitButton.tsx
|
340
589
|
var SplitButton = ({
|
341
590
|
variant,
|
@@ -343,13 +592,13 @@ var SplitButton = ({
|
|
343
592
|
menuItems = [],
|
344
593
|
children,
|
345
594
|
...props
|
346
|
-
}) => /* @__PURE__ */
|
595
|
+
}) => /* @__PURE__ */ React4.createElement(
|
347
596
|
"div",
|
348
597
|
{
|
349
598
|
dir: "ltr",
|
350
599
|
className: cn("hawa-row hawa-flex hawa-h-fit hawa-justify-center")
|
351
600
|
},
|
352
|
-
/* @__PURE__ */
|
601
|
+
/* @__PURE__ */ React4.createElement(
|
353
602
|
Button,
|
354
603
|
{
|
355
604
|
variant,
|
@@ -358,7 +607,7 @@ var SplitButton = ({
|
|
358
607
|
},
|
359
608
|
children
|
360
609
|
),
|
361
|
-
/* @__PURE__ */
|
610
|
+
/* @__PURE__ */ React4.createElement(
|
362
611
|
DropdownMenu,
|
363
612
|
{
|
364
613
|
size: "sm",
|
@@ -366,7 +615,7 @@ var SplitButton = ({
|
|
366
615
|
direction,
|
367
616
|
align: direction === "rtl" ? "start" : "end",
|
368
617
|
items: menuItems,
|
369
|
-
trigger: /* @__PURE__ */
|
618
|
+
trigger: /* @__PURE__ */ React4.createElement(
|
370
619
|
Button,
|
371
620
|
{
|
372
621
|
asChild: true,
|
@@ -377,7 +626,7 @@ var SplitButton = ({
|
|
377
626
|
props.className
|
378
627
|
)
|
379
628
|
},
|
380
|
-
/* @__PURE__ */
|
629
|
+
/* @__PURE__ */ React4.createElement(
|
381
630
|
"svg",
|
382
631
|
{
|
383
632
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -390,7 +639,7 @@ var SplitButton = ({
|
|
390
639
|
strokeLinecap: "round",
|
391
640
|
strokeLinejoin: "round"
|
392
641
|
},
|
393
|
-
/* @__PURE__ */
|
642
|
+
/* @__PURE__ */ React4.createElement("path", { d: "m6 9 6 6 6-6" })
|
394
643
|
)
|
395
644
|
)
|
396
645
|
}
|
package/dist/switch/index.d.mts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
3
|
-
|
4
|
-
type RadiusType = "full" | "inherit" | "none";
|
3
|
+
import { R as RadiusType } from '../commonTypes-2k6FnHw5.mjs';
|
5
4
|
|
6
5
|
interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
7
6
|
size?: "default" | "sm" | "lg";
|
package/dist/switch/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
3
|
-
|
4
|
-
type RadiusType = "full" | "inherit" | "none";
|
3
|
+
import { R as RadiusType } from '../commonTypes-2k6FnHw5.js';
|
5
4
|
|
6
5
|
interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
7
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, O as OrientationType } from '../commonTypes-
|
4
|
+
import { R as RadiusType, O as OrientationType } from '../commonTypes-f_LVO3Sm.mjs';
|
5
5
|
|
6
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
7
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
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, O as OrientationType } from '../commonTypes-
|
4
|
+
import { R as RadiusType, O as OrientationType } from '../commonTypes-f_LVO3Sm.js';
|
5
5
|
|
6
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
7
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
package/dist/textarea/index.d.ts
CHANGED
package/dist/toast/index.d.mts
CHANGED
@@ -2,7 +2,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
2
2
|
import * as React from 'react';
|
3
3
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
5
|
-
import { D as DirectionType } from '../commonTypes-
|
5
|
+
import { D as DirectionType } from '../commonTypes-_11epZYh.mjs';
|
6
6
|
|
7
7
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
8
8
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
package/dist/toast/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
2
2
|
import * as React from 'react';
|
3
3
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
5
|
-
import { D as DirectionType } from '../commonTypes-
|
5
|
+
import { D as DirectionType } from '../commonTypes-_11epZYh.js';
|
6
6
|
|
7
7
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
8
8
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
package/dist/toast/index.mjs
CHANGED
@@ -1,143 +1,13 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{
|
12
|
-
variants: {
|
13
|
-
variant: {
|
14
|
-
default: "hawa-border hawa-bg-background hawa-text-foreground",
|
15
|
-
destructive: "hawa-destructive hawa-group hawa-border-destructive hawa-bg-destructive hawa-text-destructive-foreground"
|
16
|
-
},
|
17
|
-
severity: {
|
18
|
-
info: "hawa-info hawa-group hawa-text-info-foreground hawa-bg-info",
|
19
|
-
warning: "hawa-warning hawa-group hawa-text-warning-foreground hawa-bg-warning",
|
20
|
-
error: "hawa-error hawa-group hawa-border-error hawa-bg-error hawa-text-white",
|
21
|
-
success: "hawa-success hawa-group hawa-text-success-foreground hawa-bg-success",
|
22
|
-
none: ""
|
23
|
-
}
|
24
|
-
},
|
25
|
-
defaultVariants: { variant: "default" }
|
26
|
-
}
|
27
|
-
);
|
28
|
-
var sizeStyles = {
|
29
|
-
default: "hawa-text-sm",
|
30
|
-
// Update this based on the desired padding for rtl
|
31
|
-
sm: "hawa-text-xs"
|
32
|
-
};
|
33
|
-
var ToastProvider = ToastPrimitives.Provider;
|
34
|
-
var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
35
|
-
ToastPrimitives.Viewport,
|
36
|
-
{
|
37
|
-
ref,
|
38
|
-
className: cn(
|
39
|
-
"hawa-fixed hawa-top-0 hawa-z-[100] hawa-flex hawa-max-h-screen hawa-w-full hawa-flex-col-reverse hawa-p-4 sm:hawa-bottom-0 sm:hawa-right-0 sm:hawa-top-auto sm:hawa-flex-col md:hawa-max-w-[420px]",
|
40
|
-
className
|
41
|
-
),
|
42
|
-
...props
|
43
|
-
}
|
44
|
-
));
|
45
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
46
|
-
var Toast = React.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
47
|
-
return /* @__PURE__ */ React.createElement(
|
48
|
-
ToastPrimitives.Root,
|
49
|
-
{
|
50
|
-
ref,
|
51
|
-
className: cn(
|
52
|
-
toastVariants({ variant, severity }),
|
53
|
-
className,
|
54
|
-
direction === "rtl" ? "data-[state=closed]:hawa-slide-out-to-left-full" : "data-[state=closed]:hawa-slide-out-to-right-full"
|
55
|
-
),
|
56
|
-
dir: direction,
|
57
|
-
...props
|
58
|
-
}
|
59
|
-
);
|
60
|
-
});
|
61
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
62
|
-
var ToastAction = React.forwardRef(({ className, ...props }, ref) => {
|
63
|
-
return /* @__PURE__ */ React.createElement(
|
64
|
-
ToastPrimitives.Action,
|
65
|
-
{
|
66
|
-
ref,
|
67
|
-
className: cn(
|
68
|
-
"hawa-inline-flex hawa-h-8 hawa-shrink-0 hawa-items-center hawa-justify-center hawa-rounded-md hawa-border hawa-bg-transparent hawa-px-3 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors hover:hawa-bg-secondary hover:hawa-text-secondary-foreground focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
69
|
-
"group-[.info]:hawa-border-muted/40 group-[.info]:hover:hawa-border-info/30 group-[.info]:hover:hawa-bg-info group-[.info]:hover:hawa-text-info-foreground group-[.info]:focus:hawa-ring-info",
|
70
|
-
"group-[.error]:hawa-border-muted/40 group-[.error]:hover:hawa-border-error/30 group-[.error]:hover:hawa-bg-error group-[.error]:hover:hawa-text-error-foreground group-[.error]:focus:hawa-ring-error",
|
71
|
-
"group-[.success]:hawa-border-muted/40 group-[.success]:hover:hawa-border-success/30 group-[.success]:hover:hawa-bg-success group-[.success]:hover:hawa-text-success-foreground group-[.success]:focus:hawa-ring-success",
|
72
|
-
"group-[.warning]:hawa-border-muted/40 group-[.warning]:hover:hawa-border-warning/30 group-[.warning]:hover:hawa-bg-warning group-[.warning]:hover:hawa-text-warning-foreground group-[.warning]:focus:hawa-ring-warning",
|
73
|
-
"hawa-whitespace-nowrap",
|
74
|
-
className
|
75
|
-
),
|
76
|
-
...props
|
77
|
-
}
|
78
|
-
);
|
79
|
-
});
|
80
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
81
|
-
var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
82
|
-
ToastPrimitives.Close,
|
83
|
-
{
|
84
|
-
ref,
|
85
|
-
className: cn(
|
86
|
-
// "hawa-absolute hawa-start-2 hawa-top-2",
|
87
|
-
// "group-hover:hawa-opacity-100",
|
88
|
-
"hawa-opacity-100",
|
89
|
-
"hawa-rounded-md hawa-p-1 hawa-text-foreground/50 hawa-transition-opacity hover:hawa-text-foreground focus:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 group-[.destructive]:hawa-text-red-300 group-[.destructive]:hover:hawa-text-red-50 group-[.destructive]:focus:hawa-ring-red-400 group-[.destructive]:focus:hawa-ring-offset-red-600",
|
90
|
-
className
|
91
|
-
),
|
92
|
-
"toast-close": "",
|
93
|
-
...props
|
94
|
-
},
|
95
|
-
/* @__PURE__ */ React.createElement(
|
96
|
-
"svg",
|
97
|
-
{
|
98
|
-
"aria-label": "Close Icon",
|
99
|
-
"aria-hidden": "true",
|
100
|
-
className: "hawa-icon",
|
101
|
-
fill: "currentColor",
|
102
|
-
viewBox: "0 0 20 20"
|
103
|
-
},
|
104
|
-
/* @__PURE__ */ React.createElement(
|
105
|
-
"path",
|
106
|
-
{
|
107
|
-
fillRule: "evenodd",
|
108
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
109
|
-
clipRule: "evenodd"
|
110
|
-
}
|
111
|
-
)
|
112
|
-
)
|
113
|
-
));
|
114
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
115
|
-
var ToastTitle = React.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
116
|
-
ToastPrimitives.Title,
|
117
|
-
{
|
118
|
-
ref,
|
119
|
-
className: cn(
|
120
|
-
"hawa-select-text hawa-text-sm hawa-font-semibold",
|
121
|
-
sizeStyles[size],
|
122
|
-
className
|
123
|
-
),
|
124
|
-
...props
|
125
|
-
}
|
126
|
-
));
|
127
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
128
|
-
var ToastDescription = React.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
129
|
-
ToastPrimitives.Description,
|
130
|
-
{
|
131
|
-
ref,
|
132
|
-
className: cn(
|
133
|
-
"hawa-select-text hawa-opacity-90",
|
134
|
-
sizeStyles[size],
|
135
|
-
className
|
136
|
-
),
|
137
|
-
...props
|
138
|
-
}
|
139
|
-
));
|
140
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
2
|
+
Toast,
|
3
|
+
ToastAction,
|
4
|
+
ToastClose,
|
5
|
+
ToastDescription,
|
6
|
+
ToastProvider,
|
7
|
+
ToastTitle,
|
8
|
+
ToastViewport
|
9
|
+
} from "../chunk-KNHT2UBG.mjs";
|
10
|
+
import "../chunk-TE3BKEXL.mjs";
|
141
11
|
export {
|
142
12
|
Toast,
|
143
13
|
ToastAction,
|
package/dist/toaster/index.d.mts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
import { D as DirectionType } from '../commonTypes-_11epZYh.mjs';
|
3
3
|
|
4
4
|
type ToasterProps = {
|
5
5
|
direction?: DirectionType;
|
6
6
|
};
|
7
|
-
declare function Toaster(props: ToasterProps):
|
7
|
+
declare function Toaster(props: ToasterProps): React__default.JSX.Element;
|
8
8
|
|
9
9
|
export { Toaster };
|
package/dist/toaster/index.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
import { D as DirectionType } from '../commonTypes-_11epZYh.js';
|
3
3
|
|
4
4
|
type ToasterProps = {
|
5
5
|
direction?: DirectionType;
|
6
6
|
};
|
7
|
-
declare function Toaster(props: ToasterProps):
|
7
|
+
declare function Toaster(props: ToasterProps): React__default.JSX.Element;
|
8
8
|
|
9
9
|
export { Toaster };
|