ropav 0.15.0 → 0.16.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 (106) hide show
  1. package/AGENTS.md +4 -0
  2. package/dist/components/portal-provider/portal-provider.types.d.ts +2 -2
  3. package/dist/composables/focus-scope-registry.d.ts +1 -1
  4. package/dist/composables/focus-scope-registry.js +1 -1
  5. package/dist/composables/use-dismissable.d.ts +1 -1
  6. package/dist/composables/use-focus-scope.d.ts +1 -1
  7. package/dist/composables/use-portal.d.ts +2 -2
  8. package/dist/composables/use-portal.js +2 -2
  9. package/dist/ropav.min.css +1 -1
  10. package/dist/styles/accordion.css +3 -0
  11. package/dist/styles/alert-dialog.css +4 -0
  12. package/dist/styles/alert.css +3 -0
  13. package/dist/styles/autocomplete.css +4 -0
  14. package/dist/styles/avatar-group.css +4 -0
  15. package/dist/styles/avatar.css +3 -0
  16. package/dist/styles/badge.css +3 -0
  17. package/dist/styles/breadcrumbs.css +4 -0
  18. package/dist/styles/button-group.css +4 -0
  19. package/dist/styles/button.css +3 -0
  20. package/dist/styles/calendar-year-picker.css +3 -0
  21. package/dist/styles/calendar.css +3 -0
  22. package/dist/styles/card.css +3 -0
  23. package/dist/styles/checkbox-group.css +3 -0
  24. package/dist/styles/checkbox.css +3 -0
  25. package/dist/styles/chip.css +3 -0
  26. package/dist/styles/close-button.css +3 -0
  27. package/dist/styles/color-area.css +3 -0
  28. package/dist/styles/color-field.css +3 -0
  29. package/dist/styles/color-input-group.css +3 -0
  30. package/dist/styles/color-picker.css +3 -0
  31. package/dist/styles/color-slider.css +3 -0
  32. package/dist/styles/color-swatch-picker.css +3 -0
  33. package/dist/styles/color-swatch.css +3 -0
  34. package/dist/styles/combo-box.css +3 -0
  35. package/dist/styles/components.css +3 -0
  36. package/dist/styles/core.css +2 -0
  37. package/dist/styles/date-field.css +4 -0
  38. package/dist/styles/date-picker.css +4 -0
  39. package/dist/styles/date-range-picker.css +4 -0
  40. package/dist/styles/description.css +3 -0
  41. package/dist/styles/disclosure-group.css +3 -0
  42. package/dist/styles/disclosure.css +3 -0
  43. package/dist/styles/drawer.css +4 -0
  44. package/dist/styles/drop-zone.css +3 -0
  45. package/dist/styles/dropdown.css +4 -0
  46. package/dist/styles/empty-state.css +3 -0
  47. package/dist/styles/error-message.css +3 -0
  48. package/dist/styles/field-error.css +3 -0
  49. package/dist/styles/fieldset.css +3 -0
  50. package/dist/styles/header.css +3 -0
  51. package/dist/styles/input-group.css +3 -0
  52. package/dist/styles/input-otp.css +3 -0
  53. package/dist/styles/input.css +3 -0
  54. package/dist/styles/kbd.css +3 -0
  55. package/dist/styles/label.css +3 -0
  56. package/dist/styles/link.css +3 -0
  57. package/dist/styles/list-box-item.css +3 -0
  58. package/dist/styles/list-box-section.css +3 -0
  59. package/dist/styles/list-box.css +4 -0
  60. package/dist/styles/menu-item.css +3 -0
  61. package/dist/styles/menu-section.css +3 -0
  62. package/dist/styles/menu.css +3 -0
  63. package/dist/styles/meter.css +3 -0
  64. package/dist/styles/modal.css +4 -0
  65. package/dist/styles/number-field.css +3 -0
  66. package/dist/styles/pagination.css +3 -0
  67. package/dist/styles/popover.css +3 -0
  68. package/dist/styles/progress-bar.css +3 -0
  69. package/dist/styles/progress-circle.css +3 -0
  70. package/dist/styles/radio-group.css +3 -0
  71. package/dist/styles/radio.css +3 -0
  72. package/dist/styles/range-calendar.css +3 -0
  73. package/dist/styles/scroll-shadow.css +3 -0
  74. package/dist/styles/search-field.css +4 -0
  75. package/dist/styles/segmented-control.css +3 -0
  76. package/dist/styles/select.css +3 -0
  77. package/dist/styles/separator.css +3 -0
  78. package/dist/styles/sidebar.css +8 -0
  79. package/dist/styles/skeleton.css +3 -0
  80. package/dist/styles/slider.css +3 -0
  81. package/dist/styles/spinner.css +3 -0
  82. package/dist/styles/splitter.css +3 -0
  83. package/dist/styles/surface.css +3 -0
  84. package/dist/styles/switch-group.css +3 -0
  85. package/dist/styles/switch.css +3 -0
  86. package/dist/styles/table.css +5 -0
  87. package/dist/styles/tabs.css +4 -0
  88. package/dist/styles/tag-group.css +3 -0
  89. package/dist/styles/tag.css +4 -0
  90. package/dist/styles/textarea.css +3 -0
  91. package/dist/styles/textfield.css +3 -0
  92. package/dist/styles/time-field.css +4 -0
  93. package/dist/styles/toast.css +6 -0
  94. package/dist/styles/toggle-button-group.css +3 -0
  95. package/dist/styles/toggle-button.css +3 -0
  96. package/dist/styles/toolbar.css +3 -0
  97. package/dist/styles/tooltip.css +3 -0
  98. package/dist/styles/typography.css +3 -0
  99. package/dist/styles/virtualizer.css +3 -0
  100. package/dist/utils/aria-hide-outside.js +1 -1
  101. package/dist/utils/position.d.ts +1 -1
  102. package/dist/utils/position.js +66 -52
  103. package/dist/utils/region.d.ts +3 -3
  104. package/dist/utils/region.js +3 -3
  105. package/dist/version.js +1 -1
  106. package/package.json +362 -2
@@ -25,8 +25,15 @@ var TOTAL_SIZE = {
25
25
  };
26
26
  var clamp = (value, min, max) => Math.min(Math.max(value, min), max);
27
27
  var getVisualViewport = () => typeof document === "undefined" ? null : window.visualViewport;
28
- /** Whether one node is the other, or contains it. */
29
- var nodeContains = (node, other) => Boolean(node && other && node.contains(other));
28
+ /** Whether a boundary element stands for the viewport, as the body and the document element do. */
29
+ var isViewportElement = (node) => node.tagName === "BODY" || node.tagName === "HTML";
30
+ /**
31
+ * Whether the container is the viewport. Only the document element ever is: the body is the
32
+ * container only once it is positioned or a containing block, and then an overlay is placed from
33
+ * the body's own padding box, which a body taller than the viewport, or set apart from it by its
34
+ * margin, does not share with the viewport.
35
+ */
36
+ var isViewportContainer = (node) => node === document.documentElement;
30
37
  var isWebKit = () => typeof navigator !== "undefined" && /AppleWebKit/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);
31
38
  /** The element's rectangle, ignoring any scale transform when asked. */
32
39
  var getRect = (node, ignoreScale) => {
@@ -76,7 +83,7 @@ var getPosition = (node, parent, ignoreScale, overrideRect) => {
76
83
  */
77
84
  var isContainingBlock = (node) => {
78
85
  const style = window.getComputedStyle(node);
79
- return style.transform !== "none" || /transform|perspective/.test(style.willChange) || style.filter !== "none" || style.contain === "paint" || "backdropFilter" in style && style.backdropFilter !== "none";
86
+ return style.transform !== "none" || /transform|perspective/.test(style.willChange) || style.filter !== "none" || /\b(layout|paint|strict|content)\b/.test(style.contain) || "backdropFilter" in style && style.backdropFilter !== "none";
80
87
  };
81
88
  /** The element an absolutely positioned overlay is placed relative to. */
82
89
  var getContainingBlock = (node) => {
@@ -98,26 +105,28 @@ var getContainerDimensions = (containerNode, visualViewport) => {
98
105
  let left = 0;
99
106
  const scroll = {};
100
107
  const isPinchZoomedIn = (visualViewport?.scale ?? 1) > 1;
101
- if (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") {
108
+ if (isViewportContainer(containerNode)) {
102
109
  const documentElement = document.documentElement;
103
110
  totalWidth = documentElement.clientWidth;
104
111
  totalHeight = documentElement.clientHeight;
105
112
  width = visualViewport?.width ?? totalWidth;
106
113
  height = visualViewport?.height ?? totalHeight;
107
- scroll.top = documentElement.scrollTop || containerNode.scrollTop;
108
- scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
114
+ scroll.top = documentElement.scrollTop;
115
+ scroll.left = documentElement.scrollLeft;
109
116
  if (visualViewport) {
110
117
  top = visualViewport.offsetTop;
111
118
  left = visualViewport.offsetLeft;
112
119
  }
113
120
  } else {
114
- ({height, left, top, width} = getOffset(containerNode, false));
121
+ ({left, top} = getOffset(containerNode, false));
122
+ width = containerNode.clientWidth;
123
+ height = containerNode.clientHeight;
115
124
  scroll.top = containerNode.scrollTop;
116
125
  scroll.left = containerNode.scrollLeft;
117
126
  totalWidth = width;
118
127
  totalHeight = height;
119
128
  }
120
- if (isWebKit() && (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") && isPinchZoomedIn) {
129
+ if (isWebKit() && isViewportContainer(containerNode) && isPinchZoomedIn) {
121
130
  scroll.top = 0;
122
131
  scroll.left = 0;
123
132
  top = visualViewport?.pageTop ?? 0;
@@ -134,13 +143,11 @@ var getContainerDimensions = (containerNode, visualViewport) => {
134
143
  };
135
144
  };
136
145
  /** How far the overlay must shift along `axis` to stay inside the boundary. */
137
- var getDelta = (axis, offset, size, boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary) => {
138
- const containerScroll = containerDimensions.scroll[axis] ?? 0;
139
- const boundarySize = boundaryDimensions[AXIS_SIZE[axis]];
140
- const boundaryScroll = boundaryDimensions.scroll[AXIS[axis]] ?? 0;
141
- const boundaryStartEdge = containerOffsetWithBoundary[axis] + boundaryScroll + padding;
142
- const boundaryEndEdge = containerOffsetWithBoundary[axis] + boundaryScroll + boundarySize - padding;
143
- const startEdgeOffset = offset - containerScroll + boundaryScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[AXIS[axis]];
146
+ var getDelta = (axis, offset, size, boundary, containerDimensions, padding) => {
147
+ const boundaryStart = boundary[axis] + (containerDimensions.scroll[axis] ?? 0);
148
+ const boundaryStartEdge = boundaryStart + padding;
149
+ const boundaryEndEdge = boundaryStart + boundary[AXIS_SIZE[axis]] - padding;
150
+ const startEdgeOffset = offset;
144
151
  const endEdgeOffset = startEdgeOffset + size;
145
152
  if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;
146
153
  if (endEdgeOffset > boundaryEndEdge) return Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset);
@@ -189,36 +196,35 @@ var computePosition = (childOffset, overlaySize, placementInfo, offset, crossOff
189
196
  } else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
190
197
  return position;
191
198
  };
192
- var getMaxHeight = (position, boundaryDimensions, containerOffsetWithBoundary, margins, padding, overlayHeight, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport) => {
199
+ var getMaxHeight = (position, boundary, viewport, margins, padding, overlayHeight, heightGrowthDirection, containerDimensions) => {
193
200
  const overlayTop = (position.top != null ? position.top : containerDimensions[TOTAL_SIZE.height] - (position.bottom ?? 0) - overlayHeight) - (containerDimensions.scroll.top ?? 0);
194
- const boundaryToContainerTransformOffset = isContainerDescendentOfBoundary ? containerOffsetWithBoundary.top : 0;
195
- const viewportTop = visualViewport?.offsetTop ?? boundaryDimensions.top;
196
- const viewportBottom = visualViewport ? visualViewport.offsetTop + visualViewport.height : boundaryDimensions.top + boundaryDimensions.height;
201
+ const visible = viewport ?? boundary;
197
202
  const boundingRect = {
198
- bottom: Math.min(boundaryDimensions.top + boundaryDimensions.height + boundaryToContainerTransformOffset, viewportBottom),
199
- top: Math.max(boundaryDimensions.top + boundaryToContainerTransformOffset, viewportTop + boundaryToContainerTransformOffset)
203
+ bottom: Math.min(boundary.top + boundary.height, visible.top + visible.height),
204
+ top: Math.max(boundary.top, visible.top)
200
205
  };
201
206
  const reserved = (margins.top ?? 0) + (margins.bottom ?? 0) + padding;
202
207
  return heightGrowthDirection !== "top" ? Math.max(0, boundingRect.bottom - overlayTop - reserved) : Math.max(0, overlayTop + overlayHeight - boundingRect.top - reserved);
203
208
  };
204
209
  /** How much room there is on the side the overlay wants to be on. */
205
- var getAvailableSpace = (boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo, containerDimensions, isContainerDescendentOfBoundary) => {
210
+ var getAvailableSpace = (boundary, childOffset, margins, padding, placementInfo, containerDimensions) => {
206
211
  const { axis, placement, size } = placementInfo;
207
- const containerOffset = isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0;
208
- if (placement === axis) return Math.max(0, childOffset[axis] - (containerDimensions.scroll[axis] ?? 0) - (boundaryDimensions[axis] + containerOffset) - (margins[axis] ?? 0) - (margins[FLIPPED_DIRECTION[axis]] ?? 0) - padding);
209
- return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + containerOffset - childOffset[axis] - childOffset[size] + (containerDimensions.scroll[axis] ?? 0) - (margins[axis] ?? 0) - (margins[FLIPPED_DIRECTION[axis]] ?? 0) - padding);
212
+ const boundaryStart = boundary[axis] + (containerDimensions.scroll[axis] ?? 0);
213
+ const reserved = (margins[axis] ?? 0) + (margins[FLIPPED_DIRECTION[axis]] ?? 0) + padding;
214
+ if (placement === axis) return Math.max(0, childOffset[axis] - boundaryStart - reserved);
215
+ return Math.max(0, boundaryStart + boundary[size] - childOffset[axis] - childOffset[size] - reserved);
210
216
  };
211
217
  /** @private Exported for tests, which drive the arithmetic without a real layout. */
212
- var calculatePositionInternal = (placementInput, childOffset, overlaySize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport) => {
218
+ var calculatePositionInternal = (placementInput, childOffset, overlaySize, margins, padding, flip, boundary, containerDimensions, viewport, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) => {
213
219
  let placementInfo = parsePlacement(placementInput);
214
220
  const { crossAxis, crossSize, size } = placementInfo;
215
221
  let { crossPlacement, placement } = placementInfo;
216
222
  let position = computePosition(childOffset, overlaySize, placementInfo, offset, crossOffset, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
217
- const space = getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo, containerDimensions, isContainerDescendentOfBoundary);
223
+ const space = getAvailableSpace(boundary, childOffset, margins, padding + offset, placementInfo, containerDimensions);
218
224
  if (flip && overlaySize[size] > space) {
219
225
  const flippedPlacementInfo = parsePlacement(`${FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
220
226
  const flippedPosition = computePosition(childOffset, overlaySize, flippedPlacementInfo, offset, crossOffset, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
221
- if (getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo, containerDimensions, isContainerDescendentOfBoundary) > space) {
227
+ if (getAvailableSpace(boundary, childOffset, margins, padding + offset, flippedPlacementInfo, containerDimensions) > space) {
222
228
  placementInfo = flippedPlacementInfo;
223
229
  position = flippedPosition;
224
230
  }
@@ -229,12 +235,12 @@ var calculatePositionInternal = (placementInput, childOffset, overlaySize, margi
229
235
  } else if (placementInfo.crossAxis === "top") {
230
236
  if (placementInfo.crossPlacement === "bottom") heightGrowthDirection = "top";
231
237
  }
232
- position[crossAxis] += getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
233
- let maxHeight = getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, margins, padding, overlaySize.height, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport);
238
+ position[crossAxis] += getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundary, containerDimensions, padding);
239
+ let maxHeight = getMaxHeight(position, boundary, viewport, margins, padding, overlaySize.height, heightGrowthDirection, containerDimensions);
234
240
  if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
235
241
  overlaySize.height = Math.min(overlaySize.height, maxHeight);
236
242
  position = computePosition(childOffset, overlaySize, placementInfo, offset, crossOffset, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
237
- position[crossAxis] += getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
243
+ position[crossAxis] += getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundary, containerDimensions, padding);
238
244
  const arrowPosition = {};
239
245
  let origin = childOffset[crossAxis] - position[crossAxis] - (margins[AXIS[crossAxis]] ?? 0);
240
246
  const preferredArrowPosition = origin + .5 * childOffset[crossSize];
@@ -268,11 +274,11 @@ var calculatePosition = (options) => {
268
274
  const { arrowBoundaryOffset = 0, arrowSize = 0, boundaryElement, crossOffset, maxHeight, offset, overlayNode, padding, placement, shouldFlip, targetNode, targetRect } = options;
269
275
  const visualViewport = getVisualViewport();
270
276
  const container = overlayNode instanceof HTMLElement ? getContainingBlock(overlayNode) : document.documentElement;
271
- const isViewportContainer = container === document.documentElement;
277
+ const isContainerViewport = isViewportContainer(container);
272
278
  const containerPositionStyle = window.getComputedStyle(container).position;
273
279
  const isContainerPositioned = Boolean(containerPositionStyle) && containerPositionStyle !== "static";
274
- const childOffset = isViewportContainer ? getOffset(targetNode, false, targetRect) : getPosition(targetNode, container, false, targetRect);
275
- if (!isViewportContainer) {
280
+ const childOffset = isContainerViewport ? getOffset(targetNode, false, targetRect) : getPosition(targetNode, container, false, targetRect);
281
+ if (!isContainerViewport) {
276
282
  const { marginLeft, marginTop } = window.getComputedStyle(targetNode);
277
283
  childOffset.top += parseInt(marginTop, 10) || 0;
278
284
  childOffset.left += parseInt(marginLeft, 10) || 0;
@@ -281,26 +287,34 @@ var calculatePosition = (options) => {
281
287
  const margins = getMargins(overlayNode);
282
288
  overlaySize.width += (margins.left ?? 0) + (margins.right ?? 0);
283
289
  overlaySize.height += (margins.top ?? 0) + (margins.bottom ?? 0);
284
- const boundaryDimensions = getContainerDimensions(boundaryElement, visualViewport);
285
290
  const containerDimensions = getContainerDimensions(container, visualViewport);
286
- let containerOffsetWithBoundary;
287
- const isBoundaryViewport = boundaryElement.tagName === "BODY" || boundaryElement.tagName === "HTML";
288
- if (isBoundaryViewport && !isViewportContainer) {
289
- const containerRect = getRect(container, false);
290
- containerOffsetWithBoundary = {
291
- height: 0,
292
- left: -(containerRect.left - boundaryDimensions.left),
293
- top: -(containerRect.top - boundaryDimensions.top),
294
- width: 0
295
- };
296
- } else if (isBoundaryViewport && isViewportContainer) containerOffsetWithBoundary = {
297
- height: 0,
298
- left: 0,
299
- top: 0,
300
- width: 0
291
+ const { clientHeight, clientWidth } = document.documentElement;
292
+ const viewportRect = {
293
+ height: visualViewport?.height ?? clientHeight,
294
+ left: visualViewport?.offsetLeft ?? 0,
295
+ top: visualViewport?.offsetTop ?? 0,
296
+ width: visualViewport?.width ?? clientWidth
301
297
  };
302
- else containerOffsetWithBoundary = getPosition(boundaryElement, container, false);
303
- return calculatePositionInternal(placement, childOffset, overlaySize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, nodeContains(boundaryElement, container), visualViewport);
298
+ let origin;
299
+ if (isContainerViewport) origin = {
300
+ left: viewportRect.left - containerDimensions.left,
301
+ top: viewportRect.top - containerDimensions.top
302
+ };
303
+ else {
304
+ const containerRect = container.getBoundingClientRect();
305
+ origin = {
306
+ left: containerRect.left + container.clientLeft,
307
+ top: containerRect.top + container.clientTop
308
+ };
309
+ }
310
+ const toContainer = ({ height, left, top, width }) => ({
311
+ height,
312
+ left: left - origin.left,
313
+ top: top - origin.top,
314
+ width
315
+ });
316
+ const viewport = toContainer(viewportRect);
317
+ return calculatePositionInternal(placement, childOffset, overlaySize, margins, padding, shouldFlip, isViewportElement(boundaryElement) ? viewport : toContainer(getRect(boundaryElement, false)), containerDimensions, visualViewport ? viewport : null, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset);
304
318
  };
305
319
  /** Resolves the logical `start`/`end` in a placement against the writing direction. */
306
320
  var translateRTL = (placement, direction) => direction === "rtl" ? placement.replace("start", "right").replace("end", "left") : placement.replace("start", "left").replace("end", "right");
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * An overlay belongs to a region: the root its `PortalProvider` names, or the whole document
5
5
  * (`null`) without one. The page-wide stacks — which overlay is innermost, which one watches the
6
- * DOM, which one holds focus — are only shared between overlays whose regions overlap. Two apps'
7
- * windows side by side are separate regions, so a modal in one is not stacked over a modal in the
8
- * other; the whole document overlaps everything, so without a provider nothing changes.
6
+ * DOM, which one holds focus — are only shared between overlays whose regions overlap. Two regions
7
+ * side by side are separate, so a modal in one is not stacked over a modal in the other; the whole
8
+ * document overlaps everything, so without a provider nothing changes.
9
9
  */
10
10
  export declare const regionsOverlap: (a: Element | null, b: Element | null) => boolean;
@@ -4,9 +4,9 @@
4
4
  *
5
5
  * An overlay belongs to a region: the root its `PortalProvider` names, or the whole document
6
6
  * (`null`) without one. The page-wide stacks — which overlay is innermost, which one watches the
7
- * DOM, which one holds focus — are only shared between overlays whose regions overlap. Two apps'
8
- * windows side by side are separate regions, so a modal in one is not stacked over a modal in the
9
- * other; the whole document overlaps everything, so without a provider nothing changes.
7
+ * DOM, which one holds focus — are only shared between overlays whose regions overlap. Two regions
8
+ * side by side are separate, so a modal in one is not stacked over a modal in the other; the whole
9
+ * document overlaps everything, so without a provider nothing changes.
10
10
  */
11
11
  var regionsOverlap = (a, b) => a == null || b == null || a.contains(b) || b.contains(a);
12
12
  //#endregion
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/version.ts
2
- var ROPAV_VERSION = "0.15.0";
2
+ var ROPAV_VERSION = "0.16.0";
3
3
  //#endregion
4
4
  export { ROPAV_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ropav",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Vapor-native Vue 3 component library — accessible by default, styled with framework-agnostic CSS.",
5
5
  "keywords": [
6
6
  "components",
@@ -45,6 +45,366 @@
45
45
  "default": "./dist/styles.css"
46
46
  },
47
47
  "./styles/bundled.css": "./dist/ropav.min.css",
48
+ "./styles/core": {
49
+ "style": "./dist/styles/core.css",
50
+ "default": "./dist/styles/core.css"
51
+ },
52
+ "./styles/components": {
53
+ "style": "./dist/styles/components.css",
54
+ "default": "./dist/styles/components.css"
55
+ },
56
+ "./styles/accordion": {
57
+ "style": "./dist/styles/accordion.css",
58
+ "default": "./dist/styles/accordion.css"
59
+ },
60
+ "./styles/alert": {
61
+ "style": "./dist/styles/alert.css",
62
+ "default": "./dist/styles/alert.css"
63
+ },
64
+ "./styles/alert-dialog": {
65
+ "style": "./dist/styles/alert-dialog.css",
66
+ "default": "./dist/styles/alert-dialog.css"
67
+ },
68
+ "./styles/autocomplete": {
69
+ "style": "./dist/styles/autocomplete.css",
70
+ "default": "./dist/styles/autocomplete.css"
71
+ },
72
+ "./styles/avatar": {
73
+ "style": "./dist/styles/avatar.css",
74
+ "default": "./dist/styles/avatar.css"
75
+ },
76
+ "./styles/avatar-group": {
77
+ "style": "./dist/styles/avatar-group.css",
78
+ "default": "./dist/styles/avatar-group.css"
79
+ },
80
+ "./styles/badge": {
81
+ "style": "./dist/styles/badge.css",
82
+ "default": "./dist/styles/badge.css"
83
+ },
84
+ "./styles/breadcrumbs": {
85
+ "style": "./dist/styles/breadcrumbs.css",
86
+ "default": "./dist/styles/breadcrumbs.css"
87
+ },
88
+ "./styles/button": {
89
+ "style": "./dist/styles/button.css",
90
+ "default": "./dist/styles/button.css"
91
+ },
92
+ "./styles/button-group": {
93
+ "style": "./dist/styles/button-group.css",
94
+ "default": "./dist/styles/button-group.css"
95
+ },
96
+ "./styles/calendar": {
97
+ "style": "./dist/styles/calendar.css",
98
+ "default": "./dist/styles/calendar.css"
99
+ },
100
+ "./styles/calendar-year-picker": {
101
+ "style": "./dist/styles/calendar-year-picker.css",
102
+ "default": "./dist/styles/calendar-year-picker.css"
103
+ },
104
+ "./styles/card": {
105
+ "style": "./dist/styles/card.css",
106
+ "default": "./dist/styles/card.css"
107
+ },
108
+ "./styles/checkbox": {
109
+ "style": "./dist/styles/checkbox.css",
110
+ "default": "./dist/styles/checkbox.css"
111
+ },
112
+ "./styles/checkbox-group": {
113
+ "style": "./dist/styles/checkbox-group.css",
114
+ "default": "./dist/styles/checkbox-group.css"
115
+ },
116
+ "./styles/chip": {
117
+ "style": "./dist/styles/chip.css",
118
+ "default": "./dist/styles/chip.css"
119
+ },
120
+ "./styles/close-button": {
121
+ "style": "./dist/styles/close-button.css",
122
+ "default": "./dist/styles/close-button.css"
123
+ },
124
+ "./styles/color-area": {
125
+ "style": "./dist/styles/color-area.css",
126
+ "default": "./dist/styles/color-area.css"
127
+ },
128
+ "./styles/color-field": {
129
+ "style": "./dist/styles/color-field.css",
130
+ "default": "./dist/styles/color-field.css"
131
+ },
132
+ "./styles/color-input-group": {
133
+ "style": "./dist/styles/color-input-group.css",
134
+ "default": "./dist/styles/color-input-group.css"
135
+ },
136
+ "./styles/color-picker": {
137
+ "style": "./dist/styles/color-picker.css",
138
+ "default": "./dist/styles/color-picker.css"
139
+ },
140
+ "./styles/color-slider": {
141
+ "style": "./dist/styles/color-slider.css",
142
+ "default": "./dist/styles/color-slider.css"
143
+ },
144
+ "./styles/color-swatch": {
145
+ "style": "./dist/styles/color-swatch.css",
146
+ "default": "./dist/styles/color-swatch.css"
147
+ },
148
+ "./styles/color-swatch-picker": {
149
+ "style": "./dist/styles/color-swatch-picker.css",
150
+ "default": "./dist/styles/color-swatch-picker.css"
151
+ },
152
+ "./styles/combo-box": {
153
+ "style": "./dist/styles/combo-box.css",
154
+ "default": "./dist/styles/combo-box.css"
155
+ },
156
+ "./styles/date-field": {
157
+ "style": "./dist/styles/date-field.css",
158
+ "default": "./dist/styles/date-field.css"
159
+ },
160
+ "./styles/date-picker": {
161
+ "style": "./dist/styles/date-picker.css",
162
+ "default": "./dist/styles/date-picker.css"
163
+ },
164
+ "./styles/date-range-picker": {
165
+ "style": "./dist/styles/date-range-picker.css",
166
+ "default": "./dist/styles/date-range-picker.css"
167
+ },
168
+ "./styles/description": {
169
+ "style": "./dist/styles/description.css",
170
+ "default": "./dist/styles/description.css"
171
+ },
172
+ "./styles/disclosure": {
173
+ "style": "./dist/styles/disclosure.css",
174
+ "default": "./dist/styles/disclosure.css"
175
+ },
176
+ "./styles/disclosure-group": {
177
+ "style": "./dist/styles/disclosure-group.css",
178
+ "default": "./dist/styles/disclosure-group.css"
179
+ },
180
+ "./styles/drawer": {
181
+ "style": "./dist/styles/drawer.css",
182
+ "default": "./dist/styles/drawer.css"
183
+ },
184
+ "./styles/drop-zone": {
185
+ "style": "./dist/styles/drop-zone.css",
186
+ "default": "./dist/styles/drop-zone.css"
187
+ },
188
+ "./styles/dropdown": {
189
+ "style": "./dist/styles/dropdown.css",
190
+ "default": "./dist/styles/dropdown.css"
191
+ },
192
+ "./styles/empty-state": {
193
+ "style": "./dist/styles/empty-state.css",
194
+ "default": "./dist/styles/empty-state.css"
195
+ },
196
+ "./styles/error-message": {
197
+ "style": "./dist/styles/error-message.css",
198
+ "default": "./dist/styles/error-message.css"
199
+ },
200
+ "./styles/field-error": {
201
+ "style": "./dist/styles/field-error.css",
202
+ "default": "./dist/styles/field-error.css"
203
+ },
204
+ "./styles/fieldset": {
205
+ "style": "./dist/styles/fieldset.css",
206
+ "default": "./dist/styles/fieldset.css"
207
+ },
208
+ "./styles/header": {
209
+ "style": "./dist/styles/header.css",
210
+ "default": "./dist/styles/header.css"
211
+ },
212
+ "./styles/input": {
213
+ "style": "./dist/styles/input.css",
214
+ "default": "./dist/styles/input.css"
215
+ },
216
+ "./styles/input-group": {
217
+ "style": "./dist/styles/input-group.css",
218
+ "default": "./dist/styles/input-group.css"
219
+ },
220
+ "./styles/input-otp": {
221
+ "style": "./dist/styles/input-otp.css",
222
+ "default": "./dist/styles/input-otp.css"
223
+ },
224
+ "./styles/kbd": {
225
+ "style": "./dist/styles/kbd.css",
226
+ "default": "./dist/styles/kbd.css"
227
+ },
228
+ "./styles/label": {
229
+ "style": "./dist/styles/label.css",
230
+ "default": "./dist/styles/label.css"
231
+ },
232
+ "./styles/link": {
233
+ "style": "./dist/styles/link.css",
234
+ "default": "./dist/styles/link.css"
235
+ },
236
+ "./styles/list-box": {
237
+ "style": "./dist/styles/list-box.css",
238
+ "default": "./dist/styles/list-box.css"
239
+ },
240
+ "./styles/list-box-item": {
241
+ "style": "./dist/styles/list-box-item.css",
242
+ "default": "./dist/styles/list-box-item.css"
243
+ },
244
+ "./styles/list-box-section": {
245
+ "style": "./dist/styles/list-box-section.css",
246
+ "default": "./dist/styles/list-box-section.css"
247
+ },
248
+ "./styles/menu": {
249
+ "style": "./dist/styles/menu.css",
250
+ "default": "./dist/styles/menu.css"
251
+ },
252
+ "./styles/menu-item": {
253
+ "style": "./dist/styles/menu-item.css",
254
+ "default": "./dist/styles/menu-item.css"
255
+ },
256
+ "./styles/menu-section": {
257
+ "style": "./dist/styles/menu-section.css",
258
+ "default": "./dist/styles/menu-section.css"
259
+ },
260
+ "./styles/meter": {
261
+ "style": "./dist/styles/meter.css",
262
+ "default": "./dist/styles/meter.css"
263
+ },
264
+ "./styles/modal": {
265
+ "style": "./dist/styles/modal.css",
266
+ "default": "./dist/styles/modal.css"
267
+ },
268
+ "./styles/number-field": {
269
+ "style": "./dist/styles/number-field.css",
270
+ "default": "./dist/styles/number-field.css"
271
+ },
272
+ "./styles/pagination": {
273
+ "style": "./dist/styles/pagination.css",
274
+ "default": "./dist/styles/pagination.css"
275
+ },
276
+ "./styles/popover": {
277
+ "style": "./dist/styles/popover.css",
278
+ "default": "./dist/styles/popover.css"
279
+ },
280
+ "./styles/progress-bar": {
281
+ "style": "./dist/styles/progress-bar.css",
282
+ "default": "./dist/styles/progress-bar.css"
283
+ },
284
+ "./styles/progress-circle": {
285
+ "style": "./dist/styles/progress-circle.css",
286
+ "default": "./dist/styles/progress-circle.css"
287
+ },
288
+ "./styles/radio": {
289
+ "style": "./dist/styles/radio.css",
290
+ "default": "./dist/styles/radio.css"
291
+ },
292
+ "./styles/radio-group": {
293
+ "style": "./dist/styles/radio-group.css",
294
+ "default": "./dist/styles/radio-group.css"
295
+ },
296
+ "./styles/range-calendar": {
297
+ "style": "./dist/styles/range-calendar.css",
298
+ "default": "./dist/styles/range-calendar.css"
299
+ },
300
+ "./styles/scroll-shadow": {
301
+ "style": "./dist/styles/scroll-shadow.css",
302
+ "default": "./dist/styles/scroll-shadow.css"
303
+ },
304
+ "./styles/search-field": {
305
+ "style": "./dist/styles/search-field.css",
306
+ "default": "./dist/styles/search-field.css"
307
+ },
308
+ "./styles/segmented-control": {
309
+ "style": "./dist/styles/segmented-control.css",
310
+ "default": "./dist/styles/segmented-control.css"
311
+ },
312
+ "./styles/select": {
313
+ "style": "./dist/styles/select.css",
314
+ "default": "./dist/styles/select.css"
315
+ },
316
+ "./styles/separator": {
317
+ "style": "./dist/styles/separator.css",
318
+ "default": "./dist/styles/separator.css"
319
+ },
320
+ "./styles/sidebar": {
321
+ "style": "./dist/styles/sidebar.css",
322
+ "default": "./dist/styles/sidebar.css"
323
+ },
324
+ "./styles/skeleton": {
325
+ "style": "./dist/styles/skeleton.css",
326
+ "default": "./dist/styles/skeleton.css"
327
+ },
328
+ "./styles/slider": {
329
+ "style": "./dist/styles/slider.css",
330
+ "default": "./dist/styles/slider.css"
331
+ },
332
+ "./styles/spinner": {
333
+ "style": "./dist/styles/spinner.css",
334
+ "default": "./dist/styles/spinner.css"
335
+ },
336
+ "./styles/splitter": {
337
+ "style": "./dist/styles/splitter.css",
338
+ "default": "./dist/styles/splitter.css"
339
+ },
340
+ "./styles/surface": {
341
+ "style": "./dist/styles/surface.css",
342
+ "default": "./dist/styles/surface.css"
343
+ },
344
+ "./styles/switch": {
345
+ "style": "./dist/styles/switch.css",
346
+ "default": "./dist/styles/switch.css"
347
+ },
348
+ "./styles/switch-group": {
349
+ "style": "./dist/styles/switch-group.css",
350
+ "default": "./dist/styles/switch-group.css"
351
+ },
352
+ "./styles/table": {
353
+ "style": "./dist/styles/table.css",
354
+ "default": "./dist/styles/table.css"
355
+ },
356
+ "./styles/tabs": {
357
+ "style": "./dist/styles/tabs.css",
358
+ "default": "./dist/styles/tabs.css"
359
+ },
360
+ "./styles/tag": {
361
+ "style": "./dist/styles/tag.css",
362
+ "default": "./dist/styles/tag.css"
363
+ },
364
+ "./styles/tag-group": {
365
+ "style": "./dist/styles/tag-group.css",
366
+ "default": "./dist/styles/tag-group.css"
367
+ },
368
+ "./styles/textarea": {
369
+ "style": "./dist/styles/textarea.css",
370
+ "default": "./dist/styles/textarea.css"
371
+ },
372
+ "./styles/textfield": {
373
+ "style": "./dist/styles/textfield.css",
374
+ "default": "./dist/styles/textfield.css"
375
+ },
376
+ "./styles/time-field": {
377
+ "style": "./dist/styles/time-field.css",
378
+ "default": "./dist/styles/time-field.css"
379
+ },
380
+ "./styles/toast": {
381
+ "style": "./dist/styles/toast.css",
382
+ "default": "./dist/styles/toast.css"
383
+ },
384
+ "./styles/toggle-button": {
385
+ "style": "./dist/styles/toggle-button.css",
386
+ "default": "./dist/styles/toggle-button.css"
387
+ },
388
+ "./styles/toggle-button-group": {
389
+ "style": "./dist/styles/toggle-button-group.css",
390
+ "default": "./dist/styles/toggle-button-group.css"
391
+ },
392
+ "./styles/toolbar": {
393
+ "style": "./dist/styles/toolbar.css",
394
+ "default": "./dist/styles/toolbar.css"
395
+ },
396
+ "./styles/tooltip": {
397
+ "style": "./dist/styles/tooltip.css",
398
+ "default": "./dist/styles/tooltip.css"
399
+ },
400
+ "./styles/typography": {
401
+ "style": "./dist/styles/typography.css",
402
+ "default": "./dist/styles/typography.css"
403
+ },
404
+ "./styles/virtualizer": {
405
+ "style": "./dist/styles/virtualizer.css",
406
+ "default": "./dist/styles/virtualizer.css"
407
+ },
48
408
  "./accordion": {
49
409
  "import": "./dist/components/accordion/index.js",
50
410
  "types": "./dist/components/accordion/index.d.ts"
@@ -421,7 +781,7 @@
421
781
  "@internationalized/date": "3.12.4",
422
782
  "@internationalized/number": "3.6.8",
423
783
  "@internationalized/string": "3.2.10",
424
- "@ropav/styles": "0.15.0"
784
+ "@ropav/styles": "0.16.0"
425
785
  },
426
786
  "peerDependencies": {
427
787
  "vue": "^3.6.0-rc.8"