@kirana-ui/solid 0.1.0 → 0.1.1
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/autocomplete.js +2 -0
- package/dom/autosize.js +19 -0
- package/dom/calendar.js +141 -0
- package/dom/carousel.js +83 -0
- package/dom/checkbox.js +2 -1
- package/dom/combobox.js +281 -0
- package/dom/command.js +129 -0
- package/dom/context-menu.js +2 -0
- package/dom/date-field.js +86 -0
- package/dom/date-picker.js +103 -0
- package/dom/dialog.js +28 -0
- package/dom/drawer.js +2 -0
- package/dom/hover-popup.js +17 -2
- package/dom/index.js +26 -1
- package/dom/input.js +26 -0
- package/dom/label.js +18 -0
- package/dom/listbox.js +114 -0
- package/dom/menu.js +261 -0
- package/dom/menubar-context.js +3 -0
- package/dom/menubar.js +33 -0
- package/dom/message-scroller.js +56 -0
- package/dom/navigation-menu.js +150 -0
- package/dom/number-field.js +82 -0
- package/dom/otp.js +95 -0
- package/dom/pagination.js +74 -0
- package/dom/popover.js +2 -0
- package/dom/qr-code.js +48 -0
- package/dom/radio-group.js +2 -1
- package/dom/resizable.js +65 -0
- package/dom/runtime.js +36 -2
- package/dom/scroll-area.js +99 -0
- package/dom/select.js +69 -5
- package/dom/slider.js +1 -1
- package/dom/switch.js +2 -1
- package/dom/toast.js +113 -0
- package/dom/toggle-group.js +37 -0
- package/dom/toggle.js +11 -3
- package/dom/toolbar-context.js +5 -0
- package/dom/toolbar.js +71 -0
- package/llms.txt +1838 -0
- package/package.json +220 -2
- package/server/autocomplete.js +2 -0
- package/server/autosize.js +19 -0
- package/server/calendar.js +140 -0
- package/server/carousel.js +83 -0
- package/server/checkbox.js +2 -1
- package/server/combobox.js +281 -0
- package/server/command.js +129 -0
- package/server/context-menu.js +2 -0
- package/server/date-field.js +86 -0
- package/server/date-picker.js +103 -0
- package/server/dialog.js +28 -0
- package/server/drawer.js +2 -0
- package/server/hover-popup.js +17 -2
- package/server/index.js +26 -1
- package/server/input.js +26 -0
- package/server/label.js +18 -0
- package/server/listbox.js +114 -0
- package/server/menu.js +261 -0
- package/server/menubar-context.js +3 -0
- package/server/menubar.js +33 -0
- package/server/message-scroller.js +56 -0
- package/server/navigation-menu.js +144 -0
- package/server/number-field.js +81 -0
- package/server/otp.js +94 -0
- package/server/pagination.js +74 -0
- package/server/popover.js +2 -0
- package/server/qr-code.js +48 -0
- package/server/radio-group.js +2 -1
- package/server/resizable.js +65 -0
- package/server/runtime.js +35 -1
- package/server/scroll-area.js +99 -0
- package/server/select.js +69 -5
- package/server/slider.js +1 -1
- package/server/switch.js +2 -1
- package/server/toast.js +113 -0
- package/server/toggle-group.js +37 -0
- package/server/toggle.js +11 -3
- package/server/toolbar-context.js +5 -0
- package/server/toolbar.js +71 -0
- package/src/autocomplete.jsx +2 -0
- package/src/autosize.jsx +8 -0
- package/src/calendar.jsx +104 -0
- package/src/carousel.jsx +51 -0
- package/src/checkbox.jsx +2 -0
- package/src/combobox.jsx +179 -0
- package/src/command.jsx +81 -0
- package/src/context-menu.js +2 -0
- package/src/date-field.jsx +67 -0
- package/src/date-picker.jsx +72 -0
- package/src/dialog.jsx +20 -0
- package/src/drawer.js +2 -0
- package/src/hover-popup.jsx +10 -2
- package/src/index.js +26 -1
- package/src/input.jsx +17 -0
- package/src/label.jsx +9 -0
- package/src/listbox.jsx +81 -0
- package/src/menu.jsx +164 -0
- package/src/menubar-context.js +3 -0
- package/src/menubar.jsx +21 -0
- package/src/message-scroller.jsx +27 -0
- package/src/navigation-menu.jsx +95 -0
- package/src/number-field.jsx +75 -0
- package/src/otp.jsx +73 -0
- package/src/pagination.jsx +60 -0
- package/src/popover.jsx +2 -0
- package/src/qr-code.jsx +25 -0
- package/src/radio-group.jsx +2 -0
- package/src/resizable.jsx +46 -0
- package/src/runtime.jsx +33 -2
- package/src/scroll-area.jsx +53 -0
- package/src/select.jsx +49 -5
- package/src/slider.jsx +2 -0
- package/src/switch.jsx +2 -0
- package/src/toast.jsx +58 -0
- package/src/toggle-group.jsx +32 -0
- package/src/toggle.jsx +8 -2
- package/src/toolbar-context.js +5 -0
- package/src/toolbar.jsx +43 -0
- package/types/autocomplete.d.ts +1 -0
- package/types/autosize.d.ts +8 -0
- package/types/calendar.d.ts +40 -0
- package/types/carousel.d.ts +26 -0
- package/types/checkbox.d.ts +1 -0
- package/types/combobox.d.ts +106 -0
- package/types/command.d.ts +45 -0
- package/types/context-menu.d.ts +1 -0
- package/types/date-field.d.ts +23 -0
- package/types/date-picker.d.ts +49 -0
- package/types/dialog.d.ts +21 -0
- package/types/drawer.d.ts +1 -0
- package/types/hover-card.d.ts +4 -1
- package/types/hover-popup.d.ts +4 -1
- package/types/index.d.ts +27 -1
- package/types/input.d.ts +12 -0
- package/types/label.d.ts +4 -0
- package/types/listbox.d.ts +38 -0
- package/types/menu.d.ts +91 -0
- package/types/menubar-context.d.ts +3 -0
- package/types/menubar.d.ts +10 -0
- package/types/message-scroller.d.ts +16 -0
- package/types/navigation-menu.d.ts +44 -0
- package/types/number-field.d.ts +15 -0
- package/types/otp.d.ts +32 -0
- package/types/pagination.d.ts +23 -0
- package/types/popover.d.ts +4 -1
- package/types/qr-code.d.ts +14 -0
- package/types/radio-group.d.ts +1 -0
- package/types/resizable.d.ts +24 -0
- package/types/runtime.d.ts +18 -0
- package/types/scroll-area.d.ts +20 -0
- package/types/select.d.ts +25 -1
- package/types/switch.d.ts +1 -0
- package/types/toast.d.ts +33 -0
- package/types/toggle-group.d.ts +14 -0
- package/types/toggle.d.ts +2 -0
- package/types/toolbar-context.d.ts +6 -0
- package/types/toolbar.d.ts +23 -0
- package/types/tooltip.d.ts +4 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DatePickerProps } from "@kirana-ui/core/date-picker";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
export type RootProps = Omit<DatePickerProps, "id"> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
children?: JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
/** A date field, and a calendar in a popover, with one value between them. It draws nothing. */
|
|
9
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
10
|
+
export declare const DatePicker: {
|
|
11
|
+
Root: typeof Root;
|
|
12
|
+
/** The typed date: what holds its segments and its hidden input. */
|
|
13
|
+
Field: (props: PartComponentProps) => JSX.Element;
|
|
14
|
+
Segments: (props: {
|
|
15
|
+
children: (segment: import("@kirana-ui/core/date-field").DateFieldSegment) => JSX.Element;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
Segment: (props: PartComponentProps & {
|
|
18
|
+
segment: import("@kirana-ui/core/date-field").DateFieldSegment;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
21
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
22
|
+
Portal: (props: {
|
|
23
|
+
children?: JSX.Element;
|
|
24
|
+
}) => JSX.Element;
|
|
25
|
+
Positioner: (props: import("./popover.tsx").PositionerProps) => JSX.Element;
|
|
26
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
27
|
+
/** The calendar: what holds its heading, its buttons and its grid. */
|
|
28
|
+
Calendar: (props: PartComponentProps) => JSX.Element;
|
|
29
|
+
Heading: (props: PartComponentProps) => JSX.Element;
|
|
30
|
+
Previous: (props: PartComponentProps) => JSX.Element;
|
|
31
|
+
Next: (props: PartComponentProps) => JSX.Element;
|
|
32
|
+
Grid: (props: PartComponentProps) => JSX.Element;
|
|
33
|
+
Weekdays: (props: {
|
|
34
|
+
children: (weekday: import("@kirana-ui/core/calendar").CalendarWeekday) => JSX.Element;
|
|
35
|
+
}) => JSX.Element;
|
|
36
|
+
HeadCell: (props: PartComponentProps & {
|
|
37
|
+
weekday: import("@kirana-ui/core/calendar").CalendarWeekday;
|
|
38
|
+
}) => JSX.Element;
|
|
39
|
+
Weeks: (props: {
|
|
40
|
+
children: (week: readonly import("@kirana-ui/core/calendar").CalendarDay[]) => JSX.Element;
|
|
41
|
+
}) => JSX.Element;
|
|
42
|
+
Cell: (props: PartComponentProps & {
|
|
43
|
+
date: string;
|
|
44
|
+
}) => JSX.Element;
|
|
45
|
+
Day: (props: PartComponentProps & {
|
|
46
|
+
date: string;
|
|
47
|
+
}) => JSX.Element;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
package/types/dialog.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { DrawerSide, DrawerSnapPoint } from "@kirana-ui/core/drawer";
|
|
2
3
|
import type { JSX } from "solid-js";
|
|
3
4
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
5
|
export type RootProps = {
|
|
@@ -37,4 +38,24 @@ export declare const AlertDialog: {
|
|
|
37
38
|
Description: (props: PartComponentProps) => JSX.Element;
|
|
38
39
|
Close: (props: PartComponentProps) => JSX.Element;
|
|
39
40
|
};
|
|
41
|
+
declare function DrawerRoot(props: RootProps & {
|
|
42
|
+
swipeDirection?: DrawerSide;
|
|
43
|
+
snapPoints?: readonly DrawerSnapPoint[];
|
|
44
|
+
snapPoint?: DrawerSnapPoint;
|
|
45
|
+
defaultSnapPoint?: DrawerSnapPoint;
|
|
46
|
+
onSnapPointChange?: (snapPoint: DrawerSnapPoint, details: ChangeDetails) => void;
|
|
47
|
+
}): JSX.Element;
|
|
48
|
+
/** A dialog that comes from an edge and is dragged back to it. Its parts are a dialog's. */
|
|
49
|
+
export declare const Drawer: {
|
|
50
|
+
Root: typeof DrawerRoot;
|
|
51
|
+
Portal: (props: {
|
|
52
|
+
children?: JSX.Element;
|
|
53
|
+
}) => JSX.Element;
|
|
54
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
55
|
+
Backdrop: (props: PartComponentProps) => JSX.Element;
|
|
56
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
57
|
+
Title: (props: PartComponentProps) => JSX.Element;
|
|
58
|
+
Description: (props: PartComponentProps) => JSX.Element;
|
|
59
|
+
Close: (props: PartComponentProps) => JSX.Element;
|
|
60
|
+
};
|
|
40
61
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Drawer } from "./dialog.tsx";
|
package/types/hover-card.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ export declare const HoverCard: {
|
|
|
4
4
|
children?: import("solid-js").JSX.Element;
|
|
5
5
|
}) => import("solid-js").JSX.Element;
|
|
6
6
|
Positioner: (props: import("./popover.tsx").PositionerProps) => import("solid-js").JSX.Element;
|
|
7
|
-
Trigger: (props: import("./runtime.tsx").PartComponentProps
|
|
7
|
+
Trigger: (props: import("./runtime.tsx").PartComponentProps & {
|
|
8
|
+
delay?: number;
|
|
9
|
+
closeDelay?: number;
|
|
10
|
+
}) => import("solid-js").JSX.Element;
|
|
8
11
|
Popup: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
|
|
9
12
|
Arrow: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
|
|
10
13
|
};
|
package/types/hover-popup.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ export declare function hoverPopup(name: string, create: (props: ReadonlySignal<
|
|
|
20
20
|
children?: JSX.Element;
|
|
21
21
|
}) => JSX.Element;
|
|
22
22
|
Positioner: (props: PositionerProps) => JSX.Element;
|
|
23
|
-
Trigger: (props: PartComponentProps
|
|
23
|
+
Trigger: (props: PartComponentProps & {
|
|
24
|
+
delay?: number;
|
|
25
|
+
closeDelay?: number;
|
|
26
|
+
}) => JSX.Element;
|
|
24
27
|
Popup: (props: PartComponentProps) => JSX.Element;
|
|
25
28
|
Arrow: (props: PartComponentProps) => JSX.Element;
|
|
26
29
|
};
|
package/types/index.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
export { Accordion } from "./accordion.tsx";
|
|
2
2
|
export { Checkbox } from "./checkbox.tsx";
|
|
3
3
|
export { Collapsible } from "./collapsible.tsx";
|
|
4
|
-
export { AlertDialog, Dialog } from "./dialog.tsx";
|
|
4
|
+
export { AlertDialog, Dialog, Drawer } from "./dialog.tsx";
|
|
5
|
+
export { MessageScroller } from "./message-scroller.tsx";
|
|
5
6
|
export { HoverCard } from "./hover-card.tsx";
|
|
7
|
+
export { Combobox } from "./combobox.tsx";
|
|
8
|
+
export { Listbox } from "./listbox.tsx";
|
|
9
|
+
export { ContextMenu, Menu } from "./menu.tsx";
|
|
10
|
+
export { Menubar } from "./menubar.tsx";
|
|
11
|
+
export { NavigationMenu } from "./navigation-menu.tsx";
|
|
12
|
+
export { Otp } from "./otp.tsx";
|
|
13
|
+
export { DateField } from "./date-field.tsx";
|
|
14
|
+
export { Input } from "./input.tsx";
|
|
15
|
+
export { Label } from "./label.tsx";
|
|
16
|
+
export { Command } from "./command.tsx";
|
|
17
|
+
export { NumberField } from "./number-field.tsx";
|
|
18
|
+
export { Autocomplete } from "./autocomplete.tsx";
|
|
19
|
+
export { Pagination } from "./pagination.tsx";
|
|
20
|
+
export { DatePicker } from "./date-picker.tsx";
|
|
21
|
+
export { Calendar } from "./calendar.tsx";
|
|
22
|
+
export { QrCode } from "./qr-code.tsx";
|
|
23
|
+
export { Autosize } from "./autosize.tsx";
|
|
24
|
+
export { Carousel } from "./carousel.tsx";
|
|
25
|
+
export { Toast, createToaster } from "./toast.tsx";
|
|
26
|
+
export { Resizable } from "./resizable.tsx";
|
|
6
27
|
export { Popover } from "./popover.tsx";
|
|
7
28
|
export { RadioGroup } from "./radio-group.tsx";
|
|
8
29
|
export { Select } from "./select.tsx";
|
|
@@ -16,9 +37,14 @@ export { Meter } from "./meter.tsx";
|
|
|
16
37
|
export { Progress } from "./progress.tsx";
|
|
17
38
|
export { Separator } from "./separator.tsx";
|
|
18
39
|
export { Toggle } from "./toggle.tsx";
|
|
40
|
+
export { ToggleGroup } from "./toggle-group.tsx";
|
|
41
|
+
export { Toolbar } from "./toolbar.tsx";
|
|
42
|
+
export { ScrollArea } from "./scroll-area.tsx";
|
|
19
43
|
export { Slider } from "./slider.tsx";
|
|
20
44
|
export { Field } from "./field.tsx";
|
|
21
45
|
export { Fieldset } from "./fieldset.tsx";
|
|
22
46
|
export { Form } from "./form.tsx";
|
|
23
47
|
export { DirectionProvider, useDirection } from "./direction.tsx";
|
|
24
48
|
export type { DirectionProviderProps } from "./direction.tsx";
|
|
49
|
+
export { PortalProvider } from "./runtime.tsx";
|
|
50
|
+
export type { PortalProviderProps } from "./runtime.tsx";
|
package/types/input.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
export type InputProps = PartComponentProps & {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onValueChange?: (value: string, details: ChangeDetails) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* An `<input>`; `as="textarea"` for a text area. It takes what an `<input>` takes, and inside
|
|
10
|
+
* a `<Field.Root>` it is the field's control.
|
|
11
|
+
*/
|
|
12
|
+
export declare function Input(props: InputProps): JSX.Element;
|
package/types/label.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { ListboxProps } from "@kirana-ui/core/listbox";
|
|
3
|
+
import type { JSX } from "solid-js";
|
|
4
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
export type RootProps = PartComponentProps & {
|
|
6
|
+
value?: readonly unknown[];
|
|
7
|
+
defaultValue?: readonly unknown[];
|
|
8
|
+
onValueChange?: (value: unknown[], details: ChangeDetails) => void;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
loop?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
form?: string;
|
|
14
|
+
virtualized?: ListboxProps["virtualized"];
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
18
|
+
declare function Item(props: PartComponentProps & {
|
|
19
|
+
value: unknown;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
label?: string;
|
|
22
|
+
index?: number;
|
|
23
|
+
}): JSX.Element;
|
|
24
|
+
declare function ItemIndicator(props: PartComponentProps & {
|
|
25
|
+
keepMounted?: boolean;
|
|
26
|
+
}): JSX.Element;
|
|
27
|
+
declare function Group(props: PartComponentProps & {
|
|
28
|
+
id?: string;
|
|
29
|
+
}): JSX.Element;
|
|
30
|
+
declare function GroupLabel(props: PartComponentProps): JSX.Element;
|
|
31
|
+
export declare const Listbox: {
|
|
32
|
+
Root: typeof Root;
|
|
33
|
+
Item: typeof Item;
|
|
34
|
+
ItemIndicator: typeof ItemIndicator;
|
|
35
|
+
Group: typeof Group;
|
|
36
|
+
GroupLabel: typeof GroupLabel;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
package/types/menu.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PositionerProps } from "./popover.tsx";
|
|
4
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
export type RootProps = {
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean, details: ChangeDetails) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
modal?: boolean;
|
|
12
|
+
id?: string;
|
|
13
|
+
children?: JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
16
|
+
type ItemOptions = {
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
label?: string;
|
|
19
|
+
closeOnClick?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare function Item(props: PartComponentProps & ItemOptions): JSX.Element;
|
|
22
|
+
/** An item that is a link: `href` and the rest go to its `<a>`. */
|
|
23
|
+
declare function LinkItem(props: PartComponentProps & ItemOptions): JSX.Element;
|
|
24
|
+
declare function Group(props: PartComponentProps & {
|
|
25
|
+
id?: string;
|
|
26
|
+
}): JSX.Element;
|
|
27
|
+
declare function CheckboxItem(props: PartComponentProps & ItemOptions & {
|
|
28
|
+
checked?: boolean;
|
|
29
|
+
defaultChecked?: boolean;
|
|
30
|
+
onCheckedChange?: (checked: boolean, details: ChangeDetails) => void;
|
|
31
|
+
}): JSX.Element;
|
|
32
|
+
type IndicatorProps = PartComponentProps & {
|
|
33
|
+
keepMounted?: boolean;
|
|
34
|
+
};
|
|
35
|
+
declare function CheckboxItemIndicator(props: IndicatorProps): JSX.Element;
|
|
36
|
+
declare function RadioGroup(props: PartComponentProps & {
|
|
37
|
+
value?: unknown;
|
|
38
|
+
defaultValue?: unknown;
|
|
39
|
+
onValueChange?: (value: unknown, details: ChangeDetails) => void;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
}): JSX.Element;
|
|
42
|
+
declare function RadioItem(props: PartComponentProps & ItemOptions & {
|
|
43
|
+
value: unknown;
|
|
44
|
+
}): JSX.Element;
|
|
45
|
+
declare function RadioItemIndicator(props: IndicatorProps): JSX.Element;
|
|
46
|
+
export declare const Menu: {
|
|
47
|
+
Root: (props: RootProps) => JSX.Element;
|
|
48
|
+
Portal: (props: {
|
|
49
|
+
children?: JSX.Element;
|
|
50
|
+
}) => JSX.Element;
|
|
51
|
+
Positioner: typeof Positioner;
|
|
52
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
53
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
54
|
+
Arrow: (props: PartComponentProps) => JSX.Element;
|
|
55
|
+
Item: typeof Item;
|
|
56
|
+
LinkItem: typeof LinkItem;
|
|
57
|
+
Group: typeof Group;
|
|
58
|
+
GroupLabel: (props: PartComponentProps) => JSX.Element;
|
|
59
|
+
Separator: (props: PartComponentProps) => JSX.Element;
|
|
60
|
+
CheckboxItem: typeof CheckboxItem;
|
|
61
|
+
CheckboxItemIndicator: typeof CheckboxItemIndicator;
|
|
62
|
+
RadioGroup: typeof RadioGroup;
|
|
63
|
+
RadioItem: typeof RadioItem;
|
|
64
|
+
RadioItemIndicator: typeof RadioItemIndicator;
|
|
65
|
+
SubmenuRoot: (props: RootProps) => JSX.Element;
|
|
66
|
+
SubmenuTrigger: (props: PartComponentProps) => JSX.Element;
|
|
67
|
+
};
|
|
68
|
+
export declare const ContextMenu: {
|
|
69
|
+
Root: (props: RootProps) => JSX.Element;
|
|
70
|
+
/** The area a secondary press, or a long press on a touch screen, opens the menu in. */
|
|
71
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
72
|
+
Portal: (props: {
|
|
73
|
+
children?: JSX.Element;
|
|
74
|
+
}) => JSX.Element;
|
|
75
|
+
Positioner: typeof Positioner;
|
|
76
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
77
|
+
Arrow: (props: PartComponentProps) => JSX.Element;
|
|
78
|
+
Item: typeof Item;
|
|
79
|
+
LinkItem: typeof LinkItem;
|
|
80
|
+
Group: typeof Group;
|
|
81
|
+
GroupLabel: (props: PartComponentProps) => JSX.Element;
|
|
82
|
+
Separator: (props: PartComponentProps) => JSX.Element;
|
|
83
|
+
CheckboxItem: typeof CheckboxItem;
|
|
84
|
+
CheckboxItemIndicator: typeof CheckboxItemIndicator;
|
|
85
|
+
RadioGroup: typeof RadioGroup;
|
|
86
|
+
RadioItem: typeof RadioItem;
|
|
87
|
+
RadioItemIndicator: typeof RadioItemIndicator;
|
|
88
|
+
SubmenuRoot: (props: RootProps) => JSX.Element;
|
|
89
|
+
SubmenuTrigger: (props: PartComponentProps) => JSX.Element;
|
|
90
|
+
};
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Orientation } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
/** A row of menus that work as one. Each `<Menu.Root>` inside it is one of its items. */
|
|
5
|
+
export declare function Menubar(props: PartComponentProps & {
|
|
6
|
+
loop?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
orientation?: Orientation;
|
|
9
|
+
id?: string;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
declare function Root(props: PartComponentProps & {
|
|
5
|
+
initial?: "bottom" | "top";
|
|
6
|
+
threshold?: number;
|
|
7
|
+
onAtBottomChange?: (atBottom: boolean, details: ChangeDetails) => void;
|
|
8
|
+
id?: string;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export declare const MessageScroller: {
|
|
11
|
+
Root: typeof Root;
|
|
12
|
+
Viewport: (props: PartComponentProps) => JSX.Element;
|
|
13
|
+
Content: (props: PartComponentProps) => JSX.Element;
|
|
14
|
+
Button: (props: PartComponentProps) => JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ChangeDetails, Orientation } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PositionerProps } from "./popover.tsx";
|
|
4
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
export type RootProps = PartComponentProps & {
|
|
6
|
+
value?: unknown;
|
|
7
|
+
defaultValue?: unknown;
|
|
8
|
+
onValueChange?: (value: unknown, details: ChangeDetails) => void;
|
|
9
|
+
delay?: number;
|
|
10
|
+
closeDelay?: number;
|
|
11
|
+
orientation?: Orientation;
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
15
|
+
/** `value` tells this item from the others; an item that is only a link needs none. */
|
|
16
|
+
declare function Item(props: {
|
|
17
|
+
value?: unknown;
|
|
18
|
+
children?: JSX.Element;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
/** An item's content: drawn in `<NavigationMenu.Viewport>`, while it is shown. */
|
|
21
|
+
declare function Content(props: PartComponentProps): JSX.Element;
|
|
22
|
+
declare function Link(props: PartComponentProps & {
|
|
23
|
+
active?: boolean;
|
|
24
|
+
closeOnClick?: boolean;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
27
|
+
export declare const NavigationMenu: {
|
|
28
|
+
Root: typeof Root;
|
|
29
|
+
List: (props: PartComponentProps) => JSX.Element;
|
|
30
|
+
Item: typeof Item;
|
|
31
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
32
|
+
Icon: (props: PartComponentProps) => JSX.Element;
|
|
33
|
+
Content: typeof Content;
|
|
34
|
+
Link: typeof Link;
|
|
35
|
+
Portal: (props: {
|
|
36
|
+
children?: JSX.Element;
|
|
37
|
+
}) => JSX.Element;
|
|
38
|
+
Positioner: typeof Positioner;
|
|
39
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
40
|
+
Viewport: (props: PartComponentProps) => JSX.Element;
|
|
41
|
+
Arrow: (props: PartComponentProps) => JSX.Element;
|
|
42
|
+
Backdrop: (props: PartComponentProps) => JSX.Element;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NumberFieldProps } from "@kirana-ui/core/number-field";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
export type RootProps = PartComponentProps & Omit<NumberFieldProps, "id"> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
8
|
+
export declare const NumberField: {
|
|
9
|
+
Root: typeof Root;
|
|
10
|
+
Group: (props: PartComponentProps) => JSX.Element;
|
|
11
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
12
|
+
Increment: (props: PartComponentProps) => JSX.Element;
|
|
13
|
+
Decrement: (props: PartComponentProps) => JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
package/types/otp.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { OtpProps } from "@kirana-ui/core/otp";
|
|
3
|
+
import type { JSX } from "solid-js";
|
|
4
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
export type RootProps = PartComponentProps & {
|
|
6
|
+
length?: number;
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (value: string, details: ChangeDetails) => void;
|
|
10
|
+
onComplete?: (value: string) => void;
|
|
11
|
+
mode?: OtpProps["mode"];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
form?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
18
|
+
/** One cell: it shows its character, then whatever it is given (a caret). */
|
|
19
|
+
declare function Slot(props: PartComponentProps & {
|
|
20
|
+
index: number;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
/** Drawn in its cell while the cell is the active one and empty. */
|
|
23
|
+
declare function Caret(props: PartComponentProps): JSX.Element;
|
|
24
|
+
export declare const Otp: {
|
|
25
|
+
Root: typeof Root;
|
|
26
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
27
|
+
Group: (props: PartComponentProps) => JSX.Element;
|
|
28
|
+
Slot: typeof Slot;
|
|
29
|
+
Separator: (props: PartComponentProps) => JSX.Element;
|
|
30
|
+
Caret: typeof Caret;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PaginationEntry, PaginationProps } from "@kirana-ui/core/pagination";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
export type RootProps = PartComponentProps & Omit<PaginationProps, "id"> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
8
|
+
/** Draws its child once for each piece of the row: a page, or the mark for pages left out. */
|
|
9
|
+
declare function Items(props: {
|
|
10
|
+
children: (entry: PaginationEntry) => JSX.Element;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
declare function Item(props: PartComponentProps & {
|
|
13
|
+
page: number;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
export declare const Pagination: {
|
|
16
|
+
Root: typeof Root;
|
|
17
|
+
Items: typeof Items;
|
|
18
|
+
Item: typeof Item;
|
|
19
|
+
Ellipsis: (props: PartComponentProps) => JSX.Element;
|
|
20
|
+
Previous: (props: PartComponentProps) => JSX.Element;
|
|
21
|
+
Next: (props: PartComponentProps) => JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
package/types/popover.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ChangeDetails, PositionOptions, Signal } from "@kirana-ui/core";
|
|
2
|
+
import type { Popover as Controller } from "@kirana-ui/core/popover";
|
|
2
3
|
import type { JSX } from "solid-js";
|
|
3
4
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
declare const Context: import("solid-js").Context<Controller | undefined>;
|
|
6
|
+
/** For a component made of this one's parts: a date picker. */
|
|
7
|
+
export { Context as PopoverContext };
|
|
4
8
|
export type RootProps = {
|
|
5
9
|
open?: boolean;
|
|
6
10
|
defaultOpen?: boolean;
|
|
@@ -25,4 +29,3 @@ export declare const Popover: {
|
|
|
25
29
|
Description: (props: PartComponentProps) => JSX.Element;
|
|
26
30
|
Close: (props: PartComponentProps) => JSX.Element;
|
|
27
31
|
};
|
|
28
|
-
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { QrCorrection } from "@kirana-ui/core/qr-code";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
declare function Root(props: PartComponentProps & {
|
|
5
|
+
value: string;
|
|
6
|
+
correction?: QrCorrection;
|
|
7
|
+
id?: string;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
export declare const QrCode: {
|
|
10
|
+
Root: typeof Root;
|
|
11
|
+
Frame: (props: PartComponentProps) => JSX.Element;
|
|
12
|
+
Pattern: (props: PartComponentProps) => JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
package/types/radio-group.d.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChangeDetails, Orientation } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
declare function Group(props: PartComponentProps & {
|
|
5
|
+
orientation?: Orientation;
|
|
6
|
+
onSizesChange?: (sizes: number[], details: ChangeDetails) => void;
|
|
7
|
+
keyboardStep?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
id?: string;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
declare function Panel(props: PartComponentProps & {
|
|
12
|
+
defaultSize?: number;
|
|
13
|
+
minSize?: number;
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
declare function Handle(props: PartComponentProps & {
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}): JSX.Element;
|
|
19
|
+
export declare const Resizable: {
|
|
20
|
+
Group: typeof Group;
|
|
21
|
+
Panel: typeof Panel;
|
|
22
|
+
Handle: typeof Handle;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
package/types/runtime.d.ts
CHANGED
|
@@ -24,6 +24,24 @@ export declare function Part(props: PartComponentProps & {
|
|
|
24
24
|
part: CorePart;
|
|
25
25
|
tag: string;
|
|
26
26
|
}): JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Its children as children of `target`, an element drawn elsewhere: with no element of its own
|
|
29
|
+
* around them (Solid's `Portal` adds one), so the page is the same as on the other adapters.
|
|
30
|
+
*/
|
|
31
|
+
export declare function Into(props: {
|
|
32
|
+
target: HTMLElement;
|
|
33
|
+
children?: JSX.Element;
|
|
34
|
+
}): JSX.Element;
|
|
35
|
+
export interface PortalProviderProps {
|
|
36
|
+
/** Where the popups inside are drawn; the end of `<body>` while it is not given. */
|
|
37
|
+
container?: HTMLElement | null | undefined;
|
|
38
|
+
children?: JSX.Element;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Says where every popup inside it is drawn, the popups those open included: an element of
|
|
42
|
+
* the page (a shadow root's host, a full-screen element) in place of `<body>`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function PortalProvider(props: PortalProviderProps): JSX.Element;
|
|
27
45
|
/** Its children in a container at the end of the page, while `mounted`. */
|
|
28
46
|
export declare function Portal(props: {
|
|
29
47
|
mounted: ReadonlySignal<boolean>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Orientation } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
declare function Root(props: PartComponentProps): JSX.Element;
|
|
5
|
+
/** `orientation` is which way it scrolls (`vertical` by default). */
|
|
6
|
+
declare function Scrollbar(props: PartComponentProps & {
|
|
7
|
+
orientation?: Orientation;
|
|
8
|
+
keepMounted?: boolean;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
declare function Thumb(props: PartComponentProps): JSX.Element;
|
|
11
|
+
declare function Corner(props: PartComponentProps): JSX.Element;
|
|
12
|
+
export declare const ScrollArea: {
|
|
13
|
+
Root: typeof Root;
|
|
14
|
+
Viewport: (props: PartComponentProps) => JSX.Element;
|
|
15
|
+
Content: (props: PartComponentProps) => JSX.Element;
|
|
16
|
+
Scrollbar: typeof Scrollbar;
|
|
17
|
+
Thumb: typeof Thumb;
|
|
18
|
+
Corner: typeof Corner;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
package/types/select.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { SelectProps } from "@kirana-ui/core/select";
|
|
2
3
|
import type { JSX } from "solid-js";
|
|
3
4
|
import type { PositionerProps } from "./popover.tsx";
|
|
4
5
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
@@ -12,15 +13,23 @@ export type RootProps = {
|
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
required?: boolean;
|
|
14
15
|
name?: string;
|
|
16
|
+
form?: string;
|
|
15
17
|
items?: readonly {
|
|
16
18
|
value: unknown;
|
|
17
19
|
label: string;
|
|
18
20
|
}[];
|
|
21
|
+
virtualized?: SelectProps["virtualized"];
|
|
19
22
|
id?: string;
|
|
20
23
|
children?: JSX.Element;
|
|
21
24
|
};
|
|
22
25
|
declare function Root(props: RootProps): JSX.Element;
|
|
23
|
-
|
|
26
|
+
/**
|
|
27
|
+
* `alignItemWithTrigger`: the list opens over its trigger, the chosen item's text on the
|
|
28
|
+
* trigger's own, where there is room and unless a finger opened it.
|
|
29
|
+
*/
|
|
30
|
+
declare function Positioner(props: PositionerProps & {
|
|
31
|
+
alignItemWithTrigger?: boolean;
|
|
32
|
+
}): JSX.Element;
|
|
24
33
|
/** Shows the chosen value's label, or `placeholder` while nothing is chosen. */
|
|
25
34
|
declare function Value(props: PartComponentProps & {
|
|
26
35
|
placeholder?: string;
|
|
@@ -30,10 +39,15 @@ declare function Item(props: PartComponentProps & {
|
|
|
30
39
|
value: unknown;
|
|
31
40
|
disabled?: boolean;
|
|
32
41
|
label?: string;
|
|
42
|
+
index?: number;
|
|
33
43
|
}): JSX.Element;
|
|
34
44
|
declare function ItemIndicator(props: PartComponentProps & {
|
|
35
45
|
keepMounted?: boolean;
|
|
36
46
|
}): JSX.Element;
|
|
47
|
+
/** Items that belong together, named by their `<Select.GroupLabel>`. */
|
|
48
|
+
declare function Group(props: PartComponentProps & {
|
|
49
|
+
id?: string;
|
|
50
|
+
}): JSX.Element;
|
|
37
51
|
export declare const Select: {
|
|
38
52
|
Root: typeof Root;
|
|
39
53
|
Portal: (props: {
|
|
@@ -46,5 +60,15 @@ export declare const Select: {
|
|
|
46
60
|
ItemIndicator: typeof ItemIndicator;
|
|
47
61
|
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
48
62
|
Popup: (props: PartComponentProps) => JSX.Element;
|
|
63
|
+
/** The items' own box inside the popup, when the popup also holds scroll arrows. */
|
|
64
|
+
List: (props: PartComponentProps) => JSX.Element;
|
|
65
|
+
/** In the page while there is more of the list above: it scrolls it under a moving pointer. */
|
|
66
|
+
ScrollUpArrow: (props: PartComponentProps) => JSX.Element;
|
|
67
|
+
/** In the page while there is more of the list below. */
|
|
68
|
+
ScrollDownArrow: (props: PartComponentProps) => JSX.Element;
|
|
69
|
+
Group: typeof Group;
|
|
70
|
+
GroupLabel: (props: PartComponentProps) => JSX.Element;
|
|
71
|
+
/** A line between groups. */
|
|
72
|
+
Separator: (props: PartComponentProps) => JSX.Element;
|
|
49
73
|
};
|
|
50
74
|
export {};
|