ropav 0.11.0 → 0.12.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 (59) hide show
  1. package/dist/components/autocomplete/autocomplete-clear-button.js +1 -1
  2. package/dist/components/autocomplete/autocomplete-filter.d.ts +1 -1
  3. package/dist/components/autocomplete/autocomplete-root.js +3 -0
  4. package/dist/components/checkbox/checkbox-root.js +4 -1
  5. package/dist/components/radio/radio-root.js +4 -1
  6. package/dist/components/scroll-shadow/scroll-shadow-root.js +2 -10
  7. package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +10 -0
  8. package/dist/components/scroll-shadow/use-scroll-shadow.js +34 -2
  9. package/dist/components/select/index.d.ts +3 -2
  10. package/dist/components/select/index.js +2 -1
  11. package/dist/components/select/select-clear-button.d.ts +21 -0
  12. package/dist/components/select/select-clear-button.js +66 -0
  13. package/dist/components/select/select-root.d.ts +2 -1
  14. package/dist/components/select/select-root.js +15 -1
  15. package/dist/components/select/select.context.d.ts +11 -0
  16. package/dist/components/select/select.types.d.ts +3 -0
  17. package/dist/components/switch/switch-root.js +4 -1
  18. package/dist/components/table/table-row.js +3 -2
  19. package/dist/components/table/use-grid-keyboard.js +2 -3
  20. package/dist/components/table/use-table-collection.d.ts +0 -11
  21. package/dist/components/table/use-table-collection.js +1 -17
  22. package/dist/components/tabs/tabs-root.js +5 -1
  23. package/dist/components/tabs/tabs.types.d.ts +6 -0
  24. package/dist/components/textarea/textarea-root.js +20 -0
  25. package/dist/components/textarea/textarea.types.d.ts +21 -0
  26. package/dist/components/toast/index.d.ts +1 -1
  27. package/dist/components/toast/index.js +3 -3
  28. package/dist/components/toast/toast-default-content.js +26 -4
  29. package/dist/components/toast/toast-indicator.js +8 -2
  30. package/dist/components/toast/toast-provider.js +53 -5
  31. package/dist/components/toast/toast-queue.d.ts +60 -5
  32. package/dist/components/toast/toast-queue.js +85 -27
  33. package/dist/components/toast/toast-root.js +67 -14
  34. package/dist/components/toast/toast.constants.d.ts +17 -1
  35. package/dist/components/toast/toast.constants.js +18 -2
  36. package/dist/components/toast/toast.context.d.ts +6 -0
  37. package/dist/components/toast/toast.types.d.ts +19 -0
  38. package/dist/composables/use-list-keyboard.d.ts +1 -1
  39. package/dist/composables/use-list-keyboard.js +4 -5
  40. package/dist/composables/use-measured-height.d.ts +18 -10
  41. package/dist/composables/use-measured-height.js +53 -15
  42. package/dist/composables/use-overlay-position.js +7 -4
  43. package/dist/composables/use-select-state.d.ts +8 -0
  44. package/dist/composables/use-select-state.js +5 -0
  45. package/dist/composables/use-select.d.ts +7 -0
  46. package/dist/composables/use-select.js +6 -0
  47. package/dist/composables/use-textarea-autosize.d.ts +55 -0
  48. package/dist/composables/use-textarea-autosize.js +189 -0
  49. package/dist/composables/use-toast-region.d.ts +18 -4
  50. package/dist/composables/use-toast-region.js +128 -6
  51. package/dist/composables/use-toast.d.ts +1 -1
  52. package/dist/composables/use-toast.js +4 -3
  53. package/dist/composables/use-typeahead.js +3 -0
  54. package/dist/index.js +5 -4
  55. package/dist/ropav.min.css +1 -1
  56. package/dist/utils/focus.d.ts +13 -0
  57. package/dist/utils/focus.js +18 -1
  58. package/dist/version.js +1 -1
  59. package/package.json +3 -3
@@ -6,6 +6,19 @@
6
6
  * to land nowhere.
7
7
  */
8
8
  export declare const FOCUSABLE_SELECTOR: string;
9
+ /**
10
+ * Whether an event landed on a control nested inside `container` rather than on a part of the
11
+ * collection it holds.
12
+ *
13
+ * A control answers its own keys: the letters typed into a text field in a table cell are its
14
+ * text, and a button's Enter is its activation. The collection's own parts are told apart by
15
+ * their `data-collection` marker, since a cell or an option holding the roving tab stop matches
16
+ * the focusable selector without being content.
17
+ *
18
+ * `container` is excluded so a handler bound straight to a control — a select's trigger, which
19
+ * is itself a button — still counts its own keys as its own.
20
+ */
21
+ export declare const isNestedControl: (target: EventTarget | null, container?: EventTarget | null) => boolean;
9
22
  /**
10
23
  * Whether an element is visible enough to take focus.
11
24
  *
@@ -15,6 +15,23 @@ var FOCUSABLE_SELECTOR = [
15
15
  "[tabindex]:not([tabindex=\"-1\"])"
16
16
  ].join(",");
17
17
  /**
18
+ * Whether an event landed on a control nested inside `container` rather than on a part of the
19
+ * collection it holds.
20
+ *
21
+ * A control answers its own keys: the letters typed into a text field in a table cell are its
22
+ * text, and a button's Enter is its activation. The collection's own parts are told apart by
23
+ * their `data-collection` marker, since a cell or an option holding the roving tab stop matches
24
+ * the focusable selector without being content.
25
+ *
26
+ * `container` is excluded so a handler bound straight to a control — a select's trigger, which
27
+ * is itself a button — still counts its own keys as its own.
28
+ */
29
+ var isNestedControl = (target, container) => {
30
+ if (!(target instanceof Element)) return false;
31
+ const control = target.closest(FOCUSABLE_SELECTOR);
32
+ return control != null && control !== container && !control.hasAttribute("data-collection");
33
+ };
34
+ /**
18
35
  * Whether an element is visible enough to take focus.
19
36
  *
20
37
  * `checkVisibility()` is the only reliable read of this — `offsetParent` is always `null` in
@@ -118,4 +135,4 @@ var createFocusManager = (getRoot, options = {}) => {
118
135
  };
119
136
  };
120
137
  //#endregion
121
- export { FOCUSABLE_SELECTOR, createFocusManager, focusableIn, getScrollParent, isElementVisible, isScrollable, tabbableIn };
138
+ export { FOCUSABLE_SELECTOR, createFocusManager, focusableIn, getScrollParent, isElementVisible, isNestedControl, isScrollable, tabbableIn };
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/version.ts
2
- var ROPAV_VERSION = "0.11.0";
2
+ var ROPAV_VERSION = "0.12.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.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "🚀 Beautiful and modern Vue UI library built with Vapor Mode and Tailwind CSS 4.0.",
5
5
  "keywords": [
6
6
  "components",
@@ -420,9 +420,9 @@
420
420
  "@internationalized/date": "3.12.4",
421
421
  "@internationalized/number": "3.6.8",
422
422
  "@internationalized/string": "3.2.10",
423
- "@ropav/styles": "0.11.0"
423
+ "@ropav/styles": "0.12.0"
424
424
  },
425
425
  "peerDependencies": {
426
- "vue": "^3.6.0-rc.7"
426
+ "vue": "^3.6.0-rc.8"
427
427
  }
428
428
  }