@sikka/hawa 0.24.3-next → 0.24.5-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/accordion/index.d.mts +1 -2
- package/dist/accordion/index.d.ts +1 -2
- package/dist/accordion/index.mjs +219 -7
- package/dist/alert/index.d.mts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/appLayout/index.d.mts +126 -0
- package/dist/appLayout/index.d.ts +126 -0
- package/dist/appLayout/index.js +1325 -0
- package/dist/appLayout/index.mjs +1285 -0
- package/dist/appMenubar/index.d.mts +33 -0
- package/dist/appMenubar/index.d.ts +33 -0
- package/dist/appMenubar/index.js +281 -0
- package/dist/appMenubar/index.mjs +224 -0
- package/dist/appTabs/index.d.mts +18 -0
- package/dist/appTabs/index.d.ts +18 -0
- package/dist/appTabs/index.js +92 -0
- package/dist/appTabs/index.mjs +50 -0
- package/dist/appTopbar/index.d.mts +44 -0
- package/dist/appTopbar/index.d.ts +44 -0
- package/dist/appTopbar/index.js +483 -0
- package/dist/appTopbar/index.mjs +441 -0
- package/dist/avatar/index.d.mts +5 -4
- package/dist/avatar/index.d.ts +5 -4
- package/dist/backToTop/index.mjs +353 -3
- package/dist/badge/index.d.mts +2 -2
- package/dist/badge/index.d.ts +2 -2
- package/dist/checkbox/index.d.mts +1 -2
- package/dist/checkbox/index.d.ts +1 -2
- package/dist/chip/index.d.mts +36 -2
- package/dist/chip/index.d.ts +36 -2
- package/dist/chip/index.mjs +83 -3
- package/dist/chunk-62GI5F2P.mjs +442 -0
- package/dist/chunk-7NCNPRCL.mjs +120 -0
- package/dist/{chunk-TNAHW35O.mjs → chunk-C2UYTGUD.mjs} +8 -4
- package/dist/{chunk-26FHSPJI.mjs → chunk-DGWAHQRX.mjs} +1 -101
- package/dist/chunk-LRLLDOQZ.mjs +178 -0
- package/dist/chunk-ND4BWUKH.mjs +34 -0
- package/dist/codeBlock/index.mjs +684 -310
- package/dist/colorPicker/index.d.mts +2 -1
- package/dist/colorPicker/index.d.ts +2 -1
- package/dist/colorPicker/index.mjs +2 -167
- package/dist/combobox/index.d.mts +9 -1
- package/dist/combobox/index.d.ts +9 -1
- package/dist/combobox/index.mjs +61 -393
- package/dist/command/index.mjs +10 -425
- package/dist/commonTypes-3J1E3b61.d.mts +6 -0
- package/dist/commonTypes-3J1E3b61.d.ts +6 -0
- package/dist/commonTypes-GhKAraJw.d.mts +4 -0
- package/dist/commonTypes-GhKAraJw.d.ts +4 -0
- package/dist/commonTypes-LrR8QrYP.d.mts +5 -0
- package/dist/commonTypes-LrR8QrYP.d.ts +5 -0
- package/dist/commonTypes-WPhcN3Vr.d.mts +5 -0
- package/dist/commonTypes-WPhcN3Vr.d.ts +5 -0
- package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
- package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
- package/dist/copyrights/index.d.mts +17 -0
- package/dist/copyrights/index.d.ts +17 -0
- package/dist/copyrights/index.js +45 -0
- package/dist/copyrights/index.mjs +8 -0
- package/dist/count/index.d.mts +11 -0
- package/dist/count/index.d.ts +11 -0
- package/dist/count/index.js +45 -0
- package/dist/count/index.mjs +8 -0
- package/dist/dataTable/index.d.mts +1 -1
- package/dist/dataTable/index.d.ts +1 -1
- package/dist/destroyableCard/index.d.mts +1 -1
- package/dist/destroyableCard/index.d.ts +1 -1
- package/dist/dialog/index.d.mts +1 -1
- package/dist/dialog/index.d.ts +1 -1
- package/dist/docsLayout/index.d.mts +37 -0
- package/dist/docsLayout/index.d.ts +37 -0
- package/dist/docsLayout/index.js +926 -0
- package/dist/docsLayout/index.mjs +886 -0
- package/dist/docsSidebar/index.d.mts +11 -0
- package/dist/docsSidebar/index.d.ts +11 -0
- package/dist/docsSidebar/index.js +111 -0
- package/dist/docsSidebar/index.mjs +69 -0
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +44 -35
- package/dist/index.mjs +44 -35
- package/dist/input/index.d.mts +2 -9
- package/dist/input/index.d.ts +2 -9
- package/dist/input/index.mjs +14 -98
- package/dist/interfaceSettings/index.d.mts +1 -1
- package/dist/interfaceSettings/index.d.ts +1 -1
- package/dist/interfaceSettings/index.mjs +24 -110
- package/dist/label/index.d.mts +1 -1
- package/dist/label/index.d.ts +1 -1
- package/dist/label/index.mjs +2 -87
- package/dist/layout/index.d.mts +11 -4
- package/dist/layout/index.d.ts +11 -4
- package/dist/layout/index.js +47 -38
- package/dist/layout/index.mjs +44 -35
- package/dist/navbar/index.d.mts +17 -0
- package/dist/navbar/index.d.ts +17 -0
- package/dist/navbar/index.js +166 -0
- package/dist/navbar/index.mjs +126 -0
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/passwordInput/index.mjs +27 -137
- package/dist/phoneInput/index.mjs +19 -129
- package/dist/radio/index.d.mts +1 -4
- package/dist/radio/index.d.ts +1 -4
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/sidebar/index.d.mts +48 -0
- package/dist/sidebar/index.d.ts +48 -0
- package/dist/sidebar/index.js +341 -0
- package/dist/sidebar/index.mjs +298 -0
- package/dist/simpleTable/index.d.mts +4 -3
- package/dist/simpleTable/index.d.ts +4 -3
- package/dist/simpleTable/index.mjs +21 -45
- package/dist/skeleton/index.d.mts +3 -3
- package/dist/skeleton/index.d.ts +3 -3
- package/dist/skeleton/index.mjs +3 -29
- package/dist/sortButton/index.mjs +9 -260
- package/dist/splitButton/index.d.mts +4 -3
- package/dist/splitButton/index.d.ts +4 -3
- package/dist/splitButton/index.mjs +10 -259
- package/dist/stats/index.d.mts +19 -0
- package/dist/stats/index.d.ts +19 -0
- package/dist/stats/index.js +191 -0
- package/dist/stats/index.mjs +154 -0
- package/dist/stopPropagationWrapper/index.d.mts +2 -2
- package/dist/stopPropagationWrapper/index.d.ts +2 -2
- package/dist/switch/index.d.mts +2 -1
- package/dist/switch/index.d.ts +2 -1
- package/dist/tabs/index.d.mts +19 -1
- package/dist/tabs/index.d.ts +19 -1
- package/dist/tabs/index.mjs +94 -14
- package/dist/textarea/index.d.mts +8 -1
- package/dist/textarea/index.d.ts +8 -1
- package/dist/textarea/index.mjs +92 -8
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Label-fkQ4ebuH.d.mts +0 -12
- package/dist/Label-fkQ4ebuH.d.ts +0 -12
- package/dist/chunk-72HYR6WB.mjs +0 -88
- package/dist/chunk-JYSC6GKM.mjs +0 -229
- package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
- package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
- package/dist/commonTypes-N7XOVCit.d.mts +0 -5
- package/dist/commonTypes-N7XOVCit.d.ts +0 -5
- package/dist/index-DUZFcPRO.d.mts +0 -38
- package/dist/index-DUZFcPRO.d.ts +0 -38
@@ -0,0 +1,298 @@
|
|
1
|
+
import {
|
2
|
+
cn
|
3
|
+
} from "../chunk-TE3BKEXL.mjs";
|
4
|
+
|
5
|
+
// components/layout/sidebar/Sidebar.tsx
|
6
|
+
import * as React2 from "react";
|
7
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
8
|
+
|
9
|
+
// components/elements/chip/Chip.tsx
|
10
|
+
import React from "react";
|
11
|
+
var Chip = React.forwardRef(
|
12
|
+
({
|
13
|
+
label,
|
14
|
+
size = "normal",
|
15
|
+
icon,
|
16
|
+
color,
|
17
|
+
radius = "inherit",
|
18
|
+
dotType,
|
19
|
+
...rest
|
20
|
+
}, ref) => {
|
21
|
+
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
22
|
+
let radiusStyles = {
|
23
|
+
inherit: " hawa-rounded",
|
24
|
+
full: "hawa-rounded-full",
|
25
|
+
none: "hawa-rounded-none"
|
26
|
+
};
|
27
|
+
let sizeStyles = {
|
28
|
+
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
29
|
+
normal: "hawa-h-fit hawa-text-xs",
|
30
|
+
large: "hawa-text-base"
|
31
|
+
};
|
32
|
+
let dotStyles = {
|
33
|
+
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
34
|
+
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
35
|
+
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
36
|
+
};
|
37
|
+
let dotTypeStyles = {
|
38
|
+
available: "hawa-bg-green-500",
|
39
|
+
unavailable: "hawa-bg-red-500"
|
40
|
+
};
|
41
|
+
let colorStyles = {
|
42
|
+
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
43
|
+
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
44
|
+
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
45
|
+
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
46
|
+
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
47
|
+
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
48
|
+
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
49
|
+
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
50
|
+
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
51
|
+
};
|
52
|
+
if (label) {
|
53
|
+
return /* @__PURE__ */ React.createElement(
|
54
|
+
"span",
|
55
|
+
{
|
56
|
+
...rest,
|
57
|
+
ref,
|
58
|
+
className: cn(
|
59
|
+
defaultStyles,
|
60
|
+
sizeStyles[size],
|
61
|
+
radiusStyles[radius],
|
62
|
+
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
63
|
+
)
|
64
|
+
},
|
65
|
+
dotType && /* @__PURE__ */ React.createElement(
|
66
|
+
"span",
|
67
|
+
{
|
68
|
+
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
69
|
+
}
|
70
|
+
),
|
71
|
+
icon && icon,
|
72
|
+
label
|
73
|
+
);
|
74
|
+
} else {
|
75
|
+
return /* @__PURE__ */ React.createElement(
|
76
|
+
"span",
|
77
|
+
{
|
78
|
+
...rest,
|
79
|
+
ref,
|
80
|
+
className: cn(
|
81
|
+
"hawa-h-2 hawa-w-2 hawa-rounded-full",
|
82
|
+
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
83
|
+
)
|
84
|
+
}
|
85
|
+
);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
);
|
89
|
+
|
90
|
+
// components/layout/sidebar/Sidebar.tsx
|
91
|
+
var Accordion = AccordionPrimitive.Root;
|
92
|
+
var triggerStyles = "hawa-flex hawa-flex-1 hawa-items-center hawa-duration-75 hawa-select-none hawa-cursor-pointer hawa-rounded hawa-justify-between hawa-p-2 hawa-px-3 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa--rotate-90";
|
93
|
+
var AccordionItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
94
|
+
AccordionItem.displayName = "AccordionItem";
|
95
|
+
var AccordionTrigger = React2.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React2.createElement(
|
96
|
+
AccordionPrimitive.Trigger,
|
97
|
+
{
|
98
|
+
ref,
|
99
|
+
className: cn(triggerStyles, className),
|
100
|
+
...props
|
101
|
+
},
|
102
|
+
children,
|
103
|
+
showArrow && /* @__PURE__ */ React2.createElement(
|
104
|
+
"svg",
|
105
|
+
{
|
106
|
+
"aria-label": "Chevron Right Icon",
|
107
|
+
stroke: "currentColor",
|
108
|
+
fill: "currentColor",
|
109
|
+
viewBox: "0 0 16 16",
|
110
|
+
height: "1em",
|
111
|
+
width: "1em",
|
112
|
+
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
113
|
+
},
|
114
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
|
115
|
+
)
|
116
|
+
)));
|
117
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
118
|
+
var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
119
|
+
AccordionPrimitive.Content,
|
120
|
+
{
|
121
|
+
ref,
|
122
|
+
className: cn(
|
123
|
+
"hawa-overflow-hidden hawa-text-sm hawa-transition-all data-[state=closed]:hawa-animate-accordion-up data-[state=open]:hawa-animate-accordion-down",
|
124
|
+
className
|
125
|
+
),
|
126
|
+
...props
|
127
|
+
},
|
128
|
+
/* @__PURE__ */ React2.createElement("div", null, children)
|
129
|
+
));
|
130
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
131
|
+
var SidebarGroup = ({
|
132
|
+
title,
|
133
|
+
items,
|
134
|
+
selectedItem,
|
135
|
+
openedItem,
|
136
|
+
setOpenedItem,
|
137
|
+
onItemClick,
|
138
|
+
onSubItemClick,
|
139
|
+
direction,
|
140
|
+
isOpen
|
141
|
+
}) => {
|
142
|
+
return /* @__PURE__ */ React2.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React2.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React2.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React2.createElement(
|
143
|
+
Accordion,
|
144
|
+
{
|
145
|
+
value: openedItem,
|
146
|
+
type: "single",
|
147
|
+
onValueChange: (e) => {
|
148
|
+
setOpenedItem(e);
|
149
|
+
},
|
150
|
+
collapsible: true,
|
151
|
+
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
152
|
+
},
|
153
|
+
items.map((item, idx) => /* @__PURE__ */ React2.createElement(
|
154
|
+
SidebarItem,
|
155
|
+
{
|
156
|
+
isOpen,
|
157
|
+
selectedItem,
|
158
|
+
key: idx,
|
159
|
+
direction,
|
160
|
+
item,
|
161
|
+
onItemClick,
|
162
|
+
onSubItemClick
|
163
|
+
}
|
164
|
+
))
|
165
|
+
)));
|
166
|
+
};
|
167
|
+
var SidebarItem = ({
|
168
|
+
item,
|
169
|
+
onItemClick,
|
170
|
+
onSubItemClick,
|
171
|
+
direction,
|
172
|
+
isOpen = true,
|
173
|
+
...props
|
174
|
+
}) => {
|
175
|
+
const getSelectedStyle = (value) => {
|
176
|
+
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
177
|
+
};
|
178
|
+
if (item.subitems) {
|
179
|
+
return /* @__PURE__ */ React2.createElement(
|
180
|
+
AccordionItem,
|
181
|
+
{
|
182
|
+
value: item.value,
|
183
|
+
className: "hawa-overflow-x-clip ",
|
184
|
+
dir: direction
|
185
|
+
},
|
186
|
+
/* @__PURE__ */ React2.createElement(
|
187
|
+
AccordionTrigger,
|
188
|
+
{
|
189
|
+
className: cn(
|
190
|
+
"hawa-w-full hawa-overflow-x-clip",
|
191
|
+
props.selectedItem === item.value ? "hawa-cursor-default hawa-bg-primary hawa-text-primary-foreground" : "hawa-h-10 hover:hawa-bg-primary/10",
|
192
|
+
item.subitems && item.subitems.some(
|
193
|
+
(subitem) => props.selectedItem === subitem.value
|
194
|
+
) ? "hawa-bg-primary/80 hawa-text-primary-foreground hover:hawa-bg-primary/80" : ""
|
195
|
+
),
|
196
|
+
showArrow: isOpen
|
197
|
+
},
|
198
|
+
/* @__PURE__ */ React2.createElement(
|
199
|
+
"div",
|
200
|
+
{
|
201
|
+
className: cn(
|
202
|
+
"hawa-flex hawa-h-fit hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2"
|
203
|
+
)
|
204
|
+
},
|
205
|
+
item.icon && item.icon,
|
206
|
+
/* @__PURE__ */ React2.createElement(
|
207
|
+
"span",
|
208
|
+
{
|
209
|
+
className: cn(
|
210
|
+
"hawa-transition-all ",
|
211
|
+
isOpen ? "hawa-opacity-100" : "hawa-opacity-0"
|
212
|
+
)
|
213
|
+
},
|
214
|
+
item.label
|
215
|
+
)
|
216
|
+
)
|
217
|
+
),
|
218
|
+
item.subitems && /* @__PURE__ */ React2.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React2.createElement(
|
219
|
+
"div",
|
220
|
+
{
|
221
|
+
className: cn(
|
222
|
+
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
223
|
+
)
|
224
|
+
},
|
225
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React2.createElement(
|
226
|
+
"a",
|
227
|
+
{
|
228
|
+
href: subitem.slug,
|
229
|
+
key: idx,
|
230
|
+
onMouseDown: (e) => {
|
231
|
+
if (subitem.onMouseDown) {
|
232
|
+
subitem.onMouseDown(e);
|
233
|
+
}
|
234
|
+
},
|
235
|
+
onClick: (e) => {
|
236
|
+
e.stopPropagation();
|
237
|
+
if (subitem.onClick) {
|
238
|
+
subitem.onClick(e);
|
239
|
+
}
|
240
|
+
if (onSubItemClick) {
|
241
|
+
onSubItemClick([item.value, subitem.value]);
|
242
|
+
}
|
243
|
+
},
|
244
|
+
className: cn(
|
245
|
+
"hawa-flex hawa-h-full hawa-cursor-pointer hawa-flex-row hawa-items-center hawa-gap-2 hawa-overflow-x-clip hawa-whitespace-nowrap hawa-rounded hawa-p-2 hawa-transition-all",
|
246
|
+
// bg-foreground/10
|
247
|
+
getSelectedStyle(subitem.value)
|
248
|
+
)
|
249
|
+
},
|
250
|
+
subitem.icon && subitem.icon,
|
251
|
+
subitem.label
|
252
|
+
))
|
253
|
+
))
|
254
|
+
);
|
255
|
+
} else {
|
256
|
+
return /* @__PURE__ */ React2.createElement(
|
257
|
+
"a",
|
258
|
+
{
|
259
|
+
href: item.slug,
|
260
|
+
dir: direction,
|
261
|
+
onMouseDown: (e) => {
|
262
|
+
if (item.onMouseDown) {
|
263
|
+
item.onMouseDown(e);
|
264
|
+
}
|
265
|
+
},
|
266
|
+
onClick: (e) => {
|
267
|
+
if (item.onClick) {
|
268
|
+
item.onClick(e);
|
269
|
+
}
|
270
|
+
if (onItemClick) {
|
271
|
+
onItemClick([item.value]);
|
272
|
+
}
|
273
|
+
},
|
274
|
+
className: cn(
|
275
|
+
triggerStyles,
|
276
|
+
getSelectedStyle(item.value),
|
277
|
+
"hawa-overflow-x-clip "
|
278
|
+
)
|
279
|
+
},
|
280
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React2.createElement(
|
281
|
+
"span",
|
282
|
+
{
|
283
|
+
className: cn(
|
284
|
+
"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-transition-all",
|
285
|
+
isOpen ? "hawa-opacity-100" : "hawa-opacity-0"
|
286
|
+
)
|
287
|
+
},
|
288
|
+
item.label,
|
289
|
+
" ",
|
290
|
+
item.badge && /* @__PURE__ */ React2.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
291
|
+
))
|
292
|
+
);
|
293
|
+
}
|
294
|
+
};
|
295
|
+
export {
|
296
|
+
SidebarGroup,
|
297
|
+
SidebarItem
|
298
|
+
};
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import * as
|
1
|
+
import * as React from 'react';
|
2
2
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
3
|
-
|
3
|
+
|
4
|
+
type DirectionType = "rtl" | "ltr";
|
4
5
|
|
5
6
|
type DataProps = {};
|
6
7
|
type SimpleTableProps = {
|
@@ -25,6 +26,6 @@ declare module "@tanstack/table-core" {
|
|
25
26
|
padding?: "condensed" | "default" | "noPadding";
|
26
27
|
}
|
27
28
|
}
|
28
|
-
declare const SimpleTable:
|
29
|
+
declare const SimpleTable: React.FC<SimpleTableProps>;
|
29
30
|
|
30
31
|
export { SimpleTable };
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import * as
|
1
|
+
import * as React from 'react';
|
2
2
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
3
|
-
|
3
|
+
|
4
|
+
type DirectionType = "rtl" | "ltr";
|
4
5
|
|
5
6
|
type DataProps = {};
|
6
7
|
type SimpleTableProps = {
|
@@ -25,6 +26,6 @@ declare module "@tanstack/table-core" {
|
|
25
26
|
padding?: "condensed" | "default" | "noPadding";
|
26
27
|
}
|
27
28
|
}
|
28
|
-
declare const SimpleTable:
|
29
|
+
declare const SimpleTable: React.FC<SimpleTableProps>;
|
29
30
|
|
30
31
|
export { SimpleTable };
|
@@ -1,45 +1,21 @@
|
|
1
|
+
import {
|
2
|
+
Skeleton
|
3
|
+
} from "../chunk-ND4BWUKH.mjs";
|
1
4
|
import {
|
2
5
|
cn
|
3
6
|
} from "../chunk-TE3BKEXL.mjs";
|
4
7
|
|
5
8
|
// components/elements/simpleTable/SimpleTable.tsx
|
6
|
-
import * as
|
9
|
+
import * as React2 from "react";
|
7
10
|
import {
|
8
11
|
flexRender,
|
9
12
|
getCoreRowModel,
|
10
13
|
useReactTable
|
11
14
|
} from "@tanstack/react-table";
|
12
15
|
|
13
|
-
// components/elements/skeleton/Skeleton.tsx
|
14
|
-
import React from "react";
|
15
|
-
function Skeleton({
|
16
|
-
className,
|
17
|
-
content,
|
18
|
-
animation = "pulse",
|
19
|
-
...props
|
20
|
-
}) {
|
21
|
-
const animationStyles = {
|
22
|
-
none: "hawa-rounded hawa-bg-muted",
|
23
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
24
|
-
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"
|
25
|
-
};
|
26
|
-
return /* @__PURE__ */ React.createElement(
|
27
|
-
"div",
|
28
|
-
{
|
29
|
-
className: cn(
|
30
|
-
animationStyles[animation],
|
31
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
32
|
-
className
|
33
|
-
),
|
34
|
-
...props
|
35
|
-
},
|
36
|
-
content && content
|
37
|
-
);
|
38
|
-
}
|
39
|
-
|
40
16
|
// components/elements/table/Table.tsx
|
41
|
-
import * as
|
42
|
-
var Table =
|
17
|
+
import * as React from "react";
|
18
|
+
var Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("div", { className: "hawa-relative hawa-w-full hawa-overflow-auto hawa-rounded hawa-border" }, /* @__PURE__ */ React.createElement(
|
43
19
|
"table",
|
44
20
|
{
|
45
21
|
ref,
|
@@ -48,7 +24,7 @@ var Table = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
48
24
|
}
|
49
25
|
)));
|
50
26
|
Table.displayName = "Table";
|
51
|
-
var TableHeader =
|
27
|
+
var TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
52
28
|
"thead",
|
53
29
|
{
|
54
30
|
ref,
|
@@ -57,8 +33,8 @@ var TableHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
57
33
|
}
|
58
34
|
));
|
59
35
|
TableHeader.displayName = "TableHeader";
|
60
|
-
var TableHead =
|
61
|
-
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */
|
36
|
+
var TableHead = React.forwardRef(
|
37
|
+
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
62
38
|
"th",
|
63
39
|
{
|
64
40
|
ref,
|
@@ -77,9 +53,9 @@ var TableHead = React2.forwardRef(
|
|
77
53
|
)
|
78
54
|
);
|
79
55
|
TableHead.displayName = "TableHead";
|
80
|
-
var TableBody =
|
56
|
+
var TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
|
81
57
|
TableBody.displayName = "TableBody";
|
82
|
-
var TableFooter =
|
58
|
+
var TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
83
59
|
"tfoot",
|
84
60
|
{
|
85
61
|
ref,
|
@@ -91,7 +67,7 @@ var TableFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
91
67
|
}
|
92
68
|
));
|
93
69
|
TableFooter.displayName = "TableFooter";
|
94
|
-
var TableRow =
|
70
|
+
var TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
95
71
|
"tr",
|
96
72
|
{
|
97
73
|
ref,
|
@@ -105,14 +81,14 @@ var TableRow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
105
81
|
}
|
106
82
|
));
|
107
83
|
TableRow.displayName = "TableRow";
|
108
|
-
var TableCell =
|
84
|
+
var TableCell = React.forwardRef(
|
109
85
|
({ className, enablePadding = true, padding = "default", ...props }, ref) => {
|
110
86
|
let paddingStyles = {
|
111
87
|
condensed: "hawa-p-0 hawa-px-4",
|
112
88
|
default: "hawa-p-4",
|
113
89
|
noPadding: "hawa-p-0"
|
114
90
|
};
|
115
|
-
return /* @__PURE__ */
|
91
|
+
return /* @__PURE__ */ React.createElement(
|
116
92
|
"td",
|
117
93
|
{
|
118
94
|
ref,
|
@@ -134,7 +110,7 @@ var TableCell = React2.forwardRef(
|
|
134
110
|
}
|
135
111
|
);
|
136
112
|
TableCell.displayName = "TableCell";
|
137
|
-
var TableCaption =
|
113
|
+
var TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
138
114
|
"caption",
|
139
115
|
{
|
140
116
|
ref,
|
@@ -160,7 +136,7 @@ var SimpleTable = ({
|
|
160
136
|
columns,
|
161
137
|
getCoreRowModel: getCoreRowModel()
|
162
138
|
});
|
163
|
-
return /* @__PURE__ */
|
139
|
+
return /* @__PURE__ */ React2.createElement(
|
164
140
|
"div",
|
165
141
|
{
|
166
142
|
className: cn(
|
@@ -168,8 +144,8 @@ var SimpleTable = ({
|
|
168
144
|
classNames
|
169
145
|
)
|
170
146
|
},
|
171
|
-
props.isLoading ? /* @__PURE__ */
|
172
|
-
return /* @__PURE__ */
|
147
|
+
props.isLoading ? /* @__PURE__ */ React2.createElement(Skeleton, { className: "h-[130px] w-full" }) : /* @__PURE__ */ React2.createElement("div", { className: "hawa-rounded" }, /* @__PURE__ */ React2.createElement(Table, null, table.getAllColumns().length > 0 && /* @__PURE__ */ React2.createElement(TableHeader, null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React2.createElement(TableRow, { key: headerGroup.id }, headerGroup.headers.map((header) => {
|
148
|
+
return /* @__PURE__ */ React2.createElement(
|
173
149
|
TableHead,
|
174
150
|
{
|
175
151
|
condensed: props.condensed,
|
@@ -181,7 +157,7 @@ var SimpleTable = ({
|
|
181
157
|
header.getContext()
|
182
158
|
)
|
183
159
|
);
|
184
|
-
})))), /* @__PURE__ */
|
160
|
+
})))), /* @__PURE__ */ React2.createElement(TableBody, null, ((_a = table.getRowModel().rows) == null ? void 0 : _a.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React2.createElement(
|
185
161
|
TableRow,
|
186
162
|
{
|
187
163
|
key: row.id,
|
@@ -189,7 +165,7 @@ var SimpleTable = ({
|
|
189
165
|
},
|
190
166
|
row.getVisibleCells().map((cell) => {
|
191
167
|
var _a2;
|
192
|
-
return /* @__PURE__ */
|
168
|
+
return /* @__PURE__ */ React2.createElement(
|
193
169
|
TableCell,
|
194
170
|
{
|
195
171
|
dir: props.direction,
|
@@ -202,7 +178,7 @@ var SimpleTable = ({
|
|
202
178
|
)
|
203
179
|
);
|
204
180
|
})
|
205
|
-
)) : /* @__PURE__ */
|
181
|
+
)) : /* @__PURE__ */ React2.createElement(TableRow, null, /* @__PURE__ */ React2.createElement(
|
206
182
|
TableCell,
|
207
183
|
{
|
208
184
|
colSpan: columns.length,
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
|
3
|
-
interface SkeletonProps extends
|
3
|
+
interface SkeletonProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
4
4
|
className?: string;
|
5
5
|
animation?: "none" | "pulse" | "shimmer";
|
6
6
|
content?: any;
|
7
7
|
}
|
8
|
-
declare function Skeleton({ className, content, animation, ...props }: SkeletonProps):
|
8
|
+
declare function Skeleton({ className, content, animation, ...props }: SkeletonProps): React__default.JSX.Element;
|
9
9
|
|
10
10
|
export { Skeleton };
|
package/dist/skeleton/index.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
|
3
|
-
interface SkeletonProps extends
|
3
|
+
interface SkeletonProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
4
4
|
className?: string;
|
5
5
|
animation?: "none" | "pulse" | "shimmer";
|
6
6
|
content?: any;
|
7
7
|
}
|
8
|
-
declare function Skeleton({ className, content, animation, ...props }: SkeletonProps):
|
8
|
+
declare function Skeleton({ className, content, animation, ...props }: SkeletonProps): React__default.JSX.Element;
|
9
9
|
|
10
10
|
export { Skeleton };
|
package/dist/skeleton/index.mjs
CHANGED
@@ -1,33 +1,7 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../chunk-
|
4
|
-
|
5
|
-
// components/elements/skeleton/Skeleton.tsx
|
6
|
-
import React from "react";
|
7
|
-
function Skeleton({
|
8
|
-
className,
|
9
|
-
content,
|
10
|
-
animation = "pulse",
|
11
|
-
...props
|
12
|
-
}) {
|
13
|
-
const animationStyles = {
|
14
|
-
none: "hawa-rounded hawa-bg-muted",
|
15
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
16
|
-
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"
|
17
|
-
};
|
18
|
-
return /* @__PURE__ */ React.createElement(
|
19
|
-
"div",
|
20
|
-
{
|
21
|
-
className: cn(
|
22
|
-
animationStyles[animation],
|
23
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
24
|
-
className
|
25
|
-
),
|
26
|
-
...props
|
27
|
-
},
|
28
|
-
content && content
|
29
|
-
);
|
30
|
-
}
|
2
|
+
Skeleton
|
3
|
+
} from "../chunk-ND4BWUKH.mjs";
|
4
|
+
import "../chunk-TE3BKEXL.mjs";
|
31
5
|
export {
|
32
6
|
Skeleton
|
33
7
|
};
|