@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/accordion.js +21 -3
- package/calendar.js +550 -0
- package/checkbox.js +188 -10
- package/collapsible.js +29 -12
- package/combobox.js +176 -5
- package/context-menu.js +198 -0
- package/date-picker.js +346 -0
- package/field.js +192 -25
- package/hover-card.js +3 -3
- package/index.js +196 -10
- package/internal/anchor.js +71 -6
- package/internal/date-grid.js +260 -0
- package/internal/disclosure.js +201 -0
- package/internal/menu-tree.js +228 -0
- package/menu.js +309 -163
- package/menubar.js +285 -0
- package/package.json +8 -3
- package/popover.js +21 -8
- package/resizable.js +149 -9
- package/select.js +29 -0
- package/switch.js +5 -3
- package/toggle.js +3 -2
- package/tooltip.js +3 -3
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
|
-
//
|
|
24
|
-
//
|
|
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`,
|
|
32
|
-
// reader answers on their way to
|
|
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,
|
|
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?:
|
|
340
|
+
side?: LogicalSide = "top",
|
|
341
341
|
sideOffset?: number = 0,
|
|
342
342
|
...rest: Rest
|
|
343
343
|
) {
|