@tempots/beatui 1.4.0 → 1.6.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 (216) hide show
  1. package/dist/ar-Wr6gMs-M.cjs +1 -0
  2. package/dist/{ar-C-kUt6f9.js → ar-fdUqbCvM.js} +154 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/auth-divider-DewHpITQ.cjs +1 -0
  6. package/dist/{auth-divider-D_3gKZ6g.js → auth-divider-qnJuYK-x.js} +7 -7
  7. package/dist/beatui.css +2107 -171
  8. package/dist/beatui.tailwind.css +2107 -171
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +5 -5
  11. package/dist/{modal-YKqlh4Dk.js → custom-validation-BetUqAEz.js} +186 -186
  12. package/dist/custom-validation-CLscGHY4.cjs +1 -0
  13. package/dist/{de-CP0kbElb.js → de-C5-k5Eov.js} +156 -3
  14. package/dist/de-DZqdSEta.cjs +1 -0
  15. package/dist/deep-merge-D90SW1Ci.cjs +1 -0
  16. package/dist/deep-merge-ZVigk5Qf.js +1765 -0
  17. package/dist/{duration-input-BrYLC1js.cjs → duration-input-4AQnQpyo.cjs} +1 -1
  18. package/dist/{duration-input-CFu6vq-y.js → duration-input-GMBmT1BE.js} +4 -4
  19. package/dist/{editor-toolbar-group-QVdBUbB8.cjs → editor-toolbar-group-C_ft_T8D.cjs} +1 -1
  20. package/dist/{editor-toolbar-group-DWUWUO-B.js → editor-toolbar-group-FpOHrmtx.js} +2 -2
  21. package/dist/es-CJgYfRap.cjs +1 -0
  22. package/dist/{es-BtIkcnsw.js → es-h6jmoF4X.js} +156 -3
  23. package/dist/fa-BQ5PzwNY.cjs +1 -0
  24. package/dist/{fa-11-rZmQ-.js → fa-BuxK837l.js} +154 -1
  25. package/dist/fr-Bv3TG44U.cjs +1 -0
  26. package/dist/{fr-C-L2F8w2.js → fr-BwILQ9G2.js} +165 -12
  27. package/dist/he-5LbvgMCC.cjs +1 -0
  28. package/dist/{he-Bu1xGoQ9.js → he-yC9Sc7JD.js} +154 -1
  29. package/dist/{hi-CewH-MAH.js → hi-Da7rcCpP.js} +154 -1
  30. package/dist/hi-YWhWcG_L.cjs +1 -0
  31. package/dist/{index-BGKz2Nol.js → index-DI8bf9oC.js} +175 -172
  32. package/dist/index-DeUj-5ph.cjs +1 -0
  33. package/dist/index.cjs.js +4 -4
  34. package/dist/index.es.js +11806 -8105
  35. package/dist/{input-container-CO3DNqpp.js → input-container-8JFB11xN.js} +1 -1
  36. package/dist/{input-container-BkPcNDaZ.cjs → input-container-CyOgiiQD.cjs} +1 -1
  37. package/dist/it-BxOIJE45.cjs +1 -0
  38. package/dist/{it-5hiKQO_p.js → it-Yeklau78.js} +156 -3
  39. package/dist/ja-CNhjK06P.cjs +1 -0
  40. package/dist/{ja-CGfEmZrm.js → ja-Dxj9Q5Yd.js} +155 -2
  41. package/dist/json-schema/index.cjs.js +1 -1
  42. package/dist/json-schema/index.es.js +110 -110
  43. package/dist/json-schema-display/index.cjs.js +1 -1
  44. package/dist/json-schema-display/index.es.js +1 -1
  45. package/dist/json-structure/index.cjs.js +1 -1
  46. package/dist/json-structure/index.es.js +5 -5
  47. package/dist/ko-DgkqcXTs.cjs +1 -0
  48. package/dist/{ko-DZthvREd.js → ko-gn_MsegK.js} +154 -1
  49. package/dist/lexical/index.cjs.js +1 -1
  50. package/dist/lexical/index.es.js +4 -4
  51. package/dist/nl-Dy9lmbBO.cjs +1 -0
  52. package/dist/{nl-CcKyHlQ7.js → nl-vHNFtXXb.js} +162 -9
  53. package/dist/{notice-Du3tWJTW.js → notice-B6ojfenv.js} +4 -4
  54. package/dist/{notice-Q0A1gIho.cjs → notice-p2IqXS5-.cjs} +1 -1
  55. package/dist/{oneof-branch-detection-DSzC0PkO.js → oneof-branch-detection-Q_jxvJIA.js} +1 -1
  56. package/dist/{oneof-branch-detection-BEkAezNi.cjs → oneof-branch-detection-xDDDdYRk.cjs} +1 -1
  57. package/dist/pl-BtYbtsmG.cjs +1 -0
  58. package/dist/{pl-Mwtjp4MV.js → pl-C0UdHla0.js} +184 -31
  59. package/dist/prosemirror/index.cjs.js +1 -1
  60. package/dist/prosemirror/index.es.js +4 -4
  61. package/dist/pt-CtNmqQ1X.cjs +1 -0
  62. package/dist/{pt-BaTsY-8f.js → pt-DGKtfN0d.js} +156 -3
  63. package/dist/ru-BaL_NPRU.cjs +1 -0
  64. package/dist/{ru-CvbGmz5s.js → ru-CpXYLt-v.js} +154 -1
  65. package/dist/tailwind/preset.cjs.js +1 -1
  66. package/dist/tailwind/preset.es.js +1 -1
  67. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  68. package/dist/tailwind/vite-plugin.es.js +1 -1
  69. package/dist/{text-input-D_IxFd0M.cjs → text-input-DS5zlXb2.cjs} +1 -1
  70. package/dist/{text-input-BAn02BzO.js → text-input-NJypZSnE.js} +1 -1
  71. package/dist/{toolbar-CnecqhaU.cjs → toolbar-BBwfe8U9.cjs} +1 -1
  72. package/dist/{toolbar-BKan3NHw.js → toolbar-BF2L6WKC.js} +1 -1
  73. package/dist/{tr-YFqQdZjM.js → tr-DIFZDFW_.js} +156 -3
  74. package/dist/tr-DwOd87oB.cjs +1 -0
  75. package/dist/{translations-CxDUnbXn.js → translations-5cXBrENb.js} +1 -1
  76. package/dist/{translations-DT5QQ4WO.js → translations-BCMP-h52.js} +269 -115
  77. package/dist/{translations-C_-cObaF.cjs → translations-BqWc0ZHz.cjs} +1 -1
  78. package/dist/translations-EwEmHe3v.cjs +1 -0
  79. package/dist/types/beatui-i18n/default.d.ts +109 -0
  80. package/dist/types/beatui-i18n/locales/en.d.ts +109 -0
  81. package/dist/types/beatui-i18n/translations.d.ts +109 -0
  82. package/dist/types/components/button/copy-button.d.ts +42 -0
  83. package/dist/types/components/button/index.d.ts +1 -0
  84. package/dist/types/components/button/toggle-button-group.d.ts +2 -2
  85. package/dist/types/components/button/toggle-button.d.ts +2 -2
  86. package/dist/types/components/data/data-table-context.d.ts +9 -1
  87. package/dist/types/components/data/data-table-row-details.d.ts +21 -0
  88. package/dist/types/components/data/data-table-types.d.ts +23 -0
  89. package/dist/types/components/data/date-picker-shared.d.ts +2 -5
  90. package/dist/types/components/data/date-picker.d.ts +1 -1
  91. package/dist/types/components/data/date-range-picker.d.ts +1 -1
  92. package/dist/types/components/data/index.d.ts +4 -0
  93. package/dist/types/components/data/stat-card.d.ts +108 -0
  94. package/dist/types/components/data/time-picker.d.ts +54 -0
  95. package/dist/types/components/data/virtual-scrolling/index.d.ts +1 -0
  96. package/dist/types/components/data/virtual-scrolling/virtual-list.d.ts +91 -0
  97. package/dist/types/components/form/control/control.d.ts +5 -5
  98. package/dist/types/components/form/control/list-control.d.ts +11 -11
  99. package/dist/types/components/form/fieldset/fieldset.d.ts +60 -0
  100. package/dist/types/components/form/fieldset/index.d.ts +1 -0
  101. package/dist/types/components/form/index.d.ts +1 -0
  102. package/dist/types/components/form/input/checkbox-input.d.ts +1 -1
  103. package/dist/types/components/form/input/color-input.d.ts +1 -1
  104. package/dist/types/components/form/input/color-picker/canvas-draw.d.ts +12 -0
  105. package/dist/types/components/form/input/color-picker/channel-picker.d.ts +71 -0
  106. package/dist/types/components/form/input/color-picker/hex-color-picker.d.ts +20 -0
  107. package/dist/types/components/form/input/color-picker/hsl-color-picker.d.ts +14 -0
  108. package/dist/types/components/form/input/color-picker/hwb-color-picker.d.ts +15 -0
  109. package/dist/types/components/form/input/color-picker/index.d.ts +7 -0
  110. package/dist/types/components/form/input/color-picker/oklch-color-picker.d.ts +15 -0
  111. package/dist/types/components/form/input/color-picker/rgb-color-picker.d.ts +17 -0
  112. package/dist/types/components/form/input/color-swatch-input.d.ts +1 -1
  113. package/dist/types/components/form/input/combobox-input.d.ts +3 -3
  114. package/dist/types/components/form/input/combobox-tags-input.d.ts +1 -1
  115. package/dist/types/components/form/input/date-input.d.ts +1 -1
  116. package/dist/types/components/form/input/date-range-select-base.d.ts +23 -0
  117. package/dist/types/components/form/input/date-range-select.d.ts +64 -0
  118. package/dist/types/components/form/input/date-select.d.ts +52 -0
  119. package/dist/types/components/form/input/date-time-input.d.ts +2 -2
  120. package/dist/types/components/form/input/date-time-select-base.d.ts +23 -0
  121. package/dist/types/components/form/input/date-time-select.d.ts +66 -0
  122. package/dist/types/components/form/input/dropdown-input.d.ts +3 -3
  123. package/dist/types/components/form/input/email-input.d.ts +1 -1
  124. package/dist/types/components/form/input/field-layout.d.ts +64 -0
  125. package/dist/types/components/form/input/{input-wrapper.d.ts → field.d.ts} +23 -14
  126. package/dist/types/components/form/input/index.d.ts +19 -1
  127. package/dist/types/components/form/input/multi-select.d.ts +2 -2
  128. package/dist/types/components/form/input/native-select.d.ts +1 -1
  129. package/dist/types/components/form/input/nullable-date-select.d.ts +55 -0
  130. package/dist/types/components/form/input/nullable-date-time-select.d.ts +68 -0
  131. package/dist/types/components/form/input/nullable-time-select.d.ts +64 -0
  132. package/dist/types/components/form/input/number-input.d.ts +5 -40
  133. package/dist/types/components/form/input/number-stepper.d.ts +53 -0
  134. package/dist/types/components/form/input/open-date-range-select.d.ts +75 -0
  135. package/dist/types/components/form/input/otp-input.d.ts +2 -2
  136. package/dist/types/components/form/input/password-input.d.ts +1 -1
  137. package/dist/types/components/form/input/radio-group.d.ts +1 -1
  138. package/dist/types/components/form/input/range-slider.d.ts +23 -6
  139. package/dist/types/components/form/input/rating-input.d.ts +1 -1
  140. package/dist/types/components/form/input/segmented-input.d.ts +6 -2
  141. package/dist/types/components/form/input/segmented-select.d.ts +84 -0
  142. package/dist/types/components/form/input/select-tags-input.d.ts +1 -1
  143. package/dist/types/components/form/input/slider-input.d.ts +2 -2
  144. package/dist/types/components/form/input/sortable-list.d.ts +68 -0
  145. package/dist/types/components/form/input/switch.d.ts +1 -1
  146. package/dist/types/components/form/input/text-area.d.ts +1 -1
  147. package/dist/types/components/form/input/text-input.d.ts +1 -1
  148. package/dist/types/components/form/input/time-format.d.ts +31 -0
  149. package/dist/types/components/form/input/time-select-base.d.ts +23 -0
  150. package/dist/types/components/form/input/time-select.d.ts +61 -0
  151. package/dist/types/components/form/input/transfer-list.d.ts +56 -0
  152. package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +1 -1
  153. package/dist/types/components/form/input/url-input.d.ts +1 -1
  154. package/dist/types/components/format/format-bigint.d.ts +64 -0
  155. package/dist/types/components/format/format-date-time.d.ts +54 -0
  156. package/dist/types/components/format/format-date.d.ts +82 -0
  157. package/dist/types/components/format/format-display-name.d.ts +70 -0
  158. package/dist/types/components/format/format-file-size.d.ts +30 -0
  159. package/dist/types/components/format/format-list.d.ts +61 -0
  160. package/dist/types/components/format/format-number.d.ts +88 -0
  161. package/dist/types/components/format/format-plural.d.ts +96 -0
  162. package/dist/types/components/format/format-relative-time.d.ts +62 -0
  163. package/dist/types/components/format/format-time.d.ts +66 -0
  164. package/dist/types/components/format/index.d.ts +11 -0
  165. package/dist/types/components/i18n/locale-selector.d.ts +1 -1
  166. package/dist/types/components/json-schema/controls/composition-shared.d.ts +1 -1
  167. package/dist/types/components/json-schema/controls/shared-utils.d.ts +3 -3
  168. package/dist/types/components/json-schema/widgets/string-controls.d.ts +2 -2
  169. package/dist/types/components/json-schema-display/display-wrapper.d.ts +1 -1
  170. package/dist/types/components/layout/nine-slice-scroll-view.d.ts +1 -1
  171. package/dist/types/components/navigation/index.d.ts +1 -0
  172. package/dist/types/components/navigation/stepper.d.ts +102 -0
  173. package/dist/types/components/overlay/index.d.ts +1 -1
  174. package/dist/types/components/overlay/spotlight.d.ts +62 -0
  175. package/dist/types/index.d.ts +1 -0
  176. package/dist/types/utils/index.d.ts +0 -1
  177. package/dist/ur-D9nLchps.cjs +1 -0
  178. package/dist/{ur-CdnwwnG_.js → ur-DBst-TXc.js} +154 -1
  179. package/dist/use-form-Dcra7GeE.cjs +2 -0
  180. package/dist/{use-form-D_TJyZhP.js → use-form-NfobsGNl.js} +474 -434
  181. package/dist/{vi-Bwvz1d_n.js → vi-DQOJp32U.js} +183 -30
  182. package/dist/vi-Dg1aiMr5.cjs +1 -0
  183. package/dist/widget-customization-BtkexHgm.js +1458 -0
  184. package/dist/widget-customization-pqmtsraC.cjs +1 -0
  185. package/dist/{zh-hy7Uw6c5.js → zh-DPK4HXl2.js} +154 -1
  186. package/dist/zh-tbwSTbmn.cjs +1 -0
  187. package/package.json +9 -9
  188. package/dist/ar-Dc56zcjW.cjs +0 -1
  189. package/dist/auth-divider-itm5-j5G.cjs +0 -1
  190. package/dist/de-DboQlEC4.cjs +0 -1
  191. package/dist/deep-merge-Bydz6jLt.cjs +0 -1
  192. package/dist/deep-merge-CzZVsVF-.js +0 -1704
  193. package/dist/es-CAmE_0Ph.cjs +0 -1
  194. package/dist/fa-D9LrFZdW.cjs +0 -1
  195. package/dist/fr-DKogQyss.cjs +0 -1
  196. package/dist/he-CVx91Jdr.cjs +0 -1
  197. package/dist/hi-BgrHV72l.cjs +0 -1
  198. package/dist/index-DFF7Uahh.cjs +0 -1
  199. package/dist/it-B1rA1F9l.cjs +0 -1
  200. package/dist/ja-DZnjjqoi.cjs +0 -1
  201. package/dist/ko-CDnYKYWU.cjs +0 -1
  202. package/dist/modal-DCxNGrzk.cjs +0 -1
  203. package/dist/nl-Bj8QnDEY.cjs +0 -1
  204. package/dist/pl-BmuuxxVd.cjs +0 -1
  205. package/dist/pt-RiC0yeVA.cjs +0 -1
  206. package/dist/ru-pRqtOQHF.cjs +0 -1
  207. package/dist/tr-B9JhBJeL.cjs +0 -1
  208. package/dist/translations-qefRsdGi.cjs +0 -1
  209. package/dist/types/components/overlay/command-palette.d.ts +0 -17
  210. package/dist/types/utils/color.d.ts +0 -346
  211. package/dist/ur-BZakU0iv.cjs +0 -1
  212. package/dist/use-form-BvBkVEKi.cjs +0 -2
  213. package/dist/vi-D1nly0nb.cjs +0 -1
  214. package/dist/widget-customization-BAchyOUo.js +0 -1066
  215. package/dist/widget-customization-DELy3SMQ.cjs +0 -1
  216. package/dist/zh-DBk7sSD9.cjs +0 -1
@@ -0,0 +1,108 @@
1
+ import { TNode, Value } from '@tempots/dom';
2
+ import { ControlSize } from '../theme';
3
+ import { ThemeColorName } from '../../tokens';
4
+ /** Visual style variant for {@link StatCard}. */
5
+ export type StatCardVariant = 'default' | 'elevated' | 'outlined';
6
+ /** Trend direction for {@link StatCardTrend}. */
7
+ export type TrendDirection = 'up' | 'down' | 'flat';
8
+ /** Configuration options for the {@link StatCard} component. */
9
+ export interface StatCardOptions {
10
+ /** Visual style variant. @default 'default' */
11
+ variant?: Value<StatCardVariant>;
12
+ /** Controls internal padding. @default 'md' */
13
+ size?: Value<ControlSize>;
14
+ /** Theme color accent. @default 'primary' */
15
+ color?: Value<ThemeColorName>;
16
+ }
17
+ /** Options for a {@link StatCardSection}. */
18
+ export interface StatCardSectionOptions {
19
+ /** Additional CSS classes. */
20
+ class?: Value<string>;
21
+ }
22
+ /** Configuration for the {@link StatCardTrend} sub-component. */
23
+ export interface StatCardTrendOptions {
24
+ /** The trend value to display (e.g. "+12%", "3.2"). */
25
+ value: Value<string | number>;
26
+ /** Direction of the trend. */
27
+ direction: Value<TrendDirection>;
28
+ /** Override the auto-derived color. When omitted, uses success/danger/neutral based on direction. */
29
+ color?: Value<ThemeColorName>;
30
+ }
31
+ /**
32
+ * A dashboard metric card that displays a statistic with optional label,
33
+ * trend indicator, icon, and sparkline slot.
34
+ *
35
+ * Uses a composition pattern — combine with {@link StatCardValue},
36
+ * {@link StatCardLabel}, {@link StatCardTrend}, {@link StatCardIcon},
37
+ * and {@link StatCardSparkline} to build rich stat displays.
38
+ *
39
+ * @param options - Configuration for variant, size, and color
40
+ * @param children - Sub-components to render inside the card
41
+ * @returns A stat card element
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * StatCard({ variant: 'elevated' },
46
+ * StatCardIcon({}, Icon({ icon: 'lucide:users', size: 'lg' })),
47
+ * StatCardValue({}, '1,234'),
48
+ * StatCardLabel({}, 'Active Users'),
49
+ * StatCardTrend({ value: '+12%', direction: 'up' }),
50
+ * )
51
+ * ```
52
+ */
53
+ export declare function StatCard({ variant, size, color }?: StatCardOptions, ...children: TNode[]): TNode;
54
+ /**
55
+ * The primary metric value of a {@link StatCard}.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * StatCardValue({}, '1,234')
60
+ * StatCardValue({}, formattedRevenue)
61
+ * ```
62
+ */
63
+ export declare function StatCardValue({ class: className }?: StatCardSectionOptions, ...children: TNode[]): TNode;
64
+ /**
65
+ * A descriptive label for a {@link StatCard} metric.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * StatCardLabel({}, 'Monthly Revenue')
70
+ * ```
71
+ */
72
+ export declare function StatCardLabel({ class: className }?: StatCardSectionOptions, ...children: TNode[]): TNode;
73
+ /**
74
+ * A trend indicator showing a value with a directional arrow.
75
+ *
76
+ * When no `color` is provided, the color is auto-derived from `direction`:
77
+ * up → success, down → danger, flat → neutral.
78
+ *
79
+ * @param options - Trend value, direction, and optional color override
80
+ * @returns A trend indicator element
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * StatCardTrend({ value: '+12.5%', direction: 'up' })
85
+ * StatCardTrend({ value: '-3%', direction: 'down' })
86
+ * StatCardTrend({ value: '0%', direction: 'flat' })
87
+ * ```
88
+ */
89
+ export declare function StatCardTrend(options: StatCardTrendOptions): TNode;
90
+ /**
91
+ * An icon slot for a {@link StatCard}, typically placed at the top or side.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * StatCardIcon({}, Icon({ icon: 'lucide:dollar-sign', size: 'lg', color: 'primary' }))
96
+ * ```
97
+ */
98
+ export declare function StatCardIcon({ class: className }?: StatCardSectionOptions, ...children: TNode[]): TNode;
99
+ /**
100
+ * A sparkline/chart slot for a {@link StatCard}.
101
+ * Renders a container where you can place any chart or visualization component.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * StatCardSparkline({}, mySparklineChart)
106
+ * ```
107
+ */
108
+ export declare function StatCardSparkline({ class: className }?: StatCardSectionOptions, ...children: TNode[]): TNode;
@@ -0,0 +1,54 @@
1
+ import { Value, type Renderable } from '@tempots/dom';
2
+ import { ControlSize } from '../theme';
3
+ import { ThemeColorName } from '../../tokens';
4
+ import type { PlainTime } from '../../temporal/types';
5
+ /**
6
+ * Configuration options for the {@link TimePicker} component.
7
+ * Uses Temporal `PlainTime` for time values — no date or timezone concerns.
8
+ */
9
+ export interface TimePickerOptions {
10
+ /** The currently selected time. */
11
+ value?: Value<PlainTime | null>;
12
+ /** Callback invoked when a time is selected. */
13
+ onSelect?: (time: PlainTime) => void;
14
+ /** Whether to show the seconds column. @default false */
15
+ showSeconds?: Value<boolean>;
16
+ /** Whether the picker uses 12-hour format with AM/PM. When omitted, auto-detected from the current locale. */
17
+ use12Hour?: Value<boolean>;
18
+ /** Theme color for the selected highlight. @default 'primary' */
19
+ color?: Value<ThemeColorName>;
20
+ /** Visual size of the time picker. @default 'md' */
21
+ size?: Value<ControlSize>;
22
+ /** Whether the time picker is disabled. @default false */
23
+ disabled?: Value<boolean>;
24
+ /** Step for minutes column. @default 1 */
25
+ minuteStep?: Value<number>;
26
+ /** Step for seconds column. @default 1 */
27
+ secondStep?: Value<number>;
28
+ /** Whether to show a "Now" button that sets the time to the current local time. @default false */
29
+ showNow?: Value<boolean>;
30
+ }
31
+ /**
32
+ * A time picker component for selecting hours, minutes, and optionally seconds.
33
+ *
34
+ * Uses Temporal `PlainTime` internally — a time-only type with no date or
35
+ * timezone concerns. Renders scrollable columns for hours and minutes (and
36
+ * optionally seconds), with support for 12-hour format with AM/PM.
37
+ *
38
+ * @param options - Configuration for the time picker
39
+ * @returns A time picker element with time selection capability
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { prop } from '@tempots/dom'
44
+ * import { TimePicker } from '@tempots/beatui'
45
+ * import { Temporal } from '@js-temporal/polyfill'
46
+ *
47
+ * const time = prop<PlainTime | null>(Temporal.PlainTime.from('14:30'))
48
+ * TimePicker({
49
+ * value: time,
50
+ * onSelect: v => time.set(v),
51
+ * })
52
+ * ```
53
+ */
54
+ export declare function TimePicker(options?: TimePickerOptions): Renderable;
@@ -0,0 +1 @@
1
+ export * from './virtual-list';
@@ -0,0 +1,91 @@
1
+ import { TNode, Value } from '@tempots/dom';
2
+ /**
3
+ * Configuration options for the {@link VirtualList} component.
4
+ *
5
+ * A virtualized list that renders only visible items for performance with
6
+ * large datasets. Items outside the visible viewport are not rendered in the
7
+ * DOM, dramatically reducing memory usage and rendering time.
8
+ *
9
+ * @typeParam T - The type of items in the list
10
+ */
11
+ export interface VirtualListOptions<T> {
12
+ /** The array of items to render. May be a static array or a reactive signal. */
13
+ items: Value<T[]>;
14
+ /**
15
+ * A function that renders a single item. Called only for visible items.
16
+ *
17
+ * @param item - The item data
18
+ * @param index - The item's index in the full items array
19
+ * @returns A TNode representing the rendered item
20
+ */
21
+ renderItem: (item: T, index: number) => TNode;
22
+ /**
23
+ * The height of each item. Can be a fixed number (pixels) for uniform-height
24
+ * lists, or a function that returns the height for a given index for
25
+ * variable-height lists.
26
+ *
27
+ * Fixed heights are more performant as they avoid cumulative height calculations.
28
+ */
29
+ itemHeight: number | ((index: number) => number);
30
+ /**
31
+ * Number of extra items to render above and below the visible viewport.
32
+ * Larger values reduce the chance of blank flickers during fast scrolling
33
+ * at the cost of rendering more items.
34
+ *
35
+ * @default 5
36
+ */
37
+ overscan?: Value<number>;
38
+ /**
39
+ * The height of the scroll container. Can be a pixel number (e.g. 400) or
40
+ * a CSS string (e.g. '100%', '50vh').
41
+ */
42
+ containerHeight: Value<number | string>;
43
+ /** Additional CSS class names to apply to the outer container element. */
44
+ class?: Value<string>;
45
+ }
46
+ /**
47
+ * A virtualized list component that renders only visible items for high
48
+ * performance with large datasets (10,000+ items).
49
+ *
50
+ * The component maintains a scroll container with a spacer element sized to
51
+ * the total height of all items. Only items within the visible viewport (plus
52
+ * an overscan buffer) are rendered in the DOM.
53
+ *
54
+ * Supports both fixed-height items (more performant) and variable-height items
55
+ * via a height function.
56
+ *
57
+ * @typeParam T - The type of items in the list
58
+ * @param options - Configuration for the virtual list
59
+ * @returns A scroll container with virtualized item rendering
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * // Fixed-height virtual list with 10,000 items
64
+ * const items = prop(Array.from({ length: 10000 }, (_, i) => ({ id: i, label: `Item ${i}` })))
65
+ *
66
+ * VirtualList({
67
+ * items,
68
+ * itemHeight: 48,
69
+ * containerHeight: 400,
70
+ * renderItem: (item, index) =>
71
+ * html.div(
72
+ * attr.class('flex items-center px-4 border-b'),
73
+ * attr.style('height: 48px'),
74
+ * `${index}: ${item.label}`
75
+ * ),
76
+ * })
77
+ * ```
78
+ *
79
+ * @example
80
+ * ```typescript
81
+ * // Variable-height items
82
+ * VirtualList({
83
+ * items: myItems,
84
+ * itemHeight: index => index % 3 === 0 ? 72 : 48,
85
+ * containerHeight: '100%',
86
+ * overscan: 10,
87
+ * renderItem: (item) => html.div(item.label),
88
+ * })
89
+ * ```
90
+ */
91
+ export declare function VirtualList<T>({ items, renderItem, itemHeight, overscan: overscanOpt, containerHeight, class: className, }: VirtualListOptions<T>): TNode;
@@ -1,7 +1,7 @@
1
1
  import { Merge, TNode } from '@tempots/dom';
2
2
  import { InputOptions } from '../input/input-options';
3
3
  import { Controller } from '../controller';
4
- import { InputWrapperOptions } from '../input';
4
+ import { FieldOptions } from '../input';
5
5
  /**
6
6
  * Creates a blur event handler that marks the controller as touched.
7
7
  *
@@ -26,7 +26,7 @@ export type BaseControlInputOptions = InputOptions<any>;
26
26
  /**
27
27
  * Options for a control that includes both input and wrapper options.
28
28
  */
29
- export type ControlInputOptions = Merge<BaseControlInputOptions, InputWrapperOptions>;
29
+ export type ControlInputOptions = Merge<BaseControlInputOptions, FieldOptions>;
30
30
  /**
31
31
  * Options for connecting a controller to an input component without a wrapper.
32
32
  *
@@ -43,7 +43,7 @@ export type BaseControlOptions<T, O extends BaseControlInputOptions> = Merge<Omi
43
43
  * @template T - The controller value type
44
44
  * @template O - The input component options type
45
45
  */
46
- export type ControlOptions<T, O extends BaseControlInputOptions> = Merge<Omit<InputWrapperOptions, 'content'>, Merge<Omit<O, 'value'>, {
46
+ export type ControlOptions<T, O extends BaseControlInputOptions> = Merge<Omit<FieldOptions, 'content'>, Merge<Omit<O, 'value'>, {
47
47
  controller: Controller<T>;
48
48
  triggerOn?: 'input' | 'change';
49
49
  }>>;
@@ -116,7 +116,7 @@ export declare function BaseControl<T, O extends BaseControlInputOptions>(InputC
116
116
  * })
117
117
  * ```
118
118
  */
119
- export declare function Control<T, O extends BaseControlInputOptions>(InputComponent: (options: O) => TNode, { id: idArg, labelFor: labelForArg, ...options }: ControlOptions<T, O>, ...children: TNode[]): import("@tempots/dom").Renderable;
119
+ export declare function Control<T, O extends BaseControlInputOptions>(InputComponent: (options: O) => TNode, { id: idArg, labelFor: labelForArg, ...options }: ControlOptions<T, O>, ...children: TNode[]): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
120
120
  /**
121
121
  * Connects an input component to a controller with bidirectional value transformation, without a wrapper.
122
122
  * Useful when the controller value type differs from the input component's expected value type.
@@ -176,4 +176,4 @@ export declare function BaseMappedControl<T, U, O extends BaseControlInputOption
176
176
  * })
177
177
  * ```
178
178
  */
179
- export declare function MappedControl<T, U, O extends BaseControlInputOptions>(InputComponent: (options: O) => TNode, { id: idArg, labelFor: labelForArg, ...options }: MappedControlOptions<T, U, O>, ...children: TNode[]): import("@tempots/dom").Renderable;
179
+ export declare function MappedControl<T, U, O extends BaseControlInputOptions>(InputComponent: (options: O) => TNode, { id: idArg, labelFor: labelForArg, ...options }: MappedControlOptions<T, U, O>, ...children: TNode[]): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
@@ -1,7 +1,7 @@
1
1
  import { TNode, ElementPosition, Value, Merge } from '@tempots/dom';
2
2
  import { ArrayController } from '../controller/controller';
3
3
  import { ListInputPayload, MoveDirection, MovableDirection } from '../input/list-input';
4
- import { InputWrapperOptions } from '../input';
4
+ import { FieldOptions } from '../input';
5
5
  import { ListControlsLayout } from './list-item-controls';
6
6
  /**
7
7
  * Payload provided to each list item element renderer, re-exported from {@link ListInputPayload}.
@@ -11,7 +11,7 @@ import { ListControlsLayout } from './list-item-controls';
11
11
  export type ListControllerPayload<T> = ListInputPayload<T>;
12
12
  export type { MoveDirection, MovableDirection };
13
13
  /**
14
- * Base configuration options for {@link BaseListControl} (without InputWrapper).
14
+ * Base configuration options for {@link BaseListControl} (without Field).
15
15
  *
16
16
  * @typeParam T - The type of each item in the list
17
17
  */
@@ -52,16 +52,16 @@ export type BaseListControlOptions<T> = {
52
52
  controlsLayout?: Value<ListControlsLayout>;
53
53
  };
54
54
  /**
55
- * Configuration options for {@link ListControl}, combining InputWrapper options with list control options.
55
+ * Configuration options for {@link ListControl}, combining Field options with list control options.
56
56
  *
57
- * Inherits all properties from {@link InputWrapperOptions} (except `content`, which is generated)
57
+ * Inherits all properties from {@link FieldOptions} (except `content`, which is generated)
58
58
  * and {@link BaseListControlOptions}.
59
59
  *
60
60
  * @typeParam T - The type of each item in the list
61
61
  */
62
- export type ListControlOptions<T> = Merge<Omit<InputWrapperOptions, 'content'>, BaseListControlOptions<T>>;
62
+ export type ListControlOptions<T> = Merge<Omit<FieldOptions, 'content'>, BaseListControlOptions<T>>;
63
63
  /**
64
- * Renders a list of items with move, remove, and add controls -- without an InputWrapper.
64
+ * Renders a list of items with move, remove, and add controls -- without an Field.
65
65
  *
66
66
  * Each item is rendered using the `element` callback and can optionally include
67
67
  * move up/down buttons, a remove button, and an "Add" button at the bottom.
@@ -92,15 +92,15 @@ export type ListControlOptions<T> = Merge<Omit<InputWrapperOptions, 'content'>,
92
92
  */
93
93
  export declare const BaseListControl: <T>(options: BaseListControlOptions<T>) => import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
94
94
  /**
95
- * Renders a list of items with move, remove, and add controls inside an InputWrapper.
95
+ * Renders a list of items with move, remove, and add controls inside an Field.
96
96
  *
97
- * Combines {@link BaseListControl} with {@link InputWrapper} to provide a complete
97
+ * Combines {@link BaseListControl} with {@link Field} to provide a complete
98
98
  * form field for managing a list of values, including label, description, and error display.
99
99
  *
100
100
  * @typeParam T - The type of each item in the list
101
101
  *
102
- * @param options - Configuration options combining InputWrapper and list control settings
103
- * @param children - Additional child nodes to render inside the InputWrapper
102
+ * @param options - Configuration options combining Field and list control settings
103
+ * @param children - Additional child nodes to render inside the Field
104
104
  *
105
105
  * @returns A renderable TNode representing the wrapped list control
106
106
  *
@@ -121,4 +121,4 @@ export declare const BaseListControl: <T>(options: BaseListControlOptions<T>) =>
121
121
  * })
122
122
  * ```
123
123
  */
124
- export declare const ListControl: <T>(options: ListControlOptions<T>, ...children: TNode[]) => import("@tempots/dom").Renderable;
124
+ export declare const ListControl: <T>(options: ListControlOptions<T>, ...children: TNode[]) => import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
@@ -0,0 +1,60 @@
1
+ import { TNode, Value } from '@tempots/dom';
2
+ import type { ControlSize } from '../../theme';
3
+ import type { FieldLabelLayout } from '../input/field';
4
+ /**
5
+ * Configuration options for the `Fieldset` component.
6
+ */
7
+ export interface FieldsetOptions {
8
+ /** Legend content (always visible header for the fieldset) */
9
+ legend?: TNode;
10
+ /** Description text displayed below the legend */
11
+ description?: TNode;
12
+ /** Visual variant of the fieldset container. @default 'plain' */
13
+ variant?: Value<'bordered' | 'plain' | 'card'>;
14
+ /** Whether the fieldset body can be collapsed/expanded. @default false */
15
+ collapsible?: Value<boolean>;
16
+ /** Initial collapsed state (only used when collapsible is true). @default false */
17
+ defaultCollapsed?: Value<boolean>;
18
+ /** Whether the entire fieldset (and all children) is disabled. @default false */
19
+ disabled?: Value<boolean>;
20
+ /** Label position cascaded to descendant Field components. @default 'vertical' */
21
+ layout?: Value<FieldLabelLayout>;
22
+ /** Label column width cascaded to descendant Field components. @default '7.5rem' */
23
+ labelWidth?: Value<string>;
24
+ /** Control size cascaded to descendant Field components. @default 'md' */
25
+ size?: Value<ControlSize>;
26
+ /** Gap between fields in the grid. @default 'md' */
27
+ gap?: Value<ControlSize>;
28
+ /** Number of explicit grid columns. When > 1, overrides auto-fit behaviour. @default 1 */
29
+ columns?: Value<number>;
30
+ /** Minimum field width before columns auto-collapse. @default '15rem' */
31
+ minFieldWidth?: Value<string>;
32
+ /** Reduced spacing mode cascaded to descendant Field components. @default false */
33
+ compact?: Value<boolean>;
34
+ }
35
+ /**
36
+ * Groups related `Field` components with a shared layout context and optional header.
37
+ *
38
+ * Fieldset wraps its children in a `FieldLayout` provider, cascading layout configuration
39
+ * (layout mode, label width, column count, etc.) to all descendant `Field` components.
40
+ * Individual fields can still override provider values locally.
41
+ *
42
+ * Supports three visual variants (`bordered`, `plain`, `card`) and optional
43
+ * animated collapse behaviour.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * Fieldset(
48
+ * {
49
+ * legend: 'Personal Information',
50
+ * variant: 'bordered',
51
+ * layout: 'horizontal-fixed',
52
+ * labelWidth: '160px',
53
+ * columns: 2,
54
+ * },
55
+ * Field({ label: 'First Name', content: TextInput({ ... }) }),
56
+ * Field({ label: 'Last Name', content: TextInput({ ... }) }),
57
+ * )
58
+ * ```
59
+ */
60
+ export declare function Fieldset({ legend, description, variant, collapsible, defaultCollapsed, disabled, layout, labelWidth, size, gap, columns, minFieldWidth, compact, }: FieldsetOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
@@ -0,0 +1 @@
1
+ export * from './fieldset';
@@ -1,5 +1,6 @@
1
1
  export * from './control';
2
2
  export * from './controller';
3
+ export * from './fieldset';
3
4
  export * from './input';
4
5
  export * from './schema';
5
6
  export * from './use-form';
@@ -35,7 +35,7 @@ export type CheckboxInputOptions = InputOptions<boolean> & {
35
35
  * const agreed = prop(false)
36
36
  * CheckboxInput({
37
37
  * value: agreed,
38
- * onChange: agreed.set,
38
+ * onChange: v => agreed.set(v),
39
39
  * placeholder: 'I agree to the terms and conditions',
40
40
  * })
41
41
  * ```
@@ -31,7 +31,7 @@ export type ColorInputOptions = Omit<InputOptions<string>, 'value'> & {
31
31
  * const color = prop('#ff6600')
32
32
  * ColorInput({
33
33
  * value: color,
34
- * onChange: color.set,
34
+ * onChange: v => color.set(v),
35
35
  * placeholder: '#rrggbb',
36
36
  * })
37
37
  * ```
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Draw a full hue rainbow strip (0→360) on a canvas.
3
+ */
4
+ export declare function drawHueCanvas({ ctx, width, height, }: {
5
+ ctx: CanvasRenderingContext2D;
6
+ width: number;
7
+ height: number;
8
+ }): void;
9
+ /**
10
+ * Draw a checkerboard pattern (used as background for alpha strips/swatches).
11
+ */
12
+ export declare function drawCheckerboard(ctx: CanvasRenderingContext2D, width: number, height: number, size?: number): void;
@@ -0,0 +1,71 @@
1
+ import { Renderable, Value, TNode, Signal, Prop } from '@tempots/dom';
2
+ import { Color } from '@tempots/std';
3
+ export interface RenderOptions {
4
+ canvas: HTMLCanvasElement;
5
+ width: number;
6
+ height: number;
7
+ ctx: CanvasRenderingContext2D;
8
+ }
9
+ export interface ChannelPickerOptions {
10
+ /** Current value. */
11
+ value: Value<number>;
12
+ /** Callback on value change. */
13
+ onChange?: (value: number) => void;
14
+ /** Callback on value input. */
15
+ onInput?: (value: number) => void;
16
+ /** Function to draw the strip background. */
17
+ draw: (options: RenderOptions) => void;
18
+ /** Dependencies that trigger a redraw. */
19
+ dependencies?: (Signal<any> | Prop<never>)[];
20
+ /** Min for the number input. */
21
+ min: Value<number>;
22
+ /** Max for the number input. */
23
+ max: Value<number>;
24
+ /** Step for the number input. */
25
+ step?: Value<number>;
26
+ unit?: TNode;
27
+ /** Handle color as CSS string. */
28
+ handleColor?: Value<string>;
29
+ /** Whether disabled. @default false */
30
+ disabled?: Value<boolean>;
31
+ /** Strip height. @default 14 */
32
+ stripHeight?: Value<number>;
33
+ label: Value<string>;
34
+ }
35
+ export declare function ChannelPicker(options: ChannelPickerOptions): Renderable;
36
+ export interface AlphaChannelPickerOptions {
37
+ /** Current value. */
38
+ value: Value<number>;
39
+ /** The color to use for the strip. */
40
+ color: Signal<Color>;
41
+ /** Callback on value change. */
42
+ onChange?: (value: number) => void;
43
+ /** Callback on value input. */
44
+ onInput?: (value: number) => void;
45
+ /** Dependencies that trigger a redraw. */
46
+ dependencies?: (Signal<any> | Prop<never>)[];
47
+ /** Whether disabled. @default false */
48
+ disabled?: Value<boolean>;
49
+ /** Label for the alpha channel. @default 'Alpha' */
50
+ label?: Value<string>;
51
+ }
52
+ export declare function AlphaChannelPicker(options: AlphaChannelPickerOptions): Renderable;
53
+ export interface ColorFieldOptions {
54
+ render: (options: RenderOptions) => void;
55
+ dependencies?: Signal<any>[];
56
+ handlePosition?: Signal<{
57
+ x: number;
58
+ y: number;
59
+ }>;
60
+ handleColor?: Value<string>;
61
+ disabled?: Value<boolean>;
62
+ onChange?: (value: {
63
+ x: number;
64
+ y: number;
65
+ }) => void;
66
+ onInput?: (value: {
67
+ x: number;
68
+ y: number;
69
+ }) => void;
70
+ }
71
+ export declare function ColorField(options: ColorFieldOptions): Renderable;
@@ -0,0 +1,20 @@
1
+ import { Renderable, Value } from '@tempots/dom';
2
+ export interface HexColorPickerOptions {
3
+ /** The current color as a hex string (e.g. '#ff0000', '#ff000080'). */
4
+ value: Value<string>;
5
+ /** Callback with the new hex string. */
6
+ onChange?: (value: string) => void;
7
+ /** Callback with the new hex string (on input). */
8
+ onInput?: (value: string) => void;
9
+ withAlpha?: Value<boolean>;
10
+ disabled?: Value<boolean>;
11
+ displayColorSwatch?: Value<boolean>;
12
+ }
13
+ /**
14
+ * Standalone hex color picker with color field, hue channel strip,
15
+ * hex text input, optional alpha, and color swatch preview.
16
+ *
17
+ * Accepts and emits hex strings. Internally converts to RGBA (0-1) for
18
+ * the color field and channel strips.
19
+ */
20
+ export declare function HexColorPicker(options: HexColorPickerOptions): Renderable;
@@ -0,0 +1,14 @@
1
+ import { Renderable, Value } from '@tempots/dom';
2
+ import { type HSLA } from '@tempots/std/color';
3
+ export interface HslColorPickerOptions {
4
+ value: Value<HSLA>;
5
+ onChange?: (value: HSLA) => void;
6
+ onInput?: (value: HSLA) => void;
7
+ withAlpha?: Value<boolean>;
8
+ disabled?: Value<boolean>;
9
+ displayColorSwatch?: Value<boolean>;
10
+ }
11
+ /**
12
+ * The HSL format input panel.
13
+ */
14
+ export declare function HslColorPicker(options: HslColorPickerOptions): Renderable;
@@ -0,0 +1,15 @@
1
+ import { Renderable, Value } from '@tempots/dom';
2
+ import { type HWBA } from '@tempots/std/color';
3
+ export interface HwbColorPickerOptions {
4
+ value: Value<HWBA>;
5
+ onChange?: (value: HWBA) => void;
6
+ onInput?: (value: HWBA) => void;
7
+ withAlpha?: Value<boolean>;
8
+ disabled?: Value<boolean>;
9
+ displayColorSwatch?: Value<boolean>;
10
+ }
11
+ /**
12
+ * Standalone HWB color picker with color field, H/W/B channel strips,
13
+ * optional alpha, and color swatch preview.
14
+ */
15
+ export declare function HwbColorPicker(options: HwbColorPickerOptions): Renderable;
@@ -0,0 +1,7 @@
1
+ export * from './canvas-draw';
2
+ export * from './channel-picker';
3
+ export * from './hex-color-picker';
4
+ export * from './rgb-color-picker';
5
+ export * from './hsl-color-picker';
6
+ export * from './hwb-color-picker';
7
+ export * from './oklch-color-picker';
@@ -0,0 +1,15 @@
1
+ import { Renderable, Value } from '@tempots/dom';
2
+ import { type OKLCHA } from '@tempots/std/color';
3
+ export interface OklchColorPickerOptions {
4
+ value: Value<OKLCHA>;
5
+ onChange?: (value: OKLCHA) => void;
6
+ onInput?: (value: OKLCHA) => void;
7
+ withAlpha?: Value<boolean>;
8
+ disabled?: Value<boolean>;
9
+ displayColorSwatch?: Value<boolean>;
10
+ }
11
+ /**
12
+ * Standalone OKLCH color picker with color field, L/C/H channel strips,
13
+ * optional alpha, and color swatch preview.
14
+ */
15
+ export declare function OklchColorPicker(options: OklchColorPickerOptions): Renderable;
@@ -0,0 +1,17 @@
1
+ import { Renderable, Value } from '@tempots/dom';
2
+ import { type RGBA } from '@tempots/std/color';
3
+ export interface RgbColorPickerOptions {
4
+ value: Value<RGBA>;
5
+ onChange?: (value: RGBA) => void;
6
+ onInput?: (value: RGBA) => void;
7
+ withAlpha?: Value<boolean>;
8
+ disabled?: Value<boolean>;
9
+ displayColorSwatch?: Value<boolean>;
10
+ }
11
+ /**
12
+ * Standalone RGB color picker with color field, R/G/B channel strips,
13
+ * optional alpha, and color swatch preview.
14
+ *
15
+ * RGBA channels are 0–1 internally. Displayed as 0–100% in the inputs.
16
+ */
17
+ export declare function RgbColorPicker(options: RgbColorPickerOptions): Renderable;
@@ -40,7 +40,7 @@ export type ColorSwatchInputOptions = InputOptions<string> & {
40
40
  * const color = prop('#3498db')
41
41
  * ColorSwatchInput({
42
42
  * value: color,
43
- * onChange: color.set,
43
+ * onChange: v => color.set(v),
44
44
  * displayValue: true,
45
45
  * swatchSize: 40,
46
46
  * })