@kirana-ui/solid 0.1.1 → 0.2.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 +3 -3
- package/dom/button.js +1 -1
- package/dom/calendar.js +12 -8
- package/dom/carousel.js +6 -6
- package/dom/checkbox.js +3 -3
- package/dom/collapsible.js +3 -3
- package/dom/combobox.js +19 -11
- package/dom/command.js +8 -8
- package/dom/date-field.js +7 -3
- package/dom/date-picker.js +2 -2
- package/dom/dialog.js +5 -2
- 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/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 +3 -3
- package/dom/otp.js +4 -4
- package/dom/pagination.js +3 -3
- package/dom/popover.js +20 -7
- package/dom/qr-code.js +3 -3
- package/dom/radio-group.js +4 -4
- package/dom/resizable.js +3 -3
- package/dom/runtime.js +23 -7
- package/dom/scroll-area.js +5 -5
- package/dom/select.js +25 -13
- package/dom/separator.js +1 -1
- package/dom/slider.js +10 -7
- 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 +1588 -224
- package/package.json +18 -2
- package/server/accordion.js +9 -6
- package/server/agent.js +3 -0
- package/server/autosize.js +1 -1
- package/server/avatar.js +3 -3
- package/server/button.js +1 -1
- package/server/calendar.js +12 -8
- package/server/carousel.js +6 -6
- package/server/checkbox.js +3 -3
- package/server/collapsible.js +3 -3
- package/server/combobox.js +19 -11
- package/server/command.js +8 -8
- package/server/date-field.js +7 -3
- package/server/date-picker.js +2 -2
- package/server/dialog.js +5 -2
- 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/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 +3 -3
- package/server/otp.js +4 -4
- package/server/pagination.js +3 -3
- package/server/popover.js +20 -7
- package/server/qr-code.js +3 -3
- package/server/radio-group.js +4 -4
- package/server/resizable.js +3 -3
- package/server/runtime.js +23 -7
- package/server/scroll-area.js +5 -5
- package/server/select.js +25 -13
- package/server/separator.js +1 -1
- package/server/slider.js +10 -7
- 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 +142 -0
- package/src/accordion.jsx +10 -7
- package/src/agent.js +3 -0
- package/src/autosize.jsx +1 -1
- package/src/avatar.jsx +3 -3
- package/src/button.jsx +1 -1
- package/src/calendar.jsx +12 -8
- package/src/carousel.jsx +6 -6
- package/src/checkbox.jsx +3 -3
- package/src/collapsible.jsx +3 -3
- package/src/combobox.jsx +20 -12
- package/src/command.jsx +8 -8
- package/src/date-field.jsx +7 -3
- package/src/date-picker.jsx +2 -2
- package/src/dialog.jsx +8 -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/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 +3 -3
- package/src/otp.jsx +4 -4
- package/src/pagination.jsx +3 -3
- package/src/popover.jsx +20 -4
- package/src/qr-code.jsx +3 -3
- package/src/radio-group.jsx +5 -5
- package/src/resizable.jsx +3 -3
- package/src/runtime.jsx +21 -7
- package/src/scroll-area.jsx +5 -5
- package/src/select.jsx +28 -14
- package/src/separator.jsx +1 -1
- package/src/slider.jsx +11 -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 +12 -5
- package/types/button.d.ts +4 -2
- package/types/calendar.d.ts +35 -18
- package/types/carousel.d.ts +18 -10
- package/types/checkbox.d.ts +9 -6
- package/types/collapsible.d.ts +11 -7
- package/types/combobox.d.ts +61 -62
- package/types/command.d.ts +27 -17
- package/types/context-menu.d.ts +1 -0
- package/types/date-field.d.ts +20 -9
- package/types/date-picker.d.ts +25 -34
- package/types/dialog.d.ts +42 -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 +12 -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 +13 -6
- package/types/otp.d.ts +17 -10
- package/types/pagination.d.ts +18 -10
- package/types/popover.d.ts +37 -12
- package/types/progress.d.ts +16 -7
- package/types/qr-code.d.ts +10 -4
- package/types/radio-group.d.ts +15 -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/menu.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type { ChangeDetails } from "@kirana-ui/core";
|
|
1
|
+
import type { ChangeDetails, StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { MenuRadioGroupProps } from "@kirana-ui/core/menu";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
4
|
import type { JSX } from "solid-js";
|
|
3
|
-
import type {
|
|
5
|
+
import type { PortalProps, PositionerOptions } from "./popover.tsx";
|
|
4
6
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
7
|
+
type Parts = Vocabulary["menu"];
|
|
8
|
+
export type { PortalProps };
|
|
5
9
|
export type RootProps = {
|
|
6
10
|
open?: boolean;
|
|
7
11
|
defaultOpen?: boolean;
|
|
@@ -12,80 +16,90 @@ export type RootProps = {
|
|
|
12
16
|
id?: string;
|
|
13
17
|
children?: JSX.Element;
|
|
14
18
|
};
|
|
19
|
+
export type ContextRootProps = RootProps;
|
|
20
|
+
export type SubmenuRootProps = RootProps;
|
|
21
|
+
export type PositionerProps = PartComponentProps<"div", StateOf<Parts["positioner"]>, PositionerOptions>;
|
|
15
22
|
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
16
23
|
type ItemOptions = {
|
|
17
24
|
disabled?: boolean;
|
|
18
25
|
label?: string;
|
|
19
26
|
closeOnClick?: boolean;
|
|
20
27
|
};
|
|
21
|
-
|
|
28
|
+
export type ItemProps = PartComponentProps<"div", StateOf<Parts["item"]>, ItemOptions>;
|
|
29
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
30
|
+
export type LinkItemProps = PartComponentProps<"a", StateOf<Parts["linkItem"]>, ItemOptions>;
|
|
22
31
|
/** An item that is a link: `href` and the rest go to its `<a>`. */
|
|
23
|
-
declare function LinkItem(props:
|
|
24
|
-
|
|
32
|
+
declare function LinkItem(props: LinkItemProps): JSX.Element;
|
|
33
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>, {
|
|
25
34
|
id?: string;
|
|
26
|
-
}
|
|
27
|
-
declare function
|
|
35
|
+
}>;
|
|
36
|
+
declare function Group(props: GroupProps): JSX.Element;
|
|
37
|
+
export type GroupLabelProps = PartComponentProps<"div", StateOf<Parts["groupLabel"]>>;
|
|
38
|
+
export type CheckboxItemProps = PartComponentProps<"div", StateOf<Parts["checkboxItem"]>, ItemOptions & {
|
|
28
39
|
checked?: boolean;
|
|
29
40
|
defaultChecked?: boolean;
|
|
30
41
|
onCheckedChange?: (checked: boolean, details: ChangeDetails) => void;
|
|
31
|
-
}
|
|
32
|
-
|
|
42
|
+
}>;
|
|
43
|
+
declare function CheckboxItem(props: CheckboxItemProps): JSX.Element;
|
|
44
|
+
export type CheckboxItemIndicatorProps = PartComponentProps<"span", StateOf<Parts["checkboxItemIndicator"]>, {
|
|
33
45
|
keepMounted?: boolean;
|
|
34
|
-
}
|
|
35
|
-
declare function CheckboxItemIndicator(props:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
}): JSX.Element;
|
|
42
|
-
declare function RadioItem(props: PartComponentProps & ItemOptions & {
|
|
46
|
+
}>;
|
|
47
|
+
declare function CheckboxItemIndicator(props: CheckboxItemIndicatorProps): JSX.Element;
|
|
48
|
+
/** `Value` is what a radio item's `value` is: the group's `value` holds the chosen one. */
|
|
49
|
+
export type RadioGroupProps<Value = unknown> = PartComponentProps<"div", StateOf<Parts["radioGroup"]>, MenuRadioGroupProps<Value>>;
|
|
50
|
+
declare function RadioGroup<Value = unknown>(props: RadioGroupProps<Value>): JSX.Element;
|
|
51
|
+
export type RadioItemProps = PartComponentProps<"div", StateOf<Parts["radioItem"]>, ItemOptions & {
|
|
43
52
|
value: unknown;
|
|
44
|
-
}
|
|
45
|
-
declare function
|
|
53
|
+
}>;
|
|
54
|
+
declare function RadioItem(props: RadioItemProps): JSX.Element;
|
|
55
|
+
export type RadioItemIndicatorProps = PartComponentProps<"span", StateOf<Parts["radioItemIndicator"]>, {
|
|
56
|
+
keepMounted?: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
declare function RadioItemIndicator(props: RadioItemIndicatorProps): JSX.Element;
|
|
59
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>>;
|
|
60
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
61
|
+
export type ArrowProps = PartComponentProps<"div", StateOf<Parts["arrow"]>>;
|
|
62
|
+
export type SeparatorProps = PartComponentProps<"div", StateOf<Parts["separator"]>>;
|
|
63
|
+
export type SubmenuTriggerProps = PartComponentProps<"div", StateOf<Parts["submenuTrigger"]>>;
|
|
64
|
+
export type ContextTriggerProps = PartComponentProps<"div", StateOf<Vocabulary["contextMenu"]["trigger"]>>;
|
|
46
65
|
export declare const Menu: {
|
|
47
66
|
Root: (props: RootProps) => JSX.Element;
|
|
48
|
-
Portal: (props:
|
|
49
|
-
children?: JSX.Element;
|
|
50
|
-
}) => JSX.Element;
|
|
67
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
51
68
|
Positioner: typeof Positioner;
|
|
52
|
-
Trigger: (props:
|
|
53
|
-
Popup: (props:
|
|
54
|
-
Arrow: (props:
|
|
69
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
70
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
71
|
+
Arrow: (props: ArrowProps) => JSX.Element;
|
|
55
72
|
Item: typeof Item;
|
|
56
73
|
LinkItem: typeof LinkItem;
|
|
57
74
|
Group: typeof Group;
|
|
58
|
-
GroupLabel: (props:
|
|
59
|
-
Separator: (props:
|
|
75
|
+
GroupLabel: (props: GroupLabelProps) => JSX.Element;
|
|
76
|
+
Separator: (props: SeparatorProps) => JSX.Element;
|
|
60
77
|
CheckboxItem: typeof CheckboxItem;
|
|
61
78
|
CheckboxItemIndicator: typeof CheckboxItemIndicator;
|
|
62
79
|
RadioGroup: typeof RadioGroup;
|
|
63
80
|
RadioItem: typeof RadioItem;
|
|
64
81
|
RadioItemIndicator: typeof RadioItemIndicator;
|
|
65
|
-
SubmenuRoot: (props:
|
|
66
|
-
SubmenuTrigger: (props:
|
|
82
|
+
SubmenuRoot: (props: SubmenuRootProps) => JSX.Element;
|
|
83
|
+
SubmenuTrigger: (props: SubmenuTriggerProps) => JSX.Element;
|
|
67
84
|
};
|
|
68
85
|
export declare const ContextMenu: {
|
|
69
|
-
Root: (props:
|
|
86
|
+
Root: (props: ContextRootProps) => JSX.Element;
|
|
70
87
|
/** The area a secondary press, or a long press on a touch screen, opens the menu in. */
|
|
71
|
-
Trigger: (props:
|
|
72
|
-
Portal: (props:
|
|
73
|
-
children?: JSX.Element;
|
|
74
|
-
}) => JSX.Element;
|
|
88
|
+
Trigger: (props: ContextTriggerProps) => JSX.Element;
|
|
89
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
75
90
|
Positioner: typeof Positioner;
|
|
76
|
-
Popup: (props:
|
|
77
|
-
Arrow: (props:
|
|
91
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
92
|
+
Arrow: (props: ArrowProps) => JSX.Element;
|
|
78
93
|
Item: typeof Item;
|
|
79
94
|
LinkItem: typeof LinkItem;
|
|
80
95
|
Group: typeof Group;
|
|
81
|
-
GroupLabel: (props:
|
|
82
|
-
Separator: (props:
|
|
96
|
+
GroupLabel: (props: GroupLabelProps) => JSX.Element;
|
|
97
|
+
Separator: (props: SeparatorProps) => JSX.Element;
|
|
83
98
|
CheckboxItem: typeof CheckboxItem;
|
|
84
99
|
CheckboxItemIndicator: typeof CheckboxItemIndicator;
|
|
85
100
|
RadioGroup: typeof RadioGroup;
|
|
86
101
|
RadioItem: typeof RadioItem;
|
|
87
102
|
RadioItemIndicator: typeof RadioItemIndicator;
|
|
88
|
-
SubmenuRoot: (props:
|
|
89
|
-
SubmenuTrigger: (props:
|
|
103
|
+
SubmenuRoot: (props: SubmenuRootProps) => JSX.Element;
|
|
104
|
+
SubmenuTrigger: (props: SubmenuTriggerProps) => JSX.Element;
|
|
90
105
|
};
|
|
91
|
-
export {};
|
package/types/menubar.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
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
|
-
export declare function Menubar(props: PartComponentProps & {
|
|
5
|
+
export type MenubarProps = PartComponentProps<"div", StateOf<Vocabulary["menubar"]["root"]>, {
|
|
6
6
|
loop?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
orientation?: Orientation;
|
|
9
9
|
id?: string;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
11
|
+
/** A row of menus that work as one. Each `<Menu.Root>` inside it is one of its items. */
|
|
12
|
+
export declare function Menubar(props: MenubarProps): JSX.Element;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import type { ChangeDetails } from "@kirana-ui/core";
|
|
1
|
+
import type { ChangeDetails, 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["messageScroller"];
|
|
6
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, {
|
|
5
7
|
initial?: "bottom" | "top";
|
|
6
8
|
threshold?: number;
|
|
7
9
|
onAtBottomChange?: (atBottom: boolean, details: ChangeDetails) => void;
|
|
8
10
|
id?: string;
|
|
9
|
-
}
|
|
11
|
+
}>;
|
|
12
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
13
|
+
export type ViewportProps = PartComponentProps<"div", StateOf<Parts["viewport"]>>;
|
|
14
|
+
export type ContentProps = PartComponentProps<"div", StateOf<Parts["content"]>>;
|
|
15
|
+
export type ButtonProps = PartComponentProps<"button", StateOf<Parts["button"]>>;
|
|
10
16
|
export declare const MessageScroller: {
|
|
11
17
|
Root: typeof Root;
|
|
12
|
-
Viewport: (props:
|
|
13
|
-
Content: (props:
|
|
14
|
-
Button: (props:
|
|
18
|
+
Viewport: (props: ViewportProps) => JSX.Element;
|
|
19
|
+
Content: (props: ContentProps) => JSX.Element;
|
|
20
|
+
Button: (props: ButtonProps) => JSX.Element;
|
|
15
21
|
};
|
|
16
22
|
export {};
|
package/types/meter.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["meter"];
|
|
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 Meter: {
|
|
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 {};
|
|
@@ -1,44 +1,50 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { NavigationMenuProps } from "@kirana-ui/core/navigation-menu";
|
|
3
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
2
4
|
import type { JSX } from "solid-js";
|
|
3
|
-
import type {
|
|
5
|
+
import type { PortalProps, PositionerOptions } from "./popover.tsx";
|
|
4
6
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
delay?: number;
|
|
10
|
-
closeDelay?: number;
|
|
11
|
-
orientation?: Orientation;
|
|
7
|
+
type Parts = Vocabulary["navigationMenu"];
|
|
8
|
+
export type { PortalProps };
|
|
9
|
+
/** `Value` is what tells an item from the others: the root's `value` holds the open one's. */
|
|
10
|
+
export type RootProps<Value = unknown> = PartComponentProps<"nav", StateOf<Parts["root"]>, Omit<NavigationMenuProps<Value>, "id"> & {
|
|
12
11
|
id?: string;
|
|
13
|
-
}
|
|
14
|
-
declare function Root(props: RootProps): JSX.Element;
|
|
15
|
-
|
|
16
|
-
declare function Item(props: {
|
|
12
|
+
}>;
|
|
13
|
+
declare function Root<Value = unknown>(props: RootProps<Value>): JSX.Element;
|
|
14
|
+
export type ItemProps = PartComponentProps<"li", StateOf<Parts["item"]>, {
|
|
17
15
|
value?: unknown;
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
}>;
|
|
17
|
+
/** `value` tells this item from the others; an item that is given none makes its own. */
|
|
18
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
19
|
+
export type ContentProps = PartComponentProps<"div", StateOf<Parts["content"]>>;
|
|
20
20
|
/** An item's content: drawn in `<NavigationMenu.Viewport>`, while it is shown. */
|
|
21
|
-
declare function Content(props:
|
|
22
|
-
|
|
21
|
+
declare function Content(props: ContentProps): JSX.Element;
|
|
22
|
+
export type LinkProps = PartComponentProps<"a", StateOf<Parts["link"]>, {
|
|
23
23
|
active?: boolean;
|
|
24
24
|
closeOnClick?: boolean;
|
|
25
|
-
}
|
|
25
|
+
}>;
|
|
26
|
+
declare function Link(props: LinkProps): JSX.Element;
|
|
27
|
+
export type PositionerProps = PartComponentProps<"div", StateOf<Parts["positioner"]>, PositionerOptions>;
|
|
26
28
|
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
29
|
+
export type ListProps = PartComponentProps<"ul", StateOf<Parts["list"]>>;
|
|
30
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>>;
|
|
31
|
+
export type IconProps = PartComponentProps<"span", StateOf<Parts["icon"]>>;
|
|
32
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
33
|
+
export type ViewportProps = PartComponentProps<"div", StateOf<Parts["viewport"]>>;
|
|
34
|
+
export type ArrowProps = PartComponentProps<"div", StateOf<Parts["arrow"]>>;
|
|
35
|
+
export type BackdropProps = PartComponentProps<"div", StateOf<Parts["backdrop"]>>;
|
|
27
36
|
export declare const NavigationMenu: {
|
|
28
37
|
Root: typeof Root;
|
|
29
|
-
List: (props:
|
|
38
|
+
List: (props: ListProps) => JSX.Element;
|
|
30
39
|
Item: typeof Item;
|
|
31
|
-
Trigger: (props:
|
|
32
|
-
Icon: (props:
|
|
40
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
41
|
+
Icon: (props: IconProps) => JSX.Element;
|
|
33
42
|
Content: typeof Content;
|
|
34
43
|
Link: typeof Link;
|
|
35
|
-
Portal: (props:
|
|
36
|
-
children?: JSX.Element;
|
|
37
|
-
}) => JSX.Element;
|
|
44
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
38
45
|
Positioner: typeof Positioner;
|
|
39
|
-
Popup: (props:
|
|
40
|
-
Viewport: (props:
|
|
41
|
-
Arrow: (props:
|
|
42
|
-
Backdrop: (props:
|
|
46
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
47
|
+
Viewport: (props: ViewportProps) => JSX.Element;
|
|
48
|
+
Arrow: (props: ArrowProps) => JSX.Element;
|
|
49
|
+
Backdrop: (props: BackdropProps) => JSX.Element;
|
|
43
50
|
};
|
|
44
|
-
export {};
|
package/types/number-field.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { NumberFieldProps } from "@kirana-ui/core/number-field";
|
|
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["numberField"];
|
|
7
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<NumberFieldProps, "id"> & {
|
|
5
8
|
id?: string;
|
|
6
|
-
}
|
|
9
|
+
}>;
|
|
7
10
|
declare function Root(props: RootProps): JSX.Element;
|
|
11
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>>;
|
|
12
|
+
export type InputProps = PartComponentProps<"input", StateOf<Parts["input"]>>;
|
|
13
|
+
export type IncrementProps = PartComponentProps<"button", StateOf<Parts["increment"]>>;
|
|
14
|
+
export type DecrementProps = PartComponentProps<"button", StateOf<Parts["decrement"]>>;
|
|
8
15
|
export declare const NumberField: {
|
|
9
16
|
Root: typeof Root;
|
|
10
|
-
Group: (props:
|
|
11
|
-
Input: (props:
|
|
12
|
-
Increment: (props:
|
|
13
|
-
Decrement: (props:
|
|
17
|
+
Group: (props: GroupProps) => JSX.Element;
|
|
18
|
+
Input: (props: InputProps) => JSX.Element;
|
|
19
|
+
Increment: (props: IncrementProps) => JSX.Element;
|
|
20
|
+
Decrement: (props: DecrementProps) => JSX.Element;
|
|
14
21
|
};
|
|
15
22
|
export {};
|
package/types/otp.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { ChangeDetails } from "@kirana-ui/core";
|
|
1
|
+
import type { ChangeDetails, StateOf } from "@kirana-ui/core";
|
|
2
2
|
import type { OtpProps } from "@kirana-ui/core/otp";
|
|
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";
|
|
5
|
-
|
|
6
|
+
type Parts = Vocabulary["otp"];
|
|
7
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, {
|
|
6
8
|
length?: number;
|
|
7
9
|
value?: string;
|
|
8
10
|
defaultValue?: string;
|
|
@@ -13,20 +15,25 @@ export type RootProps = PartComponentProps & {
|
|
|
13
15
|
name?: string;
|
|
14
16
|
form?: string;
|
|
15
17
|
id?: string;
|
|
16
|
-
}
|
|
18
|
+
}>;
|
|
17
19
|
declare function Root(props: RootProps): JSX.Element;
|
|
18
|
-
|
|
19
|
-
declare function Slot(props: PartComponentProps & {
|
|
20
|
+
export type SlotProps = PartComponentProps<"div", StateOf<Parts["slot"]>, {
|
|
20
21
|
index: number;
|
|
21
|
-
}
|
|
22
|
+
}>;
|
|
23
|
+
/** One cell: it shows its character, then whatever it is given (a caret). */
|
|
24
|
+
declare function Slot(props: SlotProps): JSX.Element;
|
|
25
|
+
export type CaretProps = PartComponentProps<"div", StateOf<Parts["caret"]>>;
|
|
22
26
|
/** Drawn in its cell while the cell is the active one and empty. */
|
|
23
|
-
declare function Caret(props:
|
|
27
|
+
declare function Caret(props: CaretProps): JSX.Element;
|
|
28
|
+
export type InputProps = PartComponentProps<"input", StateOf<Parts["input"]>>;
|
|
29
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>>;
|
|
30
|
+
export type SeparatorProps = PartComponentProps<"div", StateOf<Parts["separator"]>>;
|
|
24
31
|
export declare const Otp: {
|
|
25
32
|
Root: typeof Root;
|
|
26
|
-
Input: (props:
|
|
27
|
-
Group: (props:
|
|
33
|
+
Input: (props: InputProps) => JSX.Element;
|
|
34
|
+
Group: (props: GroupProps) => JSX.Element;
|
|
28
35
|
Slot: typeof Slot;
|
|
29
|
-
Separator: (props:
|
|
36
|
+
Separator: (props: SeparatorProps) => JSX.Element;
|
|
30
37
|
Caret: typeof Caret;
|
|
31
38
|
};
|
|
32
39
|
export {};
|
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";
|
|
1
|
+
import type { Anchor, ChangeDetails, PositionOptions, Signal, StateOf } from "@kirana-ui/core";
|
|
2
2
|
import type { Popover as Controller } 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 };
|
|
@@ -13,19 +19,38 @@ export type RootProps = {
|
|
|
13
19
|
children?: JSX.Element;
|
|
14
20
|
};
|
|
15
21
|
declare function Root(props: RootProps): JSX.Element;
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
export type PortalProps = {
|
|
23
|
+
children?: JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
/** A positioner's own props: where its popup goes, and what it is placed against. */
|
|
26
|
+
export type PositionerOptions = Partial<Omit<PositionOptions, "anchor">> & {
|
|
27
|
+
/**
|
|
28
|
+
* What the popup is placed against, when that is not its trigger: an element, a place in
|
|
29
|
+
* the viewport (an object with `getBoundingClientRect`), or a function that gives one (a
|
|
30
|
+
* signal's accessor, or `() => element` for a variable a `ref` fills). It may change
|
|
31
|
+
* while the popup is open: the popup follows.
|
|
32
|
+
*/
|
|
33
|
+
anchor?: Anchor | (() => Anchor | null | undefined) | null | undefined;
|
|
34
|
+
};
|
|
35
|
+
export type PositionerProps = PartComponentProps<"div", StateOf<Parts["positioner"]>, PositionerOptions>;
|
|
36
|
+
/**
|
|
37
|
+
* A positioner's own props, written where its placement reads them, before its element
|
|
38
|
+
* attaches: the one place they are named. Gives back what is left, for the part's element.
|
|
39
|
+
*/
|
|
40
|
+
export declare function positioned<P extends PositionerOptions>(props: P, positioning: Signal<Partial<PositionOptions>>): Omit<P, keyof PositionerOptions>;
|
|
19
41
|
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
42
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>>;
|
|
43
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
44
|
+
export type TitleProps = PartComponentProps<"h2", StateOf<Parts["title"]>>;
|
|
45
|
+
export type DescriptionProps = PartComponentProps<"p", StateOf<Parts["description"]>>;
|
|
46
|
+
export type CloseProps = PartComponentProps<"button", StateOf<Parts["close"]>>;
|
|
20
47
|
export declare const Popover: {
|
|
21
48
|
Root: typeof Root;
|
|
22
|
-
Portal: (props:
|
|
23
|
-
children?: JSX.Element;
|
|
24
|
-
}) => JSX.Element;
|
|
49
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
25
50
|
Positioner: typeof Positioner;
|
|
26
|
-
Trigger: (props:
|
|
27
|
-
Popup: (props:
|
|
28
|
-
Title: (props:
|
|
29
|
-
Description: (props:
|
|
30
|
-
Close: (props:
|
|
51
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
52
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
53
|
+
Title: (props: TitleProps) => JSX.Element;
|
|
54
|
+
Description: (props: DescriptionProps) => JSX.Element;
|
|
55
|
+
Close: (props: CloseProps) => JSX.Element;
|
|
31
56
|
};
|
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,24 @@
|
|
|
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;
|
|
18
14
|
disabled?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
}>;
|
|
16
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
17
|
+
export type IndicatorProps = PartComponentProps<"span", StateOf<Parts["indicator"]>, {
|
|
22
18
|
keepMounted?: boolean;
|
|
23
|
-
}
|
|
19
|
+
}>;
|
|
20
|
+
/** `keepMounted` keeps the mark in the page while its item is not the chosen one. */
|
|
21
|
+
declare function Indicator(props: IndicatorProps): JSX.Element;
|
|
24
22
|
export declare const RadioGroup: {
|
|
25
23
|
Root: typeof Root;
|
|
26
24
|
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;
|