@grucloud/bau-ui 0.61.2 → 0.63.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/checkbox/checkbox.js +1 -0
- package/drillDownMenu/drillDownMenu.js +11 -13
- package/form/form.js +0 -2
- package/globalStyle/globalStyle.js +4 -0
- package/modal/modal.js +2 -0
- package/package.json +4 -4
- package/paper/paper.js +1 -0
- package/radioButton/radioButton.js +1 -0
- package/tabs/index.d.ts +1 -1
- package/tabs/tabs.js +14 -11
package/checkbox/checkbox.js
CHANGED
|
@@ -200,8 +200,6 @@ export default function (context, options = {}) {
|
|
|
200
200
|
|
|
201
201
|
const Menu = ({ variant, color, size, currentTree, pathnameState }) => {
|
|
202
202
|
const { children, parentTree, data, renderList } = currentTree;
|
|
203
|
-
if (renderList) {
|
|
204
|
-
}
|
|
205
203
|
return div(
|
|
206
204
|
{ class: cn("drillDownMenu", variant, color, size) },
|
|
207
205
|
parentTree && renderHeader({ variant, color, size, data, currentTree }),
|
|
@@ -267,21 +265,21 @@ export default function (context, options = {}) {
|
|
|
267
265
|
return _currentTree;
|
|
268
266
|
});
|
|
269
267
|
|
|
270
|
-
let
|
|
268
|
+
let directionState = bau.state(0);
|
|
271
269
|
|
|
272
270
|
const onclick = (event) => {
|
|
273
271
|
const { dataset } = event.target;
|
|
274
272
|
if (dataset.buttonback == "true") {
|
|
275
|
-
|
|
273
|
+
directionState.val = -1;
|
|
276
274
|
} else if (dataset.ischild == "false") {
|
|
277
|
-
|
|
275
|
+
directionState.val = 1;
|
|
278
276
|
} else if (dataset.ischild == "true") {
|
|
279
|
-
direction = 0;
|
|
277
|
+
//direction = 0;
|
|
280
278
|
}
|
|
281
279
|
};
|
|
282
280
|
|
|
283
|
-
const animationHide = (
|
|
284
|
-
switch (
|
|
281
|
+
const animationHide = (directionState) => {
|
|
282
|
+
switch (directionState.val) {
|
|
285
283
|
case 1:
|
|
286
284
|
return `${hideToLeft} ${animationDuration}`;
|
|
287
285
|
case -1:
|
|
@@ -291,8 +289,8 @@ export default function (context, options = {}) {
|
|
|
291
289
|
}
|
|
292
290
|
};
|
|
293
291
|
|
|
294
|
-
const animationShow = (
|
|
295
|
-
switch (
|
|
292
|
+
const animationShow = (directionState) => {
|
|
293
|
+
switch (directionState.val) {
|
|
296
294
|
case 1:
|
|
297
295
|
return `${hideToRight} ${animationDuration} reverse`;
|
|
298
296
|
case -1:
|
|
@@ -316,11 +314,11 @@ export default function (context, options = {}) {
|
|
|
316
314
|
},
|
|
317
315
|
Animate(
|
|
318
316
|
{
|
|
319
|
-
animationHide: () => animationHide(
|
|
320
|
-
animationShow: () => animationShow(
|
|
317
|
+
animationHide: () => animationHide(directionState),
|
|
318
|
+
animationShow: () => animationShow(directionState),
|
|
321
319
|
},
|
|
322
320
|
bau.bind({
|
|
323
|
-
deps: [
|
|
321
|
+
deps: [directionState],
|
|
324
322
|
render: () => () =>
|
|
325
323
|
Menu({
|
|
326
324
|
variant,
|
package/form/form.js
CHANGED
package/modal/modal.js
CHANGED
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.63.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.63.0",
|
|
24
|
+
"@grucloud/bau-css": "^0.63.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typedoc": "0.24.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "ba14ec686f27ecca6fba9dd765862f85ea77e554"
|
|
30
30
|
}
|
package/paper/paper.js
CHANGED
package/tabs/index.d.ts
CHANGED
package/tabs/tabs.js
CHANGED
|
@@ -27,12 +27,19 @@ export default function (context, options = {}) {
|
|
|
27
27
|
align-items: flex-start;
|
|
28
28
|
padding: 0;
|
|
29
29
|
margin: 0;
|
|
30
|
+
border-bottom: 1px solid var(--color-emphasis-100);
|
|
30
31
|
list-style: none;
|
|
32
|
+
& li:not(:last-child) {
|
|
33
|
+
border-right: 1px solid var(--color-emphasis-100);
|
|
34
|
+
}
|
|
31
35
|
& li {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
|
|
32
39
|
& > a {
|
|
40
|
+
padding: 0.6rem 1rem 0.6rem 1rem;
|
|
33
41
|
color: inherit;
|
|
34
42
|
text-decoration: none;
|
|
35
|
-
padding: 0.5rem 1rem 0 1rem;
|
|
36
43
|
}
|
|
37
44
|
text-align: center;
|
|
38
45
|
color: inherit;
|
|
@@ -43,9 +50,6 @@ export default function (context, options = {}) {
|
|
|
43
50
|
&:hover {
|
|
44
51
|
color: var(--color-primary-light);
|
|
45
52
|
background-color: var(--color-emphasis-200);
|
|
46
|
-
&::after {
|
|
47
|
-
transform: translateY(0%);
|
|
48
|
-
}
|
|
49
53
|
}
|
|
50
54
|
&::after {
|
|
51
55
|
transition: var(--transition-fast) ease-in-out;
|
|
@@ -53,7 +57,6 @@ export default function (context, options = {}) {
|
|
|
53
57
|
background: var(--color-primary-light);
|
|
54
58
|
opacity: 1;
|
|
55
59
|
content: "";
|
|
56
|
-
margin-top: 0.3rem;
|
|
57
60
|
height: 2px;
|
|
58
61
|
width: 100%;
|
|
59
62
|
display: block;
|
|
@@ -82,9 +85,9 @@ export default function (context, options = {}) {
|
|
|
82
85
|
let [
|
|
83
86
|
{
|
|
84
87
|
size = options.size ?? "md",
|
|
85
|
-
variant = options.variant ?? "
|
|
88
|
+
variant = options.variant ?? "plain",
|
|
86
89
|
color = options.color ?? "neutral",
|
|
87
|
-
|
|
90
|
+
tabsKey = "tabs",
|
|
88
91
|
...props
|
|
89
92
|
},
|
|
90
93
|
...children
|
|
@@ -97,12 +100,12 @@ export default function (context, options = {}) {
|
|
|
97
100
|
const hashchange = () => {
|
|
98
101
|
//console.log("tabs hashchange");
|
|
99
102
|
const search = new URLSearchParams(window.location.search);
|
|
100
|
-
const tabName = search.get(
|
|
103
|
+
const tabName = search.get(tabsKey) ?? tabDefs[0].name;
|
|
101
104
|
|
|
102
105
|
const nextTab = tabByName(tabName);
|
|
103
106
|
tabCurrentState.val.exit?.call();
|
|
104
107
|
tabCurrentState.val = nextTab;
|
|
105
|
-
nextTab
|
|
108
|
+
nextTab?.enter?.call();
|
|
106
109
|
};
|
|
107
110
|
|
|
108
111
|
hashchange();
|
|
@@ -120,8 +123,8 @@ export default function (context, options = {}) {
|
|
|
120
123
|
|
|
121
124
|
const buildHref = (nextTab) => {
|
|
122
125
|
const search = new URLSearchParams(window.location.search);
|
|
123
|
-
search.delete(
|
|
124
|
-
search.append(
|
|
126
|
+
search.delete(tabsKey);
|
|
127
|
+
search.append(tabsKey, nextTab);
|
|
125
128
|
return `?${search.toString()}`;
|
|
126
129
|
};
|
|
127
130
|
|