@grucloud/bau-ui 0.39.0 → 0.41.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.
Files changed (79) hide show
  1. package/accordion/accordion.js +162 -0
  2. package/accordion/index.d.ts +26 -0
  3. package/accordion/index.js +1 -0
  4. package/alert/alert.js +65 -55
  5. package/alert/index.d.ts +8 -9
  6. package/alertStack/alertStack.js +5 -3
  7. package/alertStack/index.d.ts +5 -2
  8. package/autocomplete/autocomplete.js +222 -0
  9. package/autocomplete/index.d.ts +21 -0
  10. package/autocomplete/index.js +1 -0
  11. package/avatar/avatar.js +46 -6
  12. package/avatar/index.d.ts +5 -2
  13. package/badge/badge.js +43 -0
  14. package/badge/index.d.ts +16 -0
  15. package/badge/index.js +1 -0
  16. package/bau-ui.d.ts +14 -7
  17. package/breadcrumbs/breadcrumbs.js +30 -6
  18. package/breadcrumbs/index.d.ts +8 -2
  19. package/button/button.js +30 -106
  20. package/button/index.d.ts +4 -7
  21. package/buttonGroup/buttonGroup.js +68 -0
  22. package/buttonGroup/index.d.ts +10 -0
  23. package/buttonGroup/index.js +1 -0
  24. package/calendar/calendar.js +51 -0
  25. package/calendar/index.d.ts +13 -0
  26. package/calendar/index.js +1 -0
  27. package/checkbox/checkbox.js +66 -39
  28. package/checkbox/index.d.ts +5 -2
  29. package/chip/chip.js +60 -0
  30. package/chip/index.d.ts +10 -0
  31. package/chip/index.js +1 -0
  32. package/constants.d.ts +13 -0
  33. package/constants.js +3 -0
  34. package/context.d.ts +12 -0
  35. package/context.js +13 -0
  36. package/drawer/drawer.js +10 -5
  37. package/drawer/index.d.ts +5 -2
  38. package/drillDownMenu/drillDownMenu.js +117 -79
  39. package/drillDownMenu/index.d.ts +11 -3
  40. package/fileInput/fileInput.js +20 -10
  41. package/fileInput/index.d.ts +9 -3
  42. package/globalStyle/globalStyle.js +110 -60
  43. package/input/index.d.ts +6 -8
  44. package/input/input.js +78 -107
  45. package/list/index.d.ts +10 -0
  46. package/list/index.js +1 -0
  47. package/list/list.js +66 -0
  48. package/modal/index.d.ts +5 -2
  49. package/modal/modal.js +47 -10
  50. package/package.json +4 -4
  51. package/pages/login/index.d.ts +2 -0
  52. package/popover/index.d.ts +18 -0
  53. package/popover/index.js +1 -0
  54. package/popover/popover.js +69 -0
  55. package/select/index.d.ts +16 -0
  56. package/select/index.js +1 -0
  57. package/select/select.js +176 -0
  58. package/slider/index.d.ts +10 -0
  59. package/slider/index.js +1 -0
  60. package/slider/slider.js +47 -0
  61. package/spinner/index.d.ts +7 -4
  62. package/spinner/spinner.js +13 -5
  63. package/switch/index.d.ts +5 -2
  64. package/switch/switch.js +101 -18
  65. package/tableContainer/index.d.ts +9 -0
  66. package/tableContainer/index.js +1 -0
  67. package/tableContainer/tableContainer.js +78 -0
  68. package/tablePagination/index.d.ts +17 -0
  69. package/tablePagination/index.js +1 -0
  70. package/tablePagination/tablePagination.js +131 -0
  71. package/tabs/index.d.ts +3 -1
  72. package/tabs/tabs.js +34 -15
  73. package/themeSwitch/index.d.ts +3 -1
  74. package/themeSwitch/themeSwitch.js +58 -15
  75. package/tooltip/index.d.ts +24 -0
  76. package/tooltip/index.js +1 -0
  77. package/tooltip/tooltip.js +184 -0
  78. package/treeView/index.d.ts +7 -2
  79. package/treeView/treeView.js +37 -9
@@ -1,9 +1,15 @@
1
1
  declare module "@grucloud/bau-ui/fileInput" {
2
+ type DefaultDesignProps = import("../constants").DefaultDesignProps;
3
+ type ComponentOption = import("../bau-ui").ComponentOption;
4
+
2
5
  export type FileInputProps = {
3
6
  disabled?: boolean;
4
- };
7
+ } & DefaultDesignProps;
5
8
 
6
- type Component = import("../bau-ui").Component<FileInputProps>;
9
+ type Component = import("../bau-ui").Component<
10
+ FileInputProps,
11
+ HTMLInputElement
12
+ >;
7
13
 
8
- export default function (context: any): Component;
14
+ export default function (context: any, option?: ComponentOption): Component;
9
15
  }
@@ -1,10 +1,11 @@
1
1
  const ColorPaletteDefault = [
2
- ["primary", { h: "230", s: "48%", l: "47%" }],
3
- ["secondary", { h: "338", s: "100%", l: "48%" }],
4
- ["success", { h: "120", s: "100%", l: "32%" }],
5
- ["info", { h: "194", s: "80%", l: "62%" }],
6
- ["warning", { h: "43", s: "100%", l: "50%" }],
7
- ["danger", { h: "358", s: "95%", l: "60%" }],
2
+ ["neutral", { h: "0", s: "0%", l: "20%" }],
3
+ ["primary", { h: "230", s: "48%", l: "20%" }],
4
+ ["secondary", { h: "338", s: "100%", l: "20%" }],
5
+ ["success", { h: "120", s: "100%", l: "20%" }],
6
+ ["info", { h: "194", s: "80%", l: "20%" }],
7
+ ["warning", { h: "43", s: "100%", l: "20%" }],
8
+ ["danger", { h: "358", s: "95%", l: "20%" }],
8
9
  ];
9
10
 
10
11
  const SHADES_LIGHT = [
@@ -18,22 +19,46 @@ const SHADES_DARK = [
18
19
  ["darkest", "0.5"],
19
20
  ];
20
21
 
22
+ const darkVar = (color) => `var(--color-${color})`;
23
+ const lightestVar = (color) => `var(--color-${color}-lightest)`;
24
+
25
+ const variantToCss = () =>
26
+ ColorPaletteDefault.map(
27
+ ([color]) =>
28
+ `
29
+ .outline.${color} {
30
+ border: 2px solid ${darkVar(color)};
31
+ color: var(--font-color-base)
32
+ }
33
+ .soft.${color} {
34
+ background-color: ${lightestVar(color)};
35
+ }
36
+ .solid.${color} {
37
+ background-color: ${darkVar(color)};
38
+ }
39
+ `
40
+ ).join("\n");
41
+
42
+ const indexToColor = (index) => {
43
+ return 100 - index * 10;
44
+ };
45
+
21
46
  const buildGrays = () =>
22
- new Array(20)
47
+ new Array(10)
23
48
  .fill("")
24
49
  .map(
25
50
  (v, index) =>
26
- `--color-gray-${index * 50}: hsl(0, 0%, ${100 - 5 * index}%);`
51
+ `--color-gray-${index * 100}: hsl(0, 0%, ${indexToColor(index)}%);`
27
52
  )
28
53
  .join("\n");
29
54
 
30
55
  export const buildEmphasis = ({ dark }) =>
31
- new Array(20)
56
+ new Array(10)
32
57
  .fill("")
33
58
  .map(
34
59
  (v, index) =>
35
- `--color-emphasis-${index * 50}: var(--color-gray-${
36
- dark ? 1000 - index * 50 : index * 50
60
+ `--color-emphasis-${index * 100}: var(--color-gray-${
61
+ dark ? 1000 - index * 100 : index * 100
37
62
  });`
38
63
  )
39
64
  .join("\n");
@@ -62,53 +87,78 @@ export default function globalStyle(
62
87
  { colorPalette = ColorPaletteDefault } = {}
63
88
  ) {
64
89
  createGlobalStyles`
65
- :root {
66
- --color-scheme: light;
67
- --contrast-background-value: 90%;
68
- --contrast-foreground-value: 70%;
69
- --contrast-background-dark-value: 70%;
70
- --contrast-foreground-dark-value: 90%;
71
- --color-white: #fff;
72
- --color-black: #000;
73
- ${colorPalette.map(([color, hsl]) => buildColor([color, hsl])).join("\n")}
74
- ${buildGrays()}
75
- ${buildEmphasis({})}
76
- --color-content: hsl(0, 0%, 10%);
77
- --color-content-inverse: hsl(0, 0%, 90%);
78
- --color-content-secondary: hsl(0, 0%, 30%);
79
- --background-color: var(--color-white);
80
- --background-surface-color: var(--color-content-inverse);
81
- --global-border-width: 1px;
82
- --global-radius: 0.4rem;
83
- --font-color-base: var(--color-content);
84
- --font-color-disabled: var(--color-emphasis-700);
85
- --font-color-inverse: var(--color-content-inverse);
86
- --font-color-secondary: var(--color-content-secondary);
87
- --font-family: system-ui, -apple-system, Helvetica, Arial, sans-serif;
88
- --font-family-monospace: Consolas, monospace;
89
- --font-weight-light: 300;
90
- --font-weight-normal: 400;
91
- --font-weight-semibold: 500;
92
- --font-weight-bold: 700;
93
- --global-spacing: 1rem;
94
- --spacing-vertical: var(--global-spacing);
95
- --spacing-horizontal: var(--global-spacing);
96
- --transition-fast: 200ms;
97
- --transition-slow: 400ms;
98
- --shadow-s: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
99
- --shadow-m: 0 2px 4px 0 rgba(0, 0, 0, 0.4);
100
- --font-size-base: 100%;
101
- --line-height-base: 1.65;
102
- --link-color: var(--color-primary)
103
- }
104
- :root {
105
- font-family: var(--font-family);
106
- color-scheme: var(--color-scheme);
107
- color: var(--color-content);
108
- font: var(--font-size-base) / var(--line-height-base) var(--font-family)
109
- }
110
- body {
111
- margin: 0;
112
- }
113
- `;
90
+ :root {
91
+ --color-scheme: light;
92
+ --contrast-background-value: 90%;
93
+ --contrast-foreground-value: 70%;
94
+ --contrast-background-dark-value: 70%;
95
+ --contrast-foreground-dark-value: 90%;
96
+ --color-white: #fff;
97
+ --color-black: #000;
98
+ ${colorPalette.map(([color, hsl]) => buildColor([color, hsl])).join("\n")}
99
+ ${buildGrays()}
100
+ ${buildEmphasis({})}
101
+ ${variantToCss()}
102
+
103
+ --color-content: hsl(0, 0%, 10%);
104
+ --color-content-inverse: hsl(0, 0%, 95%);
105
+ --color-content-secondary: hsl(0, 0%, 30%);
106
+ --background-color: var(--color-white);
107
+ --global-border-width: 1px;
108
+ --global-radius: 0.4rem;
109
+ --font-color-base: var(--color-content);
110
+ --font-color-disabled: var(--color-emphasis-600);
111
+ --font-color-inverse: var(--color-content-inverse);
112
+ --font-color-secondary: var(--color-content-secondary);
113
+ --font-family: system-ui, -apple-system, Helvetica, Arial, sans-serif;
114
+ --font-family-monospace: Consolas, monospace;
115
+ --font-weight-light: 300;
116
+ --font-weight-normal: 400;
117
+ --font-weight-semibold: 500;
118
+ --font-weight-bold: 700;
119
+ --global-spacing: 1rem;
120
+ --spacing-vertical: var(--global-spacing);
121
+ --spacing-horizontal: var(--global-spacing);
122
+ --transition-fast: 200ms;
123
+ --transition-slow: 400ms;
124
+ --shadow-s: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
125
+ --shadow-m: 0 2px 4px 0 rgba(0, 0, 0, 0.4);
126
+ --font-size-base: 100%;
127
+ --line-height-base: 1.65;
128
+ --link-color: var(--color-primary);
129
+ --brightness-hover-always: 180%;
130
+ --brightness-active-always: 150%;
131
+ --brightness-hover: 80%;
132
+ --brightness-hover-reverse: 140%;
133
+ --brightness-active: 90%;
134
+ .plain {
135
+ background-color: var(--background-color);
136
+ }
137
+ .outline {
138
+ background-color: var(--background-color);
139
+ }
140
+ .solid {
141
+ color: var(--font-color-inverse);
142
+ }
143
+ .sm {
144
+ font-size: 0.8rem;
145
+ }
146
+ .md {
147
+ font-size: 1.1rem;
148
+ }
149
+ .lg {
150
+ font-size: 1.2rem;
151
+ }
152
+ }
153
+ :root {
154
+ font-family: var(--font-family);
155
+ color-scheme: var(--color-scheme);
156
+ color: var(--color-content);
157
+ font: var(--font-size-base) / var(--line-height-base) var(--font-family);
158
+ background-color: var(--background-color);
159
+ }
160
+ body {
161
+ margin: 0;
162
+ }
163
+ `;
114
164
  }
package/input/index.d.ts CHANGED
@@ -1,12 +1,10 @@
1
1
  declare module "@grucloud/bau-ui/input" {
2
- export type InputProps = {
3
- name: string;
4
- id: string;
5
- label: string;
6
- error?: string;
7
- };
2
+ type DefaultDesignProps = import("../constants").DefaultDesignProps;
3
+ type ComponentOption = import("../bau-ui").ComponentOption;
8
4
 
9
- type Component = import("../bau-ui").Component<InputProps>;
5
+ export type InputProps = {} & DefaultDesignProps;
10
6
 
11
- export default function (context: any): Component;
7
+ type Component = import("../bau-ui").Component<InputProps, HTMLInputElement>;
8
+
9
+ export default function (context: any, option?: ComponentOption): Component;
12
10
  }
package/input/input.js CHANGED
@@ -1,122 +1,93 @@
1
- import classNames from "@grucloud/bau-css/classNames";
1
+ import classNames from "@grucloud/bau-css/classNames.js";
2
+ import { Colors } from "../constants.js";
2
3
 
3
- const createStyles = ({ css, createGlobalStyles }) => {
4
- createGlobalStyles`
5
- :root {
6
- --input-border-bottom-size: 2px;
4
+ const colorsToCss = () =>
5
+ Colors.map(
6
+ (color) =>
7
+ `
8
+ &.input.${color} {
9
+ border: 2px solid transparent;
7
10
  }
8
- `;
9
-
10
- return {
11
- base: css`
12
- position: relative;
13
- display: inline-block;
14
- min-height: 3rem;
15
-
16
- & input {
17
- font-size: 1.2rem;
18
- background: var(--color-emphasis-100);
19
- box-shadow: var(--shadow-s);
20
- border-radius: var(--global-radius);
21
- border: var(--input-border-bottom-size) solid transparent;
22
- border-bottom: var(--input-border-bottom-size) solid
23
- var(--color-emphasis-900);
24
- box-sizing: border-box;
25
- padding: 26px 10px 4px 10px;
26
- outline: none;
27
- transition: background-color var(--transition-fast) ease-in-out;
28
- &:hover {
29
- background: var(--color-emphasis-200);
30
- }
31
- &:focus,
32
- &:valid {
33
- border-bottom: var(--input-border-bottom-size) solid
34
- var(--color-primary);
35
- }
36
- &:focus + label,
37
- &:valid + label,
38
- &:disabled + label {
39
- top: 1rem;
40
- font-size: 0.8rem;
41
- font-weight: bold;
42
- color: var(--color-primary);
43
- }
44
- }
45
- & label {
46
- display: block;
47
- top: 1.5rem;
48
- line-height: 0;
49
- position: absolute;
50
- pointer-events: none;
51
- padding: 0px 10px;
52
- transition: var(--transition-fast) ease-in-out;
53
- color: var(--font-color-secondary);
54
- &:focus {
55
- font-style: normal;
56
- }
57
- }
58
- & div[data-input-error] {
59
- margin: 0.2rem 0;
60
- position: absolute;
61
- background: var(--background-color);
62
- }
63
- `,
64
- disabled: css`
65
- & * {
66
- color: var(--font-color-disabled) !important;
67
- }
68
- & input {
69
- border-bottom: var(--input-border-bottom-size) dashed
70
- var(--font-color-disabled);
71
- }
72
- `,
73
- error: css`
74
- color: var(--color-danger-darkest) !important;
75
- & * {
76
- color: var(--color-danger-darkest) !important;
77
- }
78
- & input {
79
- border-bottom: var(--input-border-bottom-size) dashed
80
- var(--color-danger-darkest) !important;
81
- }
82
- `,
11
+ &.input.plain.${color} {
12
+ &:focus {
13
+ border-color: var(--color-${color});
83
14
  };
84
- };
15
+ }
16
+ &.input.outline.${color} {
17
+ border: 1px solid var(--color-${color});
18
+ &:focus {
19
+ border: 2px solid var(--color-${color});
20
+ };
21
+ }
22
+ &.input.soft.${color} {
23
+ &:focus {
24
+ border-color: var(--color-${color});
25
+ };
26
+ }
27
+ &.input.solid.${color} {
28
+ &:focus {
29
+ border-color: var(--color-${color});
30
+ };
31
+ &::placeholder {
32
+ color: var(--font-color-inverse);
33
+ filter: brightness(var(--brightness-hover));
34
+ }
35
+ &:hover {
36
+ background-color: var(--color-${color}-light);
37
+ }
38
+ }
39
+ `
40
+ ).join("\n");
85
41
 
86
- export default function (context, options = {}) {
87
- const { bau, css, createGlobalStyles } = context;
88
- const { div, input, label } = bau.tags;
42
+ export default function (context, options) {
43
+ const { bau, css } = context;
44
+ const { input } = bau.tags;
89
45
 
90
- const styles = createStyles({ css, createGlobalStyles });
46
+ const className = css`
47
+ display: inline-block;
48
+ box-shadow: var(--shadow-s);
49
+ border-radius: var(--global-radius);
50
+ box-sizing: border-box;
51
+ outline: none;
52
+ color: inherit;
53
+ transition: background-color var(--transition-fast) ease-in-out;
54
+ &.input:hover {
55
+ background-color: var(--color-emphasis-100);
56
+ }
57
+ &.sm {
58
+ padding: 0.4rem;
59
+ }
60
+ &.md {
61
+ padding: 0.5rem;
62
+ }
63
+ &.lg {
64
+ padding: 0.8rem;
65
+ }
66
+ ${colorsToCss()}
67
+ `;
91
68
 
92
69
  return function Input(props) {
93
70
  const {
71
+ size = "md",
72
+ variant = "outline",
73
+ color = "neutral",
94
74
  name,
95
75
  id,
96
76
  disabled,
97
- label: labelValue = "",
98
- error = "",
99
77
  ...otherProps
100
78
  } = props;
101
- return div(
102
- {
103
- class: classNames(
104
- styles.base,
105
- disabled && styles.disabled,
106
- error && styles.error,
107
- props.class
108
- ),
109
- },
110
- input({
111
- id,
112
- name,
113
- type: "text",
114
- required: true,
115
- disabled,
116
- ...otherProps,
117
- }),
118
- label({ htmlFor: id }, labelValue),
119
- div({ "data-input-error": name }, error)
120
- );
79
+
80
+ return input({
81
+ ...otherProps,
82
+ class: classNames(
83
+ "input",
84
+ size,
85
+ color,
86
+ variant,
87
+ className,
88
+ options?.class,
89
+ otherProps.class
90
+ ),
91
+ });
121
92
  };
122
93
  }
@@ -0,0 +1,10 @@
1
+ declare module "@grucloud/bau-ui/list" {
2
+ type DefaultDesignProps = import("../constants").DefaultDesignProps;
3
+ type ComponentOption = import("../bau-ui").ComponentOption;
4
+
5
+ export type ListProps = {} & DefaultDesignProps;
6
+
7
+ type Component = import("../bau-ui").Component<ListProps, HTMLUListElement>;
8
+
9
+ export default function (context: any, option?: ComponentOption): Component;
10
+ }
package/list/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default } from "./list";
package/list/list.js ADDED
@@ -0,0 +1,66 @@
1
+ import classNames from "@grucloud/bau-css/classNames.js";
2
+ import { toPropsAndChildren } from "@grucloud/bau/bau.js";
3
+ import { Colors } from "../constants.js";
4
+
5
+ export default function (context, options) {
6
+ const { bau, css } = context;
7
+ const { ul } = bau.tags;
8
+
9
+ const colorsToCss = () =>
10
+ Colors.map(
11
+ (color) =>
12
+ `
13
+ `
14
+ ).join("\n");
15
+
16
+ const className = css`
17
+ list-style: none;
18
+ padding: 0;
19
+ margin: 0 0;
20
+ &.solid {
21
+ & li:hover {
22
+ filter: brightness(var(--brightness-hover-always));
23
+ }
24
+ & li.active {
25
+ filter: brightness(var(--brightness-active-always));
26
+ }
27
+ }
28
+ & li {
29
+ padding: 0.4rem;
30
+ cursor: pointer;
31
+ background-color: inherit;
32
+ transition: all var(--transition-slow) ease-out;
33
+ display: flex;
34
+ align-items: center;
35
+ &:hover {
36
+ filter: brightness(var(--brightness-hover));
37
+ }
38
+ &.active {
39
+ filter: brightness(var(--brightness-active));
40
+ }
41
+ }
42
+ ${colorsToCss()}
43
+ `;
44
+
45
+ return function List(...args) {
46
+ let [
47
+ { color = "neutral", variant = "plain", size, ...props },
48
+ ...children
49
+ ] = toPropsAndChildren(args);
50
+ return ul(
51
+ {
52
+ ...props,
53
+ class: classNames(
54
+ "list",
55
+ className,
56
+ color,
57
+ variant,
58
+ size,
59
+ options?.class,
60
+ props?.class
61
+ ),
62
+ },
63
+ ...children
64
+ );
65
+ };
66
+ }
package/modal/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  declare module "@grucloud/bau-ui/modal" {
2
- export type ModalProps = {};
2
+ type DefaultDesignProps = import("../constants").DefaultDesignProps;
3
+ type ComponentOption = import("../bau-ui").ComponentOption;
4
+
5
+ export type ModalProps = {} & DefaultDesignProps;
3
6
 
4
7
  type Component = import("../bau-ui").Component<ModalProps, HTMLDialogElement>;
5
8
 
6
- export default function (context: any): Component;
9
+ export default function (context: any, option?: ComponentOption): Component;
7
10
  }
package/modal/modal.js CHANGED
@@ -1,10 +1,31 @@
1
- import classNames from "@grucloud/bau-css/classNames";
1
+ import classNames from "@grucloud/bau-css/classNames.js";
2
+ import { toPropsAndChildren } from "@grucloud/bau/bau.js";
3
+ import { Colors } from "../constants.js";
2
4
 
3
- export default function (context) {
5
+ export default function (context, options) {
4
6
  const { bau, css } = context;
5
7
  const { dialog } = bau.tags;
6
8
 
7
- const style = css`
9
+ const colorsToCss = () =>
10
+ Colors.map(
11
+ (color) =>
12
+ `
13
+ &.modal.plain.${color} {
14
+ color: inherit;
15
+ }
16
+ &.modal.outline.${color} {
17
+ color: inherit;
18
+ }
19
+ &.modal.soft.${color} {
20
+ color: inherit;
21
+ }
22
+ &.modal.solid.${color} {
23
+
24
+ }
25
+ `
26
+ ).join("\n");
27
+
28
+ const className = css`
8
29
  box-shadow: var(--shadow-s);
9
30
  background-color: var(--background-color);
10
31
  top: 0;
@@ -21,26 +42,42 @@ export default function (context) {
21
42
  font-size: 1.8rem;
22
43
  font-weight: 800;
23
44
  text-align: center;
24
- background-color: var(--color-primary);
25
- color: var(--font-color-inverse);
26
45
  }
27
46
  & footer {
28
47
  display: flex;
29
48
  justify-content: flex-end;
30
49
  margin: 0px;
31
50
  box-shadow: var(--shadow-s);
32
- > * {
33
- margin: 12px;
34
- }
51
+ padding: 1rem;
52
+ gap: 1rem;
35
53
  }
36
54
  & > main {
37
55
  margin: 12px;
38
56
  flex-grow: 1;
39
57
  overflow: scroll;
40
58
  }
59
+ ${colorsToCss()}
41
60
  `;
42
61
 
43
- return function Modal(props, ...children) {
44
- return dialog({ class: classNames(style, props.class) }, ...children);
62
+ return function Modal(...args) {
63
+ let [
64
+ { color = "neutral", variant = "outline", size = "md", ...props },
65
+ ...children
66
+ ] = toPropsAndChildren(args);
67
+
68
+ return dialog(
69
+ {
70
+ class: classNames(
71
+ "modal",
72
+ className,
73
+ color,
74
+ variant,
75
+ size,
76
+ options?.class,
77
+ props?.class
78
+ ),
79
+ },
80
+ ...children
81
+ );
45
82
  };
46
83
  }
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.39.0",
4
+ "version": "0.41.0",
5
5
  "type": "module",
6
6
  "license": "BSD",
7
7
  "keywords": [
@@ -18,8 +18,8 @@
18
18
  "directory": "bau-ui"
19
19
  },
20
20
  "dependencies": {
21
- "@grucloud/bau": "^0.39.0",
22
- "@grucloud/bau-css": "^0.39.0"
21
+ "@grucloud/bau": "^0.41.0",
22
+ "@grucloud/bau-css": "^0.41.0"
23
23
  },
24
- "gitHead": "28f3ddb106298f19dd29f50989edf0b2fb530e37"
24
+ "gitHead": "357368714bcb12c15dbff9bc8b0edcf5ea16a962"
25
25
  }
@@ -1,4 +1,6 @@
1
1
  declare module "@grucloud/bau-ui/pages/login" {
2
+ type ComponentOption = import("../bau-ui").ComponentOption;
3
+
2
4
  export type LoginProps = {
3
5
  // severity: string;
4
6
  // onRemove?: Function;
@@ -0,0 +1,18 @@
1
+ declare module "@grucloud/bau-ui/popover" {
2
+ type ComponentOption = import("../bau-ui").ComponentOption;
3
+
4
+ export type PopoverProps = {};
5
+
6
+ type Action = {
7
+ openDialog: () => void;
8
+ closeDialog: () => void;
9
+ };
10
+
11
+ type Component = import("../bau-ui").Component<
12
+ PopoverProps,
13
+ HTMLDialogElement,
14
+ Action
15
+ >;
16
+
17
+ export default function (context: any, option?: ComponentOption): Component;
18
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./popover";