asterui 0.12.32 → 0.12.33
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/components/Drawer.d.ts +34 -4
- package/dist/components/Drawer.js +240 -169
- package/dist/components/Drawer.js.map +1 -1
- package/dist/components/Layout.d.ts +40 -32
- package/dist/components/Layout.js +178 -130
- package/dist/components/Layout.js.map +1 -1
- package/dist/components/ResponsiveDrawer.d.ts +34 -0
- package/dist/components/ResponsiveDrawer.js +75 -0
- package/dist/components/ResponsiveDrawer.js.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +127 -129
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/PageLayout.d.ts +0 -9
- package/dist/components/PageLayout.js +0 -35
- package/dist/components/PageLayout.js.map +0 -1
- package/dist/components/SidebarDrawer.d.ts +0 -21
- package/dist/components/SidebarDrawer.js +0 -44
- package/dist/components/SidebarDrawer.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -47,9 +47,9 @@ export type { DockProps, DockItemProps, DockItemConfig } from './components/Dock
|
|
|
47
47
|
export { Divider } from './components/Divider';
|
|
48
48
|
export type { DividerProps } from './components/Divider';
|
|
49
49
|
export { Drawer } from './components/Drawer';
|
|
50
|
-
export type { DrawerProps, DrawerPlacement, DrawerSize } from './components/Drawer';
|
|
51
|
-
export {
|
|
52
|
-
export type {
|
|
50
|
+
export type { DrawerProps, DrawerRef, DrawerPlacement, DrawerSize, DrawerPushConfig } from './components/Drawer';
|
|
51
|
+
export { ResponsiveDrawer } from './components/ResponsiveDrawer';
|
|
52
|
+
export type { ResponsiveDrawerProps, ResponsiveDrawerBreakpoint } from './components/ResponsiveDrawer';
|
|
53
53
|
export { Fieldset } from './components/Fieldset';
|
|
54
54
|
export type { FieldsetProps, FieldsetLegendProps } from './components/Fieldset';
|
|
55
55
|
export { FileInput } from './components/FileInput';
|
|
@@ -85,7 +85,7 @@ export type { JoinProps } from './components/Join';
|
|
|
85
85
|
export { Kbd } from './components/Kbd';
|
|
86
86
|
export type { KbdProps } from './components/Kbd';
|
|
87
87
|
export { Layout, useSiderContext } from './components/Layout';
|
|
88
|
-
export type { LayoutProps, LayoutHeaderProps, LayoutFooterProps, LayoutContentProps, LayoutSiderProps } from './components/Layout';
|
|
88
|
+
export type { LayoutProps, LayoutHeaderProps, LayoutFooterProps, LayoutContentProps, LayoutSiderProps, SiderTheme, SiderCollapsedType } from './components/Layout';
|
|
89
89
|
export { List } from './components/List';
|
|
90
90
|
export type { ListProps, ListRowProps, ListItemProps, ListItemMetaProps, ListPaginationConfig, ListGridConfig } from './components/List';
|
|
91
91
|
export { Loading } from './components/Loading';
|
|
@@ -116,8 +116,6 @@ export { OTPInput } from './components/OTPInput';
|
|
|
116
116
|
export type { OTPInputProps, OTPInputRef } from './components/OTPInput';
|
|
117
117
|
export { Pagination } from './components/Pagination';
|
|
118
118
|
export type { PaginationProps } from './components/Pagination';
|
|
119
|
-
export { PageLayout } from './components/PageLayout';
|
|
120
|
-
export type { PageLayoutProps } from './components/PageLayout';
|
|
121
119
|
export { Popconfirm } from './components/Popconfirm';
|
|
122
120
|
export type { PopconfirmProps } from './components/Popconfirm';
|
|
123
121
|
export { Popover } from './components/Popover';
|
package/dist/index.js
CHANGED
|
@@ -3,17 +3,17 @@ import { Anchor as p } from "./components/Anchor.js";
|
|
|
3
3
|
import { Alert as f } from "./components/Alert.js";
|
|
4
4
|
import { Autocomplete as a } from "./components/Autocomplete.js";
|
|
5
5
|
import { Avatar as n, AvatarGroup as s } from "./components/Avatar.js";
|
|
6
|
-
import { Badge as
|
|
7
|
-
import { Breadcrumb as
|
|
6
|
+
import { Badge as u } from "./components/Badge.js";
|
|
7
|
+
import { Breadcrumb as d } from "./components/Breadcrumb.js";
|
|
8
8
|
import { Button as T } from "./components/Button.js";
|
|
9
9
|
import { CopyButton as S } from "./components/CopyButton.js";
|
|
10
|
-
import { Checkbox as
|
|
11
|
-
import { Chat as
|
|
12
|
-
import { ColorPicker as
|
|
13
|
-
import { Card as
|
|
14
|
-
import { Cascader as
|
|
10
|
+
import { Checkbox as k } from "./components/Checkbox.js";
|
|
11
|
+
import { Chat as v } from "./components/Chat.js";
|
|
12
|
+
import { ColorPicker as w } from "./components/ColorPicker.js";
|
|
13
|
+
import { Card as R } from "./components/Card.js";
|
|
14
|
+
import { Cascader as F } from "./components/Cascader.js";
|
|
15
15
|
import { Carousel as A } from "./components/Carousel.js";
|
|
16
|
-
import { Collapse as
|
|
16
|
+
import { Collapse as M } from "./components/Collapse.js";
|
|
17
17
|
import { Container as H } from "./components/Container.js";
|
|
18
18
|
import { ContextMenu as K } from "./components/ContextMenu.js";
|
|
19
19
|
import { Countdown as N } from "./components/Countdown.js";
|
|
@@ -23,22 +23,22 @@ import { Diff as j } from "./components/Diff.js";
|
|
|
23
23
|
import { Dock as Q } from "./components/Dock.js";
|
|
24
24
|
import { Divider as X } from "./components/Divider.js";
|
|
25
25
|
import { Drawer as Z } from "./components/Drawer.js";
|
|
26
|
-
import {
|
|
26
|
+
import { ResponsiveDrawer as $ } from "./components/ResponsiveDrawer.js";
|
|
27
27
|
import { Fieldset as ro } from "./components/Fieldset.js";
|
|
28
28
|
import { FileInput as to } from "./components/FileInput.js";
|
|
29
29
|
import { Filter as mo } from "./components/Filter.js";
|
|
30
30
|
import { Flex as xo } from "./components/Flex.js";
|
|
31
31
|
import { FloatButton as io } from "./components/FloatButton.js";
|
|
32
32
|
import { Footer as so } from "./components/Footer.js";
|
|
33
|
-
import { Form as
|
|
33
|
+
import { Form as uo, useFormInstance as co } from "./components/Form.js";
|
|
34
34
|
import { Col as To, Grid as go, Row as So } from "./components/Grid.js";
|
|
35
|
-
import { Hero as
|
|
36
|
-
import { HoverGallery as
|
|
37
|
-
import { Image as
|
|
38
|
-
import { Dropdown as
|
|
39
|
-
import { Empty as
|
|
35
|
+
import { Hero as ko } from "./components/Hero.js";
|
|
36
|
+
import { HoverGallery as vo } from "./components/HoverGallery.js";
|
|
37
|
+
import { Image as wo } from "./components/Image.js";
|
|
38
|
+
import { Dropdown as Ro } from "./components/Dropdown.js";
|
|
39
|
+
import { Empty as Fo } from "./components/Empty.js";
|
|
40
40
|
import { Input as Ao } from "./components/Input.js";
|
|
41
|
-
import { InputNumber as
|
|
41
|
+
import { InputNumber as Mo } from "./components/InputNumber.js";
|
|
42
42
|
import { Join as Ho } from "./components/Join.js";
|
|
43
43
|
import { Kbd as Ko } from "./components/Kbd.js";
|
|
44
44
|
import { Layout as No, useSiderContext as Oo } from "./components/Layout.js";
|
|
@@ -54,54 +54,53 @@ import { Phone as pr } from "./components/Phone.js";
|
|
|
54
54
|
import { Window as fr } from "./components/Window.js";
|
|
55
55
|
import { Modal as ar } from "./components/Modal.js";
|
|
56
56
|
import { Navbar as nr } from "./components/Navbar.js";
|
|
57
|
-
import { notification as
|
|
58
|
-
import { OTPInput as
|
|
57
|
+
import { notification as lr } from "./components/Notification.js";
|
|
58
|
+
import { OTPInput as cr } from "./components/OTPInput.js";
|
|
59
59
|
import { Pagination as Cr } from "./components/Pagination.js";
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import { TreeSelect as we, TreeSelectComponent as he } from "./components/TreeSelect.js";
|
|
60
|
+
import { Popconfirm as gr } from "./components/Popconfirm.js";
|
|
61
|
+
import { Popover as Pr } from "./components/Popover.js";
|
|
62
|
+
import { Progress as br } from "./components/Progress.js";
|
|
63
|
+
import { Radio as Dr } from "./components/Radio.js";
|
|
64
|
+
import { RadialProgress as yr } from "./components/RadialProgress.js";
|
|
65
|
+
import { Range as hr } from "./components/Range.js";
|
|
66
|
+
import { Rating as Br } from "./components/Rating.js";
|
|
67
|
+
import { Result as Ir } from "./components/Result.js";
|
|
68
|
+
import { Select as Lr } from "./components/Select.js";
|
|
69
|
+
import { Segmented as Gr } from "./components/Segmented.js";
|
|
70
|
+
import { Skeleton as Wr } from "./components/Skeleton.js";
|
|
71
|
+
import { Space as Or } from "./components/Space.js";
|
|
72
|
+
import { Splitter as Er } from "./components/Splitter.js";
|
|
73
|
+
import { Stats as Ur } from "./components/Stat.js";
|
|
74
|
+
import { Status as qr } from "./components/Status.js";
|
|
75
|
+
import { Steps as Vr } from "./components/Steps.js";
|
|
76
|
+
import { Table as Yr } from "./components/Table.js";
|
|
77
|
+
import { Tabs as _r } from "./components/Tabs.js";
|
|
78
|
+
import { Textarea as oe } from "./components/Textarea.js";
|
|
79
|
+
import { TextRotate as ee } from "./components/TextRotate.js";
|
|
80
|
+
import { CheckableTag as pe, Tag as me, TagLiveRegion as fe } from "./components/Tag.js";
|
|
81
|
+
import { ThemeController as ae } from "./components/ThemeController.js";
|
|
82
|
+
import { TimePicker as ne } from "./components/TimePicker.js";
|
|
83
|
+
import { Timeline as le } from "./components/Timeline.js";
|
|
84
|
+
import { Toggle as ce } from "./components/Toggle.js";
|
|
85
|
+
import { Tour as Ce } from "./components/Tour.js";
|
|
86
|
+
import { Tooltip as ge } from "./components/Tooltip.js";
|
|
87
|
+
import { Transfer as Pe } from "./components/Transfer.js";
|
|
88
|
+
import { Tree as be } from "./components/Tree.js";
|
|
89
|
+
import { TreeSelect as De, TreeSelectComponent as we } from "./components/TreeSelect.js";
|
|
91
90
|
import { Typography as Re } from "./components/Typography.js";
|
|
92
|
-
import { Upload as
|
|
93
|
-
import { Watermark as
|
|
94
|
-
import { Hide as
|
|
95
|
-
import { useBreakpoint as
|
|
96
|
-
import { useDisclosure as
|
|
97
|
-
import { useClipboard as
|
|
98
|
-
import { useLocalStorage as
|
|
99
|
-
import { useDebounce as
|
|
100
|
-
import { useClickOutside as
|
|
101
|
-
import { usePrevious as
|
|
102
|
-
import { useHover as
|
|
103
|
-
import { useKeyPress as
|
|
104
|
-
import { useWindowSize as
|
|
91
|
+
import { Upload as Fe } from "./components/Upload.js";
|
|
92
|
+
import { Watermark as Ae } from "./components/Watermark.js";
|
|
93
|
+
import { Hide as Me, Show as Le } from "./components/Responsive.js";
|
|
94
|
+
import { useBreakpoint as Ge } from "./hooks/useBreakpoint.js";
|
|
95
|
+
import { useDisclosure as We } from "./hooks/useDisclosure.js";
|
|
96
|
+
import { useClipboard as Oe } from "./hooks/useClipboard.js";
|
|
97
|
+
import { useLocalStorage as Ee } from "./hooks/useLocalStorage.js";
|
|
98
|
+
import { useDebounce as Ue } from "./hooks/useDebounce.js";
|
|
99
|
+
import { useClickOutside as qe } from "./hooks/useClickOutside.js";
|
|
100
|
+
import { usePrevious as Ve } from "./hooks/usePrevious.js";
|
|
101
|
+
import { useHover as Ye } from "./hooks/useHover.js";
|
|
102
|
+
import { useKeyPress as _e, useKeyPressCallback as $e } from "./hooks/useKeyPress.js";
|
|
103
|
+
import { useWindowSize as rt } from "./hooks/useWindowSize.js";
|
|
105
104
|
export {
|
|
106
105
|
e as Affix,
|
|
107
106
|
f as Alert,
|
|
@@ -109,20 +108,20 @@ export {
|
|
|
109
108
|
a as Autocomplete,
|
|
110
109
|
n as Avatar,
|
|
111
110
|
s as AvatarGroup,
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
u as Badge,
|
|
112
|
+
d as Breadcrumb,
|
|
114
113
|
or as Browser,
|
|
115
114
|
T as Button,
|
|
116
|
-
|
|
115
|
+
R as Card,
|
|
117
116
|
A as Carousel,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
F as Cascader,
|
|
118
|
+
v as Chat,
|
|
119
|
+
pe as CheckableTag,
|
|
120
|
+
k as Checkbox,
|
|
122
121
|
er as Code,
|
|
123
122
|
To as Col,
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
M as Collapse,
|
|
124
|
+
w as ColorPicker,
|
|
126
125
|
H as Container,
|
|
127
126
|
K as ContextMenu,
|
|
128
127
|
S as CopyButton,
|
|
@@ -133,22 +132,22 @@ export {
|
|
|
133
132
|
X as Divider,
|
|
134
133
|
Q as Dock,
|
|
135
134
|
Z as Drawer,
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
Ro as Dropdown,
|
|
136
|
+
Fo as Empty,
|
|
138
137
|
ro as Fieldset,
|
|
139
138
|
to as FileInput,
|
|
140
139
|
mo as Filter,
|
|
141
140
|
xo as Flex,
|
|
142
141
|
io as FloatButton,
|
|
143
142
|
so as Footer,
|
|
144
|
-
|
|
143
|
+
uo as Form,
|
|
145
144
|
go as Grid,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
ko as Hero,
|
|
146
|
+
Me as Hide,
|
|
147
|
+
vo as HoverGallery,
|
|
148
|
+
wo as Image,
|
|
150
149
|
Ao as Input,
|
|
151
|
-
|
|
150
|
+
Mo as InputNumber,
|
|
152
151
|
Ho as Join,
|
|
153
152
|
Ko as Kbd,
|
|
154
153
|
No as Layout,
|
|
@@ -160,62 +159,61 @@ export {
|
|
|
160
159
|
_o as Menu,
|
|
161
160
|
ar as Modal,
|
|
162
161
|
nr as Navbar,
|
|
163
|
-
|
|
164
|
-
gr as PageLayout,
|
|
162
|
+
cr as OTPInput,
|
|
165
163
|
Cr as Pagination,
|
|
166
164
|
pr as Phone,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
165
|
+
gr as Popconfirm,
|
|
166
|
+
Pr as Popover,
|
|
167
|
+
br as Progress,
|
|
168
|
+
yr as RadialProgress,
|
|
169
|
+
Dr as Radio,
|
|
170
|
+
hr as Range,
|
|
171
|
+
Br as Rating,
|
|
172
|
+
$ as ResponsiveDrawer,
|
|
173
|
+
Ir as Result,
|
|
175
174
|
So as Row,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
Or as
|
|
181
|
-
Er as
|
|
182
|
-
Ur as
|
|
183
|
-
qr as
|
|
184
|
-
Vr as
|
|
185
|
-
Yr as
|
|
186
|
-
_r as
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
ne as
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
De as
|
|
200
|
-
we as
|
|
201
|
-
he as TreeSelectComponent,
|
|
175
|
+
Gr as Segmented,
|
|
176
|
+
Lr as Select,
|
|
177
|
+
Le as Show,
|
|
178
|
+
Wr as Skeleton,
|
|
179
|
+
Or as Space,
|
|
180
|
+
Er as Splitter,
|
|
181
|
+
Ur as Stats,
|
|
182
|
+
qr as Status,
|
|
183
|
+
Vr as Steps,
|
|
184
|
+
Yr as Table,
|
|
185
|
+
_r as Tabs,
|
|
186
|
+
me as Tag,
|
|
187
|
+
fe as TagLiveRegion,
|
|
188
|
+
ee as TextRotate,
|
|
189
|
+
oe as Textarea,
|
|
190
|
+
ae as ThemeController,
|
|
191
|
+
ne as TimePicker,
|
|
192
|
+
le as Timeline,
|
|
193
|
+
ce as Toggle,
|
|
194
|
+
ge as Tooltip,
|
|
195
|
+
Ce as Tour,
|
|
196
|
+
Pe as Transfer,
|
|
197
|
+
be as Tree,
|
|
198
|
+
De as TreeSelect,
|
|
199
|
+
we as TreeSelectComponent,
|
|
202
200
|
Re as Typography,
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
Fe as Upload,
|
|
202
|
+
Ae as Watermark,
|
|
205
203
|
fr as Window,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
lr as notification,
|
|
205
|
+
Ge as useBreakpoint,
|
|
206
|
+
qe as useClickOutside,
|
|
207
|
+
Oe as useClipboard,
|
|
208
|
+
Ue as useDebounce,
|
|
209
|
+
We as useDisclosure,
|
|
212
210
|
co as useFormInstance,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
Ye as useHover,
|
|
212
|
+
_e as useKeyPress,
|
|
213
|
+
$e as useKeyPressCallback,
|
|
214
|
+
Ee as useLocalStorage,
|
|
215
|
+
Ve as usePrevious,
|
|
218
216
|
Oo as useSiderContext,
|
|
219
|
-
|
|
217
|
+
rt as useWindowSize
|
|
220
218
|
};
|
|
221
219
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface PageLayoutProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
background?: 'base-100' | 'base-200' | 'base-300' | 'neutral';
|
|
5
|
-
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
6
|
-
minHeight?: 'screen' | 'full' | 'auto';
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const PageLayout: React.FC<PageLayoutProps>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
const i = ({
|
|
3
|
-
children: s,
|
|
4
|
-
background: e = "base-200",
|
|
5
|
-
padding: a = "md",
|
|
6
|
-
minHeight: n = "screen",
|
|
7
|
-
className: t = ""
|
|
8
|
-
}) => {
|
|
9
|
-
const o = {
|
|
10
|
-
"base-100": "bg-base-100",
|
|
11
|
-
"base-200": "bg-base-200",
|
|
12
|
-
"base-300": "bg-base-300",
|
|
13
|
-
neutral: "bg-neutral"
|
|
14
|
-
}, l = {
|
|
15
|
-
none: "",
|
|
16
|
-
sm: "p-4",
|
|
17
|
-
md: "p-8",
|
|
18
|
-
lg: "p-12"
|
|
19
|
-
}, b = {
|
|
20
|
-
screen: "min-h-screen",
|
|
21
|
-
full: "min-h-full",
|
|
22
|
-
auto: ""
|
|
23
|
-
}, c = [
|
|
24
|
-
o[e],
|
|
25
|
-
l[a],
|
|
26
|
-
b[n],
|
|
27
|
-
"text-base-content",
|
|
28
|
-
t
|
|
29
|
-
].filter(Boolean).join(" ");
|
|
30
|
-
return /* @__PURE__ */ r("div", { className: c, children: s });
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
i as PageLayout
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=PageLayout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayout.js","sources":["../../src/components/PageLayout.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface PageLayoutProps {\n children: React.ReactNode\n background?: 'base-100' | 'base-200' | 'base-300' | 'neutral'\n padding?: 'none' | 'sm' | 'md' | 'lg'\n minHeight?: 'screen' | 'full' | 'auto'\n className?: string\n}\n\nexport const PageLayout: React.FC<PageLayoutProps> = ({\n children,\n background = 'base-200',\n padding = 'md',\n minHeight = 'screen',\n className = '',\n}) => {\n const backgroundClasses = {\n 'base-100': 'bg-base-100',\n 'base-200': 'bg-base-200',\n 'base-300': 'bg-base-300',\n neutral: 'bg-neutral',\n }\n\n const paddingClasses = {\n none: '',\n sm: 'p-4',\n md: 'p-8',\n lg: 'p-12',\n }\n\n const minHeightClasses = {\n screen: 'min-h-screen',\n full: 'min-h-full',\n auto: '',\n }\n\n const classes = [\n backgroundClasses[background],\n paddingClasses[padding],\n minHeightClasses[minHeight],\n 'text-base-content',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return <div className={classes}>{children}</div>\n}\n"],"names":["PageLayout","children","background","padding","minHeight","className","backgroundClasses","paddingClasses","minHeightClasses","classes","jsx"],"mappings":";AAUO,MAAMA,IAAwC,CAAC;AAAA,EACpD,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AACd,MAAM;AACJ,QAAMC,IAAoB;AAAA,IACxB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,EAAA,GAGLC,IAAiB;AAAA,IACrB,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,GAGAC,IAAmB;AAAA,IACvB,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,EAAA,GAGFC,IAAU;AAAA,IACdH,EAAkBJ,CAAU;AAAA,IAC5BK,EAAeJ,CAAO;AAAA,IACtBK,EAAiBJ,CAAS;AAAA,IAC1B;AAAA,IACAC;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SAAO,gBAAAK,EAAC,OAAA,EAAI,WAAWD,GAAU,UAAAR,EAAA,CAAS;AAC5C;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface SidebarDrawerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
-
/** Main content area */
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
/** Sidebar content */
|
|
6
|
-
sidebar: React.ReactNode;
|
|
7
|
-
/** Controlled open state */
|
|
8
|
-
open?: boolean;
|
|
9
|
-
/** Callback when open state changes */
|
|
10
|
-
onOpenChange?: (open: boolean) => void;
|
|
11
|
-
/** Position sidebar on the right side */
|
|
12
|
-
end?: boolean;
|
|
13
|
-
/** Additional classes for sidebar container */
|
|
14
|
-
sidebarClassName?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* SidebarDrawer - A responsive sidebar layout component using DaisyUI's drawer.
|
|
18
|
-
* Use for navigation sidebars that toggle on mobile.
|
|
19
|
-
* For overlay panel drawers (forms, details), use the Drawer component instead.
|
|
20
|
-
*/
|
|
21
|
-
export declare const SidebarDrawer: React.FC<SidebarDrawerProps>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import f from "react";
|
|
3
|
-
const N = ({
|
|
4
|
-
children: l,
|
|
5
|
-
sidebar: d,
|
|
6
|
-
open: a = !1,
|
|
7
|
-
onOpenChange: o,
|
|
8
|
-
end: c = !1,
|
|
9
|
-
className: t = "",
|
|
10
|
-
sidebarClassName: n = "",
|
|
11
|
-
...i
|
|
12
|
-
}) => {
|
|
13
|
-
const r = f.useId(), m = (b) => {
|
|
14
|
-
o?.(b.target.checked);
|
|
15
|
-
}, h = ["drawer", c && "drawer-end", t].filter(Boolean).join(" "), w = ["menu bg-base-200 min-h-full w-80 p-4", n].filter(Boolean).join(" ");
|
|
16
|
-
return /* @__PURE__ */ s("div", { className: h, "data-state": a ? "open" : "closed", ...i, children: [
|
|
17
|
-
/* @__PURE__ */ e(
|
|
18
|
-
"input",
|
|
19
|
-
{
|
|
20
|
-
id: r,
|
|
21
|
-
type: "checkbox",
|
|
22
|
-
className: "drawer-toggle",
|
|
23
|
-
checked: a,
|
|
24
|
-
onChange: m
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ e("div", { className: "drawer-content", children: l }),
|
|
28
|
-
/* @__PURE__ */ s("div", { className: "drawer-side", children: [
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
-
"label",
|
|
31
|
-
{
|
|
32
|
-
htmlFor: r,
|
|
33
|
-
"aria-label": "close sidebar",
|
|
34
|
-
className: "drawer-overlay"
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */ e("div", { className: w, children: d })
|
|
38
|
-
] })
|
|
39
|
-
] });
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
N as SidebarDrawer
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=SidebarDrawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarDrawer.js","sources":["../../src/components/SidebarDrawer.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface SidebarDrawerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Main content area */\n children: React.ReactNode\n /** Sidebar content */\n sidebar: React.ReactNode\n /** Controlled open state */\n open?: boolean\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void\n /** Position sidebar on the right side */\n end?: boolean\n /** Additional classes for sidebar container */\n sidebarClassName?: string\n}\n\n/**\n * SidebarDrawer - A responsive sidebar layout component using DaisyUI's drawer.\n * Use for navigation sidebars that toggle on mobile.\n * For overlay panel drawers (forms, details), use the Drawer component instead.\n */\nexport const SidebarDrawer: React.FC<SidebarDrawerProps> = ({\n children,\n sidebar,\n open = false,\n onOpenChange,\n end = false,\n className = '',\n sidebarClassName = '',\n ...rest\n}) => {\n const drawerId = React.useId()\n\n const handleToggle = (e: React.ChangeEvent<HTMLInputElement>) => {\n onOpenChange?.(e.target.checked)\n }\n\n const drawerClasses = ['drawer', end && 'drawer-end', className]\n .filter(Boolean)\n .join(' ')\n\n const sidebarClasses = ['menu bg-base-200 min-h-full w-80 p-4', sidebarClassName]\n .filter(Boolean)\n .join(' ')\n\n return (\n <div className={drawerClasses} data-state={open ? 'open' : 'closed'} {...rest}>\n <input\n id={drawerId}\n type=\"checkbox\"\n className=\"drawer-toggle\"\n checked={open}\n onChange={handleToggle}\n />\n <div className=\"drawer-content\">{children}</div>\n <div className=\"drawer-side\">\n <label\n htmlFor={drawerId}\n aria-label=\"close sidebar\"\n className=\"drawer-overlay\"\n />\n <div className={sidebarClasses}>{sidebar}</div>\n </div>\n </div>\n )\n}\n"],"names":["SidebarDrawer","children","sidebar","open","onOpenChange","end","className","sidebarClassName","rest","drawerId","React","handleToggle","e","drawerClasses","sidebarClasses","jsxs","jsx"],"mappings":";;AAsBO,MAAMA,IAA8C,CAAC;AAAA,EAC1D,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,cAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,WAAAC,IAAY;AAAA,EACZ,kBAAAC,IAAmB;AAAA,EACnB,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAWC,EAAM,MAAA,GAEjBC,IAAe,CAACC,MAA2C;AAC/D,IAAAR,IAAeQ,EAAE,OAAO,OAAO;AAAA,EACjC,GAEMC,IAAgB,CAAC,UAAUR,KAAO,cAAcC,CAAS,EAC5D,OAAO,OAAO,EACd,KAAK,GAAG,GAELQ,IAAiB,CAAC,wCAAwCP,CAAgB,EAC7E,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAQ,EAAC,SAAI,WAAWF,GAAe,cAAYV,IAAO,SAAS,UAAW,GAAGK,GACvE,UAAA;AAAA,IAAA,gBAAAQ;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAIP;AAAA,QACJ,MAAK;AAAA,QACL,WAAU;AAAA,QACV,SAASN;AAAA,QACT,UAAUQ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK,EAAC,OAAA,EAAI,WAAU,kBAAkB,UAAAf,EAAA,CAAS;AAAA,IAC1C,gBAAAc,EAAC,OAAA,EAAI,WAAU,eACb,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASP;AAAA,UACT,cAAW;AAAA,UACX,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAEZ,gBAAAO,EAAC,OAAA,EAAI,WAAWF,GAAiB,UAAAZ,EAAA,CAAQ;AAAA,IAAA,EAAA,CAC3C;AAAA,EAAA,GACF;AAEJ;"}
|