@sikka/hawa 0.39.0-next → 0.40.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/{DropdownMenu-B3cTLPDi.d.mts → DropdownMenu-FVVDS2rX.d.mts} +6 -1
- package/dist/{DropdownMenu-BO1TNMm5.d.ts → DropdownMenu-SFJtRGAw.d.ts} +6 -1
- package/dist/{Radio-lgoClQrv.d.ts → Radio-DlPwVCG4.d.ts} +6 -0
- package/dist/{Radio-uQ7DtzcI.d.mts → Radio-Dyvlywnk.d.mts} +6 -0
- package/dist/alert/index.js +2 -2
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +2 -2
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.d.mts +2 -0
- package/dist/appLayout/index.d.ts +2 -0
- package/dist/appLayout/index.js +14 -3
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +14 -3
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/backToTop/index.js +2 -2
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +2 -2
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +15 -15
- package/dist/blocks/auth/index.mjs +17 -17
- package/dist/blocks/feedback/index.js +162 -119
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.d.mts +2 -2
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/index.js +455 -463
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +238 -289
- package/dist/blocks/misc/index.mjs +147 -200
- package/dist/blocks/pricing/index.js +162 -119
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +2 -2
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +2 -2
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +2 -2
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +2 -2
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-C2IX3SUD.mjs → chunk-27G5FKOP.mjs} +1 -1
- package/dist/{chunk-IC5WYNKN.mjs → chunk-AJTYKC5R.mjs} +1 -1
- package/dist/{chunk-UMOBOCED.mjs → chunk-CTNKKP2O.mjs} +2 -2
- package/dist/chunk-CTZRVSTI.mjs +346 -0
- package/dist/{chunk-XFSBC5VI.mjs → chunk-DYPGZ2IP.mjs} +1 -1
- package/dist/{chunk-UJ5SXC3M.mjs → chunk-GN7EIDTE.mjs} +1 -1
- package/dist/{chunk-VMVZM3QQ.mjs → chunk-GU2DOJ7Q.mjs} +31 -8
- package/dist/{chunk-W3CF7BSC.mjs → chunk-QSEQS7DS.mjs} +251 -261
- package/dist/{chunk-RTK6REIK.mjs → chunk-QZIENYTE.mjs} +1 -1
- package/dist/{chunk-EZBHA2IL.mjs → chunk-RT2Q3SH7.mjs} +1 -1
- package/dist/{chunk-ZBUBNKF6.mjs → chunk-XCW5YNMS.mjs} +34 -1
- package/dist/codeBlock/index.js +2 -2
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +2 -2
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.js +1 -1
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/command/index.mjs.map +1 -1
- package/dist/commonTypes-189mW5eB.d.mts +8 -0
- package/dist/commonTypes-189mW5eB.d.ts +8 -0
- package/dist/commonTypes-DUY2LJm1.d.mts +3 -0
- package/dist/commonTypes-DUY2LJm1.d.ts +3 -0
- package/dist/commonTypes-D_7LV7Ri.d.mts +5 -0
- package/dist/commonTypes-D_7LV7Ri.d.ts +5 -0
- package/dist/dataTable/index.js +2 -2
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +2 -2
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +1 -1
- package/dist/datePicker/index.d.ts +1 -1
- package/dist/datePicker/index.js +3 -3
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +3 -3
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +2 -2
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +2 -2
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.d.mts +6 -1
- package/dist/dropdownMenu/index.d.ts +6 -1
- package/dist/dropdownMenu/index.js +29 -6
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +29 -6
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +7 -5
- package/dist/elements/index.d.ts +7 -5
- package/dist/elements/index.js +559 -544
- package/dist/elements/index.mjs +5 -5
- package/dist/fileDropzone/index.d.mts +2 -2
- package/dist/fileDropzone/index.d.ts +2 -2
- package/dist/fileDropzone/index.js +2 -2
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +2 -2
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/fileUploader/index.d.mts +2 -2
- package/dist/fileUploader/index.d.ts +2 -2
- package/dist/glow/index.d.mts +3 -3
- package/dist/glow/index.d.ts +3 -3
- package/dist/hooks/index.d.mts +8 -1
- package/dist/hooks/index.d.ts +8 -1
- package/dist/hooks/index.js +35 -0
- package/dist/hooks/index.mjs +5 -1
- package/dist/index.css +0 -91
- package/dist/index.d.mts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +1033 -972
- package/dist/index.mjs +984 -925
- package/dist/input/index.d.mts +2 -9
- package/dist/input/index.d.ts +2 -9
- package/dist/interfaceSettings/index.js +160 -117
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +160 -117
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/label/index.d.mts +1 -2
- package/dist/label/index.d.ts +1 -2
- package/dist/layout/index.d.mts +3 -1
- package/dist/layout/index.d.ts +3 -1
- package/dist/layout/index.js +14 -3
- package/dist/layout/index.mjs +14 -3
- package/dist/navigationMenu/index.d.mts +2 -1
- package/dist/navigationMenu/index.d.ts +2 -1
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/phoneInput/index.d.mts +1 -1
- package/dist/phoneInput/index.d.ts +1 -1
- package/dist/pinInput/index.js +13 -13
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +13 -13
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/progress/index.d.mts +8 -1
- package/dist/progress/index.d.ts +8 -1
- package/dist/radio/index.d.mts +15 -1
- package/dist/radio/index.d.ts +15 -1
- package/dist/radio/index.js +160 -117
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +160 -117
- package/dist/radio/index.mjs.map +1 -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/signature/index.d.mts +1 -2
- package/dist/signature/index.d.ts +1 -2
- package/dist/simpleTable/index.d.mts +1 -1
- package/dist/simpleTable/index.d.ts +1 -1
- package/dist/sonner/index.d.mts +1 -1
- package/dist/sonner/index.d.ts +1 -1
- package/dist/sortButton/index.js +2 -2
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +2 -2
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +3 -9
- package/dist/splitButton/index.d.ts +3 -9
- package/dist/splitButton/index.js +2 -2
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +2 -2
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +4 -2
- package/dist/tabs/index.d.ts +4 -2
- package/dist/tabs/index.js +123 -174
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +118 -169
- 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/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toaster/index.d.mts +4 -22
- package/dist/toaster/index.d.ts +4 -22
- package/dist/tooltip/index.d.mts +4 -3
- package/dist/tooltip/index.d.ts +4 -3
- package/package.json +3 -5
- package/dist/Label-UbMDLtJF.d.mts +0 -14
- package/dist/Label-UbMDLtJF.d.ts +0 -14
- package/dist/chunk-WDCKXU54.mjs +0 -303
- package/dist/commonTypes-CgDwjGvU.d.mts +0 -5
- package/dist/commonTypes-CgDwjGvU.d.ts +0 -5
- package/dist/commonTypes-DZdITB5m.d.mts +0 -4
- package/dist/commonTypes-DZdITB5m.d.ts +0 -4
- package/dist/floatBox/index.d.mts +0 -15
- package/dist/floatBox/index.d.ts +0 -15
- package/dist/floatBox/index.js +0 -105
- package/dist/floatBox/index.js.map +0 -1
- package/dist/floatBox/index.mjs +0 -69
- package/dist/floatBox/index.mjs.map +0 -1
@@ -1,17 +1,17 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
3
|
Input
|
4
|
-
} from "../../chunk-
|
4
|
+
} from "../../chunk-DYPGZ2IP.mjs";
|
5
5
|
import {
|
6
6
|
Chip,
|
7
7
|
ScrollArea
|
8
|
-
} from "../../chunk-
|
8
|
+
} from "../../chunk-RT2Q3SH7.mjs";
|
9
9
|
import {
|
10
10
|
Textarea
|
11
|
-
} from "../../chunk-
|
11
|
+
} from "../../chunk-GN7EIDTE.mjs";
|
12
12
|
import {
|
13
13
|
Select
|
14
|
-
} from "../../chunk-
|
14
|
+
} from "../../chunk-QZIENYTE.mjs";
|
15
15
|
import {
|
16
16
|
Button,
|
17
17
|
Card,
|
@@ -21,13 +21,13 @@ import {
|
|
21
21
|
CardHeader,
|
22
22
|
CardTitle,
|
23
23
|
cn
|
24
|
-
} from "../../chunk-
|
24
|
+
} from "../../chunk-CTNKKP2O.mjs";
|
25
25
|
|
26
26
|
// blocks/misc/LegalTexts.tsx
|
27
|
-
import
|
27
|
+
import React10 from "react";
|
28
28
|
|
29
29
|
// elements/tabs/Tabs.tsx
|
30
|
-
import * as
|
30
|
+
import * as React9 from "react";
|
31
31
|
|
32
32
|
// hooks/useIsomorphicEffect.ts
|
33
33
|
import { useEffect, useLayoutEffect } from "react";
|
@@ -78,37 +78,6 @@ import { useEffect as useEffect12, useState as useState14 } from "react";
|
|
78
78
|
|
79
79
|
// hooks/useMeasureDirty.ts
|
80
80
|
import { useEffect as useEffect13, useRef as useRef7, useState as useState15 } from "react";
|
81
|
-
var useMeasureDirty = (ref) => {
|
82
|
-
const frame = useRef7(0);
|
83
|
-
const [rect, set] = useState15({
|
84
|
-
width: 0,
|
85
|
-
height: 0,
|
86
|
-
top: 0,
|
87
|
-
left: 0,
|
88
|
-
bottom: 0,
|
89
|
-
right: 0
|
90
|
-
});
|
91
|
-
const [observer] = useState15(
|
92
|
-
() => new ResizeObserver((entries) => {
|
93
|
-
const entry = entries[0];
|
94
|
-
if (entry) {
|
95
|
-
cancelAnimationFrame(frame.current);
|
96
|
-
frame.current = requestAnimationFrame(() => {
|
97
|
-
if (ref.current) {
|
98
|
-
set(entry.contentRect);
|
99
|
-
}
|
100
|
-
});
|
101
|
-
}
|
102
|
-
})
|
103
|
-
);
|
104
|
-
useEffect13(() => {
|
105
|
-
observer.disconnect();
|
106
|
-
if (ref.current) {
|
107
|
-
observer.observe(ref.current);
|
108
|
-
}
|
109
|
-
}, [ref]);
|
110
|
-
return rect;
|
111
|
-
};
|
112
81
|
|
113
82
|
// hooks/useClickOutside.ts
|
114
83
|
import { useEffect as useEffect14, useRef as useRef8 } from "react";
|
@@ -116,66 +85,41 @@ import { useEffect as useEffect14, useRef as useRef8 } from "react";
|
|
116
85
|
// hooks/useShortcuts.ts
|
117
86
|
import { useEffect as useEffect15 } from "react";
|
118
87
|
|
119
|
-
//
|
120
|
-
import
|
121
|
-
|
88
|
+
// hooks/useWindowEvent.ts
|
89
|
+
import { useEffect as useEffect16 } from "react";
|
90
|
+
function useWindowEvent(type, listener, options) {
|
91
|
+
useEffect16(() => {
|
92
|
+
window.addEventListener(type, listener, options);
|
93
|
+
return () => window.removeEventListener(type, listener, options);
|
94
|
+
}, [type, listener]);
|
95
|
+
}
|
122
96
|
|
123
|
-
//
|
124
|
-
import
|
125
|
-
var
|
126
|
-
|
127
|
-
open,
|
128
|
-
side = "bottom",
|
129
|
-
sideOffset = 40,
|
130
|
-
align = "center",
|
131
|
-
withArrow = false,
|
132
|
-
...props
|
133
|
-
}) => {
|
134
|
-
let stylesMap = {
|
135
|
-
bottom: {
|
136
|
-
start: { top: sideOffset, insetInlineStart: 0 },
|
137
|
-
center: { top: sideOffset },
|
138
|
-
end: { top: sideOffset, insetInlineEnd: 0 }
|
139
|
-
},
|
140
|
-
top: {
|
141
|
-
start: { bottom: sideOffset, insetInlineStart: 0 },
|
142
|
-
center: { bottom: sideOffset },
|
143
|
-
end: { bottom: sideOffset, insetInlineEnd: 0 }
|
144
|
-
},
|
145
|
-
right: {
|
146
|
-
start: { left: sideOffset, top: -5 },
|
147
|
-
center: { left: sideOffset },
|
148
|
-
end: { left: sideOffset, bottom: 0 }
|
149
|
-
},
|
150
|
-
left: {
|
151
|
-
start: { right: sideOffset, top: 0 },
|
152
|
-
center: { right: sideOffset },
|
153
|
-
end: { right: sideOffset, bottom: 0 }
|
154
|
-
}
|
155
|
-
};
|
156
|
-
const arrowDirection = {
|
157
|
-
top: "hawa-arrow-default-bottom",
|
158
|
-
bottom: "hawa-arrow-default-top",
|
159
|
-
right: "hawa-arrow-default-left",
|
160
|
-
left: "hawa-arrow-default-right"
|
161
|
-
};
|
162
|
-
return /* @__PURE__ */ React9.createElement(
|
163
|
-
"div",
|
164
|
-
{
|
165
|
-
className: cn(
|
166
|
-
"data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-state=open]:hawa-zoom-in-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 hawa-bg-popover",
|
167
|
-
className
|
168
|
-
),
|
169
|
-
style: { ...stylesMap[side][align] },
|
170
|
-
"data-side": side,
|
171
|
-
"data-floatbox-state": open ? "open" : "closed"
|
172
|
-
},
|
173
|
-
withArrow && /* @__PURE__ */ React9.createElement("div", { className: cn(arrowDirection[side]) }),
|
174
|
-
/* @__PURE__ */ React9.createElement("span", null, props.children)
|
175
|
-
);
|
97
|
+
// hooks/useViewportSize.ts
|
98
|
+
import { useCallback, useEffect as useEffect17, useState as useState16 } from "react";
|
99
|
+
var eventListerOptions = {
|
100
|
+
passive: true
|
176
101
|
};
|
102
|
+
function useViewportSize() {
|
103
|
+
const [windowSize, setWindowSize] = useState16({
|
104
|
+
width: 0,
|
105
|
+
height: 0
|
106
|
+
});
|
107
|
+
const setSize = useCallback(() => {
|
108
|
+
setWindowSize({
|
109
|
+
width: window.innerWidth || 0,
|
110
|
+
height: window.innerHeight || 0
|
111
|
+
});
|
112
|
+
}, []);
|
113
|
+
useWindowEvent("resize", setSize, eventListerOptions);
|
114
|
+
useWindowEvent("orientationchange", setSize, eventListerOptions);
|
115
|
+
useEffect17(setSize, []);
|
116
|
+
return windowSize;
|
117
|
+
}
|
177
118
|
|
178
119
|
// elements/tabs/Tabs.tsx
|
120
|
+
import * as Popover from "@radix-ui/react-popover";
|
121
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
122
|
+
import { tv } from "tailwind-variants";
|
179
123
|
var tabsListVariant = tv({
|
180
124
|
base: "",
|
181
125
|
variants: {
|
@@ -234,39 +178,27 @@ var tabsTriggerVariant = tv({
|
|
234
178
|
],
|
235
179
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
236
180
|
});
|
237
|
-
var TabsContext =
|
238
|
-
var Tabs =
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
)
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
);
|
256
|
-
|
257
|
-
|
258
|
-
const resize = () => {
|
259
|
-
setSize(window.innerWidth);
|
260
|
-
};
|
261
|
-
resize();
|
262
|
-
window.addEventListener("resize", resize);
|
263
|
-
return () => {
|
264
|
-
window.removeEventListener("resize", resize);
|
265
|
-
};
|
266
|
-
}
|
267
|
-
}, []);
|
268
|
-
if (props.scrollable && size < 768 && orientation === "horizontal") {
|
269
|
-
return /* @__PURE__ */ React10.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React10.createElement(
|
181
|
+
var TabsContext = React9.createContext({ orientation: "horizontal", variant: "default", scrollable: false });
|
182
|
+
var Tabs = React9.forwardRef(
|
183
|
+
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */ React9.createElement(
|
184
|
+
TabsPrimitive.Root,
|
185
|
+
{
|
186
|
+
ref,
|
187
|
+
className: cn(
|
188
|
+
"hawa-flex hawa-gap-2",
|
189
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
190
|
+
className
|
191
|
+
),
|
192
|
+
...props
|
193
|
+
},
|
194
|
+
/* @__PURE__ */ React9.createElement(TabsContext.Provider, { value: { orientation, variant, scrollable } }, props.children)
|
195
|
+
)
|
196
|
+
);
|
197
|
+
var TabsList = React9.forwardRef(({ className, classNames, ...props }, ref) => {
|
198
|
+
const { orientation, variant, scrollable } = React9.useContext(TabsContext);
|
199
|
+
const { width } = useViewportSize();
|
200
|
+
if (scrollable && width < 768 && orientation === "horizontal") {
|
201
|
+
return /* @__PURE__ */ React9.createElement(ScrollArea, { orientation: "horizontal", className: classNames == null ? void 0 : classNames.scrollArea }, /* @__PURE__ */ React9.createElement(
|
270
202
|
TabsPrimitive.List,
|
271
203
|
{
|
272
204
|
ref,
|
@@ -279,7 +211,7 @@ var TabsList = React10.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
279
211
|
}
|
280
212
|
));
|
281
213
|
} else {
|
282
|
-
return /* @__PURE__ */
|
214
|
+
return /* @__PURE__ */ React9.createElement(
|
283
215
|
TabsPrimitive.List,
|
284
216
|
{
|
285
217
|
ref,
|
@@ -294,37 +226,52 @@ var TabsList = React10.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
294
226
|
);
|
295
227
|
}
|
296
228
|
});
|
297
|
-
var TabsTrigger =
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
229
|
+
var TabsTrigger = React9.forwardRef(
|
230
|
+
({ className, chipProps, withPopover = false, onPopoverClick, ...props }, ref) => {
|
231
|
+
const { orientation, variant } = React9.useContext(TabsContext);
|
232
|
+
if (withPopover) {
|
233
|
+
return /* @__PURE__ */ React9.createElement(Popover.Root, { open: props.showPopover }, /* @__PURE__ */ React9.createElement(Popover.Anchor, { asChild: true }, /* @__PURE__ */ React9.createElement(
|
234
|
+
TabsPrimitive.Trigger,
|
235
|
+
{
|
236
|
+
className: cn(
|
237
|
+
tabsTriggerVariant({ variant, orientation }),
|
238
|
+
"hawa-relative",
|
239
|
+
className
|
240
|
+
),
|
241
|
+
...props
|
242
|
+
},
|
243
|
+
props.children,
|
244
|
+
chipProps && /* @__PURE__ */ React9.createElement(Chip, { ...chipProps })
|
245
|
+
)), /* @__PURE__ */ React9.createElement(
|
246
|
+
Popover.Content,
|
247
|
+
{
|
248
|
+
onClick: onPopoverClick,
|
249
|
+
asChild: true,
|
250
|
+
className: cn(
|
251
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-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",
|
252
|
+
"hawa-arrow-default-top hawa-mt-2"
|
253
|
+
)
|
254
|
+
},
|
255
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-p-2" }, " ", props.popoverContent)
|
256
|
+
));
|
257
|
+
} else {
|
258
|
+
return /* @__PURE__ */ React9.createElement(
|
259
|
+
TabsPrimitive.Trigger,
|
260
|
+
{
|
261
|
+
className: cn(
|
262
|
+
tabsTriggerVariant({ variant, orientation }),
|
263
|
+
"hawa-relative",
|
264
|
+
className
|
265
|
+
),
|
266
|
+
...props
|
267
|
+
},
|
268
|
+
props.children,
|
269
|
+
chipProps && /* @__PURE__ */ React9.createElement(Chip, { ...chipProps })
|
270
|
+
);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
);
|
274
|
+
var TabsContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(
|
328
275
|
TabsPrimitive.Content,
|
329
276
|
{
|
330
277
|
ref,
|
@@ -342,7 +289,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
342
289
|
|
343
290
|
// blocks/misc/LegalTexts.tsx
|
344
291
|
var LegalTexts = ({ tabs, ...props }) => {
|
345
|
-
return /* @__PURE__ */
|
292
|
+
return /* @__PURE__ */ React10.createElement(
|
346
293
|
Tabs,
|
347
294
|
{
|
348
295
|
value: props.activeTab,
|
@@ -350,8 +297,8 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
350
297
|
defaultValue: props.defaultTab || tabs[0].value,
|
351
298
|
dir: props.direction
|
352
299
|
},
|
353
|
-
/* @__PURE__ */
|
354
|
-
tabs.map((tab, index) => /* @__PURE__ */
|
300
|
+
/* @__PURE__ */ React10.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React10.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
|
301
|
+
tabs.map((tab, index) => /* @__PURE__ */ React10.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React10.createElement(
|
355
302
|
ScrollArea,
|
356
303
|
{
|
357
304
|
className: cn(
|
@@ -365,9 +312,9 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
365
312
|
};
|
366
313
|
|
367
314
|
// blocks/misc/EmptyState.tsx
|
368
|
-
import
|
315
|
+
import React11 from "react";
|
369
316
|
var EmptyState = ({ texts, onActionClick }) => {
|
370
|
-
return /* @__PURE__ */
|
317
|
+
return /* @__PURE__ */ React11.createElement(Card, null, /* @__PURE__ */ React11.createElement(CardContent, { headless: true }, /* @__PURE__ */ React11.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ React11.createElement("div", { className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React11.createElement(
|
371
318
|
"svg",
|
372
319
|
{
|
373
320
|
stroke: "currentColor",
|
@@ -377,30 +324,30 @@ var EmptyState = ({ texts, onActionClick }) => {
|
|
377
324
|
height: "0.35em",
|
378
325
|
width: "0.35em"
|
379
326
|
},
|
380
|
-
/* @__PURE__ */
|
381
|
-
)), /* @__PURE__ */
|
327
|
+
/* @__PURE__ */ React11.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
328
|
+
)), /* @__PURE__ */ React11.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ React11.createElement(CardFooter, null, /* @__PURE__ */ React11.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
|
382
329
|
};
|
383
330
|
|
384
331
|
// blocks/misc/Testimonial.tsx
|
385
|
-
import
|
332
|
+
import React12 from "react";
|
386
333
|
var Testimonial = () => {
|
387
|
-
return /* @__PURE__ */
|
334
|
+
return /* @__PURE__ */ React12.createElement(Card, null, /* @__PURE__ */ React12.createElement(CardContent, { headless: true }, /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("p", { className: "mb-4 max-w-sm" }, "The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless.")), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ React12.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ React12.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ React12.createElement(
|
388
335
|
"path",
|
389
336
|
{
|
390
337
|
d: "M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z",
|
391
338
|
fill: "#FFFFFF"
|
392
339
|
}
|
393
|
-
), /* @__PURE__ */
|
340
|
+
), /* @__PURE__ */ React12.createElement(
|
394
341
|
"path",
|
395
342
|
{
|
396
343
|
d: "M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z",
|
397
344
|
fill: "#FFFFFF"
|
398
345
|
}
|
399
|
-
)), /* @__PURE__ */
|
346
|
+
)), /* @__PURE__ */ React12.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ React12.createElement("div", null, " Chief Information Security Officer")))));
|
400
347
|
};
|
401
348
|
|
402
349
|
// blocks/misc/LeadGenerator.tsx
|
403
|
-
import
|
350
|
+
import React13 from "react";
|
404
351
|
import { useForm, Controller } from "react-hook-form";
|
405
352
|
var LeadGenerator = ({ texts, submitHandler }) => {
|
406
353
|
var _a;
|
@@ -412,14 +359,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
412
359
|
console.log("handleNewsletterSub props was not provided");
|
413
360
|
}
|
414
361
|
};
|
415
|
-
return /* @__PURE__ */
|
362
|
+
return /* @__PURE__ */ React13.createElement(Card, null, /* @__PURE__ */ React13.createElement(CardHeader, null, /* @__PURE__ */ React13.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ React13.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ React13.createElement(CardContent, null, /* @__PURE__ */ React13.createElement(
|
416
363
|
"form",
|
417
364
|
{
|
418
365
|
noValidate: true,
|
419
366
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
420
367
|
onSubmit: handleSubmit(onSubmit)
|
421
368
|
},
|
422
|
-
/* @__PURE__ */
|
369
|
+
/* @__PURE__ */ React13.createElement(
|
423
370
|
Controller,
|
424
371
|
{
|
425
372
|
name: "email",
|
@@ -432,27 +379,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
432
379
|
}
|
433
380
|
},
|
434
381
|
defaultValue: "",
|
435
|
-
render: ({ field }) => /* @__PURE__ */
|
382
|
+
render: ({ field }) => /* @__PURE__ */ React13.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
|
436
383
|
}
|
437
384
|
),
|
438
|
-
/* @__PURE__ */
|
385
|
+
/* @__PURE__ */ React13.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
|
439
386
|
)));
|
440
387
|
};
|
441
388
|
|
442
389
|
// blocks/misc/Announcement.tsx
|
443
|
-
import
|
390
|
+
import React14 from "react";
|
444
391
|
var Announcement = ({
|
445
392
|
onActionClick,
|
446
393
|
...props
|
447
394
|
}) => {
|
448
|
-
return /* @__PURE__ */
|
395
|
+
return /* @__PURE__ */ React14.createElement(Card, null, /* @__PURE__ */ React14.createElement(
|
449
396
|
CardContent,
|
450
397
|
{
|
451
398
|
headless: true,
|
452
399
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
453
400
|
},
|
454
|
-
/* @__PURE__ */
|
455
|
-
/* @__PURE__ */
|
401
|
+
/* @__PURE__ */ React14.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ React14.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ React14.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
|
402
|
+
/* @__PURE__ */ React14.createElement(
|
456
403
|
Button,
|
457
404
|
{
|
458
405
|
onClick: () => onActionClick(),
|
@@ -464,15 +411,15 @@ var Announcement = ({
|
|
464
411
|
};
|
465
412
|
|
466
413
|
// blocks/misc/NotFound.tsx
|
467
|
-
import
|
414
|
+
import React15 from "react";
|
468
415
|
var NotFound = ({ texts }) => {
|
469
|
-
return /* @__PURE__ */
|
416
|
+
return /* @__PURE__ */ React15.createElement(Card, null, /* @__PURE__ */ React15.createElement(CardContent, { headless: true }, /* @__PURE__ */ React15.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React15.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React15.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, (texts == null ? void 0 : texts.pageNotFound) || "Page Not Found"), /* @__PURE__ */ React15.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ React15.createElement(React15.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React15.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React15.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
|
470
417
|
};
|
471
418
|
|
472
419
|
// blocks/misc/NoPermission.tsx
|
473
|
-
import
|
420
|
+
import React16 from "react";
|
474
421
|
var NoPermission = ({ texts }) => {
|
475
|
-
return /* @__PURE__ */
|
422
|
+
return /* @__PURE__ */ React16.createElement(Card, null, /* @__PURE__ */ React16.createElement(CardContent, { headless: true }, /* @__PURE__ */ React16.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ React16.createElement("div", { className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React16.createElement(
|
476
423
|
"svg",
|
477
424
|
{
|
478
425
|
stroke: "currentColor",
|
@@ -482,12 +429,12 @@ var NoPermission = ({ texts }) => {
|
|
482
429
|
height: "0.35em",
|
483
430
|
width: "0.35em"
|
484
431
|
},
|
485
|
-
/* @__PURE__ */
|
486
|
-
)), /* @__PURE__ */
|
432
|
+
/* @__PURE__ */ React16.createElement("path", { d: "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z" })
|
433
|
+
)), /* @__PURE__ */ React16.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ React16.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
|
487
434
|
};
|
488
435
|
|
489
436
|
// blocks/misc/ContactForm.tsx
|
490
|
-
import
|
437
|
+
import React17 from "react";
|
491
438
|
import { useForm as useForm2, Controller as Controller2 } from "react-hook-form";
|
492
439
|
import { zodResolver } from "@hookform/resolvers/zod";
|
493
440
|
import * as z from "zod";
|
@@ -561,7 +508,7 @@ var ContactForm = ({
|
|
561
508
|
console.log("Form is submitted but onSubmit prop is missing");
|
562
509
|
}
|
563
510
|
};
|
564
|
-
return /* @__PURE__ */
|
511
|
+
return /* @__PURE__ */ React17.createElement(
|
565
512
|
Card,
|
566
513
|
{
|
567
514
|
className: cn(
|
@@ -570,7 +517,7 @@ var ContactForm = ({
|
|
570
517
|
),
|
571
518
|
style: cardless ? { boxShadow: "none" } : void 0
|
572
519
|
},
|
573
|
-
/* @__PURE__ */
|
520
|
+
/* @__PURE__ */ React17.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, props.showSuccess ? /* @__PURE__ */ React17.createElement(CardHeader, null, /* @__PURE__ */ React17.createElement(CardTitle, null, ((_d = texts == null ? void 0 : texts.success) == null ? void 0 : _d.title) || "Message Sent! \u{1F389}"), /* @__PURE__ */ React17.createElement(CardDescription, null, ((_e = texts == null ? void 0 : texts.success) == null ? void 0 : _e.description) || "Thank you for your submission, we will get back to you as soon as possible.")) : /* @__PURE__ */ React17.createElement(
|
574
521
|
"form",
|
575
522
|
{
|
576
523
|
noValidate: true,
|
@@ -579,7 +526,7 @@ var ContactForm = ({
|
|
579
526
|
id: formId,
|
580
527
|
autoComplete: formAutoComplete
|
581
528
|
},
|
582
|
-
/* @__PURE__ */
|
529
|
+
/* @__PURE__ */ React17.createElement(
|
583
530
|
"div",
|
584
531
|
{
|
585
532
|
className: cn(
|
@@ -590,14 +537,14 @@ var ContactForm = ({
|
|
590
537
|
}
|
591
538
|
)
|
592
539
|
},
|
593
|
-
/* @__PURE__ */
|
540
|
+
/* @__PURE__ */ React17.createElement(
|
594
541
|
Controller2,
|
595
542
|
{
|
596
543
|
control,
|
597
544
|
name: "name",
|
598
545
|
render: ({ field }) => {
|
599
546
|
var _a2;
|
600
|
-
return /* @__PURE__ */
|
547
|
+
return /* @__PURE__ */ React17.createElement(
|
601
548
|
Input,
|
602
549
|
{
|
603
550
|
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
@@ -610,14 +557,14 @@ var ContactForm = ({
|
|
610
557
|
}
|
611
558
|
}
|
612
559
|
),
|
613
|
-
/* @__PURE__ */
|
560
|
+
/* @__PURE__ */ React17.createElement(
|
614
561
|
Controller2,
|
615
562
|
{
|
616
563
|
control,
|
617
564
|
name: "email",
|
618
565
|
render: ({ field }) => {
|
619
566
|
var _a2;
|
620
|
-
return /* @__PURE__ */
|
567
|
+
return /* @__PURE__ */ React17.createElement(
|
621
568
|
Input,
|
622
569
|
{
|
623
570
|
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
@@ -633,7 +580,7 @@ var ContactForm = ({
|
|
633
580
|
),
|
634
581
|
customFields && customFields.map((customField) => {
|
635
582
|
console.log("custom", customField);
|
636
|
-
return /* @__PURE__ */
|
583
|
+
return /* @__PURE__ */ React17.createElement(
|
637
584
|
Controller2,
|
638
585
|
{
|
639
586
|
control,
|
@@ -643,7 +590,7 @@ var ContactForm = ({
|
|
643
590
|
switch (type) {
|
644
591
|
case "text":
|
645
592
|
case "number":
|
646
|
-
return /* @__PURE__ */
|
593
|
+
return /* @__PURE__ */ React17.createElement(
|
647
594
|
Input,
|
648
595
|
{
|
649
596
|
id: customField.name,
|
@@ -654,7 +601,7 @@ var ContactForm = ({
|
|
654
601
|
}
|
655
602
|
);
|
656
603
|
case "select":
|
657
|
-
return /* @__PURE__ */
|
604
|
+
return /* @__PURE__ */ React17.createElement(
|
658
605
|
Select,
|
659
606
|
{
|
660
607
|
label,
|
@@ -664,20 +611,20 @@ var ContactForm = ({
|
|
664
611
|
}
|
665
612
|
);
|
666
613
|
default:
|
667
|
-
return /* @__PURE__ */
|
614
|
+
return /* @__PURE__ */ React17.createElement("div", null, "Unknown type");
|
668
615
|
}
|
669
616
|
}
|
670
617
|
}
|
671
618
|
);
|
672
619
|
}),
|
673
|
-
/* @__PURE__ */
|
620
|
+
/* @__PURE__ */ React17.createElement(
|
674
621
|
Controller2,
|
675
622
|
{
|
676
623
|
control,
|
677
624
|
name: "message",
|
678
625
|
render: ({ field }) => {
|
679
626
|
var _a2;
|
680
|
-
return /* @__PURE__ */
|
627
|
+
return /* @__PURE__ */ React17.createElement(
|
681
628
|
Textarea,
|
682
629
|
{
|
683
630
|
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
@@ -694,7 +641,7 @@ var ContactForm = ({
|
|
694
641
|
}
|
695
642
|
}
|
696
643
|
),
|
697
|
-
/* @__PURE__ */
|
644
|
+
/* @__PURE__ */ React17.createElement(
|
698
645
|
Button,
|
699
646
|
{
|
700
647
|
type: "submit",
|