@grucloud/bau-ui 0.43.0 → 0.43.2
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/accordion/accordion.js +10 -3
- package/alert/alert.js +2 -5
- package/autocomplete/autocomplete.js +4 -4
- package/avatar/avatar.js +4 -4
- package/badge/badge.js +8 -2
- package/breadcrumbs/breadcrumbs.js +10 -4
- package/button/button.js +10 -5
- package/buttonGroup/buttonGroup.js +10 -3
- package/calendar/calendar.js +7 -2
- package/carousel/carousel.js +4 -4
- package/checkbox/checkbox.js +9 -2
- package/drillDownMenu/drillDownMenu.js +3 -3
- package/fileInput/fileInput.js +4 -4
- package/form/form.js +8 -2
- package/input/input.js +0 -3
- package/linearProgress/linearProgress.js +8 -2
- package/list/list.js +7 -2
- package/loadingButton/loadingButton.js +8 -2
- package/modal/modal.js +7 -2
- package/package.json +2 -2
- package/paginationNavigation/paginationNavigation.js +9 -2
- package/paper/paper.js +10 -3
- package/radioButton/radioButton.js +9 -3
- package/select/select.js +4 -4
- package/slider/slider.js +7 -3
- package/stepper/stepper.js +1 -1
- package/switch/switch.js +7 -2
- package/tableOfContent/tableOfContent.js +9 -2
- package/tablePagination/tablePagination.js +6 -5
- package/tabs/tabs.js +10 -3
- package/themeSwitch/themeSwitch.js +10 -3
- package/toggle/toggle.js +4 -4
- package/toggleGroup/toggleGroup.js +4 -4
- package/tooltip/tooltip.js +4 -4
- package/treeView/treeView.js +4 -4
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -22
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1367
- package/docs/functions/accordion.default.html +0 -100
- package/docs/functions/alert.default.html +0 -97
- package/docs/functions/alertStack.default.html +0 -97
- package/docs/functions/animate.default.html +0 -93
- package/docs/functions/autocomplete.default.html +0 -97
- package/docs/functions/avatar.default.html +0 -97
- package/docs/functions/badge.default.html +0 -97
- package/docs/functions/breadcrumbs.default.html +0 -98
- package/docs/functions/button.default.html +0 -97
- package/docs/functions/buttonGroup.default.html +0 -97
- package/docs/functions/calendar.default.html +0 -97
- package/docs/functions/checkbox.default.html +0 -97
- package/docs/functions/chip.default.html +0 -97
- package/docs/functions/context.createContext.html +0 -92
- package/docs/functions/drawer.default.html +0 -97
- package/docs/functions/drillDownMenu.default.html +0 -100
- package/docs/functions/fileInput.default.html +0 -97
- package/docs/functions/form.default.html +0 -97
- package/docs/functions/globalStyle.default.html +0 -96
- package/docs/functions/input.default.html +0 -97
- package/docs/functions/list.default.html +0 -97
- package/docs/functions/modal.default.html +0 -97
- package/docs/functions/paper.default.html +0 -97
- package/docs/functions/popover.default.html +0 -97
- package/docs/functions/select.default.html +0 -97
- package/docs/functions/slider.default.html +0 -97
- package/docs/functions/spinner.default.html +0 -97
- package/docs/functions/switch.default.html +0 -97
- package/docs/functions/tableContainer.default.html +0 -96
- package/docs/functions/tablePagination.default.html +0 -97
- package/docs/functions/tabs.default.html +0 -101
- package/docs/functions/themeSwitch.default.html +0 -96
- package/docs/functions/tooltip.default.html +0 -97
- package/docs/functions/treeView.default.html +0 -100
- package/docs/index.html +0 -82
- package/docs/modules/accordion.html +0 -104
- package/docs/modules/alert.html +0 -98
- package/docs/modules/alertStack.html +0 -98
- package/docs/modules/animate.html +0 -94
- package/docs/modules/autocomplete.html +0 -98
- package/docs/modules/avatar.html +0 -98
- package/docs/modules/badge.html +0 -98
- package/docs/modules/bau_ui.html +0 -97
- package/docs/modules/breadcrumbs.html +0 -100
- package/docs/modules/button.html +0 -98
- package/docs/modules/buttonGroup.html +0 -98
- package/docs/modules/calendar.html +0 -98
- package/docs/modules/checkbox.html +0 -98
- package/docs/modules/chip.html +0 -98
- package/docs/modules/constants.html +0 -102
- package/docs/modules/context.html +0 -92
- package/docs/modules/drawer.html +0 -98
- package/docs/modules/drillDownMenu.html +0 -104
- package/docs/modules/fileInput.html +0 -98
- package/docs/modules/form.html +0 -98
- package/docs/modules/globalStyle.html +0 -96
- package/docs/modules/input.html +0 -98
- package/docs/modules/list.html +0 -98
- package/docs/modules/modal.html +0 -98
- package/docs/modules/paper.html +0 -98
- package/docs/modules/popover.html +0 -98
- package/docs/modules/select.html +0 -98
- package/docs/modules/slider.html +0 -98
- package/docs/modules/spinner.html +0 -98
- package/docs/modules/switch.html +0 -98
- package/docs/modules/tableContainer.html +0 -96
- package/docs/modules/tablePagination.html +0 -98
- package/docs/modules/tabs.html +0 -106
- package/docs/modules/themeSwitch.html +0 -96
- package/docs/modules/tooltip.html +0 -98
- package/docs/modules/treeView.html +0 -104
- package/docs/types/accordion.Accordion.html +0 -96
- package/docs/types/accordion.AccordionItem.html +0 -89
- package/docs/types/accordion.AccordionItemPropBase.html +0 -94
- package/docs/types/accordion.AccordionProps.html +0 -94
- package/docs/types/accordion.Component.html +0 -89
- package/docs/types/accordion.ComponentOption.html +0 -89
- package/docs/types/accordion.DefaultDesignProps.html +0 -89
- package/docs/types/alert.AnimateProps.html +0 -91
- package/docs/types/alert.Component.html +0 -86
- package/docs/types/alert.ComponentOption.html +0 -86
- package/docs/types/alert.DefaultDesignProps.html +0 -86
- package/docs/types/alertStack.AlertStack.html +0 -86
- package/docs/types/alertStack.AlertStackProps.html +0 -89
- package/docs/types/alertStack.ComponentOption.html +0 -86
- package/docs/types/alertStack.DefaultDesignProps.html +0 -86
- package/docs/types/animate.AnimateProps.html +0 -103
- package/docs/types/animate.Component.html +0 -84
- package/docs/types/autocomplete.Autocomplete.html +0 -125
- package/docs/types/autocomplete.Component.html +0 -86
- package/docs/types/autocomplete.ComponentOption.html +0 -86
- package/docs/types/autocomplete.DefaultDesignProps.html +0 -86
- package/docs/types/avatar.AvatarProps.html +0 -99
- package/docs/types/avatar.Component.html +0 -86
- package/docs/types/avatar.ComponentOption.html +0 -86
- package/docs/types/avatar.DefaultDesignProps.html +0 -86
- package/docs/types/badge.BadgeProps.html +0 -91
- package/docs/types/badge.Component.html +0 -86
- package/docs/types/badge.ComponentOption.html +0 -86
- package/docs/types/badge.DefaultDesignProps.html +0 -86
- package/docs/types/bau_ui.ChildDom.html +0 -87
- package/docs/types/bau_ui.Component.html +0 -111
- package/docs/types/bau_ui.ComponentGeneric.html +0 -102
- package/docs/types/bau_ui.ComponentOneChild.html +0 -109
- package/docs/types/bau_ui.ComponentOption.html +0 -92
- package/docs/types/bau_ui.ComponentWithProp.html +0 -109
- package/docs/types/breadcrumbs.BreadcrumbsProps.html +0 -94
- package/docs/types/breadcrumbs.Component.html +0 -87
- package/docs/types/breadcrumbs.ComponentGeneric.html +0 -87
- package/docs/types/breadcrumbs.ComponentOption.html +0 -87
- package/docs/types/breadcrumbs.DefaultDesignProps.html +0 -87
- package/docs/types/button.ButtonProps.html +0 -93
- package/docs/types/button.Component.html +0 -86
- package/docs/types/button.ComponentOption.html +0 -86
- package/docs/types/button.DefaultDesignProps.html +0 -86
- package/docs/types/buttonGroup.ButtonGroupProps.html +0 -89
- package/docs/types/buttonGroup.Component.html +0 -86
- package/docs/types/buttonGroup.ComponentOption.html +0 -86
- package/docs/types/buttonGroup.DefaultDesignProps.html +0 -86
- package/docs/types/calendar.CalendarProps.html +0 -89
- package/docs/types/calendar.Component.html +0 -86
- package/docs/types/calendar.ComponentOption.html +0 -86
- package/docs/types/calendar.DefaultDesignProps.html +0 -86
- package/docs/types/checkbox.CheckboxProps.html +0 -89
- package/docs/types/checkbox.Component.html +0 -86
- package/docs/types/checkbox.ComponentOption.html +0 -86
- package/docs/types/checkbox.DefaultDesignProps.html +0 -86
- package/docs/types/chip.ChipProps.html +0 -89
- package/docs/types/chip.Component.html +0 -86
- package/docs/types/chip.ComponentOption.html +0 -86
- package/docs/types/chip.DefaultDesignProps.html +0 -86
- package/docs/types/constants.Color.html +0 -88
- package/docs/types/constants.DefaultDesignProps.html +0 -97
- package/docs/types/constants.Size.html +0 -88
- package/docs/types/constants.Variant.html +0 -88
- package/docs/types/context.Context.html +0 -107
- package/docs/types/drawer.Component.html +0 -86
- package/docs/types/drawer.ComponentOption.html +0 -86
- package/docs/types/drawer.DefaultDesignProps.html +0 -86
- package/docs/types/drawer.DrawerProps.html +0 -89
- package/docs/types/drillDownMenu.Component.html +0 -89
- package/docs/types/drillDownMenu.ComponentGeneric.html +0 -89
- package/docs/types/drillDownMenu.ComponentOption.html +0 -89
- package/docs/types/drillDownMenu.DefaultDesignProps.html +0 -89
- package/docs/types/drillDownMenu.Option.html +0 -116
- package/docs/types/drillDownMenu.Tree.html +0 -96
- package/docs/types/drillDownMenu.TreeViewProps.html +0 -94
- package/docs/types/fileInput.Component.html +0 -86
- package/docs/types/fileInput.ComponentOption.html +0 -86
- package/docs/types/fileInput.DefaultDesignProps.html +0 -86
- package/docs/types/fileInput.FileInputProps.html +0 -91
- package/docs/types/form.Component.html +0 -86
- package/docs/types/form.ComponentOption.html +0 -86
- package/docs/types/form.DefaultDesignProps.html +0 -86
- package/docs/types/form.FormProps.html +0 -89
- package/docs/types/globalStyle.ColorDefs.html +0 -85
- package/docs/types/globalStyle.HSL.html +0 -94
- package/docs/types/globalStyle.StyleOption.html +0 -90
- package/docs/types/input.Component.html +0 -86
- package/docs/types/input.ComponentOption.html +0 -86
- package/docs/types/input.DefaultDesignProps.html +0 -86
- package/docs/types/input.InputProps.html +0 -89
- package/docs/types/list.Component.html +0 -86
- package/docs/types/list.ComponentOption.html +0 -86
- package/docs/types/list.DefaultDesignProps.html +0 -86
- package/docs/types/list.ListProps.html +0 -89
- package/docs/types/modal.Component.html +0 -86
- package/docs/types/modal.ComponentOption.html +0 -86
- package/docs/types/modal.DefaultDesignProps.html +0 -86
- package/docs/types/modal.ModalProps.html +0 -89
- package/docs/types/paper.Component.html +0 -86
- package/docs/types/paper.ComponentOption.html +0 -86
- package/docs/types/paper.DefaultDesignProps.html +0 -86
- package/docs/types/paper.PaperProps.html +0 -89
- package/docs/types/popover.Action.html +0 -105
- package/docs/types/popover.Component.html +0 -86
- package/docs/types/popover.ComponentOption.html +0 -86
- package/docs/types/popover.PopoverProps.html +0 -89
- package/docs/types/select.Component.html +0 -86
- package/docs/types/select.ComponentOption.html +0 -86
- package/docs/types/select.DefaultDesignProps.html +0 -86
- package/docs/types/select.SelectProps.html +0 -121
- package/docs/types/slider.Component.html +0 -86
- package/docs/types/slider.ComponentOption.html +0 -86
- package/docs/types/slider.DefaultDesignProps.html +0 -86
- package/docs/types/slider.SliderProps.html +0 -89
- package/docs/types/spinner.Component.html +0 -86
- package/docs/types/spinner.ComponentOption.html +0 -86
- package/docs/types/spinner.DefaultDesignProps.html +0 -86
- package/docs/types/spinner.SpinnerProps.html +0 -91
- package/docs/types/switch.Component.html +0 -86
- package/docs/types/switch.ComponentOption.html +0 -86
- package/docs/types/switch.DefaultDesignProps.html +0 -86
- package/docs/types/switch.SwitchProps.html +0 -89
- package/docs/types/tableContainer.Component.html +0 -85
- package/docs/types/tableContainer.ComponentOption.html +0 -85
- package/docs/types/tableContainer.TableProps.html +0 -88
- package/docs/types/tablePagination.Component.html +0 -86
- package/docs/types/tablePagination.ComponentOption.html +0 -86
- package/docs/types/tablePagination.TablePaginationProps.html +0 -99
- package/docs/types/tablePagination.onPageChange.html +0 -110
- package/docs/types/tabs.Component.html +0 -90
- package/docs/types/tabs.ComponentOption.html +0 -90
- package/docs/types/tabs.ComponentTab.html +0 -90
- package/docs/types/tabs.Option.html +0 -95
- package/docs/types/tabs.Tab.html +0 -97
- package/docs/types/tabs.TabPropBase.html +0 -101
- package/docs/types/tabs.Tabs.html +0 -90
- package/docs/types/tabs.TabsProps.html +0 -93
- package/docs/types/themeSwitch.Component.html +0 -85
- package/docs/types/themeSwitch.ComponentOption.html +0 -85
- package/docs/types/themeSwitch.ThemeSwitchProps.html +0 -88
- package/docs/types/tooltip.Component.html +0 -86
- package/docs/types/tooltip.ComponentOption.html +0 -86
- package/docs/types/tooltip.DefaultDesignProps.html +0 -86
- package/docs/types/tooltip.TooltipProps.html +0 -91
- package/docs/types/treeView.Component.html +0 -89
- package/docs/types/treeView.ComponentGeneric.html +0 -89
- package/docs/types/treeView.ComponentOption.html +0 -89
- package/docs/types/treeView.DefaultDesignProps.html +0 -89
- package/docs/types/treeView.Option.html +0 -94
- package/docs/types/treeView.Tree.html +0 -98
- package/docs/types/treeView.TreeViewProps.html +0 -94
- package/docs/variables/constants.Colors.html +0 -88
- package/docs/variables/constants.Sizes.html +0 -88
- package/docs/variables/constants.Variants.html +0 -88
package/accordion/accordion.js
CHANGED
|
@@ -19,7 +19,7 @@ const colorsToCss = () =>
|
|
|
19
19
|
`
|
|
20
20
|
).join("\n");
|
|
21
21
|
|
|
22
|
-
export default function (context, options) {
|
|
22
|
+
export default function (context, options = {}) {
|
|
23
23
|
const { bau, css } = context;
|
|
24
24
|
const { div, ul, li, h3, button } = bau.tags;
|
|
25
25
|
|
|
@@ -69,8 +69,15 @@ export default function (context, options) {
|
|
|
69
69
|
`;
|
|
70
70
|
|
|
71
71
|
return function Accordion(...args) {
|
|
72
|
-
let [
|
|
73
|
-
|
|
72
|
+
let [
|
|
73
|
+
{
|
|
74
|
+
size = options.size ?? "md",
|
|
75
|
+
variant = options.variant ?? "plain",
|
|
76
|
+
color = options.color ?? "neutral",
|
|
77
|
+
data = [],
|
|
78
|
+
...props
|
|
79
|
+
},
|
|
80
|
+
] = toPropsAndChildren(args);
|
|
74
81
|
|
|
75
82
|
const itemNameState = bau.state("");
|
|
76
83
|
|
package/alert/alert.js
CHANGED
|
@@ -75,9 +75,9 @@ export default function (context, options = {}) {
|
|
|
75
75
|
return function Alert(...args) {
|
|
76
76
|
let [
|
|
77
77
|
{
|
|
78
|
-
|
|
78
|
+
size = options.size ?? "md",
|
|
79
79
|
variant = options.variant ?? "outline",
|
|
80
|
-
|
|
80
|
+
color = options.color ?? "neutral",
|
|
81
81
|
onRemove,
|
|
82
82
|
...props
|
|
83
83
|
},
|
|
@@ -91,9 +91,6 @@ export default function (context, options = {}) {
|
|
|
91
91
|
"alert",
|
|
92
92
|
`alert-${variant}`,
|
|
93
93
|
options.class,
|
|
94
|
-
options.variant,
|
|
95
|
-
options.size,
|
|
96
|
-
options.color,
|
|
97
94
|
variant,
|
|
98
95
|
color,
|
|
99
96
|
size,
|
|
@@ -20,7 +20,7 @@ const colorsToCss = () =>
|
|
|
20
20
|
`
|
|
21
21
|
).join("\n");
|
|
22
22
|
|
|
23
|
-
export default function (context, componentOptions) {
|
|
23
|
+
export default function (context, componentOptions = {}) {
|
|
24
24
|
const { bau, css } = context;
|
|
25
25
|
const { div, li } = bau.tags;
|
|
26
26
|
|
|
@@ -53,9 +53,9 @@ export default function (context, componentOptions) {
|
|
|
53
53
|
return function AutoComplete(...args) {
|
|
54
54
|
let [
|
|
55
55
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
size = componentOptions.size ?? "md",
|
|
57
|
+
variant = componentOptions.variant ?? "plain",
|
|
58
|
+
color = componentOptions.color ?? "neutral",
|
|
59
59
|
id,
|
|
60
60
|
label,
|
|
61
61
|
placeholder,
|
package/avatar/avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
2
2
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { span, img } = bau.tags;
|
|
7
7
|
|
|
@@ -35,9 +35,9 @@ export default function (context, options) {
|
|
|
35
35
|
return function Avatar(...args) {
|
|
36
36
|
let [
|
|
37
37
|
{
|
|
38
|
-
|
|
39
|
-
variant = "
|
|
40
|
-
|
|
38
|
+
size = options.size ?? "md",
|
|
39
|
+
variant = options.variant ?? "plain",
|
|
40
|
+
color = options.color ?? "neutral",
|
|
41
41
|
width = 40,
|
|
42
42
|
height = 40,
|
|
43
43
|
...props
|
package/badge/badge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { span } = bau.tags;
|
|
7
7
|
|
|
@@ -28,7 +28,13 @@ export default function (context, options) {
|
|
|
28
28
|
|
|
29
29
|
return function Badge(...args) {
|
|
30
30
|
let [
|
|
31
|
-
{
|
|
31
|
+
{
|
|
32
|
+
size = options.size ?? "md",
|
|
33
|
+
variant = options.variant ?? "plain",
|
|
34
|
+
color = options.color ?? "neutral",
|
|
35
|
+
content,
|
|
36
|
+
...props
|
|
37
|
+
},
|
|
32
38
|
...children
|
|
33
39
|
] = toPropsAndChildren(args);
|
|
34
40
|
return span(
|
|
@@ -2,8 +2,8 @@ import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
|
2
2
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
3
3
|
import button from "../button/button.js";
|
|
4
4
|
|
|
5
|
-
export default function (context, options) {
|
|
6
|
-
const { bau, css } = context;
|
|
5
|
+
export default function (context, options = {}) {
|
|
6
|
+
const { bau, css, config } = context;
|
|
7
7
|
const { ul, li, span } = bau.tags;
|
|
8
8
|
|
|
9
9
|
const Button = button(context);
|
|
@@ -42,7 +42,13 @@ export default function (context, options) {
|
|
|
42
42
|
|
|
43
43
|
return function Breadcrumbs(...args) {
|
|
44
44
|
let [
|
|
45
|
-
{
|
|
45
|
+
{
|
|
46
|
+
size = options.size ?? "md",
|
|
47
|
+
variant = options.variant ?? "plain",
|
|
48
|
+
color = options.color ?? "neutral",
|
|
49
|
+
items,
|
|
50
|
+
...props
|
|
51
|
+
},
|
|
46
52
|
...children
|
|
47
53
|
] = toPropsAndChildren(args);
|
|
48
54
|
return ul(
|
|
@@ -54,7 +60,7 @@ export default function (context, options) {
|
|
|
54
60
|
li(
|
|
55
61
|
(href ? Button : span)(
|
|
56
62
|
{
|
|
57
|
-
href
|
|
63
|
+
href: `${config.base}${href}`,
|
|
58
64
|
color,
|
|
59
65
|
variant,
|
|
60
66
|
size,
|
package/button/button.js
CHANGED
|
@@ -56,8 +56,16 @@ export default function (context, options = {}) {
|
|
|
56
56
|
`;
|
|
57
57
|
|
|
58
58
|
return function Button(...args) {
|
|
59
|
-
let [
|
|
60
|
-
|
|
59
|
+
let [
|
|
60
|
+
{
|
|
61
|
+
size = options.size ?? "md",
|
|
62
|
+
variant = options.variant ?? "none",
|
|
63
|
+
color = options.color ?? "none",
|
|
64
|
+
href,
|
|
65
|
+
...props
|
|
66
|
+
},
|
|
67
|
+
...children
|
|
68
|
+
] = toPropsAndChildren(args);
|
|
61
69
|
|
|
62
70
|
const tagButton = href ? bau.tags.a : bau.tags.button;
|
|
63
71
|
|
|
@@ -68,9 +76,6 @@ export default function (context, options = {}) {
|
|
|
68
76
|
class: classNames(
|
|
69
77
|
"button",
|
|
70
78
|
options.class,
|
|
71
|
-
options.variant,
|
|
72
|
-
options.size,
|
|
73
|
-
options.color,
|
|
74
79
|
variant,
|
|
75
80
|
size,
|
|
76
81
|
color,
|
|
@@ -27,7 +27,7 @@ const colorsToCss = () =>
|
|
|
27
27
|
`
|
|
28
28
|
).join("\n");
|
|
29
29
|
|
|
30
|
-
export default function (context, options) {
|
|
30
|
+
export default function (context, options = {}) {
|
|
31
31
|
const { bau, css } = context;
|
|
32
32
|
const { div } = bau.tags;
|
|
33
33
|
|
|
@@ -47,8 +47,15 @@ export default function (context, options) {
|
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
49
|
return function ButtonGroup(...args) {
|
|
50
|
-
let [
|
|
51
|
-
|
|
50
|
+
let [
|
|
51
|
+
{
|
|
52
|
+
size = options.size ?? "md",
|
|
53
|
+
variant = options.variant ?? "plain",
|
|
54
|
+
color = options.color ?? "neutral",
|
|
55
|
+
...props
|
|
56
|
+
},
|
|
57
|
+
...children
|
|
58
|
+
] = toPropsAndChildren(args);
|
|
52
59
|
|
|
53
60
|
return div(
|
|
54
61
|
{
|
package/calendar/calendar.js
CHANGED
|
@@ -2,7 +2,7 @@ import classNames from "@grucloud/bau-css/classNames.js";
|
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
import { Colors } from "../constants.js";
|
|
4
4
|
|
|
5
|
-
export default function (context, options) {
|
|
5
|
+
export default function (context, options = {}) {
|
|
6
6
|
const { bau, css } = context;
|
|
7
7
|
const { input } = bau.tags;
|
|
8
8
|
|
|
@@ -28,7 +28,12 @@ export default function (context, options) {
|
|
|
28
28
|
|
|
29
29
|
return function Calendar(...args) {
|
|
30
30
|
let [
|
|
31
|
-
{
|
|
31
|
+
{
|
|
32
|
+
size = options.size ?? "md",
|
|
33
|
+
variant = options.variant ?? "plain",
|
|
34
|
+
color = options.color ?? "neutral",
|
|
35
|
+
...props
|
|
36
|
+
},
|
|
32
37
|
...children
|
|
33
38
|
] = toPropsAndChildren(args);
|
|
34
39
|
return input(
|
package/carousel/carousel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { div } = bau.tags;
|
|
7
7
|
const className = css`
|
|
@@ -38,9 +38,9 @@ export default function (context, options) {
|
|
|
38
38
|
return function Carousel(...args) {
|
|
39
39
|
let [
|
|
40
40
|
{
|
|
41
|
-
|
|
42
|
-
variant = "plain",
|
|
43
|
-
|
|
41
|
+
size = options.size ?? "md",
|
|
42
|
+
variant = options.variant ?? "plain",
|
|
43
|
+
color = options.color ?? "neutral",
|
|
44
44
|
slides,
|
|
45
45
|
Slide,
|
|
46
46
|
Previous,
|
package/checkbox/checkbox.js
CHANGED
|
@@ -60,8 +60,15 @@ export default function (context, options = {}) {
|
|
|
60
60
|
`;
|
|
61
61
|
|
|
62
62
|
return function Checkbox(...args) {
|
|
63
|
-
let [
|
|
64
|
-
|
|
63
|
+
let [
|
|
64
|
+
{
|
|
65
|
+
size = options.size ?? "md",
|
|
66
|
+
variant = options.variant ?? "plain",
|
|
67
|
+
color = options.color ?? "neutral",
|
|
68
|
+
...props
|
|
69
|
+
},
|
|
70
|
+
...children
|
|
71
|
+
] = toPropsAndChildren(args);
|
|
65
72
|
|
|
66
73
|
return input({
|
|
67
74
|
type: "checkbox",
|
|
@@ -213,9 +213,9 @@ export default function (context, options = {}) {
|
|
|
213
213
|
|
|
214
214
|
return function DrillDownMenu(props) {
|
|
215
215
|
const {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
size = options.size ?? "md",
|
|
217
|
+
variant = options.variant ?? "plain",
|
|
218
|
+
color = options.color ?? "neutral",
|
|
219
219
|
tree,
|
|
220
220
|
...otherProps
|
|
221
221
|
} = props;
|
package/fileInput/fileInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
2
2
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { div, span, label, input } = bau.tags;
|
|
7
7
|
|
|
@@ -50,9 +50,9 @@ export default function (context, options) {
|
|
|
50
50
|
|
|
51
51
|
return function FileInput(props, ...children) {
|
|
52
52
|
const {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
size = options.size ?? "md",
|
|
54
|
+
variant = options.variant ?? "plain",
|
|
55
|
+
color = options.color ?? "neutral",
|
|
56
56
|
Component,
|
|
57
57
|
disabled,
|
|
58
58
|
...otherProps
|
package/form/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { form } = bau.tags;
|
|
7
7
|
|
|
@@ -40,7 +40,13 @@ export default function (context, options) {
|
|
|
40
40
|
|
|
41
41
|
return function Form(...args) {
|
|
42
42
|
let [
|
|
43
|
-
{
|
|
43
|
+
{
|
|
44
|
+
size = options.size ?? "md",
|
|
45
|
+
variant = options.variant ?? "plain",
|
|
46
|
+
color = options.color ?? "neutral",
|
|
47
|
+
content,
|
|
48
|
+
...props
|
|
49
|
+
},
|
|
44
50
|
...children
|
|
45
51
|
] = toPropsAndChildren(args);
|
|
46
52
|
return form(
|
package/input/input.js
CHANGED
|
@@ -70,14 +70,12 @@ export default function (context, options = {}) {
|
|
|
70
70
|
size = options.size ?? "md",
|
|
71
71
|
variant = options.variant ?? "outline",
|
|
72
72
|
color = options.color ?? "neutral",
|
|
73
|
-
disabled,
|
|
74
73
|
...otherProps
|
|
75
74
|
} = props;
|
|
76
75
|
|
|
77
76
|
return input({
|
|
78
77
|
type: "text",
|
|
79
78
|
...otherProps,
|
|
80
|
-
disabled,
|
|
81
79
|
class: classNames(
|
|
82
80
|
"input",
|
|
83
81
|
options.class,
|
|
@@ -85,7 +83,6 @@ export default function (context, options = {}) {
|
|
|
85
83
|
color,
|
|
86
84
|
variant,
|
|
87
85
|
className,
|
|
88
|
-
disabled && "disabled",
|
|
89
86
|
otherProps.class
|
|
90
87
|
),
|
|
91
88
|
});
|
|
@@ -2,7 +2,7 @@ import classNames from "@grucloud/bau-css/classNames.js";
|
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
import { Colors } from "../constants.js";
|
|
4
4
|
|
|
5
|
-
export default function (context, options) {
|
|
5
|
+
export default function (context, options = {}) {
|
|
6
6
|
const { bau, css, keyframes } = context;
|
|
7
7
|
const { div } = bau.tags;
|
|
8
8
|
|
|
@@ -60,7 +60,13 @@ export default function (context, options) {
|
|
|
60
60
|
|
|
61
61
|
return function LinearProgress(...args) {
|
|
62
62
|
let [
|
|
63
|
-
{
|
|
63
|
+
{
|
|
64
|
+
size = options.size ?? "md",
|
|
65
|
+
variant = options.variant ?? "plain",
|
|
66
|
+
color = options.color ?? "neutral",
|
|
67
|
+
running,
|
|
68
|
+
...props
|
|
69
|
+
},
|
|
64
70
|
] = toPropsAndChildren(args);
|
|
65
71
|
|
|
66
72
|
return div({
|
package/list/list.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { ul } = bau.tags;
|
|
7
7
|
|
|
@@ -36,7 +36,12 @@ export default function (context, options) {
|
|
|
36
36
|
|
|
37
37
|
return function List(...args) {
|
|
38
38
|
let [
|
|
39
|
-
{
|
|
39
|
+
{
|
|
40
|
+
size = options.size ?? "md",
|
|
41
|
+
variant = options.variant ?? "plain",
|
|
42
|
+
color = options.color ?? "neutral",
|
|
43
|
+
...props
|
|
44
|
+
},
|
|
40
45
|
...children
|
|
41
46
|
] = toPropsAndChildren(args);
|
|
42
47
|
return ul(
|
|
@@ -3,7 +3,7 @@ import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
|
3
3
|
import button from "../button";
|
|
4
4
|
import spinner from "../spinner";
|
|
5
5
|
|
|
6
|
-
export default function (context, options) {
|
|
6
|
+
export default function (context, options = {}) {
|
|
7
7
|
const { bau, css, keyframes } = context;
|
|
8
8
|
const { span } = bau.tags;
|
|
9
9
|
|
|
@@ -38,7 +38,13 @@ export default function (context, options) {
|
|
|
38
38
|
|
|
39
39
|
return function LoadingButton(...args) {
|
|
40
40
|
let [
|
|
41
|
-
{
|
|
41
|
+
{
|
|
42
|
+
size = options.size ?? "md",
|
|
43
|
+
variant = options.variant ?? "plain",
|
|
44
|
+
color = options.color ?? "neutral",
|
|
45
|
+
loading,
|
|
46
|
+
...props
|
|
47
|
+
},
|
|
42
48
|
...children
|
|
43
49
|
] = toPropsAndChildren(args);
|
|
44
50
|
|
package/modal/modal.js
CHANGED
|
@@ -2,7 +2,7 @@ import classNames from "@grucloud/bau-css/classNames.js";
|
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
import { Colors } from "../constants.js";
|
|
4
4
|
|
|
5
|
-
export default function (context, options) {
|
|
5
|
+
export default function (context, options = {}) {
|
|
6
6
|
const { bau, css } = context;
|
|
7
7
|
const { dialog, div } = bau.tags;
|
|
8
8
|
|
|
@@ -59,7 +59,12 @@ export default function (context, options) {
|
|
|
59
59
|
|
|
60
60
|
return function Modal(...args) {
|
|
61
61
|
let [
|
|
62
|
-
{
|
|
62
|
+
{
|
|
63
|
+
size = options.size ?? "md",
|
|
64
|
+
variant = options.variant ?? "plain",
|
|
65
|
+
color = options.color ?? "neutral",
|
|
66
|
+
...props
|
|
67
|
+
},
|
|
63
68
|
...children
|
|
64
69
|
] = toPropsAndChildren(args);
|
|
65
70
|
|
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.
|
|
4
|
+
"version": "0.43.2",
|
|
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": "
|
|
29
|
+
"gitHead": "a1cdd0cf2dfe0958568eb61260fd9c6bb02a674f"
|
|
30
30
|
}
|
|
@@ -55,8 +55,15 @@ export default function (context, options) {
|
|
|
55
55
|
);
|
|
56
56
|
|
|
57
57
|
return function PaginationNavigation(...args) {
|
|
58
|
-
let [
|
|
59
|
-
|
|
58
|
+
let [
|
|
59
|
+
{
|
|
60
|
+
size = options.size ?? "md",
|
|
61
|
+
variant = options.variant ?? "plain",
|
|
62
|
+
color = options.color ?? "neutral",
|
|
63
|
+
data = {},
|
|
64
|
+
...props
|
|
65
|
+
},
|
|
66
|
+
] = toPropsAndChildren(args);
|
|
60
67
|
const { next, previous } = data;
|
|
61
68
|
return nav(
|
|
62
69
|
{
|
package/paper/paper.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
|
|
4
|
-
export default function (context, options) {
|
|
4
|
+
export default function (context, options = {}) {
|
|
5
5
|
const { bau, css } = context;
|
|
6
6
|
const { div } = bau.tags;
|
|
7
7
|
const className = css`
|
|
@@ -32,8 +32,15 @@ export default function (context, options) {
|
|
|
32
32
|
`;
|
|
33
33
|
|
|
34
34
|
return function Paper(...args) {
|
|
35
|
-
let [
|
|
36
|
-
|
|
35
|
+
let [
|
|
36
|
+
{
|
|
37
|
+
size = options.size ?? "md",
|
|
38
|
+
variant = options.variant ?? "plain",
|
|
39
|
+
color = options.color ?? "neutral",
|
|
40
|
+
...props
|
|
41
|
+
},
|
|
42
|
+
...children
|
|
43
|
+
] = toPropsAndChildren(args);
|
|
37
44
|
return div(
|
|
38
45
|
{
|
|
39
46
|
...props,
|
|
@@ -2,7 +2,7 @@ import classNames from "@grucloud/bau-css/classNames.js";
|
|
|
2
2
|
import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
3
3
|
import { Colors } from "../constants.js";
|
|
4
4
|
|
|
5
|
-
export default function (context, options) {
|
|
5
|
+
export default function (context, options = {}) {
|
|
6
6
|
const { bau, css } = context;
|
|
7
7
|
const { input } = bau.tags;
|
|
8
8
|
|
|
@@ -29,8 +29,14 @@ export default function (context, options) {
|
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
31
|
return function RadioButton(...args) {
|
|
32
|
-
let [
|
|
33
|
-
|
|
32
|
+
let [
|
|
33
|
+
{
|
|
34
|
+
size = options.size ?? "md",
|
|
35
|
+
variant = options.variant ?? "plain",
|
|
36
|
+
color = options.color ?? "neutral",
|
|
37
|
+
...props
|
|
38
|
+
},
|
|
39
|
+
] = toPropsAndChildren(args);
|
|
34
40
|
|
|
35
41
|
return input({
|
|
36
42
|
...props,
|
package/select/select.js
CHANGED
|
@@ -19,7 +19,7 @@ const colorsToCss = () =>
|
|
|
19
19
|
`
|
|
20
20
|
).join("\n");
|
|
21
21
|
|
|
22
|
-
export default function (context, componentOptions) {
|
|
22
|
+
export default function (context, componentOptions = {}) {
|
|
23
23
|
const { bau, css } = context;
|
|
24
24
|
const { div, li, select, option } = bau.tags;
|
|
25
25
|
const Button = button(context);
|
|
@@ -43,9 +43,9 @@ export default function (context, componentOptions) {
|
|
|
43
43
|
return function Select(...args) {
|
|
44
44
|
let [
|
|
45
45
|
{
|
|
46
|
-
|
|
47
|
-
variant = "
|
|
48
|
-
|
|
46
|
+
size = componentOptions.size ?? "md",
|
|
47
|
+
variant = componentOptions.variant ?? "plain",
|
|
48
|
+
color = componentOptions.color ?? "neutral",
|
|
49
49
|
label,
|
|
50
50
|
Option,
|
|
51
51
|
options,
|
package/slider/slider.js
CHANGED
|
@@ -2,7 +2,7 @@ import { toPropsAndChildren } from "@grucloud/bau/bau.js";
|
|
|
2
2
|
import classNames from "@grucloud/bau-css/classNames.js";
|
|
3
3
|
import { Colors } from "../constants.js";
|
|
4
4
|
|
|
5
|
-
export default function (context, options) {
|
|
5
|
+
export default function (context, options = {}) {
|
|
6
6
|
const { bau, css } = context;
|
|
7
7
|
const { input } = bau.tags;
|
|
8
8
|
|
|
@@ -22,7 +22,12 @@ export default function (context, options) {
|
|
|
22
22
|
|
|
23
23
|
return function Slider(...args) {
|
|
24
24
|
let [
|
|
25
|
-
{
|
|
25
|
+
{
|
|
26
|
+
size = options.size ?? "md",
|
|
27
|
+
variant = options.variant ?? "plain",
|
|
28
|
+
color = options.color ?? "neutral",
|
|
29
|
+
...props
|
|
30
|
+
},
|
|
26
31
|
...children
|
|
27
32
|
] = toPropsAndChildren(args);
|
|
28
33
|
|
|
@@ -36,7 +41,6 @@ export default function (context, options) {
|
|
|
36
41
|
variant,
|
|
37
42
|
size,
|
|
38
43
|
className,
|
|
39
|
-
|
|
40
44
|
options?.class,
|
|
41
45
|
props.class
|
|
42
46
|
),
|
package/stepper/stepper.js
CHANGED
package/switch/switch.js
CHANGED
|
@@ -45,7 +45,7 @@ const colorsToCss = () =>
|
|
|
45
45
|
`
|
|
46
46
|
).join("\n");
|
|
47
47
|
|
|
48
|
-
export default function (context, options) {
|
|
48
|
+
export default function (context, options = {}) {
|
|
49
49
|
const { bau, css } = context;
|
|
50
50
|
const { input } = bau.tags;
|
|
51
51
|
|
|
@@ -109,7 +109,12 @@ export default function (context, options) {
|
|
|
109
109
|
|
|
110
110
|
return function Switch(...args) {
|
|
111
111
|
let [
|
|
112
|
-
{
|
|
112
|
+
{
|
|
113
|
+
size = options.size ?? "md",
|
|
114
|
+
variant = options.variant ?? "plain",
|
|
115
|
+
color = options.color ?? "neutral",
|
|
116
|
+
...props
|
|
117
|
+
},
|
|
113
118
|
...children
|
|
114
119
|
] = toPropsAndChildren(args);
|
|
115
120
|
return input(
|
|
@@ -115,8 +115,15 @@ export default function (context, options = {}) {
|
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
return function TableOfContent(...args) {
|
|
118
|
-
let [
|
|
119
|
-
|
|
118
|
+
let [
|
|
119
|
+
{
|
|
120
|
+
size = options.size ?? "md",
|
|
121
|
+
variant = options.variant ?? "plain",
|
|
122
|
+
color = options.color ?? "neutral",
|
|
123
|
+
contentEl,
|
|
124
|
+
...props
|
|
125
|
+
},
|
|
126
|
+
] = toPropsAndChildren(args);
|
|
120
127
|
|
|
121
128
|
const toc = createToc({ contentEl });
|
|
122
129
|
|