@sikka/hawa 0.25.0-next → 0.25.2-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 +2 -1
- package/dist/blocks/auth/index.mjs +2 -1
- package/dist/blocks/index.js +2 -1
- package/dist/blocks/index.mjs +2 -2
- package/dist/carousel/index.d.mts +5 -5
- package/dist/carousel/index.d.ts +5 -5
- package/dist/carousel/index.js +11 -10
- package/dist/carousel/index.mjs +11 -10
- 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.d.mts +5 -5
- package/dist/elements/index.d.ts +5 -5
- package/dist/elements/index.js +12 -10
- package/dist/elements/index.mjs +12 -11
- 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.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +13 -11
- package/dist/index.mjs +13 -11
- 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 +12 -12
- 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
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 };
|
package/dist/toaster/index.mjs
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
+
import {
|
2
|
+
Toast,
|
3
|
+
ToastClose,
|
4
|
+
ToastDescription,
|
5
|
+
ToastProvider,
|
6
|
+
ToastTitle,
|
7
|
+
ToastViewport
|
8
|
+
} from "../chunk-KNHT2UBG.mjs";
|
1
9
|
import {
|
2
10
|
cn
|
3
11
|
} from "../chunk-TE3BKEXL.mjs";
|
4
12
|
|
5
13
|
// components/elements/toaster/Toaster.tsx
|
6
|
-
import
|
14
|
+
import React2 from "react";
|
7
15
|
|
8
16
|
// components/hooks/useToast.ts
|
9
17
|
import * as React from "react";
|
@@ -119,148 +127,11 @@ function useToast() {
|
|
119
127
|
};
|
120
128
|
}
|
121
129
|
|
122
|
-
// components/elements/toast/Toast.tsx
|
123
|
-
import * as React2 from "react";
|
124
|
-
import * as ToastPrimitives from "@radix-ui/react-toast";
|
125
|
-
import { cva } from "class-variance-authority";
|
126
|
-
var toastVariants = cva(
|
127
|
-
"hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full",
|
128
|
-
{
|
129
|
-
variants: {
|
130
|
-
variant: {
|
131
|
-
default: "hawa-border hawa-bg-background hawa-text-foreground",
|
132
|
-
destructive: "hawa-destructive hawa-group hawa-border-destructive hawa-bg-destructive hawa-text-destructive-foreground"
|
133
|
-
},
|
134
|
-
severity: {
|
135
|
-
info: "hawa-info hawa-group hawa-text-info-foreground hawa-bg-info",
|
136
|
-
warning: "hawa-warning hawa-group hawa-text-warning-foreground hawa-bg-warning",
|
137
|
-
error: "hawa-error hawa-group hawa-border-error hawa-bg-error hawa-text-white",
|
138
|
-
success: "hawa-success hawa-group hawa-text-success-foreground hawa-bg-success",
|
139
|
-
none: ""
|
140
|
-
}
|
141
|
-
},
|
142
|
-
defaultVariants: { variant: "default" }
|
143
|
-
}
|
144
|
-
);
|
145
|
-
var sizeStyles = {
|
146
|
-
default: "hawa-text-sm",
|
147
|
-
// Update this based on the desired padding for rtl
|
148
|
-
sm: "hawa-text-xs"
|
149
|
-
};
|
150
|
-
var ToastProvider = ToastPrimitives.Provider;
|
151
|
-
var ToastViewport = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
152
|
-
ToastPrimitives.Viewport,
|
153
|
-
{
|
154
|
-
ref,
|
155
|
-
className: cn(
|
156
|
-
"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]",
|
157
|
-
className
|
158
|
-
),
|
159
|
-
...props
|
160
|
-
}
|
161
|
-
));
|
162
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
163
|
-
var Toast = React2.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
164
|
-
return /* @__PURE__ */ React2.createElement(
|
165
|
-
ToastPrimitives.Root,
|
166
|
-
{
|
167
|
-
ref,
|
168
|
-
className: cn(
|
169
|
-
toastVariants({ variant, severity }),
|
170
|
-
className,
|
171
|
-
direction === "rtl" ? "data-[state=closed]:hawa-slide-out-to-left-full" : "data-[state=closed]:hawa-slide-out-to-right-full"
|
172
|
-
),
|
173
|
-
dir: direction,
|
174
|
-
...props
|
175
|
-
}
|
176
|
-
);
|
177
|
-
});
|
178
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
179
|
-
var ToastAction = React2.forwardRef(({ className, ...props }, ref) => {
|
180
|
-
return /* @__PURE__ */ React2.createElement(
|
181
|
-
ToastPrimitives.Action,
|
182
|
-
{
|
183
|
-
ref,
|
184
|
-
className: cn(
|
185
|
-
"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",
|
186
|
-
"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",
|
187
|
-
"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",
|
188
|
-
"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",
|
189
|
-
"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",
|
190
|
-
"hawa-whitespace-nowrap",
|
191
|
-
className
|
192
|
-
),
|
193
|
-
...props
|
194
|
-
}
|
195
|
-
);
|
196
|
-
});
|
197
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
198
|
-
var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
199
|
-
ToastPrimitives.Close,
|
200
|
-
{
|
201
|
-
ref,
|
202
|
-
className: cn(
|
203
|
-
// "hawa-absolute hawa-start-2 hawa-top-2",
|
204
|
-
// "group-hover:hawa-opacity-100",
|
205
|
-
"hawa-opacity-100",
|
206
|
-
"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",
|
207
|
-
className
|
208
|
-
),
|
209
|
-
"toast-close": "",
|
210
|
-
...props
|
211
|
-
},
|
212
|
-
/* @__PURE__ */ React2.createElement(
|
213
|
-
"svg",
|
214
|
-
{
|
215
|
-
"aria-label": "Close Icon",
|
216
|
-
"aria-hidden": "true",
|
217
|
-
className: "hawa-icon",
|
218
|
-
fill: "currentColor",
|
219
|
-
viewBox: "0 0 20 20"
|
220
|
-
},
|
221
|
-
/* @__PURE__ */ React2.createElement(
|
222
|
-
"path",
|
223
|
-
{
|
224
|
-
fillRule: "evenodd",
|
225
|
-
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",
|
226
|
-
clipRule: "evenodd"
|
227
|
-
}
|
228
|
-
)
|
229
|
-
)
|
230
|
-
));
|
231
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
232
|
-
var ToastTitle = React2.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
233
|
-
ToastPrimitives.Title,
|
234
|
-
{
|
235
|
-
ref,
|
236
|
-
className: cn(
|
237
|
-
"hawa-select-text hawa-text-sm hawa-font-semibold",
|
238
|
-
sizeStyles[size],
|
239
|
-
className
|
240
|
-
),
|
241
|
-
...props
|
242
|
-
}
|
243
|
-
));
|
244
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
245
|
-
var ToastDescription = React2.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
246
|
-
ToastPrimitives.Description,
|
247
|
-
{
|
248
|
-
ref,
|
249
|
-
className: cn(
|
250
|
-
"hawa-select-text hawa-opacity-90",
|
251
|
-
sizeStyles[size],
|
252
|
-
className
|
253
|
-
),
|
254
|
-
...props
|
255
|
-
}
|
256
|
-
));
|
257
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
258
|
-
|
259
130
|
// components/elements/toaster/Toaster.tsx
|
260
131
|
function Toaster(props) {
|
261
132
|
const { toasts } = useToast();
|
262
133
|
let isRTL = props.direction === "rtl";
|
263
|
-
return /* @__PURE__ */
|
134
|
+
return /* @__PURE__ */ React2.createElement(ToastProvider, { swipeDirection: isRTL ? "left" : "right" }, toasts.map(function({
|
264
135
|
id,
|
265
136
|
title,
|
266
137
|
description,
|
@@ -268,7 +139,7 @@ function Toaster(props) {
|
|
268
139
|
action,
|
269
140
|
...toastProps
|
270
141
|
}) {
|
271
|
-
return /* @__PURE__ */
|
142
|
+
return /* @__PURE__ */ React2.createElement(Toast, { direction: props.direction, key: id, ...toastProps }, /* @__PURE__ */ React2.createElement(
|
272
143
|
"div",
|
273
144
|
{
|
274
145
|
className: cn(
|
@@ -276,9 +147,9 @@ function Toaster(props) {
|
|
276
147
|
action && "hawa-justify-between"
|
277
148
|
)
|
278
149
|
},
|
279
|
-
/* @__PURE__ */
|
280
|
-
/* @__PURE__ */
|
281
|
-
/* @__PURE__ */
|
150
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-h-full hawa-flex-col hawa-p-2 hawa-pe-0" }, /* @__PURE__ */ React2.createElement(ToastClose, null)),
|
151
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-mx-0 hawa-h-auto hawa-max-h-full hawa-w-px hawa-bg-primary-foreground/10" }),
|
152
|
+
/* @__PURE__ */ React2.createElement(
|
282
153
|
"div",
|
283
154
|
{
|
284
155
|
className: cn(
|
@@ -286,11 +157,11 @@ function Toaster(props) {
|
|
286
157
|
{ "hawa-p-4": size === "default", "hawa-p-2": size === "sm" }
|
287
158
|
)
|
288
159
|
},
|
289
|
-
/* @__PURE__ */
|
290
|
-
action && /* @__PURE__ */
|
160
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-grid hawa-gap-1 hawa-text-start" }, title && /* @__PURE__ */ React2.createElement(ToastTitle, { size }, title), description && /* @__PURE__ */ React2.createElement(ToastDescription, { size }, description)),
|
161
|
+
action && /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-col hawa-justify-center" }, action)
|
291
162
|
)
|
292
163
|
));
|
293
|
-
}), /* @__PURE__ */
|
164
|
+
}), /* @__PURE__ */ React2.createElement(
|
294
165
|
ToastViewport,
|
295
166
|
{
|
296
167
|
className: cn("hawa-gap-2", isRTL && "hawa-fixed hawa-left-0")
|
package/dist/tooltip/index.d.mts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
3
3
|
import { P as PositionType } from '../commonTypes-_11epZYh.mjs';
|
4
4
|
|
@@ -21,6 +21,6 @@ type TooltipTypes = {
|
|
21
21
|
contentProps?: TooltipPrimitive.TooltipContentProps;
|
22
22
|
providerProps?: TooltipPrimitive.TooltipProviderProps;
|
23
23
|
};
|
24
|
-
declare const Tooltip:
|
24
|
+
declare const Tooltip: React__default.FunctionComponent<TooltipTypes>;
|
25
25
|
|
26
26
|
export { Tooltip };
|
package/dist/tooltip/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
3
3
|
import { P as PositionType } from '../commonTypes-_11epZYh.js';
|
4
4
|
|
@@ -21,6 +21,6 @@ type TooltipTypes = {
|
|
21
21
|
contentProps?: TooltipPrimitive.TooltipContentProps;
|
22
22
|
providerProps?: TooltipPrimitive.TooltipProviderProps;
|
23
23
|
};
|
24
|
-
declare const Tooltip:
|
24
|
+
declare const Tooltip: React__default.FunctionComponent<TooltipTypes>;
|
25
25
|
|
26
26
|
export { Tooltip };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sikka/hawa",
|
3
|
-
"version": "0.25.
|
3
|
+
"version": "0.25.2-next",
|
4
4
|
"description": "Modern UI Kit made with Tailwind",
|
5
5
|
"author": {
|
6
6
|
"name": "Sikka Software",
|
@@ -105,16 +105,16 @@
|
|
105
105
|
"devDependencies": {
|
106
106
|
"@babel/preset-react": "^7.23.3",
|
107
107
|
"@sikka/alam": "^0.0.4",
|
108
|
-
"@storybook/addon-essentials": "^7.6.
|
109
|
-
"@storybook/addon-interactions": "^7.6.
|
110
|
-
"@storybook/addon-links": "^7.6.
|
111
|
-
"@storybook/addon-mdx-gfm": "^7.6.
|
112
|
-
"@storybook/blocks": "^7.6.
|
113
|
-
"@storybook/manager-api": "^7.6.
|
114
|
-
"@storybook/nextjs": "^7.6.
|
115
|
-
"@storybook/react": "^7.6.
|
108
|
+
"@storybook/addon-essentials": "^7.6.6",
|
109
|
+
"@storybook/addon-interactions": "^7.6.6",
|
110
|
+
"@storybook/addon-links": "^7.6.6",
|
111
|
+
"@storybook/addon-mdx-gfm": "^7.6.6",
|
112
|
+
"@storybook/blocks": "^7.6.6",
|
113
|
+
"@storybook/manager-api": "^7.6.6",
|
114
|
+
"@storybook/nextjs": "^7.6.6",
|
115
|
+
"@storybook/react": "^7.6.6",
|
116
116
|
"@storybook/testing-library": "^0.2.2",
|
117
|
-
"@storybook/theming": "^7.6.
|
117
|
+
"@storybook/theming": "^7.6.6",
|
118
118
|
"@testing-library/jest-dom": "^6.1.5",
|
119
119
|
"@testing-library/react": "^14.1.2",
|
120
120
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
@@ -130,9 +130,9 @@
|
|
130
130
|
"prettier": "^3.1.1",
|
131
131
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
132
132
|
"recharts": "^2.10.3",
|
133
|
-
"storybook": "^7.6.
|
133
|
+
"storybook": "^7.6.6",
|
134
134
|
"storybook-dark-mode": "^3.0.3",
|
135
|
-
"tailwindcss": "^3.
|
135
|
+
"tailwindcss": "^3.4.0",
|
136
136
|
"tailwindcss-animate": "^1.0.7",
|
137
137
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
138
138
|
"tsup": "^8.0.1",
|
package/dist/chunk-53XBVEMK.mjs
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
cn
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
4
|
-
|
5
|
-
// components/elements/label/Label.tsx
|
6
|
-
import * as React2 from "react";
|
7
|
-
|
8
|
-
// components/elements/tooltip/Tooltip.tsx
|
9
|
-
import React from "react";
|
10
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
11
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
12
|
-
TooltipPrimitive.Content,
|
13
|
-
{
|
14
|
-
ref,
|
15
|
-
sideOffset,
|
16
|
-
className: cn(
|
17
|
-
"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
18
|
-
className
|
19
|
-
),
|
20
|
-
...props
|
21
|
-
}
|
22
|
-
));
|
23
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
24
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
25
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
26
|
-
var Tooltip = ({
|
27
|
-
side,
|
28
|
-
open,
|
29
|
-
content,
|
30
|
-
children,
|
31
|
-
defaultOpen,
|
32
|
-
onOpenChange,
|
33
|
-
triggerProps,
|
34
|
-
contentProps,
|
35
|
-
providerProps,
|
36
|
-
delayDuration = 300,
|
37
|
-
...props
|
38
|
-
}) => {
|
39
|
-
return /* @__PURE__ */ React.createElement(
|
40
|
-
TooltipPrimitive.TooltipProvider,
|
41
|
-
{
|
42
|
-
delayDuration,
|
43
|
-
...providerProps
|
44
|
-
},
|
45
|
-
/* @__PURE__ */ React.createElement(
|
46
|
-
TooltipPrimitive.Root,
|
47
|
-
{
|
48
|
-
open,
|
49
|
-
defaultOpen,
|
50
|
-
onOpenChange,
|
51
|
-
...props
|
52
|
-
},
|
53
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
54
|
-
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
55
|
-
)
|
56
|
-
);
|
57
|
-
};
|
58
|
-
|
59
|
-
// components/elements/label/Label.tsx
|
60
|
-
var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
|
61
|
-
"label",
|
62
|
-
{
|
63
|
-
ref,
|
64
|
-
className: cn(
|
65
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
66
|
-
className
|
67
|
-
),
|
68
|
-
...props
|
69
|
-
},
|
70
|
-
children,
|
71
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
72
|
-
), hint && /* @__PURE__ */ React2.createElement(
|
73
|
-
Tooltip,
|
74
|
-
{
|
75
|
-
content: hint,
|
76
|
-
side: hintSide,
|
77
|
-
triggerProps: {
|
78
|
-
tabIndex: -1,
|
79
|
-
onClick: (event) => event.preventDefault()
|
80
|
-
}
|
81
|
-
},
|
82
|
-
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
83
|
-
"svg",
|
84
|
-
{
|
85
|
-
xmlns: "http://www.w3.org/2000/svg",
|
86
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
87
|
-
viewBox: "0 0 24 24",
|
88
|
-
fill: "none",
|
89
|
-
stroke: "currentColor",
|
90
|
-
strokeWidth: "2",
|
91
|
-
strokeLinecap: "round",
|
92
|
-
strokeLinejoin: "round"
|
93
|
-
},
|
94
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
95
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
96
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
97
|
-
))
|
98
|
-
)));
|
99
|
-
Label.displayName = "Label";
|
100
|
-
|
101
|
-
// components/elements/skeleton/Skeleton.tsx
|
102
|
-
import React3 from "react";
|
103
|
-
function Skeleton({
|
104
|
-
className,
|
105
|
-
content,
|
106
|
-
animation = "pulse",
|
107
|
-
...props
|
108
|
-
}) {
|
109
|
-
const animationStyles = {
|
110
|
-
none: "hawa-rounded hawa-bg-muted",
|
111
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
112
|
-
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
113
|
-
};
|
114
|
-
return /* @__PURE__ */ React3.createElement(
|
115
|
-
"div",
|
116
|
-
{
|
117
|
-
className: cn(
|
118
|
-
animationStyles[animation],
|
119
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
120
|
-
className
|
121
|
-
),
|
122
|
-
...props
|
123
|
-
},
|
124
|
-
content && content
|
125
|
-
);
|
126
|
-
}
|
127
|
-
|
128
|
-
export {
|
129
|
-
Label,
|
130
|
-
Skeleton
|
131
|
-
};
|