@ariakit/react-core 0.2.15 → 0.2.17
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/CHANGELOG.md +22 -0
- package/cjs/__chunks/{GHDSJPDP.cjs → 2CBM6TG2.cjs} +9 -1
- package/cjs/__chunks/{7AY74MRV.cjs → 2GAPZOO5.cjs} +2 -2
- package/cjs/__chunks/{4ALK6CLY.cjs → 3ALHBZ3R.cjs} +2 -2
- package/cjs/__chunks/{PJQOOE4T.cjs → 4ZIMX233.cjs} +6 -8
- package/cjs/__chunks/{XE2DJMCI.cjs → 6BAHKJ5K.cjs} +14 -20
- package/cjs/__chunks/{RO6U6W2X.cjs → 6XUE2BI4.cjs} +7 -7
- package/cjs/__chunks/{B4KY2VS7.cjs → ATSMFQCO.cjs} +3 -3
- package/cjs/__chunks/{IIT6ECXG.cjs → BOBM73LT.cjs} +8 -8
- package/cjs/__chunks/{COQS7NEY.cjs → BPAMJRUF.cjs} +2 -2
- package/cjs/__chunks/{GJDDV2DB.cjs → CRKIULUL.cjs} +13 -13
- package/cjs/__chunks/{AGHEZ6QM.cjs → DZGTHAPX.cjs} +2 -2
- package/cjs/__chunks/{KAIRFV3B.cjs → EHQTSSAA.cjs} +4 -4
- package/cjs/__chunks/{SIVNE3PR.cjs → ETK4FMZH.cjs} +12 -12
- package/cjs/__chunks/{YBLCB5MM.cjs → HOHFF2K6.cjs} +5 -5
- package/cjs/__chunks/{VXMYNJ4Z.cjs → KCH72A7J.cjs} +2 -2
- package/cjs/__chunks/{GYMLYZWR.cjs → LRB2BIFR.cjs} +3 -3
- package/cjs/__chunks/{RS6F2A54.cjs → MNRJXH5I.cjs} +4 -4
- package/cjs/__chunks/{HV7BPIPP.cjs → MNUCM2FP.cjs} +7 -7
- package/cjs/__chunks/{MEIHBPXG.cjs → MPGRRS75.cjs} +32 -26
- package/cjs/__chunks/{VBRBBWCP.cjs → NH6Q6YSM.cjs} +2 -2
- package/cjs/__chunks/{UQ677BGW.cjs → OJKRJ6N2.cjs} +6 -6
- package/cjs/__chunks/{ZC54XMTA.cjs → OVOYNBFC.cjs} +4 -4
- package/cjs/__chunks/{LHLJ5HWH.cjs → RYHFE3BI.cjs} +2 -2
- package/cjs/__chunks/{2BUZEL3H.cjs → TUSNAJ32.cjs} +2 -2
- package/cjs/__chunks/{5PVFQNEK.cjs → ZK5KHSMP.cjs} +10 -10
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/checkbox/checkbox.cjs +3 -3
- package/cjs/collection/collection-item.cjs +2 -2
- package/cjs/collection/collection-renderer.cjs +3 -3
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/combobox/combobox-item.cjs +4 -4
- package/cjs/combobox/combobox-popover.cjs +7 -7
- package/cjs/combobox/combobox-store.cjs +11 -11
- package/cjs/combobox/combobox.cjs +3 -3
- package/cjs/command/command.d.ts +18 -5
- package/cjs/composite/composite-container.cjs +3 -3
- package/cjs/composite/composite-item.cjs +4 -4
- package/cjs/composite/composite-overflow-disclosure.cjs +7 -6
- package/cjs/composite/composite-overflow-store.cjs +7 -7
- package/cjs/composite/composite-overflow.cjs +7 -7
- package/cjs/composite/composite-renderer.cjs +4 -4
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/dialog/dialog-backdrop.cjs +4 -4
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/dialog/dialog.cjs +6 -6
- package/cjs/dialog/utils/use-nested-dialogs.cjs +2 -2
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/focusable/focusable.d.ts +52 -13
- package/cjs/form/form-checkbox.cjs +8 -8
- package/cjs/form/form-description.cjs +2 -2
- package/cjs/form/form-error.cjs +2 -2
- package/cjs/form/form-field.cjs +3 -3
- package/cjs/form/form-input.cjs +3 -3
- package/cjs/form/form-label.cjs +2 -2
- package/cjs/form/form-push.cjs +2 -2
- package/cjs/form/form-radio.cjs +7 -7
- package/cjs/form/form-store.cjs +8 -8
- package/cjs/hovercard/hovercard-anchor.cjs +2 -2
- package/cjs/hovercard/hovercard-disclosure.cjs +12 -14
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/hovercard/hovercard.cjs +8 -8
- package/cjs/menu/menu-bar-store.cjs +6 -6
- package/cjs/menu/menu-button.cjs +9 -6
- package/cjs/menu/menu-item-checkbox.cjs +9 -9
- package/cjs/menu/menu-item-radio.cjs +7 -7
- package/cjs/menu/menu-item.cjs +5 -5
- package/cjs/menu/menu-list.cjs +3 -3
- package/cjs/menu/menu-store.cjs +13 -13
- package/cjs/menu/menu.cjs +10 -10
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/popover/popover.cjs +7 -7
- package/cjs/radio/radio-store.cjs +7 -7
- package/cjs/radio/radio.cjs +5 -5
- package/cjs/select/select-item.cjs +4 -4
- package/cjs/select/select-popover.cjs +7 -7
- package/cjs/select/select-renderer.cjs +7 -7
- package/cjs/select/select-store.cjs +11 -11
- package/cjs/tab/tab-panel.cjs +5 -5
- package/cjs/tab/tab-store.cjs +9 -9
- package/cjs/tab/tab.cjs +4 -4
- package/cjs/toolbar/toolbar-container.cjs +7 -7
- package/cjs/toolbar/toolbar-input.cjs +5 -5
- package/cjs/toolbar/toolbar-item.cjs +5 -5
- package/cjs/toolbar/toolbar-store.cjs +6 -6
- package/cjs/tooltip/tooltip-anchor.cjs +22 -28
- package/cjs/tooltip/tooltip-store.cjs +10 -10
- package/cjs/tooltip/tooltip.cjs +8 -8
- package/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/cjs/utils/store.cjs +2 -2
- package/esm/__chunks/{ID2DTD7Z.js → 24II2LYU.js} +5 -7
- package/esm/__chunks/{JWSYWSCR.js → 3CJV7UYE.js} +1 -1
- package/esm/__chunks/{SPTQP5I5.js → 3PKTK2K7.js} +2 -2
- package/esm/__chunks/{H3BU75TA.js → 5IZLNERH.js} +1 -1
- package/esm/__chunks/{QHXLY5NM.js → 5QHNNZNE.js} +1 -1
- package/esm/__chunks/{4LTL37RB.js → 6TMY6IFR.js} +1 -1
- package/esm/__chunks/{36V3RYFS.js → 7KULBIZY.js} +2 -2
- package/esm/__chunks/{I6WUAEGK.js → DITMA5PJ.js} +2 -2
- package/esm/__chunks/{VVJJXZ6R.js → FVD2NJZN.js} +2 -2
- package/esm/__chunks/{JHKKFNCJ.js → K5MSER23.js} +1 -1
- package/esm/__chunks/{ISVIGIQD.js → KME3EPVS.js} +1 -1
- package/esm/__chunks/{74BBE733.js → LDICFO4C.js} +2 -2
- package/esm/__chunks/{QLIKSQTQ.js → ONFAHVST.js} +1 -1
- package/esm/__chunks/{XEEFNNEM.js → P2MU7N5N.js} +1 -1
- package/esm/__chunks/{XE25NQP3.js → P4CYWFUE.js} +1 -1
- package/esm/__chunks/{MXMUDZTV.js → P63NRZ4A.js} +31 -25
- package/esm/__chunks/{OEA63YXU.js → PLOINBVB.js} +14 -20
- package/esm/__chunks/{WNGYZL6A.js → RS7KBRGA.js} +1 -1
- package/esm/__chunks/{JJW3R5IK.js → SWJ5EOOS.js} +1 -1
- package/esm/__chunks/{BIPBU2AE.js → SZIMOWLA.js} +5 -5
- package/esm/__chunks/{OJNIJGF2.js → UVKFBOMX.js} +2 -2
- package/esm/__chunks/{HGFTMLQ7.js → VFNGSUSF.js} +13 -13
- package/esm/__chunks/{RRY7OZXM.js → WC3GK4CL.js} +2 -2
- package/esm/__chunks/{JFQ4TNZX.js → XADDW7ND.js} +2 -2
- package/esm/__chunks/{I3PXTXPI.js → Y5XLHDDM.js} +9 -1
- package/esm/checkbox/checkbox-store.js +2 -2
- package/esm/checkbox/checkbox.js +2 -2
- package/esm/collection/collection-item.js +1 -1
- package/esm/collection/collection-renderer.js +2 -2
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-item.js +3 -3
- package/esm/combobox/combobox-popover.js +6 -6
- package/esm/combobox/combobox-store.js +6 -6
- package/esm/combobox/combobox.js +3 -3
- package/esm/command/command.d.ts +18 -5
- package/esm/composite/composite-container.js +2 -2
- package/esm/composite/composite-item.js +3 -3
- package/esm/composite/composite-overflow-disclosure.js +6 -5
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-overflow.js +6 -6
- package/esm/composite/composite-renderer.js +3 -3
- package/esm/composite/composite-store.js +3 -3
- package/esm/dialog/dialog-backdrop.js +3 -3
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/dialog/dialog.js +5 -5
- package/esm/dialog/utils/use-nested-dialogs.js +1 -1
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/focusable/focusable.d.ts +52 -13
- package/esm/form/form-checkbox.js +5 -5
- package/esm/form/form-description.js +1 -1
- package/esm/form/form-error.js +1 -1
- package/esm/form/form-field.js +2 -2
- package/esm/form/form-input.js +2 -2
- package/esm/form/form-label.js +1 -1
- package/esm/form/form-push.js +1 -1
- package/esm/form/form-radio.js +5 -5
- package/esm/form/form-store.js +2 -2
- package/esm/hovercard/hovercard-anchor.js +1 -1
- package/esm/hovercard/hovercard-disclosure.js +12 -14
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/hovercard/hovercard.js +7 -7
- package/esm/menu/menu-bar-store.js +3 -3
- package/esm/menu/menu-button.js +7 -4
- package/esm/menu/menu-item-checkbox.js +6 -6
- package/esm/menu/menu-item-radio.js +5 -5
- package/esm/menu/menu-item.js +4 -4
- package/esm/menu/menu-list.js +2 -2
- package/esm/menu/menu-store.js +7 -7
- package/esm/menu/menu.js +8 -8
- package/esm/popover/popover-store.js +4 -4
- package/esm/popover/popover.js +6 -6
- package/esm/radio/radio-store.js +3 -3
- package/esm/radio/radio.js +4 -4
- package/esm/select/select-item.js +3 -3
- package/esm/select/select-popover.js +6 -6
- package/esm/select/select-renderer.js +3 -3
- package/esm/select/select-store.js +6 -6
- package/esm/tab/tab-panel.js +3 -3
- package/esm/tab/tab-store.js +3 -3
- package/esm/tab/tab.js +3 -3
- package/esm/toolbar/toolbar-container.js +5 -5
- package/esm/toolbar/toolbar-input.js +4 -4
- package/esm/toolbar/toolbar-item.js +4 -4
- package/esm/toolbar/toolbar-store.js +3 -3
- package/esm/tooltip/tooltip-anchor.js +22 -28
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/tooltip/tooltip.js +7 -7
- package/esm/tsconfig.build.tsbuildinfo +1 -1
- package/esm/utils/store.js +1 -1
- package/package.json +2 -2
package/esm/combobox/combobox.js
CHANGED
|
@@ -271,9 +271,6 @@ var useCombobox = createHook(
|
|
|
271
271
|
setCanInline(textInserted && caretAtEnd);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
if (showOnChangeProp(event)) {
|
|
275
|
-
store.show();
|
|
276
|
-
}
|
|
277
274
|
if (setValueOnChangeProp(event)) {
|
|
278
275
|
const isSameValue = value2 === store.getState().value;
|
|
279
276
|
store.setValue(value2);
|
|
@@ -281,6 +278,9 @@ var useCombobox = createHook(
|
|
|
281
278
|
forceValueUpdate();
|
|
282
279
|
}
|
|
283
280
|
}
|
|
281
|
+
if (showOnChangeProp(event)) {
|
|
282
|
+
store.show();
|
|
283
|
+
}
|
|
284
284
|
if (!autoSelect || !canAutoSelectRef.current) {
|
|
285
285
|
store.setActiveId(null);
|
|
286
286
|
}
|
package/esm/command/command.d.ts
CHANGED
|
@@ -13,9 +13,16 @@ import type { As, Props } from "../utils/types.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const useCommand: import("../utils/types.js").Hook<CommandOptions<"button">>;
|
|
15
15
|
/**
|
|
16
|
-
* Renders a clickable element
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Renders a clickable element, which is a `button` by default, and inherits
|
|
17
|
+
* features from the [`Focusable`](https://ariakit.org/reference/focusable)
|
|
18
|
+
* component.
|
|
19
|
+
*
|
|
20
|
+
* If the base element isn't a native clickable one, this component will provide
|
|
21
|
+
* extra attributes and event handlers to ensure accessibility. It can be
|
|
22
|
+
* activated with the keyboard using the
|
|
23
|
+
* [`clickOnEnter`](https://ariakit.org/reference/command#clickonenter) and
|
|
24
|
+
* [`clickOnSpace`](https://ariakit.org/reference/command#clickonspace)
|
|
25
|
+
* props. Both are set to `true` by default.
|
|
19
26
|
* @see https://ariakit.org/components/command
|
|
20
27
|
* @example
|
|
21
28
|
* ```jsx
|
|
@@ -25,12 +32,18 @@ export declare const useCommand: import("../utils/types.js").Hook<CommandOptions
|
|
|
25
32
|
export declare const Command: import("../utils/types.js").Component<CommandOptions<"button">>;
|
|
26
33
|
export interface CommandOptions<T extends As = "button"> extends FocusableOptions<T> {
|
|
27
34
|
/**
|
|
28
|
-
* If true
|
|
35
|
+
* If set to `true`, pressing the enter key while this element is focused will
|
|
36
|
+
* trigger a click on the element, regardless of whether it's a native button
|
|
37
|
+
* or not. If this prop is set to `false`, pressing enter will not initiate a
|
|
38
|
+
* click.
|
|
29
39
|
* @default true
|
|
30
40
|
*/
|
|
31
41
|
clickOnEnter?: boolean;
|
|
32
42
|
/**
|
|
33
|
-
* If true
|
|
43
|
+
* If set to `true`, pressing and releasing the space key while this element
|
|
44
|
+
* is focused will trigger a click on the element, regardless of whether it's
|
|
45
|
+
* a native button or not. If this prop is set to `false`, space will not
|
|
46
|
+
* initiate a click.
|
|
34
47
|
* @default true
|
|
35
48
|
*/
|
|
36
49
|
clickOnSpace?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompositeContainer,
|
|
3
3
|
useCompositeContainer
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/P2MU7N5N.js";
|
|
5
5
|
import "../__chunks/OXPV2NBK.js";
|
|
6
6
|
import "../__chunks/WJ37OVG2.js";
|
|
7
7
|
import "../__chunks/NQJBHION.js";
|
|
8
|
-
import "../__chunks/
|
|
8
|
+
import "../__chunks/P63NRZ4A.js";
|
|
9
9
|
import "../__chunks/J7Q2EO23.js";
|
|
10
10
|
import "../__chunks/CP3U4HPL.js";
|
|
11
11
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompositeItem,
|
|
3
3
|
useCompositeItem
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/FVD2NJZN.js";
|
|
5
5
|
import "../__chunks/P4RGQGTG.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/VFNGSUSF.js";
|
|
7
7
|
import "../__chunks/T3DJZG63.js";
|
|
8
8
|
import "../__chunks/OXPV2NBK.js";
|
|
9
9
|
import "../__chunks/WJ37OVG2.js";
|
|
10
10
|
import "../__chunks/MYID4V27.js";
|
|
11
11
|
import "../__chunks/BMLNRUFQ.js";
|
|
12
12
|
import "../__chunks/NQJBHION.js";
|
|
13
|
-
import "../__chunks/
|
|
13
|
+
import "../__chunks/P63NRZ4A.js";
|
|
14
14
|
import "../__chunks/J7Q2EO23.js";
|
|
15
15
|
import "../__chunks/CP3U4HPL.js";
|
|
16
16
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -7,9 +7,9 @@ import "../__chunks/O6CV6VRM.js";
|
|
|
7
7
|
import "../__chunks/7PHM3O7I.js";
|
|
8
8
|
import {
|
|
9
9
|
useCompositeItem
|
|
10
|
-
} from "../__chunks/
|
|
10
|
+
} from "../__chunks/FVD2NJZN.js";
|
|
11
11
|
import "../__chunks/P4RGQGTG.js";
|
|
12
|
-
import "../__chunks/
|
|
12
|
+
import "../__chunks/VFNGSUSF.js";
|
|
13
13
|
import "../__chunks/T3DJZG63.js";
|
|
14
14
|
import "../__chunks/OXPV2NBK.js";
|
|
15
15
|
import "../__chunks/WJ37OVG2.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
createElement,
|
|
22
22
|
createHook
|
|
23
23
|
} from "../__chunks/NQJBHION.js";
|
|
24
|
-
import "../__chunks/
|
|
24
|
+
import "../__chunks/P63NRZ4A.js";
|
|
25
25
|
import {
|
|
26
26
|
useEvent,
|
|
27
27
|
useMergeRefs
|
|
@@ -35,14 +35,15 @@ import {
|
|
|
35
35
|
|
|
36
36
|
// src/composite/composite-overflow-disclosure.ts
|
|
37
37
|
import { useEffect, useRef, useState } from "react";
|
|
38
|
+
import { sync } from "@ariakit/core/utils/store";
|
|
38
39
|
var useCompositeOverflowDisclosure = createHook((_a) => {
|
|
39
40
|
var _b = _a, { store } = _b, props = __objRest(_b, ["store"]);
|
|
40
41
|
const ref = useRef(null);
|
|
41
42
|
const [shouldRegisterItem, setShouldRegisterItem] = useState(false);
|
|
42
43
|
useEffect(() => {
|
|
43
|
-
return
|
|
44
|
+
return sync(store, ["disclosureElement"], () => {
|
|
44
45
|
store.setDisclosureElement(ref.current);
|
|
45
|
-
}
|
|
46
|
+
});
|
|
46
47
|
}, [store]);
|
|
47
48
|
const onFocusProp = props.onFocus;
|
|
48
49
|
const onFocus = useEvent((event) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopoverStoreOptions,
|
|
3
3
|
usePopoverStoreProps
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/3PKTK2K7.js";
|
|
5
|
+
import "../__chunks/WC3GK4CL.js";
|
|
6
|
+
import "../__chunks/SWJ5EOOS.js";
|
|
7
7
|
import {
|
|
8
8
|
useStore
|
|
9
|
-
} from "../__chunks/
|
|
9
|
+
} from "../__chunks/P63NRZ4A.js";
|
|
10
10
|
import "../__chunks/J7Q2EO23.js";
|
|
11
11
|
import "../__chunks/CP3U4HPL.js";
|
|
12
12
|
import {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopover
|
|
3
|
-
} from "../__chunks/
|
|
4
|
-
import "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
3
|
+
} from "../__chunks/K5MSER23.js";
|
|
4
|
+
import "../__chunks/SZIMOWLA.js";
|
|
5
|
+
import "../__chunks/5IZLNERH.js";
|
|
6
6
|
import "../__chunks/NHPU54IO.js";
|
|
7
7
|
import "../__chunks/GDORSOK6.js";
|
|
8
8
|
import "../__chunks/3LAWLNOX.js";
|
|
9
9
|
import "../__chunks/CJI67A3R.js";
|
|
10
|
-
import "../__chunks/
|
|
10
|
+
import "../__chunks/PLOINBVB.js";
|
|
11
11
|
import "../__chunks/E5XSMSHD.js";
|
|
12
12
|
import "../__chunks/LEBYH5FW.js";
|
|
13
13
|
import "../__chunks/IXXFVVA2.js";
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
createElement,
|
|
35
35
|
createHook
|
|
36
36
|
} from "../__chunks/NQJBHION.js";
|
|
37
|
-
import "../__chunks/
|
|
38
|
-
import "../__chunks/
|
|
37
|
+
import "../__chunks/SWJ5EOOS.js";
|
|
38
|
+
import "../__chunks/P63NRZ4A.js";
|
|
39
39
|
import {
|
|
40
40
|
useEvent
|
|
41
41
|
} from "../__chunks/J7Q2EO23.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompositeRenderer,
|
|
3
3
|
useCompositeRenderer
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/DITMA5PJ.js";
|
|
5
5
|
import {
|
|
6
6
|
getCollectionRendererItem,
|
|
7
7
|
getCollectionRendererItemId
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/ONFAHVST.js";
|
|
9
9
|
import "../__chunks/T3DJZG63.js";
|
|
10
10
|
import "../__chunks/WJ37OVG2.js";
|
|
11
11
|
import "../__chunks/NQJBHION.js";
|
|
12
|
-
import "../__chunks/
|
|
12
|
+
import "../__chunks/P63NRZ4A.js";
|
|
13
13
|
import "../__chunks/J7Q2EO23.js";
|
|
14
14
|
import "../__chunks/CP3U4HPL.js";
|
|
15
15
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
useCompositeStore,
|
|
3
3
|
useCompositeStoreOptions,
|
|
4
4
|
useCompositeStoreProps
|
|
5
|
-
} from "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
5
|
+
} from "../__chunks/7KULBIZY.js";
|
|
6
|
+
import "../__chunks/RS7KBRGA.js";
|
|
7
|
+
import "../__chunks/P63NRZ4A.js";
|
|
8
8
|
import "../__chunks/J7Q2EO23.js";
|
|
9
9
|
import "../__chunks/CP3U4HPL.js";
|
|
10
10
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DialogBackdrop
|
|
3
|
-
} from "../__chunks/
|
|
3
|
+
} from "../__chunks/5IZLNERH.js";
|
|
4
4
|
import "../__chunks/LEBYH5FW.js";
|
|
5
5
|
import "../__chunks/IXXFVVA2.js";
|
|
6
6
|
import "../__chunks/FW6QFGFT.js";
|
|
@@ -8,8 +8,8 @@ import "../__chunks/5M4ITSXL.js";
|
|
|
8
8
|
import "../__chunks/M5I7AM4N.js";
|
|
9
9
|
import "../__chunks/WHEEIXMF.js";
|
|
10
10
|
import "../__chunks/NQJBHION.js";
|
|
11
|
-
import "../__chunks/
|
|
12
|
-
import "../__chunks/
|
|
11
|
+
import "../__chunks/SWJ5EOOS.js";
|
|
12
|
+
import "../__chunks/P63NRZ4A.js";
|
|
13
13
|
import "../__chunks/J7Q2EO23.js";
|
|
14
14
|
import "../__chunks/CP3U4HPL.js";
|
|
15
15
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
useDialogStore,
|
|
3
3
|
useDialogStoreOptions,
|
|
4
4
|
useDialogStoreProps
|
|
5
|
-
} from "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
5
|
+
} from "../__chunks/WC3GK4CL.js";
|
|
6
|
+
import "../__chunks/SWJ5EOOS.js";
|
|
7
|
+
import "../__chunks/P63NRZ4A.js";
|
|
8
8
|
import "../__chunks/J7Q2EO23.js";
|
|
9
9
|
import "../__chunks/CP3U4HPL.js";
|
|
10
10
|
import "../__chunks/PNRLI7OV.js";
|
package/esm/dialog/dialog.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Dialog,
|
|
3
3
|
useDialog
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/SZIMOWLA.js";
|
|
5
|
+
import "../__chunks/5IZLNERH.js";
|
|
6
6
|
import "../__chunks/NHPU54IO.js";
|
|
7
7
|
import "../__chunks/GDORSOK6.js";
|
|
8
8
|
import "../__chunks/3LAWLNOX.js";
|
|
9
9
|
import "../__chunks/CJI67A3R.js";
|
|
10
|
-
import "../__chunks/
|
|
10
|
+
import "../__chunks/PLOINBVB.js";
|
|
11
11
|
import "../__chunks/E5XSMSHD.js";
|
|
12
12
|
import "../__chunks/LEBYH5FW.js";
|
|
13
13
|
import "../__chunks/IXXFVVA2.js";
|
|
@@ -29,8 +29,8 @@ import "../__chunks/MYID4V27.js";
|
|
|
29
29
|
import "../__chunks/BMLNRUFQ.js";
|
|
30
30
|
import "../__chunks/FL2AU7YJ.js";
|
|
31
31
|
import "../__chunks/NQJBHION.js";
|
|
32
|
-
import "../__chunks/
|
|
33
|
-
import "../__chunks/
|
|
32
|
+
import "../__chunks/SWJ5EOOS.js";
|
|
33
|
+
import "../__chunks/P63NRZ4A.js";
|
|
34
34
|
import "../__chunks/J7Q2EO23.js";
|
|
35
35
|
import "../__chunks/CP3U4HPL.js";
|
|
36
36
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
useDisclosureStore,
|
|
3
3
|
useDisclosureStoreOptions,
|
|
4
4
|
useDisclosureStoreProps
|
|
5
|
-
} from "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
5
|
+
} from "../__chunks/SWJ5EOOS.js";
|
|
6
|
+
import "../__chunks/P63NRZ4A.js";
|
|
7
7
|
import "../__chunks/J7Q2EO23.js";
|
|
8
8
|
import "../__chunks/CP3U4HPL.js";
|
|
9
9
|
import "../__chunks/PNRLI7OV.js";
|
|
@@ -12,7 +12,20 @@ import type { As, Options, Props } from "../utils/types.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const useFocusable: import("../utils/types.js").Hook<FocusableOptions<"div">>;
|
|
14
14
|
/**
|
|
15
|
-
* Renders
|
|
15
|
+
* Renders a focusable element. When this element gains keyboard focus, it gets
|
|
16
|
+
* a
|
|
17
|
+
* [`data-focus-visible`](https://ariakit.org/guide/styling#data-focus-visible)
|
|
18
|
+
* attribute and triggers the
|
|
19
|
+
* [`onFocusVisible`](https://ariakit.org/reference/focusable#onfocusvisible)
|
|
20
|
+
* prop.
|
|
21
|
+
*
|
|
22
|
+
* The `Focusable` component supports the
|
|
23
|
+
* [`disabled`](https://ariakit.org/reference/focusable#disabled) prop for all
|
|
24
|
+
* elements, even those not supporting the native `disabled` attribute. Disabled
|
|
25
|
+
* elements using the `Focusable` component may be still accessible via keyboard
|
|
26
|
+
* by using the the
|
|
27
|
+
* [`accessibleWhenDisabled`](https://ariakit.org/reference/focusable#accessiblewhendisabled)
|
|
28
|
+
* prop.
|
|
16
29
|
* @see https://ariakit.org/components/focusable
|
|
17
30
|
* @example
|
|
18
31
|
* ```jsx
|
|
@@ -22,31 +35,56 @@ export declare const useFocusable: import("../utils/types.js").Hook<FocusableOpt
|
|
|
22
35
|
export declare const Focusable: import("../utils/types.js").Component<FocusableOptions<"div">>;
|
|
23
36
|
export interface FocusableOptions<T extends As = "div"> extends Options<T> {
|
|
24
37
|
/**
|
|
25
|
-
* Determines
|
|
26
|
-
*
|
|
27
|
-
* `
|
|
38
|
+
* Determines if the element is disabled. This sets the `aria-disabled`
|
|
39
|
+
* attribute accordingly, enabling support for all elements, including those
|
|
40
|
+
* that don't support the native `disabled` attribute.
|
|
41
|
+
*
|
|
42
|
+
* This feature can be combined with the
|
|
43
|
+
* [`accessibleWhenDisabled`](https://ariakit.org/reference/focusable#accessiblewhendisabled)
|
|
44
|
+
* prop to make disabled elements still accessible via keyboard.
|
|
45
|
+
*
|
|
46
|
+
* Live examples:
|
|
47
|
+
* - [Submenu](https://ariakit.org/examples/menu-nested)
|
|
28
48
|
* @default false
|
|
29
49
|
*/
|
|
30
50
|
disabled?: boolean;
|
|
31
51
|
/**
|
|
32
|
-
* Automatically
|
|
33
|
-
*
|
|
34
|
-
* focus before React effects
|
|
52
|
+
* Automatically focuses the element upon mounting, similar to the native
|
|
53
|
+
* `autoFocus` prop. This addresses an issue where the element with the native
|
|
54
|
+
* `autoFocus` attribute might receive focus before React effects are
|
|
55
|
+
* executed.
|
|
56
|
+
*
|
|
57
|
+
* The `autoFocus` prop can also be used with
|
|
58
|
+
* [Focusable](https://ariakit.org/components/focusable) elements within a
|
|
59
|
+
* [Dialog](https://ariakit.org/components/dialog) component, establishing the
|
|
60
|
+
* initial focus as the dialog opens.
|
|
35
61
|
*
|
|
36
62
|
* Live examples:
|
|
37
63
|
* - [Dialog with React
|
|
38
64
|
* Router](https://ariakit.org/examples/dialog-react-router)
|
|
65
|
+
* - [Nested Dialog](https://ariakit.org/examples/dialog-nested)
|
|
39
66
|
* @default false
|
|
40
67
|
*/
|
|
41
68
|
autoFocus?: boolean;
|
|
42
69
|
/**
|
|
43
|
-
*
|
|
70
|
+
* Determines if [Focusable](https://ariakit.org/components/focusable)
|
|
71
|
+
* features should be active on non-native focusable elements.
|
|
72
|
+
*
|
|
73
|
+
* **Note**: This prop only turns off the additional features provided by the
|
|
74
|
+
* [Focusable](https://ariakit.org/components/focusable) component. Non-native
|
|
75
|
+
* focusable elements will lose their focusability entirely. However, native
|
|
76
|
+
* focusable elements will retain their inherent focusability, but without
|
|
77
|
+
* added features such as improved
|
|
78
|
+
* [`autoFocus`](https://ariakit.org/reference/focusable#autofocus),
|
|
79
|
+
* [`accessibleWhenDisabled`](https://ariakit.org/reference/focusable#accessiblewhendisabled),
|
|
80
|
+
* [`onFocusVisible`](https://ariakit.org/reference/focusable#onfocusvisible),
|
|
81
|
+
* etc.
|
|
44
82
|
* @default true
|
|
45
83
|
*/
|
|
46
84
|
focusable?: boolean;
|
|
47
85
|
/**
|
|
48
|
-
*
|
|
49
|
-
* disabled.
|
|
86
|
+
* Indicates whether the element should be focusable even when it is
|
|
87
|
+
* [`disabled`](https://ariakit.org/reference/focusable#disabled).
|
|
50
88
|
*
|
|
51
89
|
* This is important when discoverability is a concern. For example:
|
|
52
90
|
*
|
|
@@ -57,12 +95,13 @@ export interface FocusableOptions<T extends As = "div"> extends Options<T> {
|
|
|
57
95
|
* functionality is primarily via their presence on the toolbar.
|
|
58
96
|
*
|
|
59
97
|
* Learn more on [Focusability of disabled
|
|
60
|
-
* controls](https://www.w3.org/
|
|
98
|
+
* controls](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols).
|
|
61
99
|
*/
|
|
62
100
|
accessibleWhenDisabled?: boolean;
|
|
63
101
|
/**
|
|
64
|
-
* Custom event handler
|
|
65
|
-
*
|
|
102
|
+
* Custom event handler invoked when the element gains focus through keyboard
|
|
103
|
+
* interaction or a key press occurs while the element is in focus. This is a
|
|
104
|
+
* programmatic equivalent of the `data-focus-visible` attribute.
|
|
66
105
|
*
|
|
67
106
|
* Live examples:
|
|
68
107
|
* - [Custom Checkbox](https://ariakit.org/examples/checkbox-custom)
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFormField
|
|
3
|
-
} from "../__chunks/
|
|
3
|
+
} from "../__chunks/5QHNNZNE.js";
|
|
4
4
|
import {
|
|
5
5
|
FormContext
|
|
6
6
|
} from "../__chunks/P3I4MECH.js";
|
|
7
7
|
import {
|
|
8
8
|
useCheckbox
|
|
9
|
-
} from "../__chunks/
|
|
9
|
+
} from "../__chunks/3CJV7UYE.js";
|
|
10
10
|
import {
|
|
11
11
|
useCheckboxStore
|
|
12
|
-
} from "../__chunks/
|
|
12
|
+
} from "../__chunks/6TMY6IFR.js";
|
|
13
13
|
import "../__chunks/M5KYRTQG.js";
|
|
14
14
|
import "../__chunks/P4RGQGTG.js";
|
|
15
|
-
import "../__chunks/
|
|
15
|
+
import "../__chunks/VFNGSUSF.js";
|
|
16
16
|
import "../__chunks/T3DJZG63.js";
|
|
17
17
|
import "../__chunks/MYID4V27.js";
|
|
18
18
|
import "../__chunks/BMLNRUFQ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
createHook,
|
|
22
22
|
createMemoComponent
|
|
23
23
|
} from "../__chunks/NQJBHION.js";
|
|
24
|
-
import "../__chunks/
|
|
24
|
+
import "../__chunks/P63NRZ4A.js";
|
|
25
25
|
import "../__chunks/J7Q2EO23.js";
|
|
26
26
|
import "../__chunks/CP3U4HPL.js";
|
|
27
27
|
import {
|
package/esm/form/form-error.js
CHANGED
package/esm/form/form-field.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FormField,
|
|
3
3
|
useFormField
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/5QHNNZNE.js";
|
|
5
5
|
import "../__chunks/P3I4MECH.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/VFNGSUSF.js";
|
|
7
7
|
import "../__chunks/T3DJZG63.js";
|
|
8
8
|
import "../__chunks/NQJBHION.js";
|
|
9
9
|
import "../__chunks/J7Q2EO23.js";
|
package/esm/form/form-input.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFormField
|
|
3
|
-
} from "../__chunks/
|
|
3
|
+
} from "../__chunks/5QHNNZNE.js";
|
|
4
4
|
import {
|
|
5
5
|
FormContext
|
|
6
6
|
} from "../__chunks/P3I4MECH.js";
|
|
7
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/VFNGSUSF.js";
|
|
8
8
|
import "../__chunks/T3DJZG63.js";
|
|
9
9
|
import {
|
|
10
10
|
useFocusable
|
package/esm/form/form-label.js
CHANGED
package/esm/form/form-push.js
CHANGED
package/esm/form/form-radio.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFormField
|
|
3
|
-
} from "../__chunks/
|
|
3
|
+
} from "../__chunks/5QHNNZNE.js";
|
|
4
4
|
import {
|
|
5
5
|
FormContext
|
|
6
6
|
} from "../__chunks/P3I4MECH.js";
|
|
7
7
|
import {
|
|
8
8
|
useRadio
|
|
9
|
-
} from "../__chunks/
|
|
9
|
+
} from "../__chunks/UVKFBOMX.js";
|
|
10
10
|
import "../__chunks/6I2PARRP.js";
|
|
11
|
-
import "../__chunks/
|
|
11
|
+
import "../__chunks/FVD2NJZN.js";
|
|
12
12
|
import "../__chunks/P4RGQGTG.js";
|
|
13
|
-
import "../__chunks/
|
|
13
|
+
import "../__chunks/VFNGSUSF.js";
|
|
14
14
|
import "../__chunks/T3DJZG63.js";
|
|
15
15
|
import "../__chunks/OXPV2NBK.js";
|
|
16
16
|
import "../__chunks/WJ37OVG2.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
createHook,
|
|
22
22
|
createMemoComponent
|
|
23
23
|
} from "../__chunks/NQJBHION.js";
|
|
24
|
-
import "../__chunks/
|
|
24
|
+
import "../__chunks/P63NRZ4A.js";
|
|
25
25
|
import {
|
|
26
26
|
useEvent
|
|
27
27
|
} from "../__chunks/J7Q2EO23.js";
|
package/esm/form/form-store.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCollectionStoreOptions,
|
|
3
3
|
useCollectionStoreProps
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/RS7KBRGA.js";
|
|
5
5
|
import {
|
|
6
6
|
useStore,
|
|
7
7
|
useStoreProps
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/P63NRZ4A.js";
|
|
9
9
|
import {
|
|
10
10
|
useEvent
|
|
11
11
|
} from "../__chunks/J7Q2EO23.js";
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
import { useEffect, useState } from "react";
|
|
30
30
|
import { contains } from "@ariakit/core/utils/dom";
|
|
31
31
|
import { addGlobalEventListener } from "@ariakit/core/utils/events";
|
|
32
|
+
import { sync } from "@ariakit/core/utils/store";
|
|
32
33
|
import { jsx } from "react/jsx-runtime";
|
|
33
34
|
var useHovercardDisclosure = createHook(
|
|
34
35
|
(_a) => {
|
|
@@ -59,21 +60,18 @@ var useHovercardDisclosure = createHook(
|
|
|
59
60
|
return addGlobalEventListener("focusout", onBlur, true);
|
|
60
61
|
}, [visible, store]);
|
|
61
62
|
useEffect(() => {
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
return sync(store, ["anchorElement"], (state) => {
|
|
64
|
+
const anchor = state.anchorElement;
|
|
65
|
+
if (!anchor)
|
|
66
|
+
return;
|
|
67
|
+
const observer = new MutationObserver(() => {
|
|
68
|
+
if (!anchor.hasAttribute("data-focus-visible"))
|
|
66
69
|
return;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
observer.observe(anchor, { attributeFilter: ["data-focus-visible"] });
|
|
73
|
-
return () => observer.disconnect();
|
|
74
|
-
},
|
|
75
|
-
["anchorElement"]
|
|
76
|
-
);
|
|
70
|
+
setVisible(true);
|
|
71
|
+
});
|
|
72
|
+
observer.observe(anchor, { attributeFilter: ["data-focus-visible"] });
|
|
73
|
+
return () => observer.disconnect();
|
|
74
|
+
});
|
|
77
75
|
}, [store]);
|
|
78
76
|
const onClickProp = props.onClick;
|
|
79
77
|
const onClick = useEvent((event) => {
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
useHovercardStore,
|
|
3
3
|
useHovercardStoreOptions,
|
|
4
4
|
useHovercardStoreProps
|
|
5
|
-
} from "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
5
|
+
} from "../__chunks/LDICFO4C.js";
|
|
6
|
+
import "../__chunks/3PKTK2K7.js";
|
|
7
|
+
import "../__chunks/WC3GK4CL.js";
|
|
8
|
+
import "../__chunks/SWJ5EOOS.js";
|
|
9
|
+
import "../__chunks/P63NRZ4A.js";
|
|
10
10
|
import "../__chunks/J7Q2EO23.js";
|
|
11
11
|
import "../__chunks/CP3U4HPL.js";
|
|
12
12
|
import "../__chunks/PNRLI7OV.js";
|