@kirana-ui/solid 0.0.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/LICENSE +1 -1
- package/dom/accordion.js +106 -0
- package/dom/alert-dialog.js +2 -0
- package/dom/autocomplete.js +2 -0
- package/dom/autosize.js +19 -0
- package/dom/avatar.js +68 -0
- package/dom/button.js +18 -0
- package/dom/calendar.js +141 -0
- package/dom/carousel.js +83 -0
- package/dom/checkbox.js +77 -0
- package/dom/collapsible.js +64 -0
- 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 +101 -0
- package/dom/direction-context.js +3 -0
- package/dom/direction.js +27 -0
- package/dom/drawer.js +2 -0
- package/dom/field-context.js +3 -0
- package/dom/field.js +88 -0
- package/dom/fieldset.js +41 -0
- package/dom/form.js +29 -0
- package/dom/hover-card.js +3 -0
- package/dom/hover-popup.js +78 -0
- package/dom/index.js +47 -0
- 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/meter.js +3 -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 +70 -0
- package/dom/progress.js +3 -0
- package/dom/qr-code.js +48 -0
- package/dom/radio-group.js +101 -0
- package/dom/resizable.js +65 -0
- package/dom/runtime.js +133 -0
- package/dom/scroll-area.js +99 -0
- package/dom/select.js +213 -0
- package/dom/separator.js +17 -0
- package/dom/slider.js +93 -0
- package/dom/switch.js +63 -0
- package/dom/tabs.js +97 -0
- package/dom/toast.js +113 -0
- package/dom/toggle-group.js +37 -0
- package/dom/toggle.js +28 -0
- package/dom/toolbar-context.js +5 -0
- package/dom/toolbar.js +71 -0
- package/dom/tooltip.js +3 -0
- package/dom/value-bar.js +62 -0
- package/llms.txt +1838 -0
- package/package.json +437 -6
- package/server/accordion.js +106 -0
- package/server/alert-dialog.js +2 -0
- package/server/autocomplete.js +2 -0
- package/server/autosize.js +19 -0
- package/server/avatar.js +68 -0
- package/server/button.js +18 -0
- package/server/calendar.js +140 -0
- package/server/carousel.js +83 -0
- package/server/checkbox.js +77 -0
- package/server/collapsible.js +64 -0
- 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 +101 -0
- package/server/direction-context.js +3 -0
- package/server/direction.js +27 -0
- package/server/drawer.js +2 -0
- package/server/field-context.js +3 -0
- package/server/field.js +87 -0
- package/server/fieldset.js +41 -0
- package/server/form.js +29 -0
- package/server/hover-card.js +3 -0
- package/server/hover-popup.js +78 -0
- package/server/index.js +47 -0
- 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/meter.js +3 -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 +70 -0
- package/server/progress.js +3 -0
- package/server/qr-code.js +48 -0
- package/server/radio-group.js +101 -0
- package/server/resizable.js +65 -0
- package/server/runtime.js +132 -0
- package/server/scroll-area.js +99 -0
- package/server/select.js +213 -0
- package/server/separator.js +17 -0
- package/server/slider.js +92 -0
- package/server/switch.js +62 -0
- package/server/tabs.js +97 -0
- package/server/toast.js +113 -0
- package/server/toggle-group.js +37 -0
- package/server/toggle.js +28 -0
- package/server/toolbar-context.js +5 -0
- package/server/toolbar.js +71 -0
- package/server/tooltip.js +3 -0
- package/server/value-bar.js +61 -0
- package/src/accordion.jsx +68 -0
- package/src/alert-dialog.js +2 -0
- package/src/autocomplete.jsx +2 -0
- package/src/autosize.jsx +8 -0
- package/src/avatar.jsx +35 -0
- package/src/button.jsx +9 -0
- package/src/calendar.jsx +104 -0
- package/src/carousel.jsx +51 -0
- package/src/checkbox.jsx +59 -0
- package/src/collapsible.jsx +35 -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 +67 -0
- package/src/direction-context.js +3 -0
- package/src/direction.jsx +17 -0
- package/src/drawer.js +2 -0
- package/src/field-context.js +3 -0
- package/src/field.jsx +64 -0
- package/src/fieldset.jsx +24 -0
- package/src/form.jsx +26 -0
- package/src/hover-card.jsx +3 -0
- package/src/hover-popup.jsx +48 -0
- package/src/index.js +47 -0
- 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/meter.jsx +3 -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 +51 -0
- package/src/progress.jsx +3 -0
- package/src/qr-code.jsx +25 -0
- package/src/radio-group.jsx +68 -0
- package/src/resizable.jsx +46 -0
- package/src/runtime.jsx +119 -0
- package/src/scroll-area.jsx +53 -0
- package/src/select.jsx +129 -0
- package/src/separator.jsx +8 -0
- package/src/slider.jsx +76 -0
- package/src/switch.jsx +49 -0
- package/src/tabs.jsx +58 -0
- package/src/toast.jsx +58 -0
- package/src/toggle-group.jsx +32 -0
- package/src/toggle.jsx +24 -0
- package/src/toolbar-context.js +5 -0
- package/src/toolbar.jsx +43 -0
- package/src/tooltip.jsx +3 -0
- package/src/value-bar.jsx +45 -0
- package/types/accordion.d.ts +30 -0
- package/types/alert-dialog.d.ts +1 -0
- package/types/autocomplete.d.ts +1 -0
- package/types/autosize.d.ts +8 -0
- package/types/avatar.d.ts +15 -0
- package/types/button.d.ts +9 -0
- package/types/calendar.d.ts +40 -0
- package/types/carousel.d.ts +26 -0
- package/types/checkbox.d.ts +26 -0
- package/types/collapsible.d.ts +21 -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 +61 -0
- package/types/direction-context.d.ts +3 -0
- package/types/direction.d.ts +14 -0
- package/types/drawer.d.ts +1 -0
- package/types/field-context.d.ts +3 -0
- package/types/field.d.ts +28 -0
- package/types/fieldset.d.ts +14 -0
- package/types/form.d.ts +7 -0
- package/types/hover-card.d.ts +13 -0
- package/types/hover-popup.d.ts +29 -0
- package/types/index.d.ts +50 -0
- 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/meter.d.ts +9 -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 +31 -0
- package/types/progress.d.ts +9 -0
- package/types/qr-code.d.ts +14 -0
- package/types/radio-group.d.ts +29 -0
- package/types/resizable.d.ts +24 -0
- package/types/runtime.d.ts +49 -0
- package/types/scroll-area.d.ts +20 -0
- package/types/select.d.ts +74 -0
- package/types/separator.d.ts +6 -0
- package/types/slider.d.ts +24 -0
- package/types/switch.d.ts +21 -0
- package/types/tabs.d.ts +32 -0
- package/types/toast.d.ts +33 -0
- package/types/toggle-group.d.ts +14 -0
- package/types/toggle.d.ts +12 -0
- package/types/toolbar-context.d.ts +6 -0
- package/types/toolbar.d.ts +23 -0
- package/types/tooltip.d.ts +13 -0
- package/types/value-bar.d.ts +17 -0
- package/README.md +0 -7
- package/index.js +0 -5
|
@@ -0,0 +1,26 @@
|
|
|
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 Root(props: PartComponentProps & {
|
|
5
|
+
index?: number;
|
|
6
|
+
defaultIndex?: number;
|
|
7
|
+
onIndexChange?: (index: number, details: ChangeDetails) => void;
|
|
8
|
+
orientation?: Orientation;
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
id?: string;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
declare function Item(props: PartComponentProps & {
|
|
13
|
+
index: number;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
declare function Indicator(props: PartComponentProps & {
|
|
16
|
+
index: number;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
export declare const Carousel: {
|
|
19
|
+
Root: typeof Root;
|
|
20
|
+
Viewport: (props: PartComponentProps) => JSX.Element;
|
|
21
|
+
Item: typeof Item;
|
|
22
|
+
Previous: (props: PartComponentProps) => JSX.Element;
|
|
23
|
+
Next: (props: PartComponentProps) => JSX.Element;
|
|
24
|
+
Indicator: typeof Indicator;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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 RootProps = PartComponentProps & {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onCheckedChange?: (checked: boolean, details: ChangeDetails) => void;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
form?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
18
|
+
/** `keepMounted` keeps the mark in the page while the box is unchecked. */
|
|
19
|
+
declare function Indicator(props: PartComponentProps & {
|
|
20
|
+
keepMounted?: boolean;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
export declare const Checkbox: {
|
|
23
|
+
Root: typeof Root;
|
|
24
|
+
Indicator: typeof Indicator;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
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 RootProps = PartComponentProps & {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean, details: ChangeDetails) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
id?: string;
|
|
10
|
+
};
|
|
11
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
12
|
+
/** `keepMounted` keeps the closed panel in the page, `hidden`. */
|
|
13
|
+
declare function Panel(props: PartComponentProps & {
|
|
14
|
+
keepMounted?: boolean;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
export declare const Collapsible: {
|
|
17
|
+
Root: typeof Root;
|
|
18
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
19
|
+
Panel: typeof Panel;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { AutocompleteProps } from "@kirana-ui/core/autocomplete";
|
|
3
|
+
import type { ComboboxProps } from "@kirana-ui/core/combobox";
|
|
4
|
+
import type { JSX } from "solid-js";
|
|
5
|
+
import type { PositionerProps } from "./popover.tsx";
|
|
6
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
7
|
+
export type RootProps = {
|
|
8
|
+
value?: unknown;
|
|
9
|
+
defaultValue?: unknown;
|
|
10
|
+
onValueChange?: (value: unknown, details: ChangeDetails) => void;
|
|
11
|
+
inputValue?: string;
|
|
12
|
+
defaultInputValue?: string;
|
|
13
|
+
onInputValueChange?: (value: string, details: ChangeDetails) => void;
|
|
14
|
+
open?: boolean;
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean, details: ChangeDetails) => void;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
values?: readonly unknown[];
|
|
21
|
+
defaultValues?: readonly unknown[];
|
|
22
|
+
onValuesChange?: (values: unknown[], details: ChangeDetails) => void;
|
|
23
|
+
inline?: boolean;
|
|
24
|
+
virtualized?: ComboboxProps["virtualized"];
|
|
25
|
+
name?: string;
|
|
26
|
+
form?: string;
|
|
27
|
+
items?: readonly {
|
|
28
|
+
value: unknown;
|
|
29
|
+
label: string;
|
|
30
|
+
}[];
|
|
31
|
+
filter?: ((label: string, query: string) => boolean) | null;
|
|
32
|
+
id?: string;
|
|
33
|
+
children?: JSX.Element;
|
|
34
|
+
};
|
|
35
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
36
|
+
declare function Positioner(props: PositionerProps): JSX.Element;
|
|
37
|
+
/** `label` is what is filtered and what the input shows; the item's text when left out. */
|
|
38
|
+
declare function Item(props: PartComponentProps & {
|
|
39
|
+
value: unknown;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
label?: string;
|
|
42
|
+
id?: string;
|
|
43
|
+
index?: number;
|
|
44
|
+
}): JSX.Element;
|
|
45
|
+
declare function ItemIndicator(props: PartComponentProps & {
|
|
46
|
+
keepMounted?: boolean;
|
|
47
|
+
}): JSX.Element;
|
|
48
|
+
/** A button that empties the input and the value. Drawn while there is something to clear. */
|
|
49
|
+
declare function Clear(props: PartComponentProps & {
|
|
50
|
+
keepMounted?: boolean;
|
|
51
|
+
}): JSX.Element;
|
|
52
|
+
/** With `multiple`: one chosen value. Its `value` is what its remove button takes away. */
|
|
53
|
+
declare function Chip(props: PartComponentProps & {
|
|
54
|
+
value: unknown;
|
|
55
|
+
}): JSX.Element;
|
|
56
|
+
/** Drawn while no item is shown for what was typed. */
|
|
57
|
+
declare function Empty(props: PartComponentProps): JSX.Element;
|
|
58
|
+
/** Items that belong together, named by their `GroupLabel`. Hidden while none is shown. */
|
|
59
|
+
declare function Group(props: PartComponentProps & {
|
|
60
|
+
id?: string;
|
|
61
|
+
}): JSX.Element;
|
|
62
|
+
export type AutocompleteRootProps = Omit<AutocompleteProps, "id"> & {
|
|
63
|
+
id?: string;
|
|
64
|
+
children?: JSX.Element;
|
|
65
|
+
};
|
|
66
|
+
/** A combobox whose text is the value: the list only suggests. */
|
|
67
|
+
declare function AutocompleteRoot(props: AutocompleteRootProps): JSX.Element;
|
|
68
|
+
export declare const Combobox: {
|
|
69
|
+
Root: typeof Root;
|
|
70
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
71
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
72
|
+
Clear: typeof Clear;
|
|
73
|
+
/** With `multiple`: what holds the chips and the input. */
|
|
74
|
+
Chips: (props: PartComponentProps) => JSX.Element;
|
|
75
|
+
Chip: typeof Chip;
|
|
76
|
+
ChipRemove: (props: PartComponentProps) => JSX.Element;
|
|
77
|
+
Portal: (props: {
|
|
78
|
+
children?: JSX.Element;
|
|
79
|
+
}) => JSX.Element;
|
|
80
|
+
Positioner: typeof Positioner;
|
|
81
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
82
|
+
Group: typeof Group;
|
|
83
|
+
GroupLabel: (props: PartComponentProps) => JSX.Element;
|
|
84
|
+
/** A line between groups. */
|
|
85
|
+
Separator: (props: PartComponentProps) => JSX.Element;
|
|
86
|
+
Item: typeof Item;
|
|
87
|
+
ItemIndicator: typeof ItemIndicator;
|
|
88
|
+
Empty: typeof Empty;
|
|
89
|
+
};
|
|
90
|
+
export declare const Autocomplete: {
|
|
91
|
+
Root: typeof AutocompleteRoot;
|
|
92
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
93
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
94
|
+
Clear: typeof Clear;
|
|
95
|
+
Portal: (props: {
|
|
96
|
+
children?: JSX.Element;
|
|
97
|
+
}) => JSX.Element;
|
|
98
|
+
Positioner: typeof Positioner;
|
|
99
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
100
|
+
Group: typeof Group;
|
|
101
|
+
GroupLabel: (props: PartComponentProps) => JSX.Element;
|
|
102
|
+
Separator: (props: PartComponentProps) => JSX.Element;
|
|
103
|
+
Item: typeof Item;
|
|
104
|
+
Empty: typeof Empty;
|
|
105
|
+
};
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { CommandProps } from "@kirana-ui/core/command";
|
|
3
|
+
import type { JSX } from "solid-js";
|
|
4
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
export type RootProps = PartComponentProps & {
|
|
6
|
+
inputValue?: string;
|
|
7
|
+
defaultInputValue?: string;
|
|
8
|
+
onInputValueChange?: (value: string, details: ChangeDetails) => void;
|
|
9
|
+
onSelect?: (value: string, details: ChangeDetails) => void;
|
|
10
|
+
filter?: CommandProps["filter"];
|
|
11
|
+
loop?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
id?: string;
|
|
14
|
+
};
|
|
15
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
16
|
+
/** Drawn while no item is shown for what was typed. */
|
|
17
|
+
declare function Empty(props: PartComponentProps): JSX.Element;
|
|
18
|
+
/** Items under a `<Command.GroupHeading>`. Hidden while none of them is shown. */
|
|
19
|
+
declare function Group(props: PartComponentProps & {
|
|
20
|
+
id?: string;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
declare function GroupHeading(props: PartComponentProps): JSX.Element;
|
|
23
|
+
/** `label` is what is filtered, the item's text when left out; `keywords` are other words for it. */
|
|
24
|
+
declare function Item(props: PartComponentProps & {
|
|
25
|
+
value: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
label?: string;
|
|
28
|
+
keywords?: readonly string[];
|
|
29
|
+
id?: string;
|
|
30
|
+
}): JSX.Element;
|
|
31
|
+
/** A line between groups: gone while something is typed, unless `alwaysRender`. */
|
|
32
|
+
declare function Separator(props: PartComponentProps & {
|
|
33
|
+
alwaysRender?: boolean;
|
|
34
|
+
}): JSX.Element;
|
|
35
|
+
export declare const Command: {
|
|
36
|
+
Root: typeof Root;
|
|
37
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
38
|
+
List: (props: PartComponentProps) => JSX.Element;
|
|
39
|
+
Empty: typeof Empty;
|
|
40
|
+
Group: typeof Group;
|
|
41
|
+
GroupHeading: typeof GroupHeading;
|
|
42
|
+
Item: typeof Item;
|
|
43
|
+
Separator: typeof Separator;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ContextMenu } from "./menu.tsx";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DateField as Controller, DateFieldProps, DateFieldSegment } from "@kirana-ui/core/date-field";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
declare const Context: import("solid-js").Context<Controller | undefined>;
|
|
5
|
+
/** For a component made of this one's parts: a date picker. */
|
|
6
|
+
export { Context as DateFieldContext };
|
|
7
|
+
declare function Root(props: PartComponentProps & Omit<DateFieldProps, "id"> & {
|
|
8
|
+
id?: string;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
/** Draws its child once for each piece of the date, in the locale's order. */
|
|
11
|
+
declare function Segments(props: {
|
|
12
|
+
children: (segment: DateFieldSegment) => JSX.Element;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
/** One piece: a part that is typed, or what stands between two. It writes its own text. */
|
|
15
|
+
declare function Segment(props: PartComponentProps & {
|
|
16
|
+
segment: DateFieldSegment;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
export declare const DateField: {
|
|
19
|
+
Root: typeof Root;
|
|
20
|
+
Segments: typeof Segments;
|
|
21
|
+
Segment: typeof Segment;
|
|
22
|
+
Input: (props: PartComponentProps) => JSX.Element;
|
|
23
|
+
};
|
|
@@ -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 {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@kirana-ui/core";
|
|
2
|
+
import type { DrawerSide, DrawerSnapPoint } from "@kirana-ui/core/drawer";
|
|
3
|
+
import type { JSX } from "solid-js";
|
|
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
|
+
modal?: boolean;
|
|
10
|
+
dismissible?: boolean;
|
|
11
|
+
id?: string;
|
|
12
|
+
children?: JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
15
|
+
declare function AlertRoot(props: Omit<RootProps, "modal" | "dismissible">): JSX.Element;
|
|
16
|
+
export declare const Dialog: {
|
|
17
|
+
Root: typeof Root;
|
|
18
|
+
Portal: (props: {
|
|
19
|
+
children?: JSX.Element;
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
22
|
+
Backdrop: (props: PartComponentProps) => JSX.Element;
|
|
23
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
24
|
+
Title: (props: PartComponentProps) => JSX.Element;
|
|
25
|
+
Description: (props: PartComponentProps) => JSX.Element;
|
|
26
|
+
Close: (props: PartComponentProps) => JSX.Element;
|
|
27
|
+
};
|
|
28
|
+
/** A dialog that asks for an answer: a press outside it does not close it. Its parts are a dialog's. */
|
|
29
|
+
export declare const AlertDialog: {
|
|
30
|
+
Root: typeof AlertRoot;
|
|
31
|
+
Portal: (props: {
|
|
32
|
+
children?: JSX.Element;
|
|
33
|
+
}) => JSX.Element;
|
|
34
|
+
Trigger: (props: PartComponentProps) => JSX.Element;
|
|
35
|
+
Backdrop: (props: PartComponentProps) => JSX.Element;
|
|
36
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
37
|
+
Title: (props: PartComponentProps) => JSX.Element;
|
|
38
|
+
Description: (props: PartComponentProps) => JSX.Element;
|
|
39
|
+
Close: (props: PartComponentProps) => JSX.Element;
|
|
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
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Direction } from "@kirana-ui/core";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
export interface DirectionProviderProps {
|
|
4
|
+
/** The reading direction of what is inside. `ltr` when left out. */
|
|
5
|
+
direction?: Direction;
|
|
6
|
+
children?: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* States the reading direction for the components inside. It draws nothing: set the page's own
|
|
10
|
+
* `dir` attribute with it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function DirectionProvider(props: DirectionProviderProps): JSX.Element;
|
|
13
|
+
/** The direction the nearest provider states; `ltr` outside one. */
|
|
14
|
+
export declare function useDirection(): () => Direction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Drawer } from "./dialog.tsx";
|
package/types/field.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FieldProps, FieldValidity, ValidityKey } from "@kirana-ui/core/field";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
export type RootProps = PartComponentProps & Omit<FieldProps, "id"> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* What is wrong, or its children in its place. In the page while it applies. `match` is one of
|
|
10
|
+
* the browser's findings (`"valueMissing"`) to show for only that, or `true` to show always.
|
|
11
|
+
*/
|
|
12
|
+
declare function FieldError(props: PartComponentProps & {
|
|
13
|
+
match?: ValidityKey | boolean;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
/** Draws nothing itself: its child, a function, is given the field's validity. */
|
|
16
|
+
declare function Validity(props: {
|
|
17
|
+
children: (validity: () => FieldValidity) => JSX.Element;
|
|
18
|
+
}): JSX.Element;
|
|
19
|
+
export declare const Field: {
|
|
20
|
+
Root: typeof Root;
|
|
21
|
+
Label: (props: PartComponentProps) => JSX.Element;
|
|
22
|
+
/** An `<input>`; `as="textarea"` or `as="select"` for another. */
|
|
23
|
+
Control: (props: PartComponentProps) => JSX.Element;
|
|
24
|
+
Description: (props: PartComponentProps) => JSX.Element;
|
|
25
|
+
Error: typeof FieldError;
|
|
26
|
+
Validity: typeof Validity;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Fieldset as Controller } from "@kirana-ui/core/fieldset";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
/** The fieldset a field is in, if it is in one. */
|
|
5
|
+
export declare const FieldsetContext: import("solid-js").Context<Controller | undefined>;
|
|
6
|
+
declare function Root(props: PartComponentProps & {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export declare const Fieldset: {
|
|
11
|
+
Root: typeof Root;
|
|
12
|
+
Legend: (props: PartComponentProps) => JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
package/types/form.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Form as Controller, FormProps } from "@kirana-ui/core/form";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
/** The form a field is in, if it is in one. */
|
|
5
|
+
export declare const FormContext: import("solid-js").Context<Controller | undefined>;
|
|
6
|
+
/** A `<form>` whose fields say what is wrong; `onFormSubmit` takes the values once all are valid. */
|
|
7
|
+
export declare function Form(props: PartComponentProps & FormProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const HoverCard: {
|
|
2
|
+
Root: (props: import("./hover-popup.tsx").RootProps) => import("solid-js").JSX.Element;
|
|
3
|
+
Portal: (props: {
|
|
4
|
+
children?: import("solid-js").JSX.Element;
|
|
5
|
+
}) => import("solid-js").JSX.Element;
|
|
6
|
+
Positioner: (props: import("./popover.tsx").PositionerProps) => import("solid-js").JSX.Element;
|
|
7
|
+
Trigger: (props: import("./runtime.tsx").PartComponentProps & {
|
|
8
|
+
delay?: number;
|
|
9
|
+
closeDelay?: number;
|
|
10
|
+
}) => import("solid-js").JSX.Element;
|
|
11
|
+
Popup: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
|
|
12
|
+
Arrow: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ChangeDetails, ReadonlySignal } from "@kirana-ui/core";
|
|
2
|
+
import type { HoverPopup, HoverPopupProps } from "@kirana-ui/core/tooltip";
|
|
3
|
+
import type { JSX } from "solid-js";
|
|
4
|
+
import type { PositionerProps } from "./popover.tsx";
|
|
5
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
6
|
+
export type RootProps = {
|
|
7
|
+
open?: boolean;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean, details: ChangeDetails) => void;
|
|
10
|
+
delay?: number;
|
|
11
|
+
closeDelay?: number;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
id?: string;
|
|
14
|
+
children?: JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
/** The parts of a popup the pointer opens: a tooltip's, a hover card's. */
|
|
17
|
+
export declare function hoverPopup(name: string, create: (props: ReadonlySignal<HoverPopupProps>) => HoverPopup, triggerTag: string): {
|
|
18
|
+
Root: (props: RootProps) => JSX.Element;
|
|
19
|
+
Portal: (props: {
|
|
20
|
+
children?: JSX.Element;
|
|
21
|
+
}) => JSX.Element;
|
|
22
|
+
Positioner: (props: PositionerProps) => JSX.Element;
|
|
23
|
+
Trigger: (props: PartComponentProps & {
|
|
24
|
+
delay?: number;
|
|
25
|
+
closeDelay?: number;
|
|
26
|
+
}) => JSX.Element;
|
|
27
|
+
Popup: (props: PartComponentProps) => JSX.Element;
|
|
28
|
+
Arrow: (props: PartComponentProps) => JSX.Element;
|
|
29
|
+
};
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export { Accordion } from "./accordion.tsx";
|
|
2
|
+
export { Checkbox } from "./checkbox.tsx";
|
|
3
|
+
export { Collapsible } from "./collapsible.tsx";
|
|
4
|
+
export { AlertDialog, Dialog, Drawer } from "./dialog.tsx";
|
|
5
|
+
export { MessageScroller } from "./message-scroller.tsx";
|
|
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";
|
|
27
|
+
export { Popover } from "./popover.tsx";
|
|
28
|
+
export { RadioGroup } from "./radio-group.tsx";
|
|
29
|
+
export { Select } from "./select.tsx";
|
|
30
|
+
export { Switch } from "./switch.tsx";
|
|
31
|
+
export { Tabs } from "./tabs.tsx";
|
|
32
|
+
export { Tooltip } from "./tooltip.tsx";
|
|
33
|
+
export type { PartComponentProps } from "./runtime.tsx";
|
|
34
|
+
export { Avatar } from "./avatar.tsx";
|
|
35
|
+
export { Button } from "./button.tsx";
|
|
36
|
+
export { Meter } from "./meter.tsx";
|
|
37
|
+
export { Progress } from "./progress.tsx";
|
|
38
|
+
export { Separator } from "./separator.tsx";
|
|
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";
|
|
43
|
+
export { Slider } from "./slider.tsx";
|
|
44
|
+
export { Field } from "./field.tsx";
|
|
45
|
+
export { Fieldset } from "./fieldset.tsx";
|
|
46
|
+
export { Form } from "./form.tsx";
|
|
47
|
+
export { DirectionProvider, useDirection } from "./direction.tsx";
|
|
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 {};
|