@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.
- package/dist/ar-Wr6gMs-M.cjs +1 -0
- package/dist/{ar-C-kUt6f9.js → ar-fdUqbCvM.js} +154 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/auth-divider-DewHpITQ.cjs +1 -0
- package/dist/{auth-divider-BIATan1F.js → auth-divider-qnJuYK-x.js} +7 -7
- package/dist/beatui.css +1711 -132
- package/dist/beatui.tailwind.css +1711 -132
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +5 -5
- package/dist/{modal-BHlp4QeT.js → custom-validation-BetUqAEz.js} +186 -186
- package/dist/custom-validation-CLscGHY4.cjs +1 -0
- package/dist/{de-CP0kbElb.js → de-C5-k5Eov.js} +156 -3
- package/dist/de-DZqdSEta.cjs +1 -0
- package/dist/deep-merge-D90SW1Ci.cjs +1 -0
- package/dist/deep-merge-ZVigk5Qf.js +1765 -0
- package/dist/{duration-input-C5il_E0F.cjs → duration-input-4AQnQpyo.cjs} +1 -1
- package/dist/{duration-input-DoCCrqOG.js → duration-input-GMBmT1BE.js} +4 -4
- package/dist/{editor-toolbar-group-QVdBUbB8.cjs → editor-toolbar-group-C_ft_T8D.cjs} +1 -1
- package/dist/{editor-toolbar-group-DWUWUO-B.js → editor-toolbar-group-FpOHrmtx.js} +2 -2
- package/dist/es-CJgYfRap.cjs +1 -0
- package/dist/{es-BtIkcnsw.js → es-h6jmoF4X.js} +156 -3
- package/dist/fa-BQ5PzwNY.cjs +1 -0
- package/dist/{fa-11-rZmQ-.js → fa-BuxK837l.js} +154 -1
- package/dist/fr-Bv3TG44U.cjs +1 -0
- package/dist/{fr-C-L2F8w2.js → fr-BwILQ9G2.js} +165 -12
- package/dist/he-5LbvgMCC.cjs +1 -0
- package/dist/{he-Bu1xGoQ9.js → he-yC9Sc7JD.js} +154 -1
- package/dist/{hi-CewH-MAH.js → hi-Da7rcCpP.js} +154 -1
- package/dist/hi-YWhWcG_L.cjs +1 -0
- package/dist/{index-BGKz2Nol.js → index-DI8bf9oC.js} +175 -172
- package/dist/index-DeUj-5ph.cjs +1 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +11548 -8326
- package/dist/{input-container-CO3DNqpp.js → input-container-8JFB11xN.js} +1 -1
- package/dist/{input-container-BkPcNDaZ.cjs → input-container-CyOgiiQD.cjs} +1 -1
- package/dist/it-BxOIJE45.cjs +1 -0
- package/dist/{it-5hiKQO_p.js → it-Yeklau78.js} +156 -3
- package/dist/ja-CNhjK06P.cjs +1 -0
- package/dist/{ja-CGfEmZrm.js → ja-Dxj9Q5Yd.js} +155 -2
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +10 -10
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +1 -1
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +5 -5
- package/dist/ko-DgkqcXTs.cjs +1 -0
- package/dist/{ko-DZthvREd.js → ko-gn_MsegK.js} +154 -1
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +4 -4
- package/dist/nl-Dy9lmbBO.cjs +1 -0
- package/dist/{nl-CcKyHlQ7.js → nl-vHNFtXXb.js} +162 -9
- package/dist/{notice-BXKtBEiC.js → notice-B6ojfenv.js} +4 -4
- package/dist/{notice-BBnSXYUc.cjs → notice-p2IqXS5-.cjs} +1 -1
- package/dist/{oneof-branch-detection-DSzC0PkO.js → oneof-branch-detection-Q_jxvJIA.js} +1 -1
- package/dist/{oneof-branch-detection-BEkAezNi.cjs → oneof-branch-detection-xDDDdYRk.cjs} +1 -1
- package/dist/pl-BtYbtsmG.cjs +1 -0
- package/dist/{pl-Mwtjp4MV.js → pl-C0UdHla0.js} +184 -31
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +4 -4
- package/dist/pt-CtNmqQ1X.cjs +1 -0
- package/dist/{pt-BaTsY-8f.js → pt-DGKtfN0d.js} +156 -3
- package/dist/ru-BaL_NPRU.cjs +1 -0
- package/dist/{ru-CvbGmz5s.js → ru-CpXYLt-v.js} +154 -1
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +1 -1
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/{text-input-D_IxFd0M.cjs → text-input-DS5zlXb2.cjs} +1 -1
- package/dist/{text-input-BAn02BzO.js → text-input-NJypZSnE.js} +1 -1
- package/dist/{toolbar-CnecqhaU.cjs → toolbar-BBwfe8U9.cjs} +1 -1
- package/dist/{toolbar-BKan3NHw.js → toolbar-BF2L6WKC.js} +1 -1
- package/dist/{tr-YFqQdZjM.js → tr-DIFZDFW_.js} +156 -3
- package/dist/tr-DwOd87oB.cjs +1 -0
- package/dist/{translations-CxDUnbXn.js → translations-5cXBrENb.js} +1 -1
- package/dist/{translations-DT5QQ4WO.js → translations-BCMP-h52.js} +269 -115
- package/dist/{translations-C_-cObaF.cjs → translations-BqWc0ZHz.cjs} +1 -1
- package/dist/translations-EwEmHe3v.cjs +1 -0
- package/dist/types/beatui-i18n/default.d.ts +109 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +109 -0
- package/dist/types/beatui-i18n/translations.d.ts +109 -0
- package/dist/types/components/button/copy-button.d.ts +42 -0
- package/dist/types/components/button/index.d.ts +1 -0
- package/dist/types/components/button/toggle-button-group.d.ts +2 -2
- package/dist/types/components/button/toggle-button.d.ts +2 -2
- package/dist/types/components/data/date-picker-shared.d.ts +2 -5
- package/dist/types/components/data/date-picker.d.ts +1 -1
- package/dist/types/components/data/date-range-picker.d.ts +1 -1
- package/dist/types/components/data/index.d.ts +3 -0
- package/dist/types/components/data/stat-card.d.ts +108 -0
- package/dist/types/components/data/time-picker.d.ts +54 -0
- package/dist/types/components/data/virtual-scrolling/index.d.ts +1 -0
- package/dist/types/components/data/virtual-scrolling/virtual-list.d.ts +91 -0
- package/dist/types/components/form/input/checkbox-input.d.ts +1 -1
- package/dist/types/components/form/input/color-input.d.ts +1 -1
- package/dist/types/components/form/input/color-picker/canvas-draw.d.ts +12 -0
- package/dist/types/components/form/input/color-picker/channel-picker.d.ts +71 -0
- package/dist/types/components/form/input/color-picker/hex-color-picker.d.ts +20 -0
- package/dist/types/components/form/input/color-picker/hsl-color-picker.d.ts +14 -0
- package/dist/types/components/form/input/color-picker/hwb-color-picker.d.ts +15 -0
- package/dist/types/components/form/input/color-picker/index.d.ts +7 -0
- package/dist/types/components/form/input/color-picker/oklch-color-picker.d.ts +15 -0
- package/dist/types/components/form/input/color-picker/rgb-color-picker.d.ts +17 -0
- package/dist/types/components/form/input/color-swatch-input.d.ts +1 -1
- package/dist/types/components/form/input/combobox-input.d.ts +1 -1
- package/dist/types/components/form/input/date-input.d.ts +1 -1
- package/dist/types/components/form/input/date-range-select-base.d.ts +23 -0
- package/dist/types/components/form/input/date-range-select.d.ts +64 -0
- package/dist/types/components/form/input/date-select.d.ts +52 -0
- package/dist/types/components/form/input/date-time-input.d.ts +1 -1
- package/dist/types/components/form/input/date-time-select-base.d.ts +23 -0
- package/dist/types/components/form/input/date-time-select.d.ts +66 -0
- package/dist/types/components/form/input/dropdown-input.d.ts +1 -1
- package/dist/types/components/form/input/email-input.d.ts +1 -1
- package/dist/types/components/form/input/index.d.ts +17 -0
- package/dist/types/components/form/input/nullable-date-select.d.ts +55 -0
- package/dist/types/components/form/input/nullable-date-time-select.d.ts +68 -0
- package/dist/types/components/form/input/nullable-time-select.d.ts +64 -0
- package/dist/types/components/form/input/number-input.d.ts +5 -40
- package/dist/types/components/form/input/number-stepper.d.ts +53 -0
- package/dist/types/components/form/input/open-date-range-select.d.ts +75 -0
- package/dist/types/components/form/input/otp-input.d.ts +2 -2
- package/dist/types/components/form/input/password-input.d.ts +1 -1
- package/dist/types/components/form/input/radio-group.d.ts +1 -1
- package/dist/types/components/form/input/range-slider.d.ts +4 -4
- package/dist/types/components/form/input/rating-input.d.ts +1 -1
- package/dist/types/components/form/input/segmented-input.d.ts +6 -2
- package/dist/types/components/form/input/segmented-select.d.ts +84 -0
- package/dist/types/components/form/input/slider-input.d.ts +2 -2
- package/dist/types/components/form/input/sortable-list.d.ts +68 -0
- package/dist/types/components/form/input/switch.d.ts +1 -1
- package/dist/types/components/form/input/text-area.d.ts +1 -1
- package/dist/types/components/form/input/text-input.d.ts +1 -1
- package/dist/types/components/form/input/time-format.d.ts +31 -0
- package/dist/types/components/form/input/time-select-base.d.ts +23 -0
- package/dist/types/components/form/input/time-select.d.ts +61 -0
- package/dist/types/components/form/input/transfer-list.d.ts +56 -0
- package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +1 -1
- package/dist/types/components/form/input/url-input.d.ts +1 -1
- package/dist/types/components/layout/nine-slice-scroll-view.d.ts +1 -1
- package/dist/types/components/navigation/index.d.ts +1 -0
- package/dist/types/components/navigation/stepper.d.ts +102 -0
- package/dist/types/components/overlay/index.d.ts +1 -1
- package/dist/types/components/overlay/spotlight.d.ts +62 -0
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/ur-D9nLchps.cjs +1 -0
- package/dist/{ur-CdnwwnG_.js → ur-DBst-TXc.js} +154 -1
- package/dist/{use-form-CP6nftVl.cjs → use-form-Dcra7GeE.cjs} +1 -1
- package/dist/{use-form-CmQdxpOi.js → use-form-NfobsGNl.js} +2 -2
- package/dist/{vi-Bwvz1d_n.js → vi-DQOJp32U.js} +183 -30
- package/dist/vi-Dg1aiMr5.cjs +1 -0
- package/dist/widget-customization-BtkexHgm.js +1458 -0
- package/dist/widget-customization-pqmtsraC.cjs +1 -0
- package/dist/{zh-hy7Uw6c5.js → zh-DPK4HXl2.js} +154 -1
- package/dist/zh-tbwSTbmn.cjs +1 -0
- package/package.json +9 -9
- package/dist/ar-Dc56zcjW.cjs +0 -1
- package/dist/auth-divider-CVKfA8Cp.cjs +0 -1
- package/dist/de-DboQlEC4.cjs +0 -1
- package/dist/deep-merge-B33Qtlmw.cjs +0 -1
- package/dist/deep-merge-BUsrE2v4.js +0 -1704
- package/dist/es-CAmE_0Ph.cjs +0 -1
- package/dist/fa-D9LrFZdW.cjs +0 -1
- package/dist/fr-DKogQyss.cjs +0 -1
- package/dist/he-CVx91Jdr.cjs +0 -1
- package/dist/hi-BgrHV72l.cjs +0 -1
- package/dist/index-DFF7Uahh.cjs +0 -1
- package/dist/it-B1rA1F9l.cjs +0 -1
- package/dist/ja-DZnjjqoi.cjs +0 -1
- package/dist/ko-CDnYKYWU.cjs +0 -1
- package/dist/modal-BmpfNL48.cjs +0 -1
- package/dist/nl-Bj8QnDEY.cjs +0 -1
- package/dist/pl-BmuuxxVd.cjs +0 -1
- package/dist/pt-RiC0yeVA.cjs +0 -1
- package/dist/ru-pRqtOQHF.cjs +0 -1
- package/dist/tr-B9JhBJeL.cjs +0 -1
- package/dist/translations-qefRsdGi.cjs +0 -1
- package/dist/types/components/overlay/command-palette.d.ts +0 -17
- package/dist/types/utils/color.d.ts +0 -346
- package/dist/ur-BZakU0iv.cjs +0 -1
- package/dist/vi-D1nly0nb.cjs +0 -1
- package/dist/widget-customization-B0y-eesp.cjs +0 -1
- package/dist/widget-customization-CKbR4Dsg.js +0 -1066
- 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").
|
|
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>;
|
|
@@ -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
|
* })
|
|
@@ -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,
|