@ariakit/react-core 0.3.7 → 0.3.8
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 +24 -0
- package/cjs/__chunks/{VEG6PRAG.cjs → 3WCBE6SU.cjs} +3 -1
- package/cjs/__chunks/{CILQPSH2.cjs → FA25CV2I.cjs} +2 -2
- package/cjs/__chunks/{AYDXWQBF.cjs → L3WS5HGI.cjs} +2 -0
- package/cjs/__chunks/{QU2266CJ.cjs → WH4I6OSN.cjs} +12 -4
- package/cjs/__chunks/{LVOI2KVN.cjs → XGKLTARH.cjs} +2 -2
- package/cjs/checkbox/checkbox-provider.cjs +2 -2
- package/cjs/combobox/combobox-cancel.cjs +2 -2
- package/cjs/combobox/combobox-context.cjs +4 -2
- package/cjs/combobox/combobox-context.d.cts +6 -5
- package/cjs/combobox/combobox-context.d.ts +6 -5
- package/cjs/combobox/combobox-disclosure.cjs +2 -2
- package/cjs/combobox/combobox-item-check.cjs +50 -0
- package/cjs/combobox/combobox-item-check.d.cts +60 -0
- package/cjs/combobox/combobox-item-check.d.ts +60 -0
- package/cjs/combobox/combobox-item-value.cjs +3 -3
- package/cjs/combobox/combobox-item.cjs +45 -8
- package/cjs/combobox/combobox-item.d.cts +31 -13
- package/cjs/combobox/combobox-item.d.ts +31 -13
- package/cjs/combobox/combobox-label.cjs +55 -0
- package/cjs/combobox/combobox-label.d.cts +42 -0
- package/cjs/combobox/combobox-label.d.ts +42 -0
- package/cjs/combobox/combobox-list.cjs +3 -3
- package/cjs/combobox/combobox-popover.cjs +5 -5
- package/cjs/combobox/combobox-provider.cjs +4 -4
- package/cjs/combobox/combobox-provider.d.cts +8 -4
- package/cjs/combobox/combobox-provider.d.ts +8 -4
- package/cjs/combobox/combobox-row.cjs +2 -2
- package/cjs/combobox/combobox-separator.cjs +2 -2
- package/cjs/combobox/combobox-store.cjs +2 -2
- package/cjs/combobox/combobox-store.d.cts +26 -8
- package/cjs/combobox/combobox-store.d.ts +26 -8
- package/cjs/combobox/combobox.cjs +22 -12
- package/cjs/composite/composite-hover.d.cts +3 -0
- package/cjs/composite/composite-hover.d.ts +3 -0
- package/cjs/composite/composite-item.d.cts +3 -0
- package/cjs/composite/composite-item.d.ts +3 -0
- package/cjs/disclosure/disclosure-content.d.cts +1 -0
- package/cjs/disclosure/disclosure-content.d.ts +1 -0
- package/cjs/disclosure/disclosure.d.cts +3 -0
- package/cjs/disclosure/disclosure.d.ts +3 -0
- package/cjs/focusable/focusable.d.cts +1 -0
- package/cjs/focusable/focusable.d.ts +1 -0
- package/cjs/form/form-checkbox.cjs +1 -1
- package/cjs/hovercard/hovercard-anchor.d.cts +3 -0
- package/cjs/hovercard/hovercard-anchor.d.ts +3 -0
- package/cjs/menu/menu-item-checkbox.cjs +1 -1
- package/cjs/menu/menu-provider.cjs +3 -3
- package/cjs/menu/menu-store.cjs +3 -3
- package/cjs/menu/menu-store.d.cts +5 -11
- package/cjs/menu/menu-store.d.ts +5 -11
- package/cjs/popover/popover.d.cts +4 -0
- package/cjs/popover/popover.d.ts +4 -0
- package/cjs/portal/portal.d.cts +3 -0
- package/cjs/portal/portal.d.ts +3 -0
- package/cjs/select/select-item.cjs +3 -3
- package/cjs/select/select-label.cjs +1 -1
- package/cjs/select/select-provider.cjs +3 -3
- package/cjs/select/select-store.cjs +3 -3
- package/cjs/select/select-store.d.cts +1 -7
- package/cjs/select/select-store.d.ts +1 -7
- package/combobox/combobox-item-check/package.json +8 -0
- package/combobox/combobox-label/package.json +8 -0
- package/esm/__chunks/{KFUKDUTY.js → 4AMOOZBQ.js} +10 -2
- package/esm/__chunks/{PHTJ3BCW.js → 7HYEBVZE.js} +1 -1
- package/esm/__chunks/{NE6JAKK6.js → P3UZS6BC.js} +1 -1
- package/esm/__chunks/{MTC2KUZZ.js → W76OTZCC.js} +3 -1
- package/esm/__chunks/{24AKC2LC.js → ZETMAOTK.js} +2 -0
- package/esm/checkbox/checkbox-provider.js +3 -3
- package/esm/combobox/combobox-cancel.js +1 -1
- package/esm/combobox/combobox-context.d.ts +6 -5
- package/esm/combobox/combobox-context.js +3 -1
- package/esm/combobox/combobox-disclosure.js +1 -1
- package/esm/combobox/combobox-item-check.d.ts +60 -0
- package/esm/combobox/combobox-item-check.js +50 -0
- package/esm/combobox/combobox-item-value.js +1 -1
- package/esm/combobox/combobox-item.d.ts +31 -13
- package/esm/combobox/combobox-item.js +44 -7
- package/esm/combobox/combobox-label.d.ts +42 -0
- package/esm/combobox/combobox-label.js +55 -0
- package/esm/combobox/combobox-list.js +2 -2
- package/esm/combobox/combobox-popover.js +2 -2
- package/esm/combobox/combobox-provider.d.ts +8 -4
- package/esm/combobox/combobox-provider.js +2 -2
- package/esm/combobox/combobox-row.js +1 -1
- package/esm/combobox/combobox-separator.js +1 -1
- package/esm/combobox/combobox-store.d.ts +26 -8
- package/esm/combobox/combobox-store.js +1 -1
- package/esm/combobox/combobox.js +21 -11
- package/esm/composite/composite-hover.d.ts +3 -0
- package/esm/composite/composite-item.d.ts +3 -0
- package/esm/disclosure/disclosure-content.d.ts +1 -0
- package/esm/disclosure/disclosure.d.ts +3 -0
- package/esm/focusable/focusable.d.ts +1 -0
- package/esm/form/form-checkbox.js +1 -1
- package/esm/hovercard/hovercard-anchor.d.ts +3 -0
- package/esm/menu/menu-item-checkbox.js +1 -1
- package/esm/menu/menu-provider.js +2 -2
- package/esm/menu/menu-store.d.ts +5 -11
- package/esm/menu/menu-store.js +2 -2
- package/esm/popover/popover.d.ts +4 -0
- package/esm/portal/portal.d.ts +3 -0
- package/esm/select/select-item.js +3 -3
- package/esm/select/select-label.js +2 -2
- package/esm/select/select-provider.js +2 -2
- package/esm/select/select-store.d.ts +1 -7
- package/esm/select/select-store.js +2 -2
- package/package.json +16 -2
- package/cjs/collection/collection-context.d.cts +0 -34
- package/cjs/collection/collection-context.d.ts +0 -34
- package/cjs/composite/utils.d.cts +0 -69
- package/cjs/composite/utils.d.ts +0 -69
- package/cjs/tab/tab-store.d.cts +0 -74
- package/cjs/tab/tab-store.d.ts +0 -74
- package/esm/collection/collection-context.d.ts +0 -34
- package/esm/composite/utils.d.ts +0 -69
- package/esm/tab/tab-store.d.ts +0 -74
package/esm/tab/tab-store.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as Core from "@ariakit/core/tab/tab-store";
|
|
2
|
-
import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.js";
|
|
3
|
-
import type { Store } from "../utils/store.js";
|
|
4
|
-
type Item = Core.TabStoreItem;
|
|
5
|
-
export declare function useTabStoreProps<T extends Core.TabStore>(store: T, update: () => void, props: TabStoreProps): T & {
|
|
6
|
-
panels: import("@ariakit/core/collection/collection-store").CollectionStoreFunctions<{
|
|
7
|
-
id: string;
|
|
8
|
-
element?: HTMLElement | null | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
tabId?: string | null | undefined;
|
|
11
|
-
}> & import("@ariakit/core/utils/store").Store<import("@ariakit/core/collection/collection-store").CollectionStoreState<{
|
|
12
|
-
id: string;
|
|
13
|
-
element?: HTMLElement | null | undefined;
|
|
14
|
-
} & {
|
|
15
|
-
tabId?: string | null | undefined;
|
|
16
|
-
}>> & {
|
|
17
|
-
useState: {
|
|
18
|
-
(): import("@ariakit/core/collection/collection-store").CollectionStoreState<{
|
|
19
|
-
id: string;
|
|
20
|
-
element?: HTMLElement | null | undefined;
|
|
21
|
-
} & {
|
|
22
|
-
tabId?: string | null | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
<K extends keyof import("@ariakit/core/collection/collection-store").CollectionStoreState<{
|
|
25
|
-
id: string;
|
|
26
|
-
element?: HTMLElement | null | undefined;
|
|
27
|
-
} & {
|
|
28
|
-
tabId?: string | null | undefined;
|
|
29
|
-
}>>(key: K): import("@ariakit/core/collection/collection-store").CollectionStoreState<{
|
|
30
|
-
id: string;
|
|
31
|
-
element?: HTMLElement | null | undefined;
|
|
32
|
-
} & {
|
|
33
|
-
tabId?: string | null | undefined;
|
|
34
|
-
}>[K];
|
|
35
|
-
<V>(selector: (state: import("@ariakit/core/collection/collection-store").CollectionStoreState<{
|
|
36
|
-
id: string;
|
|
37
|
-
element?: HTMLElement | null | undefined;
|
|
38
|
-
} & {
|
|
39
|
-
tabId?: string | null | undefined;
|
|
40
|
-
}>) => V): V;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Creates a tab store.
|
|
46
|
-
* @see https://ariakit.org/components/tab
|
|
47
|
-
* @example
|
|
48
|
-
* ```jsx
|
|
49
|
-
* const tab = useTabStore();
|
|
50
|
-
* <TabList store={tab}>
|
|
51
|
-
* <Tab>Tab 1</Tab>
|
|
52
|
-
* <Tab>Tab 2</Tab>
|
|
53
|
-
* </TabList>
|
|
54
|
-
* <TabPanel store={tab}>Panel 1</TabPanel>
|
|
55
|
-
* <TabPanel store={tab}>Panel 2</TabPanel>
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
export declare function useTabStore(props?: TabStoreProps): TabStore;
|
|
59
|
-
export type TabStoreItem = Item;
|
|
60
|
-
export interface TabStoreState extends Core.TabStoreState, CompositeStoreState<Item> {
|
|
61
|
-
}
|
|
62
|
-
export interface TabStoreFunctions extends Core.TabStoreFunctions, CompositeStoreFunctions<Item> {
|
|
63
|
-
panels: Store<Core.TabStoreFunctions["panels"]>;
|
|
64
|
-
}
|
|
65
|
-
export interface TabStoreOptions extends Core.TabStoreOptions, CompositeStoreOptions<Item> {
|
|
66
|
-
/**
|
|
67
|
-
* Function that will be called when the `selectedId` state changes.
|
|
68
|
-
* @param selectedId The new selected id.
|
|
69
|
-
*/
|
|
70
|
-
setSelectedId?: (selectedId: TabStoreState["selectedId"]) => void;
|
|
71
|
-
}
|
|
72
|
-
export type TabStoreProps = TabStoreOptions & Core.TabStoreProps;
|
|
73
|
-
export type TabStore = TabStoreFunctions & Store<Core.TabStore>;
|
|
74
|
-
export {};
|