@tempots/beatui 1.5.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 (184) 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-BIATan1F.js → auth-divider-qnJuYK-x.js} +7 -7
  7. package/dist/beatui.css +1711 -132
  8. package/dist/beatui.tailwind.css +1711 -132
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +5 -5
  11. package/dist/{modal-BHlp4QeT.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-C5il_E0F.cjs → duration-input-4AQnQpyo.cjs} +1 -1
  18. package/dist/{duration-input-DoCCrqOG.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 +11548 -8326
  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 +10 -10
  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-BXKtBEiC.js → notice-B6ojfenv.js} +4 -4
  54. package/dist/{notice-BBnSXYUc.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/date-picker-shared.d.ts +2 -5
  87. package/dist/types/components/data/date-picker.d.ts +1 -1
  88. package/dist/types/components/data/date-range-picker.d.ts +1 -1
  89. package/dist/types/components/data/index.d.ts +3 -0
  90. package/dist/types/components/data/stat-card.d.ts +108 -0
  91. package/dist/types/components/data/time-picker.d.ts +54 -0
  92. package/dist/types/components/data/virtual-scrolling/index.d.ts +1 -0
  93. package/dist/types/components/data/virtual-scrolling/virtual-list.d.ts +91 -0
  94. package/dist/types/components/form/input/checkbox-input.d.ts +1 -1
  95. package/dist/types/components/form/input/color-input.d.ts +1 -1
  96. package/dist/types/components/form/input/color-picker/canvas-draw.d.ts +12 -0
  97. package/dist/types/components/form/input/color-picker/channel-picker.d.ts +71 -0
  98. package/dist/types/components/form/input/color-picker/hex-color-picker.d.ts +20 -0
  99. package/dist/types/components/form/input/color-picker/hsl-color-picker.d.ts +14 -0
  100. package/dist/types/components/form/input/color-picker/hwb-color-picker.d.ts +15 -0
  101. package/dist/types/components/form/input/color-picker/index.d.ts +7 -0
  102. package/dist/types/components/form/input/color-picker/oklch-color-picker.d.ts +15 -0
  103. package/dist/types/components/form/input/color-picker/rgb-color-picker.d.ts +17 -0
  104. package/dist/types/components/form/input/color-swatch-input.d.ts +1 -1
  105. package/dist/types/components/form/input/combobox-input.d.ts +1 -1
  106. package/dist/types/components/form/input/date-input.d.ts +1 -1
  107. package/dist/types/components/form/input/date-range-select-base.d.ts +23 -0
  108. package/dist/types/components/form/input/date-range-select.d.ts +64 -0
  109. package/dist/types/components/form/input/date-select.d.ts +52 -0
  110. package/dist/types/components/form/input/date-time-input.d.ts +1 -1
  111. package/dist/types/components/form/input/date-time-select-base.d.ts +23 -0
  112. package/dist/types/components/form/input/date-time-select.d.ts +66 -0
  113. package/dist/types/components/form/input/dropdown-input.d.ts +1 -1
  114. package/dist/types/components/form/input/email-input.d.ts +1 -1
  115. package/dist/types/components/form/input/index.d.ts +17 -0
  116. package/dist/types/components/form/input/nullable-date-select.d.ts +55 -0
  117. package/dist/types/components/form/input/nullable-date-time-select.d.ts +68 -0
  118. package/dist/types/components/form/input/nullable-time-select.d.ts +64 -0
  119. package/dist/types/components/form/input/number-input.d.ts +5 -40
  120. package/dist/types/components/form/input/number-stepper.d.ts +53 -0
  121. package/dist/types/components/form/input/open-date-range-select.d.ts +75 -0
  122. package/dist/types/components/form/input/otp-input.d.ts +2 -2
  123. package/dist/types/components/form/input/password-input.d.ts +1 -1
  124. package/dist/types/components/form/input/radio-group.d.ts +1 -1
  125. package/dist/types/components/form/input/range-slider.d.ts +4 -4
  126. package/dist/types/components/form/input/rating-input.d.ts +1 -1
  127. package/dist/types/components/form/input/segmented-input.d.ts +6 -2
  128. package/dist/types/components/form/input/segmented-select.d.ts +84 -0
  129. package/dist/types/components/form/input/slider-input.d.ts +2 -2
  130. package/dist/types/components/form/input/sortable-list.d.ts +68 -0
  131. package/dist/types/components/form/input/switch.d.ts +1 -1
  132. package/dist/types/components/form/input/text-area.d.ts +1 -1
  133. package/dist/types/components/form/input/text-input.d.ts +1 -1
  134. package/dist/types/components/form/input/time-format.d.ts +31 -0
  135. package/dist/types/components/form/input/time-select-base.d.ts +23 -0
  136. package/dist/types/components/form/input/time-select.d.ts +61 -0
  137. package/dist/types/components/form/input/transfer-list.d.ts +56 -0
  138. package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +1 -1
  139. package/dist/types/components/form/input/url-input.d.ts +1 -1
  140. package/dist/types/components/layout/nine-slice-scroll-view.d.ts +1 -1
  141. package/dist/types/components/navigation/index.d.ts +1 -0
  142. package/dist/types/components/navigation/stepper.d.ts +102 -0
  143. package/dist/types/components/overlay/index.d.ts +1 -1
  144. package/dist/types/components/overlay/spotlight.d.ts +62 -0
  145. package/dist/types/utils/index.d.ts +0 -1
  146. package/dist/ur-D9nLchps.cjs +1 -0
  147. package/dist/{ur-CdnwwnG_.js → ur-DBst-TXc.js} +154 -1
  148. package/dist/{use-form-CP6nftVl.cjs → use-form-Dcra7GeE.cjs} +1 -1
  149. package/dist/{use-form-CmQdxpOi.js → use-form-NfobsGNl.js} +2 -2
  150. package/dist/{vi-Bwvz1d_n.js → vi-DQOJp32U.js} +183 -30
  151. package/dist/vi-Dg1aiMr5.cjs +1 -0
  152. package/dist/widget-customization-BtkexHgm.js +1458 -0
  153. package/dist/widget-customization-pqmtsraC.cjs +1 -0
  154. package/dist/{zh-hy7Uw6c5.js → zh-DPK4HXl2.js} +154 -1
  155. package/dist/zh-tbwSTbmn.cjs +1 -0
  156. package/package.json +9 -9
  157. package/dist/ar-Dc56zcjW.cjs +0 -1
  158. package/dist/auth-divider-CVKfA8Cp.cjs +0 -1
  159. package/dist/de-DboQlEC4.cjs +0 -1
  160. package/dist/deep-merge-B33Qtlmw.cjs +0 -1
  161. package/dist/deep-merge-BUsrE2v4.js +0 -1704
  162. package/dist/es-CAmE_0Ph.cjs +0 -1
  163. package/dist/fa-D9LrFZdW.cjs +0 -1
  164. package/dist/fr-DKogQyss.cjs +0 -1
  165. package/dist/he-CVx91Jdr.cjs +0 -1
  166. package/dist/hi-BgrHV72l.cjs +0 -1
  167. package/dist/index-DFF7Uahh.cjs +0 -1
  168. package/dist/it-B1rA1F9l.cjs +0 -1
  169. package/dist/ja-DZnjjqoi.cjs +0 -1
  170. package/dist/ko-CDnYKYWU.cjs +0 -1
  171. package/dist/modal-BmpfNL48.cjs +0 -1
  172. package/dist/nl-Bj8QnDEY.cjs +0 -1
  173. package/dist/pl-BmuuxxVd.cjs +0 -1
  174. package/dist/pt-RiC0yeVA.cjs +0 -1
  175. package/dist/ru-pRqtOQHF.cjs +0 -1
  176. package/dist/tr-B9JhBJeL.cjs +0 -1
  177. package/dist/translations-qefRsdGi.cjs +0 -1
  178. package/dist/types/components/overlay/command-palette.d.ts +0 -17
  179. package/dist/types/utils/color.d.ts +0 -346
  180. package/dist/ur-BZakU0iv.cjs +0 -1
  181. package/dist/vi-D1nly0nb.cjs +0 -1
  182. package/dist/widget-customization-B0y-eesp.cjs +0 -1
  183. package/dist/widget-customization-CKbR4Dsg.js +0 -1066
  184. package/dist/zh-DBk7sSD9.cjs +0 -1
@@ -4,6 +4,7 @@ export * from './base64s-input';
4
4
  export * from './checkbox-input';
5
5
  export * from './tri-state-checkbox-input';
6
6
  export * from './color-input';
7
+ export * from './color-picker/index';
7
8
  export * from './color-swatch-input';
8
9
  export * from './nullable-color-input';
9
10
  export * from './nullable-color-swatch-input';
@@ -14,6 +15,11 @@ export * from './select-tags-input';
14
15
  export * from './combobox-tags-input';
15
16
  export * from './multi-select';
16
17
  export * from './date-input';
18
+ export * from './date-range-select';
19
+ export * from './date-range-select-base';
20
+ export * from './open-date-range-select';
21
+ export * from './date-select';
22
+ export * from './nullable-date-select';
17
23
  export * from './date-time-input';
18
24
  export * from './editable-text';
19
25
  export * from './email-input';
@@ -36,12 +42,16 @@ export * from './nullable-password-input';
36
42
  export * from './nullable-text-area';
37
43
  export * from './nullable-text-input';
38
44
  export * from './number-input';
45
+ export * from './number-stepper';
46
+ export * from './sortable-list';
47
+ export * from './transfer-list';
39
48
  export * from './nullable-number-input';
40
49
  export * from './option';
41
50
  export * from './bigint-input';
42
51
  export * from './nullable-bigint-input';
43
52
  export * from './password-input';
44
53
  export * from './segmented-input';
54
+ export * from './segmented-select';
45
55
  export * from './switch';
46
56
  export * from './tag-input';
47
57
  export * from './tags-input';
@@ -55,6 +65,13 @@ export * from './radio-group';
55
65
  export * from './slider-input';
56
66
  export * from './range-slider';
57
67
  export * from './otp-input';
68
+ export * from './time-format';
69
+ export * from './time-select';
70
+ export * from './time-select-base';
71
+ export * from './nullable-time-select';
72
+ export * from './date-time-select';
73
+ export * from './date-time-select-base';
74
+ export * from './nullable-date-time-select';
58
75
  export * from './plain-date-input';
59
76
  export * from './nullable-plain-date-input';
60
77
  export * from './plain-time-input';
@@ -0,0 +1,55 @@
1
+ import { type TNode, Value, type Merge } from '@tempots/dom';
2
+ import { CommonInputOptions } from './input-options';
3
+ import type { PlainDate } from '../../../temporal/types';
4
+ import { ThemeColorName } from '../../../tokens';
5
+ /**
6
+ * Configuration options for the {@link NullableDateSelect} component.
7
+ */
8
+ export type NullableDateSelectOptions = Merge<CommonInputOptions, {
9
+ /** The selected date, or null when unset. */
10
+ value: Value<PlainDate | null>;
11
+ /** Callback invoked when the date changes (receives null when cleared). */
12
+ onChange?: (date: PlainDate | null) => void;
13
+ /** Callback invoked on blur. */
14
+ onBlur?: () => void;
15
+ /** Predicate returning true if a date should be disabled. */
16
+ isDateDisabled?: (date: PlainDate) => boolean;
17
+ /** Theme color. @default 'primary' */
18
+ color?: Value<ThemeColorName>;
19
+ /** The day the week starts on (0=Sun, 1=Mon). @default 0 */
20
+ weekStartsOn?: Value<number>;
21
+ /** Format a PlainDate for display. Defaults to ISO string. */
22
+ formatDate?: (date: PlainDate) => string;
23
+ /** Placeholder shown when no date is selected. @default i18n dateRangeSelectDate */
24
+ placeholder?: string;
25
+ /** Content to render before the display text. */
26
+ before?: TNode;
27
+ /** Content to render after the display text. */
28
+ after?: TNode;
29
+ }>;
30
+ /**
31
+ * A dropdown single-date selector where the value may be null.
32
+ *
33
+ * Displays the selected date in a styled trigger button, or a placeholder when
34
+ * no date is selected. A reset (clear) button is shown in the trigger when a
35
+ * date is set, allowing the user to clear back to null.
36
+ *
37
+ * Use {@link DateSelect} when a date is always required.
38
+ *
39
+ * @param options - Configuration for the nullable date selector
40
+ * @returns A nullable date selector element
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * import { prop } from '@tempots/dom'
45
+ * import { NullableDateSelect } from '@tempots/beatui'
46
+ *
47
+ * const date = prop<PlainDate | null>(null)
48
+ * NullableDateSelect({
49
+ * value: date,
50
+ * onChange: v => date.set(v),
51
+ * placeholder: 'Select a date',
52
+ * })
53
+ * ```
54
+ */
55
+ export declare function NullableDateSelect(options: NullableDateSelectOptions): TNode;
@@ -0,0 +1,68 @@
1
+ import { type TNode, Value, type Merge } from '@tempots/dom';
2
+ import { CommonInputOptions } from './input-options';
3
+ import type { PlainDate, PlainDateTime } from '../../../temporal/types';
4
+ import { ThemeColorName } from '../../../tokens';
5
+ /**
6
+ * Configuration options for the {@link NullableDateTimeSelect} component.
7
+ */
8
+ export type NullableDateTimeSelectOptions = Merge<CommonInputOptions, {
9
+ /** The selected date-time, or null when unset. */
10
+ value: Value<PlainDateTime | null>;
11
+ /** Callback invoked when the date-time changes (receives null when cleared). */
12
+ onChange?: (dateTime: PlainDateTime | null) => void;
13
+ /** Callback invoked on blur. */
14
+ onBlur?: () => void;
15
+ /** Predicate returning true if a date should be disabled. */
16
+ isDateDisabled?: (date: PlainDate) => boolean;
17
+ /** Theme color. @default 'primary' */
18
+ color?: Value<ThemeColorName>;
19
+ /** The day the week starts on (0=Sun, 1=Mon). @default 0 */
20
+ weekStartsOn?: Value<number>;
21
+ /** Whether to show seconds in the time picker. @default false */
22
+ showSeconds?: Value<boolean>;
23
+ /** Whether to use 12-hour format. When omitted, auto-detected from locale. */
24
+ use12Hour?: Value<boolean>;
25
+ /** Step for minutes column. @default 1 */
26
+ minuteStep?: Value<number>;
27
+ /** Step for seconds column. @default 1 */
28
+ secondStep?: Value<number>;
29
+ /** Whether to show a "Now" button in the time picker. @default false */
30
+ showNow?: Value<boolean>;
31
+ /** Format a PlainDateTime for display. When omitted, uses locale-aware 12/24-hour format. */
32
+ formatDateTime?: (dt: PlainDateTime) => string;
33
+ /** Placeholder shown when no date-time is selected. @default i18n dateTimeSelectDateTime */
34
+ placeholder?: string;
35
+ /** Content to render before the display text. */
36
+ before?: TNode;
37
+ /** Content to render after the display text. */
38
+ after?: TNode;
39
+ }>;
40
+ /**
41
+ * A dropdown date-time selector where the value may be null.
42
+ *
43
+ * Displays the selected date-time in a styled trigger button, or a placeholder
44
+ * when nothing is selected. A reset (clear) button is shown when a date-time
45
+ * is set, allowing the user to clear back to null.
46
+ *
47
+ * When no custom `formatDateTime` is provided, the time portion adapts to the
48
+ * locale's 12/24-hour convention (or the explicit `use12Hour` prop).
49
+ *
50
+ * Use {@link DateTimeSelect} when a date-time is always required.
51
+ *
52
+ * @param options - Configuration for the nullable date-time selector
53
+ * @returns A nullable date-time selector element
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * import { prop } from '@tempots/dom'
58
+ * import { NullableDateTimeSelect } from '@tempots/beatui'
59
+ *
60
+ * const dt = prop<PlainDateTime | null>(null)
61
+ * NullableDateTimeSelect({
62
+ * value: dt,
63
+ * onChange: v => dt.set(v),
64
+ * placeholder: 'Select date and time',
65
+ * })
66
+ * ```
67
+ */
68
+ export declare function NullableDateTimeSelect(options: NullableDateTimeSelectOptions): TNode;
@@ -0,0 +1,64 @@
1
+ import { type TNode, Value, type Merge } from '@tempots/dom';
2
+ import { CommonInputOptions } from './input-options';
3
+ import type { PlainTime } from '../../../temporal/types';
4
+ import { ThemeColorName } from '../../../tokens';
5
+ /**
6
+ * Configuration options for the {@link NullableTimeSelect} component.
7
+ */
8
+ export type NullableTimeSelectOptions = Merge<CommonInputOptions, {
9
+ /** The selected time, or null when unset. */
10
+ value: Value<PlainTime | null>;
11
+ /** Callback invoked when the time changes (receives null when cleared). */
12
+ onChange?: (time: PlainTime | null) => void;
13
+ /** Callback invoked on blur. */
14
+ onBlur?: () => void;
15
+ /** Theme color. @default 'primary' */
16
+ color?: Value<ThemeColorName>;
17
+ /** Whether to show seconds. @default false */
18
+ showSeconds?: Value<boolean>;
19
+ /** Whether to use 12-hour format. When omitted, auto-detected from the current locale. */
20
+ use12Hour?: Value<boolean>;
21
+ /** Step for minutes column. @default 1 */
22
+ minuteStep?: Value<number>;
23
+ /** Step for seconds column. @default 1 */
24
+ secondStep?: Value<number>;
25
+ /** Whether to show a "Now" button. @default false */
26
+ showNow?: Value<boolean>;
27
+ /** Format a PlainTime for display. When omitted, uses locale-aware 12/24-hour format. */
28
+ formatTime?: (time: PlainTime) => string;
29
+ /** Placeholder shown when no time is selected. @default i18n timeSelectTime */
30
+ placeholder?: string;
31
+ /** Content to render before the display text. */
32
+ before?: TNode;
33
+ /** Content to render after the display text. */
34
+ after?: TNode;
35
+ }>;
36
+ /**
37
+ * A dropdown time selector where the value may be null.
38
+ *
39
+ * Displays the selected time in a styled trigger button, or a placeholder when
40
+ * no time is selected. A reset (clear) button is shown in the trigger when a
41
+ * time is set, allowing the user to clear back to null.
42
+ *
43
+ * When no custom `formatTime` is provided, the display adapts to the
44
+ * locale's 12/24-hour convention (or the explicit `use12Hour` prop).
45
+ *
46
+ * Use {@link TimeSelect} when a time is always required.
47
+ *
48
+ * @param options - Configuration for the nullable time selector
49
+ * @returns A nullable time selector element
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * import { prop } from '@tempots/dom'
54
+ * import { NullableTimeSelect } from '@tempots/beatui'
55
+ *
56
+ * const time = prop<PlainTime | null>(null)
57
+ * NullableTimeSelect({
58
+ * value: time,
59
+ * onChange: v => time.set(v),
60
+ * placeholder: 'Select a time',
61
+ * })
62
+ * ```
63
+ */
64
+ export declare function NullableTimeSelect(options: NullableTimeSelectOptions): TNode;
@@ -1,4 +1,4 @@
1
- import { Value } from '@tempots/dom';
1
+ import { Value, TNode } from '@tempots/dom';
2
2
  import { InputOptions } from './input-options';
3
3
  import { Merge } from '@tempots/std';
4
4
  /**
@@ -15,44 +15,9 @@ export type NumberInputOptions = Merge<InputOptions<number>, {
15
15
  min?: Value<number>;
16
16
  /** Maximum allowed value. Disables increment when reached. @default 10 */
17
17
  max?: Value<number>;
18
+ /** Unit of measurement label displayed after the input (e.g., "kg", "px", "%"). Rendered before stepper buttons. */
19
+ unit?: TNode;
20
+ /** When true, displays the value formatted with locale-aware grouping and decimals (derived from step) when the input is not focused. @default false */
21
+ formatted?: Value<boolean>;
18
22
  }>;
19
- /**
20
- * A numeric input component wrapping a native `<input type="number">` with optional stepper buttons.
21
- *
22
- * Renders a styled number field inside an {@link InputContainer} with support for
23
- * reactive values, min/max constraints, and an optional step increment. When `step`
24
- * is provided, increment/decrement buttons appear alongside the input, and mouse
25
- * wheel scrolling adjusts the value. Holding Shift while clicking steppers or
26
- * scrolling applies a 10x multiplier to the step value.
27
- *
28
- * @param options - Configuration options for the number input
29
- * @returns A styled number input element with optional stepper buttons, wrapped in an InputContainer
30
- *
31
- * @example
32
- * ```ts
33
- * import { prop } from '@tempots/dom'
34
- * import { NumberInput } from '@tempots/beatui'
35
- *
36
- * const quantity = prop(1)
37
- * NumberInput({
38
- * value: quantity,
39
- * onChange: quantity.set,
40
- * min: 0,
41
- * max: 100,
42
- * step: 1,
43
- * placeholder: 'Quantity',
44
- * })
45
- * ```
46
- *
47
- * @example
48
- * ```ts
49
- * // Without stepper buttons (no step provided)
50
- * NumberInput({
51
- * value: prop(0),
52
- * onChange: (v) => console.log('Value:', v),
53
- * min: -10,
54
- * max: 10,
55
- * })
56
- * ```
57
- */
58
23
  export declare const NumberInput: (options: NumberInputOptions) => import("@tempots/dom").Renderable;
@@ -0,0 +1,53 @@
1
+ import { TNode, Value } from '@tempots/dom';
2
+ import { ControlSize } from '../../theme';
3
+ import { ThemeColorName } from '../../../tokens';
4
+ /** Orientation of the stepper layout. */
5
+ export type NumberStepperOrientation = 'horizontal' | 'vertical';
6
+ /** Configuration options for the {@link NumberStepper} component. */
7
+ export interface NumberStepperOptions {
8
+ /** The current numeric value. @default 1*/
9
+ value: Value<number>;
10
+ /** Callback invoked when the value changes. */
11
+ onChange: (value: number) => void;
12
+ /** Minimum allowed value. @default 0 */
13
+ min?: Value<number>;
14
+ /** Maximum allowed value. @default 100 */
15
+ max?: Value<number>;
16
+ /** Increment/decrement step. @default 1 */
17
+ step?: Value<number>;
18
+ /** Size of the stepper. @default 'md' */
19
+ size?: Value<ControlSize>;
20
+ /** Theme color. @default 'base' */
21
+ color?: Value<ThemeColorName>;
22
+ /** Whether the stepper is disabled. @default false */
23
+ disabled?: Value<boolean>;
24
+ /** Layout orientation. @default 'horizontal' */
25
+ orientation?: Value<NumberStepperOrientation>;
26
+ }
27
+ /**
28
+ * A quantity selector with compact +/- buttons and a displayed value.
29
+ *
30
+ * Unlike {@link NumberInput}, this component does not include a text field —
31
+ * it shows the current value between decrement and increment buttons. Ideal
32
+ * for cart quantities, counters, and other discrete value adjustments.
33
+ *
34
+ * Supports both horizontal (default) and vertical orientation.
35
+ *
36
+ * @param options - Configuration for the number stepper
37
+ * @returns A number stepper element
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * import { prop } from '@tempots/dom'
42
+ * import { NumberStepper } from '@tempots/beatui'
43
+ *
44
+ * const qty = prop(1)
45
+ * NumberStepper({
46
+ * value: qty,
47
+ * onChange: v => qty.set(v),
48
+ * min: 0,
49
+ * max: 99,
50
+ * })
51
+ * ```
52
+ */
53
+ export declare function NumberStepper(options: NumberStepperOptions): TNode;
@@ -0,0 +1,75 @@
1
+ import { type TNode, Value, type Merge } from '@tempots/dom';
2
+ import { CommonInputOptions } from './input-options';
3
+ import type { PlainDate } from '../../../temporal/types';
4
+ import { ThemeColorName } from '../../../tokens';
5
+ /**
6
+ * An open date range where either or both dates may be null/undefined.
7
+ */
8
+ export type OpenDateRange = [
9
+ PlainDate | null | undefined,
10
+ PlainDate | null | undefined
11
+ ];
12
+ /**
13
+ * Configuration options for the {@link OpenDateRangeSelect} component.
14
+ *
15
+ * Either or both dates can be null/undefined, allowing open-ended ranges
16
+ * like "from X onwards" or "up to Y".
17
+ */
18
+ export type OpenDateRangeSelectOptions = Merge<CommonInputOptions, {
19
+ /** The selected date range as `[start, end]`. Either value may be null/undefined. */
20
+ value: Value<OpenDateRange>;
21
+ /** Callback invoked when the range changes. */
22
+ onChange?: (range: OpenDateRange) => void;
23
+ /** Callback invoked on blur. */
24
+ onBlur?: () => void;
25
+ /** Predicate returning true if a date should be disabled. */
26
+ isDateDisabled?: (date: PlainDate) => boolean;
27
+ /** Theme color. @default 'primary' */
28
+ color?: Value<ThemeColorName>;
29
+ /** The day the week starts on (0=Sun, 1=Mon). @default 0 */
30
+ weekStartsOn?: Value<number>;
31
+ /** Format a PlainDate for display. Defaults to ISO string. */
32
+ formatDate?: (date: PlainDate) => string;
33
+ /** Label for the start picker. @default i18n dateRangeStart */
34
+ startLabel?: string;
35
+ /** Label for the end picker. @default i18n dateRangeEnd */
36
+ endLabel?: string;
37
+ /** Placeholder when no date is selected. @default i18n dateRangeNoLimit */
38
+ emptyPlaceholder?: string;
39
+ /** Content to render before the display text. */
40
+ before?: TNode;
41
+ /** Content to render after the display text. */
42
+ after?: TNode;
43
+ }>;
44
+ /**
45
+ * A date range selector that allows open-ended ranges.
46
+ *
47
+ * Displays the selected range in a styled trigger button. Clicking opens a
48
+ * flyout panel with two side-by-side {@link DatePicker} components for
49
+ * selecting start and end dates independently. Either or both dates can be
50
+ * null/undefined, enabling "from X onwards" or "up to Y" ranges.
51
+ *
52
+ * Use {@link DateRangeSelect} when both dates are always required.
53
+ *
54
+ * @param options - Configuration for the open date range selector
55
+ * @returns An open date range selector element
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * import { prop } from '@tempots/dom'
60
+ * import { OpenDateRangeSelect } from '@tempots/beatui'
61
+ * import { Temporal } from '@js-temporal/polyfill'
62
+ *
63
+ * // Open-ended range: from a date onwards
64
+ * const range = prop<OpenDateRange>([
65
+ * Temporal.PlainDate.from('2026-01-01'),
66
+ * null,
67
+ * ])
68
+ * OpenDateRangeSelect({
69
+ * value: range,
70
+ * onChange: v => range.set(v),
71
+ * emptyPlaceholder: 'No limit',
72
+ * })
73
+ * ```
74
+ */
75
+ export declare function OpenDateRangeSelect(options: OpenDateRangeSelectOptions): TNode;
@@ -55,7 +55,7 @@ export interface OtpInputOptions {
55
55
  * const code = prop('')
56
56
  * OtpInput({
57
57
  * value: code,
58
- * onChange: code.set,
58
+ * onChange: v => code.set(v),
59
59
  * onComplete: (v) => console.log('Code entered:', v),
60
60
  * length: 6,
61
61
  * })
@@ -74,4 +74,4 @@ export interface OtpInputOptions {
74
74
  * })
75
75
  * ```
76
76
  */
77
- export declare function OtpInput({ length, value, onChange, onComplete, disabled, mask, type, size, color, placeholder, autoFocus, }?: OtpInputOptions): import("@tempots/dom").Renderable;
77
+ export declare function OtpInput({ length, value, onChange, onComplete, disabled, mask, type, size, color, placeholder, autoFocus, }?: OtpInputOptions): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
@@ -22,7 +22,7 @@ import { InputOptions } from './input-options';
22
22
  * const password = prop('')
23
23
  * PasswordInput({
24
24
  * value: password,
25
- * onChange: password.set,
25
+ * onChange: v => password.set(v),
26
26
  * placeholder: 'Enter password',
27
27
  * })
28
28
  * ```
@@ -72,7 +72,7 @@ export interface RadioGroupOptions<V = string> {
72
72
  * { value: 'dark', label: 'Dark Mode' },
73
73
  * ],
74
74
  * value: theme,
75
- * onChange: theme.set,
75
+ * onChange: v => theme.set(v),
76
76
  * orientation: 'horizontal'
77
77
  * })
78
78
  * ```
@@ -146,7 +146,7 @@ export interface RangeSliderOptions {
146
146
  * // Simple single-value slider
147
147
  * const vol = prop(50)
148
148
  * RangeSlider({
149
- * value: vol, onChange: vol.set,
149
+ * value: vol, onChange: v => vol.set(v),
150
150
  * min: 0, max: 100,
151
151
  * showValue: true,
152
152
  * })
@@ -157,7 +157,7 @@ export interface RangeSliderOptions {
157
157
  * // Dual-thumb range selector
158
158
  * const priceRange = prop<[number, number]>([20, 80])
159
159
  * RangeSlider({
160
- * range: priceRange, onRangeChange: priceRange.set,
160
+ * range: priceRange, onRangeChange: v => priceRange.set(v),
161
161
  * min: 0, max: 100,
162
162
  * showValue: true,
163
163
  * formatValue: v => `$${v}`,
@@ -169,7 +169,7 @@ export interface RangeSliderOptions {
169
169
  * // Multi-point slider
170
170
  * const pts = prop([10, 40, 70])
171
171
  * RangeSlider({
172
- * points: pts, onPointsChange: pts.set,
172
+ * points: pts, onPointsChange: v => pts.set(v),
173
173
  * min: 0, max: 100,
174
174
  * showValue: true,
175
175
  * })
@@ -182,7 +182,7 @@ export interface RangeSliderOptions {
182
182
  * html.div(
183
183
  * attr.style('height: 200px'),
184
184
  * RangeSlider({
185
- * value: vol, onChange: vol.set,
185
+ * value: vol, onChange: v => vol.set(v),
186
186
  * min: 0, max: 100,
187
187
  * orientation: 'vertical',
188
188
  * })
@@ -47,7 +47,7 @@ export type RatingInputOptions = InputOptions<number> & {
47
47
  * const rating = prop(3.5)
48
48
  * RatingInput({
49
49
  * value: rating,
50
- * onChange: rating.set,
50
+ * onChange: v => rating.set(v),
51
51
  * max: 5,
52
52
  * rounding: 0.5,
53
53
  * })
@@ -29,6 +29,10 @@ export interface SegmentedInputOptions<T extends Record<string, TNode>, K extend
29
29
  * When not set, uses the default white indicator with primary-tinted active text.
30
30
  */
31
31
  color?: Value<ThemeColorName>;
32
+ /**
33
+ * Subset of keys to display. If not provided, all keys are displayed.
34
+ */
35
+ subset?: Value<K[]>;
32
36
  }
33
37
  /**
34
38
  * A segmented control input that allows selecting one of several mutually exclusive options.
@@ -58,7 +62,7 @@ export interface SegmentedInputOptions<T extends Record<string, TNode>, K extend
58
62
  * table: 'Table',
59
63
  * },
60
64
  * value: view,
61
- * onChange: view.set,
65
+ * onChange: v => view.set(v),
62
66
  * size: 'md',
63
67
  * })
64
68
  * ```
@@ -76,4 +80,4 @@ export interface SegmentedInputOptions<T extends Record<string, TNode>, K extend
76
80
  * })
77
81
  * ```
78
82
  */
79
- export declare function SegmentedInput<T extends Record<string, TNode>>({ options, value, onChange, size, disabled, variant, color, }: SegmentedInputOptions<T, keyof T>, ...children: TNode[]): import("@tempots/dom").Renderable;
83
+ export declare function SegmentedInput<T extends Record<string, TNode>>({ options, value, onChange, size, disabled, variant, color, subset, }: SegmentedInputOptions<T, keyof T>, ...children: TNode[]): import("@tempots/dom").Renderable;
@@ -0,0 +1,84 @@
1
+ import { TNode, Value } from '@tempots/dom';
2
+ import { ControlSize } from '../../theme';
3
+ import { ThemeColorName } from '../../../tokens';
4
+ import { SelectOption } from './option';
5
+ /**
6
+ * Configuration options for the {@link SegmentedSelect} component.
7
+ *
8
+ * @template T - The type of the selectable option values
9
+ */
10
+ export interface SegmentedSelectOptions<T> {
11
+ /** The list of selectable options. Groups are flattened and breaks are ignored. */
12
+ options: Value<SelectOption<T>[]>;
13
+ /** The currently selected value */
14
+ value: Value<T>;
15
+ /** Callback invoked when a different option is selected */
16
+ onChange?: (value: T) => void;
17
+ /** Custom equality function for comparing option values. @default strict equality (===) */
18
+ equality?: (a: T, b: T) => boolean;
19
+ /** Visual size of the segmented control. @default 'md' */
20
+ size?: Value<ControlSize>;
21
+ /** Whether the segmented control is disabled. @default false */
22
+ disabled?: Value<boolean>;
23
+ /**
24
+ * Shape variant. `'pill'` uses fully rounded corners, `'squared'` uses control-like
25
+ * border-radius and taller padding to match the height of regular inputs like TextInput.
26
+ * @default 'squared'
27
+ */
28
+ variant?: Value<'pill' | 'squared'>;
29
+ /**
30
+ * Theme color for the active segment indicator and text, using solid button-style coloring.
31
+ * When not set, uses the default white indicator with primary-tinted active text.
32
+ */
33
+ color?: Value<ThemeColorName>;
34
+ }
35
+ /**
36
+ * A segmented control that allows selecting one value from a list of typed options.
37
+ *
38
+ * Renders a horizontal row of clickable segments with a sliding indicator, similar to
39
+ * {@link SegmentedInput}, but accepts {@link SelectOption} arrays with typed values
40
+ * instead of a static key-label record. This makes it suitable for use with the same
41
+ * option data used by {@link NativeSelect} or {@link DropdownInput}.
42
+ *
43
+ * Groups are flattened and breaks are ignored since segments are rendered as a flat row.
44
+ * Disabled individual options are respected.
45
+ *
46
+ * @template T - The type of the selectable option values
47
+ * @param options - Configuration options for the segmented select
48
+ * @param children - Additional child nodes to render after the control
49
+ * @returns A styled segmented control element with animated indicator
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * import { prop } from '@tempots/dom'
54
+ * import { SegmentedSelect, Option } from '@tempots/beatui'
55
+ *
56
+ * const selected = prop('list')
57
+ * SegmentedSelect({
58
+ * options: [
59
+ * Option.value('list', 'List'),
60
+ * Option.value('grid', 'Grid'),
61
+ * Option.value('table', 'Table'),
62
+ * ],
63
+ * value: selected,
64
+ * onChange: v => selected.set(v),
65
+ * })
66
+ * ```
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * // With typed enum values
71
+ * type Status = 'active' | 'inactive' | 'archived'
72
+ * const status = prop<Status>('active')
73
+ * SegmentedSelect<Status>({
74
+ * options: [
75
+ * Option.value('active', 'Active'),
76
+ * Option.value('inactive', 'Inactive'),
77
+ * Option.value('archived', 'Archived', { disabled: true }),
78
+ * ],
79
+ * value: status,
80
+ * onChange: v => status.set(v),
81
+ * })
82
+ * ```
83
+ */
84
+ export declare function SegmentedSelect<T>({ options, value, onChange, equality, size, disabled, variant, color, }: SegmentedSelectOptions<T>, ...children: TNode[]): import("@tempots/dom").Renderable;
@@ -42,7 +42,7 @@ export type SliderInputOptions = Merge<InputOptions<number>, {
42
42
  * const volume = prop(50)
43
43
  * SliderInput({
44
44
  * value: volume,
45
- * onChange: volume.set,
45
+ * onChange: v => volume.set(v),
46
46
  * min: 0,
47
47
  * max: 100,
48
48
  * step: 1,
@@ -105,7 +105,7 @@ export type NullableSliderInputOptions = Merge<InputOptions<number | null>, {
105
105
  * const brightness = prop<number | null>(null)
106
106
  * NullableSliderInput({
107
107
  * value: brightness,
108
- * onChange: brightness.set,
108
+ * onChange: v => brightness.set(v),
109
109
  * min: 0,
110
110
  * max: 100,
111
111
  * step: 5,