@kirana-ui/solid 0.1.1 → 0.3.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.
Files changed (208) hide show
  1. package/dom/accordion.js +9 -6
  2. package/dom/agent.js +3 -0
  3. package/dom/autosize.js +1 -1
  4. package/dom/avatar.js +39 -14
  5. package/dom/button.js +1 -1
  6. package/dom/calendar.js +78 -19
  7. package/dom/carousel.js +6 -6
  8. package/dom/checkbox-group-context.js +3 -0
  9. package/dom/checkbox-group.js +38 -0
  10. package/dom/checkbox.js +9 -5
  11. package/dom/collapsible.js +3 -3
  12. package/dom/combobox.js +72 -14
  13. package/dom/command.js +10 -9
  14. package/dom/date-field.js +7 -3
  15. package/dom/date-picker.js +9 -3
  16. package/dom/dialog.js +13 -3
  17. package/dom/field.js +3 -3
  18. package/dom/fieldset.js +2 -2
  19. package/dom/form.js +1 -1
  20. package/dom/hover-popup.js +3 -3
  21. package/dom/index.js +1 -0
  22. package/dom/input.js +1 -1
  23. package/dom/label.js +1 -1
  24. package/dom/listbox.js +5 -5
  25. package/dom/menu.js +11 -11
  26. package/dom/menubar.js +1 -1
  27. package/dom/message-scroller.js +4 -4
  28. package/dom/navigation-menu.js +18 -21
  29. package/dom/number-field.js +39 -6
  30. package/dom/otp.js +6 -5
  31. package/dom/pagination.js +3 -3
  32. package/dom/popover.js +37 -8
  33. package/dom/primitive.js +92 -0
  34. package/dom/qr-code.js +3 -3
  35. package/dom/radio-group.js +7 -6
  36. package/dom/resizable.js +3 -3
  37. package/dom/runtime.js +23 -7
  38. package/dom/scroll-area.js +5 -5
  39. package/dom/select.js +26 -13
  40. package/dom/separator.js +1 -1
  41. package/dom/slider.js +11 -8
  42. package/dom/switch.js +3 -3
  43. package/dom/tabs.js +5 -5
  44. package/dom/testing.js +3 -0
  45. package/dom/toast.js +57 -20
  46. package/dom/toggle-group.js +1 -1
  47. package/dom/toggle.js +1 -1
  48. package/dom/toolbar.js +4 -4
  49. package/dom/value-bar.js +3 -3
  50. package/llms.txt +1846 -252
  51. package/package.json +34 -2
  52. package/server/accordion.js +9 -6
  53. package/server/agent.js +3 -0
  54. package/server/autosize.js +1 -1
  55. package/server/avatar.js +39 -14
  56. package/server/button.js +1 -1
  57. package/server/calendar.js +78 -19
  58. package/server/carousel.js +6 -6
  59. package/server/checkbox-group-context.js +3 -0
  60. package/server/checkbox-group.js +38 -0
  61. package/server/checkbox.js +9 -5
  62. package/server/collapsible.js +3 -3
  63. package/server/combobox.js +72 -14
  64. package/server/command.js +10 -9
  65. package/server/date-field.js +7 -3
  66. package/server/date-picker.js +9 -3
  67. package/server/dialog.js +13 -3
  68. package/server/field.js +3 -3
  69. package/server/fieldset.js +2 -2
  70. package/server/form.js +1 -1
  71. package/server/hover-popup.js +3 -3
  72. package/server/index.js +1 -0
  73. package/server/input.js +1 -1
  74. package/server/label.js +1 -1
  75. package/server/listbox.js +5 -5
  76. package/server/menu.js +11 -11
  77. package/server/menubar.js +1 -1
  78. package/server/message-scroller.js +4 -4
  79. package/server/navigation-menu.js +18 -15
  80. package/server/number-field.js +39 -6
  81. package/server/otp.js +6 -5
  82. package/server/pagination.js +3 -3
  83. package/server/popover.js +37 -8
  84. package/server/primitive.js +92 -0
  85. package/server/qr-code.js +3 -3
  86. package/server/radio-group.js +7 -6
  87. package/server/resizable.js +3 -3
  88. package/server/runtime.js +23 -7
  89. package/server/scroll-area.js +5 -5
  90. package/server/select.js +26 -13
  91. package/server/separator.js +1 -1
  92. package/server/slider.js +11 -8
  93. package/server/switch.js +3 -3
  94. package/server/tabs.js +5 -5
  95. package/server/testing.js +3 -0
  96. package/server/toast.js +57 -20
  97. package/server/toggle-group.js +1 -1
  98. package/server/toggle.js +1 -1
  99. package/server/toolbar.js +4 -4
  100. package/server/value-bar.js +3 -3
  101. package/skills/kirana-ui-primitives/SKILL.md +163 -0
  102. package/src/accordion.jsx +10 -7
  103. package/src/agent.js +3 -0
  104. package/src/autosize.jsx +1 -1
  105. package/src/avatar.jsx +17 -10
  106. package/src/button.jsx +1 -1
  107. package/src/calendar.jsx +72 -16
  108. package/src/carousel.jsx +6 -6
  109. package/src/checkbox-group-context.js +3 -0
  110. package/src/checkbox-group.jsx +33 -0
  111. package/src/checkbox.jsx +8 -4
  112. package/src/collapsible.jsx +3 -3
  113. package/src/combobox.jsx +70 -13
  114. package/src/command.jsx +10 -8
  115. package/src/date-field.jsx +7 -3
  116. package/src/date-picker.jsx +8 -2
  117. package/src/dialog.jsx +12 -2
  118. package/src/field.jsx +3 -3
  119. package/src/fieldset.jsx +2 -2
  120. package/src/form.jsx +1 -1
  121. package/src/hover-popup.jsx +3 -3
  122. package/src/index.js +1 -0
  123. package/src/input.jsx +1 -1
  124. package/src/label.jsx +1 -1
  125. package/src/listbox.jsx +6 -6
  126. package/src/menu.jsx +11 -11
  127. package/src/menubar.jsx +1 -1
  128. package/src/message-scroller.jsx +4 -4
  129. package/src/navigation-menu.jsx +14 -13
  130. package/src/number-field.jsx +26 -6
  131. package/src/otp.jsx +6 -4
  132. package/src/pagination.jsx +3 -3
  133. package/src/popover.jsx +35 -5
  134. package/src/primitive.jsx +81 -0
  135. package/src/qr-code.jsx +3 -3
  136. package/src/radio-group.jsx +7 -7
  137. package/src/resizable.jsx +3 -3
  138. package/src/runtime.jsx +21 -7
  139. package/src/scroll-area.jsx +5 -5
  140. package/src/select.jsx +29 -14
  141. package/src/separator.jsx +1 -1
  142. package/src/slider.jsx +12 -8
  143. package/src/switch.jsx +3 -3
  144. package/src/tabs.jsx +6 -6
  145. package/src/testing.js +3 -0
  146. package/src/toast.jsx +38 -10
  147. package/src/toggle-group.jsx +2 -2
  148. package/src/toggle.jsx +1 -1
  149. package/src/toolbar.jsx +4 -4
  150. package/src/value-bar.jsx +3 -3
  151. package/types/accordion.d.ts +21 -19
  152. package/types/agent.d.ts +1 -0
  153. package/types/alert-dialog.d.ts +1 -0
  154. package/types/autocomplete.d.ts +1 -0
  155. package/types/autosize.d.ts +4 -1
  156. package/types/avatar.d.ts +14 -6
  157. package/types/button.d.ts +4 -2
  158. package/types/calendar.d.ts +48 -19
  159. package/types/carousel.d.ts +18 -10
  160. package/types/checkbox-group-context.d.ts +3 -0
  161. package/types/checkbox-group.d.ts +13 -0
  162. package/types/checkbox.d.ts +10 -6
  163. package/types/collapsible.d.ts +11 -7
  164. package/types/combobox.d.ts +102 -64
  165. package/types/command.d.ts +29 -17
  166. package/types/context-menu.d.ts +1 -0
  167. package/types/date-field.d.ts +20 -9
  168. package/types/date-picker.d.ts +26 -34
  169. package/types/dialog.d.ts +47 -31
  170. package/types/direction.d.ts +1 -0
  171. package/types/drawer.d.ts +1 -0
  172. package/types/field.d.ts +19 -11
  173. package/types/fieldset.d.ts +8 -3
  174. package/types/form.d.ts +5 -2
  175. package/types/hover-card.d.ts +16 -10
  176. package/types/hover-popup.d.ts +23 -13
  177. package/types/index.d.ts +15 -1
  178. package/types/input.d.ts +4 -3
  179. package/types/label.d.ts +4 -1
  180. package/types/listbox.d.ts +18 -20
  181. package/types/menu.d.ts +56 -42
  182. package/types/menubar.d.ts +6 -4
  183. package/types/message-scroller.d.ts +12 -6
  184. package/types/meter.d.ts +16 -7
  185. package/types/navigation-menu.d.ts +35 -29
  186. package/types/number-field.d.ts +22 -7
  187. package/types/otp.d.ts +18 -10
  188. package/types/pagination.d.ts +18 -10
  189. package/types/popover.d.ts +52 -13
  190. package/types/primitive.d.ts +50 -0
  191. package/types/progress.d.ts +16 -7
  192. package/types/qr-code.d.ts +10 -4
  193. package/types/radio-group.d.ts +18 -17
  194. package/types/resizable.d.ts +12 -7
  195. package/types/runtime.d.ts +36 -12
  196. package/types/scroll-area.d.ts +17 -9
  197. package/types/select.d.ts +55 -46
  198. package/types/separator.d.ts +5 -3
  199. package/types/slider.d.ts +25 -13
  200. package/types/switch.d.ts +7 -4
  201. package/types/tabs.d.ts +20 -16
  202. package/types/testing.d.ts +1 -0
  203. package/types/toast.d.ts +40 -16
  204. package/types/toggle-group.d.ts +6 -11
  205. package/types/toggle.d.ts +4 -3
  206. package/types/toolbar.d.ts +19 -14
  207. package/types/tooltip.d.ts +16 -10
  208. package/types/value-bar.d.ts +21 -10
package/types/switch.d.ts CHANGED
@@ -1,7 +1,9 @@
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 RootProps = PartComponentProps & {
5
+ type Parts = Vocabulary["switch"];
6
+ export type RootProps = PartComponentProps<"span", StateOf<Parts["root"]>, {
5
7
  checked?: boolean;
6
8
  defaultChecked?: boolean;
7
9
  onCheckedChange?: (checked: boolean, details: ChangeDetails) => void;
@@ -12,10 +14,11 @@ export type RootProps = PartComponentProps & {
12
14
  form?: string;
13
15
  value?: string;
14
16
  id?: string;
15
- };
17
+ }>;
16
18
  declare function Root(props: RootProps): JSX.Element;
19
+ export type ThumbProps = PartComponentProps<"span", StateOf<Parts["thumb"]>>;
17
20
  export declare const Switch: {
18
21
  Root: typeof Root;
19
- Thumb: (props: PartComponentProps) => JSX.Element;
22
+ Thumb: (props: ThumbProps) => JSX.Element;
20
23
  };
21
24
  export {};
package/types/tabs.d.ts CHANGED
@@ -1,32 +1,36 @@
1
- import type { ChangeDetails, Orientation } from "@kirana-ui/core";
1
+ import type { StateOf } from "@kirana-ui/core";
2
+ import type { TabsProps } from "@kirana-ui/core/tabs";
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
- export type RootProps = PartComponentProps & {
5
- value?: unknown;
6
- defaultValue?: unknown;
7
- onValueChange?: (value: unknown, details: ChangeDetails) => void;
8
- orientation?: Orientation;
6
+ type Parts = Vocabulary["tabs"];
7
+ /** `Value` is what a tab's `value` is: the root's `value` holds the active one's. */
8
+ export type RootProps<Value = unknown> = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<TabsProps<Value>, "id"> & {
9
9
  id?: string;
10
- };
11
- declare function Root(props: RootProps): JSX.Element;
12
- declare function List(props: PartComponentProps & {
10
+ }>;
11
+ declare function Root<Value = unknown>(props: RootProps<Value>): JSX.Element;
12
+ export type ListProps = PartComponentProps<"div", StateOf<Parts["list"]>, {
13
13
  activateOnFocus?: boolean;
14
14
  loop?: boolean;
15
- }): JSX.Element;
16
- declare function Tab(props: PartComponentProps & {
15
+ }>;
16
+ declare function List(props: ListProps): JSX.Element;
17
+ export type TabProps = PartComponentProps<"button", StateOf<Parts["tab"]>, {
17
18
  value: unknown;
18
19
  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 & {
20
+ }>;
21
+ declare function Tab(props: TabProps): JSX.Element;
22
+ export type IndicatorProps = PartComponentProps<"span", StateOf<Parts["indicator"]>>;
23
+ export type PanelProps = PartComponentProps<"div", StateOf<Parts["panel"]>, {
22
24
  value: unknown;
23
25
  keepMounted?: boolean;
24
- }): JSX.Element;
26
+ }>;
27
+ /** `keepMounted` keeps the panel in the page, `hidden`, while its tab is not the active one. */
28
+ declare function Panel(props: PanelProps): JSX.Element;
25
29
  export declare const Tabs: {
26
30
  Root: typeof Root;
27
31
  List: typeof List;
28
32
  Tab: typeof Tab;
29
- Indicator: (props: PartComponentProps) => JSX.Element;
33
+ Indicator: (props: IndicatorProps) => JSX.Element;
30
34
  Panel: typeof Panel;
31
35
  };
32
36
  export {};
@@ -0,0 +1 @@
1
+ export * from "@kirana-ui/core/testing";
package/types/toast.d.ts CHANGED
@@ -1,33 +1,57 @@
1
- import type { ToastProps, ToastRecord, Toaster } from "@kirana-ui/core/toast";
1
+ import type * as Core from "@kirana-ui/core/toast";
2
+ import type { StateOf } from "@kirana-ui/core";
3
+ import type { Vocabulary } from "@kirana-ui/core/vocabulary";
2
4
  import type { Accessor, JSX } from "solid-js";
3
5
  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
+ /** What a toast's title, description and action's label may be here: anything Solid draws. */
7
+ export type ToastContent = JSX.Element;
8
+ export type ToastActionOptions<Content = JSX.Element> = Core.ToastActionOptions<Content>;
9
+ export type ToastOptions<Content = JSX.Element> = Core.ToastOptions<Content>;
10
+ export type ToastRecord<Content = JSX.Element> = Core.ToastRecord<Content>;
11
+ export type ToastState<Content = JSX.Element> = Core.ToastState<Content>;
12
+ export type Toaster<Content = JSX.Element> = Core.Toaster<Content>;
13
+ export type { ToasterOptions } from "@kirana-ui/core/toast";
14
+ /**
15
+ * The toasts of a page, made once, in a module: `toaster.add({ title })` from anywhere. A
16
+ * title, a description and an action's label are anything Solid draws, unless `Content` says
17
+ * otherwise.
18
+ */
19
+ export declare const createToaster: <Content = JSX.Element>(options?: Core.ToasterOptions) => Toaster<Content>;
20
+ type ToastProps = Core.ToastProps<JSX.Element>;
21
+ type Parts = Vocabulary["toast"];
22
+ export type ViewportProps = PartComponentProps<"div", StateOf<Parts["viewport"]>, {
6
23
  toaster: Toaster;
7
24
  label?: string;
8
25
  hotkey?: string;
9
26
  swipeDirection?: ToastProps["swipeDirection"];
10
27
  id?: string;
11
- }): JSX.Element;
28
+ }>;
29
+ /** Where a toaster's toasts are drawn. Always in the page: put it once, near the root. */
30
+ declare function Viewport(props: ViewportProps): JSX.Element;
31
+ export type ListProps = {
32
+ children: (toast: Accessor<ToastRecord>) => JSX.Element;
33
+ };
12
34
  /**
13
35
  * Draws its child once for each toast, the newest first. The child is given the toast as an
14
36
  * accessor: one that changes is the same toast, drawn again where it stands.
15
37
  */
16
- declare function List(props: {
17
- children: (toast: Accessor<ToastRecord>) => JSX.Element;
18
- }): JSX.Element;
19
- declare function Root(props: PartComponentProps & {
38
+ declare function List(props: ListProps): JSX.Element;
39
+ export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, {
20
40
  toast: ToastRecord;
21
- }): JSX.Element;
41
+ }>;
42
+ declare function Root(props: RootProps): JSX.Element;
43
+ export type ContentProps = PartComponentProps<"div", StateOf<Parts["content"]>>;
44
+ export type TitleProps = PartComponentProps<"div", StateOf<Parts["title"]>>;
45
+ export type DescriptionProps = PartComponentProps<"div", StateOf<Parts["description"]>>;
46
+ export type CloseProps = PartComponentProps<"button", StateOf<Parts["close"]>>;
47
+ export type ActionProps = PartComponentProps<"button", StateOf<Parts["action"]>>;
22
48
  export declare const Toast: {
23
49
  Viewport: typeof Viewport;
24
50
  List: typeof List;
25
51
  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;
52
+ Content: (props: ContentProps) => JSX.Element;
53
+ Title: (props: TitleProps) => JSX.Element;
54
+ Description: (props: DescriptionProps) => JSX.Element;
55
+ Close: (props: CloseProps) => JSX.Element;
56
+ Action: (props: ActionProps) => JSX.Element;
31
57
  };
32
- export { createToaster } from "@kirana-ui/core/toast";
33
- export type { ToastOptions, ToastRecord, Toaster } from "@kirana-ui/core/toast";
@@ -1,14 +1,9 @@
1
- import type { ChangeDetails, Orientation } from "@kirana-ui/core";
1
+ import type { StateOf } from "@kirana-ui/core";
2
+ import type { ToggleGroupProps as CoreProps } from "@kirana-ui/core/toggle-group";
3
+ import type { Vocabulary } from "@kirana-ui/core/vocabulary";
2
4
  import type { JSX } from "solid-js";
3
5
  import type { PartComponentProps } from "./runtime.tsx";
4
- 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
- };
6
+ /** `Value` is what a toggle's `value` is: the group's `value` holds the pressed ones. */
7
+ export type ToggleGroupProps<Value = unknown> = PartComponentProps<"div", StateOf<Vocabulary["toggleGroup"]["root"]>, CoreProps<Value>>;
13
8
  /** Toggles that are one control. Each `<Toggle value>` inside it is one of its toggles. */
14
- export declare function ToggleGroup(props: ToggleGroupProps): JSX.Element;
9
+ export declare function ToggleGroup<Value = unknown>(props: ToggleGroupProps<Value>): JSX.Element;
package/types/toggle.d.ts CHANGED
@@ -1,12 +1,13 @@
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 ToggleProps = PartComponentProps & {
5
+ export type ToggleProps = PartComponentProps<"button", StateOf<Vocabulary["toggle"]["root"]>, {
5
6
  pressed?: boolean;
6
7
  defaultPressed?: boolean;
7
8
  onPressedChange?: (pressed: boolean, details: ChangeDetails) => void;
8
9
  disabled?: boolean;
9
10
  /** In a toggle group: what the group's value holds while this one is pressed. */
10
11
  value?: unknown;
11
- };
12
+ }>;
12
13
  export declare function Toggle(props: ToggleProps): JSX.Element;
@@ -1,23 +1,28 @@
1
- import type { Orientation } from "@kirana-ui/core";
1
+ import type { Orientation, StateOf } from "@kirana-ui/core";
2
+ import type { Vocabulary } from "@kirana-ui/core/vocabulary";
2
3
  import type { JSX } from "solid-js";
3
4
  import type { PartComponentProps } from "./runtime.tsx";
4
- declare function Root(props: PartComponentProps & {
5
+ type Parts = Vocabulary["toolbar"];
6
+ export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, {
5
7
  orientation?: Orientation;
6
8
  loop?: boolean;
7
9
  disabled?: boolean;
8
- }): JSX.Element;
10
+ }>;
11
+ declare function Root(props: RootProps): JSX.Element;
12
+ type ItemOptions = {
13
+ disabled?: boolean;
14
+ };
15
+ export type ButtonProps = PartComponentProps<"button", StateOf<Parts["button"]>, ItemOptions>;
16
+ export type InputProps = PartComponentProps<"input", StateOf<Parts["input"]>, ItemOptions>;
17
+ export type GroupProps = PartComponentProps<"div", StateOf<Parts["group"]>, ItemOptions>;
18
+ export type LinkProps = PartComponentProps<"a", StateOf<Parts["link"]>>;
19
+ export type SeparatorProps = PartComponentProps<"div", StateOf<Parts["separator"]>>;
9
20
  export declare const Toolbar: {
10
21
  Root: typeof Root;
11
- Button: (props: PartComponentProps & {
12
- disabled?: boolean;
13
- }) => JSX.Element;
14
- Link: (props: PartComponentProps) => JSX.Element;
15
- Input: (props: PartComponentProps & {
16
- disabled?: boolean;
17
- }) => JSX.Element;
18
- Group: (props: PartComponentProps & {
19
- disabled?: boolean;
20
- }) => JSX.Element;
21
- Separator: (props: PartComponentProps) => JSX.Element;
22
+ Button: (props: ButtonProps) => JSX.Element;
23
+ Link: (props: LinkProps) => JSX.Element;
24
+ Input: (props: InputProps) => JSX.Element;
25
+ Group: (props: GroupProps) => JSX.Element;
26
+ Separator: (props: SeparatorProps) => JSX.Element;
22
27
  };
23
28
  export {};
@@ -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["tooltip"];
7
+ export type { PortalProps, RootProps } from "./hover-popup.tsx";
8
+ export type TriggerProps = PartComponentProps<"button", 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 Tooltip: {
2
13
  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;
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
  };
@@ -1,17 +1,28 @@
1
1
  import type { ReadonlySignal } from "@kirana-ui/core";
2
2
  import type { ValueBar, ValueBarProps } from "@kirana-ui/core/progress";
3
3
  import type { JSX } from "solid-js";
4
- import type { PartComponentProps } from "./runtime.tsx";
5
- export type RootProps = PartComponentProps & Omit<ValueBarProps, "id"> & {
4
+ /** A value bar's own props: its value, its range and how the value is written. */
5
+ export type RootOptions = Omit<ValueBarProps, "id"> & {
6
6
  id?: string;
7
7
  };
8
+ /** A written value's own props: a function child draws something else of the text. */
9
+ export type ValueOptions = {
10
+ children?: (text: () => string | undefined) => JSX.Element;
11
+ };
12
+ /** The props of each part, as the component's entry names them. */
13
+ type PartsProps = {
14
+ Root: RootOptions;
15
+ Value: ValueOptions;
16
+ Track: Record<string, unknown>;
17
+ Indicator: Record<string, unknown>;
18
+ Label: Record<string, unknown>;
19
+ };
8
20
  /** The parts of a value drawn as a filled track: a progress bar's, a meter's. */
9
- export declare function valueBar(name: string, create: (props: ReadonlySignal<ValueBarProps>) => ValueBar): {
10
- Root: (props: RootProps) => JSX.Element;
11
- Value: (props: Omit<PartComponentProps, "children"> & {
12
- children?: (text: () => string | undefined) => JSX.Element;
13
- }) => JSX.Element;
14
- Track: (props: PartComponentProps) => JSX.Element;
15
- Indicator: (props: PartComponentProps) => JSX.Element;
16
- Label: (props: PartComponentProps) => JSX.Element;
21
+ export declare function valueBar<Props extends PartsProps>(name: string, create: (props: ReadonlySignal<ValueBarProps>) => ValueBar): {
22
+ Root: (props: Props["Root"]) => JSX.Element;
23
+ Value: (props: Props["Value"]) => JSX.Element;
24
+ Track: (props: Props["Track"]) => JSX.Element;
25
+ Indicator: (props: Props["Indicator"]) => JSX.Element;
26
+ Label: (props: Props["Label"]) => JSX.Element;
17
27
  };
28
+ export {};