@agnos-ui/react-bootstrap 0.3.1 → 0.4.0-next.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-Bpx0new2.js → accordion-CMbgQzoG.js} +12 -10
- package/{accordion-BaQCaLLI.cjs → accordion-DnlQmoOX.cjs} +9 -7
- package/{alert-DOBOL4nD.cjs → alert-Bn5ooyqK.cjs} +9 -17
- package/{alert-DWq65Emo.js → alert-DKl7HLhb.js} +11 -19
- package/components/accordion/accordion.d.ts +6 -12
- package/components/accordion/accordion.gen.d.ts +343 -0
- package/components/accordion/index.cjs +3 -9
- package/components/accordion/index.js +5 -4
- package/components/alert/alert.d.ts +6 -9
- package/components/alert/alert.gen.d.ts +119 -0
- package/components/alert/index.cjs +2 -9
- package/components/alert/index.js +3 -3
- package/components/modal/index.cjs +10 -8
- package/components/modal/index.js +5 -2
- package/components/modal/modal.d.ts +7 -9
- package/components/modal/modal.gen.d.ts +239 -0
- package/components/pagination/index.cjs +2 -9
- package/components/pagination/index.js +3 -3
- package/components/pagination/pagination.d.ts +4 -7
- package/components/pagination/pagination.gen.d.ts +394 -0
- package/components/progressbar/index.cjs +2 -9
- package/components/progressbar/index.js +3 -3
- package/components/progressbar/progressbar.d.ts +5 -8
- package/components/progressbar/progressbar.gen.d.ts +126 -0
- package/components/rating/index.cjs +2 -9
- package/components/rating/index.js +3 -3
- package/components/rating/rating.d.ts +4 -5
- package/components/rating/rating.gen.d.ts +179 -0
- package/components/select/index.cjs +2 -9
- package/components/select/index.js +3 -3
- package/components/select/select.d.ts +4 -7
- package/components/select/select.gen.d.ts +293 -0
- package/components/slider/index.cjs +2 -9
- package/components/slider/index.js +3 -3
- package/components/slider/slider.d.ts +4 -8
- package/components/slider/slider.gen.d.ts +293 -0
- package/components/toast/index.cjs +2 -9
- package/components/toast/index.js +3 -3
- package/components/toast/toast.d.ts +6 -9
- package/components/toast/toast.gen.d.ts +146 -0
- package/config.d.ts +3 -4
- package/config.gen.d.ts +47 -0
- package/generated/config.cjs +4 -5
- package/generated/services/extendWidget.cjs +4 -5
- package/generated/services/floatingUI.cjs +4 -5
- package/generated/services/focustrack.cjs +4 -5
- package/generated/services/hash.cjs +4 -5
- package/generated/services/intersection.cjs +4 -5
- package/generated/services/matchMedia.cjs +4 -5
- package/generated/services/navManager.cjs +4 -5
- package/generated/services/portal.cjs +4 -5
- package/generated/services/resizeObserver.cjs +4 -5
- package/generated/services/siblingsInert.cjs +4 -5
- package/generated/services/transitions/baseTransitions.cjs +4 -5
- package/generated/services/transitions/bootstrap.cjs +4 -5
- package/generated/services/transitions/collapse.cjs +4 -5
- package/generated/services/transitions/cssTransitions.cjs +4 -5
- package/generated/services/transitions/simpleClassTransition.cjs +4 -5
- package/generated/slot.cjs +4 -5
- package/generated/types.cjs +4 -5
- package/generated/utils/directive.cjs +4 -5
- package/generated/utils/portal.cjs +4 -5
- package/generated/utils/stores.cjs +4 -5
- package/generated/utils/widget.cjs +4 -5
- package/generated/utils/writables.cjs +4 -5
- package/index.cjs +120 -196
- package/index.js +24 -20
- package/{modal-B6rJgzVm.js → modal-B9xclGji.js} +8 -5
- package/{modal-2qAV4Hjl.cjs → modal-Vd0W6U05.cjs} +7 -4
- package/package.json +6 -6
- package/{pagination-X2bugeX-.js → pagination-BGHP7K6U.js} +5 -3
- package/{pagination-CKUbq-OI.cjs → pagination-BO6qrpA6.cjs} +3 -1
- package/{progressbar-D-yo9AHH.cjs → progressbar-Bi9aS9jg.cjs} +4 -2
- package/{progressbar-D1-6Dzrf.js → progressbar-D8_F2wYh.js} +6 -4
- package/{rating-D2Ajh4vg.cjs → rating-DB4Ze-r4.cjs} +3 -2
- package/{rating-Cvad2Z2H.js → rating-DRAx20tg.js} +5 -4
- package/{select-B_Thv-qd.js → select-CEXxOyRB.js} +8 -6
- package/{select-DHik5ocI.cjs → select-CxX_TdVh.cjs} +6 -4
- package/{slider-DLdA-y4u.js → slider-CnK847iw.js} +15 -13
- package/{slider-DUv6gRI9.cjs → slider-Du37lWVJ.cjs} +13 -11
- package/{toast-BUiyh5r_.js → toast-Bvz7Uyrd.js} +12 -10
- package/{toast-Dp_zjIff.cjs → toast-cd5__9Rl.cjs} +10 -8
|
@@ -3,35 +3,36 @@ import { useWidgetWithConfig } from "./generated/config.js";
|
|
|
3
3
|
import { Slot } from "@agnos-ui/react-headless/slot";
|
|
4
4
|
import { useDirectives, classDirective } from "@agnos-ui/react-headless/utils/directive";
|
|
5
5
|
import { forwardRef, useImperativeHandle } from "react";
|
|
6
|
-
import { createToast as createToast$1 } from "@agnos-ui/core-bootstrap/components/toast";
|
|
6
|
+
import { createToast as createToast$1, getToastDefaultConfig as getToastDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/toast";
|
|
7
7
|
const createToast = createToast$1;
|
|
8
|
+
const getToastDefaultConfig = getToastDefaultConfig$1;
|
|
8
9
|
const ToastHeader = (slotContext) => /* @__PURE__ */ jsxs("div", { className: "toast-header", children: [
|
|
9
|
-
/* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.
|
|
10
|
+
/* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.header, props: slotContext }),
|
|
10
11
|
slotContext.state.dismissible && /* @__PURE__ */ jsx("button", { ...useDirectives([classDirective, "btn-close me-0 ms-auto"], slotContext.widget.directives.closeButtonDirective) })
|
|
11
12
|
] });
|
|
12
13
|
const ToastCloseButtonNoHeader = (slotContext) => /* @__PURE__ */ jsx("button", { ...useDirectives([classDirective, "btn-close btn-close-white me-2 m-auto"], slotContext.widget.directives.closeButtonDirective) });
|
|
13
14
|
const DefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14
|
-
slotContext.state.
|
|
15
|
-
/* @__PURE__ */ jsx("div", { className: "toast-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.
|
|
16
|
-
slotContext.state.dismissible && !slotContext.state.
|
|
15
|
+
slotContext.state.header && /* @__PURE__ */ jsx(ToastHeader, { ...slotContext }),
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: "toast-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.children, props: slotContext }) }),
|
|
17
|
+
slotContext.state.dismissible && !slotContext.state.header && /* @__PURE__ */ jsx(ToastCloseButtonNoHeader, { ...slotContext })
|
|
17
18
|
] });
|
|
18
19
|
const defaultConfig = {
|
|
19
|
-
|
|
20
|
+
structure: DefaultSlotStructure
|
|
20
21
|
};
|
|
21
22
|
const ToastElement = (slotContext) => /* @__PURE__ */ jsx(
|
|
22
23
|
"div",
|
|
23
24
|
{
|
|
24
25
|
...useDirectives(
|
|
25
|
-
[classDirective, `toast ${slotContext.state.dismissible ? "toast-dismissible" : ""} ${!slotContext.state.
|
|
26
|
+
[classDirective, `toast ${slotContext.state.dismissible ? "toast-dismissible" : ""} ${!slotContext.state.header ? "d-flex" : ""}`],
|
|
26
27
|
slotContext.widget.directives.transitionDirective,
|
|
27
28
|
slotContext.widget.directives.autoHideDirective,
|
|
28
29
|
slotContext.widget.directives.bodyDirective
|
|
29
30
|
),
|
|
30
|
-
children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.
|
|
31
|
+
children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.structure, props: slotContext })
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
const Toast = forwardRef(function Toast2(props, ref) {
|
|
34
|
-
const [state, widget] = useWidgetWithConfig(createToast, props, "toast", { ...defaultConfig,
|
|
35
|
+
const [state, widget] = useWidgetWithConfig(createToast, props, "toast", { ...defaultConfig, children: props.children });
|
|
35
36
|
useImperativeHandle(ref, () => widget.api, []);
|
|
36
37
|
const slotContext = {
|
|
37
38
|
state,
|
|
@@ -41,5 +42,6 @@ const Toast = forwardRef(function Toast2(props, ref) {
|
|
|
41
42
|
});
|
|
42
43
|
export {
|
|
43
44
|
Toast as T,
|
|
44
|
-
createToast as c
|
|
45
|
+
createToast as c,
|
|
46
|
+
getToastDefaultConfig as g
|
|
45
47
|
};
|
|
@@ -6,33 +6,34 @@ const directive = require("@agnos-ui/react-headless/utils/directive");
|
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const toast = require("@agnos-ui/core-bootstrap/components/toast");
|
|
8
8
|
const createToast = toast.createToast;
|
|
9
|
+
const getToastDefaultConfig = toast.getToastDefaultConfig;
|
|
9
10
|
const ToastHeader = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "toast-header", children: [
|
|
10
|
-
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.header, props: slotContext }),
|
|
11
12
|
slotContext.state.dismissible && /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirectives([directive.classDirective, "btn-close me-0 ms-auto"], slotContext.widget.directives.closeButtonDirective) })
|
|
12
13
|
] });
|
|
13
14
|
const ToastCloseButtonNoHeader = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx("button", { ...directive.useDirectives([directive.classDirective, "btn-close btn-close-white me-2 m-auto"], slotContext.widget.directives.closeButtonDirective) });
|
|
14
15
|
const DefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15
|
-
slotContext.state.
|
|
16
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "toast-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.
|
|
17
|
-
slotContext.state.dismissible && !slotContext.state.
|
|
16
|
+
slotContext.state.header && /* @__PURE__ */ jsxRuntime.jsx(ToastHeader, { ...slotContext }),
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "toast-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.children, props: slotContext }) }),
|
|
18
|
+
slotContext.state.dismissible && !slotContext.state.header && /* @__PURE__ */ jsxRuntime.jsx(ToastCloseButtonNoHeader, { ...slotContext })
|
|
18
19
|
] });
|
|
19
20
|
const defaultConfig = {
|
|
20
|
-
|
|
21
|
+
structure: DefaultSlotStructure
|
|
21
22
|
};
|
|
22
23
|
const ToastElement = (slotContext) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
...directive.useDirectives(
|
|
26
|
-
[directive.classDirective, `toast ${slotContext.state.dismissible ? "toast-dismissible" : ""} ${!slotContext.state.
|
|
27
|
+
[directive.classDirective, `toast ${slotContext.state.dismissible ? "toast-dismissible" : ""} ${!slotContext.state.header ? "d-flex" : ""}`],
|
|
27
28
|
slotContext.widget.directives.transitionDirective,
|
|
28
29
|
slotContext.widget.directives.autoHideDirective,
|
|
29
30
|
slotContext.widget.directives.bodyDirective
|
|
30
31
|
),
|
|
31
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.
|
|
32
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.structure, props: slotContext })
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
35
|
const Toast = React.forwardRef(function Toast2(props, ref) {
|
|
35
|
-
const [state, widget] = generated_config.useWidgetWithConfig(createToast, props, "toast", { ...defaultConfig,
|
|
36
|
+
const [state, widget] = generated_config.useWidgetWithConfig(createToast, props, "toast", { ...defaultConfig, children: props.children });
|
|
36
37
|
React.useImperativeHandle(ref, () => widget.api, []);
|
|
37
38
|
const slotContext = {
|
|
38
39
|
state,
|
|
@@ -42,3 +43,4 @@ const Toast = React.forwardRef(function Toast2(props, ref) {
|
|
|
42
43
|
});
|
|
43
44
|
exports.Toast = Toast;
|
|
44
45
|
exports.createToast = createToast;
|
|
46
|
+
exports.getToastDefaultConfig = getToastDefaultConfig;
|