@agnos-ui/react-bootstrap 0.4.0-next.0 → 0.4.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/{accordion-DnlQmoOX.cjs → accordion-CG9yl3xh.cjs} +10 -8
- package/{accordion-CMbgQzoG.js → accordion-DKdL2Sr3.js} +12 -10
- package/{alert-DKl7HLhb.js → alert-0W1n8ahW.js} +7 -7
- package/{alert-Bn5ooyqK.cjs → alert-DeQRFTm3.cjs} +6 -6
- package/components/accordion/accordion.d.ts +1 -6
- package/components/accordion/accordion.gen.d.ts +77 -5
- package/components/accordion/index.cjs +5 -4
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/index.js +5 -4
- package/components/alert/alert.d.ts +1 -5
- package/components/alert/alert.gen.d.ts +61 -7
- package/components/alert/index.cjs +3 -3
- package/components/alert/index.d.ts +1 -0
- package/components/alert/index.js +3 -3
- package/components/modal/index.cjs +5 -12
- package/components/modal/index.d.ts +1 -0
- package/components/modal/index.js +5 -6
- package/components/modal/modal.d.ts +1 -6
- package/components/modal/modal.gen.d.ts +131 -31
- package/components/pagination/index.cjs +3 -3
- package/components/pagination/index.d.ts +2 -0
- package/components/pagination/index.js +4 -4
- package/components/pagination/pagination.d.ts +1 -6
- package/components/pagination/pagination.gen.d.ts +204 -34
- package/components/progressbar/index.cjs +3 -3
- package/components/progressbar/index.d.ts +1 -0
- package/components/progressbar/index.js +3 -3
- package/components/progressbar/progressbar.d.ts +1 -5
- package/components/progressbar/progressbar.gen.d.ts +56 -3
- package/components/rating/index.cjs +3 -3
- package/components/rating/index.d.ts +1 -0
- package/components/rating/index.js +3 -3
- package/components/rating/rating.d.ts +1 -5
- package/components/rating/rating.gen.d.ts +84 -1
- package/components/select/index.cjs +3 -3
- package/components/select/index.d.ts +1 -0
- package/components/select/index.js +3 -3
- package/components/select/select.d.ts +1 -5
- package/components/select/select.gen.d.ts +121 -1
- package/components/slider/index.cjs +3 -3
- package/components/slider/index.d.ts +1 -0
- package/components/slider/index.js +3 -3
- package/components/slider/slider.d.ts +1 -5
- package/components/slider/slider.gen.d.ts +98 -3
- package/components/toast/index.cjs +3 -3
- package/components/toast/index.d.ts +1 -0
- package/components/toast/index.js +3 -3
- package/components/toast/toast.d.ts +1 -5
- package/components/toast/toast.gen.d.ts +65 -7
- package/config.d.ts +1 -1
- package/index.cjs +31 -37
- package/index.js +35 -35
- package/{modal-Vd0W6U05.cjs → modal-Cyt40iyH.cjs} +20 -17
- package/{modal-B9xclGji.js → modal-qidZ4ghL.js} +21 -18
- package/package.json +3 -3
- package/{pagination-BGHP7K6U.js → pagination-BDq1dOoH.js} +19 -19
- package/{pagination-BO6qrpA6.cjs → pagination-ChA90-py.cjs} +16 -16
- package/{progressbar-D8_F2wYh.js → progressbar-B0keLNtE.js} +10 -10
- package/{progressbar-Bi9aS9jg.cjs → progressbar-Fa1PDviu.cjs} +9 -9
- package/{rating-DRAx20tg.js → rating-CWOEBPWs.js} +7 -7
- package/{rating-DB4Ze-r4.cjs → rating-D5-3ELHv.cjs} +6 -6
- package/{select-CxX_TdVh.cjs → select-C4STYCmG.cjs} +6 -6
- package/{select-CEXxOyRB.js → select-DmgOBdqs.js} +6 -6
- package/{slider-CnK847iw.js → slider-CxodlRoZ.js} +9 -9
- package/{slider-Du37lWVJ.cjs → slider-MNZTN_vu.cjs} +8 -8
- package/{toast-Bvz7Uyrd.js → toast-3amUxqw1.js} +7 -7
- package/{toast-cd5__9Rl.cjs → toast-BXMjE9E3.cjs} +6 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const generated_config = require("./generated/config.cjs");
|
|
4
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
5
4
|
const types = require("@agnos-ui/react-headless/types");
|
|
6
5
|
const classNames = require("classnames");
|
|
6
|
+
const generated_config = require("./generated/config.cjs");
|
|
7
7
|
const React = require("react");
|
|
8
8
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
9
9
|
const pagination = require("@agnos-ui/core-bootstrap/components/pagination");
|
|
@@ -37,8 +37,8 @@ const NavButton = React__namespace.forwardRef(({ disabled, className, children,
|
|
|
37
37
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: classNames("page-item", { disabled }), children: /* @__PURE__ */ jsxRuntime.jsx("a", { ...directive.useDirectives(directive$1, [directive.classDirective, classNames("page-link", className)]), children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children }) }) });
|
|
38
38
|
});
|
|
39
39
|
NavButton.displayName = "NavButton";
|
|
40
|
-
const
|
|
41
|
-
const
|
|
40
|
+
const export_getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
|
|
41
|
+
const export_createPagination = pagination.createPagination;
|
|
42
42
|
function DefaultPages(slotContext) {
|
|
43
43
|
const { widget, state } = slotContext;
|
|
44
44
|
const jsxPages = [];
|
|
@@ -46,7 +46,7 @@ function DefaultPages(slotContext) {
|
|
|
46
46
|
if (state.pages[i] === -1) {
|
|
47
47
|
jsxPages.push(
|
|
48
48
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { className: "page-item disabled", children: [
|
|
49
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "page-link au-ellipsis", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "page-link au-ellipsis", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.ellipsisLabel, props: slotContext }) }),
|
|
50
50
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "visually-hidden", children: state.ariaEllipsisLabel })
|
|
51
51
|
] }, "Ellipsis" + i)
|
|
52
52
|
);
|
|
@@ -60,7 +60,7 @@ function DefaultPages(slotContext) {
|
|
|
60
60
|
activeLabel: state.activeLabel,
|
|
61
61
|
directive: widget.directives["pageLink"],
|
|
62
62
|
page: state.pages[i],
|
|
63
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
63
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.numberLabel, props: { ...slotContext, displayedPage: state.pages[i] } })
|
|
64
64
|
},
|
|
65
65
|
state.pages[i]
|
|
66
66
|
)
|
|
@@ -70,8 +70,8 @@ function DefaultPages(slotContext) {
|
|
|
70
70
|
return jsxPages.length ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxPages }) : null;
|
|
71
71
|
}
|
|
72
72
|
const defaultConfig = {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
pagesDisplay: DefaultPages,
|
|
74
|
+
structure: DefaultStructure
|
|
75
75
|
};
|
|
76
76
|
function DefaultStructure(slotContext) {
|
|
77
77
|
const { widget, state } = slotContext;
|
|
@@ -79,42 +79,42 @@ function DefaultStructure(slotContext) {
|
|
|
79
79
|
const ItemsAfter = [];
|
|
80
80
|
if (state.boundaryLinks) {
|
|
81
81
|
ItemsBefore.push(
|
|
82
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pageFirst"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pageFirst"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.firstPageLabel, props: slotContext }) }, "first")
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
if (state.directionLinks) {
|
|
86
86
|
ItemsBefore.push(
|
|
87
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pagePrev"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pagePrev"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.previousPageLabel, props: slotContext }) }, "prev")
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
if (state.directionLinks) {
|
|
91
91
|
ItemsAfter.push(
|
|
92
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageNext"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageNext"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.nextPageLabel, props: slotContext }) }, "next")
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
if (state.boundaryLinks) {
|
|
96
96
|
ItemsAfter.push(
|
|
97
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageLast"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
97
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageLast"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.lastPageLabel, props: slotContext }) }, "last")
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
101
101
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: classNames("au-pagination", "pagination", { [`pagination-${state.size}`]: !!state.size }, state.className), children: [
|
|
102
102
|
ItemsBefore,
|
|
103
|
-
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
103
|
+
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.pagesDisplay, props: slotContext }),
|
|
104
104
|
ItemsAfter
|
|
105
105
|
] }),
|
|
106
106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "polite", className: "visually-hidden", children: `${state.ariaLiveLabelText}` })
|
|
107
107
|
] });
|
|
108
108
|
}
|
|
109
109
|
function Pagination(props) {
|
|
110
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
110
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createPagination, props, "pagination", defaultConfig);
|
|
111
111
|
const slotContext = { state, widget: types.toSlotContextWidget(widget) };
|
|
112
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
112
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.structure, props: slotContext }) });
|
|
113
113
|
}
|
|
114
114
|
exports.DefaultPages = DefaultPages;
|
|
115
115
|
exports.DefaultStructure = DefaultStructure;
|
|
116
116
|
exports.NavButton = NavButton;
|
|
117
117
|
exports.PageItem = PageItem;
|
|
118
118
|
exports.Pagination = Pagination;
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
119
|
+
exports.export_createPagination = export_createPagination;
|
|
120
|
+
exports.export_getPaginationDefaultConfig = export_getPaginationDefaultConfig;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useWidgetWithConfig } from "./generated/config.js";
|
|
3
|
-
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
4
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
|
+
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
5
4
|
import { useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
6
5
|
import classNames from "classnames";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const
|
|
6
|
+
import { useWidgetWithConfig } from "./generated/config.js";
|
|
7
|
+
import { getProgressbarDefaultConfig, createProgressbar } from "@agnos-ui/core-bootstrap/components/progressbar";
|
|
8
|
+
const export_getProgressbarDefaultConfig = getProgressbarDefaultConfig;
|
|
9
|
+
const export_createProgressbar = createProgressbar;
|
|
10
10
|
function DefaultSlotContent(slotContext) {
|
|
11
11
|
const { striped, animated, type } = slotContext.state;
|
|
12
12
|
const classes = classNames("progress-bar", { "progress-bar-striped": striped }, { "progress-bar-animated": animated }, { [`text-bg-${type}`]: !!type });
|
|
13
13
|
return /* @__PURE__ */ jsx("div", { className: "progress", style: { height: slotContext.state.height || void 0 }, children: /* @__PURE__ */ jsx("div", { className: classes, style: { width: `${slotContext.state.percentage}%` }, children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.children, props: slotContext }) }) });
|
|
14
14
|
}
|
|
15
15
|
const defaultConfig = {
|
|
16
|
-
|
|
16
|
+
structure: DefaultSlotContent
|
|
17
17
|
};
|
|
18
18
|
const Progressbar = (props) => {
|
|
19
|
-
const [state, widget] = useWidgetWithConfig(
|
|
19
|
+
const [state, widget] = useWidgetWithConfig(export_createProgressbar, props, "progressbar", defaultConfig);
|
|
20
20
|
const slotContext = { state, widget: toSlotContextWidget(widget) };
|
|
21
|
-
return /* @__PURE__ */ jsx("div", { ...useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.
|
|
21
|
+
return /* @__PURE__ */ jsx("div", { ...useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.structure, props: slotContext }) });
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
24
|
Progressbar as P,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
export_createProgressbar as a,
|
|
26
|
+
export_getProgressbarDefaultConfig as e
|
|
27
27
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const generated_config = require("./generated/config.cjs");
|
|
4
|
-
const types = require("@agnos-ui/react-headless/types");
|
|
5
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
4
|
+
const types = require("@agnos-ui/react-headless/types");
|
|
6
5
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
7
6
|
const classNames = require("classnames");
|
|
7
|
+
const generated_config = require("./generated/config.cjs");
|
|
8
8
|
const progressbar = require("@agnos-ui/core-bootstrap/components/progressbar");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const export_getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
|
|
10
|
+
const export_createProgressbar = progressbar.createProgressbar;
|
|
11
11
|
function DefaultSlotContent(slotContext) {
|
|
12
12
|
const { striped, animated, type } = slotContext.state;
|
|
13
13
|
const classes = classNames("progress-bar", { "progress-bar-striped": striped }, { "progress-bar-animated": animated }, { [`text-bg-${type}`]: !!type });
|
|
14
14
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "progress", style: { height: slotContext.state.height || void 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, style: { width: `${slotContext.state.percentage}%` }, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.children, props: slotContext }) }) });
|
|
15
15
|
}
|
|
16
16
|
const defaultConfig = {
|
|
17
|
-
|
|
17
|
+
structure: DefaultSlotContent
|
|
18
18
|
};
|
|
19
19
|
const Progressbar = (props) => {
|
|
20
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
20
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createProgressbar, props, "progressbar", defaultConfig);
|
|
21
21
|
const slotContext = { state, widget: types.toSlotContextWidget(widget) };
|
|
22
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.
|
|
22
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.structure, props: slotContext }) });
|
|
23
23
|
};
|
|
24
24
|
exports.Progressbar = Progressbar;
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
25
|
+
exports.export_createProgressbar = export_createProgressbar;
|
|
26
|
+
exports.export_getProgressbarDefaultConfig = export_getProgressbarDefaultConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
3
|
-
import { useWidgetWithConfig } from "./generated/config.js";
|
|
4
3
|
import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
5
4
|
import React__default from "react";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const
|
|
5
|
+
import { useWidgetWithConfig } from "./generated/config.js";
|
|
6
|
+
import { getRatingDefaultConfig, createRating } from "@agnos-ui/core-bootstrap/components/rating";
|
|
7
|
+
const export_getRatingDefaultConfig = getRatingDefaultConfig;
|
|
8
|
+
const export_createRating = createRating;
|
|
9
9
|
function Star({ star, state, directive }) {
|
|
10
10
|
const arg = { index: star.index };
|
|
11
11
|
return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
@@ -18,7 +18,7 @@ function Star({ star, state, directive }) {
|
|
|
18
18
|
] }, star.index);
|
|
19
19
|
}
|
|
20
20
|
function Rating(props) {
|
|
21
|
-
const [state, widget] = useWidgetWithConfig(
|
|
21
|
+
const [state, widget] = useWidgetWithConfig(export_createRating, props, "rating");
|
|
22
22
|
const {
|
|
23
23
|
directives: { containerDirective, starDirective }
|
|
24
24
|
} = widget;
|
|
@@ -26,6 +26,6 @@ function Rating(props) {
|
|
|
26
26
|
}
|
|
27
27
|
export {
|
|
28
28
|
Rating as R,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
export_createRating as a,
|
|
30
|
+
export_getRatingDefaultConfig as e
|
|
31
31
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
4
|
-
const generated_config = require("./generated/config.cjs");
|
|
5
4
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
6
5
|
const React = require("react");
|
|
6
|
+
const generated_config = require("./generated/config.cjs");
|
|
7
7
|
const rating = require("@agnos-ui/core-bootstrap/components/rating");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const export_getRatingDefaultConfig = rating.getRatingDefaultConfig;
|
|
9
|
+
const export_createRating = rating.createRating;
|
|
10
10
|
function Star({ star, state, directive: directive$1 }) {
|
|
11
11
|
const arg = { index: star.index };
|
|
12
12
|
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
@@ -19,12 +19,12 @@ function Star({ star, state, directive: directive$1 }) {
|
|
|
19
19
|
] }, star.index);
|
|
20
20
|
}
|
|
21
21
|
function Rating(props) {
|
|
22
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
22
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createRating, props, "rating");
|
|
23
23
|
const {
|
|
24
24
|
directives: { containerDirective, starDirective }
|
|
25
25
|
} = widget;
|
|
26
26
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "d-inline-flex"], containerDirective), children: state.stars.map((star) => /* @__PURE__ */ jsxRuntime.jsx(Star, { star, state, directive: starDirective }, star.index)) });
|
|
27
27
|
}
|
|
28
28
|
exports.Rating = Rating;
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
29
|
+
exports.export_createRating = export_createRating;
|
|
30
|
+
exports.export_getRatingDefaultConfig = export_getRatingDefaultConfig;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const select = require("@agnos-ui/core-bootstrap/components/select");
|
|
4
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
5
4
|
const types = require("@agnos-ui/react-headless/types");
|
|
6
5
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
7
6
|
const classNames = require("classnames");
|
|
8
7
|
const generated_config = require("./generated/config.cjs");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const select = require("@agnos-ui/core-bootstrap/components/select");
|
|
9
|
+
const export_getSelectDefaultConfig = select.getSelectDefaultConfig;
|
|
10
|
+
const export_createSelect = select.createSelect;
|
|
11
11
|
function DefaultBadge(slotContext) {
|
|
12
12
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "" + slotContext.itemContext.item });
|
|
13
13
|
}
|
|
@@ -41,7 +41,7 @@ const defaultConfig = {
|
|
|
41
41
|
itemLabel: DefaultItem
|
|
42
42
|
};
|
|
43
43
|
function Select(props) {
|
|
44
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
44
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createSelect, props, "select", defaultConfig);
|
|
45
45
|
const slotContext = { state, widget: types.toSlotContextWidget(widget) };
|
|
46
46
|
const { id, ariaLabel, visibleItems, filterText, open, className } = state;
|
|
47
47
|
const menuId = `${id}-menu`;
|
|
@@ -72,5 +72,5 @@ function Select(props) {
|
|
|
72
72
|
] });
|
|
73
73
|
}
|
|
74
74
|
exports.Select = Select;
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
75
|
+
exports.export_createSelect = export_createSelect;
|
|
76
|
+
exports.export_getSelectDefaultConfig = export_getSelectDefaultConfig;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { createSelect as createSelect$1, getSelectDefaultConfig as getSelectDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/select";
|
|
3
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
4
3
|
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
5
4
|
import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
6
5
|
import classNames from "classnames";
|
|
7
6
|
import { useWidgetWithConfig } from "./generated/config.js";
|
|
8
|
-
|
|
9
|
-
const
|
|
7
|
+
import { getSelectDefaultConfig, createSelect } from "@agnos-ui/core-bootstrap/components/select";
|
|
8
|
+
const export_getSelectDefaultConfig = getSelectDefaultConfig;
|
|
9
|
+
const export_createSelect = createSelect;
|
|
10
10
|
function DefaultBadge(slotContext) {
|
|
11
11
|
return /* @__PURE__ */ jsx(Fragment, { children: "" + slotContext.itemContext.item });
|
|
12
12
|
}
|
|
@@ -40,7 +40,7 @@ const defaultConfig = {
|
|
|
40
40
|
itemLabel: DefaultItem
|
|
41
41
|
};
|
|
42
42
|
function Select(props) {
|
|
43
|
-
const [state, widget] = useWidgetWithConfig(
|
|
43
|
+
const [state, widget] = useWidgetWithConfig(export_createSelect, props, "select", defaultConfig);
|
|
44
44
|
const slotContext = { state, widget: toSlotContextWidget(widget) };
|
|
45
45
|
const { id, ariaLabel, visibleItems, filterText, open, className } = state;
|
|
46
46
|
const menuId = `${id}-menu`;
|
|
@@ -72,6 +72,6 @@ function Select(props) {
|
|
|
72
72
|
}
|
|
73
73
|
export {
|
|
74
74
|
Select as S,
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
export_createSelect as a,
|
|
76
|
+
export_getSelectDefaultConfig as e
|
|
77
77
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useWidgetWithConfig } from "./generated/config.js";
|
|
2
|
+
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
4
3
|
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
4
|
+
import { useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
5
5
|
import React__default from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
import { useWidgetWithConfig } from "./generated/config.js";
|
|
7
|
+
import { getSliderDefaultConfig, createSlider } from "@agnos-ui/core-bootstrap/components/slider";
|
|
8
|
+
const export_getSliderDefaultConfig = getSliderDefaultConfig;
|
|
9
|
+
const export_createSlider = createSlider;
|
|
10
10
|
const DefaultSlotHandle = (slotContext) => {
|
|
11
11
|
return /* @__PURE__ */ jsx("button", { ...useDirective(slotContext.widget.directives.handleDirective, { item: slotContext.item }), children: " " });
|
|
12
12
|
};
|
|
@@ -48,7 +48,7 @@ const defaultConfig = {
|
|
|
48
48
|
handle: DefaultSlotHandle
|
|
49
49
|
};
|
|
50
50
|
function Slider(props) {
|
|
51
|
-
const [state, widget] = useWidgetWithConfig(
|
|
51
|
+
const [state, widget] = useWidgetWithConfig(export_createSlider, props, "slider", { ...defaultConfig });
|
|
52
52
|
const slotContext = { state, widget: toSlotContextWidget(widget) };
|
|
53
53
|
return /* @__PURE__ */ jsx("div", { ...useDirective(widget.directives.sliderDirective), children: /* @__PURE__ */ jsx(Slot, { slotContent: state.structure, props: slotContext }) });
|
|
54
54
|
}
|
|
@@ -56,6 +56,6 @@ export {
|
|
|
56
56
|
DefaultSlotHandle as D,
|
|
57
57
|
Slider as S,
|
|
58
58
|
DefaultSlotStructure as a,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
export_createSlider as b,
|
|
60
|
+
export_getSliderDefaultConfig as e
|
|
61
61
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const
|
|
4
|
-
const generated_config = require("./generated/config.cjs");
|
|
3
|
+
const slot = require("@agnos-ui/react-headless/slot");
|
|
5
4
|
const types = require("@agnos-ui/react-headless/types");
|
|
5
|
+
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
6
6
|
const React = require("react");
|
|
7
|
-
const
|
|
7
|
+
const generated_config = require("./generated/config.cjs");
|
|
8
8
|
const slider = require("@agnos-ui/core-bootstrap/components/slider");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const export_getSliderDefaultConfig = slider.getSliderDefaultConfig;
|
|
10
|
+
const export_createSlider = slider.createSlider;
|
|
11
11
|
const DefaultSlotHandle = (slotContext) => {
|
|
12
12
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirective(slotContext.widget.directives.handleDirective, { item: slotContext.item }), children: " " });
|
|
13
13
|
};
|
|
@@ -49,12 +49,12 @@ const defaultConfig = {
|
|
|
49
49
|
handle: DefaultSlotHandle
|
|
50
50
|
};
|
|
51
51
|
function Slider(props) {
|
|
52
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
52
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createSlider, props, "slider", { ...defaultConfig });
|
|
53
53
|
const slotContext = { state, widget: types.toSlotContextWidget(widget) };
|
|
54
54
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(widget.directives.sliderDirective), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.structure, props: slotContext }) });
|
|
55
55
|
}
|
|
56
56
|
exports.DefaultSlotHandle = DefaultSlotHandle;
|
|
57
57
|
exports.DefaultSlotStructure = DefaultSlotStructure;
|
|
58
58
|
exports.Slider = Slider;
|
|
59
|
-
exports.
|
|
60
|
-
exports.
|
|
59
|
+
exports.export_createSlider = export_createSlider;
|
|
60
|
+
exports.export_getSliderDefaultConfig = export_getSliderDefaultConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useWidgetWithConfig } from "./generated/config.js";
|
|
3
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
4
3
|
import { useDirectives, classDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
5
4
|
import { forwardRef, useImperativeHandle } from "react";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const
|
|
5
|
+
import { useWidgetWithConfig } from "./generated/config.js";
|
|
6
|
+
import { getToastDefaultConfig, createToast } from "@agnos-ui/core-bootstrap/components/toast";
|
|
7
|
+
const export_getToastDefaultConfig = getToastDefaultConfig;
|
|
8
|
+
const export_createToast = createToast;
|
|
9
9
|
const ToastHeader = (slotContext) => /* @__PURE__ */ jsxs("div", { className: "toast-header", children: [
|
|
10
10
|
/* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.header, props: slotContext }),
|
|
11
11
|
slotContext.state.dismissible && /* @__PURE__ */ jsx("button", { ...useDirectives([classDirective, "btn-close me-0 ms-auto"], slotContext.widget.directives.closeButtonDirective) })
|
|
@@ -32,7 +32,7 @@ const ToastElement = (slotContext) => /* @__PURE__ */ jsx(
|
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
const Toast = forwardRef(function Toast2(props, ref) {
|
|
35
|
-
const [state, widget] = useWidgetWithConfig(
|
|
35
|
+
const [state, widget] = useWidgetWithConfig(export_createToast, props, "toast", { ...defaultConfig, children: props.children });
|
|
36
36
|
useImperativeHandle(ref, () => widget.api, []);
|
|
37
37
|
const slotContext = {
|
|
38
38
|
state,
|
|
@@ -42,6 +42,6 @@ const Toast = forwardRef(function Toast2(props, ref) {
|
|
|
42
42
|
});
|
|
43
43
|
export {
|
|
44
44
|
Toast as T,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
export_createToast as a,
|
|
46
|
+
export_getToastDefaultConfig as e
|
|
47
47
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const generated_config = require("./generated/config.cjs");
|
|
4
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
5
4
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
6
5
|
const React = require("react");
|
|
6
|
+
const generated_config = require("./generated/config.cjs");
|
|
7
7
|
const toast = require("@agnos-ui/core-bootstrap/components/toast");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const export_getToastDefaultConfig = toast.getToastDefaultConfig;
|
|
9
|
+
const export_createToast = toast.createToast;
|
|
10
10
|
const ToastHeader = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "toast-header", children: [
|
|
11
11
|
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.header, props: slotContext }),
|
|
12
12
|
slotContext.state.dismissible && /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirectives([directive.classDirective, "btn-close me-0 ms-auto"], slotContext.widget.directives.closeButtonDirective) })
|
|
@@ -33,7 +33,7 @@ const ToastElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
const Toast = React.forwardRef(function Toast2(props, ref) {
|
|
36
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
36
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createToast, props, "toast", { ...defaultConfig, children: props.children });
|
|
37
37
|
React.useImperativeHandle(ref, () => widget.api, []);
|
|
38
38
|
const slotContext = {
|
|
39
39
|
state,
|
|
@@ -42,5 +42,5 @@ const Toast = React.forwardRef(function Toast2(props, ref) {
|
|
|
42
42
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !state.hidden && /* @__PURE__ */ jsxRuntime.jsx(ToastElement, { ...slotContext }) });
|
|
43
43
|
});
|
|
44
44
|
exports.Toast = Toast;
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
45
|
+
exports.export_createToast = export_createToast;
|
|
46
|
+
exports.export_getToastDefaultConfig = export_getToastDefaultConfig;
|