@grucloud/bau-ui 0.85.0 → 0.90.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/accordion/accordion.js +0 -1
- package/alert/alert.js +21 -19
- package/alertStack/alertStack.js +1 -1
- package/autocomplete/autocomplete.js +1 -1
- package/avatar/avatar.js +1 -1
- package/badge/badge.js +2 -2
- package/breadcrumbs/breadcrumbs.js +1 -1
- package/button/button.js +1 -1
- package/buttonGroup/buttonGroup.js +2 -2
- package/calendar/calendar.js +2 -2
- package/checkbox/checkbox.js +1 -1
- package/chip/chip.js +2 -2
- package/context.js +1 -1
- package/divider/divider.js +2 -2
- package/drawer/drawer.js +2 -4
- package/dropdownMenu/dropdownMenu.js +1 -1
- package/fileInput/fileInput.js +1 -1
- package/form/form.js +2 -2
- package/globalStyle/globalStyle.js +3 -7
- package/inputSearch/inputSearch.js +1 -1
- package/keyValueList/keyValueList.js +2 -2
- package/list/list.js +2 -2
- package/loadingButton/loadingButton.js +1 -1
- package/modal/modal.js +16 -1
- package/multiSelect/multiSelect.js +1 -1
- package/package.json +4 -4
- package/paper/paper.js +2 -2
- package/resizable/resizable.js +3 -3
- package/select/select.js +19 -3
- package/selectNative/selectNative.js +1 -1
- package/skeleton/skeleton.js +2 -2
- package/slider/slider.js +2 -2
- package/stepper/stepper.js +1 -4
- package/switch/switch.js +2 -2
- package/tableContainer/tableContainer.js +2 -2
- package/tablePagination/tablePagination.js +0 -1
- package/tabs/tabs.js +0 -1
- package/themeSwitch/themeSwitch.js +3 -3
- package/toggle/toggle.js +1 -1
- package/toggleGroup/toggleGroup.js +2 -2
- package/tooltip/tooltip.js +2 -2
package/accordion/accordion.js
CHANGED
package/alert/alert.js
CHANGED
|
@@ -7,8 +7,8 @@ const severityMap = {
|
|
|
7
7
|
danger: "\u26A0",
|
|
8
8
|
warning: "\u26A0",
|
|
9
9
|
success: "\u2714",
|
|
10
|
-
primary: "\
|
|
11
|
-
neutral: "\
|
|
10
|
+
primary: "\u24D8",
|
|
11
|
+
neutral: "\u24D8",
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const colorsToCss = () =>
|
|
@@ -16,25 +16,17 @@ const colorsToCss = () =>
|
|
|
16
16
|
(color) =>
|
|
17
17
|
`
|
|
18
18
|
&.alert {
|
|
19
|
-
&.sm {
|
|
20
|
-
& .icon {
|
|
21
|
-
font-size: 1.3rem;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
&.lg {
|
|
25
|
-
& .icon {
|
|
26
|
-
font-size: 2.5rem;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
19
|
&.plain.${color} {
|
|
30
20
|
& .icon {
|
|
31
|
-
color: var(--color-${color})
|
|
21
|
+
color: var(--color-${color});
|
|
22
|
+
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
&.outline.${color} {
|
|
35
26
|
& .icon {
|
|
36
|
-
color: var(--color-${color})
|
|
27
|
+
color: var(--color-${color});
|
|
37
28
|
}
|
|
29
|
+
border: 2px solid var(--color-${color});
|
|
38
30
|
}
|
|
39
31
|
}
|
|
40
32
|
`
|
|
@@ -42,16 +34,26 @@ const colorsToCss = () =>
|
|
|
42
34
|
|
|
43
35
|
export default function (context, options = {}) {
|
|
44
36
|
const { bau, css } = context;
|
|
45
|
-
const { div,
|
|
37
|
+
const { div, span } = bau.tags;
|
|
46
38
|
|
|
47
39
|
const className = css`
|
|
48
|
-
display: flex;
|
|
40
|
+
display: inline-flex;
|
|
49
41
|
max-width: 600px;
|
|
50
42
|
justify-content: flex-start;
|
|
51
43
|
align-items: center;
|
|
52
44
|
font-weight: var(--font-weight-semibold);
|
|
53
45
|
box-shadow: var(--shadow-m);
|
|
54
46
|
border-radius: var(--global-radius);
|
|
47
|
+
&.sm {
|
|
48
|
+
& .icon {
|
|
49
|
+
font-size: 1.3rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
&.lg {
|
|
53
|
+
& .icon {
|
|
54
|
+
font-size: 2.5rem;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
55
57
|
& .icon {
|
|
56
58
|
padding: 0 0.5rem;
|
|
57
59
|
font-size: 2rem;
|
|
@@ -90,7 +92,7 @@ export default function (context, options = {}) {
|
|
|
90
92
|
onRemove,
|
|
91
93
|
...props
|
|
92
94
|
},
|
|
93
|
-
|
|
95
|
+
children,
|
|
94
96
|
] = toPropsAndChildren(args);
|
|
95
97
|
|
|
96
98
|
return div(
|
|
@@ -108,8 +110,8 @@ export default function (context, options = {}) {
|
|
|
108
110
|
],
|
|
109
111
|
role: "alert",
|
|
110
112
|
},
|
|
111
|
-
|
|
112
|
-
div({ class: "content" },
|
|
113
|
+
span({ class: "icon" }, severityMap[color]),
|
|
114
|
+
div({ class: "content" }, children),
|
|
113
115
|
onRemove && CloseIcon({ onclick: onRemove })
|
|
114
116
|
);
|
|
115
117
|
};
|
package/alertStack/alertStack.js
CHANGED
|
@@ -45,7 +45,7 @@ export default (context, options = {}) => {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
return function AlertStack(props = {}
|
|
48
|
+
return function AlertStack(props = {}) {
|
|
49
49
|
const remove = ({ id }) => {
|
|
50
50
|
setStatus({ id, status: "removing" });
|
|
51
51
|
const idx = messagesState.val.findIndex((message) => message.id === id);
|
package/avatar/avatar.js
CHANGED
package/badge/badge.js
CHANGED
|
@@ -34,7 +34,7 @@ export default function (context, options = {}) {
|
|
|
34
34
|
content,
|
|
35
35
|
...props
|
|
36
36
|
},
|
|
37
|
-
|
|
37
|
+
children,
|
|
38
38
|
] = toPropsAndChildren(args);
|
|
39
39
|
return span(
|
|
40
40
|
{
|
|
@@ -42,7 +42,7 @@ export default function (context, options = {}) {
|
|
|
42
42
|
class: ["badge", className, options?.class, props?.class],
|
|
43
43
|
},
|
|
44
44
|
span({ class: [color, variant, size] }, content),
|
|
45
|
-
|
|
45
|
+
children
|
|
46
46
|
);
|
|
47
47
|
};
|
|
48
48
|
}
|
package/button/button.js
CHANGED
|
@@ -53,7 +53,7 @@ export default function (context, options = {}) {
|
|
|
53
53
|
color = options.color ?? "neutral",
|
|
54
54
|
...props
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
children,
|
|
57
57
|
] = toPropsAndChildren(args);
|
|
58
58
|
|
|
59
59
|
return div(
|
|
@@ -69,7 +69,7 @@ export default function (context, options = {}) {
|
|
|
69
69
|
props?.class,
|
|
70
70
|
],
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
children
|
|
73
73
|
);
|
|
74
74
|
};
|
|
75
75
|
}
|
package/calendar/calendar.js
CHANGED
|
@@ -33,7 +33,7 @@ export default function (context, options = {}) {
|
|
|
33
33
|
color = options.color ?? "neutral",
|
|
34
34
|
...props
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
children,
|
|
37
37
|
] = toPropsAndChildren(args);
|
|
38
38
|
return input(
|
|
39
39
|
{
|
|
@@ -49,7 +49,7 @@ export default function (context, options = {}) {
|
|
|
49
49
|
props?.class,
|
|
50
50
|
],
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
children
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
}
|
package/checkbox/checkbox.js
CHANGED
package/chip/chip.js
CHANGED
|
@@ -38,7 +38,7 @@ export default function (context, options = {}) {
|
|
|
38
38
|
onclick,
|
|
39
39
|
...props
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
children,
|
|
42
42
|
] = toPropsAndChildren(args);
|
|
43
43
|
|
|
44
44
|
return span(
|
|
@@ -56,7 +56,7 @@ export default function (context, options = {}) {
|
|
|
56
56
|
props.class,
|
|
57
57
|
],
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
children
|
|
60
60
|
);
|
|
61
61
|
};
|
|
62
62
|
}
|
package/context.js
CHANGED
package/divider/divider.js
CHANGED
|
@@ -28,14 +28,14 @@ export default function (context, options = {}) {
|
|
|
28
28
|
color = options.color ?? "neutral",
|
|
29
29
|
...props
|
|
30
30
|
},
|
|
31
|
-
|
|
31
|
+
children,
|
|
32
32
|
] = toPropsAndChildren(args);
|
|
33
33
|
return div(
|
|
34
34
|
{
|
|
35
35
|
...props,
|
|
36
36
|
class: ["divider", size, className, options?.class, props?.class],
|
|
37
37
|
},
|
|
38
|
-
div({ class: "content" },
|
|
38
|
+
div({ class: "content" }, children)
|
|
39
39
|
);
|
|
40
40
|
};
|
|
41
41
|
}
|
package/drawer/drawer.js
CHANGED
|
@@ -48,10 +48,8 @@ export default function (context, options) {
|
|
|
48
48
|
`;
|
|
49
49
|
|
|
50
50
|
return function Drawer(...args) {
|
|
51
|
-
let [
|
|
52
|
-
|
|
53
|
-
...children
|
|
54
|
-
] = toPropsAndChildren(args);
|
|
51
|
+
let [{ color, variant = "outline", size, openState, ...props }, children] =
|
|
52
|
+
toPropsAndChildren(args);
|
|
55
53
|
return div(
|
|
56
54
|
{ class: [className, options?.class, props.class] },
|
|
57
55
|
// Overlay
|
package/fileInput/fileInput.js
CHANGED
package/form/form.js
CHANGED
|
@@ -57,7 +57,7 @@ export default function (context, options = {}) {
|
|
|
57
57
|
content,
|
|
58
58
|
...props
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
children,
|
|
61
61
|
] = toPropsAndChildren(args);
|
|
62
62
|
return form(
|
|
63
63
|
{
|
|
@@ -72,7 +72,7 @@ export default function (context, options = {}) {
|
|
|
72
72
|
props?.class,
|
|
73
73
|
],
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
children
|
|
76
76
|
);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -11,7 +11,7 @@ const ColorPaletteDefault = [
|
|
|
11
11
|
const SHADES_LIGHT = [
|
|
12
12
|
["light", "1.15"],
|
|
13
13
|
["lighter", "1.3"],
|
|
14
|
-
["lightest", "1.
|
|
14
|
+
["lightest", "1.7"],
|
|
15
15
|
];
|
|
16
16
|
const SHADES_DARK = [
|
|
17
17
|
["dark", "0.9"],
|
|
@@ -98,12 +98,7 @@ export default function globalStyle(
|
|
|
98
98
|
margin: 0;
|
|
99
99
|
padding: 0;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
margin:0.3rem 0;
|
|
103
|
-
}
|
|
104
|
-
ul,ol {
|
|
105
|
-
padding-left:1.3rem
|
|
106
|
-
}
|
|
101
|
+
|
|
107
102
|
:root {
|
|
108
103
|
--color-scheme: light;
|
|
109
104
|
--contrast-background-value: 90%;
|
|
@@ -122,6 +117,7 @@ export default function globalStyle(
|
|
|
122
117
|
--background-color: var(--color-white);
|
|
123
118
|
--global-border-width: 1px;
|
|
124
119
|
--global-radius: 0.2rem;
|
|
120
|
+
--font-color: var(--color-content);
|
|
125
121
|
--font-color-base: var(--color-content);
|
|
126
122
|
--font-color-disabled: var(--color-emphasis-600);
|
|
127
123
|
--font-color-inverse: var(--color-content-inverse);
|
|
@@ -17,7 +17,7 @@ export default function (context, options = {}) {
|
|
|
17
17
|
.getPropertyValue(
|
|
18
18
|
variant == "solid"
|
|
19
19
|
? `--font-color-inverse-secondary`
|
|
20
|
-
: `--color
|
|
20
|
+
: `--font-color-secondary`
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
const svgData = `url('data:image/svg+xml,<svg fill="${fillColor}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>')`;
|
|
@@ -29,14 +29,14 @@ export default function (context, options = {}) {
|
|
|
29
29
|
color = options.color ?? "neutral",
|
|
30
30
|
...props
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
children,
|
|
33
33
|
] = toPropsAndChildren(args);
|
|
34
34
|
return ul(
|
|
35
35
|
{
|
|
36
36
|
...props,
|
|
37
37
|
class: ["keyValueList", className, options?.class, props?.class],
|
|
38
38
|
},
|
|
39
|
-
|
|
39
|
+
children
|
|
40
40
|
);
|
|
41
41
|
};
|
|
42
42
|
}
|
package/list/list.js
CHANGED
|
@@ -42,7 +42,7 @@ export default function (context, options = {}) {
|
|
|
42
42
|
color = options.color ?? "neutral",
|
|
43
43
|
...props
|
|
44
44
|
},
|
|
45
|
-
|
|
45
|
+
children,
|
|
46
46
|
] = toPropsAndChildren(args);
|
|
47
47
|
return ul(
|
|
48
48
|
{
|
|
@@ -57,7 +57,7 @@ export default function (context, options = {}) {
|
|
|
57
57
|
props?.class.join(" "),
|
|
58
58
|
],
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
children
|
|
61
61
|
);
|
|
62
62
|
};
|
|
63
63
|
}
|
package/modal/modal.js
CHANGED
|
@@ -32,6 +32,21 @@ export default function (context, options = {}) {
|
|
|
32
32
|
min-width: 400px;
|
|
33
33
|
border: 0px;
|
|
34
34
|
overflow: hidden;
|
|
35
|
+
|
|
36
|
+
&,
|
|
37
|
+
&::backdrop {
|
|
38
|
+
transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete,
|
|
39
|
+
opacity 0.3s;
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
&[open],
|
|
43
|
+
&[open]::backdrop {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
@starting-style {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
35
50
|
> form {
|
|
36
51
|
display: flex;
|
|
37
52
|
flex-direction: column;
|
|
@@ -79,7 +94,7 @@ export default function (context, options = {}) {
|
|
|
79
94
|
color = options.color ?? "neutral",
|
|
80
95
|
...props
|
|
81
96
|
},
|
|
82
|
-
|
|
97
|
+
children,
|
|
83
98
|
] = toPropsAndChildren(args);
|
|
84
99
|
|
|
85
100
|
const dialogEl = dialog(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grucloud/bau-ui",
|
|
3
3
|
"description": "Components library built with Bau",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.90.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BSD",
|
|
7
7
|
"keywords": [
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"directory": "bau-ui"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@grucloud/bau": "^0.
|
|
24
|
-
"@grucloud/bau-css": "^0.
|
|
23
|
+
"@grucloud/bau": "^0.90.0",
|
|
24
|
+
"@grucloud/bau-css": "^0.90.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typedoc": "0.24.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "3478844bc70216dbb7f72f2981f45bfd2673a96c"
|
|
30
30
|
}
|
package/paper/paper.js
CHANGED
|
@@ -39,14 +39,14 @@ export default function (context, options = {}) {
|
|
|
39
39
|
color = options.color ?? "neutral",
|
|
40
40
|
...props
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
children,
|
|
43
43
|
] = toPropsAndChildren(args);
|
|
44
44
|
return div(
|
|
45
45
|
{
|
|
46
46
|
...props,
|
|
47
47
|
class: ["paper", size, className, options?.class, props?.class],
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
children
|
|
50
50
|
);
|
|
51
51
|
};
|
|
52
52
|
}
|
package/resizable/resizable.js
CHANGED
|
@@ -42,7 +42,7 @@ export default function (context, options = {}) {
|
|
|
42
42
|
`;
|
|
43
43
|
|
|
44
44
|
function PanelGroup(...args) {
|
|
45
|
-
let [props,
|
|
45
|
+
let [props, children] = toPropsAndChildren(args);
|
|
46
46
|
|
|
47
47
|
return section(
|
|
48
48
|
{
|
|
@@ -54,7 +54,7 @@ export default function (context, options = {}) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
function Panel(...args) {
|
|
57
|
-
let [props,
|
|
57
|
+
let [props, children] = toPropsAndChildren(args);
|
|
58
58
|
|
|
59
59
|
return article(
|
|
60
60
|
{
|
|
@@ -66,7 +66,7 @@ export default function (context, options = {}) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
function Handle(...args) {
|
|
69
|
-
let [props,
|
|
69
|
+
let [props, children] = toPropsAndChildren(args);
|
|
70
70
|
|
|
71
71
|
// The current position of mouse
|
|
72
72
|
let _x = 0;
|
package/select/select.js
CHANGED
|
@@ -10,8 +10,11 @@ const colorsToCss = () =>
|
|
|
10
10
|
Colors.map(
|
|
11
11
|
(color) =>
|
|
12
12
|
`
|
|
13
|
+
& button.plain {
|
|
14
|
+
color: var(--font-color-secondary);
|
|
15
|
+
}
|
|
13
16
|
& button.plain.${color}::after {
|
|
14
|
-
color: var(--color
|
|
17
|
+
color: var(--font-color-secondary);
|
|
15
18
|
}
|
|
16
19
|
& button.outline.${color}::after {
|
|
17
20
|
color: var(--color-${color});
|
|
@@ -31,8 +34,17 @@ export default function (context, componentOptions = {}) {
|
|
|
31
34
|
width: 0;
|
|
32
35
|
height: 0;
|
|
33
36
|
opacity: 0;
|
|
37
|
+
border: 0;
|
|
38
|
+
}
|
|
39
|
+
dialog {
|
|
40
|
+
outline: none;
|
|
34
41
|
}
|
|
35
42
|
& button {
|
|
43
|
+
&.lg {
|
|
44
|
+
padding: 0.8rem;
|
|
45
|
+
}
|
|
46
|
+
box-shadow: var(--shadow-s);
|
|
47
|
+
|
|
36
48
|
&::after {
|
|
37
49
|
content: "\u25BC";
|
|
38
50
|
}
|
|
@@ -59,7 +71,7 @@ export default function (context, componentOptions = {}) {
|
|
|
59
71
|
loading,
|
|
60
72
|
...props
|
|
61
73
|
},
|
|
62
|
-
|
|
74
|
+
children,
|
|
63
75
|
] = toPropsAndChildren(args);
|
|
64
76
|
|
|
65
77
|
const Spinner = spinner(context, { variant, color, size });
|
|
@@ -103,6 +115,9 @@ export default function (context, componentOptions = {}) {
|
|
|
103
115
|
};
|
|
104
116
|
|
|
105
117
|
const onkeydown = (event) => {
|
|
118
|
+
if (!popoverEl.open) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
106
121
|
event.preventDefault();
|
|
107
122
|
switch (event.key) {
|
|
108
123
|
case "Escape":
|
|
@@ -126,6 +141,7 @@ export default function (context, componentOptions = {}) {
|
|
|
126
141
|
if (popoverEl.open) {
|
|
127
142
|
inputState.val = getOptionLabel(options[itemIndexActive.val]);
|
|
128
143
|
selectEl.value = getOptionValue(option);
|
|
144
|
+
onSelect(options[itemIndexActive.val]);
|
|
129
145
|
dialogClose();
|
|
130
146
|
} else {
|
|
131
147
|
dialogOpen();
|
|
@@ -175,7 +191,7 @@ export default function (context, componentOptions = {}) {
|
|
|
175
191
|
});
|
|
176
192
|
// Hidden select, required to save the value.
|
|
177
193
|
const selectEl = select(
|
|
178
|
-
{ ...props, "aria-label": label },
|
|
194
|
+
{ ...props, "aria-label": label, tabindex: "-1" },
|
|
179
195
|
option({ value: "" }, "--Select Category--"),
|
|
180
196
|
options.map((opt) =>
|
|
181
197
|
option({ value: getOptionValue(opt) }, getOptionLabel(opt))
|
package/skeleton/skeleton.js
CHANGED
|
@@ -43,14 +43,14 @@ export default function (context, options = {}) {
|
|
|
43
43
|
color = options.color ?? "neutral",
|
|
44
44
|
...props
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
children,
|
|
47
47
|
] = toPropsAndChildren(args);
|
|
48
48
|
return div(
|
|
49
49
|
{
|
|
50
50
|
...props,
|
|
51
51
|
class: ["skeleton", size, className, options?.class, props?.class],
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
children
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
56
|
}
|
package/slider/slider.js
CHANGED
|
@@ -27,7 +27,7 @@ export default function (context, options = {}) {
|
|
|
27
27
|
color = options.color ?? "neutral",
|
|
28
28
|
...props
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
children,
|
|
31
31
|
] = toPropsAndChildren(args);
|
|
32
32
|
|
|
33
33
|
return input(
|
|
@@ -44,7 +44,7 @@ export default function (context, options = {}) {
|
|
|
44
44
|
props.class,
|
|
45
45
|
],
|
|
46
46
|
},
|
|
47
|
-
|
|
47
|
+
children
|
|
48
48
|
);
|
|
49
49
|
};
|
|
50
50
|
}
|
package/stepper/stepper.js
CHANGED
|
@@ -102,7 +102,7 @@ export default function (context, options = {}) {
|
|
|
102
102
|
activeStepIndex = bau.state(0),
|
|
103
103
|
...props
|
|
104
104
|
},
|
|
105
|
-
|
|
105
|
+
children,
|
|
106
106
|
] = toPropsAndChildren(args);
|
|
107
107
|
const stepperState = bau.state(
|
|
108
108
|
stepperDefs.map((stepper, index) => ({ ...stepper, index }))
|
|
@@ -114,7 +114,6 @@ export default function (context, options = {}) {
|
|
|
114
114
|
apply: (target, thisArg, argArray) => {
|
|
115
115
|
target.apply(thisArg, argArray);
|
|
116
116
|
const url = argArray[2] ?? "";
|
|
117
|
-
console.log("stepper pushState ", url);
|
|
118
117
|
if (["?", "#"].includes(url[0])) {
|
|
119
118
|
hashchange();
|
|
120
119
|
}
|
|
@@ -151,12 +150,10 @@ export default function (context, options = {}) {
|
|
|
151
150
|
0
|
|
152
151
|
);
|
|
153
152
|
if (nextActiveStep < activeStepIndex.val) {
|
|
154
|
-
console.log("remove last step");
|
|
155
153
|
stepsCreatedState.val.pop();
|
|
156
154
|
}
|
|
157
155
|
|
|
158
156
|
if (!stepsCreatedState.val.some(({ name }) => stepNameInitial == name)) {
|
|
159
|
-
console.log("add new step");
|
|
160
157
|
stepsCreatedState.val.push(stepperDefs[nextActiveStep]);
|
|
161
158
|
}
|
|
162
159
|
activeStepIndex.val = nextActiveStep;
|
package/switch/switch.js
CHANGED
|
@@ -115,7 +115,7 @@ export default function (context, options = {}) {
|
|
|
115
115
|
color = options.color ?? "neutral",
|
|
116
116
|
...props
|
|
117
117
|
},
|
|
118
|
-
|
|
118
|
+
children,
|
|
119
119
|
] = toPropsAndChildren(args);
|
|
120
120
|
return input(
|
|
121
121
|
{
|
|
@@ -131,7 +131,7 @@ export default function (context, options = {}) {
|
|
|
131
131
|
],
|
|
132
132
|
type: "checkbox",
|
|
133
133
|
},
|
|
134
|
-
|
|
134
|
+
children
|
|
135
135
|
);
|
|
136
136
|
};
|
|
137
137
|
}
|
|
@@ -59,13 +59,13 @@ export default function (context, options) {
|
|
|
59
59
|
`;
|
|
60
60
|
|
|
61
61
|
return function TableContainer(...args) {
|
|
62
|
-
let [
|
|
62
|
+
let [props, children] = toPropsAndChildren(args);
|
|
63
63
|
return div(
|
|
64
64
|
{
|
|
65
65
|
...props,
|
|
66
66
|
class: ["table-container", className, options?.class, props?.class],
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
children
|
|
69
69
|
);
|
|
70
70
|
};
|
|
71
71
|
}
|
package/tabs/tabs.js
CHANGED
|
@@ -43,7 +43,7 @@ export default function (context, options = {}) {
|
|
|
43
43
|
|
|
44
44
|
const className = css`
|
|
45
45
|
position: relative;
|
|
46
|
-
display: flex;
|
|
46
|
+
display: inline-flex;
|
|
47
47
|
justify-content: center;
|
|
48
48
|
align-items: center;
|
|
49
49
|
border-radius: var(--global-radius);
|
|
@@ -101,7 +101,7 @@ export default function (context, options = {}) {
|
|
|
101
101
|
color = options.color ?? "neutral",
|
|
102
102
|
...props
|
|
103
103
|
},
|
|
104
|
-
|
|
104
|
+
children,
|
|
105
105
|
] = toPropsAndChildren(args);
|
|
106
106
|
|
|
107
107
|
return input(
|
|
@@ -125,7 +125,7 @@ export default function (context, options = {}) {
|
|
|
125
125
|
setDataThemeAttribute(event.target.checked ? "dark" : "light");
|
|
126
126
|
},
|
|
127
127
|
},
|
|
128
|
-
|
|
128
|
+
children
|
|
129
129
|
);
|
|
130
130
|
};
|
|
131
131
|
}
|
package/toggle/toggle.js
CHANGED
|
@@ -53,7 +53,7 @@ export default function (context, options = {}) {
|
|
|
53
53
|
onChange = () => {},
|
|
54
54
|
...props
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
children,
|
|
57
57
|
] = toPropsAndChildren(args);
|
|
58
58
|
|
|
59
59
|
const selectedSet = new Set();
|
|
@@ -87,7 +87,7 @@ export default function (context, options = {}) {
|
|
|
87
87
|
],
|
|
88
88
|
onclick,
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
children
|
|
91
91
|
);
|
|
92
92
|
};
|
|
93
93
|
}
|
package/tooltip/tooltip.js
CHANGED
|
@@ -96,7 +96,7 @@ export default function (context, options = {}) {
|
|
|
96
96
|
color = options.color ?? "neutral",
|
|
97
97
|
...props
|
|
98
98
|
},
|
|
99
|
-
|
|
99
|
+
children,
|
|
100
100
|
] = toPropsAndChildren(args);
|
|
101
101
|
|
|
102
102
|
const tooltipContentEl = div(
|
|
@@ -169,7 +169,7 @@ export default function (context, options = {}) {
|
|
|
169
169
|
},
|
|
170
170
|
},
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
children,
|
|
173
173
|
tooltipContentEl
|
|
174
174
|
);
|
|
175
175
|
|