@kirana-ui/solid 0.1.1 → 0.3.0
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/dom/accordion.js +9 -6
- package/dom/agent.js +3 -0
- package/dom/autosize.js +1 -1
- package/dom/avatar.js +39 -14
- package/dom/button.js +1 -1
- package/dom/calendar.js +78 -19
- package/dom/carousel.js +6 -6
- package/dom/checkbox-group-context.js +3 -0
- package/dom/checkbox-group.js +38 -0
- package/dom/checkbox.js +9 -5
- package/dom/collapsible.js +3 -3
- package/dom/combobox.js +72 -14
- package/dom/command.js +10 -9
- package/dom/date-field.js +7 -3
- package/dom/date-picker.js +9 -3
- package/dom/dialog.js +13 -3
- package/dom/field.js +3 -3
- package/dom/fieldset.js +2 -2
- package/dom/form.js +1 -1
- package/dom/hover-popup.js +3 -3
- package/dom/index.js +1 -0
- package/dom/input.js +1 -1
- package/dom/label.js +1 -1
- package/dom/listbox.js +5 -5
- package/dom/menu.js +11 -11
- package/dom/menubar.js +1 -1
- package/dom/message-scroller.js +4 -4
- package/dom/navigation-menu.js +18 -21
- package/dom/number-field.js +39 -6
- package/dom/otp.js +6 -5
- package/dom/pagination.js +3 -3
- package/dom/popover.js +37 -8
- package/dom/primitive.js +92 -0
- package/dom/qr-code.js +3 -3
- package/dom/radio-group.js +7 -6
- package/dom/resizable.js +3 -3
- package/dom/runtime.js +23 -7
- package/dom/scroll-area.js +5 -5
- package/dom/select.js +26 -13
- package/dom/separator.js +1 -1
- package/dom/slider.js +11 -8
- package/dom/switch.js +3 -3
- package/dom/tabs.js +5 -5
- package/dom/testing.js +3 -0
- package/dom/toast.js +57 -20
- package/dom/toggle-group.js +1 -1
- package/dom/toggle.js +1 -1
- package/dom/toolbar.js +4 -4
- package/dom/value-bar.js +3 -3
- package/llms.txt +1846 -252
- package/package.json +34 -2
- package/server/accordion.js +9 -6
- package/server/agent.js +3 -0
- package/server/autosize.js +1 -1
- package/server/avatar.js +39 -14
- package/server/button.js +1 -1
- package/server/calendar.js +78 -19
- package/server/carousel.js +6 -6
- package/server/checkbox-group-context.js +3 -0
- package/server/checkbox-group.js +38 -0
- package/server/checkbox.js +9 -5
- package/server/collapsible.js +3 -3
- package/server/combobox.js +72 -14
- package/server/command.js +10 -9
- package/server/date-field.js +7 -3
- package/server/date-picker.js +9 -3
- package/server/dialog.js +13 -3
- package/server/field.js +3 -3
- package/server/fieldset.js +2 -2
- package/server/form.js +1 -1
- package/server/hover-popup.js +3 -3
- package/server/index.js +1 -0
- package/server/input.js +1 -1
- package/server/label.js +1 -1
- package/server/listbox.js +5 -5
- package/server/menu.js +11 -11
- package/server/menubar.js +1 -1
- package/server/message-scroller.js +4 -4
- package/server/navigation-menu.js +18 -15
- package/server/number-field.js +39 -6
- package/server/otp.js +6 -5
- package/server/pagination.js +3 -3
- package/server/popover.js +37 -8
- package/server/primitive.js +92 -0
- package/server/qr-code.js +3 -3
- package/server/radio-group.js +7 -6
- package/server/resizable.js +3 -3
- package/server/runtime.js +23 -7
- package/server/scroll-area.js +5 -5
- package/server/select.js +26 -13
- package/server/separator.js +1 -1
- package/server/slider.js +11 -8
- package/server/switch.js +3 -3
- package/server/tabs.js +5 -5
- package/server/testing.js +3 -0
- package/server/toast.js +57 -20
- package/server/toggle-group.js +1 -1
- package/server/toggle.js +1 -1
- package/server/toolbar.js +4 -4
- package/server/value-bar.js +3 -3
- package/skills/kirana-ui-primitives/SKILL.md +163 -0
- package/src/accordion.jsx +10 -7
- package/src/agent.js +3 -0
- package/src/autosize.jsx +1 -1
- package/src/avatar.jsx +17 -10
- package/src/button.jsx +1 -1
- package/src/calendar.jsx +72 -16
- package/src/carousel.jsx +6 -6
- package/src/checkbox-group-context.js +3 -0
- package/src/checkbox-group.jsx +33 -0
- package/src/checkbox.jsx +8 -4
- package/src/collapsible.jsx +3 -3
- package/src/combobox.jsx +70 -13
- package/src/command.jsx +10 -8
- package/src/date-field.jsx +7 -3
- package/src/date-picker.jsx +8 -2
- package/src/dialog.jsx +12 -2
- package/src/field.jsx +3 -3
- package/src/fieldset.jsx +2 -2
- package/src/form.jsx +1 -1
- package/src/hover-popup.jsx +3 -3
- package/src/index.js +1 -0
- package/src/input.jsx +1 -1
- package/src/label.jsx +1 -1
- package/src/listbox.jsx +6 -6
- package/src/menu.jsx +11 -11
- package/src/menubar.jsx +1 -1
- package/src/message-scroller.jsx +4 -4
- package/src/navigation-menu.jsx +14 -13
- package/src/number-field.jsx +26 -6
- package/src/otp.jsx +6 -4
- package/src/pagination.jsx +3 -3
- package/src/popover.jsx +35 -5
- package/src/primitive.jsx +81 -0
- package/src/qr-code.jsx +3 -3
- package/src/radio-group.jsx +7 -7
- package/src/resizable.jsx +3 -3
- package/src/runtime.jsx +21 -7
- package/src/scroll-area.jsx +5 -5
- package/src/select.jsx +29 -14
- package/src/separator.jsx +1 -1
- package/src/slider.jsx +12 -8
- package/src/switch.jsx +3 -3
- package/src/tabs.jsx +6 -6
- package/src/testing.js +3 -0
- package/src/toast.jsx +38 -10
- package/src/toggle-group.jsx +2 -2
- package/src/toggle.jsx +1 -1
- package/src/toolbar.jsx +4 -4
- package/src/value-bar.jsx +3 -3
- package/types/accordion.d.ts +21 -19
- package/types/agent.d.ts +1 -0
- package/types/alert-dialog.d.ts +1 -0
- package/types/autocomplete.d.ts +1 -0
- package/types/autosize.d.ts +4 -1
- package/types/avatar.d.ts +14 -6
- package/types/button.d.ts +4 -2
- package/types/calendar.d.ts +48 -19
- package/types/carousel.d.ts +18 -10
- package/types/checkbox-group-context.d.ts +3 -0
- package/types/checkbox-group.d.ts +13 -0
- package/types/checkbox.d.ts +10 -6
- package/types/collapsible.d.ts +11 -7
- package/types/combobox.d.ts +102 -64
- package/types/command.d.ts +29 -17
- package/types/context-menu.d.ts +1 -0
- package/types/date-field.d.ts +20 -9
- package/types/date-picker.d.ts +26 -34
- package/types/dialog.d.ts +47 -31
- package/types/direction.d.ts +1 -0
- package/types/drawer.d.ts +1 -0
- package/types/field.d.ts +19 -11
- package/types/fieldset.d.ts +8 -3
- package/types/form.d.ts +5 -2
- package/types/hover-card.d.ts +16 -10
- package/types/hover-popup.d.ts +23 -13
- package/types/index.d.ts +15 -1
- package/types/input.d.ts +4 -3
- package/types/label.d.ts +4 -1
- package/types/listbox.d.ts +18 -20
- package/types/menu.d.ts +56 -42
- package/types/menubar.d.ts +6 -4
- package/types/message-scroller.d.ts +12 -6
- package/types/meter.d.ts +16 -7
- package/types/navigation-menu.d.ts +35 -29
- package/types/number-field.d.ts +22 -7
- package/types/otp.d.ts +18 -10
- package/types/pagination.d.ts +18 -10
- package/types/popover.d.ts +52 -13
- package/types/primitive.d.ts +50 -0
- package/types/progress.d.ts +16 -7
- package/types/qr-code.d.ts +10 -4
- package/types/radio-group.d.ts +18 -17
- package/types/resizable.d.ts +12 -7
- package/types/runtime.d.ts +36 -12
- package/types/scroll-area.d.ts +17 -9
- package/types/select.d.ts +55 -46
- package/types/separator.d.ts +5 -3
- package/types/slider.d.ts +25 -13
- package/types/switch.d.ts +7 -4
- package/types/tabs.d.ts +20 -16
- package/types/testing.d.ts +1 -0
- package/types/toast.d.ts +40 -16
- package/types/toggle-group.d.ts +6 -11
- package/types/toggle.d.ts +4 -3
- package/types/toolbar.d.ts +19 -14
- package/types/tooltip.d.ts +16 -10
- package/types/value-bar.d.ts +21 -10
package/types/pagination.d.ts
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { PaginationEntry, PaginationProps } from "@kirana-ui/core/pagination";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
4
|
import type { JSX } from "solid-js";
|
|
3
5
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
|
|
6
|
+
type Parts = Vocabulary["pagination"];
|
|
7
|
+
export type RootProps = PartComponentProps<"nav", StateOf<Parts["root"]>, Omit<PaginationProps, "id"> & {
|
|
5
8
|
id?: string;
|
|
6
|
-
}
|
|
9
|
+
}>;
|
|
7
10
|
declare function Root(props: RootProps): JSX.Element;
|
|
8
|
-
|
|
9
|
-
declare function Items(props: {
|
|
11
|
+
export type ItemsProps = {
|
|
10
12
|
children: (entry: PaginationEntry) => JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
+
};
|
|
14
|
+
/** Draws its child once for each piece of the row: a page, or the mark for pages left out. */
|
|
15
|
+
declare function Items(props: ItemsProps): JSX.Element;
|
|
16
|
+
export type ItemProps = PartComponentProps<"button", StateOf<Parts["item"]>, {
|
|
13
17
|
page: number;
|
|
14
|
-
}
|
|
18
|
+
}>;
|
|
19
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
20
|
+
export type EllipsisProps = PartComponentProps<"span", StateOf<Parts["ellipsis"]>>;
|
|
21
|
+
export type PreviousProps = PartComponentProps<"button", StateOf<Parts["previous"]>>;
|
|
22
|
+
export type NextProps = PartComponentProps<"button", StateOf<Parts["next"]>>;
|
|
15
23
|
export declare const Pagination: {
|
|
16
24
|
Root: typeof Root;
|
|
17
25
|
Items: typeof Items;
|
|
18
26
|
Item: typeof Item;
|
|
19
|
-
Ellipsis: (props:
|
|
20
|
-
Previous: (props:
|
|
21
|
-
Next: (props:
|
|
27
|
+
Ellipsis: (props: EllipsisProps) => JSX.Element;
|
|
28
|
+
Previous: (props: PreviousProps) => JSX.Element;
|
|
29
|
+
Next: (props: NextProps) => JSX.Element;
|
|
22
30
|
};
|
|
23
31
|
export {};
|
package/types/popover.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type { ChangeDetails, PositionOptions, Signal } from "@kirana-ui/core";
|
|
2
|
-
import type { Popover as Controller } from "@kirana-ui/core/popover";
|
|
1
|
+
import type { Anchor, ChangeDetails, PositionOptions, Signal, StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Popover as Controller, PopoverTriggerOptions } from "@kirana-ui/core/popover";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
3
4
|
import type { JSX } from "solid-js";
|
|
4
5
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
6
|
+
type Parts = Vocabulary["popover"];
|
|
7
|
+
/**
|
|
8
|
+
* The popover its parts are inside. Exported for a component that is made of one (a date picker
|
|
9
|
+
* provides its own to the popover's parts).
|
|
10
|
+
*/
|
|
5
11
|
declare const Context: import("solid-js").Context<Controller | undefined>;
|
|
6
12
|
/** For a component made of this one's parts: a date picker. */
|
|
7
13
|
export { Context as PopoverContext };
|
|
@@ -9,23 +15,56 @@ export type RootProps = {
|
|
|
9
15
|
open?: boolean;
|
|
10
16
|
defaultOpen?: boolean;
|
|
11
17
|
onOpenChange?: (open: boolean, details: ChangeDetails) => void;
|
|
18
|
+
/**
|
|
19
|
+
* What the page behind it may do while it is open. `false` (the default): everything.
|
|
20
|
+
* `true`: nothing, the page is inert and does not scroll, and Tab stays inside the popover.
|
|
21
|
+
* `"trap-focus"`: Tab stays inside the popover, and the page can still be pressed and
|
|
22
|
+
* scrolled. A popover the pointer opened holds nothing until it is pressed. Read as it opens.
|
|
23
|
+
*/
|
|
24
|
+
modal?: boolean | "trap-focus";
|
|
12
25
|
id?: string;
|
|
13
26
|
children?: JSX.Element;
|
|
14
27
|
};
|
|
15
28
|
declare function Root(props: RootProps): JSX.Element;
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
export type PortalProps = {
|
|
30
|
+
children?: JSX.Element;
|
|
31
|
+
};
|
|
32
|
+
/** A positioner's own props: where its popup goes, and what it is placed against. */
|
|
33
|
+
export type PositionerOptions = Partial<Omit<PositionOptions, "anchor">> & {
|
|
34
|
+
/**
|
|
35
|
+
* What the popup is placed against, when that is not its trigger: an element, a place in
|
|
36
|
+
* the viewport (an object with `getBoundingClientRect`), or a function that gives one (a
|
|
37
|
+
* signal's accessor, or `() => element` for a variable a `ref` fills). It may change
|
|
38
|
+
* while the popup is open: the popup follows.
|
|
39
|
+
*/
|
|
40
|
+
anchor?: Anchor | (() => Anchor | null | undefined) | null | undefined;
|
|
41
|
+
};
|
|
42
|
+
export type PositionerProps = PartComponentProps<"div", StateOf<Parts["positioner"]>, PositionerOptions>;
|
|
43
|
+
/**
|
|
44
|
+
* A positioner's own props, written where its placement reads them, before its element
|
|
45
|
+
* attaches: the one place they are named. Gives back what is left, for the part's element.
|
|
46
|
+
*/
|
|
47
|
+
export declare function positioned<P extends PositionerOptions>(props: P, positioning: Signal<Partial<PositionOptions>>): Omit<P, keyof PositionerOptions>;
|
|
19
48
|
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
49
|
+
/** What a trigger takes of its own: whether the pointer opens the popover too, and its waits. */
|
|
50
|
+
export type TriggerOptions = PopoverTriggerOptions;
|
|
51
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>, TriggerOptions>;
|
|
52
|
+
export type BackdropProps = PartComponentProps<"div", StateOf<Parts["backdrop"]>>;
|
|
53
|
+
export type ArrowProps = PartComponentProps<"div", StateOf<Parts["arrow"]>>;
|
|
54
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
55
|
+
export type TitleProps = PartComponentProps<"h2", StateOf<Parts["title"]>>;
|
|
56
|
+
export type DescriptionProps = PartComponentProps<"p", StateOf<Parts["description"]>>;
|
|
57
|
+
export type CloseProps = PartComponentProps<"button", StateOf<Parts["close"]>>;
|
|
58
|
+
declare function Trigger(props: TriggerProps): JSX.Element;
|
|
20
59
|
export declare const Popover: {
|
|
21
60
|
Root: typeof Root;
|
|
22
|
-
Portal: (props:
|
|
23
|
-
|
|
24
|
-
}) => JSX.Element;
|
|
61
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
62
|
+
Backdrop: (props: BackdropProps) => JSX.Element;
|
|
25
63
|
Positioner: typeof Positioner;
|
|
26
|
-
Trigger:
|
|
27
|
-
Popup: (props:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
64
|
+
Trigger: typeof Trigger;
|
|
65
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
66
|
+
Arrow: (props: ArrowProps) => JSX.Element;
|
|
67
|
+
Title: (props: TitleProps) => JSX.Element;
|
|
68
|
+
Description: (props: DescriptionProps) => JSX.Element;
|
|
69
|
+
Close: (props: CloseProps) => JSX.Element;
|
|
31
70
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { PartProps } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartTag } from "./runtime.tsx";
|
|
4
|
+
/** What a `Primitive` reads of its props; the rest are its element's. */
|
|
5
|
+
export interface PrimitiveOwnProps<State extends Record<string, unknown>> {
|
|
6
|
+
/** Another tag for the element; a `div` when left out. */
|
|
7
|
+
as?: PartTag | (string & {}) | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Renders the caller's own element in place of the `Primitive`'s, as a part's `render` does:
|
|
10
|
+
* `props()` is the attributes given here with the state's `data-*` attributes under them, and
|
|
11
|
+
* `children` what the `Primitive` holds; `state()` is `state`. What the element writes after
|
|
12
|
+
* `{...props()}` wins.
|
|
13
|
+
*/
|
|
14
|
+
render?: ((props: () => PartProps, state: () => State) => JSX.Element) | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The element's state. `render` is given it, and it is written on the element as `data-*`
|
|
17
|
+
* attributes, under the attributes given: `true` is present and empty, `false`, `null` and
|
|
18
|
+
* `undefined` are absent, anything else is its text, and `isActive` is `data-is-active`.
|
|
19
|
+
*/
|
|
20
|
+
state?: State | undefined;
|
|
21
|
+
children?: JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
/** What a `Primitive` drawn as `Tag` takes: its own props, and what the element takes. */
|
|
24
|
+
export type PrimitiveProps<Tag extends PartTag = "div", State extends Record<string, unknown> = Record<string, never>> = PrimitiveOwnProps<State> & Omit<JSX.IntrinsicElements[Tag], keyof PrimitiveOwnProps<State>> & {
|
|
25
|
+
as?: Tag | (string & {}) | undefined;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A plain element of one's own (a badge, a breadcrumb's link) with the composition a part has:
|
|
29
|
+
* `as` for another tag (a `div` unless said), or `render` for the caller's own element, given the
|
|
30
|
+
* props to spread and the state. `state` is written as `data-*` attributes under the attributes
|
|
31
|
+
* given. Merge the component's own props with its caller's through `mergeProps`, as a part's
|
|
32
|
+
* are merged.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Primitive<Tag extends PartTag = "div", State extends Record<string, unknown> = Record<string, never>>(props: PrimitiveProps<Tag, State>): JSX.Element;
|
|
35
|
+
/** The props of several sets as one: each set's, the later's over the earlier's. */
|
|
36
|
+
export type Merged<Sets extends readonly unknown[]> = Sets extends readonly [
|
|
37
|
+
infer First,
|
|
38
|
+
...infer Rest
|
|
39
|
+
] ? Omit<NonNullable<First>, keyof Merged<Rest>> & Merged<Rest> : Sets extends readonly [] ? {} : Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Several sets of props as one, for a component's own props and its caller's: a later set
|
|
42
|
+
* wins an attribute it gives (one it leaves `undefined` stays), classes join, styles are
|
|
43
|
+
* merged property by property, the handlers of an event run in order until one calls
|
|
44
|
+
* `event.preventKiranaHandler()`, which stops those after it, and every `ref` gets the
|
|
45
|
+
* element. It reads its sets when a prop is read, so a component's props stay reactive: spread
|
|
46
|
+
* it (`<Primitive {...mergeProps({ class: "badge" }, props)} />`). Not solid-js's
|
|
47
|
+
* `mergeProps`, where a later class replaces an earlier one: import one under another name
|
|
48
|
+
* where both are used.
|
|
49
|
+
*/
|
|
50
|
+
export declare function mergeProps<const Sets extends readonly (object | undefined)[]>(...sets: Sets): Merged<Sets>;
|
package/types/progress.d.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
import type { RootOptions, ValueOptions } from "./value-bar.tsx";
|
|
5
|
+
type Parts = Vocabulary["progress"];
|
|
6
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, RootOptions>;
|
|
7
|
+
export type ValueProps = PartComponentProps<"span", StateOf<Parts["value"]>, ValueOptions>;
|
|
8
|
+
export type TrackProps = PartComponentProps<"div", StateOf<Parts["track"]>>;
|
|
9
|
+
export type IndicatorProps = PartComponentProps<"div", StateOf<Parts["indicator"]>>;
|
|
10
|
+
export type LabelProps = PartComponentProps<"span", StateOf<Parts["label"]>>;
|
|
1
11
|
export declare const Progress: {
|
|
2
|
-
Root: (props:
|
|
3
|
-
Value: (props:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Indicator: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
|
|
8
|
-
Label: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
|
|
12
|
+
Root: (props: RootProps) => import("solid-js").JSX.Element;
|
|
13
|
+
Value: (props: ValueProps) => import("solid-js").JSX.Element;
|
|
14
|
+
Track: (props: TrackProps) => import("solid-js").JSX.Element;
|
|
15
|
+
Indicator: (props: IndicatorProps) => import("solid-js").JSX.Element;
|
|
16
|
+
Label: (props: LabelProps) => import("solid-js").JSX.Element;
|
|
9
17
|
};
|
|
18
|
+
export {};
|
package/types/qr-code.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { QrCorrection } from "@kirana-ui/core/qr-code";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
4
|
import type { JSX } from "solid-js";
|
|
3
5
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
|
|
6
|
+
type Parts = Vocabulary["qrCode"];
|
|
7
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, {
|
|
5
8
|
value: string;
|
|
6
9
|
correction?: QrCorrection;
|
|
7
10
|
id?: string;
|
|
8
|
-
}
|
|
11
|
+
}>;
|
|
12
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
13
|
+
export type FrameProps = PartComponentProps<"svg", StateOf<Parts["frame"]>>;
|
|
14
|
+
export type PatternProps = PartComponentProps<"path", StateOf<Parts["pattern"]>>;
|
|
9
15
|
export declare const QrCode: {
|
|
10
16
|
Root: typeof Root;
|
|
11
|
-
Frame: (props:
|
|
12
|
-
Pattern: (props:
|
|
17
|
+
Frame: (props: FrameProps) => JSX.Element;
|
|
18
|
+
Pattern: (props: PatternProps) => JSX.Element;
|
|
13
19
|
};
|
|
14
20
|
export {};
|
package/types/radio-group.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { RadioGroupProps } from "@kirana-ui/core/radio-group";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
4
|
import type { JSX } from "solid-js";
|
|
3
5
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
onValueChange?: (value: unknown, details: ChangeDetails) => void;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
readOnly?: boolean;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
name?: string;
|
|
12
|
-
form?: string;
|
|
6
|
+
type Parts = Vocabulary["radioGroup"];
|
|
7
|
+
/** `Value` is what an item's `value` is: the root's `value` holds the chosen one, or `null`. */
|
|
8
|
+
export type RootProps<Value = unknown> = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<RadioGroupProps<Value>, "id"> & {
|
|
13
9
|
id?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function Root(props: RootProps): JSX.Element;
|
|
16
|
-
|
|
10
|
+
}>;
|
|
11
|
+
declare function Root<Value = unknown>(props: RootProps<Value>): JSX.Element;
|
|
12
|
+
export type ItemProps = PartComponentProps<"span", StateOf<Parts["item"]>, {
|
|
17
13
|
value: unknown;
|
|
14
|
+
/** Disables this item: it cannot be chosen. */
|
|
18
15
|
disabled?: boolean;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
/** The id of the item's native radio, unique in the page: a `<label for>` names it. */
|
|
17
|
+
id?: string;
|
|
18
|
+
}>;
|
|
19
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
20
|
+
export type IndicatorProps = PartComponentProps<"span", StateOf<Parts["indicator"]>, {
|
|
22
21
|
keepMounted?: boolean;
|
|
23
|
-
}
|
|
22
|
+
}>;
|
|
23
|
+
/** `keepMounted` keeps the mark in the page while its item is not the chosen one. */
|
|
24
|
+
declare function Indicator(props: IndicatorProps): JSX.Element;
|
|
24
25
|
export declare const RadioGroup: {
|
|
25
26
|
Root: typeof Root;
|
|
26
27
|
Item: typeof Item;
|
package/types/resizable.d.ts
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import type { ChangeDetails, Orientation } from "@kirana-ui/core";
|
|
1
|
+
import type { ChangeDetails, Orientation, StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
3
|
import type { JSX } from "solid-js";
|
|
3
4
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
|
|
5
|
+
type Parts = Vocabulary["resizable"];
|
|
6
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>, {
|
|
5
7
|
orientation?: Orientation;
|
|
6
8
|
onSizesChange?: (sizes: number[], details: ChangeDetails) => void;
|
|
7
9
|
keyboardStep?: number;
|
|
8
10
|
disabled?: boolean;
|
|
9
11
|
id?: string;
|
|
10
|
-
}
|
|
11
|
-
declare function
|
|
12
|
+
}>;
|
|
13
|
+
declare function Group(props: GroupProps): JSX.Element;
|
|
14
|
+
export type PanelProps = PartComponentProps<"div", StateOf<Parts["panel"]>, {
|
|
12
15
|
defaultSize?: number;
|
|
13
16
|
minSize?: number;
|
|
14
17
|
maxSize?: number;
|
|
15
|
-
}
|
|
16
|
-
declare function
|
|
18
|
+
}>;
|
|
19
|
+
declare function Panel(props: PanelProps): JSX.Element;
|
|
20
|
+
export type HandleProps = PartComponentProps<"div", StateOf<Parts["handle"]>, {
|
|
17
21
|
disabled?: boolean;
|
|
18
|
-
}
|
|
22
|
+
}>;
|
|
23
|
+
declare function Handle(props: HandleProps): JSX.Element;
|
|
19
24
|
export declare const Resizable: {
|
|
20
25
|
Group: typeof Group;
|
|
21
26
|
Panel: typeof Panel;
|
package/types/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Part as CorePart, PartProps, ReadonlySignal } from "@kirana-ui/core";
|
|
1
|
+
import type { Part as CorePart, PartEvent, PartProps, PartState, ReadonlySignal } from "@kirana-ui/core";
|
|
2
2
|
import type { JSX } from "solid-js";
|
|
3
3
|
/** A core signal as a Solid accessor: tracked by whatever calls it. */
|
|
4
4
|
export declare function fromSignal<T>(source: ReadonlySignal<T>): () => T;
|
|
@@ -8,22 +8,45 @@ export declare function toSignal<T extends Record<string, unknown>>(read: () =>
|
|
|
8
8
|
export declare function controller<P extends Record<string, unknown>, C extends {
|
|
9
9
|
mount(): () => void;
|
|
10
10
|
}>(create: (props: ReadonlySignal<P>) => C, read: () => P): C;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/** The elements a part can be drawn as: every tag Solid's JSX knows. */
|
|
12
|
+
export type PartTag = keyof JSX.IntrinsicElements;
|
|
13
|
+
/** What every part takes besides its element's own props. */
|
|
14
|
+
type Composition<State> = {
|
|
15
|
+
/**
|
|
16
|
+
* Renders the part as the caller's own element, which spreads the props it is given: what
|
|
17
|
+
* the element writes after the spread wins, so the caller decides. The props carry the
|
|
18
|
+
* part's `ref` and, as `children`, what the part holds: the children it was given, then
|
|
19
|
+
* anything of its own (a control's hidden input), so an element that writes no children of
|
|
20
|
+
* its own holds them, and one that does draws `props().children` among them. `state` reads
|
|
21
|
+
* the part's state (`open`, `side` …, from its `data-*` attributes).
|
|
22
|
+
*/
|
|
23
|
+
render?: (props: () => PartProps, state: () => State) => JSX.Element;
|
|
14
24
|
/** Another tag for the part's element. */
|
|
15
|
-
as?: string;
|
|
16
|
-
children?: JSX.Element;
|
|
17
|
-
[attribute: string]: unknown;
|
|
25
|
+
as?: PartTag | (string & {});
|
|
18
26
|
};
|
|
27
|
+
export type { PartEvent };
|
|
28
|
+
type Hearing<Prop> = Prop extends (event: infer Heard) => infer Answer ? Heard extends Event ? (event: PartEvent<Heard>) => Answer : Prop : Prop;
|
|
29
|
+
/**
|
|
30
|
+
* A part's props: its element's own (`Tag`'s attributes, its events with the element as their
|
|
31
|
+
* `currentTarget` and `preventKiranaHandler()` to keep the part's own handler out, a `ref` to
|
|
32
|
+
* that element), `render` and `as`, and the part's `Own` props, which come before the
|
|
33
|
+
* element's of the same name. `State` is what `render` reads: the part's state as the
|
|
34
|
+
* vocabulary defines it.
|
|
35
|
+
*/
|
|
36
|
+
export type PartComponentProps<Tag extends PartTag = "div", State = PartState, Own = {}> = Own & {
|
|
37
|
+
[Name in keyof JSX.IntrinsicElements[Tag] as Name extends keyof Own | keyof Composition<State> ? never : Name]: Hearing<JSX.IntrinsicElements[Tag][Name]>;
|
|
38
|
+
} & Omit<Composition<State>, keyof Own>;
|
|
19
39
|
/**
|
|
20
|
-
*
|
|
21
|
-
* part's and the part's DOM work attached once the element is in the page.
|
|
40
|
+
* The element of a part (`of`), or the caller's through `render`, with the caller's props merged under the
|
|
41
|
+
* part's and the part's DOM work attached once the element is in the page. What the part holds
|
|
42
|
+
* is its children here: with `as` they are the element's, and with `render` they are handed to
|
|
43
|
+
* the caller's function as the `children` of its props, so a control drawn as another element
|
|
44
|
+
* keeps the native input a form and a label reach.
|
|
22
45
|
*/
|
|
23
|
-
export declare function Part(props:
|
|
24
|
-
|
|
46
|
+
export declare function Part(props: {
|
|
47
|
+
of: CorePart;
|
|
25
48
|
tag: string;
|
|
26
|
-
}): JSX.Element;
|
|
49
|
+
} & Record<string, unknown>): JSX.Element;
|
|
27
50
|
/**
|
|
28
51
|
* Its children as children of `target`, an element drawn elsewhere: with no element of its own
|
|
29
52
|
* around them (Solid's `Portal` adds one), so the page is the same as on the other adapters.
|
|
@@ -32,6 +55,7 @@ export declare function Into(props: {
|
|
|
32
55
|
target: HTMLElement;
|
|
33
56
|
children?: JSX.Element;
|
|
34
57
|
}): JSX.Element;
|
|
58
|
+
/** What `PortalProvider` takes. */
|
|
35
59
|
export interface PortalProviderProps {
|
|
36
60
|
/** Where the popups inside are drawn; the end of `<body>` while it is not given. */
|
|
37
61
|
container?: HTMLElement | null | undefined;
|
package/types/scroll-area.d.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import type { Orientation } from "@kirana-ui/core";
|
|
1
|
+
import type { Orientation, StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
3
|
import type { JSX } from "solid-js";
|
|
3
4
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare function
|
|
5
|
+
type Parts = Vocabulary["scrollArea"];
|
|
6
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>>;
|
|
7
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
8
|
+
export type ScrollbarProps = PartComponentProps<"div", StateOf<Parts["scrollbar"]>, {
|
|
7
9
|
orientation?: Orientation;
|
|
8
10
|
keepMounted?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function
|
|
11
|
+
}>;
|
|
12
|
+
/** `orientation` is which way it scrolls (`vertical` by default). */
|
|
13
|
+
declare function Scrollbar(props: ScrollbarProps): JSX.Element;
|
|
14
|
+
export type ThumbProps = PartComponentProps<"div", StateOf<Parts["thumb"]>>;
|
|
15
|
+
declare function Thumb(props: ThumbProps): JSX.Element;
|
|
16
|
+
export type CornerProps = PartComponentProps<"div", StateOf<Parts["corner"]>>;
|
|
17
|
+
declare function Corner(props: CornerProps): JSX.Element;
|
|
18
|
+
export type ViewportProps = PartComponentProps<"div", StateOf<Parts["viewport"]>>;
|
|
19
|
+
export type ContentProps = PartComponentProps<"div", StateOf<Parts["content"]>>;
|
|
12
20
|
export declare const ScrollArea: {
|
|
13
21
|
Root: typeof Root;
|
|
14
|
-
Viewport: (props:
|
|
15
|
-
Content: (props:
|
|
22
|
+
Viewport: (props: ViewportProps) => JSX.Element;
|
|
23
|
+
Content: (props: ContentProps) => JSX.Element;
|
|
16
24
|
Scrollbar: typeof Scrollbar;
|
|
17
25
|
Thumb: typeof Thumb;
|
|
18
26
|
Corner: typeof Corner;
|
package/types/select.d.ts
CHANGED
|
@@ -1,74 +1,83 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
2
|
import type { SelectProps } from "@kirana-ui/core/select";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
4
|
+
import type { Accessor, JSX } from "solid-js";
|
|
5
|
+
import type { PortalProps, PositionerOptions } from "./popover.tsx";
|
|
5
6
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
name?: string;
|
|
16
|
-
form?: string;
|
|
17
|
-
items?: readonly {
|
|
18
|
-
value: unknown;
|
|
19
|
-
label: string;
|
|
20
|
-
}[];
|
|
21
|
-
virtualized?: SelectProps["virtualized"];
|
|
7
|
+
type Parts = Vocabulary["select"];
|
|
8
|
+
export type { PortalProps };
|
|
9
|
+
/**
|
|
10
|
+
* `Value` is what an item's `value` is: the root's `value` and `onValueChange` hold one or
|
|
11
|
+
* `null` for none, and with `multiple` its `values` and `onValuesChange` hold several.
|
|
12
|
+
*/
|
|
13
|
+
export type RootProps<Value = unknown> = Omit<SelectProps<Value>, "id"> & {
|
|
22
14
|
id?: string;
|
|
23
15
|
children?: JSX.Element;
|
|
24
16
|
};
|
|
25
|
-
declare function Root(props: RootProps): JSX.Element;
|
|
17
|
+
declare function Root<Value = unknown>(props: RootProps<Value>): JSX.Element;
|
|
18
|
+
export type PositionerProps = PartComponentProps<"div", StateOf<Parts["positioner"]>, PositionerOptions & {
|
|
19
|
+
alignItemWithTrigger?: boolean;
|
|
20
|
+
}>;
|
|
26
21
|
/**
|
|
27
22
|
* `alignItemWithTrigger`: the list opens over its trigger, the chosen item's text on the
|
|
28
23
|
* trigger's own, where there is room and unless a finger opened it.
|
|
29
24
|
*/
|
|
30
|
-
declare function Positioner(props: PositionerProps
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Shows the chosen value's label, or `placeholder` while nothing is chosen; with `multiple`,
|
|
28
|
+
* the chosen labels with commas between. A function child draws something else: it is given
|
|
29
|
+
* the value and its label, or with `multiple` the values and their labels in the items'
|
|
30
|
+
* order, each as an accessor. Its first parameter's type says which:
|
|
31
|
+
* `(values: Accessor<string[]>, labels) => …`.
|
|
32
|
+
*/
|
|
33
|
+
export type ValueProps<Chosen = unknown> = PartComponentProps<"span", StateOf<Parts["value"]>, {
|
|
35
34
|
placeholder?: string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
declare function
|
|
35
|
+
children?: JSX.Element | ((value: Accessor<Chosen>, label: Accessor<Chosen extends readonly unknown[] ? readonly string[] : string | undefined>) => JSX.Element);
|
|
36
|
+
}>;
|
|
37
|
+
declare function Value<Chosen = unknown>(props: ValueProps<Chosen>): JSX.Element;
|
|
38
|
+
export type ItemProps = PartComponentProps<"div", StateOf<Parts["item"]>, {
|
|
39
39
|
value: unknown;
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
label?: string;
|
|
42
42
|
index?: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
43
|
+
}>;
|
|
44
|
+
/** `label` is what typeahead matches and the trigger shows; the item's text when left out. */
|
|
45
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
46
|
+
export type ItemTextProps = PartComponentProps<"span", StateOf<Parts["itemText"]>>;
|
|
47
|
+
export type ItemIndicatorProps = PartComponentProps<"span", StateOf<Parts["itemIndicator"]>, {
|
|
45
48
|
keepMounted?: boolean;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
}>;
|
|
50
|
+
declare function ItemIndicator(props: ItemIndicatorProps): JSX.Element;
|
|
51
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>, {
|
|
49
52
|
id?: string;
|
|
50
|
-
}
|
|
53
|
+
}>;
|
|
54
|
+
/** Items that belong together, named by their `<Select.GroupLabel>`. */
|
|
55
|
+
declare function Group(props: GroupProps): JSX.Element;
|
|
56
|
+
export type GroupLabelProps = PartComponentProps<"div", StateOf<Parts["groupLabel"]>>;
|
|
57
|
+
export type ScrollUpArrowProps = PartComponentProps<"div", StateOf<Parts["scrollUpArrow"]>>;
|
|
58
|
+
export type ScrollDownArrowProps = PartComponentProps<"div", StateOf<Parts["scrollDownArrow"]>>;
|
|
59
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>>;
|
|
60
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
61
|
+
export type ListProps = PartComponentProps<"div", StateOf<Parts["list"]>>;
|
|
62
|
+
export type SeparatorProps = PartComponentProps<"div", StateOf<Parts["separator"]>>;
|
|
51
63
|
export declare const Select: {
|
|
52
64
|
Root: typeof Root;
|
|
53
|
-
Portal: (props:
|
|
54
|
-
children?: JSX.Element;
|
|
55
|
-
}) => JSX.Element;
|
|
65
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
56
66
|
Positioner: typeof Positioner;
|
|
57
67
|
Value: typeof Value;
|
|
58
68
|
Item: typeof Item;
|
|
59
|
-
ItemText: (props:
|
|
69
|
+
ItemText: (props: ItemTextProps) => JSX.Element;
|
|
60
70
|
ItemIndicator: typeof ItemIndicator;
|
|
61
|
-
Trigger: (props:
|
|
62
|
-
Popup: (props:
|
|
71
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
72
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
63
73
|
/** The items' own box inside the popup, when the popup also holds scroll arrows. */
|
|
64
|
-
List: (props:
|
|
74
|
+
List: (props: ListProps) => JSX.Element;
|
|
65
75
|
/** In the page while there is more of the list above: it scrolls it under a moving pointer. */
|
|
66
|
-
ScrollUpArrow: (props:
|
|
76
|
+
ScrollUpArrow: (props: ScrollUpArrowProps) => JSX.Element;
|
|
67
77
|
/** In the page while there is more of the list below. */
|
|
68
|
-
ScrollDownArrow: (props:
|
|
78
|
+
ScrollDownArrow: (props: ScrollDownArrowProps) => JSX.Element;
|
|
69
79
|
Group: typeof Group;
|
|
70
|
-
GroupLabel: (props:
|
|
80
|
+
GroupLabel: (props: GroupLabelProps) => JSX.Element;
|
|
71
81
|
/** A line between groups. */
|
|
72
|
-
Separator: (props:
|
|
82
|
+
Separator: (props: SeparatorProps) => JSX.Element;
|
|
73
83
|
};
|
|
74
|
-
export {};
|
package/types/separator.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { Orientation } from "@kirana-ui/core";
|
|
1
|
+
import type { Orientation, StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
3
|
import type { JSX } from "solid-js";
|
|
3
4
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
export
|
|
5
|
+
export type SeparatorProps = PartComponentProps<"div", StateOf<Vocabulary["separator"]["root"]>, {
|
|
5
6
|
orientation?: Orientation;
|
|
6
|
-
}
|
|
7
|
+
}>;
|
|
8
|
+
export declare function Separator(props: SeparatorProps): JSX.Element;
|
package/types/slider.d.ts
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { SliderProps, SliderValue } from "@kirana-ui/core/slider";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
4
|
import type { JSX } from "solid-js";
|
|
3
5
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
-
|
|
6
|
+
type Parts = Vocabulary["slider"];
|
|
7
|
+
/**
|
|
8
|
+
* `Value` is what the slider is given, `value` or `defaultValue`: a number for one thumb, a
|
|
9
|
+
* list for a range. What `onValueChange` and `onValueCommitted` are told is the same kind.
|
|
10
|
+
*/
|
|
11
|
+
export type RootProps<Value extends SliderValue = SliderValue> = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<SliderProps<Value>, "id"> & {
|
|
5
12
|
id?: string;
|
|
6
|
-
}
|
|
7
|
-
declare function Root(props: RootProps): JSX.Element;
|
|
8
|
-
|
|
9
|
-
declare function Thumb(props: PartComponentProps & {
|
|
13
|
+
}>;
|
|
14
|
+
declare function Root<Value extends SliderValue = number>(props: RootProps<Value>): JSX.Element;
|
|
15
|
+
export type ThumbProps = PartComponentProps<"div", StateOf<Parts["thumb"]>, {
|
|
10
16
|
index?: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
declare function
|
|
17
|
+
}>;
|
|
18
|
+
/** `index` is which value of a range the thumb is, from 0. */
|
|
19
|
+
declare function Thumb(props: ThumbProps): JSX.Element;
|
|
20
|
+
export type ValueProps = PartComponentProps<"output", StateOf<Parts["value"]>, {
|
|
14
21
|
children?: (text: () => string, values: () => readonly number[]) => JSX.Element;
|
|
15
|
-
}
|
|
22
|
+
}>;
|
|
23
|
+
/** The written value, or what its child, a function, makes of it and of the values. */
|
|
24
|
+
declare function Value(props: ValueProps): JSX.Element;
|
|
25
|
+
export type ControlProps = PartComponentProps<"div", StateOf<Parts["control"]>>;
|
|
26
|
+
export type TrackProps = PartComponentProps<"div", StateOf<Parts["track"]>>;
|
|
27
|
+
export type IndicatorProps = PartComponentProps<"div", StateOf<Parts["indicator"]>>;
|
|
16
28
|
export declare const Slider: {
|
|
17
29
|
Root: typeof Root;
|
|
18
30
|
Value: typeof Value;
|
|
19
|
-
Control: (props:
|
|
20
|
-
Track: (props:
|
|
21
|
-
Indicator: (props:
|
|
31
|
+
Control: (props: ControlProps) => JSX.Element;
|
|
32
|
+
Track: (props: TrackProps) => JSX.Element;
|
|
33
|
+
Indicator: (props: IndicatorProps) => JSX.Element;
|
|
22
34
|
Thumb: typeof Thumb;
|
|
23
35
|
};
|
|
24
36
|
export {};
|