@nova-design-system/nova-react 3.31.2-beta.4 → 3.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/THIRD_PARTY_NOTICES.txt +89925 -90780
  2. package/dist/cjs/events.utils-BysSxG1C-CckC1aXX.js +40 -0
  3. package/dist/cjs/{index-DN55EpKb.js → index-BNK3HFv_.js} +263 -267
  4. package/dist/cjs/{index.esm-D3eWMME9-CG1TVKfu.js → index.esm-DBTxpXCn-D5HbQDBa.js} +48 -30
  5. package/dist/cjs/index.js +1 -1
  6. package/dist/cjs/{nv-accordion-item.entry-DTMF2QA4.js → nv-accordion-item.entry-DJjtHWto.js} +1 -1
  7. package/dist/cjs/{nv-accordion.entry-LhpIZNos.js → nv-accordion.entry-DIpRQ1yZ.js} +1 -1
  8. package/dist/cjs/{nv-alert.entry-CLzSK5qn.js → nv-alert.entry-s8ltmaSW.js} +1 -1
  9. package/dist/cjs/{nv-avatar.entry-BLdl6iCG.js → nv-avatar.entry-Uoj3PxPB.js} +1 -1
  10. package/dist/cjs/{nv-badge_2.entry-D9dDFfNt.js → nv-badge_2.entry-XvGfkslD.js} +1 -1
  11. package/dist/cjs/{nv-breadcrumb.entry-zM46pNeP.js → nv-breadcrumb.entry-xrbBbTWB.js} +1 -1
  12. package/dist/cjs/{nv-breadcrumbs.entry-C15cO6Oe.js → nv-breadcrumbs.entry-BlymeOTX.js} +1 -1
  13. package/dist/cjs/{nv-button.entry-DI4P9AiP.js → nv-button.entry-hufry_es.js} +1 -1
  14. package/dist/cjs/{nv-buttongroup.entry-D7yCaYjm.js → nv-buttongroup.entry-BCN3BnAR.js} +1 -1
  15. package/dist/cjs/{nv-calendar.entry-zseSe52a.js → nv-calendar.entry-D9AyUjb8.js} +3 -3
  16. package/dist/cjs/{nv-col.entry-nEoJ7359.js → nv-col.entry-BshQRf6v.js} +1 -1
  17. package/dist/cjs/{nv-datagrid.entry-CFwixyUO.js → nv-datagrid.entry-a3NBcRtd.js} +1 -1
  18. package/dist/cjs/{nv-datagridcolumn.entry-B_olySPa.js → nv-datagridcolumn.entry-DFgcPx8Y.js} +1 -1
  19. package/dist/cjs/{nv-datetest.entry-Dwr0C5xt.js → nv-datetest.entry-tyVjTBBR.js} +1 -1
  20. package/dist/cjs/{nv-datetimetest.entry-hziXdUJX.js → nv-datetimetest.entry-CNZNSBlt.js} +1 -1
  21. package/dist/cjs/{nv-dialog.entry-B9qKSweg.js → nv-dialog.entry-Bo0_iopY.js} +39 -18
  22. package/dist/cjs/{nv-dialogfooter_2.entry-CBTqmO9s.js → nv-dialogfooter_2.entry-DGI1rhxT.js} +1 -1
  23. package/dist/cjs/{nv-drawer.entry-DD-VjFP9.js → nv-drawer.entry-BY8NzVhz.js} +10 -10
  24. package/dist/cjs/{nv-drawerfooter_2.entry-CkODBIr6.js → nv-drawerfooter_2.entry-Dybwzc8O.js} +1 -1
  25. package/dist/cjs/{nv-fieldcheckbox.entry-DWAA4UE3.js → nv-fieldcheckbox.entry-6mBP4IIQ.js} +3 -3
  26. package/dist/cjs/{nv-fielddate.entry-BVZhCq5F.js → nv-fielddate.entry-DYM-t6pu.js} +4 -4
  27. package/dist/cjs/{nv-fielddaterange.entry-CWAnYRgI.js → nv-fielddaterange.entry-DPtDC_VM.js} +5 -5
  28. package/dist/cjs/{nv-fielddropdown.entry-CLauf21x.js → nv-fielddropdown.entry-XSAGwuQN.js} +3 -3
  29. package/dist/cjs/{nv-fielddropdownitem.entry-DCTeh9KO.js → nv-fielddropdownitem.entry-BVD2bujB.js} +1 -1
  30. package/dist/cjs/{nv-fieldmultiselect.entry-BNwKkdeR.js → nv-fieldmultiselect.entry-Dp1Rpptg.js} +3 -3
  31. package/dist/cjs/{nv-fieldnumber.entry-D86SjYXx.js → nv-fieldnumber.entry-4viVcJgw.js} +3 -3
  32. package/dist/cjs/{nv-fieldpassword.entry-Dt0lUkJt.js → nv-fieldpassword.entry-C4RiF7P0.js} +3 -3
  33. package/dist/cjs/{nv-fieldradio.entry-DNvjs4oH.js → nv-fieldradio.entry-DkLds_A_.js} +23 -8
  34. package/dist/cjs/{nv-fieldselect.entry-OZEU8DSk.js → nv-fieldselect.entry-DdlYU0vr.js} +3 -3
  35. package/dist/cjs/{nv-fieldslider.entry-1IiUmkIh.js → nv-fieldslider.entry-BAdGT9Ow.js} +4 -4
  36. package/dist/cjs/{nv-fieldtext.entry-AuynZcaD.js → nv-fieldtext.entry-CbCqsR3r.js} +3 -3
  37. package/dist/cjs/{nv-fieldtextarea.entry-CgJKQdfG.js → nv-fieldtextarea.entry-D4oXfYGF.js} +3 -3
  38. package/dist/cjs/{nv-fieldtime.entry-uB03riIZ.js → nv-fieldtime.entry-YxN-tPoZ.js} +3 -3
  39. package/dist/cjs/nv-icon.entry-6wvhISa2.js +80 -0
  40. package/dist/cjs/{nv-iconbutton_2.entry-DWKZigsd.js → nv-iconbutton_2.entry-nVyjIkl7.js} +1 -1
  41. package/dist/cjs/{nv-menu.entry-DDFZOYwe.js → nv-menu.entry-69KujGjb.js} +1 -1
  42. package/dist/cjs/{nv-menuitem.entry-Btgdr6Od.js → nv-menuitem.entry-CZKPJD2H.js} +1 -1
  43. package/dist/cjs/{nv-notification-bullet.entry-Dqa7L5lv.js → nv-notification-bullet.entry-B3adkLIp.js} +1 -1
  44. package/dist/cjs/{nv-notification.entry-C_AyXrky.js → nv-notification.entry-BCRwZd31.js} +3 -3
  45. package/dist/cjs/{nv-notificationcontainer.entry-DCvtamdA.js → nv-notificationcontainer.entry-4OMQu6mD.js} +1 -1
  46. package/dist/cjs/{nv-pagination-nav.entry-BEKSbRT5.js → nv-pagination-nav.entry-SXNk9whA.js} +1 -1
  47. package/dist/cjs/{nv-paginationtable.entry-XD08dNh6.js → nv-paginationtable.entry-CTvn3nvZ.js} +1 -1
  48. package/dist/cjs/{nv-pill.entry-DXy2Ez6j.js → nv-pill.entry-DnHcaB3o.js} +1 -1
  49. package/dist/cjs/{nv-popover.entry-Dkn58xz1.js → nv-popover.entry-IQ2NS-H3.js} +187 -141
  50. package/dist/cjs/{nv-row.entry-C-Pu-4d5.js → nv-row.entry-BDmgS2u1.js} +1 -1
  51. package/dist/cjs/{nv-sidebar.entry-BCPSmV8X.js → nv-sidebar.entry-BtbINl74.js} +1 -1
  52. package/dist/cjs/{nv-sidebarcontent.entry-Dbk9Jp-R.js → nv-sidebarcontent.entry-Cmn1Ag4E.js} +1 -1
  53. package/dist/cjs/{nv-sidebardivider.entry-BSbCqQ-I.js → nv-sidebardivider.entry-BGyBcRCm.js} +1 -1
  54. package/dist/cjs/{nv-sidebarfooter.entry-DrYkZsT7.js → nv-sidebarfooter.entry-FUjyZ_L0.js} +1 -1
  55. package/dist/cjs/{nv-sidebargroup.entry-XUiruLr8.js → nv-sidebargroup.entry-BLT-Z2cV.js} +1 -1
  56. package/dist/cjs/{nv-sidebarheader.entry-LY9keSTe.js → nv-sidebarheader.entry-BWts-jYM.js} +1 -1
  57. package/dist/cjs/{nv-sidebarlogo.entry-CXTBFLAn.js → nv-sidebarlogo.entry-CUddr-S1.js} +1 -1
  58. package/dist/cjs/{nv-sidebarnavitem.entry-D322CneD.js → nv-sidebarnavitem.entry-CD_1lOXa.js} +1 -1
  59. package/dist/cjs/{nv-sidebarnavsubitem.entry-CUTyEkyb.js → nv-sidebarnavsubitem.entry-ZySBNwG2.js} +1 -1
  60. package/dist/cjs/{nv-split.entry-TFxGWUX9.js → nv-split.entry-BGhae9a4.js} +1 -1
  61. package/dist/cjs/{nv-stack.entry-Bh7oNRvH.js → nv-stack.entry-c4sMwsu8.js} +1 -1
  62. package/dist/cjs/{nv-statusindicator.entry-DZQ5jU9e.js → nv-statusindicator.entry-CkuPYwtD.js} +1 -1
  63. package/dist/cjs/{nv-table.entry-zgAnu_aK.js → nv-table.entry-B5SEtIAo.js} +1 -1
  64. package/dist/cjs/{nv-tableheader.entry-DA639Bgy.js → nv-tableheader.entry-DdqsP8sP.js} +1 -1
  65. package/dist/cjs/{nv-tag.entry-C2aYljq1.js → nv-tag.entry-C455_9p7.js} +1 -1
  66. package/dist/cjs/{nv-timetest.entry-DgyhZ_ec.js → nv-timetest.entry-BNgk3NHV.js} +1 -1
  67. package/dist/cjs/{nv-toggle.entry-HnXIWK6v.js → nv-toggle.entry-B5VQXr6D.js} +3 -3
  68. package/dist/cjs/{nv-togglebutton.entry-DLgQwvYS.js → nv-togglebutton.entry-DYL0qJ69.js} +1 -1
  69. package/dist/cjs/{nv-togglebuttongroup.entry-JtEebncS.js → nv-togglebuttongroup.entry-B7H0NtpN.js} +1 -1
  70. package/dist/cjs/{nv-tooltip.entry-CieHlmqB.js → nv-tooltip.entry-CBk7P9RD.js} +1 -1
  71. package/dist/cjs/v4-CK3_k8jD-_2BfiRUa.js +52 -0
  72. package/package.json +3 -2
  73. package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +0 -23
  74. package/dist/cjs/nv-icon.entry-DsZUamyE.js +0 -80
  75. package/dist/cjs/v4-BdYh22OP-C1vaJ4yP.js +0 -56
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  var accessibility_utilsC4Cy9iy8 = require('./accessibility.utils-C4Cy9iy8-CeSsswXF.js');
6
6
  require('@stencil/react-output-target/runtime');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  var accessibility_utilsC4Cy9iy8 = require('./accessibility.utils-C4Cy9iy8-CeSsswXF.js');
5
5
  require('@stencil/react-output-target/runtime');
6
6
  require('react');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  var constantsGOKBmbgZ = require('./constants-gOKBmbgZ-CSoZ8z-G.js');
5
5
  var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
6
6
  var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
7
7
  require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
8
8
  var slide_animationCmH5d1of = require('./slide.animation-CmH5d1of-BZuw607U.js');
9
9
  var timeline_animationCgHCo_Ho = require('./timeline.animation-CgHCo_Ho-KteJaZPb.js');
10
- var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
10
+ var v4CK3_k8jD = require('./v4-CK3_k8jD-_2BfiRUa.js');
11
11
  require('@stencil/react-output-target/runtime');
12
12
  require('react');
13
13
  require('react-dom');
@@ -24,7 +24,7 @@ const NvNotification = class {
24
24
  * Set a unique ID for the notification. Used for aria attributes and managing
25
25
  * multiple notifications.
26
26
  */
27
- this.uid = v4BdYh22OP.v4();
27
+ this.uid = v4CK3_k8jD.v4();
28
28
  /**
29
29
  * Specifies the notification type which determines the color and default icon.
30
30
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  var accessibility_utilsC4Cy9iy8 = require('./accessibility.utils-C4Cy9iy8-CeSsswXF.js');
5
5
  require('@stencil/react-output-target/runtime');
6
6
  require('react');
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
5
5
  var grow_animationD7ep_aVl = require('./grow.animation-D7ep_aVl-BuXEDSK-.js');
6
6
  require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
7
- var events_utilsB6GgGra_ = require('./events.utils-B6GgGra--01N__3wY.js');
7
+ var events_utilsBysSxG1C = require('./events.utils-BysSxG1C-CckC1aXX.js');
8
8
  var dom_utilsCuXVGECR = require('./dom.utils-CuXVGECR-8VY5SfMZ.js');
9
9
  require('@stencil/react-output-target/runtime');
10
10
  require('react');
@@ -28,10 +28,6 @@ const oppositeSideMap = {
28
28
  bottom: 'top',
29
29
  top: 'bottom'
30
30
  };
31
- const oppositeAlignmentMap = {
32
- start: 'end',
33
- end: 'start'
34
- };
35
31
  function clamp(start, value, end) {
36
32
  return max(start, min(value, end));
37
33
  }
@@ -51,7 +47,8 @@ function getAxisLength(axis) {
51
47
  return axis === 'y' ? 'height' : 'width';
52
48
  }
53
49
  function getSideAxis(placement) {
54
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
50
+ const firstChar = placement[0];
51
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
55
52
  }
56
53
  function getAlignmentAxis(placement) {
57
54
  return getOppositeAxis(getSideAxis(placement));
@@ -74,21 +71,21 @@ function getExpandedPlacements(placement) {
74
71
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
75
72
  }
76
73
  function getOppositeAlignmentPlacement(placement) {
77
- return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
74
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
78
75
  }
76
+ const lrPlacement = ['left', 'right'];
77
+ const rlPlacement = ['right', 'left'];
78
+ const tbPlacement = ['top', 'bottom'];
79
+ const btPlacement = ['bottom', 'top'];
79
80
  function getSideList(side, isStart, rtl) {
80
- const lr = ['left', 'right'];
81
- const rl = ['right', 'left'];
82
- const tb = ['top', 'bottom'];
83
- const bt = ['bottom', 'top'];
84
81
  switch (side) {
85
82
  case 'top':
86
83
  case 'bottom':
87
- if (rtl) return isStart ? rl : lr;
88
- return isStart ? lr : rl;
84
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
85
+ return isStart ? lrPlacement : rlPlacement;
89
86
  case 'left':
90
87
  case 'right':
91
- return isStart ? tb : bt;
88
+ return isStart ? tbPlacement : btPlacement;
92
89
  default:
93
90
  return [];
94
91
  }
@@ -105,7 +102,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
105
102
  return list;
106
103
  }
107
104
  function getOppositePlacement(placement) {
108
- return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
105
+ const side = getSide(placement);
106
+ return oppositeSideMap[side] + placement.slice(side.length);
109
107
  }
110
108
  function expandPaddingObject(padding) {
111
109
  return {
@@ -199,6 +197,74 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
199
197
  return coords;
200
198
  }
201
199
 
200
+ /**
201
+ * Resolves with an object of overflow side offsets that determine how much the
202
+ * element is overflowing a given clipping boundary on each side.
203
+ * - positive = overflowing the boundary by that number of pixels
204
+ * - negative = how many pixels left before it will overflow
205
+ * - 0 = lies flush with the boundary
206
+ * @see https://floating-ui.com/docs/detectOverflow
207
+ */
208
+ async function detectOverflow(state, options) {
209
+ var _await$platform$isEle;
210
+ if (options === void 0) {
211
+ options = {};
212
+ }
213
+ const {
214
+ x,
215
+ y,
216
+ platform,
217
+ rects,
218
+ elements,
219
+ strategy
220
+ } = state;
221
+ const {
222
+ boundary = 'clippingAncestors',
223
+ rootBoundary = 'viewport',
224
+ elementContext = 'floating',
225
+ altBoundary = false,
226
+ padding = 0
227
+ } = evaluate(options, state);
228
+ const paddingObject = getPaddingObject(padding);
229
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
230
+ const element = elements[altBoundary ? altContext : elementContext];
231
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
232
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
233
+ boundary,
234
+ rootBoundary,
235
+ strategy
236
+ }));
237
+ const rect = elementContext === 'floating' ? {
238
+ x,
239
+ y,
240
+ width: rects.floating.width,
241
+ height: rects.floating.height
242
+ } : rects.reference;
243
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
244
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
245
+ x: 1,
246
+ y: 1
247
+ } : {
248
+ x: 1,
249
+ y: 1
250
+ };
251
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
252
+ elements,
253
+ rect,
254
+ offsetParent,
255
+ strategy
256
+ }) : rect);
257
+ return {
258
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
259
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
260
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
261
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
262
+ };
263
+ }
264
+
265
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
266
+ const MAX_RESET_COUNT = 50;
267
+
202
268
  /**
203
269
  * Computes the `x` and `y` coordinates that will place the floating element
204
270
  * next to a given reference element.
@@ -213,7 +279,10 @@ const computePosition$1 = async (reference, floating, config) => {
213
279
  middleware = [],
214
280
  platform
215
281
  } = config;
216
- const validMiddleware = middleware.filter(Boolean);
282
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
283
+ ...platform,
284
+ detectOverflow
285
+ };
217
286
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
218
287
  let rects = await platform.getElementRects({
219
288
  reference,
@@ -225,13 +294,17 @@ const computePosition$1 = async (reference, floating, config) => {
225
294
  y
226
295
  } = computeCoordsFromPlacement(rects, placement, rtl);
227
296
  let statefulPlacement = placement;
228
- let middlewareData = {};
229
297
  let resetCount = 0;
230
- for (let i = 0; i < validMiddleware.length; i++) {
298
+ const middlewareData = {};
299
+ for (let i = 0; i < middleware.length; i++) {
300
+ const currentMiddleware = middleware[i];
301
+ if (!currentMiddleware) {
302
+ continue;
303
+ }
231
304
  const {
232
305
  name,
233
306
  fn
234
- } = validMiddleware[i];
307
+ } = currentMiddleware;
235
308
  const {
236
309
  x: nextX,
237
310
  y: nextY,
@@ -245,7 +318,7 @@ const computePosition$1 = async (reference, floating, config) => {
245
318
  strategy,
246
319
  middlewareData,
247
320
  rects,
248
- platform,
321
+ platform: platformWithDetectOverflow,
249
322
  elements: {
250
323
  reference,
251
324
  floating
@@ -253,14 +326,11 @@ const computePosition$1 = async (reference, floating, config) => {
253
326
  });
254
327
  x = nextX != null ? nextX : x;
255
328
  y = nextY != null ? nextY : y;
256
- middlewareData = {
257
- ...middlewareData,
258
- [name]: {
259
- ...middlewareData[name],
260
- ...data
261
- }
329
+ middlewareData[name] = {
330
+ ...middlewareData[name],
331
+ ...data
262
332
  };
263
- if (reset && resetCount <= 50) {
333
+ if (reset && resetCount < MAX_RESET_COUNT) {
264
334
  resetCount++;
265
335
  if (typeof reset === 'object') {
266
336
  if (reset.placement) {
@@ -290,71 +360,6 @@ const computePosition$1 = async (reference, floating, config) => {
290
360
  };
291
361
  };
292
362
 
293
- /**
294
- * Resolves with an object of overflow side offsets that determine how much the
295
- * element is overflowing a given clipping boundary on each side.
296
- * - positive = overflowing the boundary by that number of pixels
297
- * - negative = how many pixels left before it will overflow
298
- * - 0 = lies flush with the boundary
299
- * @see https://floating-ui.com/docs/detectOverflow
300
- */
301
- async function detectOverflow(state, options) {
302
- var _await$platform$isEle;
303
- if (options === void 0) {
304
- options = {};
305
- }
306
- const {
307
- x,
308
- y,
309
- platform,
310
- rects,
311
- elements,
312
- strategy
313
- } = state;
314
- const {
315
- boundary = 'clippingAncestors',
316
- rootBoundary = 'viewport',
317
- elementContext = 'floating',
318
- altBoundary = false,
319
- padding = 0
320
- } = evaluate(options, state);
321
- const paddingObject = getPaddingObject(padding);
322
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
323
- const element = elements[altBoundary ? altContext : elementContext];
324
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
325
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
326
- boundary,
327
- rootBoundary,
328
- strategy
329
- }));
330
- const rect = elementContext === 'floating' ? {
331
- x,
332
- y,
333
- width: rects.floating.width,
334
- height: rects.floating.height
335
- } : rects.reference;
336
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
337
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
338
- x: 1,
339
- y: 1
340
- } : {
341
- x: 1,
342
- y: 1
343
- };
344
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
345
- elements,
346
- rect,
347
- offsetParent,
348
- strategy
349
- }) : rect);
350
- return {
351
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
352
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
353
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
354
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
355
- };
356
- }
357
-
358
363
  /**
359
364
  * Provides data to position an inner element of the floating element so that it
360
365
  * appears centered to the reference element.
@@ -478,14 +483,16 @@ const flip$1 = function (options) {
478
483
  return {};
479
484
  }
480
485
  const side = getSide(placement);
486
+ const initialSideAxis = getSideAxis(initialPlacement);
481
487
  const isBasePlacement = getSide(initialPlacement) === initialPlacement;
482
488
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
483
489
  const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
484
- if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
490
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
491
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
485
492
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
486
493
  }
487
494
  const placements = [initialPlacement, ...fallbackPlacements];
488
- const overflow = await detectOverflow(state, detectOverflowOptions);
495
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
489
496
  const overflows = [];
490
497
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
491
498
  if (checkMainAxis) {
@@ -506,16 +513,22 @@ const flip$1 = function (options) {
506
513
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
507
514
  const nextPlacement = placements[nextIndex];
508
515
  if (nextPlacement) {
509
- // Try next placement and re-run the lifecycle.
510
- return {
511
- data: {
512
- index: nextIndex,
513
- overflows: overflowsData
514
- },
515
- reset: {
516
- placement: nextPlacement
517
- }
518
- };
516
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
517
+ if (!ignoreCrossAxisOverflow ||
518
+ // We leave the current main axis only if every placement on that axis
519
+ // overflows the main axis.
520
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
521
+ // Try next placement and re-run the lifecycle.
522
+ return {
523
+ data: {
524
+ index: nextIndex,
525
+ overflows: overflowsData
526
+ },
527
+ reset: {
528
+ placement: nextPlacement
529
+ }
530
+ };
531
+ }
519
532
  }
520
533
 
521
534
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -527,8 +540,17 @@ const flip$1 = function (options) {
527
540
  switch (fallbackStrategy) {
528
541
  case 'bestFit':
529
542
  {
530
- var _overflowsData$map$so;
531
- const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
543
+ var _overflowsData$filter2;
544
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
545
+ if (hasFallbackAxisSideDirection) {
546
+ const currentSideAxis = getSideAxis(d.placement);
547
+ return currentSideAxis === initialSideAxis ||
548
+ // Create a bias to the `y` side axis due to horizontal
549
+ // reading directions favoring greater width.
550
+ currentSideAxis === 'y';
551
+ }
552
+ return true;
553
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
532
554
  if (placement) {
533
555
  resetPlacement = placement;
534
556
  }
@@ -552,6 +574,8 @@ const flip$1 = function (options) {
552
574
  };
553
575
  };
554
576
 
577
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
578
+
555
579
  // For type backwards-compatibility, the `OffsetOptions` type was also
556
580
  // Derivable.
557
581
 
@@ -565,7 +589,7 @@ async function convertValueToCoords(state, options) {
565
589
  const side = getSide(placement);
566
590
  const alignment = getAlignment(placement);
567
591
  const isVertical = getSideAxis(placement) === 'y';
568
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
592
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
569
593
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
570
594
  const rawValue = evaluate(options, state);
571
595
 
@@ -579,10 +603,9 @@ async function convertValueToCoords(state, options) {
579
603
  crossAxis: 0,
580
604
  alignmentAxis: null
581
605
  } : {
582
- mainAxis: 0,
583
- crossAxis: 0,
584
- alignmentAxis: null,
585
- ...rawValue
606
+ mainAxis: rawValue.mainAxis || 0,
607
+ crossAxis: rawValue.crossAxis || 0,
608
+ alignmentAxis: rawValue.alignmentAxis
586
609
  };
587
610
  if (alignment && typeof alignmentAxis === 'number') {
588
611
  crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
@@ -653,7 +676,8 @@ const shift$1 = function (options) {
653
676
  const {
654
677
  x,
655
678
  y,
656
- placement
679
+ placement,
680
+ platform
657
681
  } = state;
658
682
  const {
659
683
  mainAxis: checkMainAxis = true,
@@ -676,7 +700,7 @@ const shift$1 = function (options) {
676
700
  x,
677
701
  y
678
702
  };
679
- const overflow = await detectOverflow(state, detectOverflowOptions);
703
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
680
704
  const crossAxis = getSideAxis(getSide(placement));
681
705
  const mainAxis = getOppositeAxis(crossAxis);
682
706
  let mainAxisCoord = coords[mainAxis];
@@ -704,7 +728,11 @@ const shift$1 = function (options) {
704
728
  ...limitedCoords,
705
729
  data: {
706
730
  x: limitedCoords.x - x,
707
- y: limitedCoords.y - y
731
+ y: limitedCoords.y - y,
732
+ enabled: {
733
+ [mainAxis]: checkMainAxis,
734
+ [crossAxis]: checkCrossAxis
735
+ }
708
736
  }
709
737
  };
710
738
  }
@@ -762,26 +790,35 @@ function isOverflowElement(element) {
762
790
  overflowY,
763
791
  display
764
792
  } = getComputedStyle(element);
765
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
793
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
766
794
  }
767
795
  function isTableElement(element) {
768
- return ['table', 'td', 'th'].includes(getNodeName(element));
796
+ return /^(table|td|th)$/.test(getNodeName(element));
769
797
  }
770
798
  function isTopLayer(element) {
771
- return [':popover-open', ':modal'].some(selector => {
772
- try {
773
- return element.matches(selector);
774
- } catch (e) {
775
- return false;
799
+ try {
800
+ if (element.matches(':popover-open')) {
801
+ return true;
776
802
  }
777
- });
803
+ } catch (_e) {
804
+ // no-op
805
+ }
806
+ try {
807
+ return element.matches(':modal');
808
+ } catch (_e) {
809
+ return false;
810
+ }
778
811
  }
812
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
813
+ const containRe = /paint|layout|strict|content/;
814
+ const isNotNone = value => !!value && value !== 'none';
815
+ let isWebKitValue;
779
816
  function isContainingBlock(elementOrCss) {
780
- const webkit = isWebKit();
781
817
  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
782
818
 
783
819
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
784
- return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
820
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
821
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
785
822
  }
786
823
  function getContainingBlock(element) {
787
824
  let currentNode = getParentNode(element);
@@ -796,11 +833,13 @@ function getContainingBlock(element) {
796
833
  return null;
797
834
  }
798
835
  function isWebKit() {
799
- if (typeof CSS === 'undefined' || !CSS.supports) return false;
800
- return CSS.supports('-webkit-backdrop-filter', 'none');
836
+ if (isWebKitValue == null) {
837
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
838
+ }
839
+ return isWebKitValue;
801
840
  }
802
841
  function isLastTraversableNode(node) {
803
- return ['html', 'body', '#document'].includes(getNodeName(node));
842
+ return /^(html|body|#document)$/.test(getNodeName(node));
804
843
  }
805
844
  function getComputedStyle(element) {
806
845
  return getWindow(element).getComputedStyle(element);
@@ -852,8 +891,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
852
891
  const win = getWindow(scrollableAncestor);
853
892
  if (isBody) {
854
893
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], []);
894
+ } else {
895
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, []));
855
896
  }
856
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, []));
857
897
  }
858
898
  function getFrameElement(win) {
859
899
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -1813,14 +1853,14 @@ const NvPopover = class {
1813
1853
  */
1814
1854
  attachEventListeners() {
1815
1855
  if (this.triggerElement && !this.eventsAttached) {
1816
- events_utilsB6GgGra_.addEventListeners(this.closeEvents, document, this);
1856
+ events_utilsBysSxG1C.addEventListeners(this.closeEvents, document, this);
1817
1857
  if (this.triggerMode === 'click') {
1818
- events_utilsB6GgGra_.addEventListeners(this.clickEvents, this.triggerElement, this);
1858
+ events_utilsBysSxG1C.addEventListeners(this.clickEvents, this.triggerElement, this);
1819
1859
  // Add document click and touch listeners
1820
- events_utilsB6GgGra_.addEventListeners(this.outsideClickEvents, document, this);
1860
+ events_utilsBysSxG1C.addEventListeners(this.outsideClickEvents, document, this);
1821
1861
  }
1822
1862
  if (this.triggerMode === 'hover') {
1823
- events_utilsB6GgGra_.addEventListeners(this.hoverEvents, this.triggerElement, this);
1863
+ events_utilsBysSxG1C.addEventListeners(this.hoverEvents, this.triggerElement, this);
1824
1864
  }
1825
1865
  this.eventsAttached = true;
1826
1866
  }
@@ -1942,14 +1982,20 @@ const NvPopover = class {
1942
1982
  this.positionPopover();
1943
1983
  }
1944
1984
  disconnectedCallback() {
1945
- events_utilsB6GgGra_.removeEventListeners(this.closeEvents, document, this);
1946
- if (this.triggerMode === 'click') {
1947
- events_utilsB6GgGra_.removeEventListeners(this.clickEvents, this.triggerElement, this);
1948
- // Remove document listeners
1949
- events_utilsB6GgGra_.removeEventListeners(this.outsideClickEvents, document, this);
1985
+ events_utilsBysSxG1C.removeEventListeners(this.closeEvents, document);
1986
+ switch (this.triggerMode) {
1987
+ case 'click':
1988
+ if (this.triggerElement) {
1989
+ events_utilsBysSxG1C.removeEventListeners(this.clickEvents, this.triggerElement);
1990
+ }
1991
+ events_utilsBysSxG1C.removeEventListeners(this.outsideClickEvents, document);
1992
+ break;
1993
+ case 'hover':
1994
+ if (this.triggerElement) {
1995
+ events_utilsBysSxG1C.removeEventListeners(this.hoverEvents, this.triggerElement);
1996
+ }
1997
+ break;
1950
1998
  }
1951
- if (this.triggerMode === 'hover')
1952
- events_utilsB6GgGra_.removeEventListeners(this.hoverEvents, this.triggerElement, this);
1953
1999
  // Reset flag so events can be reattached if component is reconnected
1954
2000
  this.eventsAttached = false;
1955
2001
  // Clean up any pending timeouts
@@ -1962,7 +2008,7 @@ const NvPopover = class {
1962
2008
  /****************************************************************************/
1963
2009
  //#region RENDER
1964
2010
  render() {
1965
- return (index.h(index.Host, { key: '1a604043f59c8aa04237b6d03838125079ac5c49' }, index.h("slot", { key: 'c22461b3d5050f7b502635221cbe17c03ef425a9', name: "trigger" }), index.h("div", { key: '58a438db8308be12d854afe3deda462d4ae528fb', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: 'af18bf4b8700484ca989a8d45da8295e8d11ea2e', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: 'f3308bfc01d5a4f954a1f0b822cf378cd874f9bd', name: "content" }))));
2011
+ return (index.h(index.Host, { key: '1ed63615950c6e634f62130a0b44968b33a672fb' }, index.h("slot", { key: '46f7ca5bd0f86e79f847d1120d4bb37f6392fd58', name: "trigger" }), index.h("div", { key: 'b7324fde30b5dccb51a206ac334636bb8161760a', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: 'ce765381a3d2708afa5cef63d8f8c156555eb903', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '7412a6e56a216bb7ea06b69d1c349f68d6bb1aa1', name: "content" }))));
1966
2012
  }
1967
2013
  get el() { return index.getElement(this); }
1968
2014
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DN55EpKb.js');
3
+ var index = require('./index-BNK3HFv_.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');