@uniflowed/ui 0.0.0-alpha.12 → 0.0.0-alpha.14

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/switch.js CHANGED
@@ -19,9 +19,11 @@
19
19
  //
20
20
  // The keyboard follows from the same distinction. `Space` toggles both. `Enter`
21
21
  // toggles a *switch*, because a switch is an operation and pressing Enter on
22
- // something that operates is what a reader expects — while `checkbox.js`
23
- // deliberately leaves `Enter` alone so that a checkbox inside a form still
24
- // submits it. That is the whole reason these are not one file with a flag.
22
+ // something that operates is what a reader expects — while `checkbox.js` turns
23
+ // `Enter` into the submission of the form the checkbox is in, which is what a
24
+ // native `<input type="checkbox">` does with the key and what a reader
25
+ // answering a question on their way to a submit button is asking for. That is
26
+ // the whole reason these are not one file with a flag.
25
27
 
26
28
  "use client";
27
29
 
package/toggle.js CHANGED
@@ -28,8 +28,9 @@
28
28
  //
29
29
  // Because a toggle button is a button, and a button activates on both. That is
30
30
  // the same reasoning `switch.js` gives for `Enter`, and the opposite of
31
- // `checkbox.js`, which leaves `Enter` alone because a checkbox is something a
32
- // reader answers on their way to submitting a form.
31
+ // `checkbox.js`, where `Enter` submits the form rather than touching the
32
+ // control — because a checkbox is something a reader answers on their way to
33
+ // submitting a form, and that is what the native one does with the key.
33
34
  //
34
35
  // # It is `disabled`, not `aria-disabled`
35
36
  //
package/tooltip.js CHANGED
@@ -73,7 +73,7 @@ import { createContext, useContext, useEffect, useId, useMemo, useRef } from "@u
73
73
  import { useEventListener } from "@uniflowed/hooks/dom";
74
74
  import { useStableCallback } from "@uniflowed/hooks/lifecycle";
75
75
 
76
- import type { Align, Side } from "./internal/anchor.js";
76
+ import type { Align, LogicalSide } from "./internal/anchor.js";
77
77
  import type { DelayGroup, HoverIntent } from "./internal/hover-intent.js";
78
78
  import type { Rest } from "./internal/merge-props.js";
79
79
  import { composeRefs, withProps, withoutComposed } from "./internal/merge-props.js";
@@ -89,7 +89,7 @@ import {
89
89
  import { useAnchor } from "./internal/anchor.js";
90
90
  import { useControlled } from "./internal/controlled-state.js";
91
91
 
92
- export type { Align, Side } from "./internal/anchor.js";
92
+ export type { Align, LogicalSide, Side } from "./internal/anchor.js";
93
93
 
94
94
  /** What a `Tooltip.Provider` shares with the tooltips inside it. */
95
95
  type TooltipScope = {|
@@ -337,7 +337,7 @@ export component TooltipBody(
337
337
  alignOffset?: number = 0,
338
338
  avoidCollisions?: boolean = true,
339
339
  collisionPadding?: number = 0,
340
- side?: Side = "top",
340
+ side?: LogicalSide = "top",
341
341
  sideOffset?: number = 0,
342
342
  ...rest: Rest
343
343
  ) {