@grucloud/bau-ui 0.86.0 → 0.91.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/alert/alert.js CHANGED
@@ -92,7 +92,7 @@ export default function (context, options = {}) {
92
92
  onRemove,
93
93
  ...props
94
94
  },
95
- ...children
95
+ children,
96
96
  ] = toPropsAndChildren(args);
97
97
 
98
98
  return div(
@@ -111,7 +111,7 @@ export default function (context, options = {}) {
111
111
  role: "alert",
112
112
  },
113
113
  span({ class: "icon" }, severityMap[color]),
114
- div({ class: "content" }, ...children),
114
+ div({ class: "content" }, children),
115
115
  onRemove && CloseIcon({ onclick: onRemove })
116
116
  );
117
117
  };
@@ -45,7 +45,7 @@ export default (context, options = {}) => {
45
45
  }
46
46
  };
47
47
 
48
- return function AlertStack(props = {}, ...children) {
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);
@@ -73,7 +73,7 @@ export default function (context, componentOptions = {}) {
73
73
  loading,
74
74
  ...props
75
75
  },
76
- ...children
76
+ children,
77
77
  ] = toPropsAndChildren(args);
78
78
 
79
79
  const Popover = popover(context);
package/avatar/avatar.js CHANGED
@@ -56,7 +56,7 @@ export default function (context, options = {}) {
56
56
  alt,
57
57
  ...props
58
58
  },
59
- ...children
59
+ children,
60
60
  ] = toPropsAndChildren(args);
61
61
  const Skeleton = skeleton(context, {
62
62
  class: [
package/badge/badge.js CHANGED
@@ -34,7 +34,7 @@ export default function (context, options = {}) {
34
34
  content,
35
35
  ...props
36
36
  },
37
- ...children
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
- ...children
45
+ children
46
46
  );
47
47
  };
48
48
  }
@@ -48,7 +48,7 @@ export default function (context, options = {}) {
48
48
  items,
49
49
  ...props
50
50
  },
51
- ...children
51
+ children,
52
52
  ] = toPropsAndChildren(args);
53
53
  return ul(
54
54
  {
package/button/button.js CHANGED
@@ -91,7 +91,7 @@ export default function (context, options = {}) {
91
91
  href,
92
92
  ...props
93
93
  },
94
- ...children
94
+ children,
95
95
  ] = toPropsAndChildren(args);
96
96
 
97
97
  const tagButton = href ? bau.tags.a : bau.tags.button;
@@ -53,7 +53,7 @@ export default function (context, options = {}) {
53
53
  color = options.color ?? "neutral",
54
54
  ...props
55
55
  },
56
- ...children
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
- ...children
72
+ children
73
73
  );
74
74
  };
75
75
  }
@@ -33,7 +33,7 @@ export default function (context, options = {}) {
33
33
  color = options.color ?? "neutral",
34
34
  ...props
35
35
  },
36
- ...children
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
- ...children
52
+ children
53
53
  );
54
54
  };
55
55
  }
@@ -72,7 +72,7 @@ export default function (context, options = {}) {
72
72
  color = options.color ?? "neutral",
73
73
  ...props
74
74
  },
75
- ...children
75
+ children,
76
76
  ] = toPropsAndChildren(args);
77
77
 
78
78
  return input({
package/chip/chip.js CHANGED
@@ -38,7 +38,7 @@ export default function (context, options = {}) {
38
38
  onclick,
39
39
  ...props
40
40
  },
41
- ...children
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
- ...children
59
+ children
60
60
  );
61
61
  };
62
62
  }
@@ -28,14 +28,14 @@ export default function (context, options = {}) {
28
28
  color = options.color ?? "neutral",
29
29
  ...props
30
30
  },
31
- ...children
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" }, ...children)
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
- { color, variant = "outline", size, openState, ...props },
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
@@ -34,7 +34,7 @@ export default function (context, componentOptions = {}) {
34
34
  items,
35
35
  ...props
36
36
  },
37
- ...children
37
+ children,
38
38
  ] = toPropsAndChildren(args);
39
39
 
40
40
  const itemIndexActive = bau.state(0);
@@ -39,7 +39,7 @@ export default function (context, options = {}) {
39
39
  `,
40
40
  };
41
41
 
42
- return function FileInput(props, ...children) {
42
+ return function FileInput(props) {
43
43
  const {
44
44
  size = options.size ?? "md",
45
45
  variant = options.variant ?? "outline",
package/form/form.js CHANGED
@@ -57,7 +57,7 @@ export default function (context, options = {}) {
57
57
  content,
58
58
  ...props
59
59
  },
60
- ...children
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
- ...children
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.5"],
14
+ ["lightest", "1.7"],
15
15
  ];
16
16
  const SHADES_DARK = [
17
17
  ["dark", "0.9"],
@@ -117,6 +117,7 @@ export default function globalStyle(
117
117
  --background-color: var(--color-white);
118
118
  --global-border-width: 1px;
119
119
  --global-radius: 0.2rem;
120
+ --font-color: var(--color-content);
120
121
  --font-color-base: var(--color-content);
121
122
  --font-color-disabled: var(--color-emphasis-600);
122
123
  --font-color-inverse: var(--color-content-inverse);
@@ -29,14 +29,14 @@ export default function (context, options = {}) {
29
29
  color = options.color ?? "neutral",
30
30
  ...props
31
31
  },
32
- ...children
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
- ...children
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
- ...children
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
- ...children
60
+ children
61
61
  );
62
62
  };
63
63
  }
@@ -44,7 +44,7 @@ export default function (context, options = {}) {
44
44
  loading,
45
45
  ...props
46
46
  },
47
- ...children
47
+ children,
48
48
  ] = toPropsAndChildren(args);
49
49
 
50
50
  const Button = button(context);
package/modal/modal.js CHANGED
@@ -94,7 +94,7 @@ export default function (context, options = {}) {
94
94
  color = options.color ?? "neutral",
95
95
  ...props
96
96
  },
97
- ...children
97
+ children,
98
98
  ] = toPropsAndChildren(args);
99
99
 
100
100
  const dialogEl = dialog(
@@ -68,7 +68,7 @@ export default function (context, componentOptions = {}) {
68
68
  loading,
69
69
  ...props
70
70
  },
71
- ...children
71
+ children,
72
72
  ] = toPropsAndChildren(args);
73
73
 
74
74
  const Spinner = spinner(context, { variant, color, size });
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.86.0",
4
+ "version": "0.91.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.86.0",
24
- "@grucloud/bau-css": "^0.86.0"
23
+ "@grucloud/bau": "^0.91.0",
24
+ "@grucloud/bau-css": "^0.91.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "typedoc": "0.24.8"
28
28
  },
29
- "gitHead": "a611d39d05db892e5fe6d1effcd17dae38fa79e3"
29
+ "gitHead": "5709de64784458ef5cfb3359a126a28e650c5521"
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
- ...children
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
- ...children
49
+ children
50
50
  );
51
51
  };
52
52
  }
@@ -42,7 +42,7 @@ export default function (context, options = {}) {
42
42
  `;
43
43
 
44
44
  function PanelGroup(...args) {
45
- let [props, ...children] = toPropsAndChildren(args);
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, ...children] = toPropsAndChildren(args);
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, ...children] = toPropsAndChildren(args);
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
@@ -71,7 +71,7 @@ export default function (context, componentOptions = {}) {
71
71
  loading,
72
72
  ...props
73
73
  },
74
- ...children
74
+ children,
75
75
  ] = toPropsAndChildren(args);
76
76
 
77
77
  const Spinner = spinner(context, { variant, color, size });
@@ -24,7 +24,7 @@ export default function (context, componentOptions = {}) {
24
24
  color = componentOptions.color ?? "neutral",
25
25
  ...props
26
26
  },
27
- ...children
27
+ children,
28
28
  ] = toPropsAndChildren(args);
29
29
 
30
30
  return select(
@@ -43,14 +43,14 @@ export default function (context, options = {}) {
43
43
  color = options.color ?? "neutral",
44
44
  ...props
45
45
  },
46
- ...children
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
- ...children
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
- ...children
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
- ...children
47
+ children
48
48
  );
49
49
  };
50
50
  }
@@ -102,7 +102,7 @@ export default function (context, options = {}) {
102
102
  activeStepIndex = bau.state(0),
103
103
  ...props
104
104
  },
105
- ...children
105
+ children,
106
106
  ] = toPropsAndChildren(args);
107
107
  const stepperState = bau.state(
108
108
  stepperDefs.map((stepper, index) => ({ ...stepper, index }))
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
- ...children
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
- ...children
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 [{ ...props }, ...children] = toPropsAndChildren(args);
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
- ...children
68
+ children
69
69
  );
70
70
  };
71
71
  }
@@ -69,7 +69,6 @@ export default function (context, options = {}) {
69
69
  disableLast = () => isLastPage(page, totalCount, rowsPerPage),
70
70
  ...props
71
71
  },
72
- ...children
73
72
  ] = toPropsAndChildren(args);
74
73
  const maxPages = Math.max(0, Math.ceil(totalCount / rowsPerPage));
75
74
 
package/tabs/tabs.js CHANGED
@@ -89,7 +89,6 @@ export default function (context, options = {}) {
89
89
  tabsKey = "tabs",
90
90
  ...props
91
91
  },
92
- ...children
93
92
  ] = toPropsAndChildren(args);
94
93
 
95
94
  const tabsState = bau.state(tabDefs);
@@ -101,7 +101,7 @@ export default function (context, options = {}) {
101
101
  color = options.color ?? "neutral",
102
102
  ...props
103
103
  },
104
- ...children
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
- ...children
128
+ children
129
129
  );
130
130
  };
131
131
  }
package/toggle/toggle.js CHANGED
@@ -73,7 +73,7 @@ export default function (context, options = {}) {
73
73
  onclick,
74
74
  ...props
75
75
  },
76
- ...children
76
+ children,
77
77
  ] = toPropsAndChildren(args);
78
78
 
79
79
  return button(
@@ -53,7 +53,7 @@ export default function (context, options = {}) {
53
53
  onChange = () => {},
54
54
  ...props
55
55
  },
56
- ...children
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
- ...children
90
+ children
91
91
  );
92
92
  };
93
93
  }
@@ -96,7 +96,7 @@ export default function (context, options = {}) {
96
96
  color = options.color ?? "neutral",
97
97
  ...props
98
98
  },
99
- ...children
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
- ...children,
172
+ children,
173
173
  tooltipContentEl
174
174
  );
175
175