@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
@@ -1,8 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default from 'react';
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
4
|
-
|
5
|
-
type RadiusType = "full" | "inherit" | "none";
|
4
|
+
import { R as RadiusType } from '../commonTypes-WPhcN3Vr.mjs';
|
6
5
|
|
7
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
8
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default from 'react';
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
4
|
-
|
5
|
-
type RadiusType = "full" | "inherit" | "none";
|
4
|
+
import { R as RadiusType } from '../commonTypes-WPhcN3Vr.js';
|
6
5
|
|
7
6
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
8
7
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
package/dist/accordion/index.mjs
CHANGED
@@ -1,11 +1,223 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
cn
|
3
|
+
} from "../chunk-TE3BKEXL.mjs";
|
4
|
+
|
5
|
+
// components/elements/accordion/Accordion.tsx
|
6
|
+
import * as React4 from "react";
|
7
|
+
import * as AccordionPrimitive3 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/elements/accordion/AccordionContent.tsx
|
91
|
+
import * as React2 from "react";
|
92
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
93
|
+
var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
94
|
+
AccordionPrimitive.Content,
|
95
|
+
{
|
96
|
+
ref,
|
97
|
+
className: !props.unstyled ? cn(
|
98
|
+
"hawa-overflow-hidden hawa-text-sm hawa-transition-all data-[state=closed]:hawa-animate-accordion-up data-[state=open]:hawa-animate-accordion-down",
|
99
|
+
className
|
100
|
+
) : className,
|
101
|
+
...props
|
102
|
+
},
|
103
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-bg-background hawa-p-4" }, children)
|
104
|
+
));
|
105
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
106
|
+
|
107
|
+
// components/elements/accordion/AccordionTrigger.tsx
|
108
|
+
import * as React3 from "react";
|
109
|
+
import * as AccordionPrimitive2 from "@radix-ui/react-accordion";
|
110
|
+
var AccordionTrigger = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React3.createElement(AccordionPrimitive2.Header, { className: "hawa-flex" }, /* @__PURE__ */ React3.createElement(
|
111
|
+
AccordionPrimitive2.Trigger,
|
112
|
+
{
|
113
|
+
ref,
|
114
|
+
className: !props.unstyled ? cn(
|
115
|
+
"hawa-flex hawa-flex-1 hawa-items-center hawa-justify-between hawa-bg-muted/50 hawa-p-4 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa-rotate-180",
|
116
|
+
props.disabled ? "hawa-bg-muted/30 hawa-text-muted-foreground/50" : "hover:hawa-bg-muted",
|
117
|
+
className
|
118
|
+
) : className,
|
119
|
+
...props
|
120
|
+
},
|
121
|
+
children,
|
122
|
+
!props.hideArrow && /* @__PURE__ */ React3.createElement(
|
123
|
+
"svg",
|
124
|
+
{
|
125
|
+
xmlns: "http://www.w3.org/2000/svg",
|
126
|
+
width: "24",
|
127
|
+
height: "24",
|
128
|
+
viewBox: "0 0 24 24",
|
129
|
+
fill: "none",
|
130
|
+
stroke: "currentColor",
|
131
|
+
strokeWidth: "2",
|
132
|
+
strokeLinecap: "round",
|
133
|
+
strokeLinejoin: "round",
|
134
|
+
className: "hawa-icon hawa-shrink-0 hawa-transition-transform hawa-duration-200"
|
135
|
+
},
|
136
|
+
/* @__PURE__ */ React3.createElement("path", { d: "m6 9 6 6 6-6" })
|
137
|
+
)
|
138
|
+
)));
|
139
|
+
AccordionTrigger.displayName = AccordionPrimitive2.Trigger.displayName;
|
140
|
+
|
141
|
+
// components/elements/accordion/Accordion.tsx
|
142
|
+
var Accordion = React4.forwardRef(
|
143
|
+
({
|
144
|
+
items,
|
145
|
+
design = "default",
|
146
|
+
itemClassNames,
|
147
|
+
triggerclassNames,
|
148
|
+
contentclassNames,
|
149
|
+
className,
|
150
|
+
...props
|
151
|
+
}, ref) => /* @__PURE__ */ React4.createElement(AccordionPrimitive3.Root, { type: props.type, collapsible: true }, /* @__PURE__ */ React4.createElement(
|
152
|
+
"div",
|
153
|
+
{
|
154
|
+
className: cn("hawa-flex hawa-flex-col", {
|
155
|
+
"hawa-gap-4": design === "separated",
|
156
|
+
"hawa-gap-0": design === "default"
|
157
|
+
})
|
158
|
+
},
|
159
|
+
items.map((item, index) => /* @__PURE__ */ React4.createElement(
|
160
|
+
AccordionPrimitive3.Item,
|
161
|
+
{
|
162
|
+
disabled: item.disabled || false,
|
163
|
+
className: cn(itemClassNames, "hawa-rounded"),
|
164
|
+
key: index,
|
165
|
+
value: `item-${index}`
|
166
|
+
},
|
167
|
+
/* @__PURE__ */ React4.createElement(
|
168
|
+
AccordionTrigger,
|
169
|
+
{
|
170
|
+
disabled: item.disabled || false,
|
171
|
+
className: cn(
|
172
|
+
"hawa-transition-all",
|
173
|
+
design === "separated" ? "hawa-rounded data-[state=open]:hawa-rounded-b-none" : {
|
174
|
+
"hawa-rounded-t": index === 0,
|
175
|
+
"data-[state=closed]:hawa-rounded-b": index === items.length - 1
|
176
|
+
},
|
177
|
+
triggerclassNames
|
178
|
+
)
|
179
|
+
},
|
180
|
+
/* @__PURE__ */ React4.createElement(
|
181
|
+
"span",
|
182
|
+
{
|
183
|
+
className: cn(
|
184
|
+
"hawa-flex hawa-flex-row",
|
185
|
+
item.chip && "hawa-gap-2"
|
186
|
+
)
|
187
|
+
},
|
188
|
+
item.trigger,
|
189
|
+
" ",
|
190
|
+
item.chip && /* @__PURE__ */ React4.createElement(Chip, { ...item.chip })
|
191
|
+
)
|
192
|
+
),
|
193
|
+
/* @__PURE__ */ React4.createElement(
|
194
|
+
AccordionContent,
|
195
|
+
{
|
196
|
+
"aria-disabled": item.disabled || false,
|
197
|
+
className: cn(
|
198
|
+
"hawa-border hawa-transition-all",
|
199
|
+
design === "separated" ? "hawa-rounded data-[state=open]:hawa-rounded-t-none" : {
|
200
|
+
"data-[state=open]:hawa-rounded-b": index === items.length - 1
|
201
|
+
},
|
202
|
+
contentclassNames
|
203
|
+
)
|
204
|
+
},
|
205
|
+
item.content
|
206
|
+
)
|
207
|
+
))
|
208
|
+
))
|
209
|
+
);
|
210
|
+
Accordion.displayName = "Accordion";
|
211
|
+
|
212
|
+
// components/elements/accordion/AccordionItem.tsx
|
213
|
+
import * as React5 from "react";
|
214
|
+
import * as AccordionPrimitive4 from "@radix-ui/react-accordion";
|
215
|
+
var AccordionItem = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(AccordionPrimitive4.Item, { ref, className: cn(className), ...props }));
|
216
|
+
AccordionItem.displayName = "AccordionItem";
|
217
|
+
|
218
|
+
// components/elements/accordion/AccordionRoot.tsx
|
219
|
+
import * as AccordionPrimitive5 from "@radix-ui/react-accordion";
|
220
|
+
var AccordionRoot = AccordionPrimitive5.Root;
|
9
221
|
export {
|
10
222
|
Accordion,
|
11
223
|
AccordionContent,
|
package/dist/alert/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
-
import { S as SeverityType, D as DirectionType } from '../commonTypes-
|
2
|
+
import { S as SeverityType, D as DirectionType } from '../commonTypes-WPhcN3Vr.mjs';
|
3
3
|
|
4
4
|
type AlertTypes = {
|
5
5
|
severity?: SeverityType | "hyper" | "oceanic";
|
package/dist/alert/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
-
import { S as SeverityType, D as DirectionType } from '../commonTypes-
|
2
|
+
import { S as SeverityType, D as DirectionType } from '../commonTypes-WPhcN3Vr.js';
|
3
3
|
|
4
4
|
type AlertTypes = {
|
5
5
|
severity?: SeverityType | "hyper" | "oceanic";
|
@@ -0,0 +1,126 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import React__default from 'react';
|
3
|
+
|
4
|
+
type DirectionType = "rtl" | "ltr";
|
5
|
+
|
6
|
+
type SubItem$1 = {
|
7
|
+
label?: string;
|
8
|
+
value?: any;
|
9
|
+
icon?: any;
|
10
|
+
action?: () => void;
|
11
|
+
onMiddleClick?: (e: any) => void;
|
12
|
+
highlighted?: boolean;
|
13
|
+
disabled?: boolean;
|
14
|
+
slug?: string;
|
15
|
+
};
|
16
|
+
type MenuItemType = {
|
17
|
+
icon?: React.ReactNode;
|
18
|
+
label?: string;
|
19
|
+
shortcut?: React.ReactNode;
|
20
|
+
badged?: boolean;
|
21
|
+
value?: any;
|
22
|
+
content?: any;
|
23
|
+
slug?: string;
|
24
|
+
end?: any;
|
25
|
+
presist?: boolean;
|
26
|
+
itemType?: "separator" | "label" | string;
|
27
|
+
action?: () => void;
|
28
|
+
highlighted?: boolean;
|
29
|
+
subitems?: SubItem$1[];
|
30
|
+
disabled?: boolean;
|
31
|
+
onMiddleClick?: (e: any) => void;
|
32
|
+
onClick?: any;
|
33
|
+
};
|
34
|
+
|
35
|
+
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
36
|
+
|
37
|
+
type AppSidebarItemProps = {
|
38
|
+
value: string;
|
39
|
+
slug?: string;
|
40
|
+
label: string;
|
41
|
+
badge?: {
|
42
|
+
label: string;
|
43
|
+
color: ChipColors;
|
44
|
+
};
|
45
|
+
icon?: any;
|
46
|
+
subitems?: SubItem[];
|
47
|
+
onClick?: (e: React.MouseEvent) => void;
|
48
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
49
|
+
};
|
50
|
+
type SubItem = {
|
51
|
+
value: string;
|
52
|
+
label: string;
|
53
|
+
slug?: string;
|
54
|
+
icon?: any;
|
55
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
56
|
+
onClick?: (e: React.MouseEvent) => void;
|
57
|
+
};
|
58
|
+
|
59
|
+
type AppLayoutTypes = {
|
60
|
+
/** a custom header to replace the logoLink & logoSymbol */
|
61
|
+
header?: React__default.ReactNode;
|
62
|
+
design?: "default";
|
63
|
+
/** The pages of the side drawer */
|
64
|
+
drawerItems: AppSidebarItemProps[];
|
65
|
+
/** The direction of the layout */
|
66
|
+
direction?: DirectionType;
|
67
|
+
/** The title of the current selected page, make sure it's the same as the drawerItem slug */
|
68
|
+
currentPage: string;
|
69
|
+
/** Specifies the title of the page. */
|
70
|
+
pageTitle?: string;
|
71
|
+
/** Specifies the symbol for the logo. */
|
72
|
+
logoSymbol?: any;
|
73
|
+
/** Specifies the link for the logo. */
|
74
|
+
logoLink?: string;
|
75
|
+
/** Specifies the text for the logo. */
|
76
|
+
logoText?: any;
|
77
|
+
/** Specifies the content to be displayed in the layout. */
|
78
|
+
children?: any;
|
79
|
+
/** Specifies whether to display the top bar. */
|
80
|
+
topBar?: boolean;
|
81
|
+
/** Specifies the username to be displayed. */
|
82
|
+
username?: string;
|
83
|
+
/** Specifies the user email to be displayed. */
|
84
|
+
email?: string;
|
85
|
+
/** Specifies the image for the avatar. */
|
86
|
+
avatarImage?: any;
|
87
|
+
/**
|
88
|
+
* Specifies the size of the drawer.
|
89
|
+
* - 'sm': Small.
|
90
|
+
* - 'md': Medium.
|
91
|
+
* - 'large': Large.
|
92
|
+
*/
|
93
|
+
drawerSize?: "sm" | "md" | "large";
|
94
|
+
/** Specifies the menu items for the profile menu. */
|
95
|
+
profileMenuItems?: MenuItemType[];
|
96
|
+
/**
|
97
|
+
* Specifies the width of the profile menu.
|
98
|
+
* - 'default': Default width.
|
99
|
+
* - 'sm': Small width.
|
100
|
+
* - 'lg': Large width.
|
101
|
+
* - 'parent': Inherits width from parent element.
|
102
|
+
*/
|
103
|
+
profileMenuWidth?: "default" | "sm" | "lg" | "parent";
|
104
|
+
/** Event handler for drawer expansion. */
|
105
|
+
onDrawerExpand?: (e: any) => void;
|
106
|
+
/** Specifies whether to keep the drawer open. */
|
107
|
+
keepOpen: boolean;
|
108
|
+
/** The method used to control whether the drawer is expanded or not. */
|
109
|
+
setKeepOpen: (value: boolean) => void;
|
110
|
+
/** Specifies additional actions for the drawer footer. */
|
111
|
+
DrawerFooterActions?: any;
|
112
|
+
/** Specifies the item that was clicked. */
|
113
|
+
clickedItem?: any;
|
114
|
+
/** Event handler for logo button click. */
|
115
|
+
onLogoClick?: () => void;
|
116
|
+
/** Text labels for various UI elements. */
|
117
|
+
texts?: {
|
118
|
+
/** Label for expand sidebar button. */
|
119
|
+
expandSidebar?: string;
|
120
|
+
/** Label for collapse sidebar button. */
|
121
|
+
collapseSidebar?: string;
|
122
|
+
};
|
123
|
+
};
|
124
|
+
declare const AppLayout: React__default.FunctionComponent<AppLayoutTypes>;
|
125
|
+
|
126
|
+
export { AppLayout };
|
@@ -0,0 +1,126 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import React__default from 'react';
|
3
|
+
|
4
|
+
type DirectionType = "rtl" | "ltr";
|
5
|
+
|
6
|
+
type SubItem$1 = {
|
7
|
+
label?: string;
|
8
|
+
value?: any;
|
9
|
+
icon?: any;
|
10
|
+
action?: () => void;
|
11
|
+
onMiddleClick?: (e: any) => void;
|
12
|
+
highlighted?: boolean;
|
13
|
+
disabled?: boolean;
|
14
|
+
slug?: string;
|
15
|
+
};
|
16
|
+
type MenuItemType = {
|
17
|
+
icon?: React.ReactNode;
|
18
|
+
label?: string;
|
19
|
+
shortcut?: React.ReactNode;
|
20
|
+
badged?: boolean;
|
21
|
+
value?: any;
|
22
|
+
content?: any;
|
23
|
+
slug?: string;
|
24
|
+
end?: any;
|
25
|
+
presist?: boolean;
|
26
|
+
itemType?: "separator" | "label" | string;
|
27
|
+
action?: () => void;
|
28
|
+
highlighted?: boolean;
|
29
|
+
subitems?: SubItem$1[];
|
30
|
+
disabled?: boolean;
|
31
|
+
onMiddleClick?: (e: any) => void;
|
32
|
+
onClick?: any;
|
33
|
+
};
|
34
|
+
|
35
|
+
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
36
|
+
|
37
|
+
type AppSidebarItemProps = {
|
38
|
+
value: string;
|
39
|
+
slug?: string;
|
40
|
+
label: string;
|
41
|
+
badge?: {
|
42
|
+
label: string;
|
43
|
+
color: ChipColors;
|
44
|
+
};
|
45
|
+
icon?: any;
|
46
|
+
subitems?: SubItem[];
|
47
|
+
onClick?: (e: React.MouseEvent) => void;
|
48
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
49
|
+
};
|
50
|
+
type SubItem = {
|
51
|
+
value: string;
|
52
|
+
label: string;
|
53
|
+
slug?: string;
|
54
|
+
icon?: any;
|
55
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
56
|
+
onClick?: (e: React.MouseEvent) => void;
|
57
|
+
};
|
58
|
+
|
59
|
+
type AppLayoutTypes = {
|
60
|
+
/** a custom header to replace the logoLink & logoSymbol */
|
61
|
+
header?: React__default.ReactNode;
|
62
|
+
design?: "default";
|
63
|
+
/** The pages of the side drawer */
|
64
|
+
drawerItems: AppSidebarItemProps[];
|
65
|
+
/** The direction of the layout */
|
66
|
+
direction?: DirectionType;
|
67
|
+
/** The title of the current selected page, make sure it's the same as the drawerItem slug */
|
68
|
+
currentPage: string;
|
69
|
+
/** Specifies the title of the page. */
|
70
|
+
pageTitle?: string;
|
71
|
+
/** Specifies the symbol for the logo. */
|
72
|
+
logoSymbol?: any;
|
73
|
+
/** Specifies the link for the logo. */
|
74
|
+
logoLink?: string;
|
75
|
+
/** Specifies the text for the logo. */
|
76
|
+
logoText?: any;
|
77
|
+
/** Specifies the content to be displayed in the layout. */
|
78
|
+
children?: any;
|
79
|
+
/** Specifies whether to display the top bar. */
|
80
|
+
topBar?: boolean;
|
81
|
+
/** Specifies the username to be displayed. */
|
82
|
+
username?: string;
|
83
|
+
/** Specifies the user email to be displayed. */
|
84
|
+
email?: string;
|
85
|
+
/** Specifies the image for the avatar. */
|
86
|
+
avatarImage?: any;
|
87
|
+
/**
|
88
|
+
* Specifies the size of the drawer.
|
89
|
+
* - 'sm': Small.
|
90
|
+
* - 'md': Medium.
|
91
|
+
* - 'large': Large.
|
92
|
+
*/
|
93
|
+
drawerSize?: "sm" | "md" | "large";
|
94
|
+
/** Specifies the menu items for the profile menu. */
|
95
|
+
profileMenuItems?: MenuItemType[];
|
96
|
+
/**
|
97
|
+
* Specifies the width of the profile menu.
|
98
|
+
* - 'default': Default width.
|
99
|
+
* - 'sm': Small width.
|
100
|
+
* - 'lg': Large width.
|
101
|
+
* - 'parent': Inherits width from parent element.
|
102
|
+
*/
|
103
|
+
profileMenuWidth?: "default" | "sm" | "lg" | "parent";
|
104
|
+
/** Event handler for drawer expansion. */
|
105
|
+
onDrawerExpand?: (e: any) => void;
|
106
|
+
/** Specifies whether to keep the drawer open. */
|
107
|
+
keepOpen: boolean;
|
108
|
+
/** The method used to control whether the drawer is expanded or not. */
|
109
|
+
setKeepOpen: (value: boolean) => void;
|
110
|
+
/** Specifies additional actions for the drawer footer. */
|
111
|
+
DrawerFooterActions?: any;
|
112
|
+
/** Specifies the item that was clicked. */
|
113
|
+
clickedItem?: any;
|
114
|
+
/** Event handler for logo button click. */
|
115
|
+
onLogoClick?: () => void;
|
116
|
+
/** Text labels for various UI elements. */
|
117
|
+
texts?: {
|
118
|
+
/** Label for expand sidebar button. */
|
119
|
+
expandSidebar?: string;
|
120
|
+
/** Label for collapse sidebar button. */
|
121
|
+
collapseSidebar?: string;
|
122
|
+
};
|
123
|
+
};
|
124
|
+
declare const AppLayout: React__default.FunctionComponent<AppLayoutTypes>;
|
125
|
+
|
126
|
+
export { AppLayout };
|