@grucloud/bau-ui 0.40.0 → 0.42.0
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/README.md +4 -2
- package/accordion/accordion.js +162 -0
- package/accordion/index.d.ts +26 -0
- package/accordion/index.js +1 -0
- package/alert/alert.js +65 -55
- package/alert/index.d.ts +8 -9
- package/alertStack/alertStack.js +5 -3
- package/alertStack/index.d.ts +5 -2
- package/animate/animate.js +47 -33
- package/animate/index.d.ts +2 -3
- package/autocomplete/autocomplete.js +222 -0
- package/autocomplete/index.d.ts +21 -0
- package/autocomplete/index.js +1 -0
- package/avatar/avatar.js +46 -6
- package/avatar/index.d.ts +5 -2
- package/badge/badge.js +43 -0
- package/badge/index.d.ts +12 -0
- package/badge/index.js +1 -0
- package/bau-ui.d.ts +14 -7
- package/breadcrumbs/breadcrumbs.js +30 -6
- package/breadcrumbs/index.d.ts +8 -2
- package/button/button.js +38 -105
- package/button/index.d.ts +4 -7
- package/buttonGroup/buttonGroup.js +68 -0
- package/buttonGroup/index.d.ts +10 -0
- package/buttonGroup/index.js +1 -0
- package/calendar/calendar.js +51 -0
- package/calendar/index.d.ts +13 -0
- package/calendar/index.js +1 -0
- package/checkbox/checkbox.js +66 -39
- package/checkbox/index.d.ts +5 -2
- package/chip/chip.js +60 -0
- package/chip/index.d.ts +10 -0
- package/chip/index.js +1 -0
- package/constants.d.ts +13 -0
- package/constants.js +3 -0
- package/context.d.ts +12 -0
- package/context.js +17 -0
- package/drawer/drawer.js +10 -5
- package/drawer/index.d.ts +5 -2
- package/drillDownMenu/drillDownMenu.js +157 -138
- package/drillDownMenu/index.d.ts +11 -3
- package/fileInput/fileInput.js +25 -11
- package/fileInput/index.d.ts +9 -3
- package/form/form.js +31 -0
- package/form/index.d.ts +10 -0
- package/form/index.js +1 -0
- package/globalStyle/globalStyle.js +133 -61
- package/globalStyle/index.d.ts +14 -0
- package/input/index.d.ts +6 -8
- package/input/input.js +78 -107
- package/list/index.d.ts +10 -0
- package/list/index.js +1 -0
- package/list/list.js +66 -0
- package/modal/index.d.ts +5 -2
- package/modal/modal.js +47 -10
- package/package.json +4 -4
- package/pages/login/index.d.ts +4 -5
- package/pages/login/login.js +1 -1
- package/popover/index.d.ts +18 -0
- package/popover/index.js +1 -0
- package/popover/popover.js +69 -0
- package/select/index.d.ts +16 -0
- package/select/index.js +1 -0
- package/select/select.js +176 -0
- package/slider/index.d.ts +10 -0
- package/slider/index.js +1 -0
- package/slider/slider.js +47 -0
- package/spinner/index.d.ts +7 -4
- package/spinner/spinner.js +13 -5
- package/switch/index.d.ts +5 -2
- package/switch/switch.js +101 -18
- package/tableContainer/index.d.ts +9 -0
- package/tableContainer/index.js +1 -0
- package/tableContainer/tableContainer.js +78 -0
- package/tablePagination/index.d.ts +17 -0
- package/tablePagination/index.js +1 -0
- package/tablePagination/tablePagination.js +131 -0
- package/tabs/index.d.ts +3 -1
- package/tabs/tabs.js +34 -15
- package/themeSwitch/index.d.ts +3 -1
- package/themeSwitch/themeSwitch.js +58 -15
- package/tooltip/index.d.ts +24 -0
- package/tooltip/index.js +1 -0
- package/tooltip/tooltip.js +184 -0
- package/treeView/index.d.ts +7 -2
- package/treeView/treeView.js +37 -9
package/button/index.d.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
declare module "@grucloud/bau-ui/button" {
|
|
2
|
-
type
|
|
2
|
+
type DefaultDesignProps = import("../constants").DefaultDesignProps;
|
|
3
|
+
type ComponentOption = import("../bau-ui").ComponentOption;
|
|
3
4
|
|
|
4
5
|
type ButtonProps = {
|
|
5
|
-
raised?: boolean;
|
|
6
|
-
primary?: boolean;
|
|
7
|
-
accent?: boolean;
|
|
8
|
-
ripple?: boolean;
|
|
9
6
|
disabled?: boolean;
|
|
10
7
|
href?: string;
|
|
11
|
-
};
|
|
8
|
+
} & DefaultDesignProps;
|
|
12
9
|
|
|
13
10
|
type Component = import("../bau-ui").Component<
|
|
14
11
|
ButtonProps,
|
|
15
12
|
HTMLButtonElement | HTMLAnchorElement
|
|
16
13
|
>;
|
|
17
14
|
|
|
18
|
-
export default function (context: any): Component;
|
|
15
|
+
export default function (context: any, options?: ComponentOption): Component;
|
|
19
16
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
|
+
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
|
+
import { Colors } from "../constants.js";
|
|
4
|
+
|
|
5
|
+
const colorsToCss = () =>
|
|
6
|
+
Colors.map(
|
|
7
|
+
(color) =>
|
|
8
|
+
`
|
|
9
|
+
&.button-group.${color} {
|
|
10
|
+
& button:not(:last-child) {
|
|
11
|
+
border-right: 2px solid var(--color-${color}) !important;
|
|
12
|
+
}
|
|
13
|
+
& button:not(:first-child) {
|
|
14
|
+
border-left: none !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.button-group.outline.${color} {
|
|
19
|
+
border: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.button-group.solid.${color} {
|
|
23
|
+
& button:not(:last-child) {
|
|
24
|
+
border-right: 2px solid var(--color-${color}-lightest) !important;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`
|
|
28
|
+
).join("\n");
|
|
29
|
+
|
|
30
|
+
export default function (context, options) {
|
|
31
|
+
const { bau, css } = context;
|
|
32
|
+
const { div } = bau.tags;
|
|
33
|
+
|
|
34
|
+
const className = css`
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
border-radius: var(--global-radius);
|
|
37
|
+
& button:not(:last-child) {
|
|
38
|
+
border-top-right-radius: 0;
|
|
39
|
+
border-bottom-right-radius: 0;
|
|
40
|
+
}
|
|
41
|
+
& button:not(:first-child) {
|
|
42
|
+
border-top-left-radius: 0;
|
|
43
|
+
border-bottom-left-radius: 0;
|
|
44
|
+
}
|
|
45
|
+
${colorsToCss()}
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
return function ButtonGroup(...args) {
|
|
49
|
+
let [{ variant = "outline", size = "md", color, ...props }, ...children] =
|
|
50
|
+
toPropsAndChildren(args);
|
|
51
|
+
|
|
52
|
+
return div(
|
|
53
|
+
{
|
|
54
|
+
...props,
|
|
55
|
+
class: classNames(
|
|
56
|
+
"button-group",
|
|
57
|
+
variant,
|
|
58
|
+
color,
|
|
59
|
+
size,
|
|
60
|
+
className,
|
|
61
|
+
options?.class,
|
|
62
|
+
props?.class
|
|
63
|
+
),
|
|
64
|
+
},
|
|
65
|
+
...children
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare module "@grucloud/bau-ui/buttonGroup" {
|
|
2
|
+
type DefaultDesignProps = import("../constants").DefaultDesignProps;
|
|
3
|
+
type ComponentOption = import("../bau-ui").ComponentOption;
|
|
4
|
+
|
|
5
|
+
export type ButtonGroupProps = {} & DefaultDesignProps;
|
|
6
|
+
|
|
7
|
+
type Component = import("../bau-ui").Component<ButtonGroupProps>;
|
|
8
|
+
|
|
9
|
+
export default function (context: any, option?: ComponentOption): Component;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./buttonGroup";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
|
+
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
|
+
import { Colors } from "../constants.js";
|
|
4
|
+
|
|
5
|
+
export default function (context, options) {
|
|
6
|
+
const { bau, css } = context;
|
|
7
|
+
const { input } = bau.tags;
|
|
8
|
+
|
|
9
|
+
const colorsToCss = () =>
|
|
10
|
+
Colors.map(
|
|
11
|
+
(color) =>
|
|
12
|
+
`
|
|
13
|
+
&.calendar.${color} {
|
|
14
|
+
accent-color: var(--color-${color});
|
|
15
|
+
}
|
|
16
|
+
`
|
|
17
|
+
).join("\n");
|
|
18
|
+
|
|
19
|
+
const className = css`
|
|
20
|
+
padding: 0.3rem;
|
|
21
|
+
border-radius: var(--global-radius);
|
|
22
|
+
border: none;
|
|
23
|
+
${colorsToCss()}
|
|
24
|
+
&:hover {
|
|
25
|
+
filter: brightness(var(--brightness-hover));
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
return function Calendar(...args) {
|
|
30
|
+
let [
|
|
31
|
+
{ color = "neutral", variant = "plain", size, ...props },
|
|
32
|
+
...children
|
|
33
|
+
] = toPropsAndChildren(args);
|
|
34
|
+
return input(
|
|
35
|
+
{
|
|
36
|
+
...props,
|
|
37
|
+
type: "date",
|
|
38
|
+
class: classNames(
|
|
39
|
+
"calendar",
|
|
40
|
+
className,
|
|
41
|
+
color,
|
|
42
|
+
variant,
|
|
43
|
+
size,
|
|
44
|
+
options?.class,
|
|
45
|
+
props?.class
|
|
46
|
+
),
|
|
47
|
+
},
|
|
48
|
+
...children
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare module "@grucloud/bau-ui/calendar" {
|
|
2
|
+
type DefaultDesignProps = import("../constants").DefaultDesignProps;
|
|
3
|
+
type ComponentOption = import("../bau-ui").ComponentOption;
|
|
4
|
+
|
|
5
|
+
export type CalendarProps = {} & DefaultDesignProps;
|
|
6
|
+
|
|
7
|
+
type Component = import("../bau-ui").Component<
|
|
8
|
+
CalendarProps,
|
|
9
|
+
HTMLInputElement
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export default function (context: any, option?: ComponentOption): Component;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./calendar";
|
package/checkbox/checkbox.js
CHANGED
|
@@ -1,53 +1,80 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
2
|
+
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
3
|
|
|
3
4
|
export default function (context, options = {}) {
|
|
4
5
|
const { bau, css } = context;
|
|
5
6
|
const { input } = bau.tags;
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const className = css`
|
|
8
|
+
width: 1.5rem;
|
|
9
|
+
height: 1.5rem;
|
|
10
|
+
border-radius: var(--global-radius);
|
|
11
|
+
appearance: none;
|
|
12
|
+
outline: none;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
transition: all var(--transition-fast) ease-in-out;
|
|
15
|
+
box-shadow: var(--shadow-s);
|
|
16
|
+
position: relative;
|
|
17
|
+
&:hover {
|
|
18
|
+
transform: scale(1.05);
|
|
19
|
+
filter: brightness(var(--brightness-hover));
|
|
20
|
+
}
|
|
21
|
+
&:hover.solid {
|
|
22
|
+
filter: brightness(var(--brightness-hover-always));
|
|
23
|
+
}
|
|
24
|
+
&:disabled {
|
|
25
|
+
border: 2px dashed var(--color-gray-500);
|
|
26
|
+
}
|
|
27
|
+
&:checked::after {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
30
|
+
&::after {
|
|
31
|
+
content: "\u2716";
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 50%;
|
|
34
|
+
left: 50%;
|
|
35
|
+
transform: translate(-50%, -50%);
|
|
36
|
+
transition: all var(--transition-fast) ease-in-out;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
&.sm {
|
|
40
|
+
width: 1.3rem;
|
|
41
|
+
height: 1.3rem;
|
|
42
|
+
}
|
|
43
|
+
&.sm::after {
|
|
44
|
+
font-size: 0.9rem;
|
|
45
|
+
}
|
|
46
|
+
&.md {
|
|
8
47
|
width: 1.5rem;
|
|
9
48
|
height: 1.5rem;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
background-color: var(--color-primary);
|
|
27
|
-
}
|
|
28
|
-
&::after {
|
|
29
|
-
content: "\u2716";
|
|
30
|
-
position: absolute;
|
|
31
|
-
font-size: 1.2rem;
|
|
32
|
-
top: 50%;
|
|
33
|
-
left: 50%;
|
|
34
|
-
transform: translate(-50%, -50%);
|
|
35
|
-
color: var(--color-primary);
|
|
36
|
-
opacity: 0;
|
|
37
|
-
}
|
|
38
|
-
&:checked::after {
|
|
39
|
-
color: var(--color-gray-100);
|
|
40
|
-
opacity: 1;
|
|
41
|
-
}
|
|
42
|
-
`,
|
|
43
|
-
};
|
|
49
|
+
}
|
|
50
|
+
&.md::after {
|
|
51
|
+
font-size: 1.2rem;
|
|
52
|
+
}
|
|
53
|
+
&.lg {
|
|
54
|
+
width: 2rem;
|
|
55
|
+
height: 2rem;
|
|
56
|
+
}
|
|
57
|
+
&.lg::after {
|
|
58
|
+
font-size: 1.6rem;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
return function Checkbox(...args) {
|
|
63
|
+
let [{ color, variant = "outline", size = "md", ...props }, ...children] =
|
|
64
|
+
toPropsAndChildren(args);
|
|
44
65
|
|
|
45
|
-
return function Checkbox(props, ...children) {
|
|
46
66
|
return input({
|
|
47
|
-
class: classNames(style.base, props.class),
|
|
48
67
|
type: "checkbox",
|
|
49
68
|
required: "required",
|
|
50
69
|
...props,
|
|
70
|
+
class: classNames(
|
|
71
|
+
className,
|
|
72
|
+
color,
|
|
73
|
+
variant,
|
|
74
|
+
size,
|
|
75
|
+
options?.class,
|
|
76
|
+
props?.class
|
|
77
|
+
),
|
|
51
78
|
});
|
|
52
79
|
};
|
|
53
80
|
}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
declare module "@grucloud/bau-ui/checkbox" {
|
|
2
|
-
|
|
2
|
+
type DefaultDesignProps = import("../constants").DefaultDesignProps;
|
|
3
|
+
type ComponentOption = import("../bau-ui").ComponentOption;
|
|
4
|
+
|
|
5
|
+
export type CheckboxProps = {} & DefaultDesignProps;
|
|
3
6
|
|
|
4
7
|
type Component = import("../bau-ui").Component<
|
|
5
8
|
CheckboxProps,
|
|
6
9
|
HTMLInputElement
|
|
7
10
|
>;
|
|
8
11
|
|
|
9
|
-
export default function (context: any): Component;
|
|
12
|
+
export default function (context: any, option?: ComponentOption): Component;
|
|
10
13
|
}
|
package/chip/chip.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
|
+
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
|
+
|
|
4
|
+
export default function (context, options) {
|
|
5
|
+
const { bau, css } = context;
|
|
6
|
+
const { span } = bau.tags;
|
|
7
|
+
|
|
8
|
+
const className = css`
|
|
9
|
+
display: inline-block;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
border-radius: var(--global-radius);
|
|
12
|
+
padding: 0.2rem 0.5rem;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
&.clickable {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
&.sm {
|
|
20
|
+
padding: 0.2rem;
|
|
21
|
+
}
|
|
22
|
+
&.md {
|
|
23
|
+
padding: 0.2rem 0.5rem;
|
|
24
|
+
}
|
|
25
|
+
&.lg {
|
|
26
|
+
padding: 0.3rem 1rem;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
return function Chip(...args) {
|
|
31
|
+
let [
|
|
32
|
+
{
|
|
33
|
+
size = "md",
|
|
34
|
+
variant = "outline",
|
|
35
|
+
color = "neutral",
|
|
36
|
+
onclick,
|
|
37
|
+
...props
|
|
38
|
+
},
|
|
39
|
+
...children
|
|
40
|
+
] = toPropsAndChildren(args);
|
|
41
|
+
|
|
42
|
+
return span(
|
|
43
|
+
{
|
|
44
|
+
...props,
|
|
45
|
+
onclick,
|
|
46
|
+
class: classNames(
|
|
47
|
+
"chip",
|
|
48
|
+
className,
|
|
49
|
+
size,
|
|
50
|
+
variant,
|
|
51
|
+
color,
|
|
52
|
+
onclick && "clickable",
|
|
53
|
+
options?.class,
|
|
54
|
+
props?.class
|
|
55
|
+
),
|
|
56
|
+
},
|
|
57
|
+
...children
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
}
|
package/chip/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare module "@grucloud/bau-ui/chip" {
|
|
2
|
+
type DefaultDesignProps = import("../constants").DefaultDesignProps;
|
|
3
|
+
type ComponentOption = import("../bau-ui").ComponentOption;
|
|
4
|
+
|
|
5
|
+
export type ChipProps = {} & DefaultDesignProps;
|
|
6
|
+
|
|
7
|
+
type Component = import("../bau-ui").Component<ChipProps, HTMLSpanElement>;
|
|
8
|
+
|
|
9
|
+
export default function (context: any, option?: ComponentOption): Component;
|
|
10
|
+
}
|
package/chip/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./chip";
|
package/constants.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type Variant = "plain" | "outline" | "soft" | "solid";
|
|
2
|
+
export type Size = "sm" | "md" | "lg";
|
|
3
|
+
export type Color = "primary" | "neutral" | "success" | "danger" | "warning";
|
|
4
|
+
|
|
5
|
+
export const Variants: Variant[];
|
|
6
|
+
export const Colors: Color[];
|
|
7
|
+
export const Sizes: Size[];
|
|
8
|
+
|
|
9
|
+
export type DefaultDesignProps = {
|
|
10
|
+
variant?: Variant;
|
|
11
|
+
size?: Size;
|
|
12
|
+
color?: Color;
|
|
13
|
+
};
|
package/constants.js
ADDED
package/context.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Bau from "@grucloud/bau";
|
|
2
|
+
import BauCss from "@grucloud/bau-css";
|
|
3
|
+
|
|
4
|
+
export type Context = {
|
|
5
|
+
bau: ReturnType<typeof Bau>;
|
|
6
|
+
tr: (text: string) => string;
|
|
7
|
+
window: Window;
|
|
8
|
+
config?: any;
|
|
9
|
+
states?: any;
|
|
10
|
+
} & ReturnType<typeof BauCss>;
|
|
11
|
+
|
|
12
|
+
export function createContext(input?: any): Context;
|
package/context.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Bau from "@grucloud/bau";
|
|
2
|
+
import BauCss from "@grucloud/bau-css";
|
|
3
|
+
|
|
4
|
+
import globalStyle from "./globalStyle";
|
|
5
|
+
|
|
6
|
+
export function createContext(extra) {
|
|
7
|
+
const bau = Bau();
|
|
8
|
+
const bauCss = BauCss();
|
|
9
|
+
globalStyle(bauCss);
|
|
10
|
+
return {
|
|
11
|
+
bau,
|
|
12
|
+
...bauCss,
|
|
13
|
+
tr: (text) => text,
|
|
14
|
+
window,
|
|
15
|
+
...extra,
|
|
16
|
+
};
|
|
17
|
+
}
|
package/drawer/drawer.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
1
2
|
import cn from "@grucloud/bau-css/classNames";
|
|
2
3
|
|
|
3
|
-
export default function (context) {
|
|
4
|
+
export default function (context, options) {
|
|
4
5
|
const { bau, css } = context;
|
|
5
6
|
const { div } = bau.tags;
|
|
6
|
-
const
|
|
7
|
+
const className = css`
|
|
7
8
|
position: fixed;
|
|
8
9
|
top: 80px;
|
|
9
10
|
left: 0px;
|
|
@@ -47,9 +48,13 @@ export default function (context) {
|
|
|
47
48
|
}
|
|
48
49
|
`;
|
|
49
50
|
|
|
50
|
-
return function Drawer(
|
|
51
|
+
return function Drawer(...args) {
|
|
52
|
+
let [
|
|
53
|
+
{ color, variant = "outline", size, openState, ...props },
|
|
54
|
+
...children
|
|
55
|
+
] = toPropsAndChildren(args);
|
|
51
56
|
return div(
|
|
52
|
-
{ class: cn(
|
|
57
|
+
{ class: cn(className, options?.class, props.class) },
|
|
53
58
|
// Overlay
|
|
54
59
|
div({
|
|
55
60
|
class: () => cn("overlay", openState.val && "overlay-open"),
|
|
@@ -62,7 +67,7 @@ export default function (context) {
|
|
|
62
67
|
{
|
|
63
68
|
class: () => cn("content", openState.val && "content-open"),
|
|
64
69
|
},
|
|
65
|
-
|
|
70
|
+
children
|
|
66
71
|
)
|
|
67
72
|
);
|
|
68
73
|
};
|
package/drawer/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
declare module "@grucloud/bau-ui/drawer" {
|
|
2
|
-
|
|
2
|
+
type DefaultDesignProps = import("../constants").DefaultDesignProps;
|
|
3
|
+
type ComponentOption = import("../bau-ui").ComponentOption;
|
|
4
|
+
|
|
5
|
+
export type DrawerProps = {} & DefaultDesignProps;
|
|
3
6
|
|
|
4
7
|
type Component = import("../bau-ui").Component<DrawerProps>;
|
|
5
8
|
|
|
6
|
-
export default function (context: any): Component;
|
|
9
|
+
export default function (context: any, option?: ComponentOption): Component;
|
|
7
10
|
}
|