@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/command.d.ts
CHANGED
|
@@ -1,41 +1,51 @@
|
|
|
1
|
-
import type { ChangeDetails } from "@kirana-ui/core";
|
|
1
|
+
import type { ChangeDetails, StateOf } from "@kirana-ui/core";
|
|
2
2
|
import type { CommandProps } from "@kirana-ui/core/command";
|
|
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["command"];
|
|
7
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, {
|
|
6
8
|
inputValue?: string;
|
|
7
9
|
defaultInputValue?: string;
|
|
8
10
|
onInputValueChange?: (value: string, details: ChangeDetails) => void;
|
|
11
|
+
/** An item was chosen. It takes the place of the element's own `select` event. */
|
|
9
12
|
onSelect?: (value: string, details: ChangeDetails) => void;
|
|
10
13
|
filter?: CommandProps["filter"];
|
|
11
14
|
loop?: boolean;
|
|
12
15
|
disabled?: boolean;
|
|
13
16
|
id?: string;
|
|
14
|
-
}
|
|
17
|
+
}>;
|
|
15
18
|
declare function Root(props: RootProps): JSX.Element;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
export type InputProps = PartComponentProps<"input", StateOf<Parts["input"]>>;
|
|
20
|
+
export type ListProps = PartComponentProps<"div", StateOf<Parts["list"]>>;
|
|
21
|
+
export type EmptyProps = PartComponentProps<"div", StateOf<Parts["empty"]>>;
|
|
22
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>, {
|
|
20
23
|
id?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
declare function Item(props: PartComponentProps & {
|
|
24
|
+
}>;
|
|
25
|
+
export type GroupHeadingProps = PartComponentProps<"div", StateOf<Parts["groupHeading"]>>;
|
|
26
|
+
export type ItemProps = PartComponentProps<"div", StateOf<Parts["item"]>, {
|
|
25
27
|
value: string;
|
|
26
28
|
disabled?: boolean;
|
|
27
29
|
label?: string;
|
|
28
30
|
keywords?: readonly string[];
|
|
29
31
|
id?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
declare function Separator(props: PartComponentProps & {
|
|
32
|
+
}>;
|
|
33
|
+
export type SeparatorProps = PartComponentProps<"div", StateOf<Parts["separator"]>, {
|
|
33
34
|
alwaysRender?: boolean;
|
|
34
|
-
}
|
|
35
|
+
}>;
|
|
36
|
+
/** Drawn while no item is shown for what was typed. */
|
|
37
|
+
declare function Empty(props: EmptyProps): JSX.Element;
|
|
38
|
+
/** Items under a `<Command.GroupHeading>`. Hidden while none of them is shown. */
|
|
39
|
+
declare function Group(props: GroupProps): JSX.Element;
|
|
40
|
+
declare function GroupHeading(props: GroupHeadingProps): JSX.Element;
|
|
41
|
+
/** `label` is what is filtered, the item's text when left out; `keywords` are other words for it. */
|
|
42
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
43
|
+
/** A line between groups: gone while something is typed, unless `alwaysRender`. */
|
|
44
|
+
declare function Separator(props: SeparatorProps): JSX.Element;
|
|
35
45
|
export declare const Command: {
|
|
36
46
|
Root: typeof Root;
|
|
37
|
-
Input: (props:
|
|
38
|
-
List: (props:
|
|
47
|
+
Input: (props: InputProps) => JSX.Element;
|
|
48
|
+
List: (props: ListProps) => JSX.Element;
|
|
39
49
|
Empty: typeof Empty;
|
|
40
50
|
Group: typeof Group;
|
|
41
51
|
GroupHeading: typeof GroupHeading;
|
package/types/context-menu.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { ContextMenu } from "./menu.tsx";
|
|
2
|
+
export type { ArrowProps, CheckboxItemIndicatorProps, CheckboxItemProps, ContextRootProps as RootProps, ContextTriggerProps as TriggerProps, GroupLabelProps, GroupProps, ItemProps, LinkItemProps, PopupProps, PortalProps, PositionerProps, RadioGroupProps, RadioItemIndicatorProps, RadioItemProps, SeparatorProps, SubmenuRootProps, SubmenuTriggerProps, } from "./menu.tsx";
|
package/types/date-field.d.ts
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { DateField as Controller, DateFieldProps, DateFieldSegment } from "@kirana-ui/core/date-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";
|
|
6
|
+
type Parts = Vocabulary["dateField"];
|
|
7
|
+
/**
|
|
8
|
+
* The date field its parts are inside. Exported for a component that is made of one (a date picker
|
|
9
|
+
* provides its own to the date field's parts).
|
|
10
|
+
*/
|
|
4
11
|
declare const Context: import("solid-js").Context<Controller | undefined>;
|
|
5
12
|
/** For a component made of this one's parts: a date picker. */
|
|
6
13
|
export { Context as DateFieldContext };
|
|
7
|
-
|
|
14
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<DateFieldProps, "id"> & {
|
|
8
15
|
id?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
}>;
|
|
17
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
18
|
+
export type SegmentsProps = {
|
|
12
19
|
children: (segment: DateFieldSegment) => JSX.Element;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
declare function
|
|
20
|
+
};
|
|
21
|
+
/** Draws its child once for each piece of the date, in the locale's order. */
|
|
22
|
+
declare function Segments(props: SegmentsProps): JSX.Element;
|
|
23
|
+
export type SegmentProps = PartComponentProps<"span", StateOf<Parts["segment"]>, {
|
|
16
24
|
segment: DateFieldSegment;
|
|
17
|
-
}
|
|
25
|
+
}>;
|
|
26
|
+
/** One piece: a part that is typed, or what stands between two. It writes its own text. */
|
|
27
|
+
declare function Segment(props: SegmentProps): JSX.Element;
|
|
28
|
+
export type InputProps = PartComponentProps<"input", StateOf<Parts["input"]>>;
|
|
18
29
|
export declare const DateField: {
|
|
19
30
|
Root: typeof Root;
|
|
20
31
|
Segments: typeof Segments;
|
|
21
32
|
Segment: typeof Segment;
|
|
22
|
-
Input: (props:
|
|
33
|
+
Input: (props: InputProps) => JSX.Element;
|
|
23
34
|
};
|
package/types/date-picker.d.ts
CHANGED
|
@@ -1,49 +1,40 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { DatePickerProps } from "@kirana-ui/core/date-picker";
|
|
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";
|
|
6
|
+
type Parts = Vocabulary["datePicker"];
|
|
7
|
+
export type { CellProps, DayProps, GridProps, HeadCellProps, HeadingProps, NextProps, PreviousProps, WeekdaysProps, WeeksProps, } from "./calendar.tsx";
|
|
8
|
+
export type { InputProps, SegmentProps, SegmentsProps } from "./date-field.tsx";
|
|
9
|
+
export type { PopupProps, PortalProps, PositionerProps, TriggerProps } from "./popover.tsx";
|
|
4
10
|
export type RootProps = Omit<DatePickerProps, "id"> & {
|
|
5
11
|
id?: string;
|
|
6
12
|
children?: JSX.Element;
|
|
7
13
|
};
|
|
8
14
|
/** A date field, and a calendar in a popover, with one value between them. It draws nothing. */
|
|
9
15
|
declare function Root(props: RootProps): JSX.Element;
|
|
16
|
+
export type FieldProps = PartComponentProps<"div", StateOf<Parts["field"]>>;
|
|
17
|
+
export type CalendarProps = PartComponentProps<"div", StateOf<Parts["calendar"]>>;
|
|
10
18
|
export declare const DatePicker: {
|
|
11
19
|
Root: typeof Root;
|
|
12
20
|
/** The typed date: what holds its segments and its hidden input. */
|
|
13
|
-
Field: (props:
|
|
14
|
-
Segments: (props:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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;
|
|
21
|
+
Field: (props: FieldProps) => JSX.Element;
|
|
22
|
+
Segments: (props: import("./date-field.tsx").SegmentsProps) => JSX.Element;
|
|
23
|
+
Segment: (props: import("./date-field.tsx").SegmentProps) => JSX.Element;
|
|
24
|
+
Input: (props: import("./date-field.tsx").InputProps) => JSX.Element;
|
|
25
|
+
Trigger: (props: import("./popover.tsx").TriggerProps) => JSX.Element;
|
|
26
|
+
Portal: (props: import("./popover.tsx").PortalProps) => JSX.Element;
|
|
25
27
|
Positioner: (props: import("./popover.tsx").PositionerProps) => JSX.Element;
|
|
26
|
-
Popup: (props:
|
|
28
|
+
Popup: (props: import("./popover.tsx").PopupProps) => JSX.Element;
|
|
27
29
|
/** The calendar: what holds its heading, its buttons and its grid. */
|
|
28
|
-
Calendar: (props:
|
|
29
|
-
Heading: (props:
|
|
30
|
-
Previous: (props:
|
|
31
|
-
Next: (props:
|
|
32
|
-
Grid: (props:
|
|
33
|
-
Weekdays: (props:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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;
|
|
30
|
+
Calendar: (props: CalendarProps) => JSX.Element;
|
|
31
|
+
Heading: (props: import("./calendar.tsx").HeadingProps) => JSX.Element;
|
|
32
|
+
Previous: (props: import("./calendar.tsx").PreviousProps) => JSX.Element;
|
|
33
|
+
Next: (props: import("./calendar.tsx").NextProps) => JSX.Element;
|
|
34
|
+
Grid: (props: import("./calendar.tsx").GridProps) => JSX.Element;
|
|
35
|
+
Weekdays: (props: import("./calendar.tsx").WeekdaysProps) => JSX.Element;
|
|
36
|
+
HeadCell: (props: import("./calendar.tsx").HeadCellProps) => JSX.Element;
|
|
37
|
+
Weeks: (props: import("./calendar.tsx").WeeksProps) => JSX.Element;
|
|
38
|
+
Cell: (props: import("./calendar.tsx").CellProps) => JSX.Element;
|
|
39
|
+
Day: (props: import("./calendar.tsx").DayProps) => JSX.Element;
|
|
48
40
|
};
|
|
49
|
-
export {};
|
package/types/dialog.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { ChangeDetails } from "@kirana-ui/core";
|
|
1
|
+
import type { ChangeDetails, StateOf } from "@kirana-ui/core";
|
|
2
2
|
import type { DrawerSide, DrawerSnapPoint } from "@kirana-ui/core/drawer";
|
|
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["dialog"];
|
|
7
|
+
type DrawerParts = Vocabulary["drawer"];
|
|
5
8
|
export type RootProps = {
|
|
6
9
|
open?: boolean;
|
|
7
10
|
defaultOpen?: boolean;
|
|
@@ -12,50 +15,58 @@ export type RootProps = {
|
|
|
12
15
|
children?: JSX.Element;
|
|
13
16
|
};
|
|
14
17
|
declare function Root(props: RootProps): JSX.Element;
|
|
15
|
-
|
|
18
|
+
export type PortalProps = {
|
|
19
|
+
children?: JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>>;
|
|
22
|
+
export type BackdropProps = PartComponentProps<"div", StateOf<Parts["backdrop"]>>;
|
|
23
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
24
|
+
export type TitleProps = PartComponentProps<"h2", StateOf<Parts["title"]>>;
|
|
25
|
+
export type DescriptionProps = PartComponentProps<"p", StateOf<Parts["description"]>>;
|
|
26
|
+
export type CloseProps = PartComponentProps<"button", StateOf<Parts["close"]>>;
|
|
27
|
+
export type AlertRootProps = Omit<RootProps, "modal" | "dismissible">;
|
|
28
|
+
declare function AlertRoot(props: AlertRootProps): JSX.Element;
|
|
16
29
|
export declare const Dialog: {
|
|
17
30
|
Root: typeof Root;
|
|
18
|
-
Portal: (props:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Description: (props: PartComponentProps) => JSX.Element;
|
|
26
|
-
Close: (props: PartComponentProps) => JSX.Element;
|
|
31
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
32
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
33
|
+
Backdrop: (props: BackdropProps) => JSX.Element;
|
|
34
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
35
|
+
Title: (props: TitleProps) => JSX.Element;
|
|
36
|
+
Description: (props: DescriptionProps) => JSX.Element;
|
|
37
|
+
Close: (props: CloseProps) => JSX.Element;
|
|
27
38
|
};
|
|
28
39
|
/** A dialog that asks for an answer: a press outside it does not close it. Its parts are a dialog's. */
|
|
29
40
|
export declare const AlertDialog: {
|
|
30
41
|
Root: typeof AlertRoot;
|
|
31
|
-
Portal: (props:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Description: (props: PartComponentProps) => JSX.Element;
|
|
39
|
-
Close: (props: PartComponentProps) => JSX.Element;
|
|
42
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
43
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
44
|
+
Backdrop: (props: BackdropProps) => JSX.Element;
|
|
45
|
+
Popup: (props: PopupProps) => JSX.Element;
|
|
46
|
+
Title: (props: TitleProps) => JSX.Element;
|
|
47
|
+
Description: (props: DescriptionProps) => JSX.Element;
|
|
48
|
+
Close: (props: CloseProps) => JSX.Element;
|
|
40
49
|
};
|
|
41
|
-
|
|
50
|
+
export type DrawerRootProps = RootProps & {
|
|
42
51
|
swipeDirection?: DrawerSide;
|
|
43
52
|
snapPoints?: readonly DrawerSnapPoint[];
|
|
44
53
|
snapPoint?: DrawerSnapPoint;
|
|
45
54
|
defaultSnapPoint?: DrawerSnapPoint;
|
|
46
55
|
onSnapPointChange?: (snapPoint: DrawerSnapPoint, details: ChangeDetails) => void;
|
|
47
|
-
}
|
|
56
|
+
};
|
|
57
|
+
declare function DrawerRoot(props: DrawerRootProps): JSX.Element;
|
|
58
|
+
/** A drawer's backdrop and popup say more than a dialog's: how they are being dragged. */
|
|
59
|
+
export type DrawerBackdropProps = PartComponentProps<"div", StateOf<DrawerParts["backdrop"]>>;
|
|
60
|
+
export type DrawerPopupProps = PartComponentProps<"div", StateOf<DrawerParts["popup"]>>;
|
|
48
61
|
/** A dialog that comes from an edge and is dragged back to it. Its parts are a dialog's. */
|
|
49
62
|
export declare const Drawer: {
|
|
50
63
|
Root: typeof DrawerRoot;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Trigger: (props:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Description: (props: PartComponentProps) => JSX.Element;
|
|
59
|
-
Close: (props: PartComponentProps) => JSX.Element;
|
|
64
|
+
Backdrop: (props: DrawerBackdropProps) => JSX.Element;
|
|
65
|
+
Popup: (props: DrawerPopupProps) => JSX.Element;
|
|
66
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
67
|
+
Trigger: (props: TriggerProps) => JSX.Element;
|
|
68
|
+
Title: (props: TitleProps) => JSX.Element;
|
|
69
|
+
Description: (props: DescriptionProps) => JSX.Element;
|
|
70
|
+
Close: (props: CloseProps) => JSX.Element;
|
|
60
71
|
};
|
|
61
72
|
export {};
|
package/types/direction.d.ts
CHANGED
package/types/drawer.d.ts
CHANGED
package/types/field.d.ts
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { FieldProps, FieldValidity, ValidityKey } from "@kirana-ui/core/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["field"];
|
|
7
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<FieldProps, "id"> & {
|
|
5
8
|
id?: string;
|
|
6
|
-
}
|
|
9
|
+
}>;
|
|
7
10
|
declare function Root(props: RootProps): JSX.Element;
|
|
11
|
+
export type ErrorProps = PartComponentProps<"div", StateOf<Parts["error"]>, {
|
|
12
|
+
match?: ValidityKey | boolean;
|
|
13
|
+
}>;
|
|
8
14
|
/**
|
|
9
15
|
* What is wrong, or its children in its place. In the page while it applies. `match` is one of
|
|
10
16
|
* the browser's findings (`"valueMissing"`) to show for only that, or `true` to show always.
|
|
11
17
|
*/
|
|
12
|
-
declare function FieldError(props:
|
|
13
|
-
|
|
14
|
-
}): JSX.Element;
|
|
15
|
-
/** Draws nothing itself: its child, a function, is given the field's validity. */
|
|
16
|
-
declare function Validity(props: {
|
|
18
|
+
declare function FieldError(props: ErrorProps): JSX.Element;
|
|
19
|
+
export type ValidityProps = {
|
|
17
20
|
children: (validity: () => FieldValidity) => JSX.Element;
|
|
18
|
-
}
|
|
21
|
+
};
|
|
22
|
+
/** Draws nothing itself: its child, a function, is given the field's validity. */
|
|
23
|
+
declare function Validity(props: ValidityProps): JSX.Element;
|
|
24
|
+
export type LabelProps = PartComponentProps<"label", StateOf<Parts["label"]>>;
|
|
25
|
+
export type ControlProps = PartComponentProps<"input", StateOf<Parts["control"]>>;
|
|
26
|
+
export type DescriptionProps = PartComponentProps<"p", StateOf<Parts["description"]>>;
|
|
19
27
|
export declare const Field: {
|
|
20
28
|
Root: typeof Root;
|
|
21
|
-
Label: (props:
|
|
29
|
+
Label: (props: LabelProps) => JSX.Element;
|
|
22
30
|
/** An `<input>`; `as="textarea"` or `as="select"` for another. */
|
|
23
|
-
Control: (props:
|
|
24
|
-
Description: (props:
|
|
31
|
+
Control: (props: ControlProps) => JSX.Element;
|
|
32
|
+
Description: (props: DescriptionProps) => JSX.Element;
|
|
25
33
|
Error: typeof FieldError;
|
|
26
34
|
Validity: typeof Validity;
|
|
27
35
|
};
|
package/types/fieldset.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
1
2
|
import type { Fieldset as Controller } from "@kirana-ui/core/fieldset";
|
|
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
|
/** The fieldset a field is in, if it is in one. */
|
|
5
7
|
export declare const FieldsetContext: import("solid-js").Context<Controller | undefined>;
|
|
6
|
-
|
|
8
|
+
type Parts = Vocabulary["fieldset"];
|
|
9
|
+
export type RootProps = PartComponentProps<"fieldset", StateOf<Parts["root"]>, {
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
id?: string;
|
|
9
|
-
}
|
|
12
|
+
}>;
|
|
13
|
+
declare function Root(props: RootProps): JSX.Element;
|
|
14
|
+
export type LegendProps = PartComponentProps<"div", StateOf<Parts["legend"]>>;
|
|
10
15
|
export declare const Fieldset: {
|
|
11
16
|
Root: typeof Root;
|
|
12
|
-
Legend: (props:
|
|
17
|
+
Legend: (props: LegendProps) => JSX.Element;
|
|
13
18
|
};
|
|
14
19
|
export {};
|
package/types/form.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Form as Controller, FormProps as CoreProps } from "@kirana-ui/core/form";
|
|
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
|
/** The form a field is in, if it is in one. */
|
|
5
7
|
export declare const FormContext: import("solid-js").Context<Controller | undefined>;
|
|
8
|
+
export type FormProps = PartComponentProps<"form", StateOf<Vocabulary["form"]["root"]>, CoreProps>;
|
|
6
9
|
/** A `<form>` whose fields say what is wrong; `onFormSubmit` takes the values once all are valid. */
|
|
7
|
-
export declare function Form(props:
|
|
10
|
+
export declare function Form(props: FormProps): JSX.Element;
|
package/types/hover-card.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
3
|
+
import type { TriggerOptions } from "./hover-popup.tsx";
|
|
4
|
+
import type { PositionerOptions } from "./popover.tsx";
|
|
5
|
+
import type { PartComponentProps } from "./runtime.tsx";
|
|
6
|
+
type Parts = Vocabulary["hoverCard"];
|
|
7
|
+
export type { PortalProps, RootProps } from "./hover-popup.tsx";
|
|
8
|
+
export type TriggerProps = PartComponentProps<"a", StateOf<Parts["trigger"]>, TriggerOptions>;
|
|
9
|
+
export type PositionerProps = PartComponentProps<"div", StateOf<Parts["positioner"]>, PositionerOptions>;
|
|
10
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
11
|
+
export type ArrowProps = PartComponentProps<"div", StateOf<Parts["arrow"]>>;
|
|
1
12
|
export declare const HoverCard: {
|
|
2
13
|
Root: (props: import("./hover-popup.tsx").RootProps) => import("solid-js").JSX.Element;
|
|
3
|
-
Portal: (props:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
14
|
+
Portal: (props: import("./hover-popup.tsx").PortalProps) => import("solid-js").JSX.Element;
|
|
15
|
+
Positioner: (props: PositionerProps) => import("solid-js").JSX.Element;
|
|
16
|
+
Trigger: (props: TriggerProps) => import("solid-js").JSX.Element;
|
|
17
|
+
Popup: (props: PopupProps) => import("solid-js").JSX.Element;
|
|
18
|
+
Arrow: (props: ArrowProps) => import("solid-js").JSX.Element;
|
|
13
19
|
};
|
package/types/hover-popup.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ChangeDetails, ReadonlySignal } from "@kirana-ui/core";
|
|
2
2
|
import type { HoverPopup, HoverPopupProps } from "@kirana-ui/core/tooltip";
|
|
3
3
|
import type { JSX } from "solid-js";
|
|
4
|
-
import type {
|
|
5
|
-
import type { PartComponentProps } from "./runtime.tsx";
|
|
4
|
+
import type { PositionerOptions } from "./popover.tsx";
|
|
6
5
|
export type RootProps = {
|
|
7
6
|
open?: boolean;
|
|
8
7
|
defaultOpen?: boolean;
|
|
@@ -13,17 +12,28 @@ export type RootProps = {
|
|
|
13
12
|
id?: string;
|
|
14
13
|
children?: JSX.Element;
|
|
15
14
|
};
|
|
15
|
+
export type PortalProps = {
|
|
16
|
+
children?: JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
/** A trigger's own props: `delay` and `closeDelay` here come before the root's. */
|
|
19
|
+
export type TriggerOptions = {
|
|
20
|
+
delay?: number;
|
|
21
|
+
closeDelay?: number;
|
|
22
|
+
};
|
|
23
|
+
/** The props of each part that draws an element, as the component's entry names them. */
|
|
24
|
+
type PartsProps = {
|
|
25
|
+
Trigger: TriggerOptions;
|
|
26
|
+
Positioner: PositionerOptions;
|
|
27
|
+
Popup: Record<string, unknown>;
|
|
28
|
+
Arrow: Record<string, unknown>;
|
|
29
|
+
};
|
|
16
30
|
/** 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): {
|
|
31
|
+
export declare function hoverPopup<Props extends PartsProps>(name: string, create: (props: ReadonlySignal<HoverPopupProps>) => HoverPopup, triggerTag: string): {
|
|
18
32
|
Root: (props: RootProps) => JSX.Element;
|
|
19
|
-
Portal: (props:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
delay?: number;
|
|
25
|
-
closeDelay?: number;
|
|
26
|
-
}) => JSX.Element;
|
|
27
|
-
Popup: (props: PartComponentProps) => JSX.Element;
|
|
28
|
-
Arrow: (props: PartComponentProps) => JSX.Element;
|
|
33
|
+
Portal: (props: PortalProps) => JSX.Element;
|
|
34
|
+
Positioner: (props: Props["Positioner"]) => JSX.Element;
|
|
35
|
+
Trigger: (props: Props["Trigger"]) => JSX.Element;
|
|
36
|
+
Popup: (props: Props["Popup"]) => JSX.Element;
|
|
37
|
+
Arrow: (props: Props["Arrow"]) => JSX.Element;
|
|
29
38
|
};
|
|
39
|
+
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { QrCode } from "./qr-code.tsx";
|
|
|
23
23
|
export { Autosize } from "./autosize.tsx";
|
|
24
24
|
export { Carousel } from "./carousel.tsx";
|
|
25
25
|
export { Toast, createToaster } from "./toast.tsx";
|
|
26
|
+
export type { ToastActionOptions, ToastContent, ToastOptions, ToastRecord, ToastState, Toaster, ToasterOptions, } from "./toast.tsx";
|
|
26
27
|
export { Resizable } from "./resizable.tsx";
|
|
27
28
|
export { Popover } from "./popover.tsx";
|
|
28
29
|
export { RadioGroup } from "./radio-group.tsx";
|
|
@@ -30,7 +31,7 @@ export { Select } from "./select.tsx";
|
|
|
30
31
|
export { Switch } from "./switch.tsx";
|
|
31
32
|
export { Tabs } from "./tabs.tsx";
|
|
32
33
|
export { Tooltip } from "./tooltip.tsx";
|
|
33
|
-
export type { PartComponentProps } from "./runtime.tsx";
|
|
34
|
+
export type { PartComponentProps, PartEvent, PartTag } from "./runtime.tsx";
|
|
34
35
|
export { Avatar } from "./avatar.tsx";
|
|
35
36
|
export { Button } from "./button.tsx";
|
|
36
37
|
export { Meter } from "./meter.tsx";
|
|
@@ -48,3 +49,13 @@ export { DirectionProvider, useDirection } from "./direction.tsx";
|
|
|
48
49
|
export type { DirectionProviderProps } from "./direction.tsx";
|
|
49
50
|
export { PortalProvider } from "./runtime.tsx";
|
|
50
51
|
export type { PortalProviderProps } from "./runtime.tsx";
|
|
52
|
+
export type { Align, Anchor, AnchorOption, Bindable, ChangeDetails, ChangeSource, ComponentDefinition, Direction, ItemLabels, ListCollection, Orientation, Part, PartDefinition, PartProps, PartState, PartStyle, PhysicalSide, PositionOptions, ReadonlySignal, Side, Signal, StateDefinition, StateOf, } from "@kirana-ui/core";
|
|
53
|
+
export type { CalendarDay, CalendarValue, CalendarWeekday, DateRange, IsoDate, } from "@kirana-ui/core/calendar";
|
|
54
|
+
export type { DateFieldSegment, DateUnit } from "@kirana-ui/core/date-field";
|
|
55
|
+
export type { DrawerSide, DrawerSnapPoint } from "@kirana-ui/core/drawer";
|
|
56
|
+
export type { FieldValidity, ValidityKey } from "@kirana-ui/core/field";
|
|
57
|
+
export type { FormErrors, FormValues, ValidationMode } from "@kirana-ui/core/form";
|
|
58
|
+
export type { PaginationEntry } from "@kirana-ui/core/pagination";
|
|
59
|
+
export type { QrCorrection } from "@kirana-ui/core/qr-code";
|
|
60
|
+
export type { SelectShown } from "@kirana-ui/core/select";
|
|
61
|
+
export type { SliderChangeDetails, SliderTold } from "@kirana-ui/core/slider";
|
package/types/input.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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
|
-
export type InputProps = PartComponentProps
|
|
5
|
+
export type InputProps = PartComponentProps<"input", StateOf<Vocabulary["input"]["input"]>, {
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
onValueChange?: (value: string, details: ChangeDetails) => void;
|
|
7
|
-
}
|
|
8
|
+
}>;
|
|
8
9
|
/**
|
|
9
10
|
* An `<input>`; `as="textarea"` for a text area. It takes what an `<input>` takes, and inside
|
|
10
11
|
* a `<Field.Root>` it is the field's control.
|
package/types/label.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
|
+
import type { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
1
3
|
import type { JSX } from "solid-js";
|
|
2
4
|
import type { PartComponentProps } from "./runtime.tsx";
|
|
5
|
+
export type LabelProps = PartComponentProps<"label", StateOf<Vocabulary["label"]["label"]>>;
|
|
3
6
|
/** A `<label>`. Inside a `<Field.Root>` it is the field's label. */
|
|
4
|
-
export declare function Label(props:
|
|
7
|
+
export declare function Label(props: LabelProps): JSX.Element;
|
package/types/listbox.d.ts
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StateOf } from "@kirana-ui/core";
|
|
2
2
|
import type { ListboxProps } from "@kirana-ui/core/listbox";
|
|
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
|
-
|
|
7
|
-
|
|
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"];
|
|
6
|
+
type Parts = Vocabulary["listbox"];
|
|
7
|
+
/** `Value` is what an item's `value` is: the root's `value` holds the chosen ones. */
|
|
8
|
+
export type RootProps<Value = unknown> = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<ListboxProps<Value>, "id"> & {
|
|
15
9
|
id?: string;
|
|
16
|
-
}
|
|
17
|
-
declare function Root(props: RootProps): JSX.Element;
|
|
18
|
-
|
|
10
|
+
}>;
|
|
11
|
+
declare function Root<Value = unknown>(props: RootProps<Value>): JSX.Element;
|
|
12
|
+
export type ItemProps = PartComponentProps<"div", StateOf<Parts["item"]>, {
|
|
19
13
|
value: unknown;
|
|
20
14
|
disabled?: boolean;
|
|
21
15
|
label?: string;
|
|
22
16
|
index?: number;
|
|
23
|
-
}
|
|
24
|
-
declare function
|
|
17
|
+
}>;
|
|
18
|
+
declare function Item(props: ItemProps): JSX.Element;
|
|
19
|
+
export type ItemIndicatorProps = PartComponentProps<"span", StateOf<Parts["itemIndicator"]>, {
|
|
25
20
|
keepMounted?: boolean;
|
|
26
|
-
}
|
|
27
|
-
declare function
|
|
21
|
+
}>;
|
|
22
|
+
declare function ItemIndicator(props: ItemIndicatorProps): JSX.Element;
|
|
23
|
+
export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>, {
|
|
28
24
|
id?: string;
|
|
29
|
-
}
|
|
30
|
-
declare function
|
|
25
|
+
}>;
|
|
26
|
+
declare function Group(props: GroupProps): JSX.Element;
|
|
27
|
+
export type GroupLabelProps = PartComponentProps<"div", StateOf<Parts["groupLabel"]>>;
|
|
28
|
+
declare function GroupLabel(props: GroupLabelProps): JSX.Element;
|
|
31
29
|
export declare const Listbox: {
|
|
32
30
|
Root: typeof Root;
|
|
33
31
|
Item: typeof Item;
|