@ariakit/solid-core 0.1.3 → 0.1.5
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 +8 -0
- package/cjs/as/as.d.cts +1 -1
- package/cjs/as/as.d.ts +1 -1
- package/cjs/focus-trap/focus-trap-region.d.cts +3 -3
- package/cjs/focus-trap/focus-trap-region.d.ts +3 -3
- package/cjs/focus-trap/focus-trap.d.cts +2 -2
- package/cjs/focus-trap/focus-trap.d.ts +2 -2
- package/cjs/group/group-label.d.cts +3 -3
- package/cjs/group/group-label.d.ts +3 -3
- package/cjs/group/group.d.cts +3 -3
- package/cjs/group/group.d.ts +3 -3
- package/cjs/heading/heading-level.d.cts +2 -2
- package/cjs/heading/heading-level.d.ts +2 -2
- package/cjs/heading/heading.d.cts +3 -3
- package/cjs/heading/heading.d.ts +3 -3
- package/cjs/role/role.d.cts +2 -2
- package/cjs/role/role.d.ts +2 -2
- package/cjs/separator/separator.d.cts +2 -2
- package/cjs/separator/separator.d.ts +2 -2
- package/cjs/utils/types.d.cts +1 -1
- package/cjs/utils/types.d.ts +1 -1
- package/cjs/visually-hidden/visually-hidden.d.cts +2 -2
- package/cjs/visually-hidden/visually-hidden.d.ts +2 -2
- package/esm/as/as.d.ts +1 -1
- package/esm/focus-trap/focus-trap-region.d.ts +3 -3
- package/esm/focus-trap/focus-trap.d.ts +2 -2
- package/esm/group/group-label.d.ts +3 -3
- package/esm/group/group.d.ts +3 -3
- package/esm/heading/heading-level.d.ts +2 -2
- package/esm/heading/heading.d.ts +3 -3
- package/esm/role/role.d.ts +2 -2
- package/esm/separator/separator.d.ts +2 -2
- package/esm/utils/types.d.ts +1 -1
- package/esm/visually-hidden/visually-hidden.d.ts +2 -2
- package/package.json +24 -25
- package/tsconfig.build.json +6 -1
package/CHANGELOG.md
CHANGED
package/cjs/as/as.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ type AsComponent = <T extends Component<any>, P = ComponentProps<T>>(props: AsPr
|
|
|
13
13
|
* To render as a component, use `<As component={Component} />` (e.g. `<As
|
|
14
14
|
* component={MyButton} />`).
|
|
15
15
|
*
|
|
16
|
-
* Check out the [Composition](https://solid.ariakit.
|
|
16
|
+
* Check out the [Composition](https://solid.ariakit.com/guide/composition)
|
|
17
17
|
* guide for more details.
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
package/cjs/as/as.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type AsComponent = <T extends Component<any>, P = ComponentProps<T>>(props: AsPr
|
|
|
13
13
|
* To render as a component, use `<As component={Component} />` (e.g. `<As
|
|
14
14
|
* component={MyButton} />`).
|
|
15
15
|
*
|
|
16
|
-
* Check out the [Composition](https://solid.ariakit.
|
|
16
|
+
* Check out the [Composition](https://solid.ariakit.com/guide/composition)
|
|
17
17
|
* guide for more details.
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
|
@@ -4,7 +4,7 @@ declare const TagName = "div";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `FocusTrapRegion` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/focus-trap-region
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useFocusTrapRegion();
|
|
@@ -14,9 +14,9 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useFocusTrapRegion: import("../utils/types.ts").Hook<"div", FocusTrapRegionOptions<"div">>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a wrapper element that traps the focus inside it when the
|
|
17
|
-
* [`enabled`](https://solid.ariakit.
|
|
17
|
+
* [`enabled`](https://solid.ariakit.com/reference/focus-trap-region#enabled)
|
|
18
18
|
* prop is `true`.
|
|
19
|
-
* @see https://solid.ariakit.
|
|
19
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
20
20
|
* @example
|
|
21
21
|
* ```jsx
|
|
22
22
|
* <FocusTrapRegion>
|
|
@@ -4,7 +4,7 @@ declare const TagName = "div";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `FocusTrapRegion` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/focus-trap-region
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useFocusTrapRegion();
|
|
@@ -14,9 +14,9 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useFocusTrapRegion: import("../utils/types.ts").Hook<"div", FocusTrapRegionOptions<"div">>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a wrapper element that traps the focus inside it when the
|
|
17
|
-
* [`enabled`](https://solid.ariakit.
|
|
17
|
+
* [`enabled`](https://solid.ariakit.com/reference/focus-trap-region#enabled)
|
|
18
18
|
* prop is `true`.
|
|
19
|
-
* @see https://solid.ariakit.
|
|
19
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
20
20
|
* @example
|
|
21
21
|
* ```jsx
|
|
22
22
|
* <FocusTrapRegion>
|
|
@@ -5,7 +5,7 @@ declare const TagName = "span";
|
|
|
5
5
|
type TagName = typeof TagName;
|
|
6
6
|
/**
|
|
7
7
|
* Returns props to create a `FocusTrap` component.
|
|
8
|
-
* @see https://solid.ariakit.
|
|
8
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
9
9
|
* @example
|
|
10
10
|
* ```jsx
|
|
11
11
|
* const props = useFocusTrap();
|
|
@@ -15,7 +15,7 @@ type TagName = typeof TagName;
|
|
|
15
15
|
export declare const useFocusTrap: import("../utils/types.ts").Hook<"span", FocusTrapOptions<"span">>;
|
|
16
16
|
/**
|
|
17
17
|
* Renders a focus trap element.
|
|
18
|
-
* @see https://solid.ariakit.
|
|
18
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
19
19
|
* @example
|
|
20
20
|
* ```jsx
|
|
21
21
|
* <FocusTrap onFocus={focusSomethingElse} />
|
|
@@ -5,7 +5,7 @@ declare const TagName = "span";
|
|
|
5
5
|
type TagName = typeof TagName;
|
|
6
6
|
/**
|
|
7
7
|
* Returns props to create a `FocusTrap` component.
|
|
8
|
-
* @see https://solid.ariakit.
|
|
8
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
9
9
|
* @example
|
|
10
10
|
* ```jsx
|
|
11
11
|
* const props = useFocusTrap();
|
|
@@ -15,7 +15,7 @@ type TagName = typeof TagName;
|
|
|
15
15
|
export declare const useFocusTrap: import("../utils/types.ts").Hook<"span", FocusTrapOptions<"span">>;
|
|
16
16
|
/**
|
|
17
17
|
* Renders a focus trap element.
|
|
18
|
-
* @see https://solid.ariakit.
|
|
18
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
19
19
|
* @example
|
|
20
20
|
* ```jsx
|
|
21
21
|
* <FocusTrap onFocus={focusSomethingElse} />
|
|
@@ -6,7 +6,7 @@ type TagName = typeof TagName;
|
|
|
6
6
|
* Returns props to create a `GroupLabel` component. This hook must be used in a
|
|
7
7
|
* component that's wrapped with `Group` so the `aria-labelledby` prop is
|
|
8
8
|
* properly set on the group element.
|
|
9
|
-
* @see https://solid.ariakit.
|
|
9
|
+
* @see https://solid.ariakit.com/components/group
|
|
10
10
|
* @example
|
|
11
11
|
* ```jsx
|
|
12
12
|
* // This component must be wrapped with Group
|
|
@@ -17,9 +17,9 @@ type TagName = typeof TagName;
|
|
|
17
17
|
export declare const useGroupLabel: import("../utils/types.ts").Hook<"div", GroupLabelOptions<"div">>;
|
|
18
18
|
/**
|
|
19
19
|
* Renders a label in a group. This component should be wrapped with a
|
|
20
|
-
* [`Group`](https://solid.ariakit.
|
|
20
|
+
* [`Group`](https://solid.ariakit.com/reference/group) so the `aria-labelledby`
|
|
21
21
|
* prop is correctly set on the group element.
|
|
22
|
-
* @see https://solid.ariakit.
|
|
22
|
+
* @see https://solid.ariakit.com/components/group
|
|
23
23
|
* @example
|
|
24
24
|
* ```jsx
|
|
25
25
|
* <Group>
|
|
@@ -6,7 +6,7 @@ type TagName = typeof TagName;
|
|
|
6
6
|
* Returns props to create a `GroupLabel` component. This hook must be used in a
|
|
7
7
|
* component that's wrapped with `Group` so the `aria-labelledby` prop is
|
|
8
8
|
* properly set on the group element.
|
|
9
|
-
* @see https://solid.ariakit.
|
|
9
|
+
* @see https://solid.ariakit.com/components/group
|
|
10
10
|
* @example
|
|
11
11
|
* ```jsx
|
|
12
12
|
* // This component must be wrapped with Group
|
|
@@ -17,9 +17,9 @@ type TagName = typeof TagName;
|
|
|
17
17
|
export declare const useGroupLabel: import("../utils/types.ts").Hook<"div", GroupLabelOptions<"div">>;
|
|
18
18
|
/**
|
|
19
19
|
* Renders a label in a group. This component should be wrapped with a
|
|
20
|
-
* [`Group`](https://solid.ariakit.
|
|
20
|
+
* [`Group`](https://solid.ariakit.com/reference/group) so the `aria-labelledby`
|
|
21
21
|
* prop is correctly set on the group element.
|
|
22
|
-
* @see https://solid.ariakit.
|
|
22
|
+
* @see https://solid.ariakit.com/components/group
|
|
23
23
|
* @example
|
|
24
24
|
* ```jsx
|
|
25
25
|
* <Group>
|
package/cjs/group/group.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ declare const TagName = "div";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `Group` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/group
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useGroup();
|
|
@@ -14,9 +14,9 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useGroup: import("../utils/types.ts").Hook<"div", Options>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a group element. Optionally, a
|
|
17
|
-
* [`GroupLabel`](https://solid.ariakit.
|
|
17
|
+
* [`GroupLabel`](https://solid.ariakit.com/reference/group-label) can be rendered as
|
|
18
18
|
* a child to provide a label for the group.
|
|
19
|
-
* @see https://solid.ariakit.
|
|
19
|
+
* @see https://solid.ariakit.com/components/group
|
|
20
20
|
* @example
|
|
21
21
|
* ```jsx
|
|
22
22
|
* <Group>Group</Group>
|
package/cjs/group/group.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const TagName = "div";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `Group` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/group
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useGroup();
|
|
@@ -14,9 +14,9 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useGroup: import("../utils/types.ts").Hook<"div", Options>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a group element. Optionally, a
|
|
17
|
-
* [`GroupLabel`](https://solid.ariakit.
|
|
17
|
+
* [`GroupLabel`](https://solid.ariakit.com/reference/group-label) can be rendered as
|
|
18
18
|
* a child to provide a label for the group.
|
|
19
|
-
* @see https://solid.ariakit.
|
|
19
|
+
* @see https://solid.ariakit.com/components/group
|
|
20
20
|
* @example
|
|
21
21
|
* ```jsx
|
|
22
22
|
* <Group>Group</Group>
|
|
@@ -3,9 +3,9 @@ import type { HeadingLevels } from "./utils.ts";
|
|
|
3
3
|
/**
|
|
4
4
|
* A component that sets the heading level for its children. It doesn't render
|
|
5
5
|
* any HTML element, just sets the
|
|
6
|
-
* [`level`](https://solid.ariakit.
|
|
6
|
+
* [`level`](https://solid.ariakit.com/reference/heading-level#level) prop on the
|
|
7
7
|
* context.
|
|
8
|
-
* @see https://solid.ariakit.
|
|
8
|
+
* @see https://solid.ariakit.com/components/heading
|
|
9
9
|
* @example
|
|
10
10
|
* ```jsx
|
|
11
11
|
* <HeadingLevel>
|
|
@@ -3,9 +3,9 @@ import type { HeadingLevels } from "./utils.ts";
|
|
|
3
3
|
/**
|
|
4
4
|
* A component that sets the heading level for its children. It doesn't render
|
|
5
5
|
* any HTML element, just sets the
|
|
6
|
-
* [`level`](https://solid.ariakit.
|
|
6
|
+
* [`level`](https://solid.ariakit.com/reference/heading-level#level) prop on the
|
|
7
7
|
* context.
|
|
8
|
-
* @see https://solid.ariakit.
|
|
8
|
+
* @see https://solid.ariakit.com/components/heading
|
|
9
9
|
* @example
|
|
10
10
|
* ```jsx
|
|
11
11
|
* <HeadingLevel>
|
|
@@ -8,7 +8,7 @@ type TagName = HeadingElements;
|
|
|
8
8
|
* Returns props to create a `Heading` component. The element type (or the
|
|
9
9
|
* `aria-level` prop, if the element type is not a native heading) is determined
|
|
10
10
|
* by the context level provided by the parent `HeadingLevel` component.
|
|
11
|
-
* @see https://solid.ariakit.
|
|
11
|
+
* @see https://solid.ariakit.com/components/heading
|
|
12
12
|
* @example
|
|
13
13
|
* ```jsx
|
|
14
14
|
* const props = useHeading();
|
|
@@ -20,8 +20,8 @@ export declare const useHeading: import("../utils/types.ts").Hook<"h1" | "h2" |
|
|
|
20
20
|
* Renders a heading element. The element type (or the `aria-level` attribute,
|
|
21
21
|
* if the element type is not a native heading) is determined by the context
|
|
22
22
|
* level provided by the closest
|
|
23
|
-
* [`HeadingLevel`](https://solid.ariakit.
|
|
24
|
-
* @see https://solid.ariakit.
|
|
23
|
+
* [`HeadingLevel`](https://solid.ariakit.com/reference/heading-level) ancestor.
|
|
24
|
+
* @see https://solid.ariakit.com/components/heading
|
|
25
25
|
* @example
|
|
26
26
|
* ```jsx
|
|
27
27
|
* <HeadingLevel>
|
package/cjs/heading/heading.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type TagName = HeadingElements;
|
|
|
8
8
|
* Returns props to create a `Heading` component. The element type (or the
|
|
9
9
|
* `aria-level` prop, if the element type is not a native heading) is determined
|
|
10
10
|
* by the context level provided by the parent `HeadingLevel` component.
|
|
11
|
-
* @see https://solid.ariakit.
|
|
11
|
+
* @see https://solid.ariakit.com/components/heading
|
|
12
12
|
* @example
|
|
13
13
|
* ```jsx
|
|
14
14
|
* const props = useHeading();
|
|
@@ -20,8 +20,8 @@ export declare const useHeading: import("../utils/types.ts").Hook<"h1" | "h2" |
|
|
|
20
20
|
* Renders a heading element. The element type (or the `aria-level` attribute,
|
|
21
21
|
* if the element type is not a native heading) is determined by the context
|
|
22
22
|
* level provided by the closest
|
|
23
|
-
* [`HeadingLevel`](https://solid.ariakit.
|
|
24
|
-
* @see https://solid.ariakit.
|
|
23
|
+
* [`HeadingLevel`](https://solid.ariakit.com/reference/heading-level) ancestor.
|
|
24
|
+
* @see https://solid.ariakit.com/components/heading
|
|
25
25
|
* @example
|
|
26
26
|
* ```jsx
|
|
27
27
|
* <HeadingLevel>
|
package/cjs/role/role.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ type RoleElements = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Returns props to create a `Role` component.
|
|
11
|
-
* @see https://solid.ariakit.
|
|
11
|
+
* @see https://solid.ariakit.com/components/role
|
|
12
12
|
* @example
|
|
13
13
|
* ```jsx
|
|
14
14
|
* const props = useRole();
|
|
@@ -20,7 +20,7 @@ export declare const useRole: import("../utils/types.ts").Hook<"div", RoleOption
|
|
|
20
20
|
* Renders an abstract element that supports the `render` prop and a
|
|
21
21
|
* `wrapInstance` prop that can be used to wrap the underlying component
|
|
22
22
|
* instance with Solid Portal, Context or other component types.
|
|
23
|
-
* @see https://solid.ariakit.
|
|
23
|
+
* @see https://solid.ariakit.com/components/role
|
|
24
24
|
* @example
|
|
25
25
|
* ```jsx
|
|
26
26
|
* <Role render={<As.div />} />
|
package/cjs/role/role.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type RoleElements = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Returns props to create a `Role` component.
|
|
11
|
-
* @see https://solid.ariakit.
|
|
11
|
+
* @see https://solid.ariakit.com/components/role
|
|
12
12
|
* @example
|
|
13
13
|
* ```jsx
|
|
14
14
|
* const props = useRole();
|
|
@@ -20,7 +20,7 @@ export declare const useRole: import("../utils/types.ts").Hook<"div", RoleOption
|
|
|
20
20
|
* Renders an abstract element that supports the `render` prop and a
|
|
21
21
|
* `wrapInstance` prop that can be used to wrap the underlying component
|
|
22
22
|
* instance with Solid Portal, Context or other component types.
|
|
23
|
-
* @see https://solid.ariakit.
|
|
23
|
+
* @see https://solid.ariakit.com/components/role
|
|
24
24
|
* @example
|
|
25
25
|
* ```jsx
|
|
26
26
|
* <Role render={<As.div />} />
|
|
@@ -4,7 +4,7 @@ declare const TagName = "hr";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `Separator` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/separator
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useSeparator({ orientation: "horizontal" });
|
|
@@ -14,7 +14,7 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useSeparator: import("../utils/types.ts").Hook<"hr", SeparatorOptions<"hr">>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a separator element.
|
|
17
|
-
* @see https://solid.ariakit.
|
|
17
|
+
* @see https://solid.ariakit.com/components/separator
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
|
20
20
|
* <Separator orientation="horizontal" />
|
|
@@ -4,7 +4,7 @@ declare const TagName = "hr";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `Separator` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/separator
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useSeparator({ orientation: "horizontal" });
|
|
@@ -14,7 +14,7 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useSeparator: import("../utils/types.ts").Hook<"hr", SeparatorOptions<"hr">>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a separator element.
|
|
17
|
-
* @see https://solid.ariakit.
|
|
17
|
+
* @see https://solid.ariakit.com/components/separator
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
|
20
20
|
* <Separator orientation="horizontal" />
|
package/cjs/utils/types.d.cts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Options {
|
|
|
24
24
|
* takes in the original component props and gives back a Solid component
|
|
25
25
|
* instance with the props merged.
|
|
26
26
|
*
|
|
27
|
-
* Check out the [Composition](https://solid.ariakit.
|
|
27
|
+
* Check out the [Composition](https://solid.ariakit.com/guide/composition) guide
|
|
28
28
|
* for more details.
|
|
29
29
|
*/
|
|
30
30
|
render?: RenderValue<JSX.HTMLAttributes<any>>;
|
package/cjs/utils/types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Options {
|
|
|
24
24
|
* takes in the original component props and gives back a Solid component
|
|
25
25
|
* instance with the props merged.
|
|
26
26
|
*
|
|
27
|
-
* Check out the [Composition](https://solid.ariakit.
|
|
27
|
+
* Check out the [Composition](https://solid.ariakit.com/guide/composition) guide
|
|
28
28
|
* for more details.
|
|
29
29
|
*/
|
|
30
30
|
render?: RenderValue<JSX.HTMLAttributes<any>>;
|
|
@@ -6,7 +6,7 @@ type TagName = typeof TagName;
|
|
|
6
6
|
* Returns props to create a `VisuallyHidden` component. When applying the props
|
|
7
7
|
* returned by this hook to a component, the component will be visually hidden,
|
|
8
8
|
* but still accessible to screen readers.
|
|
9
|
-
* @see https://solid.ariakit.
|
|
9
|
+
* @see https://solid.ariakit.com/components/visually-hidden
|
|
10
10
|
* @example
|
|
11
11
|
* ```jsx
|
|
12
12
|
* const props = useVisuallyHidden();
|
|
@@ -19,7 +19,7 @@ export declare const useVisuallyHidden: import("../utils/types.ts").Hook<"span",
|
|
|
19
19
|
/**
|
|
20
20
|
* Renders an element that's visually hidden, but still accessible to screen
|
|
21
21
|
* readers.
|
|
22
|
-
* @see https://solid.ariakit.
|
|
22
|
+
* @see https://solid.ariakit.com/components/visually-hidden
|
|
23
23
|
* @example
|
|
24
24
|
* ```jsx
|
|
25
25
|
* <a href="#">
|
|
@@ -6,7 +6,7 @@ type TagName = typeof TagName;
|
|
|
6
6
|
* Returns props to create a `VisuallyHidden` component. When applying the props
|
|
7
7
|
* returned by this hook to a component, the component will be visually hidden,
|
|
8
8
|
* but still accessible to screen readers.
|
|
9
|
-
* @see https://solid.ariakit.
|
|
9
|
+
* @see https://solid.ariakit.com/components/visually-hidden
|
|
10
10
|
* @example
|
|
11
11
|
* ```jsx
|
|
12
12
|
* const props = useVisuallyHidden();
|
|
@@ -19,7 +19,7 @@ export declare const useVisuallyHidden: import("../utils/types.ts").Hook<"span",
|
|
|
19
19
|
/**
|
|
20
20
|
* Renders an element that's visually hidden, but still accessible to screen
|
|
21
21
|
* readers.
|
|
22
|
-
* @see https://solid.ariakit.
|
|
22
|
+
* @see https://solid.ariakit.com/components/visually-hidden
|
|
23
23
|
* @example
|
|
24
24
|
* ```jsx
|
|
25
25
|
* <a href="#">
|
package/esm/as/as.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type AsComponent = <T extends Component<any>, P = ComponentProps<T>>(props: AsPr
|
|
|
13
13
|
* To render as a component, use `<As component={Component} />` (e.g. `<As
|
|
14
14
|
* component={MyButton} />`).
|
|
15
15
|
*
|
|
16
|
-
* Check out the [Composition](https://solid.ariakit.
|
|
16
|
+
* Check out the [Composition](https://solid.ariakit.com/guide/composition)
|
|
17
17
|
* guide for more details.
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
|
@@ -4,7 +4,7 @@ declare const TagName = "div";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `FocusTrapRegion` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/focus-trap-region
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useFocusTrapRegion();
|
|
@@ -14,9 +14,9 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useFocusTrapRegion: import("../utils/types.ts").Hook<"div", FocusTrapRegionOptions<"div">>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a wrapper element that traps the focus inside it when the
|
|
17
|
-
* [`enabled`](https://solid.ariakit.
|
|
17
|
+
* [`enabled`](https://solid.ariakit.com/reference/focus-trap-region#enabled)
|
|
18
18
|
* prop is `true`.
|
|
19
|
-
* @see https://solid.ariakit.
|
|
19
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
20
20
|
* @example
|
|
21
21
|
* ```jsx
|
|
22
22
|
* <FocusTrapRegion>
|
|
@@ -5,7 +5,7 @@ declare const TagName = "span";
|
|
|
5
5
|
type TagName = typeof TagName;
|
|
6
6
|
/**
|
|
7
7
|
* Returns props to create a `FocusTrap` component.
|
|
8
|
-
* @see https://solid.ariakit.
|
|
8
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
9
9
|
* @example
|
|
10
10
|
* ```jsx
|
|
11
11
|
* const props = useFocusTrap();
|
|
@@ -15,7 +15,7 @@ type TagName = typeof TagName;
|
|
|
15
15
|
export declare const useFocusTrap: import("../utils/types.ts").Hook<"span", FocusTrapOptions<"span">>;
|
|
16
16
|
/**
|
|
17
17
|
* Renders a focus trap element.
|
|
18
|
-
* @see https://solid.ariakit.
|
|
18
|
+
* @see https://solid.ariakit.com/components/focus-trap
|
|
19
19
|
* @example
|
|
20
20
|
* ```jsx
|
|
21
21
|
* <FocusTrap onFocus={focusSomethingElse} />
|
|
@@ -6,7 +6,7 @@ type TagName = typeof TagName;
|
|
|
6
6
|
* Returns props to create a `GroupLabel` component. This hook must be used in a
|
|
7
7
|
* component that's wrapped with `Group` so the `aria-labelledby` prop is
|
|
8
8
|
* properly set on the group element.
|
|
9
|
-
* @see https://solid.ariakit.
|
|
9
|
+
* @see https://solid.ariakit.com/components/group
|
|
10
10
|
* @example
|
|
11
11
|
* ```jsx
|
|
12
12
|
* // This component must be wrapped with Group
|
|
@@ -17,9 +17,9 @@ type TagName = typeof TagName;
|
|
|
17
17
|
export declare const useGroupLabel: import("../utils/types.ts").Hook<"div", GroupLabelOptions<"div">>;
|
|
18
18
|
/**
|
|
19
19
|
* Renders a label in a group. This component should be wrapped with a
|
|
20
|
-
* [`Group`](https://solid.ariakit.
|
|
20
|
+
* [`Group`](https://solid.ariakit.com/reference/group) so the `aria-labelledby`
|
|
21
21
|
* prop is correctly set on the group element.
|
|
22
|
-
* @see https://solid.ariakit.
|
|
22
|
+
* @see https://solid.ariakit.com/components/group
|
|
23
23
|
* @example
|
|
24
24
|
* ```jsx
|
|
25
25
|
* <Group>
|
package/esm/group/group.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const TagName = "div";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `Group` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/group
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useGroup();
|
|
@@ -14,9 +14,9 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useGroup: import("../utils/types.ts").Hook<"div", Options>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a group element. Optionally, a
|
|
17
|
-
* [`GroupLabel`](https://solid.ariakit.
|
|
17
|
+
* [`GroupLabel`](https://solid.ariakit.com/reference/group-label) can be rendered as
|
|
18
18
|
* a child to provide a label for the group.
|
|
19
|
-
* @see https://solid.ariakit.
|
|
19
|
+
* @see https://solid.ariakit.com/components/group
|
|
20
20
|
* @example
|
|
21
21
|
* ```jsx
|
|
22
22
|
* <Group>Group</Group>
|
|
@@ -3,9 +3,9 @@ import type { HeadingLevels } from "./utils.ts";
|
|
|
3
3
|
/**
|
|
4
4
|
* A component that sets the heading level for its children. It doesn't render
|
|
5
5
|
* any HTML element, just sets the
|
|
6
|
-
* [`level`](https://solid.ariakit.
|
|
6
|
+
* [`level`](https://solid.ariakit.com/reference/heading-level#level) prop on the
|
|
7
7
|
* context.
|
|
8
|
-
* @see https://solid.ariakit.
|
|
8
|
+
* @see https://solid.ariakit.com/components/heading
|
|
9
9
|
* @example
|
|
10
10
|
* ```jsx
|
|
11
11
|
* <HeadingLevel>
|
package/esm/heading/heading.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type TagName = HeadingElements;
|
|
|
8
8
|
* Returns props to create a `Heading` component. The element type (or the
|
|
9
9
|
* `aria-level` prop, if the element type is not a native heading) is determined
|
|
10
10
|
* by the context level provided by the parent `HeadingLevel` component.
|
|
11
|
-
* @see https://solid.ariakit.
|
|
11
|
+
* @see https://solid.ariakit.com/components/heading
|
|
12
12
|
* @example
|
|
13
13
|
* ```jsx
|
|
14
14
|
* const props = useHeading();
|
|
@@ -20,8 +20,8 @@ export declare const useHeading: import("../utils/types.ts").Hook<"h1" | "h2" |
|
|
|
20
20
|
* Renders a heading element. The element type (or the `aria-level` attribute,
|
|
21
21
|
* if the element type is not a native heading) is determined by the context
|
|
22
22
|
* level provided by the closest
|
|
23
|
-
* [`HeadingLevel`](https://solid.ariakit.
|
|
24
|
-
* @see https://solid.ariakit.
|
|
23
|
+
* [`HeadingLevel`](https://solid.ariakit.com/reference/heading-level) ancestor.
|
|
24
|
+
* @see https://solid.ariakit.com/components/heading
|
|
25
25
|
* @example
|
|
26
26
|
* ```jsx
|
|
27
27
|
* <HeadingLevel>
|
package/esm/role/role.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type RoleElements = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Returns props to create a `Role` component.
|
|
11
|
-
* @see https://solid.ariakit.
|
|
11
|
+
* @see https://solid.ariakit.com/components/role
|
|
12
12
|
* @example
|
|
13
13
|
* ```jsx
|
|
14
14
|
* const props = useRole();
|
|
@@ -20,7 +20,7 @@ export declare const useRole: import("../utils/types.ts").Hook<"div", RoleOption
|
|
|
20
20
|
* Renders an abstract element that supports the `render` prop and a
|
|
21
21
|
* `wrapInstance` prop that can be used to wrap the underlying component
|
|
22
22
|
* instance with Solid Portal, Context or other component types.
|
|
23
|
-
* @see https://solid.ariakit.
|
|
23
|
+
* @see https://solid.ariakit.com/components/role
|
|
24
24
|
* @example
|
|
25
25
|
* ```jsx
|
|
26
26
|
* <Role render={<As.div />} />
|
|
@@ -4,7 +4,7 @@ declare const TagName = "hr";
|
|
|
4
4
|
type TagName = typeof TagName;
|
|
5
5
|
/**
|
|
6
6
|
* Returns props to create a `Separator` component.
|
|
7
|
-
* @see https://solid.ariakit.
|
|
7
|
+
* @see https://solid.ariakit.com/components/separator
|
|
8
8
|
* @example
|
|
9
9
|
* ```jsx
|
|
10
10
|
* const props = useSeparator({ orientation: "horizontal" });
|
|
@@ -14,7 +14,7 @@ type TagName = typeof TagName;
|
|
|
14
14
|
export declare const useSeparator: import("../utils/types.ts").Hook<"hr", SeparatorOptions<"hr">>;
|
|
15
15
|
/**
|
|
16
16
|
* Renders a separator element.
|
|
17
|
-
* @see https://solid.ariakit.
|
|
17
|
+
* @see https://solid.ariakit.com/components/separator
|
|
18
18
|
* @example
|
|
19
19
|
* ```jsx
|
|
20
20
|
* <Separator orientation="horizontal" />
|
package/esm/utils/types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Options {
|
|
|
24
24
|
* takes in the original component props and gives back a Solid component
|
|
25
25
|
* instance with the props merged.
|
|
26
26
|
*
|
|
27
|
-
* Check out the [Composition](https://solid.ariakit.
|
|
27
|
+
* Check out the [Composition](https://solid.ariakit.com/guide/composition) guide
|
|
28
28
|
* for more details.
|
|
29
29
|
*/
|
|
30
30
|
render?: RenderValue<JSX.HTMLAttributes<any>>;
|
|
@@ -6,7 +6,7 @@ type TagName = typeof TagName;
|
|
|
6
6
|
* Returns props to create a `VisuallyHidden` component. When applying the props
|
|
7
7
|
* returned by this hook to a component, the component will be visually hidden,
|
|
8
8
|
* but still accessible to screen readers.
|
|
9
|
-
* @see https://solid.ariakit.
|
|
9
|
+
* @see https://solid.ariakit.com/components/visually-hidden
|
|
10
10
|
* @example
|
|
11
11
|
* ```jsx
|
|
12
12
|
* const props = useVisuallyHidden();
|
|
@@ -19,7 +19,7 @@ export declare const useVisuallyHidden: import("../utils/types.ts").Hook<"span",
|
|
|
19
19
|
/**
|
|
20
20
|
* Renders an element that's visually hidden, but still accessible to screen
|
|
21
21
|
* readers.
|
|
22
|
-
* @see https://solid.ariakit.
|
|
22
|
+
* @see https://solid.ariakit.com/components/visually-hidden
|
|
23
23
|
* @example
|
|
24
24
|
* ```jsx
|
|
25
25
|
* <a href="#">
|
package/package.json
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ariakit/solid-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Ariakit Solid core",
|
|
5
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ariakit",
|
|
7
|
+
"core",
|
|
8
|
+
"solid"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://ariakit.com",
|
|
6
11
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://ariakit.org",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"main": "cjs/index.cjs",
|
|
10
|
-
"module": "esm/index.js",
|
|
11
|
-
"types": "cjs/index.d.ts",
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://github.com/ariakit/ariakit.git",
|
|
15
|
-
"directory": "packages/ariakit-solid-core"
|
|
16
|
-
},
|
|
17
12
|
"author": {
|
|
18
13
|
"name": "Dani Guardiola",
|
|
19
14
|
"email": "hi@daniguardio.la",
|
|
@@ -26,20 +21,20 @@
|
|
|
26
21
|
"url": "https://github.com/diegohaz"
|
|
27
22
|
}
|
|
28
23
|
],
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/ariakit/ariakit.git",
|
|
27
|
+
"directory": "packages/ariakit-solid-core"
|
|
33
28
|
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
"type": "module",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"main": "cjs/index.cjs",
|
|
32
|
+
"module": "esm/index.js",
|
|
33
|
+
"types": "cjs/index.d.ts",
|
|
39
34
|
"dependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"@solid-primitives/
|
|
42
|
-
"@
|
|
35
|
+
"@solid-primitives/props": "3.2.3",
|
|
36
|
+
"@solid-primitives/utils": "6.4.0",
|
|
37
|
+
"@ariakit/core": "0.4.19"
|
|
43
38
|
},
|
|
44
39
|
"peerDependencies": {
|
|
45
40
|
"solid-js": "^1.8"
|
|
@@ -182,5 +177,9 @@
|
|
|
182
177
|
}
|
|
183
178
|
},
|
|
184
179
|
"./package.json": "./package.json"
|
|
180
|
+
},
|
|
181
|
+
"scripts": {
|
|
182
|
+
"build": "node ../../scripts/build/build.js",
|
|
183
|
+
"clean": "node ../../scripts/build/clean.js"
|
|
185
184
|
}
|
|
186
|
-
}
|
|
185
|
+
}
|