@grucloud/bau-ui 0.62.0 → 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.
@@ -5,6 +5,7 @@ export default function (context, options = {}) {
5
5
  const { bau, css } = context;
6
6
  const { input } = bau.tags;
7
7
  const className = css`
8
+ margin: 0.5rem;
8
9
  width: 1.5rem;
9
10
  height: 1.5rem;
10
11
  border-radius: var(--global-radius);
@@ -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 direction = 1;
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
- direction = -1;
273
+ directionState.val = -1;
276
274
  } else if (dataset.ischild == "false") {
277
- direction = 1;
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 = (direction) => {
284
- switch (direction) {
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 = (direction) => {
295
- switch (direction) {
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(direction),
320
- animationShow: () => animationShow(direction),
317
+ animationHide: () => animationHide(directionState),
318
+ animationShow: () => animationShow(directionState),
321
319
  },
322
320
  bau.bind({
323
- deps: [currentTreeState],
321
+ deps: [directionState],
324
322
  render: () => () =>
325
323
  Menu({
326
324
  variant,
package/form/form.js CHANGED
@@ -12,10 +12,8 @@ export default function (context, options = {}) {
12
12
  gap: 1rem;
13
13
  padding: 1rem;
14
14
  min-width: 350px;
15
-
16
15
  & > header {
17
16
  & h1 {
18
- line-height: 0;
19
17
  font-size: 1.3rem;
20
18
  }
21
19
  }
@@ -94,6 +94,10 @@ export default function globalStyle(
94
94
  { colorPalette = ColorPaletteDefault } = {}
95
95
  ) {
96
96
  createGlobalStyles`
97
+ * {
98
+ margin: 0;
99
+ padding: 0;
100
+ }
97
101
  :root {
98
102
  --color-scheme: light;
99
103
  --contrast-background-value: 90%;
package/modal/modal.js CHANGED
@@ -25,6 +25,8 @@ export default function (context, options = {}) {
25
25
  ).join("\n");
26
26
 
27
27
  const className = css`
28
+ margin: auto;
29
+ padding: 1rem;
28
30
  box-shadow: var(--shadow-s);
29
31
  background-color: var(--background-color);
30
32
  border-radius: var(--global-radius);
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.62.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.62.0",
24
- "@grucloud/bau-css": "^0.62.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": "ecaa1d232ad3eb48859211b8ffc48f4f4e799e0c"
29
+ "gitHead": "ba14ec686f27ecca6fba9dd765862f85ea77e554"
30
30
  }
package/paper/paper.js CHANGED
@@ -8,6 +8,7 @@ export default function (context, options = {}) {
8
8
  border: 1px solid transparent;
9
9
  height: fit-content;
10
10
  border-radius: var(--global-radius);
11
+ margin: 1rem 0;
11
12
  &.sm {
12
13
  box-shadow: var(--shadow-s);
13
14
  background-image: linear-gradient(
@@ -17,6 +17,7 @@ export default function (context, options = {}) {
17
17
  ).join("\n");
18
18
 
19
19
  const className = css`
20
+ margin: 0.5rem;
20
21
  &.sm {
21
22
  transform: scale(0.8);
22
23
  }