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
package/AGENTS.md CHANGED
@@ -18,6 +18,10 @@ so a bundler drops what is never imported. The stylesheet is a separate import:
18
18
  import "ropav/styles/bundled.css";
19
19
  ```
20
20
 
21
+ Through a bundler, it also comes in parts: `ropav/styles/core` once, then `ropav/styles/<name>` for
22
+ each component used (`ropav/styles/modal`), or `ropav/styles/components` for all of them. The
23
+ core holds the theme, so it is never the part loaded late.
24
+
21
25
  Every component takes `class`, `aria-label`, `aria-labelledby` and `aria-describedby`. Props are
22
26
  camelCase in the types and kebab-case in a template: `itemTextValue` is written `item-text-value`.
23
27
 
@@ -13,8 +13,8 @@ export interface PortalProviderRootProps {
13
13
  /**
14
14
  * The part of the page the overlays below belong to, usually an element holding both the content
15
15
  * and the `container`. A modal makes only this element `inert` and holds focus and outside
16
- * presses only within it, and a placed overlay flips and shifts to stay inside it — so an app
17
- * rendered in a window of a larger page leaves the rest of that page alone.
16
+ * presses only within it, and a placed overlay flips and shifts to stay inside it — so content
17
+ * rendered into one region of a larger page leaves the rest of that page alone.
18
18
  *
19
19
  * Omitted, it inherits the enclosing provider's root; `null` goes back to the whole document.
20
20
  */
@@ -8,7 +8,7 @@ export interface RegisteredScope {
8
8
  * The innermost scope holding focus in a region, among the scopes whose region overlaps it.
9
9
  *
10
10
  * Without a region every scope overlaps every other, which is the page-wide question. With one, a
11
- * modal in one app's window is not shadowed by a modal another app opened later in its own.
11
+ * modal in one region is not shadowed by a modal opened later in another region beside it.
12
12
  */
13
13
  export declare const innermostContainingScope: (region?: Element | null) => RegisteredScope | null;
14
14
  /**
@@ -12,7 +12,7 @@ var scopes = [];
12
12
  * The innermost scope holding focus in a region, among the scopes whose region overlaps it.
13
13
  *
14
14
  * Without a region every scope overlaps every other, which is the page-wide question. With one, a
15
- * modal in one app's window is not shadowed by a modal another app opened later in its own.
15
+ * modal in one region is not shadowed by a modal opened later in another region beside it.
16
16
  */
17
17
  var innermostContainingScope = (region = null) => {
18
18
  for (let index = scopes.length - 1; index >= 0; index--) {
@@ -24,7 +24,7 @@ export interface UseDismissableOptions {
24
24
  */
25
25
  shouldCloseOnInteractOutside?: (element: Element) => boolean;
26
26
  /**
27
- * The part of the page the overlay belongs to. A press outside it — in another app's window
27
+ * The part of the page the overlay belongs to. A press outside it — in another region
28
28
  * beside this one — is neither an outside interaction nor swallowed, and the overlay is only
29
29
  * stacked with overlays whose region overlaps its own. `null` or absent: the whole document.
30
30
  */
@@ -25,7 +25,7 @@ export interface UseFocusScopeOptions {
25
25
  autoFocus?: MaybeRefOrGetter<boolean | "first" | "last" | undefined>;
26
26
  /**
27
27
  * The part of the page containment holds focus within. Focus moving to something outside it —
28
- * another app's window beside this one — is left alone rather than pulled back, and Tab pressed
28
+ * another region beside this one — is left alone rather than pulled back, and Tab pressed
29
29
  * out there is not taken over. `null` or absent: the whole document.
30
30
  */
31
31
  region?: MaybeRefOrGetter<Element | null | undefined>;
@@ -16,8 +16,8 @@ export interface Portal {
16
16
  * The portal that applies here: the nearest `PortalProvider`'s, or the document's body.
17
17
  *
18
18
  * Ported from React Aria's `UNSAFE_PortalProvider` (`getContainer`), with the root added: an
19
- * overlay rendered into a region of the page, say an app's window, belongs to that region and has
20
- * to leave the rest of the page alone — hidden, focused and pressed as it was.
19
+ * overlay rendered into a region of the page belongs to that region and has to leave the rest of
20
+ * the page alone — hidden, focused and pressed as it was.
21
21
  */
22
22
  export declare const usePortal: () => Portal;
23
23
  export interface PortalOptions {
@@ -15,8 +15,8 @@ var BODY = {
15
15
  * The portal that applies here: the nearest `PortalProvider`'s, or the document's body.
16
16
  *
17
17
  * Ported from React Aria's `UNSAFE_PortalProvider` (`getContainer`), with the root added: an
18
- * overlay rendered into a region of the page, say an app's window, belongs to that region and has
19
- * to leave the rest of the page alone — hidden, focused and pressed as it was.
18
+ * overlay rendered into a region of the page belongs to that region and has to leave the rest of
19
+ * the page alone — hidden, focused and pressed as it was.
20
20
  */
21
21
  var usePortal = () => usePortalContext() ?? BODY;
22
22
  /**