@appius-fr/apx 2.7.1 → 2.8.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.
@@ -194,74 +194,74 @@ __webpack_require__.r(__webpack_exports__);
194
194
 
195
195
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
196
196
  // Module
197
- ___CSS_LOADER_EXPORT___.push([module.id, `/* APX Scrollable Table: scrollable tbody with fixed thead/tfoot and aligned columns (CSS Grid + subgrid)
198
- Use !important so page styles (e.g. display: table) do not override the grid layout. */
199
-
200
- /* --apx-scrollable-template-columns: set by JS (measured widths + gutter); fallback = equal columns + gutter */
201
- /* --apx-scrollable-gutter-width: space for vertical scrollbar so it does not overlap the last column (set to 0 to allow overlap) */
202
- /* --apx-scrollable-body-height: when class apx-scrollable-table--body-height is set, tbody row uses fixed height instead of max-height */
203
- .apx-scrollable-table {
204
- display: grid !important;
205
- grid-template-columns: var(--apx-scrollable-template-columns, repeat(var(--apx-scrollable-cols, 3), minmax(0, 1fr)) minmax(var(--apx-scrollable-gutter-width, 17px), var(--apx-scrollable-gutter-width, 17px)));
206
- grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;
207
- width: 100%;
208
- table-layout: unset !important;
209
- }
210
-
211
- .apx-scrollable-table--body-height {
212
- --apx-scrollable-body-row-size: var(--apx-scrollable-body-max-height, 200px);
213
- }
214
-
215
- /* Table with no tfoot: thead + tbody only */
216
- .apx-scrollable-table:not(.apx-scrollable-table--has-tfoot) {
217
- grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));
218
- }
219
-
220
- /* Table with no thead: tbody + tfoot only */
221
- .apx-scrollable-table.apx-scrollable-table--no-thead {
222
- grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;
223
- }
224
-
225
- /* Table with neither thead nor tfoot: tbody only */
226
- .apx-scrollable-table.apx-scrollable-table--no-thead:not(.apx-scrollable-table--has-tfoot) {
227
- grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));
228
- }
229
-
230
- /* --apx-scrollable-*-template-rows: set by JS (measured heights) or override in CSS / via options */
231
- .apx-scrollable-table > thead,
232
- .apx-scrollable-table > tbody,
233
- .apx-scrollable-table > tfoot {
234
- display: grid !important;
235
- grid-template-columns: subgrid;
236
- grid-column: 1 / -1;
237
- min-height: 0;
238
- }
239
-
240
- .apx-scrollable-table > thead {
241
- grid-template-rows: var(--apx-scrollable-thead-template-rows, repeat(var(--apx-scrollable-thead-rows, 1), auto));
242
- }
243
-
244
- .apx-scrollable-table > tbody {
245
- grid-template-rows: var(--apx-scrollable-tbody-template-rows, repeat(var(--apx-scrollable-tbody-rows, 1), auto));
246
- overflow: auto;
247
- }
248
-
249
- .apx-scrollable-table > tfoot {
250
- grid-template-rows: var(--apx-scrollable-tfoot-template-rows, repeat(var(--apx-scrollable-tfoot-rows, 1), auto));
251
- }
252
-
253
- .apx-scrollable-table > thead > tr,
254
- .apx-scrollable-table > tbody > tr,
255
- .apx-scrollable-table > tfoot > tr {
256
- display: contents !important;
257
- }
258
-
259
- .apx-scrollable-table th,
260
- .apx-scrollable-table td {
261
- min-width: 0;
262
- box-sizing: border-box;
263
- }
264
- `, "",{"version":3,"sources":["webpack://./modules/scrollableTable/css/scrollableTable.css"],"names":[],"mappings":"AAAA;yFACyF;;AAEzF,+GAA+G;AAC/G,mIAAmI;AACnI,yIAAyI;AACzI;IACI,wBAAwB;IACxB,+MAA+M;IAC/M,4HAA4H;IAC5H,WAAW;IACX,8BAA8B;AAClC;;AAEA;IACI,4EAA4E;AAChF;;AAEA,4CAA4C;AAC5C;IACI,uHAAuH;AAC3H;;AAEA,4CAA4C;AAC5C;IACI,uHAAuH;AAC3H;;AAEA,mDAAmD;AACnD;IACI,kHAAkH;AACtH;;AAEA,oGAAoG;AACpG;;;IAGI,wBAAwB;IACxB,8BAA8B;IAC9B,mBAAmB;IACnB,aAAa;AACjB;;AAEA;IACI,gHAAgH;AACpH;;AAEA;IACI,gHAAgH;IAChH,cAAc;AAClB;;AAEA;IACI,gHAAgH;AACpH;;AAEA;;;IAGI,4BAA4B;AAChC;;AAEA;;IAEI,YAAY;IACZ,sBAAsB;AAC1B","sourcesContent":["/* APX Scrollable Table: scrollable tbody with fixed thead/tfoot and aligned columns (CSS Grid + subgrid)\r\n Use !important so page styles (e.g. display: table) do not override the grid layout. */\r\n\r\n/* --apx-scrollable-template-columns: set by JS (measured widths + gutter); fallback = equal columns + gutter */\r\n/* --apx-scrollable-gutter-width: space for vertical scrollbar so it does not overlap the last column (set to 0 to allow overlap) */\r\n/* --apx-scrollable-body-height: when class apx-scrollable-table--body-height is set, tbody row uses fixed height instead of max-height */\r\n.apx-scrollable-table {\r\n display: grid !important;\r\n grid-template-columns: var(--apx-scrollable-template-columns, repeat(var(--apx-scrollable-cols, 3), minmax(0, 1fr)) minmax(var(--apx-scrollable-gutter-width, 17px), var(--apx-scrollable-gutter-width, 17px)));\r\n grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;\r\n width: 100%;\r\n table-layout: unset !important;\r\n}\r\n\r\n.apx-scrollable-table--body-height {\r\n --apx-scrollable-body-row-size: var(--apx-scrollable-body-max-height, 200px);\r\n}\r\n\r\n/* Table with no tfoot: thead + tbody only */\r\n.apx-scrollable-table:not(.apx-scrollable-table--has-tfoot) {\r\n grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));\r\n}\r\n\r\n/* Table with no thead: tbody + tfoot only */\r\n.apx-scrollable-table.apx-scrollable-table--no-thead {\r\n grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;\r\n}\r\n\r\n/* Table with neither thead nor tfoot: tbody only */\r\n.apx-scrollable-table.apx-scrollable-table--no-thead:not(.apx-scrollable-table--has-tfoot) {\r\n grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));\r\n}\r\n\r\n/* --apx-scrollable-*-template-rows: set by JS (measured heights) or override in CSS / via options */\r\n.apx-scrollable-table > thead,\r\n.apx-scrollable-table > tbody,\r\n.apx-scrollable-table > tfoot {\r\n display: grid !important;\r\n grid-template-columns: subgrid;\r\n grid-column: 1 / -1;\r\n min-height: 0;\r\n}\r\n\r\n.apx-scrollable-table > thead {\r\n grid-template-rows: var(--apx-scrollable-thead-template-rows, repeat(var(--apx-scrollable-thead-rows, 1), auto));\r\n}\r\n\r\n.apx-scrollable-table > tbody {\r\n grid-template-rows: var(--apx-scrollable-tbody-template-rows, repeat(var(--apx-scrollable-tbody-rows, 1), auto));\r\n overflow: auto;\r\n}\r\n\r\n.apx-scrollable-table > tfoot {\r\n grid-template-rows: var(--apx-scrollable-tfoot-template-rows, repeat(var(--apx-scrollable-tfoot-rows, 1), auto));\r\n}\r\n\r\n.apx-scrollable-table > thead > tr,\r\n.apx-scrollable-table > tbody > tr,\r\n.apx-scrollable-table > tfoot > tr {\r\n display: contents !important;\r\n}\r\n\r\n.apx-scrollable-table th,\r\n.apx-scrollable-table td {\r\n min-width: 0;\r\n box-sizing: border-box;\r\n}\r\n"],"sourceRoot":""}]);
197
+ ___CSS_LOADER_EXPORT___.push([module.id, `/* APX Scrollable Table: scrollable tbody with fixed thead/tfoot and aligned columns (CSS Grid + subgrid)
198
+ Use !important so page styles (e.g. display: table) do not override the grid layout. */
199
+
200
+ /* --apx-scrollable-template-columns: set by JS (measured widths + gutter); fallback = equal columns + gutter */
201
+ /* --apx-scrollable-gutter-width: space for vertical scrollbar so it does not overlap the last column (set to 0 to allow overlap) */
202
+ /* --apx-scrollable-body-height: when class apx-scrollable-table--body-height is set, tbody row uses fixed height instead of max-height */
203
+ .apx-scrollable-table {
204
+ display: grid !important;
205
+ grid-template-columns: var(--apx-scrollable-template-columns, repeat(var(--apx-scrollable-cols, 3), minmax(0, 1fr)) minmax(var(--apx-scrollable-gutter-width, 17px), var(--apx-scrollable-gutter-width, 17px)));
206
+ grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;
207
+ width: 100%;
208
+ table-layout: unset !important;
209
+ }
210
+
211
+ .apx-scrollable-table--body-height {
212
+ --apx-scrollable-body-row-size: var(--apx-scrollable-body-max-height, 200px);
213
+ }
214
+
215
+ /* Table with no tfoot: thead + tbody only */
216
+ .apx-scrollable-table:not(.apx-scrollable-table--has-tfoot) {
217
+ grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));
218
+ }
219
+
220
+ /* Table with no thead: tbody + tfoot only */
221
+ .apx-scrollable-table.apx-scrollable-table--no-thead {
222
+ grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;
223
+ }
224
+
225
+ /* Table with neither thead nor tfoot: tbody only */
226
+ .apx-scrollable-table.apx-scrollable-table--no-thead:not(.apx-scrollable-table--has-tfoot) {
227
+ grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));
228
+ }
229
+
230
+ /* --apx-scrollable-*-template-rows: set by JS (measured heights) or override in CSS / via options */
231
+ .apx-scrollable-table > thead,
232
+ .apx-scrollable-table > tbody,
233
+ .apx-scrollable-table > tfoot {
234
+ display: grid !important;
235
+ grid-template-columns: subgrid;
236
+ grid-column: 1 / -1;
237
+ min-height: 0;
238
+ }
239
+
240
+ .apx-scrollable-table > thead {
241
+ grid-template-rows: var(--apx-scrollable-thead-template-rows, repeat(var(--apx-scrollable-thead-rows, 1), auto));
242
+ }
243
+
244
+ .apx-scrollable-table > tbody {
245
+ grid-template-rows: var(--apx-scrollable-tbody-template-rows, repeat(var(--apx-scrollable-tbody-rows, 1), auto));
246
+ overflow: auto;
247
+ }
248
+
249
+ .apx-scrollable-table > tfoot {
250
+ grid-template-rows: var(--apx-scrollable-tfoot-template-rows, repeat(var(--apx-scrollable-tfoot-rows, 1), auto));
251
+ }
252
+
253
+ .apx-scrollable-table > thead > tr,
254
+ .apx-scrollable-table > tbody > tr,
255
+ .apx-scrollable-table > tfoot > tr {
256
+ display: contents !important;
257
+ }
258
+
259
+ .apx-scrollable-table th,
260
+ .apx-scrollable-table td {
261
+ min-width: 0;
262
+ box-sizing: border-box;
263
+ }
264
+ `, "",{"version":3,"sources":["webpack://./modules/scrollableTable/css/scrollableTable.css"],"names":[],"mappings":"AAAA;yFACyF;;AAEzF,+GAA+G;AAC/G,mIAAmI;AACnI,yIAAyI;AACzI;IACI,wBAAwB;IACxB,+MAA+M;IAC/M,4HAA4H;IAC5H,WAAW;IACX,8BAA8B;AAClC;;AAEA;IACI,4EAA4E;AAChF;;AAEA,4CAA4C;AAC5C;IACI,uHAAuH;AAC3H;;AAEA,4CAA4C;AAC5C;IACI,uHAAuH;AAC3H;;AAEA,mDAAmD;AACnD;IACI,kHAAkH;AACtH;;AAEA,oGAAoG;AACpG;;;IAGI,wBAAwB;IACxB,8BAA8B;IAC9B,mBAAmB;IACnB,aAAa;AACjB;;AAEA;IACI,gHAAgH;AACpH;;AAEA;IACI,gHAAgH;IAChH,cAAc;AAClB;;AAEA;IACI,gHAAgH;AACpH;;AAEA;;;IAGI,4BAA4B;AAChC;;AAEA;;IAEI,YAAY;IACZ,sBAAsB;AAC1B","sourcesContent":["/* APX Scrollable Table: scrollable tbody with fixed thead/tfoot and aligned columns (CSS Grid + subgrid)\n Use !important so page styles (e.g. display: table) do not override the grid layout. */\n\n/* --apx-scrollable-template-columns: set by JS (measured widths + gutter); fallback = equal columns + gutter */\n/* --apx-scrollable-gutter-width: space for vertical scrollbar so it does not overlap the last column (set to 0 to allow overlap) */\n/* --apx-scrollable-body-height: when class apx-scrollable-table--body-height is set, tbody row uses fixed height instead of max-height */\n.apx-scrollable-table {\n display: grid !important;\n grid-template-columns: var(--apx-scrollable-template-columns, repeat(var(--apx-scrollable-cols, 3), minmax(0, 1fr)) minmax(var(--apx-scrollable-gutter-width, 17px), var(--apx-scrollable-gutter-width, 17px)));\n grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;\n width: 100%;\n table-layout: unset !important;\n}\n\n.apx-scrollable-table--body-height {\n --apx-scrollable-body-row-size: var(--apx-scrollable-body-max-height, 200px);\n}\n\n/* Table with no tfoot: thead + tbody only */\n.apx-scrollable-table:not(.apx-scrollable-table--has-tfoot) {\n grid-template-rows: auto var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));\n}\n\n/* Table with no thead: tbody + tfoot only */\n.apx-scrollable-table.apx-scrollable-table--no-thead {\n grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px))) auto;\n}\n\n/* Table with neither thead nor tfoot: tbody only */\n.apx-scrollable-table.apx-scrollable-table--no-thead:not(.apx-scrollable-table--has-tfoot) {\n grid-template-rows: var(--apx-scrollable-body-row-size, fit-content(var(--apx-scrollable-body-max-height, 200px)));\n}\n\n/* --apx-scrollable-*-template-rows: set by JS (measured heights) or override in CSS / via options */\n.apx-scrollable-table > thead,\n.apx-scrollable-table > tbody,\n.apx-scrollable-table > tfoot {\n display: grid !important;\n grid-template-columns: subgrid;\n grid-column: 1 / -1;\n min-height: 0;\n}\n\n.apx-scrollable-table > thead {\n grid-template-rows: var(--apx-scrollable-thead-template-rows, repeat(var(--apx-scrollable-thead-rows, 1), auto));\n}\n\n.apx-scrollable-table > tbody {\n grid-template-rows: var(--apx-scrollable-tbody-template-rows, repeat(var(--apx-scrollable-tbody-rows, 1), auto));\n overflow: auto;\n}\n\n.apx-scrollable-table > tfoot {\n grid-template-rows: var(--apx-scrollable-tfoot-template-rows, repeat(var(--apx-scrollable-tfoot-rows, 1), auto));\n}\n\n.apx-scrollable-table > thead > tr,\n.apx-scrollable-table > tbody > tr,\n.apx-scrollable-table > tfoot > tr {\n display: contents !important;\n}\n\n.apx-scrollable-table th,\n.apx-scrollable-table td {\n min-width: 0;\n box-sizing: border-box;\n}\n"],"sourceRoot":""}]);
265
265
  // Exports
266
266
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
267
267
 
@@ -1274,34 +1274,6 @@ module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%
1274
1274
  "use strict";
1275
1275
  module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 8L24 24M24 8L8 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E";
1276
1276
 
1277
- /***/ }),
1278
-
1279
- /***/ "./modules/common.mjs":
1280
- /*!****************************!*\
1281
- !*** ./modules/common.mjs ***!
1282
- \****************************/
1283
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1284
-
1285
- "use strict";
1286
- __webpack_require__.r(__webpack_exports__);
1287
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1288
- /* harmony export */ loadCss: () => (/* binding */ loadCss)
1289
- /* harmony export */ });
1290
- // Function to load the CSS from a given URL
1291
- function loadCss(url) {
1292
- return fetch(url).then(function (response) {
1293
- return response.text();
1294
- }).then(function (css) {
1295
- var styleSheet = document.createElement("style");
1296
- styleSheet.type = "text/css";
1297
- styleSheet.textContent = css; // Use textContent instead of innerText
1298
- document.head.appendChild(styleSheet);
1299
- })["catch"](function (error) {
1300
- console.error("Failed to load CSS:", error);
1301
- });
1302
- }
1303
-
1304
-
1305
1277
  /***/ }),
1306
1278
 
1307
1279
  /***/ "./modules/dialog/dialog.mjs":
@@ -1921,6 +1893,7 @@ __webpack_require__.r(__webpack_exports__);
1921
1893
  /* harmony export */ "default": () => (/* binding */ augmentWithScrollableTable)
1922
1894
  /* harmony export */ });
1923
1895
  /* harmony import */ var _css_scrollableTable_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/scrollableTable.css */ "./modules/scrollableTable/css/scrollableTable.css");
1896
+ /* harmony import */ var _tools_getScrollbarSize_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/getScrollbarSize.mjs */ "./modules/tools/getScrollbarSize.mjs");
1924
1897
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1925
1898
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1926
1899
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -1935,9 +1908,11 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
1935
1908
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1936
1909
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1937
1910
 
1911
+
1938
1912
  var DATA_KEY = '_apxScrollableTable';
1939
1913
  var CLASS_TABLE = 'apx-scrollable-table';
1940
1914
  var DEFAULT_MAX_HEIGHT = '200px';
1915
+ var DEFAULT_GUTTER_PX = 17;
1941
1916
  var THROTTLE_MS = 16;
1942
1917
 
1943
1918
  /** @type {Set<HTMLTableElement>} */
@@ -1955,10 +1930,10 @@ var throttleLast = 0;
1955
1930
  /** @type {number|null} */
1956
1931
  var throttleRaf = null;
1957
1932
 
1958
- /**
1959
- * Sum of colspans for one row (direct th/td children of tr).
1960
- * @param {HTMLTableRowElement} tr
1961
- * @returns {number}
1933
+ /**
1934
+ * Sum of colspans for one row (direct th/td children of tr).
1935
+ * @param {HTMLTableRowElement} tr
1936
+ * @returns {number}
1962
1937
  */
1963
1938
  function getRowColumnCount(tr) {
1964
1939
  var cols = 0;
@@ -1968,10 +1943,10 @@ function getRowColumnCount(tr) {
1968
1943
  return cols;
1969
1944
  }
1970
1945
 
1971
- /**
1972
- * Get maximum column count in a section (max sum of colspans across all rows).
1973
- * @param {HTMLTableSectionElement} section - thead, tbody, or tfoot
1974
- * @returns {number}
1946
+ /**
1947
+ * Get maximum column count in a section (max sum of colspans across all rows).
1948
+ * @param {HTMLTableSectionElement} section - thead, tbody, or tfoot
1949
+ * @returns {number}
1975
1950
  */
1976
1951
  function getColumnCountFromSection(section) {
1977
1952
  if (!section) return 0;
@@ -1984,10 +1959,10 @@ function getColumnCountFromSection(section) {
1984
1959
  return maxCols;
1985
1960
  }
1986
1961
 
1987
- /**
1988
- * Get total column count for the table (max across thead, tbody, tfoot).
1989
- * @param {HTMLTableElement} table
1990
- * @returns {number}
1962
+ /**
1963
+ * Get total column count for the table (max across thead, tbody, tfoot).
1964
+ * @param {HTMLTableElement} table
1965
+ * @returns {number}
1991
1966
  */
1992
1967
  function getTableColumnCount(table) {
1993
1968
  var thead = table.querySelector('thead');
@@ -1999,12 +1974,12 @@ function getTableColumnCount(table) {
1999
1974
  return Math.max(countThead, countTbody, countTfoot, 1);
2000
1975
  }
2001
1976
 
2002
- /**
2003
- * Measure current column widths from the table in its natural layout (before applying scrollable class).
2004
- * Prefers a row where each cell has colspan 1 so we get one width per column; otherwise splits cell widths by colspan.
2005
- * @param {HTMLTableElement} table - table not yet with scrollable class
2006
- * @param {number} numCols
2007
- * @returns {number[]} pixel widths per column
1977
+ /**
1978
+ * Measure current column widths from the table in its natural layout (before applying scrollable class).
1979
+ * Prefers a row where each cell has colspan 1 so we get one width per column; otherwise splits cell widths by colspan.
1980
+ * @param {HTMLTableElement} table - table not yet with scrollable class
1981
+ * @param {number} numCols
1982
+ * @returns {number[]} pixel widths per column
2008
1983
  */
2009
1984
  function measureColumnWidths(table, numCols) {
2010
1985
  var thead = table.querySelector('thead');
@@ -2079,23 +2054,23 @@ function measureColumnWidths(table, numCols) {
2079
2054
  return widths.slice(0, numCols);
2080
2055
  }
2081
2056
 
2082
- /**
2083
- * Count direct tr children in a section.
2084
- * @param {HTMLTableSectionElement} section
2085
- * @returns {number}
2057
+ /**
2058
+ * Count direct tr children in a section.
2059
+ * @param {HTMLTableSectionElement} section
2060
+ * @returns {number}
2086
2061
  */
2087
2062
  function getRowCount(section) {
2088
2063
  if (!section) return 0;
2089
2064
  return section.querySelectorAll(':scope > tr').length;
2090
2065
  }
2091
2066
 
2092
- /**
2093
- * Build a 2D grid of occupied slots for a section (for rowspan/colspan placement).
2094
- * Place each cell in DOM order; return a list of { cell, row, col, colspan, rowspan }.
2095
- * @param {HTMLTableSectionElement} section
2096
- * @param {number} numRows
2097
- * @param {number} numCols
2098
- * @returns {{ cell: HTMLTableCellElement, row: number, col: number, colspan: number, rowspan: number }[]}
2067
+ /**
2068
+ * Build a 2D grid of occupied slots for a section (for rowspan/colspan placement).
2069
+ * Place each cell in DOM order; return a list of { cell, row, col, colspan, rowspan }.
2070
+ * @param {HTMLTableSectionElement} section
2071
+ * @param {number} numRows
2072
+ * @param {number} numCols
2073
+ * @returns {{ cell: HTMLTableCellElement, row: number, col: number, colspan: number, rowspan: number }[]}
2099
2074
  */
2100
2075
  function computeCellPlacements(section, numRows, numCols) {
2101
2076
  if (!section || numRows === 0 || numCols === 0) return [];
@@ -2151,8 +2126,8 @@ function computeCellPlacements(section, numRows, numCols) {
2151
2126
  return placements;
2152
2127
  }
2153
2128
 
2154
- /**
2155
- * Apply grid placement styles to a list of placements (1-based line numbers for CSS Grid).
2129
+ /**
2130
+ * Apply grid placement styles to a list of placements (1-based line numbers for CSS Grid).
2156
2131
  */
2157
2132
  function applyPlacements(placements) {
2158
2133
  placements.forEach(function (_ref) {
@@ -2166,9 +2141,9 @@ function applyPlacements(placements) {
2166
2141
  });
2167
2142
  }
2168
2143
 
2169
- /**
2170
- * Clear grid placement styles from all th/td in a table (for refresh).
2171
- * @param {HTMLTableElement} table
2144
+ /**
2145
+ * Clear grid placement styles from all th/td in a table (for refresh).
2146
+ * @param {HTMLTableElement} table
2172
2147
  */
2173
2148
  function clearPlacements(table) {
2174
2149
  table.querySelectorAll('th, td').forEach(function (cell) {
@@ -2177,10 +2152,10 @@ function clearPlacements(table) {
2177
2152
  });
2178
2153
  }
2179
2154
 
2180
- /**
2181
- * Normalize height/maxHeight option to a CSS length string.
2182
- * @param {number|string} value
2183
- * @returns {string}
2155
+ /**
2156
+ * Normalize height/maxHeight option to a CSS length string.
2157
+ * @param {number|string} value
2158
+ * @returns {string}
2184
2159
  */
2185
2160
  function normalizeHeight(value) {
2186
2161
  if (value == null) return DEFAULT_MAX_HEIGHT;
@@ -2188,11 +2163,11 @@ function normalizeHeight(value) {
2188
2163
  return String(value);
2189
2164
  }
2190
2165
 
2191
- /**
2192
- * Resolve current body height from options: either bodyHeightDynamic.get(table) or static height/maxHeight.
2193
- * @param {Object} options - scrollableTable options (may include bodyHeightDynamic, height, maxHeight)
2194
- * @param {HTMLTableElement} table
2195
- * @returns {{ bodySize: string, useFixedHeight: boolean }}
2166
+ /**
2167
+ * Resolve current body height from options: either bodyHeightDynamic.get(table) or static height/maxHeight.
2168
+ * @param {Object} options - scrollableTable options (may include bodyHeightDynamic, height, maxHeight)
2169
+ * @param {HTMLTableElement} table
2170
+ * @returns {{ bodySize: string, useFixedHeight: boolean }}
2196
2171
  */
2197
2172
  function resolveBodyHeight(options, table) {
2198
2173
  var dyn = options.bodyHeightDynamic;
@@ -2214,10 +2189,10 @@ function resolveBodyHeight(options, table) {
2214
2189
  };
2215
2190
  }
2216
2191
 
2217
- /**
2218
- * Update only the tbody height CSS variable and class (used on scroll/resize for dynamic height).
2219
- * @param {HTMLTableElement} table
2220
- * @param {Object} options - full scrollableTable options (with ref.options when called from throttle)
2192
+ /**
2193
+ * Update only the tbody height CSS variable and class (used on scroll/resize for dynamic height).
2194
+ * @param {HTMLTableElement} table
2195
+ * @param {Object} options - full scrollableTable options (with ref.options when called from throttle)
2221
2196
  */
2222
2197
  function updateTableBodyHeight(table, options) {
2223
2198
  var _resolveBodyHeight = resolveBodyHeight(options, table),
@@ -2227,8 +2202,8 @@ function updateTableBodyHeight(table, options) {
2227
2202
  table.classList.toggle('apx-scrollable-table--body-height', useFixedHeight);
2228
2203
  }
2229
2204
 
2230
- /**
2231
- * Run lazy cleanup then updateTableBodyHeight for all tables still in dynamicTables. (Called by throttled entry point or RAF.)
2205
+ /**
2206
+ * Run lazy cleanup then updateTableBodyHeight for all tables still in dynamicTables. (Called by throttled entry point or RAF.)
2232
2207
  */
2233
2208
  function flushDynamicHeightUpdate() {
2234
2209
  var toRemove = [];
@@ -2244,8 +2219,8 @@ function flushDynamicHeightUpdate() {
2244
2219
  });
2245
2220
  }
2246
2221
 
2247
- /**
2248
- * Throttled entry: run flushDynamicHeightUpdate now or schedule with RAF.
2222
+ /**
2223
+ * Throttled entry: run flushDynamicHeightUpdate now or schedule with RAF.
2249
2224
  */
2250
2225
  function runDynamicHeightUpdate() {
2251
2226
  var now = Date.now();
@@ -2263,10 +2238,10 @@ function runDynamicHeightUpdate() {
2263
2238
  flushDynamicHeightUpdate();
2264
2239
  }
2265
2240
 
2266
- /**
2267
- * Resolve updateOn into scroll targets (Element[]) and resize: { window: boolean, elements: Element[] }.
2268
- * @param {Object} options - options.bodyHeightDynamic.updateOn
2269
- * @returns {{ scrollTargets: Element[], resizeWindow: boolean, resizeElements: Element[] }}
2241
+ /**
2242
+ * Resolve updateOn into scroll targets (Element[]) and resize: { window: boolean, elements: Element[] }.
2243
+ * @param {Object} options - options.bodyHeightDynamic.updateOn
2244
+ * @returns {{ scrollTargets: Element[], resizeWindow: boolean, resizeElements: Element[] }}
2270
2245
  */
2271
2246
  function resolveUpdateOn(options) {
2272
2247
  var _options$bodyHeightDy;
@@ -2299,9 +2274,9 @@ function resolveUpdateOn(options) {
2299
2274
  };
2300
2275
  }
2301
2276
 
2302
- /**
2303
- * Remove table from dynamicTables and from all scroll/resize Maps; detach listeners if Set becomes empty.
2304
- * @param {HTMLTableElement} table
2277
+ /**
2278
+ * Remove table from dynamicTables and from all scroll/resize Maps; detach listeners if Set becomes empty.
2279
+ * @param {HTMLTableElement} table
2305
2280
  */
2306
2281
  function removeTableFromDynamicSources(table) {
2307
2282
  dynamicTables["delete"](table);
@@ -2331,10 +2306,10 @@ function onResizeThrottled() {
2331
2306
  runDynamicHeightUpdate();
2332
2307
  }
2333
2308
 
2334
- /**
2335
- * Register a table with bodyHeightDynamic: add to Set and attach scroll/resize listeners per updateOn.
2336
- * @param {HTMLTableElement} table
2337
- * @param {Object} options - full options (ref.options)
2309
+ /**
2310
+ * Register a table with bodyHeightDynamic: add to Set and attach scroll/resize listeners per updateOn.
2311
+ * @param {HTMLTableElement} table
2312
+ * @param {Object} options - full options (ref.options)
2338
2313
  */
2339
2314
  function registerDynamicTable(table, options) {
2340
2315
  var _resolveUpdateOn = resolveUpdateOn(options),
@@ -2373,14 +2348,16 @@ function registerDynamicTable(table, options) {
2373
2348
  });
2374
2349
  }
2375
2350
 
2376
- /**
2377
- * Build grid-template-columns from measured widths and optional overrides per column.
2378
- * @param {number} numCols
2379
- * @param {number[]} columnWidths
2380
- * @param {Object<number, string>|(string|null)[]} columnOverrides - map column index → CSS value (e.g. '2fr'), or array; null/empty = use measured
2381
- * @returns {string}
2351
+ /**
2352
+ * Build grid-template-columns from measured widths and optional overrides per column.
2353
+ * @param {number} numCols
2354
+ * @param {number[]} columnWidths
2355
+ * @param {Object<number, string>|(string|null)[]} columnOverrides - map column index → CSS value (e.g. '2fr'), or array; null/empty = use measured
2356
+ * @param {string} [unit='fr'] - CSS unit for measured widths ('fr' or 'px')
2357
+ * @returns {string}
2382
2358
  */
2383
2359
  function buildTemplateColumns(numCols, columnWidths, columnOverrides) {
2360
+ var unit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fr';
2384
2361
  if (!columnWidths || columnWidths.length !== numCols) return '';
2385
2362
  var get = function get(i) {
2386
2363
  return Array.isArray(columnOverrides) ? columnOverrides[i] : columnOverrides[i];
@@ -2391,20 +2368,22 @@ function buildTemplateColumns(numCols, columnWidths, columnOverrides) {
2391
2368
  if (ov != null && typeof ov === 'string' && ov.trim() !== '') {
2392
2369
  parts.push(ov.trim());
2393
2370
  } else {
2394
- parts.push("".concat(Math.round(columnWidths[i]), "fr"));
2371
+ parts.push("".concat(Math.round(columnWidths[i])).concat(unit));
2395
2372
  }
2396
2373
  }
2397
2374
  return parts.join(' ');
2398
2375
  }
2399
2376
 
2400
- /**
2401
- * Build grid-template-rows from measured heights and optional overrides per row.
2402
- * @param {number} numRows
2403
- * @param {number[]} rowHeights
2404
- * @param {Object<number, string>|(string|null)[]} rowOverrides - map row index → CSS value (e.g. '48px', '2fr'), or array; null/empty = use measured
2405
- * @returns {string}
2377
+ /**
2378
+ * Build grid-template-rows from measured heights and optional overrides per row.
2379
+ * @param {number} numRows
2380
+ * @param {number[]} rowHeights
2381
+ * @param {Object<number, string>|(string|null)[]} rowOverrides - map row index → CSS value (e.g. '48px', '2fr'), or array; null/empty = use measured
2382
+ * @param {string} [unit='px'] - CSS unit for measured heights ('px' or 'fr')
2383
+ * @returns {string}
2406
2384
  */
2407
2385
  function buildTemplateRows(numRows, rowHeights, rowOverrides) {
2386
+ var unit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'px';
2408
2387
  if (!rowHeights || rowHeights.length < numRows) return '';
2409
2388
  var get = function get(i) {
2410
2389
  return Array.isArray(rowOverrides) ? rowOverrides[i] : rowOverrides === null || rowOverrides === void 0 ? void 0 : rowOverrides[i];
@@ -2416,16 +2395,16 @@ function buildTemplateRows(numRows, rowHeights, rowOverrides) {
2416
2395
  parts.push(ov.trim());
2417
2396
  } else {
2418
2397
  var _rowHeights$i;
2419
- parts.push("".concat(Math.round((_rowHeights$i = rowHeights[i]) !== null && _rowHeights$i !== void 0 ? _rowHeights$i : 0), "px"));
2398
+ parts.push("".concat(Math.round((_rowHeights$i = rowHeights[i]) !== null && _rowHeights$i !== void 0 ? _rowHeights$i : 0)).concat(unit));
2420
2399
  }
2421
2400
  }
2422
2401
  return parts.join(' ');
2423
2402
  }
2424
2403
 
2425
- /**
2426
- * Measure each tr height in a section (table must not yet have scrollable class).
2427
- * @param {HTMLTableSectionElement|null} section
2428
- * @returns {number[]}
2404
+ /**
2405
+ * Measure each tr height in a section (table must not yet have scrollable class).
2406
+ * @param {HTMLTableSectionElement|null} section
2407
+ * @returns {number[]}
2429
2408
  */
2430
2409
  function measureRowHeights(section) {
2431
2410
  if (!section) return [];
@@ -2435,21 +2414,22 @@ function measureRowHeights(section) {
2435
2414
  });
2436
2415
  }
2437
2416
 
2438
- /**
2439
- * Apply scrollable table layout to a single table.
2440
- * @param {HTMLTableElement} table
2441
- * @param {Object} options - scrollableTable options
2442
- * @param {number|string} [options.maxHeight] - Max height of tbody (default '200px'). Ignored when height or bodyHeightDynamic is set.
2443
- * @param {number|string} [options.height] - Fixed height of tbody. Ignored when bodyHeightDynamic is set.
2444
- * @param {{ get: (function(HTMLTableElement): number|string), useAs: 'height'|'maxHeight', updateOn?: { scroll?: boolean, resize?: boolean, scrollOn?: ('document'|Element)[], resizeOn?: ('window'|Element)[] } }} [options.bodyHeightDynamic] - When set, body size is computed by get(table) and re-applied when scroll/resize sources fire. updateOn: scrollOn/resizeOn list elements (sentinels 'document'/'window'); or use scroll (default false) / resize (default true) booleans.
2445
- * @param {string} [options.gridTemplateColumns]
2446
- * @param {{ thead?: string, tbody?: string, tfoot?: string }} [options.gridTemplateRows]
2447
- * @param {{ thead?: Object<number, string>|(string|null)[], tbody?: Object<number, string>|(string|null)[], tfoot?: Object<number, string>|(string|null)[] }} [options.rowOverrides]
2448
- * @param {Object<number, string>|(string|null)[]} [options.columnOverrides]
2449
- * @param {{ columnWidths?: number[], rowHeights?: { thead?: number[], tbody?: number[], tfoot?: number[] } } | undefined} ref - existing ref when refreshing
2417
+ /**
2418
+ * Apply scrollable table layout to a single table.
2419
+ * @param {HTMLTableElement} table
2420
+ * @param {Object} options - scrollableTable options
2421
+ * @param {number|string} [options.maxHeight] - Max height of tbody (default '200px'). Ignored when height or bodyHeightDynamic is set.
2422
+ * @param {number|string} [options.height] - Fixed height of tbody. Ignored when bodyHeightDynamic is set.
2423
+ * @param {{ get: (function(HTMLTableElement): number|string), useAs: 'height'|'maxHeight', updateOn?: { scroll?: boolean, resize?: boolean, scrollOn?: ('document'|Element)[], resizeOn?: ('window'|Element)[] } }} [options.bodyHeightDynamic] - When set, body size is computed by get(table) and re-applied when scroll/resize sources fire. updateOn: scrollOn/resizeOn list elements (sentinels 'document'/'window'); or use scroll (default false) / resize (default true) booleans.
2424
+ * @param {string} [options.gridTemplateColumns]
2425
+ * @param {{ thead?: string, tbody?: string, tfoot?: string }} [options.gridTemplateRows]
2426
+ * @param {{ thead?: Object<number, string>|(string|null)[], tbody?: Object<number, string>|(string|null)[], tfoot?: Object<number, string>|(string|null)[] }} [options.rowOverrides]
2427
+ * @param {Object<number, string>|(string|null)[]} [options.columnOverrides]
2428
+ * @param {{ cols?: string, rows?: string }} [options.defaultSizingUnit] - CSS unit for measured widths/heights. cols defaults to 'fr', rows defaults to 'px'.
2429
+ * @param {{ columnWidths?: number[], rowHeights?: { thead?: number[], tbody?: number[], tfoot?: number[] } } | undefined} ref - existing ref when refreshing
2450
2430
  */
2451
2431
  function applyScrollableTable(table, options, ref) {
2452
- var _ref$columnWidths, _ref$rowHeights;
2432
+ var _ref$columnWidths, _ref$rowHeights, _options$defaultSizin, _options$defaultSizin2;
2453
2433
  var thead = table.querySelector('thead');
2454
2434
  var tbody = table.querySelector('tbody');
2455
2435
  var tfoot = table.querySelector('tfoot');
@@ -2483,12 +2463,23 @@ function applyScrollableTable(table, options, ref) {
2483
2463
  // Without this, the browser batches class + template into one pass and the tbody overflows horizontally.
2484
2464
  table.offsetHeight; // eslint-disable-line no-unused-expressions
2485
2465
 
2486
- var gutterSuffix = ' minmax(var(--apx-scrollable-gutter-width, 17px), var(--apx-scrollable-gutter-width, 17px))';
2466
+ var colUnit = ((_options$defaultSizin = options.defaultSizingUnit) === null || _options$defaultSizin === void 0 ? void 0 : _options$defaultSizin.cols) || 'fr';
2467
+ var rowUnit = ((_options$defaultSizin2 = options.defaultSizingUnit) === null || _options$defaultSizin2 === void 0 ? void 0 : _options$defaultSizin2.rows) || 'px';
2468
+ var gutterFallbackPx = DEFAULT_GUTTER_PX;
2469
+ try {
2470
+ var measured = (0,_tools_getScrollbarSize_mjs__WEBPACK_IMPORTED_MODULE_1__.getScrollbarSize)('vertical');
2471
+ if (typeof measured === 'number' && Number.isFinite(measured) && measured >= 0) {
2472
+ gutterFallbackPx = measured;
2473
+ }
2474
+ } catch (_) {
2475
+ /* use DEFAULT_GUTTER_PX */
2476
+ }
2477
+ var gutterSuffix = " minmax(var(--apx-scrollable-gutter-width, ".concat(gutterFallbackPx, "px), var(--apx-scrollable-gutter-width, ").concat(gutterFallbackPx, "px))");
2487
2478
  if (customTemplate) {
2488
2479
  table.style.setProperty('--apx-scrollable-template-columns', options.gridTemplateColumns.trim() + gutterSuffix);
2489
2480
  } else if (columnWidths && columnWidths.length === numCols) {
2490
- var template = options.columnOverrides != null ? buildTemplateColumns(numCols, columnWidths, options.columnOverrides) : columnWidths.map(function (w) {
2491
- return "".concat(Math.round(w), "fr");
2481
+ var template = options.columnOverrides != null ? buildTemplateColumns(numCols, columnWidths, options.columnOverrides, colUnit) : columnWidths.map(function (w) {
2482
+ return "".concat(Math.round(w)).concat(colUnit);
2492
2483
  }).join(' ');
2493
2484
  table.style.setProperty('--apx-scrollable-template-columns', template + gutterSuffix);
2494
2485
  } else {
@@ -2525,8 +2516,8 @@ function applyScrollableTable(table, options, ref) {
2525
2516
  if (typeof custom === 'string' && custom.trim().length > 0) {
2526
2517
  section.style.setProperty(varName, custom.trim());
2527
2518
  } else if (heights && heights.length >= rows) {
2528
- var _template = overrides != null ? buildTemplateRows(rows, heights.slice(0, rows), overrides) : heights.slice(0, rows).map(function (h) {
2529
- return "".concat(Math.round(h), "px");
2519
+ var _template = overrides != null ? buildTemplateRows(rows, heights.slice(0, rows), overrides, rowUnit) : heights.slice(0, rows).map(function (h) {
2520
+ return "".concat(Math.round(h)).concat(rowUnit);
2530
2521
  }).join(' ');
2531
2522
  section.style.setProperty(varName, _template);
2532
2523
  } else {
@@ -2541,14 +2532,14 @@ function applyScrollableTable(table, options, ref) {
2541
2532
  };
2542
2533
  }
2543
2534
 
2544
- /**
2545
- * Augments the APX object with scrollableTable(options | 'refresh').
2546
- * Makes the tbody of a table scrollable while keeping thead/tfoot fixed and columns aligned (CSS Grid + subgrid).
2547
- *
2548
- * @param {Object} apx - The APX object to augment.
2549
- * @example
2550
- * APX('table.data-grid').scrollableTable({ maxHeight: 300 });
2551
- * APX('table.data-grid').scrollableTable('refresh');
2535
+ /**
2536
+ * Augments the APX object with scrollableTable(options | 'refresh').
2537
+ * Makes the tbody of a table scrollable while keeping thead/tfoot fixed and columns aligned (CSS Grid + subgrid).
2538
+ *
2539
+ * @param {Object} apx - The APX object to augment.
2540
+ * @example
2541
+ * APX('table.data-grid').scrollableTable({ maxHeight: 300 });
2542
+ * APX('table.data-grid').scrollableTable('refresh');
2552
2543
  */
2553
2544
  function augmentWithScrollableTable(apx) {
2554
2545
  apx.scrollableTable = function (optionsOrAction) {
@@ -3917,24 +3908,34 @@ Object.assign(toast, {
3917
3908
  __webpack_require__.r(__webpack_exports__);
3918
3909
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3919
3910
  /* harmony export */ augmentWithPack: () => (/* reexport safe */ _form_packer_augment_apx_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
3911
+ /* harmony export */ getScrollbarSize: () => (/* reexport safe */ _getScrollbarSize_mjs__WEBPACK_IMPORTED_MODULE_2__.getScrollbarSize),
3912
+ /* harmony export */ loadCss: () => (/* reexport safe */ _loadCss_mjs__WEBPACK_IMPORTED_MODULE_3__.loadCss),
3920
3913
  /* harmony export */ packFormToJSON: () => (/* reexport safe */ _form_packer_packToJson_mjs__WEBPACK_IMPORTED_MODULE_1__.packFormToJSON),
3921
3914
  /* harmony export */ tools: () => (/* binding */ tools)
3922
3915
  /* harmony export */ });
3923
3916
  /* harmony import */ var _form_packer_augment_apx_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form-packer/augment-apx.mjs */ "./modules/tools/form-packer/augment-apx.mjs");
3924
3917
  /* harmony import */ var _form_packer_packToJson_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form-packer/packToJson.mjs */ "./modules/tools/form-packer/packToJson.mjs");
3918
+ /* harmony import */ var _getScrollbarSize_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScrollbarSize.mjs */ "./modules/tools/getScrollbarSize.mjs");
3919
+ /* harmony import */ var _loadCss_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./loadCss.mjs */ "./modules/tools/loadCss.mjs");
3925
3920
  // Import des fonctions et modules des sous-modules
3926
3921
 
3927
3922
 
3928
3923
 
3924
+
3925
+
3929
3926
  // Export de la fonction d'augmentation
3930
3927
 
3931
3928
 
3932
3929
  // Export des fonctions utilitaires
3933
3930
 
3934
3931
 
3932
+
3933
+
3935
3934
  // Export d'un objet tools pour faciliter l'utilisation
3936
3935
  var tools = {
3937
- packFormToJSON: _form_packer_packToJson_mjs__WEBPACK_IMPORTED_MODULE_1__.packFormToJSON
3936
+ packFormToJSON: _form_packer_packToJson_mjs__WEBPACK_IMPORTED_MODULE_1__.packFormToJSON,
3937
+ getScrollbarSize: _getScrollbarSize_mjs__WEBPACK_IMPORTED_MODULE_2__.getScrollbarSize,
3938
+ loadCss: _loadCss_mjs__WEBPACK_IMPORTED_MODULE_3__.loadCss
3938
3939
  };
3939
3940
 
3940
3941
  /***/ }),
@@ -4649,6 +4650,96 @@ var isPlainObject = function isPlainObject(obj) {
4649
4650
 
4650
4651
  /***/ }),
4651
4652
 
4653
+ /***/ "./modules/tools/getScrollbarSize.mjs":
4654
+ /*!********************************************!*\
4655
+ !*** ./modules/tools/getScrollbarSize.mjs ***!
4656
+ \********************************************/
4657
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4658
+
4659
+ "use strict";
4660
+ __webpack_require__.r(__webpack_exports__);
4661
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4662
+ /* harmony export */ getScrollbarSize: () => (/* binding */ getScrollbarSize)
4663
+ /* harmony export */ });
4664
+ function getScrollbarSize() {
4665
+ var _getScrollbarSize$_ca;
4666
+ var orientation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "vertical";
4667
+ if (!getScrollbarSize._cache) {
4668
+ var outer = document.createElement("div");
4669
+ Object.assign(outer.style, {
4670
+ position: "absolute",
4671
+ top: "-9999px",
4672
+ left: "-9999px",
4673
+ width: "100px",
4674
+ height: "100px",
4675
+ overflow: "scroll"
4676
+ });
4677
+ document.body.appendChild(outer);
4678
+ getScrollbarSize._cache = {
4679
+ vertical: outer.offsetWidth - outer.clientWidth,
4680
+ horizontal: outer.offsetHeight - outer.clientHeight
4681
+ };
4682
+ outer.remove();
4683
+ }
4684
+ return (_getScrollbarSize$_ca = getScrollbarSize._cache[orientation]) !== null && _getScrollbarSize$_ca !== void 0 ? _getScrollbarSize$_ca : 0;
4685
+ }
4686
+
4687
+ /***/ }),
4688
+
4689
+ /***/ "./modules/tools/loadCss.mjs":
4690
+ /*!***********************************!*\
4691
+ !*** ./modules/tools/loadCss.mjs ***!
4692
+ \***********************************/
4693
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4694
+
4695
+ "use strict";
4696
+ __webpack_require__.r(__webpack_exports__);
4697
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4698
+ /* harmony export */ loadCss: () => (/* binding */ loadCss)
4699
+ /* harmony export */ });
4700
+ var loadCssCache = new Map();
4701
+
4702
+ /**
4703
+ * Loads CSS from a URL and injects it into the document.
4704
+ * Idempotent: same URL returns the same Promise; duplicate loads are avoided.
4705
+ * @param {string} url - URL of the CSS file to load
4706
+ * @param {{ id?: string, media?: string, before?: Node }} [options] - Optional: id and media for the style element, before for insertion point
4707
+ * @returns {Promise<HTMLStyleElement>} Resolves with the injected style element; rejects on fetch failure or non-ok response
4708
+ */
4709
+ function loadCss(url) {
4710
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4711
+ var cached = loadCssCache.get(url);
4712
+ if (cached) {
4713
+ return cached;
4714
+ }
4715
+ var promise = fetch(url).then(function (response) {
4716
+ if (!response.ok) {
4717
+ throw new Error("Failed to load CSS: ".concat(response.status, " ").concat(response.statusText));
4718
+ }
4719
+ return response.text();
4720
+ }).then(function (css) {
4721
+ var styleSheet = document.createElement("style");
4722
+ if (options.id) styleSheet.id = options.id;
4723
+ if (options.media) styleSheet.media = options.media;
4724
+ styleSheet.textContent = css;
4725
+ var insertBefore = options.before;
4726
+ if (insertBefore && insertBefore.parentNode) {
4727
+ insertBefore.parentNode.insertBefore(styleSheet, insertBefore);
4728
+ } else {
4729
+ document.head.appendChild(styleSheet);
4730
+ }
4731
+ return styleSheet;
4732
+ })["catch"](function (error) {
4733
+ loadCssCache["delete"](url);
4734
+ console.error("Failed to load CSS:", error);
4735
+ throw error;
4736
+ });
4737
+ loadCssCache.set(url, promise);
4738
+ return promise;
4739
+ }
4740
+
4741
+ /***/ }),
4742
+
4652
4743
  /***/ "./modules/tristate/tristate.mjs":
4653
4744
  /*!***************************************!*\
4654
4745
  !*** ./modules/tristate/tristate.mjs ***!
@@ -5094,9 +5185,7 @@ __webpack_require__.r(__webpack_exports__);
5094
5185
  /* harmony import */ var _modules_scrollableTable_scrollableTable_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/scrollableTable/scrollableTable.mjs */ "./modules/scrollableTable/scrollableTable.mjs");
5095
5186
  /* harmony import */ var _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/dialog/dialog.mjs */ "./modules/dialog/dialog.mjs");
5096
5187
  /* harmony import */ var _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/toast/toast.mjs */ "./modules/toast/toast.mjs");
5097
- /* harmony import */ var _modules_common_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/common.mjs */ "./modules/common.mjs");
5098
- /* harmony import */ var _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/tools/exports.mjs */ "./modules/tools/exports.mjs");
5099
-
5188
+ /* harmony import */ var _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/tools/exports.mjs */ "./modules/tools/exports.mjs");
5100
5189
 
5101
5190
 
5102
5191
 
@@ -5210,13 +5299,13 @@ var APX = function APX(input) {
5210
5299
  (0,_modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(apx);
5211
5300
  (0,_modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(apx);
5212
5301
  (0,_modules_scrollableTable_scrollableTable_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(apx);
5213
- (0,_modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_6__.augmentWithPack)(apx);
5302
+ (0,_modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_5__.augmentWithPack)(apx);
5214
5303
  return apx;
5215
5304
  };
5216
- APX.loadCss = _modules_common_mjs__WEBPACK_IMPORTED_MODULE_5__.loadCss;
5305
+ APX.loadCss = _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_5__.loadCss;
5217
5306
  APX.dialog = _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
5218
5307
  APX.toast = _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
5219
- APX.tools = _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_6__.tools;
5308
+ APX.tools = _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_5__.tools;
5220
5309
  APX.isAPXObject = function (obj) {
5221
5310
  return obj && obj._isAPXObject === true;
5222
5311
  };