@agnos-ui/react-bootstrap 0.3.1 → 0.4.0-next.1

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-2qAV4Hjl.cjs → modal-1m6cSYmZ.cjs} +13 -10
  69. package/{modal-B6rJgzVm.js → modal-BJy1upw0.js} +14 -11
  70. package/package.json +6 -6
  71. package/{pagination-X2bugeX-.js → pagination-B76wbKhG.js} +15 -13
  72. package/{pagination-CKUbq-OI.cjs → pagination-DeZ2Eb3e.cjs} +13 -11
  73. package/{progressbar-D-yo9AHH.cjs → progressbar-DKshX5DJ.cjs} +6 -4
  74. package/{progressbar-D1-6Dzrf.js → progressbar-UDs4TPtQ.js} +8 -6
  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
package/index.js CHANGED
@@ -1,21 +1,13 @@
1
- import { a, A, c } from "./accordion-Bpx0new2.js";
2
- import { A as A2, c as c2 } from "./alert-DWq65Emo.js";
3
- import { M, c as c3, o } from "./modal-B6rJgzVm.js";
4
- import { D, a as a2, N, b, P, c as c4 } from "./pagination-X2bugeX-.js";
5
- import { P as P2, c as c5 } from "./progressbar-D1-6Dzrf.js";
6
- import { R, c as c6 } from "./rating-Cvad2Z2H.js";
7
- import { S, c as c7 } from "./select-B_Thv-qd.js";
8
- import { D as D2, a as a3, S as S2, c as c8 } from "./slider-DLdA-y4u.js";
9
- import { T, c as c9 } from "./toast-BUiyh5r_.js";
10
- export * from "@agnos-ui/core-bootstrap/components/accordion";
11
- export * from "@agnos-ui/core-bootstrap/components/alert";
12
- export * from "@agnos-ui/core-bootstrap/components/modal";
13
- export * from "@agnos-ui/core-bootstrap/components/pagination";
14
- export * from "@agnos-ui/core-bootstrap/components/progressbar";
15
- export * from "@agnos-ui/react-headless/components/rating";
16
- export * from "@agnos-ui/core-bootstrap/components/select";
17
- export * from "@agnos-ui/core-bootstrap/components/slider";
18
- export * from "@agnos-ui/core-bootstrap/components/toast";
1
+ import { b, A, c, a, g } from "./accordion-CMbgQzoG.js";
2
+ import { A as A2, c as c2, g as g2 } from "./alert-DKl7HLhb.js";
3
+ import { M, c as c3, g as g3, o } from "./modal-BJy1upw0.js";
4
+ import { D, a as a2, N, b as b2, P, c as c4, g as g4 } from "./pagination-B76wbKhG.js";
5
+ import { P as P2, c as c5, g as g5 } from "./progressbar-UDs4TPtQ.js";
6
+ import { R, c as c6, g as g6 } from "./rating-DRAx20tg.js";
7
+ import { S, c as c7, g as g7 } from "./select-CEXxOyRB.js";
8
+ import { D as D2, a as a3, S as S2, c as c8, g as g8 } from "./slider-CnK847iw.js";
9
+ import { T, c as c9, g as g9 } from "./toast-Bvz7Uyrd.js";
10
+ import { modalCloseButtonClick, modalOutsideClick } from "@agnos-ui/react-headless/components/modal";
19
11
  export * from "@agnos-ui/react-headless/types";
20
12
  export * from "@agnos-ui/react-headless/slot";
21
13
  export * from "@agnos-ui/react-headless/config";
@@ -41,7 +33,7 @@ export * from "@agnos-ui/react-headless/services/transitions/collapse";
41
33
  export * from "@agnos-ui/react-headless/services/transitions/baseTransitions";
42
34
  export * from "@agnos-ui/core-bootstrap/services/transitions";
43
35
  export {
44
- a as Accordion,
36
+ b as Accordion,
45
37
  A as AccordionItem,
46
38
  A2 as Alert,
47
39
  D as DefaultPages,
@@ -50,7 +42,7 @@ export {
50
42
  a2 as DefaultStructure,
51
43
  M as Modal,
52
44
  N as NavButton,
53
- b as PageItem,
45
+ b2 as PageItem,
54
46
  P as Pagination,
55
47
  P2 as Progressbar,
56
48
  R as Rating,
@@ -59,6 +51,7 @@ export {
59
51
  T as Toast,
60
52
  WidgetsDefaultConfig,
61
53
  c as createAccordion,
54
+ a as createAccordionItem,
62
55
  c2 as createAlert,
63
56
  c3 as createModal,
64
57
  c4 as createPagination,
@@ -67,6 +60,17 @@ export {
67
60
  c7 as createSelect,
68
61
  c8 as createSlider,
69
62
  c9 as createToast,
63
+ g as getAccordionDefaultConfig,
64
+ g2 as getAlertDefaultConfig,
65
+ g3 as getModalDefaultConfig,
66
+ g4 as getPaginationDefaultConfig,
67
+ g5 as getProgressbarDefaultConfig,
68
+ g6 as getRatingDefaultConfig,
69
+ g7 as getSelectDefaultConfig,
70
+ g8 as getSliderDefaultConfig,
71
+ g9 as getToastDefaultConfig,
72
+ modalCloseButtonClick,
73
+ modalOutsideClick,
70
74
  o as openModal,
71
75
  useWidgetContext,
72
76
  useWidgetWithConfig,
@@ -9,30 +9,32 @@ const ReactDOM = require("react-dom/client");
9
9
  const React = require("react");
10
10
  const modal = require("@agnos-ui/core-bootstrap/components/modal");
11
11
  const classNames = require("classnames");
12
+ require("@agnos-ui/react-headless/components/modal");
12
13
  const createModal = modal.createModal;
14
+ const getModalDefaultConfig = modal.getModalDefaultConfig;
15
+ const CloseButton = ({ directive: directive$1 }) => /* @__PURE__ */ jsxRuntime.jsx("button", { className: "btn-close", ...directive.useDirective(directive$1) });
13
16
  const DefaultSlotHeader = (slotContext) => {
14
- const refCloseButton = directive.useDirective(slotContext.widget.directives.closeButtonDirective);
15
17
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16
- /* @__PURE__ */ jsxRuntime.jsx("h5", { className: "modal-title", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotTitle, props: slotContext }) }),
17
- slotContext.state.closeButton && /* @__PURE__ */ jsxRuntime.jsx("button", { className: "btn-close", ...refCloseButton })
18
+ /* @__PURE__ */ jsxRuntime.jsx("h5", { className: "modal-title", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.title, props: slotContext }) }),
19
+ slotContext.state.closeButton && /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { directive: slotContext.widget.directives.closeButtonDirective })
18
20
  ] });
19
21
  };
20
22
  const DefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
21
- slotContext.state.slotTitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-header", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotHeader, props: slotContext }) }),
22
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotDefault, props: slotContext }) }),
23
- slotContext.state.slotFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-footer", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotFooter, props: slotContext }) })
23
+ slotContext.state.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-header", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.header, props: slotContext }) }),
24
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-body", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.children, props: slotContext }) }),
25
+ slotContext.state.footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "modal-footer", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.footer, props: slotContext }) })
24
26
  ] });
25
27
  const defaultConfig = {
26
- slotHeader: DefaultSlotHeader,
27
- slotStructure: DefaultSlotStructure
28
+ header: DefaultSlotHeader,
29
+ structure: DefaultSlotStructure
28
30
  };
29
31
  const BackdropElement = ({ widget }) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirectives([directive.classDirective, "modal-backdrop"], widget.directives.backdropDirective) });
30
32
  const ModalElement = (slotContext) => {
31
33
  const { fullscreen } = slotContext.state;
32
- 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.slotStructure, props: slotContext }) }) }) });
34
+ 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 }) }) }) });
33
35
  };
34
36
  const Modal = React.forwardRef(function Modal2(props, ref) {
35
- const [state, widget] = generated_config.useWidgetWithConfig(createModal, props, "modal", { ...defaultConfig, slotDefault: props.children });
37
+ const [state, widget] = generated_config.useWidgetWithConfig(createModal, props, "modal", defaultConfig);
36
38
  React.useImperativeHandle(ref, () => widget.api, []);
37
39
  const slotContext = {
38
40
  state,
@@ -56,4 +58,5 @@ async function openModal(options) {
56
58
  }
57
59
  exports.Modal = Modal;
58
60
  exports.createModal = createModal;
61
+ exports.getModalDefaultConfig = getModalDefaultConfig;
59
62
  exports.openModal = openModal;
@@ -6,32 +6,34 @@ import { useWidgetWithConfig } from "./generated/config.js";
6
6
  import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
7
7
  import ReactDOM from "react-dom/client";
8
8
  import { forwardRef, useImperativeHandle } from "react";
9
- import { createModal as createModal$1 } from "@agnos-ui/core-bootstrap/components/modal";
9
+ import { createModal as createModal$1, getModalDefaultConfig as getModalDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/modal";
10
10
  import classNames from "classnames";
11
+ import "@agnos-ui/react-headless/components/modal";
11
12
  const createModal = createModal$1;
13
+ const getModalDefaultConfig = getModalDefaultConfig$1;
14
+ const CloseButton = ({ directive }) => /* @__PURE__ */ jsx("button", { className: "btn-close", ...useDirective(directive) });
12
15
  const DefaultSlotHeader = (slotContext) => {
13
- const refCloseButton = useDirective(slotContext.widget.directives.closeButtonDirective);
14
16
  return /* @__PURE__ */ jsxs(Fragment, { children: [
15
- /* @__PURE__ */ jsx("h5", { className: "modal-title", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotTitle, props: slotContext }) }),
16
- slotContext.state.closeButton && /* @__PURE__ */ jsx("button", { className: "btn-close", ...refCloseButton })
17
+ /* @__PURE__ */ jsx("h5", { className: "modal-title", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.title, props: slotContext }) }),
18
+ slotContext.state.closeButton && /* @__PURE__ */ jsx(CloseButton, { directive: slotContext.widget.directives.closeButtonDirective })
17
19
  ] });
18
20
  };
19
21
  const DefaultSlotStructure = (slotContext) => /* @__PURE__ */ jsxs(Fragment, { children: [
20
- slotContext.state.slotTitle && /* @__PURE__ */ jsx("div", { className: "modal-header", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotHeader, props: slotContext }) }),
21
- /* @__PURE__ */ jsx("div", { className: "modal-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotDefault, props: slotContext }) }),
22
- slotContext.state.slotFooter && /* @__PURE__ */ jsx("div", { className: "modal-footer", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotFooter, props: slotContext }) })
22
+ slotContext.state.title && /* @__PURE__ */ jsx("div", { className: "modal-header", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.header, props: slotContext }) }),
23
+ /* @__PURE__ */ jsx("div", { className: "modal-body", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.children, props: slotContext }) }),
24
+ slotContext.state.footer && /* @__PURE__ */ jsx("div", { className: "modal-footer", children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.footer, props: slotContext }) })
23
25
  ] });
24
26
  const defaultConfig = {
25
- slotHeader: DefaultSlotHeader,
26
- slotStructure: DefaultSlotStructure
27
+ header: DefaultSlotHeader,
28
+ structure: DefaultSlotStructure
27
29
  };
28
30
  const BackdropElement = ({ widget }) => /* @__PURE__ */ jsx("div", { ...useDirectives([classDirective, "modal-backdrop"], widget.directives.backdropDirective) });
29
31
  const ModalElement = (slotContext) => {
30
32
  const { fullscreen } = slotContext.state;
31
- 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.slotStructure, props: slotContext }) }) }) });
33
+ 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 }) }) }) });
32
34
  };
33
35
  const Modal = forwardRef(function Modal2(props, ref) {
34
- const [state, widget] = useWidgetWithConfig(createModal, props, "modal", { ...defaultConfig, slotDefault: props.children });
36
+ const [state, widget] = useWidgetWithConfig(createModal, props, "modal", defaultConfig);
35
37
  useImperativeHandle(ref, () => widget.api, []);
36
38
  const slotContext = {
37
39
  state,
@@ -56,5 +58,6 @@ async function openModal(options) {
56
58
  export {
57
59
  Modal as M,
58
60
  createModal as c,
61
+ getModalDefaultConfig as g,
59
62
  openModal as o
60
63
  };
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.3.1",
4
+ "version": "0.4.0-next.1",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
7
7
  "module": "./index.js",
@@ -49,14 +49,14 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@agnos-ui/core-bootstrap": "0.3.1",
53
- "@agnos-ui/react-headless": "0.3.1",
52
+ "@agnos-ui/core-bootstrap": "0.4.0-next.1",
53
+ "@agnos-ui/react-headless": "0.4.0-next.1",
54
54
  "classnames": "^2.5.1"
55
55
  },
56
56
  "peerDependencies": {
57
- "@amadeus-it-group/tansu": "*",
58
- "react": "*",
59
- "react-dom": "*"
57
+ "@amadeus-it-group/tansu": "^1.0.0",
58
+ "react": "^18.3.1",
59
+ "react-dom": "^18.3.1"
60
60
  },
61
61
  "sideEffects": false,
62
62
  "homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
@@ -5,7 +5,7 @@ import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
5
5
  import classNames from "classnames";
6
6
  import * as React from "react";
7
7
  import { useDirectives, classDirective } from "@agnos-ui/react-headless/utils/directive";
8
- import { createPagination as createPagination$1 } from "@agnos-ui/core-bootstrap/components/pagination";
8
+ import { createPagination as createPagination$1, getPaginationDefaultConfig as getPaginationDefaultConfig$1 } 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: [
@@ -20,6 +20,7 @@ const NavButton = React.forwardRef(({ disabled, className, children, directive }
20
20
  });
21
21
  NavButton.displayName = "NavButton";
22
22
  const createPagination = createPagination$1;
23
+ const getPaginationDefaultConfig = getPaginationDefaultConfig$1;
23
24
  function DefaultPages(slotContext) {
24
25
  const { widget, state } = slotContext;
25
26
  const jsxPages = [];
@@ -27,7 +28,7 @@ function DefaultPages(slotContext) {
27
28
  if (state.pages[i] === -1) {
28
29
  jsxPages.push(
29
30
  /* @__PURE__ */ jsxs("li", { className: "page-item disabled", children: [
30
- /* @__PURE__ */ jsx("div", { className: "page-link au-ellipsis", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotEllipsis, props: slotContext }) }),
31
+ /* @__PURE__ */ jsx("div", { className: "page-link au-ellipsis", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Slot, { slotContent: state.ellipsisLabel, props: slotContext }) }),
31
32
  /* @__PURE__ */ jsx("span", { className: "visually-hidden", children: state.ariaEllipsisLabel })
32
33
  ] }, "Ellipsis" + i)
33
34
  );
@@ -41,7 +42,7 @@ function DefaultPages(slotContext) {
41
42
  activeLabel: state.activeLabel,
42
43
  directive: widget.directives["pageLink"],
43
44
  page: state.pages[i],
44
- children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotNumberLabel, props: { ...slotContext, displayedPage: state.pages[i] } })
45
+ children: /* @__PURE__ */ jsx(Slot, { slotContent: state.numberLabel, props: { ...slotContext, displayedPage: state.pages[i] } })
45
46
  },
46
47
  state.pages[i]
47
48
  )
@@ -51,8 +52,8 @@ function DefaultPages(slotContext) {
51
52
  return jsxPages.length ? /* @__PURE__ */ jsx(Fragment, { children: jsxPages }) : null;
52
53
  }
53
54
  const defaultConfig = {
54
- slotPages: DefaultPages,
55
- slotStructure: DefaultStructure
55
+ pagesDisplay: DefaultPages,
56
+ structure: DefaultStructure
56
57
  };
57
58
  function DefaultStructure(slotContext) {
58
59
  const { widget, state } = slotContext;
@@ -60,28 +61,28 @@ function DefaultStructure(slotContext) {
60
61
  const ItemsAfter = [];
61
62
  if (state.boundaryLinks) {
62
63
  ItemsBefore.push(
63
- /* @__PURE__ */ jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pageFirst"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotFirst, props: slotContext }) }, "first")
64
+ /* @__PURE__ */ jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pageFirst"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.firstPageLabel, props: slotContext }) }, "first")
64
65
  );
65
66
  }
66
67
  if (state.directionLinks) {
67
68
  ItemsBefore.push(
68
- /* @__PURE__ */ jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pagePrev"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotPrevious, props: slotContext }) }, "prev")
69
+ /* @__PURE__ */ jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pagePrev"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.previousPageLabel, props: slotContext }) }, "prev")
69
70
  );
70
71
  }
71
72
  if (state.directionLinks) {
72
73
  ItemsAfter.push(
73
- /* @__PURE__ */ jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageNext"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotNext, props: slotContext }) }, "next")
74
+ /* @__PURE__ */ jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageNext"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.nextPageLabel, props: slotContext }) }, "next")
74
75
  );
75
76
  }
76
77
  if (state.boundaryLinks) {
77
78
  ItemsAfter.push(
78
- /* @__PURE__ */ jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageLast"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotLast, props: slotContext }) }, "last")
79
+ /* @__PURE__ */ jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageLast"], children: /* @__PURE__ */ jsx(Slot, { slotContent: state.lastPageLabel, props: slotContext }) }, "last")
79
80
  );
80
81
  }
81
82
  return /* @__PURE__ */ jsxs(Fragment, { children: [
82
- /* @__PURE__ */ jsxs("ul", { className: classNames("au-pagination", "pagination", state.size ? `pagination-${state.size}` : "", state.className), children: [
83
+ /* @__PURE__ */ jsxs("ul", { className: classNames("au-pagination", "pagination", { [`pagination-${state.size}`]: !!state.size }, state.className), children: [
83
84
  ItemsBefore,
84
- /* @__PURE__ */ jsx(Slot, { slotContent: state.slotPages, props: slotContext }),
85
+ /* @__PURE__ */ jsx(Slot, { slotContent: state.pagesDisplay, props: slotContext }),
85
86
  ItemsAfter
86
87
  ] }),
87
88
  /* @__PURE__ */ jsx("div", { "aria-live": "polite", className: "visually-hidden", children: `${state.ariaLiveLabelText}` })
@@ -90,7 +91,7 @@ function DefaultStructure(slotContext) {
90
91
  function Pagination(props) {
91
92
  const [state, widget] = useWidgetWithConfig(createPagination, props, "pagination", defaultConfig);
92
93
  const slotContext = { state, widget: toSlotContextWidget(widget) };
93
- return /* @__PURE__ */ jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotStructure, props: slotContext }) });
94
+ return /* @__PURE__ */ jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.structure, props: slotContext }) });
94
95
  }
95
96
  export {
96
97
  DefaultPages as D,
@@ -98,5 +99,6 @@ export {
98
99
  Pagination as P,
99
100
  DefaultStructure as a,
100
101
  PageItem as b,
101
- createPagination as c
102
+ createPagination as c,
103
+ getPaginationDefaultConfig as g
102
104
  };
@@ -38,6 +38,7 @@ const NavButton = React__namespace.forwardRef(({ disabled, className, children,
38
38
  });
39
39
  NavButton.displayName = "NavButton";
40
40
  const createPagination = pagination.createPagination;
41
+ const getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
41
42
  function DefaultPages(slotContext) {
42
43
  const { widget, state } = slotContext;
43
44
  const jsxPages = [];
@@ -45,7 +46,7 @@ function DefaultPages(slotContext) {
45
46
  if (state.pages[i] === -1) {
46
47
  jsxPages.push(
47
48
  /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "page-item disabled", children: [
48
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "page-link au-ellipsis", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotEllipsis, props: slotContext }) }),
49
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "page-link au-ellipsis", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.ellipsisLabel, props: slotContext }) }),
49
50
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "visually-hidden", children: state.ariaEllipsisLabel })
50
51
  ] }, "Ellipsis" + i)
51
52
  );
@@ -59,7 +60,7 @@ function DefaultPages(slotContext) {
59
60
  activeLabel: state.activeLabel,
60
61
  directive: widget.directives["pageLink"],
61
62
  page: state.pages[i],
62
- children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotNumberLabel, props: { ...slotContext, displayedPage: state.pages[i] } })
63
+ children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.numberLabel, props: { ...slotContext, displayedPage: state.pages[i] } })
63
64
  },
64
65
  state.pages[i]
65
66
  )
@@ -69,8 +70,8 @@ function DefaultPages(slotContext) {
69
70
  return jsxPages.length ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxPages }) : null;
70
71
  }
71
72
  const defaultConfig = {
72
- slotPages: DefaultPages,
73
- slotStructure: DefaultStructure
73
+ pagesDisplay: DefaultPages,
74
+ structure: DefaultStructure
74
75
  };
75
76
  function DefaultStructure(slotContext) {
76
77
  const { widget, state } = slotContext;
@@ -78,28 +79,28 @@ function DefaultStructure(slotContext) {
78
79
  const ItemsAfter = [];
79
80
  if (state.boundaryLinks) {
80
81
  ItemsBefore.push(
81
- /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pageFirst"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotFirst, props: slotContext }) }, "first")
82
+ /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pageFirst"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.firstPageLabel, props: slotContext }) }, "first")
82
83
  );
83
84
  }
84
85
  if (state.directionLinks) {
85
86
  ItemsBefore.push(
86
- /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pagePrev"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotPrevious, props: slotContext }) }, "prev")
87
+ /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.previousDisabled, directive: widget.directives["pagePrev"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.previousPageLabel, props: slotContext }) }, "prev")
87
88
  );
88
89
  }
89
90
  if (state.directionLinks) {
90
91
  ItemsAfter.push(
91
- /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageNext"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotNext, props: slotContext }) }, "next")
92
+ /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageNext"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.nextPageLabel, props: slotContext }) }, "next")
92
93
  );
93
94
  }
94
95
  if (state.boundaryLinks) {
95
96
  ItemsAfter.push(
96
- /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageLast"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotLast, props: slotContext }) }, "last")
97
+ /* @__PURE__ */ jsxRuntime.jsx(NavButton, { disabled: state.nextDisabled, directive: widget.directives["pageLast"], children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.lastPageLabel, props: slotContext }) }, "last")
97
98
  );
98
99
  }
99
100
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
100
- /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: classNames("au-pagination", "pagination", state.size ? `pagination-${state.size}` : "", state.className), children: [
101
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: classNames("au-pagination", "pagination", { [`pagination-${state.size}`]: !!state.size }, state.className), children: [
101
102
  ItemsBefore,
102
- /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotPages, props: slotContext }),
103
+ /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.pagesDisplay, props: slotContext }),
103
104
  ItemsAfter
104
105
  ] }),
105
106
  /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "polite", className: "visually-hidden", children: `${state.ariaLiveLabelText}` })
@@ -108,7 +109,7 @@ function DefaultStructure(slotContext) {
108
109
  function Pagination(props) {
109
110
  const [state, widget] = generated_config.useWidgetWithConfig(createPagination, props, "pagination", defaultConfig);
110
111
  const slotContext = { state, widget: types.toSlotContextWidget(widget) };
111
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotStructure, props: slotContext }) });
112
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": state.ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.structure, props: slotContext }) });
112
113
  }
113
114
  exports.DefaultPages = DefaultPages;
114
115
  exports.DefaultStructure = DefaultStructure;
@@ -116,3 +117,4 @@ exports.NavButton = NavButton;
116
117
  exports.PageItem = PageItem;
117
118
  exports.Pagination = Pagination;
118
119
  exports.createPagination = createPagination;
120
+ exports.getPaginationDefaultConfig = getPaginationDefaultConfig;
@@ -7,18 +7,20 @@ const directive = require("@agnos-ui/react-headless/utils/directive");
7
7
  const classNames = require("classnames");
8
8
  const progressbar = require("@agnos-ui/core-bootstrap/components/progressbar");
9
9
  const createProgressbar = progressbar.createProgressbar;
10
+ const getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
10
11
  function DefaultSlotContent(slotContext) {
11
12
  const { striped, animated, type } = slotContext.state;
12
13
  const classes = classNames("progress-bar", { "progress-bar-striped": striped }, { "progress-bar-animated": animated }, { [`text-bg-${type}`]: !!type });
13
- 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.slotDefault, props: slotContext }) }) });
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 }) }) });
14
15
  }
15
16
  const defaultConfig = {
16
- slotStructure: DefaultSlotContent
17
+ structure: DefaultSlotContent
17
18
  };
18
19
  const Progressbar = (props) => {
19
- const [state, widget] = generated_config.useWidgetWithConfig(createProgressbar, props, "progressbar", { ...defaultConfig, slotDefault: props.children });
20
+ const [state, widget] = generated_config.useWidgetWithConfig(createProgressbar, props, "progressbar", defaultConfig);
20
21
  const slotContext = { state, widget: types.toSlotContextWidget(widget) };
21
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotStructure, props: slotContext }) });
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 }) });
22
23
  };
23
24
  exports.Progressbar = Progressbar;
24
25
  exports.createProgressbar = createProgressbar;
26
+ exports.getProgressbarDefaultConfig = getProgressbarDefaultConfig;
@@ -4,22 +4,24 @@ import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
4
4
  import { Slot } from "@agnos-ui/react-headless/slot";
5
5
  import { useDirective } from "@agnos-ui/react-headless/utils/directive";
6
6
  import classNames from "classnames";
7
- import { createProgressbar as createProgressbar$1 } from "@agnos-ui/core-bootstrap/components/progressbar";
7
+ import { createProgressbar as createProgressbar$1, getProgressbarDefaultConfig as getProgressbarDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/progressbar";
8
8
  const createProgressbar = createProgressbar$1;
9
+ const getProgressbarDefaultConfig = getProgressbarDefaultConfig$1;
9
10
  function DefaultSlotContent(slotContext) {
10
11
  const { striped, animated, type } = slotContext.state;
11
12
  const classes = classNames("progress-bar", { "progress-bar-striped": striped }, { "progress-bar-animated": animated }, { [`text-bg-${type}`]: !!type });
12
- 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.slotDefault, props: slotContext }) }) });
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 }) }) });
13
14
  }
14
15
  const defaultConfig = {
15
- slotStructure: DefaultSlotContent
16
+ structure: DefaultSlotContent
16
17
  };
17
18
  const Progressbar = (props) => {
18
- const [state, widget] = useWidgetWithConfig(createProgressbar, props, "progressbar", { ...defaultConfig, slotDefault: props.children });
19
+ const [state, widget] = useWidgetWithConfig(createProgressbar, props, "progressbar", defaultConfig);
19
20
  const slotContext = { state, widget: toSlotContextWidget(widget) };
20
- return /* @__PURE__ */ jsx("div", { ...useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotStructure, props: slotContext }) });
21
+ return /* @__PURE__ */ jsx("div", { ...useDirective(widget.directives.ariaDirective), className: state.className || void 0, children: /* @__PURE__ */ jsx(Slot, { slotContent: state.structure, props: slotContext }) });
21
22
  };
22
23
  export {
23
24
  Progressbar as P,
24
- createProgressbar as c
25
+ createProgressbar as c,
26
+ getProgressbarDefaultConfig as g
25
27
  };
@@ -5,8 +5,8 @@ const generated_config = require("./generated/config.cjs");
5
5
  const directive = require("@agnos-ui/react-headless/utils/directive");
6
6
  const React = require("react");
7
7
  const rating = require("@agnos-ui/core-bootstrap/components/rating");
8
- require("@agnos-ui/react-headless/components/rating");
9
8
  const createRating = rating.createRating;
9
+ const getRatingDefaultConfig = rating.getRatingDefaultConfig;
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: [
@@ -15,7 +15,7 @@ function Star({ star, state, directive: directive$1 }) {
15
15
  star.index < state.visibleRating ? "*" : " ",
16
16
  ")"
17
17
  ] }),
18
- /* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(directive$1, arg), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.slotStar, props: star }) })
18
+ /* @__PURE__ */ jsxRuntime.jsx("span", { ...directive.useDirective(directive$1, arg), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: state.star, props: star }) })
19
19
  ] }, star.index);
20
20
  }
21
21
  function Rating(props) {
@@ -27,3 +27,4 @@ function Rating(props) {
27
27
  }
28
28
  exports.Rating = Rating;
29
29
  exports.createRating = createRating;
30
+ exports.getRatingDefaultConfig = getRatingDefaultConfig;
@@ -3,9 +3,9 @@ import { Slot } from "@agnos-ui/react-headless/slot";
3
3
  import { useWidgetWithConfig } from "./generated/config.js";
4
4
  import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
5
5
  import React__default from "react";
6
- import { createRating as createRating$1 } from "@agnos-ui/core-bootstrap/components/rating";
7
- import "@agnos-ui/react-headless/components/rating";
6
+ import { createRating as createRating$1, getRatingDefaultConfig as getRatingDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/rating";
8
7
  const createRating = createRating$1;
8
+ const getRatingDefaultConfig = getRatingDefaultConfig$1;
9
9
  function Star({ star, state, directive }) {
10
10
  const arg = { index: star.index };
11
11
  return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
@@ -14,7 +14,7 @@ function Star({ star, state, directive }) {
14
14
  star.index < state.visibleRating ? "*" : " ",
15
15
  ")"
16
16
  ] }),
17
- /* @__PURE__ */ jsx("span", { ...useDirective(directive, arg), children: /* @__PURE__ */ jsx(Slot, { slotContent: state.slotStar, props: star }) })
17
+ /* @__PURE__ */ jsx("span", { ...useDirective(directive, arg), children: /* @__PURE__ */ jsx(Slot, { slotContent: state.star, props: star }) })
18
18
  ] }, star.index);
19
19
  }
20
20
  function Rating(props) {
@@ -26,5 +26,6 @@ function Rating(props) {
26
26
  }
27
27
  export {
28
28
  Rating as R,
29
- createRating as c
29
+ createRating as c,
30
+ getRatingDefaultConfig as g
30
31
  };
@@ -1,11 +1,12 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { createSelect as createSelect$1 } from "@agnos-ui/core-bootstrap/components/select";
2
+ import { createSelect as createSelect$1, getSelectDefaultConfig as getSelectDefaultConfig$1 } from "@agnos-ui/core-bootstrap/components/select";
3
3
  import { Slot } from "@agnos-ui/react-headless/slot";
4
4
  import { toSlotContextWidget } from "@agnos-ui/react-headless/types";
5
5
  import { useDirectives, classDirective, useDirective } from "@agnos-ui/react-headless/utils/directive";
6
6
  import classNames from "classnames";
7
7
  import { useWidgetWithConfig } from "./generated/config.js";
8
8
  const createSelect = createSelect$1;
9
+ const getSelectDefaultConfig = getSelectDefaultConfig$1;
9
10
  function DefaultBadge(slotContext) {
10
11
  return /* @__PURE__ */ jsx(Fragment, { children: "" + slotContext.itemContext.item });
11
12
  }
@@ -13,7 +14,7 @@ function DefaultItem(slotContext) {
13
14
  return /* @__PURE__ */ jsx(Fragment, { children: "" + slotContext.itemContext.item });
14
15
  }
15
16
  function BadgeContainer({ itemContext, slotContext }) {
16
- return /* @__PURE__ */ jsx("div", { ...useDirective(slotContext.widget.directives.badgeAttributesDirective, itemContext), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotBadgeLabel, props: { ...slotContext, itemContext } }) });
17
+ return /* @__PURE__ */ jsx("div", { ...useDirective(slotContext.widget.directives.badgeAttributesDirective, itemContext), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.badgeLabel, props: { ...slotContext, itemContext } }) });
17
18
  }
18
19
  function Badges({ slotContext }) {
19
20
  const badges = [];
@@ -24,7 +25,7 @@ function Badges({ slotContext }) {
24
25
  }
25
26
  function SelectItem({ itemContext, slotContext }) {
26
27
  const classname = classNames("dropdown-item", "position-relative", { "text-bg-primary": itemContext === slotContext.state.highlighted });
27
- return /* @__PURE__ */ jsx("li", { className: classname, ...useDirective(slotContext.widget.directives.itemAttributesDirective, itemContext), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.slotItem, props: { ...slotContext, itemContext } }) });
28
+ return /* @__PURE__ */ jsx("li", { className: classname, ...useDirective(slotContext.widget.directives.itemAttributesDirective, itemContext), children: /* @__PURE__ */ jsx(Slot, { slotContent: slotContext.state.itemLabel, props: { ...slotContext, itemContext } }) });
28
29
  }
29
30
  function Rows({ slotContext }) {
30
31
  const {
@@ -35,8 +36,8 @@ function Rows({ slotContext }) {
35
36
  }) });
36
37
  }
37
38
  const defaultConfig = {
38
- slotBadgeLabel: DefaultBadge,
39
- slotItem: DefaultItem
39
+ badgeLabel: DefaultBadge,
40
+ itemLabel: DefaultItem
40
41
  };
41
42
  function Select(props) {
42
43
  const [state, widget] = useWidgetWithConfig(createSelect, props, "select", defaultConfig);
@@ -71,5 +72,6 @@ function Select(props) {
71
72
  }
72
73
  export {
73
74
  Select as S,
74
- createSelect as c
75
+ createSelect as c,
76
+ getSelectDefaultConfig as g
75
77
  };
@@ -7,6 +7,7 @@ const directive = require("@agnos-ui/react-headless/utils/directive");
7
7
  const classNames = require("classnames");
8
8
  const generated_config = require("./generated/config.cjs");
9
9
  const createSelect = select.createSelect;
10
+ const getSelectDefaultConfig = select.getSelectDefaultConfig;
10
11
  function DefaultBadge(slotContext) {
11
12
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "" + slotContext.itemContext.item });
12
13
  }
@@ -14,7 +15,7 @@ function DefaultItem(slotContext) {
14
15
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "" + slotContext.itemContext.item });
15
16
  }
16
17
  function BadgeContainer({ itemContext, slotContext }) {
17
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(slotContext.widget.directives.badgeAttributesDirective, itemContext), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotBadgeLabel, props: { ...slotContext, itemContext } }) });
18
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...directive.useDirective(slotContext.widget.directives.badgeAttributesDirective, itemContext), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.badgeLabel, props: { ...slotContext, itemContext } }) });
18
19
  }
19
20
  function Badges({ slotContext }) {
20
21
  const badges = [];
@@ -25,7 +26,7 @@ function Badges({ slotContext }) {
25
26
  }
26
27
  function SelectItem({ itemContext, slotContext }) {
27
28
  const classname = classNames("dropdown-item", "position-relative", { "text-bg-primary": itemContext === slotContext.state.highlighted });
28
- return /* @__PURE__ */ jsxRuntime.jsx("li", { className: classname, ...directive.useDirective(slotContext.widget.directives.itemAttributesDirective, itemContext), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.slotItem, props: { ...slotContext, itemContext } }) });
29
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { className: classname, ...directive.useDirective(slotContext.widget.directives.itemAttributesDirective, itemContext), children: /* @__PURE__ */ jsxRuntime.jsx(slot.Slot, { slotContent: slotContext.state.itemLabel, props: { ...slotContext, itemContext } }) });
29
30
  }
30
31
  function Rows({ slotContext }) {
31
32
  const {
@@ -36,8 +37,8 @@ function Rows({ slotContext }) {
36
37
  }) });
37
38
  }
38
39
  const defaultConfig = {
39
- slotBadgeLabel: DefaultBadge,
40
- slotItem: DefaultItem
40
+ badgeLabel: DefaultBadge,
41
+ itemLabel: DefaultItem
41
42
  };
42
43
  function Select(props) {
43
44
  const [state, widget] = generated_config.useWidgetWithConfig(createSelect, props, "select", defaultConfig);
@@ -72,3 +73,4 @@ function Select(props) {
72
73
  }
73
74
  exports.Select = Select;
74
75
  exports.createSelect = createSelect;
76
+ exports.getSelectDefaultConfig = getSelectDefaultConfig;