@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.
Files changed (233) hide show
  1. package/LICENSE +1 -1
  2. package/dom/accordion.js +106 -0
  3. package/dom/alert-dialog.js +2 -0
  4. package/dom/autocomplete.js +2 -0
  5. package/dom/autosize.js +19 -0
  6. package/dom/avatar.js +68 -0
  7. package/dom/button.js +18 -0
  8. package/dom/calendar.js +141 -0
  9. package/dom/carousel.js +83 -0
  10. package/dom/checkbox.js +77 -0
  11. package/dom/collapsible.js +64 -0
  12. package/dom/combobox.js +281 -0
  13. package/dom/command.js +129 -0
  14. package/dom/context-menu.js +2 -0
  15. package/dom/date-field.js +86 -0
  16. package/dom/date-picker.js +103 -0
  17. package/dom/dialog.js +101 -0
  18. package/dom/direction-context.js +3 -0
  19. package/dom/direction.js +27 -0
  20. package/dom/drawer.js +2 -0
  21. package/dom/field-context.js +3 -0
  22. package/dom/field.js +88 -0
  23. package/dom/fieldset.js +41 -0
  24. package/dom/form.js +29 -0
  25. package/dom/hover-card.js +3 -0
  26. package/dom/hover-popup.js +78 -0
  27. package/dom/index.js +47 -0
  28. package/dom/input.js +26 -0
  29. package/dom/label.js +18 -0
  30. package/dom/listbox.js +114 -0
  31. package/dom/menu.js +261 -0
  32. package/dom/menubar-context.js +3 -0
  33. package/dom/menubar.js +33 -0
  34. package/dom/message-scroller.js +56 -0
  35. package/dom/meter.js +3 -0
  36. package/dom/navigation-menu.js +150 -0
  37. package/dom/number-field.js +82 -0
  38. package/dom/otp.js +95 -0
  39. package/dom/pagination.js +74 -0
  40. package/dom/popover.js +70 -0
  41. package/dom/progress.js +3 -0
  42. package/dom/qr-code.js +48 -0
  43. package/dom/radio-group.js +101 -0
  44. package/dom/resizable.js +65 -0
  45. package/dom/runtime.js +133 -0
  46. package/dom/scroll-area.js +99 -0
  47. package/dom/select.js +213 -0
  48. package/dom/separator.js +17 -0
  49. package/dom/slider.js +93 -0
  50. package/dom/switch.js +63 -0
  51. package/dom/tabs.js +97 -0
  52. package/dom/toast.js +113 -0
  53. package/dom/toggle-group.js +37 -0
  54. package/dom/toggle.js +28 -0
  55. package/dom/toolbar-context.js +5 -0
  56. package/dom/toolbar.js +71 -0
  57. package/dom/tooltip.js +3 -0
  58. package/dom/value-bar.js +62 -0
  59. package/llms.txt +1838 -0
  60. package/package.json +437 -6
  61. package/server/accordion.js +106 -0
  62. package/server/alert-dialog.js +2 -0
  63. package/server/autocomplete.js +2 -0
  64. package/server/autosize.js +19 -0
  65. package/server/avatar.js +68 -0
  66. package/server/button.js +18 -0
  67. package/server/calendar.js +140 -0
  68. package/server/carousel.js +83 -0
  69. package/server/checkbox.js +77 -0
  70. package/server/collapsible.js +64 -0
  71. package/server/combobox.js +281 -0
  72. package/server/command.js +129 -0
  73. package/server/context-menu.js +2 -0
  74. package/server/date-field.js +86 -0
  75. package/server/date-picker.js +103 -0
  76. package/server/dialog.js +101 -0
  77. package/server/direction-context.js +3 -0
  78. package/server/direction.js +27 -0
  79. package/server/drawer.js +2 -0
  80. package/server/field-context.js +3 -0
  81. package/server/field.js +87 -0
  82. package/server/fieldset.js +41 -0
  83. package/server/form.js +29 -0
  84. package/server/hover-card.js +3 -0
  85. package/server/hover-popup.js +78 -0
  86. package/server/index.js +47 -0
  87. package/server/input.js +26 -0
  88. package/server/label.js +18 -0
  89. package/server/listbox.js +114 -0
  90. package/server/menu.js +261 -0
  91. package/server/menubar-context.js +3 -0
  92. package/server/menubar.js +33 -0
  93. package/server/message-scroller.js +56 -0
  94. package/server/meter.js +3 -0
  95. package/server/navigation-menu.js +144 -0
  96. package/server/number-field.js +81 -0
  97. package/server/otp.js +94 -0
  98. package/server/pagination.js +74 -0
  99. package/server/popover.js +70 -0
  100. package/server/progress.js +3 -0
  101. package/server/qr-code.js +48 -0
  102. package/server/radio-group.js +101 -0
  103. package/server/resizable.js +65 -0
  104. package/server/runtime.js +132 -0
  105. package/server/scroll-area.js +99 -0
  106. package/server/select.js +213 -0
  107. package/server/separator.js +17 -0
  108. package/server/slider.js +92 -0
  109. package/server/switch.js +62 -0
  110. package/server/tabs.js +97 -0
  111. package/server/toast.js +113 -0
  112. package/server/toggle-group.js +37 -0
  113. package/server/toggle.js +28 -0
  114. package/server/toolbar-context.js +5 -0
  115. package/server/toolbar.js +71 -0
  116. package/server/tooltip.js +3 -0
  117. package/server/value-bar.js +61 -0
  118. package/src/accordion.jsx +68 -0
  119. package/src/alert-dialog.js +2 -0
  120. package/src/autocomplete.jsx +2 -0
  121. package/src/autosize.jsx +8 -0
  122. package/src/avatar.jsx +35 -0
  123. package/src/button.jsx +9 -0
  124. package/src/calendar.jsx +104 -0
  125. package/src/carousel.jsx +51 -0
  126. package/src/checkbox.jsx +59 -0
  127. package/src/collapsible.jsx +35 -0
  128. package/src/combobox.jsx +179 -0
  129. package/src/command.jsx +81 -0
  130. package/src/context-menu.js +2 -0
  131. package/src/date-field.jsx +67 -0
  132. package/src/date-picker.jsx +72 -0
  133. package/src/dialog.jsx +67 -0
  134. package/src/direction-context.js +3 -0
  135. package/src/direction.jsx +17 -0
  136. package/src/drawer.js +2 -0
  137. package/src/field-context.js +3 -0
  138. package/src/field.jsx +64 -0
  139. package/src/fieldset.jsx +24 -0
  140. package/src/form.jsx +26 -0
  141. package/src/hover-card.jsx +3 -0
  142. package/src/hover-popup.jsx +48 -0
  143. package/src/index.js +47 -0
  144. package/src/input.jsx +17 -0
  145. package/src/label.jsx +9 -0
  146. package/src/listbox.jsx +81 -0
  147. package/src/menu.jsx +164 -0
  148. package/src/menubar-context.js +3 -0
  149. package/src/menubar.jsx +21 -0
  150. package/src/message-scroller.jsx +27 -0
  151. package/src/meter.jsx +3 -0
  152. package/src/navigation-menu.jsx +95 -0
  153. package/src/number-field.jsx +75 -0
  154. package/src/otp.jsx +73 -0
  155. package/src/pagination.jsx +60 -0
  156. package/src/popover.jsx +51 -0
  157. package/src/progress.jsx +3 -0
  158. package/src/qr-code.jsx +25 -0
  159. package/src/radio-group.jsx +68 -0
  160. package/src/resizable.jsx +46 -0
  161. package/src/runtime.jsx +119 -0
  162. package/src/scroll-area.jsx +53 -0
  163. package/src/select.jsx +129 -0
  164. package/src/separator.jsx +8 -0
  165. package/src/slider.jsx +76 -0
  166. package/src/switch.jsx +49 -0
  167. package/src/tabs.jsx +58 -0
  168. package/src/toast.jsx +58 -0
  169. package/src/toggle-group.jsx +32 -0
  170. package/src/toggle.jsx +24 -0
  171. package/src/toolbar-context.js +5 -0
  172. package/src/toolbar.jsx +43 -0
  173. package/src/tooltip.jsx +3 -0
  174. package/src/value-bar.jsx +45 -0
  175. package/types/accordion.d.ts +30 -0
  176. package/types/alert-dialog.d.ts +1 -0
  177. package/types/autocomplete.d.ts +1 -0
  178. package/types/autosize.d.ts +8 -0
  179. package/types/avatar.d.ts +15 -0
  180. package/types/button.d.ts +9 -0
  181. package/types/calendar.d.ts +40 -0
  182. package/types/carousel.d.ts +26 -0
  183. package/types/checkbox.d.ts +26 -0
  184. package/types/collapsible.d.ts +21 -0
  185. package/types/combobox.d.ts +106 -0
  186. package/types/command.d.ts +45 -0
  187. package/types/context-menu.d.ts +1 -0
  188. package/types/date-field.d.ts +23 -0
  189. package/types/date-picker.d.ts +49 -0
  190. package/types/dialog.d.ts +61 -0
  191. package/types/direction-context.d.ts +3 -0
  192. package/types/direction.d.ts +14 -0
  193. package/types/drawer.d.ts +1 -0
  194. package/types/field-context.d.ts +3 -0
  195. package/types/field.d.ts +28 -0
  196. package/types/fieldset.d.ts +14 -0
  197. package/types/form.d.ts +7 -0
  198. package/types/hover-card.d.ts +13 -0
  199. package/types/hover-popup.d.ts +29 -0
  200. package/types/index.d.ts +50 -0
  201. package/types/input.d.ts +12 -0
  202. package/types/label.d.ts +4 -0
  203. package/types/listbox.d.ts +38 -0
  204. package/types/menu.d.ts +91 -0
  205. package/types/menubar-context.d.ts +3 -0
  206. package/types/menubar.d.ts +10 -0
  207. package/types/message-scroller.d.ts +16 -0
  208. package/types/meter.d.ts +9 -0
  209. package/types/navigation-menu.d.ts +44 -0
  210. package/types/number-field.d.ts +15 -0
  211. package/types/otp.d.ts +32 -0
  212. package/types/pagination.d.ts +23 -0
  213. package/types/popover.d.ts +31 -0
  214. package/types/progress.d.ts +9 -0
  215. package/types/qr-code.d.ts +14 -0
  216. package/types/radio-group.d.ts +29 -0
  217. package/types/resizable.d.ts +24 -0
  218. package/types/runtime.d.ts +49 -0
  219. package/types/scroll-area.d.ts +20 -0
  220. package/types/select.d.ts +74 -0
  221. package/types/separator.d.ts +6 -0
  222. package/types/slider.d.ts +24 -0
  223. package/types/switch.d.ts +21 -0
  224. package/types/tabs.d.ts +32 -0
  225. package/types/toast.d.ts +33 -0
  226. package/types/toggle-group.d.ts +14 -0
  227. package/types/toggle.d.ts +12 -0
  228. package/types/toolbar-context.d.ts +6 -0
  229. package/types/toolbar.d.ts +23 -0
  230. package/types/tooltip.d.ts +13 -0
  231. package/types/value-bar.d.ts +17 -0
  232. package/README.md +0 -7
  233. package/index.js +0 -5
@@ -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,3 @@
1
+ import type { Menubar } from "@kirana-ui/core/menubar";
2
+ /** The bar a menu is one of the menus of, if it is in one. */
3
+ export declare const MenubarContext: import("solid-js").Context<Menubar | null>;
@@ -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,9 @@
1
+ export declare const Meter: {
2
+ Root: (props: import("./value-bar.tsx").RootProps) => import("solid-js").JSX.Element;
3
+ Value: (props: Omit<import("./runtime.tsx").PartComponentProps, "children"> & {
4
+ children?: (text: () => string | undefined) => import("solid-js").JSX.Element;
5
+ }) => import("solid-js").JSX.Element;
6
+ Track: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
7
+ Indicator: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
8
+ Label: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
9
+ };
@@ -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 {};
@@ -0,0 +1,31 @@
1
+ import type { ChangeDetails, PositionOptions, Signal } from "@kirana-ui/core";
2
+ import type { Popover as Controller } from "@kirana-ui/core/popover";
3
+ import type { JSX } from "solid-js";
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 };
8
+ export type RootProps = {
9
+ open?: boolean;
10
+ defaultOpen?: boolean;
11
+ onOpenChange?: (open: boolean, details: ChangeDetails) => void;
12
+ id?: string;
13
+ children?: JSX.Element;
14
+ };
15
+ declare function Root(props: RootProps): JSX.Element;
16
+ export type PositionerProps = PartComponentProps & Partial<PositionOptions>;
17
+ /** A positioner's own props, written where its placement reads them, before its element attaches. */
18
+ export declare function positioned<P extends PositionerProps>(props: P, positioning: Signal<Partial<PositionOptions>>): PartComponentProps;
19
+ declare function Positioner(props: PositionerProps): JSX.Element;
20
+ export declare const Popover: {
21
+ Root: typeof Root;
22
+ Portal: (props: {
23
+ children?: JSX.Element;
24
+ }) => JSX.Element;
25
+ Positioner: typeof Positioner;
26
+ Trigger: (props: PartComponentProps) => JSX.Element;
27
+ Popup: (props: PartComponentProps) => JSX.Element;
28
+ Title: (props: PartComponentProps) => JSX.Element;
29
+ Description: (props: PartComponentProps) => JSX.Element;
30
+ Close: (props: PartComponentProps) => JSX.Element;
31
+ };
@@ -0,0 +1,9 @@
1
+ export declare const Progress: {
2
+ Root: (props: import("./value-bar.tsx").RootProps) => import("solid-js").JSX.Element;
3
+ Value: (props: Omit<import("./runtime.tsx").PartComponentProps, "children"> & {
4
+ children?: (text: () => string | undefined) => import("solid-js").JSX.Element;
5
+ }) => import("solid-js").JSX.Element;
6
+ Track: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
7
+ Indicator: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
8
+ Label: (props: import("./runtime.tsx").PartComponentProps) => import("solid-js").JSX.Element;
9
+ };
@@ -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 {};
@@ -0,0 +1,29 @@
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
+ value?: unknown;
6
+ defaultValue?: unknown;
7
+ onValueChange?: (value: unknown, details: ChangeDetails) => void;
8
+ disabled?: boolean;
9
+ readOnly?: boolean;
10
+ required?: boolean;
11
+ name?: string;
12
+ form?: string;
13
+ id?: string;
14
+ };
15
+ declare function Root(props: RootProps): JSX.Element;
16
+ declare function Item(props: PartComponentProps & {
17
+ value: unknown;
18
+ disabled?: boolean;
19
+ }): JSX.Element;
20
+ /** `keepMounted` keeps the mark in the page while its item is not the chosen one. */
21
+ declare function Indicator(props: PartComponentProps & {
22
+ keepMounted?: boolean;
23
+ }): JSX.Element;
24
+ export declare const RadioGroup: {
25
+ Root: typeof Root;
26
+ Item: typeof Item;
27
+ Indicator: typeof Indicator;
28
+ };
29
+ export {};
@@ -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 {};
@@ -0,0 +1,49 @@
1
+ import type { Part as CorePart, PartProps, ReadonlySignal } from "@kirana-ui/core";
2
+ import type { JSX } from "solid-js";
3
+ /** A core signal as a Solid accessor: tracked by whatever calls it. */
4
+ export declare function fromSignal<T>(source: ReadonlySignal<T>): () => T;
5
+ /** A core signal that follows Solid state: the core hears a changed prop before anything renders. */
6
+ export declare function toSignal<T extends Record<string, unknown>>(read: () => T): ReadonlySignal<T>;
7
+ /** A component's controller, made once, following its props. */
8
+ export declare function controller<P extends Record<string, unknown>, C extends {
9
+ mount(): () => void;
10
+ }>(create: (props: ReadonlySignal<P>) => C, read: () => P): C;
11
+ export type PartComponentProps = {
12
+ /** Renders the part as the caller's own element, which spreads the props it is given. */
13
+ render?: (props: () => PartProps) => JSX.Element;
14
+ /** Another tag for the part's element. */
15
+ as?: string;
16
+ children?: JSX.Element;
17
+ [attribute: string]: unknown;
18
+ };
19
+ /**
20
+ * A part's element (or the caller's, through `render`), with the caller's props merged under the
21
+ * part's and the part's DOM work attached once the element is in the page.
22
+ */
23
+ export declare function Part(props: PartComponentProps & {
24
+ part: CorePart;
25
+ tag: string;
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;
45
+ /** Its children in a container at the end of the page, while `mounted`. */
46
+ export declare function Portal(props: {
47
+ mounted: ReadonlySignal<boolean>;
48
+ children?: JSX.Element;
49
+ }): JSX.Element;
@@ -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 {};
@@ -0,0 +1,74 @@
1
+ import type { ChangeDetails } from "@kirana-ui/core";
2
+ import type { SelectProps } from "@kirana-ui/core/select";
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
+ value?: unknown;
8
+ defaultValue?: unknown;
9
+ onValueChange?: (value: unknown, details: ChangeDetails) => void;
10
+ open?: boolean;
11
+ defaultOpen?: boolean;
12
+ onOpenChange?: (open: boolean, details: ChangeDetails) => void;
13
+ disabled?: boolean;
14
+ required?: boolean;
15
+ name?: string;
16
+ form?: string;
17
+ items?: readonly {
18
+ value: unknown;
19
+ label: string;
20
+ }[];
21
+ virtualized?: SelectProps["virtualized"];
22
+ id?: string;
23
+ children?: JSX.Element;
24
+ };
25
+ declare function Root(props: RootProps): JSX.Element;
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;
33
+ /** Shows the chosen value's label, or `placeholder` while nothing is chosen. */
34
+ declare function Value(props: PartComponentProps & {
35
+ placeholder?: string;
36
+ }): JSX.Element;
37
+ /** `label` is what typeahead matches and the trigger shows; the item's text when left out. */
38
+ declare function Item(props: PartComponentProps & {
39
+ value: unknown;
40
+ disabled?: boolean;
41
+ label?: string;
42
+ index?: number;
43
+ }): JSX.Element;
44
+ declare function ItemIndicator(props: PartComponentProps & {
45
+ keepMounted?: boolean;
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;
51
+ export declare const Select: {
52
+ Root: typeof Root;
53
+ Portal: (props: {
54
+ children?: JSX.Element;
55
+ }) => JSX.Element;
56
+ Positioner: typeof Positioner;
57
+ Value: typeof Value;
58
+ Item: typeof Item;
59
+ ItemText: (props: PartComponentProps) => JSX.Element;
60
+ ItemIndicator: typeof ItemIndicator;
61
+ Trigger: (props: PartComponentProps) => JSX.Element;
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;
73
+ };
74
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { Orientation } from "@kirana-ui/core";
2
+ import type { JSX } from "solid-js";
3
+ import type { PartComponentProps } from "./runtime.tsx";
4
+ export declare function Separator(props: PartComponentProps & {
5
+ orientation?: Orientation;
6
+ }): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { SliderProps } from "@kirana-ui/core/slider";
2
+ import type { JSX } from "solid-js";
3
+ import type { PartComponentProps } from "./runtime.tsx";
4
+ export type RootProps = PartComponentProps & Omit<SliderProps, "id"> & {
5
+ id?: string;
6
+ };
7
+ declare function Root(props: RootProps): JSX.Element;
8
+ /** `index` is which value of a range the thumb is, from 0. */
9
+ declare function Thumb(props: PartComponentProps & {
10
+ index?: number;
11
+ }): JSX.Element;
12
+ /** The written value, or what its child, a function, makes of it and of the values. */
13
+ declare function Value(props: Omit<PartComponentProps, "children"> & {
14
+ children?: (text: () => string, values: () => readonly number[]) => JSX.Element;
15
+ }): JSX.Element;
16
+ export declare const Slider: {
17
+ Root: typeof Root;
18
+ Value: typeof Value;
19
+ Control: (props: PartComponentProps) => JSX.Element;
20
+ Track: (props: PartComponentProps) => JSX.Element;
21
+ Indicator: (props: PartComponentProps) => JSX.Element;
22
+ Thumb: typeof Thumb;
23
+ };
24
+ 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
+ checked?: boolean;
6
+ defaultChecked?: boolean;
7
+ onCheckedChange?: (checked: boolean, details: ChangeDetails) => void;
8
+ disabled?: boolean;
9
+ readOnly?: boolean;
10
+ required?: boolean;
11
+ name?: string;
12
+ form?: string;
13
+ value?: string;
14
+ id?: string;
15
+ };
16
+ declare function Root(props: RootProps): JSX.Element;
17
+ export declare const Switch: {
18
+ Root: typeof Root;
19
+ Thumb: (props: PartComponentProps) => JSX.Element;
20
+ };
21
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { ChangeDetails, Orientation } from "@kirana-ui/core";
2
+ import type { JSX } from "solid-js";
3
+ import type { PartComponentProps } from "./runtime.tsx";
4
+ export type RootProps = PartComponentProps & {
5
+ value?: unknown;
6
+ defaultValue?: unknown;
7
+ onValueChange?: (value: unknown, details: ChangeDetails) => void;
8
+ orientation?: Orientation;
9
+ id?: string;
10
+ };
11
+ declare function Root(props: RootProps): JSX.Element;
12
+ declare function List(props: PartComponentProps & {
13
+ activateOnFocus?: boolean;
14
+ loop?: boolean;
15
+ }): JSX.Element;
16
+ declare function Tab(props: PartComponentProps & {
17
+ value: unknown;
18
+ disabled?: boolean;
19
+ }): JSX.Element;
20
+ /** `keepMounted` keeps the panel in the page, `hidden`, while its tab is not the active one. */
21
+ declare function Panel(props: PartComponentProps & {
22
+ value: unknown;
23
+ keepMounted?: boolean;
24
+ }): JSX.Element;
25
+ export declare const Tabs: {
26
+ Root: typeof Root;
27
+ List: typeof List;
28
+ Tab: typeof Tab;
29
+ Indicator: (props: PartComponentProps) => JSX.Element;
30
+ Panel: typeof Panel;
31
+ };
32
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { ToastProps, ToastRecord, Toaster } from "@kirana-ui/core/toast";
2
+ import type { Accessor, JSX } from "solid-js";
3
+ import type { PartComponentProps } from "./runtime.tsx";
4
+ /** Where a toaster's toasts are drawn. Always in the page: put it once, near the root. */
5
+ declare function Viewport(props: PartComponentProps & {
6
+ toaster: Toaster;
7
+ label?: string;
8
+ hotkey?: string;
9
+ swipeDirection?: ToastProps["swipeDirection"];
10
+ id?: string;
11
+ }): JSX.Element;
12
+ /**
13
+ * Draws its child once for each toast, the newest first. The child is given the toast as an
14
+ * accessor: one that changes is the same toast, drawn again where it stands.
15
+ */
16
+ declare function List(props: {
17
+ children: (toast: Accessor<ToastRecord>) => JSX.Element;
18
+ }): JSX.Element;
19
+ declare function Root(props: PartComponentProps & {
20
+ toast: ToastRecord;
21
+ }): JSX.Element;
22
+ export declare const Toast: {
23
+ Viewport: typeof Viewport;
24
+ List: typeof List;
25
+ Root: typeof Root;
26
+ Content: (props: PartComponentProps) => JSX.Element;
27
+ Title: (props: PartComponentProps) => JSX.Element;
28
+ Description: (props: PartComponentProps) => JSX.Element;
29
+ Close: (props: PartComponentProps) => JSX.Element;
30
+ Action: (props: PartComponentProps) => JSX.Element;
31
+ };
32
+ export { createToaster } from "@kirana-ui/core/toast";
33
+ export type { ToastOptions, ToastRecord, Toaster } from "@kirana-ui/core/toast";
@@ -0,0 +1,14 @@
1
+ import type { ChangeDetails, Orientation } from "@kirana-ui/core";
2
+ import type { JSX } from "solid-js";
3
+ import type { PartComponentProps } from "./runtime.tsx";
4
+ export type ToggleGroupProps = PartComponentProps & {
5
+ value?: readonly unknown[];
6
+ defaultValue?: readonly unknown[];
7
+ onValueChange?: (value: unknown[], details: ChangeDetails) => void;
8
+ multiple?: boolean;
9
+ disabled?: boolean;
10
+ orientation?: Orientation;
11
+ loop?: boolean;
12
+ };
13
+ /** Toggles that are one control. Each `<Toggle value>` inside it is one of its toggles. */
14
+ export declare function ToggleGroup(props: ToggleGroupProps): JSX.Element;