@agnos-ui/react-bootstrap 0.4.0-next.1 → 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 +123 -23
- 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 +188 -18
- 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 +54 -1
- 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-1m6cSYmZ.cjs → modal-Cyt40iyH.cjs} +14 -11
- package/{modal-BJy1upw0.js → modal-qidZ4ghL.js} +15 -12
- package/package.json +3 -3
- package/{pagination-B76wbKhG.js → pagination-BDq1dOoH.js} +9 -9
- package/{pagination-DeZ2Eb3e.cjs → pagination-ChA90-py.cjs} +6 -6
- package/{progressbar-UDs4TPtQ.js → progressbar-B0keLNtE.js} +8 -8
- package/{progressbar-DKshX5DJ.cjs → progressbar-Fa1PDviu.cjs} +7 -7
- 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,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const portal = require("@agnos-ui/react-headless/utils/portal");
|
|
4
|
-
const types = require("@agnos-ui/react-headless/types");
|
|
5
3
|
const slot = require("@agnos-ui/react-headless/slot");
|
|
6
|
-
const
|
|
4
|
+
const types = require("@agnos-ui/react-headless/types");
|
|
7
5
|
const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
8
|
-
const
|
|
6
|
+
const portal = require("@agnos-ui/react-headless/utils/portal");
|
|
7
|
+
const classNames = require("classnames");
|
|
9
8
|
const React = require("react");
|
|
9
|
+
const ReactDOM = require("react-dom/client");
|
|
10
|
+
const generated_config = require("./generated/config.cjs");
|
|
10
11
|
const modal = require("@agnos-ui/core-bootstrap/components/modal");
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const export_getModalDefaultConfig = modal.getModalDefaultConfig;
|
|
13
|
+
const export_createModal = modal.createModal;
|
|
14
|
+
const export_modalOutsideClick = modal.modalOutsideClick;
|
|
15
|
+
const export_modalCloseButtonClick = modal.modalCloseButtonClick;
|
|
15
16
|
const CloseButton = ({ directive: directive$1 }) => /* @__PURE__ */ jsxRuntime.jsx("button", { className: "btn-close", ...directive.useDirective(directive$1) });
|
|
16
17
|
const DefaultSlotHeader = (slotContext) => {
|
|
17
18
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -34,7 +35,7 @@ const ModalElement = (slotContext) => {
|
|
|
34
35
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "modal d-block"], slotContext.widget.directives.modalDirective), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames("modal-dialog", { "modal-fullscreen": fullscreen }), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-content", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.structure, props: slotContext }) }) }) });
|
|
35
36
|
};
|
|
36
37
|
const Modal = React.forwardRef(function Modal2(props, ref) {
|
|
37
|
-
const [state, widget] = generated_config.useWidgetWithConfig(
|
|
38
|
+
const [state, widget] = generated_config.useWidgetWithConfig(export_createModal, props, "modal", defaultConfig);
|
|
38
39
|
React.useImperativeHandle(ref, () => widget.api, []);
|
|
39
40
|
const slotContext = {
|
|
40
41
|
state,
|
|
@@ -57,6 +58,8 @@ async function openModal(options) {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
exports.Modal = Modal;
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
61
|
+
exports.export_createModal = export_createModal;
|
|
62
|
+
exports.export_getModalDefaultConfig = export_getModalDefaultConfig;
|
|
63
|
+
exports.export_modalCloseButtonClick = export_modalCloseButtonClick;
|
|
64
|
+
exports.export_modalOutsideClick = export_modalOutsideClick;
|
|
62
65
|
exports.openModal = openModal;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from "@agnos-ui/react-headless/utils/portal";
|
|
3
|
-
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
4
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
5
|
-
import {
|
|
3
|
+
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
6
4
|
import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
7
|
-
import
|
|
8
|
-
import { forwardRef, useImperativeHandle } from "react";
|
|
9
|
-
import { createModal as createModal$1, getModalDefaultConfig as getModalDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/modal";
|
|
5
|
+
import { Portal } from "@agnos-ui/react-headless/utils/portal";
|
|
10
6
|
import classNames from "classnames";
|
|
11
|
-
import "
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import { forwardRef, useImperativeHandle } from "react";
|
|
8
|
+
import ReactDOM from "react-dom/client";
|
|
9
|
+
import { useWidgetWithConfig } from "./generated/config.js";
|
|
10
|
+
import { getModalDefaultConfig, createModal, modalOutsideClick, modalCloseButtonClick } from "@agnos-ui/core-bootstrap/components/modal";
|
|
11
|
+
const export_getModalDefaultConfig = getModalDefaultConfig;
|
|
12
|
+
const export_createModal = createModal;
|
|
13
|
+
const export_modalOutsideClick = modalOutsideClick;
|
|
14
|
+
const export_modalCloseButtonClick = modalCloseButtonClick;
|
|
14
15
|
const CloseButton = ({ directive }) => /* @__PURE__ */ jsx("button", { className: "btn-close", ...useDirective(directive) });
|
|
15
16
|
const DefaultSlotHeader = (slotContext) => {
|
|
16
17
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -33,7 +34,7 @@ const ModalElement = (slotContext) => {
|
|
|
33
34
|
return /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "modal d-block"], slotContext.widget.directives.modalDirective), children: /* @__PURE__ */ jsx("div", { className: classNames("modal-dialog", { "modal-fullscreen": fullscreen }), children: /* @__PURE__ */ jsx("div", { className: "modal-content", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.structure, props: slotContext }) }) }) });
|
|
34
35
|
};
|
|
35
36
|
const Modal = forwardRef(function Modal2(props, ref) {
|
|
36
|
-
const [state, widget] = useWidgetWithConfig(
|
|
37
|
+
const [state, widget] = useWidgetWithConfig(export_createModal, props, "modal", defaultConfig);
|
|
37
38
|
useImperativeHandle(ref, () => widget.api, []);
|
|
38
39
|
const slotContext = {
|
|
39
40
|
state,
|
|
@@ -57,7 +58,9 @@ async function openModal(options) {
|
|
|
57
58
|
}
|
|
58
59
|
export {
|
|
59
60
|
Modal as M,
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
export_createModal as a,
|
|
62
|
+
export_modalOutsideClick as b,
|
|
63
|
+
export_modalCloseButtonClick as c,
|
|
64
|
+
export_getModalDefaultConfig as e,
|
|
62
65
|
openModal as o
|
|
63
66
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/react-bootstrap",
|
|
3
3
|
"description": "Bootstrap-based widget library for React.",
|
|
4
|
-
"version": "0.4.0
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core-bootstrap": "0.4.0
|
|
53
|
-
"@agnos-ui/react-headless": "0.4.0
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.4.0",
|
|
53
|
+
"@agnos-ui/react-headless": "0.4.0",
|
|
54
54
|
"classnames": "^2.5.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useWidgetWithConfig } from "./generated/config.js";
|
|
3
2
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
4
3
|
import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
|
|
5
4
|
import classNames from "classnames";
|
|
5
|
+
import { useWidgetWithConfig } from "./generated/config.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { useDirectives, classDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
8
|
-
import {
|
|
8
|
+
import { getPaginationDefaultConfig, createPagination } from "@agnos-ui/core-bootstrap/components/pagination";
|
|
9
9
|
const PageItem = React.forwardRef(
|
|
10
10
|
({ disabled, active, activeLabel, className, children, directive, page }, ref) => {
|
|
11
11
|
return /* @__PURE__ */ jsx("li", { ref, className: classNames("page-item", { active, disabled }), children: /* @__PURE__ */ jsxs("a", { ...useDirectives([directive, { page }], [classDirective, classNames("page-link", className)]), children: [
|
|
@@ -19,8 +19,8 @@ const NavButton = React.forwardRef(({ disabled, className, children, directive }
|
|
|
19
19
|
return /* @__PURE__ */ jsx("li", { ref, className: classNames("page-item", { disabled }), children: /* @__PURE__ */ jsx("a", { ...useDirectives(directive, [classDirective, classNames("page-link", className)]), children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children }) }) });
|
|
20
20
|
});
|
|
21
21
|
NavButton.displayName = "NavButton";
|
|
22
|
-
const
|
|
23
|
-
const
|
|
22
|
+
const export_getPaginationDefaultConfig = getPaginationDefaultConfig;
|
|
23
|
+
const export_createPagination = createPagination;
|
|
24
24
|
function DefaultPages(slotContext) {
|
|
25
25
|
const { widget, state } = slotContext;
|
|
26
26
|
const jsxPages = [];
|
|
@@ -89,16 +89,16 @@ function DefaultStructure(slotContext) {
|
|
|
89
89
|
] });
|
|
90
90
|
}
|
|
91
91
|
function Pagination(props) {
|
|
92
|
-
const [state, widget] = useWidgetWithConfig(
|
|
92
|
+
const [state, widget] = useWidgetWithConfig(export_createPagination, props, "pagination", defaultConfig);
|
|
93
93
|
const slotContext = { state, widget: toSlotContextWidget(widget) };
|
|
94
94
|
return /* @__PURE__ */ jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.structure, props: slotContext }) });
|
|
95
95
|
}
|
|
96
96
|
export {
|
|
97
97
|
DefaultPages as D,
|
|
98
98
|
NavButton as N,
|
|
99
|
-
|
|
99
|
+
PageItem as P,
|
|
100
100
|
DefaultStructure as a,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
Pagination as b,
|
|
102
|
+
export_createPagination as c,
|
|
103
|
+
export_getPaginationDefaultConfig as e
|
|
104
104
|
};
|
|
@@ -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 = [];
|
|
@@ -107,7 +107,7 @@ function DefaultStructure(slotContext) {
|
|
|
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
112
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.structure, props: slotContext }) });
|
|
113
113
|
}
|
|
@@ -116,5 +116,5 @@ 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,12 +1,12 @@
|
|
|
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 });
|
|
@@ -16,12 +16,12 @@ 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
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,13 +1,13 @@
|
|
|
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 });
|
|
@@ -17,10 +17,10 @@ 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
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;
|