@grucloud/bau-ui 0.43.3 → 0.43.4

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.
@@ -24,11 +24,6 @@ export default function (context, componentOptions = {}) {
24
24
  const { bau, css } = context;
25
25
  const { div, li } = bau.tags;
26
26
 
27
- const Popover = popover(context);
28
- const Button = button(context);
29
- const Input = input(context);
30
- const List = list(context);
31
-
32
27
  const className = css`
33
28
  & button {
34
29
  &::after {
@@ -67,6 +62,11 @@ export default function (context, componentOptions = {}) {
67
62
  ...children
68
63
  ] = toPropsAndChildren(args);
69
64
 
65
+ const Popover = popover(context);
66
+ const Button = button(context);
67
+ const Input = input(context, { variant, color, size });
68
+ const List = list(context);
69
+
70
70
  const selectedState = bau.state("");
71
71
  const inputState = bau.state("");
72
72
  const openState = bau.state(false);
@@ -179,9 +179,6 @@ export default function (context, componentOptions = {}) {
179
179
  "aria-expanded": openState,
180
180
  oninput,
181
181
  onkeydown,
182
- variant,
183
- color,
184
- size,
185
182
  });
186
183
 
187
184
  const Content = () =>
package/input/index.d.ts CHANGED
@@ -2,7 +2,8 @@ declare module "@grucloud/bau-ui/input" {
2
2
  type DefaultDesignProps = import("../constants").DefaultDesignProps;
3
3
  type ComponentOption = import("../bau-ui").ComponentOption;
4
4
 
5
- export type InputProps = {} & DefaultDesignProps;
5
+ // Bau comonent size (sm, md and lg) conflicts with the native html input size.
6
+ export type InputProps = { size?: Number } & Omit<DefaultDesignProps, "size">;
6
7
 
7
8
  type Component = import("../bau-ui").Component<InputProps, HTMLInputElement>;
8
9
 
package/input/input.js CHANGED
@@ -67,7 +67,7 @@ export default function (context, options = {}) {
67
67
 
68
68
  return function Input(props) {
69
69
  const {
70
- size = options.size ?? "md",
70
+ // Use options to set the comonent size,
71
71
  variant = options.variant ?? "outline",
72
72
  color = options.color ?? "neutral",
73
73
  ...otherProps
@@ -79,7 +79,7 @@ export default function (context, options = {}) {
79
79
  class: classNames(
80
80
  "input",
81
81
  options.class,
82
- size,
82
+ options.size ?? "md",
83
83
  color,
84
84
  variant,
85
85
  className,
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.43.3",
4
+ "version": "0.43.4",
5
5
  "type": "module",
6
6
  "license": "BSD",
7
7
  "keywords": [
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "typedoc": "0.24.8"
28
28
  },
29
- "gitHead": "ce7f711af9f5588ed94daab1e48147978e061ab5"
29
+ "gitHead": "6ae28c28ef4f8b98f221f639e939fa99ce3c71b1"
30
30
  }
package/select/select.js CHANGED
@@ -44,7 +44,7 @@ export default function (context, componentOptions = {}) {
44
44
  let [
45
45
  {
46
46
  size = componentOptions.size ?? "md",
47
- variant = componentOptions.variant ?? "plain",
47
+ variant = componentOptions.variant ?? "outline",
48
48
  color = componentOptions.color ?? "neutral",
49
49
  label,
50
50
  Option,