@aurora-ds/components 1.7.18 → 1.7.20

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.
package/dist/index.d.ts CHANGED
@@ -2818,8 +2818,14 @@ type DialogComponent = FC<DialogProps> & {
2818
2818
 
2819
2819
  declare const Dialog: DialogComponent;
2820
2820
 
2821
- /** Where the menu opens relative to its anchor. */
2822
- type MenuPlacement = 'bottom' | 'right';
2821
+ /**
2822
+ * Where the menu opens relative to its anchor.
2823
+ * - `'bottom'` — opens below the anchor (default dropdown).
2824
+ * - `'right'` — opens to the right of the anchor, flips left when no room.
2825
+ * - `'left'` — opens to the left of the anchor, flips right when no room.
2826
+ * - `'top'` — opens above the anchor, flips below when no room.
2827
+ */
2828
+ type MenuPlacement = 'bottom' | 'right' | 'left' | 'top';
2823
2829
  type UseMenuPositionOptions = {
2824
2830
  /** Anchor element the menu is positioned relative to. */
2825
2831
  anchorEl?: HTMLElement | null;
@@ -2834,7 +2840,9 @@ type UseMenuPositionOptions = {
2834
2840
  /**
2835
2841
  * Where the menu opens relative to the anchor.
2836
2842
  * - `'bottom'` — opens below the anchor (default dropdown).
2837
- * - `'right'` — opens beside the anchor (submenu), flipping to the left when there is no room.
2843
+ * - `'right'` — opens to the right of the anchor, flips left when no room.
2844
+ * - `'left'` — opens to the left of the anchor, flips right when no room.
2845
+ * - `'top'` — opens above the anchor, flips below when no room.
2838
2846
  * @default 'bottom'
2839
2847
  */
2840
2848
  placement?: MenuPlacement;
@@ -2948,7 +2956,14 @@ type MenuItemProps = HTMLAttributes<HTMLLIElement> & {
2948
2956
  * @a11y Recommended — exposes `aria-haspopup="menu"` and `aria-expanded`.
2949
2957
  */
2950
2958
  submenu?: ReactNode;
2951
- /** Where the submenu opens relative to the item. @default 'right' */
2959
+ /**
2960
+ * Direction in which the submenu opens relative to the item.
2961
+ * - `'right'` — opens to the right, flips left when no room (default).
2962
+ * - `'left'` — opens to the left, flips right when no room.
2963
+ * - `'bottom'` — opens below the item.
2964
+ * - `'top'` — opens above the item, flips below when no room.
2965
+ * @default 'right'
2966
+ */
2952
2967
  submenuPlacement?: MenuPlacement;
2953
2968
  };
2954
2969
 
@@ -3175,12 +3190,12 @@ declare const useListKeyNav: ({ itemCount, enabled, onSelect, isDisabled, loop,
3175
3190
  * Computes and continuously updates the `position: fixed` style for a menu panel.
3176
3191
  *
3177
3192
  * Positioning strategy:
3178
- * - `placement="bottom"` (default): the menu opens below the anchor. If it would
3179
- * overflow the bottom of the viewport, `top` is shifted up so the menu bottom
3180
- * lands at `viewportHeight - margin` (never going off the top of the screen).
3181
- * - `placement="right"` (submenu): the menu opens to the right of the anchor and
3182
- * flips to the left when there is no horizontal room. Its `top` aligns with the
3183
- * anchor top and is clamped to the viewport.
3193
+ * - `placement="bottom"` (default): opens below the anchor; overflows are shifted up.
3194
+ * - `placement="top"`: opens above the anchor; flips to bottom when no room.
3195
+ * - `placement="right"`: opens to the right of the anchor; flips to the left when no room.
3196
+ * - `placement="left"`: opens to the left of the anchor; flips to the right when no room.
3197
+ *
3198
+ * In all cases the vertical position is clamped inside the viewport.
3184
3199
  *
3185
3200
  * Scroll handling: the page scroll is locked while the menu is open (see
3186
3201
  * `MenuPanel`), so the anchor cannot move out from under the menu. As a safety
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurora-ds/components",
3
- "version": "1.7.18",
3
+ "version": "1.7.20",
4
4
  "type": "module",
5
5
  "description": "Aurora DS - React Components Library",
6
6
  "main": "dist/cjs/index.js",