@agnos-ui/react-bootstrap 0.3.0 → 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.
Files changed (82) hide show
  1. package/{accordion-Bpx0new2.js → accordion-CMbgQzoG.js} +12 -10
  2. package/{accordion-BaQCaLLI.cjs → accordion-DnlQmoOX.cjs} +9 -7
  3. package/{alert-DOBOL4nD.cjs → alert-Bn5ooyqK.cjs} +9 -17
  4. package/{alert-DWq65Emo.js → alert-DKl7HLhb.js} +11 -19
  5. package/components/accordion/accordion.d.ts +6 -12
  6. package/components/accordion/accordion.gen.d.ts +343 -0
  7. package/components/accordion/index.cjs +3 -9
  8. package/components/accordion/index.js +5 -4
  9. package/components/alert/alert.d.ts +6 -9
  10. package/components/alert/alert.gen.d.ts +119 -0
  11. package/components/alert/index.cjs +2 -9
  12. package/components/alert/index.js +3 -3
  13. package/components/modal/index.cjs +10 -8
  14. package/components/modal/index.js +5 -2
  15. package/components/modal/modal.d.ts +7 -9
  16. package/components/modal/modal.gen.d.ts +239 -0
  17. package/components/pagination/index.cjs +2 -9
  18. package/components/pagination/index.js +3 -3
  19. package/components/pagination/pagination.d.ts +4 -7
  20. package/components/pagination/pagination.gen.d.ts +394 -0
  21. package/components/progressbar/index.cjs +2 -9
  22. package/components/progressbar/index.js +3 -3
  23. package/components/progressbar/progressbar.d.ts +5 -8
  24. package/components/progressbar/progressbar.gen.d.ts +126 -0
  25. package/components/rating/index.cjs +2 -9
  26. package/components/rating/index.js +3 -3
  27. package/components/rating/rating.d.ts +4 -5
  28. package/components/rating/rating.gen.d.ts +179 -0
  29. package/components/select/index.cjs +2 -9
  30. package/components/select/index.js +3 -3
  31. package/components/select/select.d.ts +4 -7
  32. package/components/select/select.gen.d.ts +293 -0
  33. package/components/slider/index.cjs +2 -9
  34. package/components/slider/index.js +3 -3
  35. package/components/slider/slider.d.ts +4 -8
  36. package/components/slider/slider.gen.d.ts +293 -0
  37. package/components/toast/index.cjs +2 -9
  38. package/components/toast/index.js +3 -3
  39. package/components/toast/toast.d.ts +6 -9
  40. package/components/toast/toast.gen.d.ts +146 -0
  41. package/config.d.ts +3 -4
  42. package/config.gen.d.ts +47 -0
  43. package/generated/config.cjs +4 -5
  44. package/generated/services/extendWidget.cjs +4 -5
  45. package/generated/services/floatingUI.cjs +4 -5
  46. package/generated/services/focustrack.cjs +4 -5
  47. package/generated/services/hash.cjs +4 -5
  48. package/generated/services/intersection.cjs +4 -5
  49. package/generated/services/matchMedia.cjs +4 -5
  50. package/generated/services/navManager.cjs +4 -5
  51. package/generated/services/portal.cjs +4 -5
  52. package/generated/services/resizeObserver.cjs +4 -5
  53. package/generated/services/siblingsInert.cjs +4 -5
  54. package/generated/services/transitions/baseTransitions.cjs +4 -5
  55. package/generated/services/transitions/bootstrap.cjs +4 -5
  56. package/generated/services/transitions/collapse.cjs +4 -5
  57. package/generated/services/transitions/cssTransitions.cjs +4 -5
  58. package/generated/services/transitions/simpleClassTransition.cjs +4 -5
  59. package/generated/slot.cjs +4 -5
  60. package/generated/types.cjs +4 -5
  61. package/generated/utils/directive.cjs +4 -5
  62. package/generated/utils/portal.cjs +4 -5
  63. package/generated/utils/stores.cjs +4 -5
  64. package/generated/utils/widget.cjs +4 -5
  65. package/generated/utils/writables.cjs +4 -5
  66. package/index.cjs +120 -196
  67. package/index.js +24 -20
  68. package/{modal-B6rJgzVm.js → modal-B9xclGji.js} +8 -5
  69. package/{modal-2qAV4Hjl.cjs → modal-Vd0W6U05.cjs} +7 -4
  70. package/package.json +6 -6
  71. package/{pagination-X2bugeX-.js → pagination-BGHP7K6U.js} +5 -3
  72. package/{pagination-CKUbq-OI.cjs → pagination-BO6qrpA6.cjs} +3 -1
  73. package/{progressbar-D-yo9AHH.cjs → progressbar-Bi9aS9jg.cjs} +4 -2
  74. package/{progressbar-D1-6Dzrf.js → progressbar-D8_F2wYh.js} +6 -4
  75. package/{rating-D2Ajh4vg.cjs → rating-DB4Ze-r4.cjs} +3 -2
  76. package/{rating-Cvad2Z2H.js → rating-DRAx20tg.js} +5 -4
  77. package/{select-B_Thv-qd.js → select-CEXxOyRB.js} +8 -6
  78. package/{select-DHik5ocI.cjs → select-CxX_TdVh.cjs} +6 -4
  79. package/{slider-DLdA-y4u.js → slider-CnK847iw.js} +15 -13
  80. package/{slider-DUv6gRI9.cjs → slider-Du37lWVJ.cjs} +13 -11
  81. package/{toast-BUiyh5r_.js → toast-Bvz7Uyrd.js} +12 -10
  82. 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.slotHeader, props: slotContext }),
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.slotHeader && /* @__PURE__ */ jsx(ToastHeader, { ...slotContext }),
15
- /* @__PURE__ */ jsx("div", { className: "toast-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotDefault, props: slotContext }) }),
16
- slotContext.state.dismissible && !slotContext.state.slotHeader && /* @__PURE__ */ jsx(ToastCloseButtonNoHeader, { ...slotContext })
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
- slotStructure: DefaultSlotStructure
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.slotHeader ? "d-flex" : ""}`],
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.slotStructure, props: slotContext })
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, slotDefault: props.children });
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.slotHeader, props: slotContext }),
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.slotHeader && /* @__PURE__ */ jsxRuntime.jsx(ToastHeader, { ...slotContext }),
16
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "toast-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotDefault, props: slotContext }) }),
17
- slotContext.state.dismissible && !slotContext.state.slotHeader && /* @__PURE__ */ jsxRuntime.jsx(ToastCloseButtonNoHeader, { ...slotContext })
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
- slotStructure: DefaultSlotStructure
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.slotHeader ? "d-flex" : ""}`],
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.slotStructure, props: slotContext })
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, slotDefault: props.children });
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;