@agnos-ui/core 0.10.0-next.1 → 0.10.0-next.3

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 (102) hide show
  1. package/{accordion-_zen-g8l.js → accordion-47EpOD36.js} +4 -3
  2. package/{accordion-B5LiN1uy.cjs → accordion-nxveC0GZ.cjs} +4 -3
  3. package/{alert-B-jQDQcB.cjs → alert-AhaliJ17.cjs} +1 -1
  4. package/{alert-gGz2CDS9.js → alert-anMaigvi.js} +1 -1
  5. package/{collapse-BV4kD3j9.js → collapse-CrfvGo_T.js} +2 -2
  6. package/{collapse-gLiT080Y.cjs → collapse-Da_27YUU.cjs} +2 -2
  7. package/{common-D3QcdJ6S.cjs → common-B5jS-Ih_.cjs} +1 -1
  8. package/{common-DK0ADNTX.js → common-CCxNtFNM.js} +1 -1
  9. package/components/accordion/index.cjs +1 -1
  10. package/components/accordion/index.js +1 -1
  11. package/components/alert/index.cjs +1 -1
  12. package/components/alert/index.js +1 -1
  13. package/components/carousel/index.cjs +2 -2
  14. package/components/carousel/index.js +2 -2
  15. package/components/collapse/index.cjs +1 -1
  16. package/components/collapse/index.js +1 -1
  17. package/components/drawer/drawer.d.ts +32 -25
  18. package/components/drawer/index.cjs +1 -1
  19. package/components/drawer/index.js +1 -1
  20. package/components/modal/index.cjs +1 -1
  21. package/components/modal/index.js +1 -1
  22. package/components/pagination/index.cjs +1 -1
  23. package/components/pagination/index.js +1 -1
  24. package/components/progressbar/index.cjs +1 -1
  25. package/components/progressbar/index.js +1 -1
  26. package/components/rating/index.cjs +1 -1
  27. package/components/rating/index.js +1 -1
  28. package/components/select/index.cjs +1 -1
  29. package/components/select/index.js +1 -1
  30. package/components/slider/index.cjs +1 -1
  31. package/components/slider/index.js +1 -1
  32. package/components/toast/index.cjs +1 -1
  33. package/components/toast/index.js +1 -1
  34. package/components/tree/index.cjs +1 -1
  35. package/components/tree/index.js +1 -1
  36. package/{dom-C2gi9OCP.cjs → dom-Cm9_uROp.cjs} +76 -6
  37. package/{dom-Bcg9ORcA.js → dom-DD1hAVZy.js} +76 -6
  38. package/drawer-Caz4Uypu.js +291 -0
  39. package/{drawer-DP7UPojk.cjs → drawer-DOi0TqZC.cjs} +131 -91
  40. package/index.cjs +16 -14
  41. package/index.js +21 -19
  42. package/{modal-DiXZXYjR.cjs → modal-B_3Uxplo.cjs} +5 -5
  43. package/{modal-CAvQW-vo.js → modal-cKd3qUn1.js} +5 -5
  44. package/package.json +1 -1
  45. package/{pagination-DvZ2rLsz.cjs → pagination-2Vor6JPZ.cjs} +2 -2
  46. package/{pagination-BKbMROV6.js → pagination-DlOyP_2C.js} +2 -2
  47. package/{progressbar-D8zIcm9n.js → progressbar-B5g76eMV.js} +2 -2
  48. package/{progressbar-i9xfAxb7.cjs → progressbar-DyBRINco.cjs} +2 -2
  49. package/{rating-DmG4oUkr.cjs → rating-C0y1j4SC.cjs} +2 -2
  50. package/{rating-DEXTGWCU.js → rating-C7C4-p4B.js} +2 -2
  51. package/{select-MFjAnIt7.cjs → select-Dhsb9msC.cjs} +1 -1
  52. package/{select-Bw68Xdu5.js → select-nnl00UWY.js} +1 -1
  53. package/services/floatingUI.cjs +1 -1
  54. package/services/floatingUI.js +1 -1
  55. package/services/focusElement.cjs +1 -1
  56. package/services/focusElement.js +1 -1
  57. package/services/focustrack.cjs +1 -1
  58. package/services/focustrack.js +1 -1
  59. package/services/matchMedia.cjs +1 -1
  60. package/services/matchMedia.js +1 -1
  61. package/services/navManager.cjs +1 -1
  62. package/services/navManager.js +1 -1
  63. package/services/pointerdownPosition.cjs +60 -0
  64. package/services/pointerdownPosition.d.ts +42 -0
  65. package/services/pointerdownPosition.js +60 -0
  66. package/services/portal.cjs +1 -1
  67. package/services/portal.js +1 -1
  68. package/services/resizeObserver.cjs +40 -20
  69. package/services/resizeObserver.d.ts +10 -2
  70. package/services/resizeObserver.js +41 -21
  71. package/services/siblingsInert.cjs +1 -1
  72. package/services/siblingsInert.js +1 -1
  73. package/services/transitions/baseTransitions.cjs +2 -2
  74. package/services/transitions/baseTransitions.js +2 -2
  75. package/services/transitions/collapse.cjs +11 -15
  76. package/services/transitions/collapse.js +11 -15
  77. package/services/transitions/cssTransitions.cjs +1 -1
  78. package/services/transitions/cssTransitions.js +1 -1
  79. package/services/transitions/simpleClassTransition.cjs +1 -1
  80. package/services/transitions/simpleClassTransition.js +1 -1
  81. package/{slider-Cx50Eghd.js → slider-B4WrdTeE.js} +121 -170
  82. package/{slider-Dl4Trh32.cjs → slider-DTO58syz.cjs} +120 -169
  83. package/{toaster-_p1GTtHI.js → toaster-CRPErgI2.js} +3 -3
  84. package/{toaster-UDglac7x.cjs → toaster-CT148JSJ.cjs} +3 -3
  85. package/{tree-rGHtmCnS.cjs → tree-C4l2Wqny.cjs} +2 -2
  86. package/{tree-DV0tfPlZ.js → tree-CHpFqJPx.js} +2 -2
  87. package/types.cjs +2 -2
  88. package/types.d.ts +22 -3
  89. package/types.js +2 -2
  90. package/utils/directive.cjs +1 -1
  91. package/utils/directive.d.ts +2 -2
  92. package/utils/directive.js +1 -1
  93. package/utils/internal/dom.d.ts +2 -0
  94. package/utils/internal/ssrHTMLElement.d.ts +7 -1
  95. package/utils/stores.cjs +1 -1
  96. package/utils/stores.js +1 -1
  97. package/utils/writables.cjs +2 -1
  98. package/utils/writables.d.ts +7 -0
  99. package/utils/writables.js +6 -5
  100. package/{writables-DcGT98a7.cjs → writables-Dt68gADJ.cjs} +4 -0
  101. package/{writables-e0tyaQpe.js → writables-Is1bF1Vt.js} +10 -6
  102. package/drawer-D5SO73ew.js +0 -251
@@ -2,8 +2,8 @@ import { writablesForProps, idWithDefault, stateStores, true$, mergeConfigStores
2
2
  import { createTransition } from "./services/transitions/baseTransitions.js";
3
3
  import { writable, computed, readable, asWritable } from "@amadeus-it-group/tansu";
4
4
  import { noop } from "./utils/func.js";
5
- import { j as createTypeEnum, e as typeString, g as typeFunction, c as typeBoolean } from "./writables-e0tyaQpe.js";
6
- import { n as mergeDirectives, p as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./dom-Bcg9ORcA.js";
5
+ import { k as createTypeEnum, e as typeString, h as typeFunction, c as typeBoolean } from "./writables-Is1bF1Vt.js";
6
+ import { n as mergeDirectives, p as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./dom-DD1hAVZy.js";
7
7
  import { createWidgetFactory } from "./utils/widget.js";
8
8
  function adjustItemsCloseOthers(items, openItems, oldOpen) {
9
9
  let keepOpen;
@@ -154,7 +154,8 @@ function createAccordionItem(config) {
154
154
  attributes: {
155
155
  id: computed(() => `${id$()}-body-container`),
156
156
  class: bodyContainerClassName$,
157
- "aria-labelledby": computed(() => `${id$()}-toggle`)
157
+ "aria-labelledby": computed(() => `${id$()}-toggle`),
158
+ role: readable("region")
158
159
  }
159
160
  }));
160
161
  return {
@@ -3,8 +3,8 @@ const utils_stores = require("./utils/stores.cjs");
3
3
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
4
4
  const tansu = require("@amadeus-it-group/tansu");
5
5
  const utils_func = require("./utils/func.cjs");
6
- const utils_writables = require("./writables-DcGT98a7.cjs");
7
- const utils_directive = require("./dom-C2gi9OCP.cjs");
6
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
7
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
8
8
  const utils_widget = require("./utils/widget.cjs");
9
9
  function adjustItemsCloseOthers(items, openItems, oldOpen) {
10
10
  let keepOpen;
@@ -155,7 +155,8 @@ function createAccordionItem(config) {
155
155
  attributes: {
156
156
  id: tansu.computed(() => `${id$()}-body-container`),
157
157
  class: bodyContainerClassName$,
158
- "aria-labelledby": tansu.computed(() => `${id$()}-toggle`)
158
+ "aria-labelledby": tansu.computed(() => `${id$()}-toggle`),
159
+ role: tansu.readable("region")
159
160
  }
160
161
  }));
161
162
  return {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const common = require("./common-D3QcdJ6S.cjs");
2
+ const common = require("./common-B5jS-Ih_.cjs");
3
3
  const utils_widget = require("./utils/widget.cjs");
4
4
  function getAlertDefaultConfig() {
5
5
  return { ...common.getCommonAlertDefaultConfig() };
@@ -1,4 +1,4 @@
1
- import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-DK0ADNTX.js";
1
+ import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-CCxNtFNM.js";
2
2
  import { createWidgetFactory } from "./utils/widget.js";
3
3
  function getAlertDefaultConfig() {
4
4
  return { ...getCommonAlertDefaultConfig() };
@@ -1,7 +1,7 @@
1
1
  import { createTransition } from "./services/transitions/baseTransitions.js";
2
2
  import { writablesForProps, idWithDefault, stateStores } from "./utils/stores.js";
3
- import { p as createAttributesDirective, n as mergeDirectives } from "./dom-Bcg9ORcA.js";
4
- import { g as typeFunction, e as typeString, c as typeBoolean } from "./writables-e0tyaQpe.js";
3
+ import { p as createAttributesDirective, n as mergeDirectives } from "./dom-DD1hAVZy.js";
4
+ import { h as typeFunction, e as typeString, c as typeBoolean } from "./writables-Is1bF1Vt.js";
5
5
  import { computed } from "@amadeus-it-group/tansu";
6
6
  import { noop } from "./utils/func.js";
7
7
  import { createWidgetFactory } from "./utils/widget.js";
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
3
3
  const utils_stores = require("./utils/stores.cjs");
4
- const utils_directive = require("./dom-C2gi9OCP.cjs");
5
- const utils_writables = require("./writables-DcGT98a7.cjs");
4
+ const utils_directive = require("./dom-Cm9_uROp.cjs");
5
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
6
6
  const tansu = require("@amadeus-it-group/tansu");
7
7
  const utils_func = require("./utils/func.cjs");
8
8
  const utils_widget = require("./utils/widget.cjs");
@@ -2,7 +2,7 @@
2
2
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
3
3
  const utils_func = require("./utils/func.cjs");
4
4
  const utils_stores = require("./utils/stores.cjs");
5
- const utils_writables = require("./writables-DcGT98a7.cjs");
5
+ const utils_writables = require("./writables-Dt68gADJ.cjs");
6
6
  const defaultCommonAlertConfig = {
7
7
  visible: true,
8
8
  dismissible: true,
@@ -1,7 +1,7 @@
1
1
  import { createTransition } from "./services/transitions/baseTransitions.js";
2
2
  import { noop } from "./utils/func.js";
3
3
  import { writablesForProps, stateStores } from "./utils/stores.js";
4
- import { e as typeString, c as typeBoolean, g as typeFunction } from "./writables-e0tyaQpe.js";
4
+ import { e as typeString, c as typeBoolean, h as typeFunction } from "./writables-Is1bF1Vt.js";
5
5
  const defaultCommonAlertConfig = {
6
6
  visible: true,
7
7
  dismissible: true,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const accordion = require("../../accordion-B5LiN1uy.cjs");
3
+ const accordion = require("../../accordion-nxveC0GZ.cjs");
4
4
  exports.createAccordion = accordion.createAccordion;
5
5
  exports.createAccordionItem = accordion.createAccordionItem;
6
6
  exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
@@ -1,4 +1,4 @@
1
- import { a, c, f, g } from "../../accordion-_zen-g8l.js";
1
+ import { a, c, f, g } from "../../accordion-47EpOD36.js";
2
2
  export {
3
3
  a as createAccordion,
4
4
  c as createAccordionItem,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const alert = require("../../alert-B-jQDQcB.cjs");
3
+ const alert = require("../../alert-AhaliJ17.cjs");
4
4
  exports.createAlert = alert.createAlert;
5
5
  exports.getAlertDefaultConfig = alert.getAlertDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../alert-gGz2CDS9.js";
1
+ import { c, g } from "../../alert-anMaigvi.js";
2
2
  export {
3
3
  c as createAlert,
4
4
  g as getAlertDefaultConfig
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const utils_stores = require("../../utils/stores.cjs");
4
- const utils_directive = require("../../dom-C2gi9OCP.cjs");
4
+ const utils_directive = require("../../dom-Cm9_uROp.cjs");
5
5
  const EmblaCarousel = require("embla-carousel");
6
6
  const tansu = require("@amadeus-it-group/tansu");
7
- const utils_writables = require("../../writables-DcGT98a7.cjs");
7
+ const utils_writables = require("../../writables-Dt68gADJ.cjs");
8
8
  const services_navManager = require("../../services/navManager.cjs");
9
9
  const utils_widget = require("../../utils/widget.cjs");
10
10
  const defaultConfig = {
@@ -1,8 +1,8 @@
1
1
  import { writablesForProps, stateStores, true$ } from "../../utils/stores.js";
2
- import { a as bindDirective, b as browserDirective, p as createAttributesDirective, n as mergeDirectives } from "../../dom-Bcg9ORcA.js";
2
+ import { a as bindDirective, b as browserDirective, p as createAttributesDirective, n as mergeDirectives } from "../../dom-DD1hAVZy.js";
3
3
  import EmblaCarousel from "embla-carousel";
4
4
  import { writable, computed, asReadable, readable } from "@amadeus-it-group/tansu";
5
- import { g as typeFunction, e as typeString, c as typeBoolean, a as typeNumber, j as createTypeEnum, f as typeStringOrNull, i as typeArray } from "../../writables-e0tyaQpe.js";
5
+ import { h as typeFunction, e as typeString, c as typeBoolean, a as typeNumber, k as createTypeEnum, f as typeStringOrNull, j as typeArray } from "../../writables-Is1bF1Vt.js";
6
6
  import { createNavManager } from "../../services/navManager.js";
7
7
  import { createWidgetFactory } from "../../utils/widget.js";
8
8
  const defaultConfig = {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const collapse = require("../../collapse-gLiT080Y.cjs");
3
+ const collapse = require("../../collapse-Da_27YUU.cjs");
4
4
  exports.createCollapse = collapse.createCollapse;
5
5
  exports.getCollapseDefaultConfig = collapse.getCollapseDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../collapse-BV4kD3j9.js";
1
+ import { c, g } from "../../collapse-CrfvGo_T.js";
2
2
  export {
3
3
  c as createCollapse,
4
4
  g as getCollapseDefaultConfig
@@ -42,6 +42,13 @@ interface DrawerCommonPropsAndState extends WidgetsCommonPropsAndState {
42
42
  * @defaultValue `false`
43
43
  */
44
44
  resizable: boolean;
45
+ /**
46
+ * Size of the drawer in pixel once the user start interacting.
47
+ * It corresponds to the height or the width depending on the drawer orientation
48
+ *
49
+ * @defaultValue `null`
50
+ */
51
+ size: number | null;
45
52
  }
46
53
  /**
47
54
  * Interface representing the properties for the Drawer component.
@@ -92,18 +99,6 @@ export interface DrawerProps extends DrawerCommonPropsAndState {
92
99
  * @defaultValue `''`
93
100
  */
94
101
  ariaDescribedBy: string;
95
- /**
96
- * The width of the drawer in pixels.
97
- *
98
- * @defaultValue `200`
99
- */
100
- width: number;
101
- /**
102
- * The height of the drawer in pixels.
103
- *
104
- * @defaultValue `200`
105
- */
106
- height: number;
107
102
  /**
108
103
  * If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable
109
104
  *
@@ -135,38 +130,54 @@ export interface DrawerProps extends DrawerCommonPropsAndState {
135
130
  */
136
131
  onShown: () => void;
137
132
  /**
138
- * An event emitted when the width is changed.
133
+ * An event emitted when the drawer size changes (width or height depending on the orientation).
139
134
  *
140
- * Event payload is equal to the newly selected width.
135
+ * Event payload is equal to the newly selected width or height.
141
136
  *
142
137
  * @defaultValue
143
138
  * ```ts
144
139
  * () => {}
145
140
  * ```
146
141
  */
147
- onWidthChange: (width: number) => void;
142
+ onSizeChange: (size: number | null) => void;
148
143
  /**
149
- * An event emitted when the height is changed.
144
+ * Event to be triggered when the visible property changes.
150
145
  *
151
- * Event payload is equal to the newly selected height.
146
+ * @param visible - new value of the visible propery
152
147
  *
153
148
  * @defaultValue
154
149
  * ```ts
155
150
  * () => {}
156
151
  * ```
157
152
  */
158
- onHeightChange: (width: number) => void;
153
+ onVisibleChange: (visible: boolean) => void;
159
154
  /**
160
- * Event to be triggered when the visible property changes.
155
+ * Event to be triggered when the minimized state changes.
161
156
  *
162
- * @param visible - new value of the visible propery
157
+ * @defaultValue
158
+ * ```ts
159
+ * () => {}
160
+ * ```
161
+ */
162
+ onMinimizedChange: (isMinimized: boolean) => void;
163
+ /**
164
+ * Event to be triggered when the maximized state changes.
163
165
  *
164
166
  * @defaultValue
165
167
  * ```ts
166
168
  * () => {}
167
169
  * ```
168
170
  */
169
- onVisibleChange: (visible: boolean) => void;
171
+ onMaximizedChange: (isMaximized: boolean) => void;
172
+ /**
173
+ * Event to be triggered when the user starts or stops resizing the drawer.
174
+ *
175
+ * @defaultValue
176
+ * ```ts
177
+ * () => {}
178
+ * ```
179
+ */
180
+ onResizingChange: (isResizing: boolean) => void;
170
181
  }
171
182
  /**
172
183
  * Represents the state of a Drawer component.
@@ -219,10 +230,6 @@ export interface DrawerDirectives {
219
230
  * Directive to put on the splitter DOM element.
220
231
  */
221
232
  splitterDirective: Directive;
222
- /**
223
- * Directive to put on the container DOM element in order for the drawer to size correctly.
224
- */
225
- containerDirective: Directive;
226
233
  }
227
234
  /**
228
235
  * Represents a Drawer widget component.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const drawer = require("../../drawer-DP7UPojk.cjs");
3
+ const drawer = require("../../drawer-DOi0TqZC.cjs");
4
4
  exports.createDrawer = drawer.createDrawer;
5
5
  exports.getDrawerDefaultConfig = drawer.getDrawerDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../drawer-D5SO73ew.js";
1
+ import { c, g } from "../../drawer-Caz4Uypu.js";
2
2
  export {
3
3
  c as createDrawer,
4
4
  g as getDrawerDefaultConfig
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const modal = require("../../modal-DiXZXYjR.cjs");
3
+ const modal = require("../../modal-B_3Uxplo.cjs");
4
4
  exports.createModal = modal.createModal;
5
5
  exports.getModalDefaultConfig = modal.getModalDefaultConfig;
6
6
  exports.modalCloseButtonClick = modal.modalCloseButtonClick;
@@ -1,4 +1,4 @@
1
- import { c, g, a, b, m } from "../../modal-CAvQW-vo.js";
1
+ import { c, g, a, b, m } from "../../modal-cKd3qUn1.js";
2
2
  export {
3
3
  c as createModal,
4
4
  g as getModalDefaultConfig,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const pagination = require("../../pagination-DvZ2rLsz.cjs");
3
+ const pagination = require("../../pagination-2Vor6JPZ.cjs");
4
4
  exports.createPagination = pagination.createPagination;
5
5
  exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../pagination-BKbMROV6.js";
1
+ import { c, g } from "../../pagination-DlOyP_2C.js";
2
2
  export {
3
3
  c as createPagination,
4
4
  g as getPaginationDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const progressbar = require("../../progressbar-i9xfAxb7.cjs");
3
+ const progressbar = require("../../progressbar-DyBRINco.cjs");
4
4
  exports.createProgressbar = progressbar.createProgressbar;
5
5
  exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../progressbar-D8zIcm9n.js";
1
+ import { c, g } from "../../progressbar-B5g76eMV.js";
2
2
  export {
3
3
  c as createProgressbar,
4
4
  g as getProgressbarDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const rating = require("../../rating-DmG4oUkr.cjs");
3
+ const rating = require("../../rating-C0y1j4SC.cjs");
4
4
  exports.createRating = rating.createRating;
5
5
  exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../rating-DEXTGWCU.js";
1
+ import { c, g } from "../../rating-C7C4-p4B.js";
2
2
  export {
3
3
  c as createRating,
4
4
  g as getRatingDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const select = require("../../select-MFjAnIt7.cjs");
3
+ const select = require("../../select-Dhsb9msC.cjs");
4
4
  exports.createSelect = select.createSelect;
5
5
  exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../select-Bw68Xdu5.js";
1
+ import { c, g } from "../../select-nnl00UWY.js";
2
2
  export {
3
3
  c as createSelect,
4
4
  g as getSelectDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const slider = require("../../slider-Dl4Trh32.cjs");
3
+ const slider = require("../../slider-DTO58syz.cjs");
4
4
  exports.createSlider = slider.createSlider;
5
5
  exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../slider-Cx50Eghd.js";
1
+ import { c, g } from "../../slider-B4WrdTeE.js";
2
2
  export {
3
3
  c as createSlider,
4
4
  g as getSliderDefaultConfig
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toaster = require("../../toaster-UDglac7x.cjs");
3
+ const toaster = require("../../toaster-CT148JSJ.cjs");
4
4
  exports.Toaster = toaster.Toaster;
5
5
  exports.createToast = toaster.createToast;
6
6
  exports.defaultToasterProps = toaster.defaultToasterProps;
@@ -1,4 +1,4 @@
1
- import { T, c, d, g } from "../../toaster-_p1GTtHI.js";
1
+ import { T, c, d, g } from "../../toaster-CRPErgI2.js";
2
2
  export {
3
3
  T as Toaster,
4
4
  c as createToast,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const tree = require("../../tree-rGHtmCnS.cjs");
3
+ const tree = require("../../tree-C4l2Wqny.cjs");
4
4
  exports.createTree = tree.createTree;
5
5
  exports.getTreeDefaultConfig = tree.getTreeDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../tree-DV0tfPlZ.js";
1
+ import { c, g } from "../../tree-CHpFqJPx.js";
2
2
  export {
3
3
  c as createTree,
4
4
  g as getTreeDefaultConfig
@@ -1,12 +1,74 @@
1
1
  "use strict";
2
2
  const esmEnv = require("esm-env");
3
- const utils_func = require("./utils/func.cjs");
4
3
  const tansu = require("@amadeus-it-group/tansu");
5
- const ssrHTMLElementAttributesAndStyle = Symbol("attributesAndStyle");
4
+ const utils_func = require("./utils/func.cjs");
5
+ const importantSuffixRegExp = /\s*!important$/;
6
+ const withoutImportant = (value) => value?.replace(importantSuffixRegExp, "") ?? "";
7
+ const toKebabCase = (str) => str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
8
+ const getStyleKeyFromDirectProp = (str) => {
9
+ if (typeof str !== "string" || str.startsWith("--")) {
10
+ return void 0;
11
+ }
12
+ return toKebabCase(str);
13
+ };
14
+ const getStyleKeyFromMethods = (str) => {
15
+ if (!str.startsWith("--") && str !== toKebabCase(str)) {
16
+ return void 0;
17
+ }
18
+ return str;
19
+ };
20
+ const ssrHTMLElementStyle = /* @__PURE__ */ Symbol("style");
21
+ class SSRStyle {
22
+ // all styles in kebab-case, including custom properties:
23
+ [ssrHTMLElementStyle] = {};
24
+ constructor() {
25
+ return new Proxy(this, {
26
+ get: (target, prop) => {
27
+ const styleKey = prop in target ? void 0 : getStyleKeyFromDirectProp(prop);
28
+ if (styleKey) {
29
+ return withoutImportant(target[ssrHTMLElementStyle][styleKey]);
30
+ } else {
31
+ return target[prop];
32
+ }
33
+ },
34
+ set: (target, prop, value) => {
35
+ const styleKey = prop in target ? void 0 : getStyleKeyFromDirectProp(prop);
36
+ if (styleKey) {
37
+ target.setProperty(styleKey, value);
38
+ } else {
39
+ target[prop] = value;
40
+ }
41
+ return true;
42
+ }
43
+ });
44
+ }
45
+ setProperty(property, value, priority) {
46
+ if (!value) {
47
+ this.removeProperty(property);
48
+ return;
49
+ }
50
+ const key = getStyleKeyFromMethods(property);
51
+ if (!key || priority !== "important" && priority !== "" && priority != null || importantSuffixRegExp.test(value)) {
52
+ return;
53
+ }
54
+ this[ssrHTMLElementStyle][key] = value + (priority ? " !important" : "");
55
+ }
56
+ removeProperty(property) {
57
+ const key = getStyleKeyFromMethods(property);
58
+ if (!key) {
59
+ return "";
60
+ }
61
+ const style = this[ssrHTMLElementStyle];
62
+ const value = style[key];
63
+ delete style[key];
64
+ return withoutImportant(value);
65
+ }
66
+ }
67
+ const ssrHTMLElementAttributesAndStyle = /* @__PURE__ */ Symbol("attributesAndStyle");
6
68
  const spaceRegExp = /\s+/;
7
69
  const ssrHTMLElement = () => {
8
70
  const attributes = {};
9
- const style = {};
71
+ const style = new SSRStyle();
10
72
  let classNames = /* @__PURE__ */ new Set();
11
73
  const toggleClass = (className, force = !classNames.has(className)) => {
12
74
  if (force) {
@@ -41,10 +103,12 @@ const ssrHTMLElement = () => {
41
103
  }
42
104
  },
43
105
  [ssrHTMLElementAttributesAndStyle]() {
44
- return { attributes: { ...attributes }, classNames: [...classNames], style: { ...style } };
106
+ return { attributes: { ...attributes }, classNames: [...classNames], style: { ...style[ssrHTMLElementStyle] } };
45
107
  }
46
108
  };
47
109
  };
110
+ const cssEscapeStyleName = (styleName) => styleName.replace(/([^\w-])/gi, "\\$1");
111
+ const cssTextFromObject = (style) => Object.entries(style).filter(([, value]) => !!value).map(([name, value]) => `${cssEscapeStyleName(name)}: ${value};`).join("");
48
112
  function r(e) {
49
113
  var t, f, n = "";
50
114
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -303,7 +367,7 @@ function directiveAttributes(...directives) {
303
367
  if (classNames.length) {
304
368
  attributes["class"] = classNames.join(" ");
305
369
  }
306
- const stringStyle = Object.entries(style).filter(([, value]) => !!value).map(([name, value]) => `${name}: ${value};`).join("");
370
+ const stringStyle = cssTextFromObject(style);
307
371
  if (stringStyle.length) {
308
372
  attributes["style"] = stringStyle;
309
373
  }
@@ -388,10 +452,16 @@ function bindAttribute(node, attributeName, value$) {
388
452
  const isClass = attributeName === "class";
389
453
  return isClass ? classNamesSubscribe(node, value$) : attributeSubscribe(node, attributeName, value$);
390
454
  }
455
+ const isCustomProperty = (styleName) => styleName.startsWith("--");
391
456
  function bindStyle(node, styleName, value$) {
392
457
  return value$.subscribe((value) => {
393
458
  const style = node.style;
394
- style[styleName] = "" + (notEmpty(value) ? value : "");
459
+ value = "" + (notEmpty(value) ? value : "");
460
+ if (isCustomProperty(styleName)) {
461
+ style.setProperty(styleName, value);
462
+ } else {
463
+ style[styleName] = value;
464
+ }
395
465
  });
396
466
  }
397
467
  function bindClassName(node, className, value$) {