@grucloud/bau-ui 0.58.0 → 0.60.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/button/button.js CHANGED
@@ -35,8 +35,6 @@ export default function (context, options = {}) {
35
35
  align-items: center;
36
36
  justify-content: center;
37
37
  gap: 0.5rem;
38
- min-width: 2rem;
39
- min-height: 2rem;
40
38
  border: none;
41
39
  border-radius: var(--global-radius);
42
40
  font-weight: var(--font-weight-semibold);
@@ -71,9 +69,13 @@ export default function (context, options = {}) {
71
69
  }
72
70
  &.md {
73
71
  padding: 0.2rem 0.8rem;
72
+ min-width: 2rem;
73
+ min-height: 2rem;
74
74
  }
75
75
  &.lg {
76
76
  padding: 0.4rem 2rem;
77
+ min-width: 2.5rem;
78
+ min-height: 2.5rem;
77
79
  }
78
80
  & i {
79
81
  font-style: normal;
@@ -37,8 +37,8 @@ export default function (context, options = {}) {
37
37
  opacity: 0;
38
38
  }
39
39
  &.sm {
40
- width: 1.3rem;
41
- height: 1.3rem;
40
+ width: 1rem;
41
+ height: 1rem;
42
42
  }
43
43
  &.sm::after {
44
44
  font-size: 0.9rem;
package/chip/chip.js CHANGED
@@ -20,7 +20,7 @@ export default function (context, options = {}) {
20
20
  cursor: pointer;
21
21
  }
22
22
  &.sm {
23
- padding: 0.2rem;
23
+ padding: 0rem 0.4rem;
24
24
  }
25
25
  &.md {
26
26
  padding: 0.2rem 0.5rem;
package/modal/modal.js CHANGED
@@ -29,17 +29,17 @@ export default function (context, options = {}) {
29
29
  background-color: var(--background-color);
30
30
  border-radius: var(--global-radius);
31
31
  min-width: 400px;
32
- padding: 1rem;
33
32
  border: 0px;
34
33
  > div {
35
34
  display: flex;
36
35
  flex-direction: column;
37
36
  overflow: hidden;
38
- max-height: 90vh;
39
- max-width: 95vw;
37
+ max-height: 96vh;
38
+ max-width: 96vw;
40
39
  & > header {
41
- font-size: 1.5rem;
42
- font-weight: 500;
40
+ display: flex;
41
+ flex-direction: column;
42
+ justify-content: flex-start;
43
43
  }
44
44
  & > main,
45
45
  > section {
@@ -53,6 +53,16 @@ export default function (context, options = {}) {
53
53
  gap: 1rem;
54
54
  }
55
55
  }
56
+ &.sm {
57
+ max-height: 50vh;
58
+ max-width: 50vw;
59
+ }
60
+ &.md {
61
+ }
62
+ &.lg {
63
+ height: 96vh;
64
+ width: 96vw;
65
+ }
56
66
 
57
67
  ${colorsToCss()}
58
68
  `;
@@ -80,7 +90,7 @@ export default function (context, options = {}) {
80
90
  props?.class
81
91
  ),
82
92
  },
83
- div(...children)
93
+ div(children)
84
94
  );
85
95
  };
86
96
  }
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.58.0",
4
+ "version": "0.60.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.58.0",
24
- "@grucloud/bau-css": "^0.58.0"
23
+ "@grucloud/bau": "^0.60.0",
24
+ "@grucloud/bau-css": "^0.60.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "typedoc": "0.24.8"
28
28
  },
29
- "gitHead": "d9e041fc2420252ca2cca75d00e2c61c3ad5f885"
29
+ "gitHead": "a909ecfc84444120975d13fbb70752d4788a9541"
30
30
  }
@@ -41,6 +41,11 @@ export default function (context, options) {
41
41
  }
42
42
  if (rectAnchor.y < window.innerHeight / 2) {
43
43
  dialogEl.style.top = rectAnchor.top + rectAnchor.height + "px";
44
+ dialogEl.style.height =
45
+ Math.min(
46
+ dialogEl.scrollHeight,
47
+ window.innerHeight - rectAnchor.top - rectAnchor.height
48
+ ) + "px";
44
49
  } else {
45
50
  dialogEl.style.top =
46
51
  Math.max(0, rectAnchor.top - rectDialog.height) + "px";
@@ -64,7 +69,6 @@ export default function (context, options) {
64
69
  role: "presentation",
65
70
  class: classNames("popover", className, options?.class, props?.class),
66
71
  onclick: (event) => {
67
- event.stopPropagation();
68
72
  event.target === dialogEl && (closeDialog(), onClose?.call());
69
73
  },
70
74
  },