@tempots/beatui 0.94.0 → 1.0.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-CuI1Jgt6.cjs +1 -0
- package/dist/{ar-8Cko5i-Z.js → ar-DaKbK_t8.js} +88 -11
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-Rt0WDKAe.js → auth-divider-BQIhr3-R.js} +99 -98
- package/dist/auth-divider-DvnUModP.cjs +1 -0
- package/dist/beatui.css +1628 -541
- package/dist/beatui.tailwind.css +1629 -542
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +9 -9
- package/dist/codehighlight/index.cjs.js +22 -0
- package/dist/codehighlight/index.es.js +76 -0
- package/dist/colors-B-p6IzX9.cjs +1 -0
- package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
- package/dist/{de-Bt-d2iKj.js → de-3MTPDS1i.js} +83 -6
- package/dist/de-DthHehbh.cjs +1 -0
- package/dist/{deep-merge-CoLO4id0.js → deep-merge-BzIheQtH.js} +511 -517
- package/dist/deep-merge-EkjEgK0N.cjs +1 -0
- package/dist/{duration-input-47x7nbGh.cjs → duration-input-ClgYjeBa.cjs} +1 -1
- package/dist/{duration-input-DrVonjKK.js → duration-input-DGzmIImj.js} +5 -5
- package/dist/{editor-toolbar-group-CzdBZ1yr.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
- package/dist/{editor-toolbar-group-DhKJdqER.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
- package/dist/es-B6GJLk9h.cjs +1 -0
- package/dist/{es-2llfNFX2.js → es-DwMUvBeU.js} +95 -18
- package/dist/{fa-CQVIBjKP.js → fa-0rvQiKrJ.js} +88 -11
- package/dist/fa-BwgP93iV.cjs +1 -0
- package/dist/{fr-CC3smTlW.js → fr-B4i6NzLl.js} +87 -10
- package/dist/fr-CQzk5zqY.cjs +1 -0
- package/dist/{he-CZilsN75.js → he-C71n-hsn.js} +88 -11
- package/dist/he-DcxxvRfs.cjs +1 -0
- package/dist/hi-D-KHVWg4.cjs +1 -0
- package/dist/{hi-CAZjwGv-.js → hi-xmrXpeVU.js} +88 -11
- package/dist/index-B5MAsOC-.cjs +1 -0
- package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +8055 -5285
- package/dist/input-container-BvEcp7FU.js +275 -0
- package/dist/input-container-Di1YvVB_.cjs +1 -0
- package/dist/{it-D6RXFIL6.js → it-CDZTtOBC.js} +84 -7
- package/dist/it-D344Dutu.cjs +1 -0
- package/dist/ja-BNgnDZ27.cjs +1 -0
- package/dist/{ja-D7zsz4Ij.js → ja-Zz1LzidW.js} +92 -15
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +261 -257
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +132 -133
- package/dist/{ko-taN2Npr4.js → ko-9laUsZDL.js} +91 -14
- package/dist/ko-D-WJ9NK7.cjs +1 -0
- package/dist/lexical/index.cjs.js +2 -39
- package/dist/lexical/index.es.js +2102 -20521
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +41 -4
- package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
- package/dist/menu-B92oSDct.cjs +1 -0
- package/dist/modal-BT0jjDqX.cjs +1 -0
- package/dist/{modal-ZitwUeXx.js → modal-DBguyX-b.js} +9 -9
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +7 -7
- package/dist/nl-CrqUlFie.cjs +1 -0
- package/dist/{nl-CRC6r4Q4.js → nl-Dcll9fVA.js} +87 -10
- package/dist/{notice-E_p2hg1G.js → notice-E19wu9lA.js} +51 -51
- package/dist/notice-_9XhdrFw.cjs +1 -0
- package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
- package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
- package/dist/pl-9UksIrvX.cjs +1 -0
- package/dist/{pl-C6qNs0Lq.js → pl-Dm9N9Gbr.js} +84 -7
- package/dist/prosemirror/index.cjs.js +3 -1
- package/dist/prosemirror/index.es.js +636 -4
- package/dist/{pt-CcWPLqBh.js → pt-CFi5cn0k.js} +89 -12
- package/dist/pt-_kfdzwqi.cjs +1 -0
- package/dist/{ru-Dt9-9m0E.js → ru-CEhZUw8R.js} +92 -15
- package/dist/ru-CW1WNNlr.cjs +1 -0
- package/dist/stack-BLMteGTn.js +15 -0
- package/dist/stack-dwLevGa2.cjs +1 -0
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +2 -2
- package/dist/tailwind/vite-plugin.cjs.js +1 -1
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/text-input-DfqXolVe.js +55 -0
- package/dist/text-input-X_q01NsY.cjs +1 -0
- package/dist/toolbar-DY0ax2Qd.js +130 -0
- package/dist/toolbar-DoKdYXIL.cjs +1 -0
- package/dist/tr-B6GIRegf.cjs +1 -0
- package/dist/{tr-CDTWeRY0.js → tr-ZmnVDhLP.js} +83 -6
- package/dist/{translations-NBY7SubC.js → translations-A4kR7CW8.js} +1 -1
- package/dist/{translations-CiBhB2FV.js → translations-B1_yyDUK.js} +185 -106
- package/dist/{translations-BdCtLBZt.cjs → translations-C81buKAw.cjs} +1 -1
- package/dist/translations-Dbx7L7Q1.cjs +1 -0
- package/dist/types/beatui-i18n/default.d.ts +72 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +72 -0
- package/dist/types/beatui-i18n/translations.d.ts +72 -0
- package/dist/types/codehighlight/code-highlight.d.ts +21 -0
- package/dist/types/codehighlight/index.d.ts +14 -0
- package/dist/types/components/button/toggle-button.d.ts +4 -4
- package/dist/types/components/data/avatar.d.ts +3 -1
- package/dist/types/components/data/badge.d.ts +10 -18
- package/dist/types/components/data/column-filter-panel.d.ts +31 -0
- package/dist/types/components/data/column-filter.d.ts +110 -0
- package/dist/types/components/data/column-header-menu.d.ts +42 -0
- package/dist/types/components/data/data-source.d.ts +190 -0
- package/dist/types/components/data/data-table-body.d.ts +12 -0
- package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
- package/dist/types/components/data/data-table-context.d.ts +53 -0
- package/dist/types/components/data/data-table-header.d.ts +6 -0
- package/dist/types/components/data/data-table-resolve.d.ts +26 -0
- package/dist/types/components/data/data-table-types.d.ts +201 -0
- package/dist/types/components/data/data-table.d.ts +38 -0
- package/dist/types/components/data/data-toolbar.d.ts +44 -0
- package/dist/types/components/data/date-picker-shared.d.ts +55 -0
- package/dist/types/components/data/date-picker.d.ts +58 -0
- package/dist/types/components/data/date-range-picker.d.ts +56 -0
- package/dist/types/components/data/filter.d.ts +268 -0
- package/dist/types/components/data/index.d.ts +13 -4
- package/dist/types/components/data/indicator.d.ts +41 -0
- package/dist/types/components/data/progress-bar.d.ts +2 -2
- package/dist/types/components/data/selection-checkbox.d.ts +63 -0
- package/dist/types/components/data/skeleton.d.ts +1 -1
- package/dist/types/components/data/sortable-header.d.ts +55 -0
- package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
- package/dist/types/components/form/control/control.d.ts +9 -9
- package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
- package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
- package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
- package/dist/types/components/form/input/color-input.d.ts +1 -1
- package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
- package/dist/types/components/form/input/combobox-input.d.ts +5 -5
- package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/create-nullable-string-input.d.ts +2 -2
- package/dist/types/components/form/input/date-input.d.ts +4 -4
- package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
- package/dist/types/components/form/input/editable-text.d.ts +2 -2
- package/dist/types/components/form/input/email-input.d.ts +4 -4
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +1 -1
- package/dist/types/components/form/input/input-options.d.ts +28 -1
- package/dist/types/components/form/input/mask-input.d.ts +8 -2
- package/dist/types/components/form/input/native-select.d.ts +3 -3
- package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
- package/dist/types/components/form/input/nullable-email-input.d.ts +3 -3
- package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
- package/dist/types/components/form/input/number-input.d.ts +3 -3
- package/dist/types/components/form/input/otp-input.d.ts +12 -12
- package/dist/types/components/form/input/rating-input.d.ts +7 -8
- package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
- package/dist/types/components/form/input/switch.d.ts +2 -2
- package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
- package/dist/types/components/form/input/uuid-input.d.ts +2 -2
- package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
- package/dist/types/components/layout/card.d.ts +66 -0
- package/dist/types/components/layout/collapse.d.ts +2 -2
- package/dist/types/components/layout/flex.d.ts +26 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
- package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +2 -1
- package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
- package/dist/types/components/misc/index.d.ts +1 -0
- package/dist/types/components/misc/loading-overlay.d.ts +29 -0
- package/dist/types/components/misc/notice.d.ts +4 -4
- package/dist/types/components/misc/notification-provider.d.ts +9 -3
- package/dist/types/components/misc/notification.d.ts +9 -9
- package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
- package/dist/types/components/navigation/menu.d.ts +6 -6
- package/dist/types/components/navigation/pagination.d.ts +17 -4
- package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
- package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
- package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
- package/dist/types/components/overlay/dialogs.d.ts +2 -2
- package/dist/types/components/overlay/modal.d.ts +9 -2
- package/dist/types/components/overlay/tooltip.d.ts +6 -6
- package/dist/types/components/theme/types.d.ts +15 -4
- package/dist/types/lexical/index.d.ts +2 -2
- package/dist/types/lexical/plugins/index.d.ts +1 -1
- package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
- package/dist/types/lexical/plugins/text.d.ts +5 -0
- package/dist/types/lexical/types.d.ts +126 -5
- package/dist/types/lexical-i18n/default.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ar.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/de.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/en.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/es.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/fa.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/fr.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/he.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/hi.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/it.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ja.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ko.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/nl.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/pl.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/pt.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ru.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/tr.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/ur.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/vi.d.ts +1 -0
- package/dist/types/lexical-i18n/locales/zh.d.ts +1 -0
- package/dist/types/tokens/z-index.d.ts +18 -18
- package/dist/types/utils/use-animated-toggle.d.ts +12 -4
- package/dist/ur-CtFl_tz6.cjs +1 -0
- package/dist/{ur-CLrK5FPQ.js → ur-yYgj3NmT.js} +88 -11
- package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
- package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
- package/dist/use-form-CaW192gw.cjs +2 -0
- package/dist/{use-form-BQRVnIp9.js → use-form-Dn6v2tEh.js} +153 -152
- package/dist/utils-DmEuG3Np.cjs +1 -0
- package/dist/utils-vUtP6iPG.js +165 -0
- package/dist/{vi-B1_QDUQJ.js → vi-D5u4CLQO.js} +89 -12
- package/dist/vi-DyCZSpsk.cjs +1 -0
- package/dist/widget-customization-DgW1SXN6.cjs +1 -0
- package/dist/{widget-customization-C-fSx3RB.js → widget-customization-Dkx7kNSe.js} +413 -398
- package/dist/{zh-rDtQ92Pp.js → zh-B0kwMMer.js} +91 -14
- package/dist/zh-C3ZxMQKb.cjs +1 -0
- package/package.json +209 -38
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/ar-D2DjoXta.cjs +0 -1
- package/dist/auth-divider-C3E16pml.cjs +0 -1
- package/dist/colors-BI0YhONJ.cjs +0 -1
- package/dist/de-Cdf3432J.cjs +0 -1
- package/dist/deep-merge-Blrucd-E.cjs +0 -1
- package/dist/es-6fFPkKHL.cjs +0 -1
- package/dist/fa-GXyNzAXz.cjs +0 -1
- package/dist/fr-C6EYTwSH.cjs +0 -1
- package/dist/he-CJUgxvi8.cjs +0 -1
- package/dist/hi-DqIR4VtX.cjs +0 -1
- package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
- package/dist/hls.light.min-hEMf_E8u.js +0 -8311
- package/dist/index-1JaBwDB-.js +0 -921
- package/dist/index-B-cwxUsP.cjs +0 -1
- package/dist/index-BFzxpY7y.js +0 -68
- package/dist/index-BOC0cVoY.cjs +0 -36
- package/dist/index-CN10Cyqr.cjs +0 -1
- package/dist/index-CTcbhnPw.cjs +0 -4
- package/dist/index-DF7RFzD9.cjs +0 -1
- package/dist/index-DJ9YIJcG.js +0 -14308
- package/dist/index-DfPkCwdC.js +0 -2709
- package/dist/input-container-9r1F3KuX.js +0 -263
- package/dist/input-container-DiYEl_y8.cjs +0 -1
- package/dist/it-BvHsJ7fH.cjs +0 -1
- package/dist/ja-B2gP7OHY.cjs +0 -1
- package/dist/ko-BddhddIA.cjs +0 -1
- package/dist/menu-De_-sGeb.cjs +0 -1
- package/dist/modal-DUlqGUW7.cjs +0 -1
- package/dist/nl-COrtZUnH.cjs +0 -1
- package/dist/notice-DAVOTnfA.cjs +0 -1
- package/dist/oneof-branch-detection-D6Xa8qNR.cjs +0 -8
- package/dist/oneof-branch-detection-DCPwyutI.js +0 -6290
- package/dist/pl-BHI4zBgV.cjs +0 -1
- package/dist/pt-BGzC9MhU.cjs +0 -1
- package/dist/ru-CXeFbIPb.cjs +0 -1
- package/dist/stack-4VUGISn6.cjs +0 -1
- package/dist/stack-Bm-UZosx.js +0 -879
- package/dist/string-B9vVyfq3.cjs +0 -1
- package/dist/string-DYyMxBl-.js +0 -19
- package/dist/text-input-BgPx8BbG.js +0 -45
- package/dist/text-input-DUnhBUd6.cjs +0 -1
- package/dist/timer-BJHOsuS6.cjs +0 -1
- package/dist/timer-Rd2sKnvH.js +0 -65
- package/dist/toolbar-DKOh_gbA.js +0 -118
- package/dist/toolbar-Dkc2y1dI.cjs +0 -1
- package/dist/tr-CdOtQAtA.cjs +0 -1
- package/dist/translations-Cy9hoMGV.cjs +0 -1
- package/dist/types/components/data/calendar-shared.d.ts +0 -59
- package/dist/types/components/data/calendar.d.ts +0 -107
- package/dist/types/components/data/icon-badge.d.ts +0 -14
- package/dist/types/components/data/range-calendar.d.ts +0 -104
- package/dist/types/components/data/tag.d.ts +0 -51
- package/dist/ur-C7itXvnC.cjs +0 -1
- package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
- package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
- package/dist/use-form-DTyNw0kM.cjs +0 -2
- package/dist/utils-DEbsp9Q9.js +0 -129
- package/dist/utils-DIUEhA-Z.cjs +0 -1
- package/dist/vi-CQrUWB3y.cjs +0 -1
- package/dist/widget-customization-xEBfEPhQ.cjs +0 -1
- package/dist/zh-DWswYYTS.cjs +0 -1
|
@@ -22,18 +22,18 @@ export declare const makeOnChangeHandler: <T>(controller: Controller<T>, onChang
|
|
|
22
22
|
/**
|
|
23
23
|
* Base options type for any input component, derived from InputOptions.
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
25
|
+
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
|
|
29
|
+
export type ControlInputOptions = Merge<BaseControlInputOptions, InputWrapperOptions>;
|
|
30
30
|
/**
|
|
31
31
|
* Options for connecting a controller to an input component without a wrapper.
|
|
32
32
|
*
|
|
33
33
|
* @template T - The controller value type
|
|
34
34
|
* @template O - The input component options type
|
|
35
35
|
*/
|
|
36
|
-
export type
|
|
36
|
+
export type BaseControlOptions<T, O extends BaseControlInputOptions> = Merge<Omit<O, 'value'>, {
|
|
37
37
|
controller: Controller<T>;
|
|
38
38
|
triggerOn?: 'input' | 'change';
|
|
39
39
|
}>;
|
|
@@ -43,7 +43,7 @@ export type BaseControllerOptions<T, O extends BaseControlOptions> = Merge<Omit<
|
|
|
43
43
|
* @template T - The controller value type
|
|
44
44
|
* @template O - The input component options type
|
|
45
45
|
*/
|
|
46
|
-
export type
|
|
46
|
+
export type ControlOptions<T, O extends BaseControlInputOptions> = Merge<Omit<InputWrapperOptions, 'content'>, Merge<Omit<O, 'value'>, {
|
|
47
47
|
controller: Controller<T>;
|
|
48
48
|
triggerOn?: 'input' | 'change';
|
|
49
49
|
}>>;
|
|
@@ -54,7 +54,7 @@ export type ControllerOptions<T, O extends BaseControlOptions> = Merge<Omit<Inpu
|
|
|
54
54
|
* @template U - The input component value type
|
|
55
55
|
* @template O - The input component options type
|
|
56
56
|
*/
|
|
57
|
-
export type
|
|
57
|
+
export type MappedControlOptions<T, U, O extends BaseControlInputOptions> = Merge<ControlOptions<T, O>, {
|
|
58
58
|
/** Transforms controller value to input value. */
|
|
59
59
|
toInput: (value: T) => U;
|
|
60
60
|
/** Transforms input value back to controller value. */
|
|
@@ -86,7 +86,7 @@ export type MappedControllerOptions<T, U, O extends BaseControlOptions> = Merge<
|
|
|
86
86
|
* })
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
export declare function BaseControl<T, O extends
|
|
89
|
+
export declare function BaseControl<T, O extends BaseControlInputOptions>(InputComponent: (options: O) => TNode, options: BaseControlOptions<T, O>): TNode;
|
|
90
90
|
/**
|
|
91
91
|
* Connects an input component to a controller with a wrapper that provides label, error display, and layout.
|
|
92
92
|
* Automatically binds the controller's value, disabled state, error state, and event handlers.
|
|
@@ -116,7 +116,7 @@ export declare function BaseControl<T, O extends BaseControlOptions>(InputCompon
|
|
|
116
116
|
* })
|
|
117
117
|
* ```
|
|
118
118
|
*/
|
|
119
|
-
export declare function Control<T, O extends
|
|
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;
|
|
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.
|
|
@@ -145,7 +145,7 @@ export declare function Control<T, O extends BaseControlOptions>(InputComponent:
|
|
|
145
145
|
* })
|
|
146
146
|
* ```
|
|
147
147
|
*/
|
|
148
|
-
export declare function BaseMappedControl<T, U, O extends
|
|
148
|
+
export declare function BaseMappedControl<T, U, O extends BaseControlInputOptions>(InputComponent: (options: O) => TNode, options: MappedControlOptions<T, U, O>): TNode;
|
|
149
149
|
/**
|
|
150
150
|
* Connects an input component to a controller with bidirectional value transformation and a wrapper.
|
|
151
151
|
* Combines value transformation with label, error display, and layout features.
|
|
@@ -176,4 +176,4 @@ export declare function BaseMappedControl<T, U, O extends BaseControlOptions>(In
|
|
|
176
176
|
* })
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
|
-
export declare function MappedControl<T, U, O extends
|
|
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;
|
|
@@ -18,11 +18,11 @@ export interface SliderTick {
|
|
|
18
18
|
*/
|
|
19
19
|
export interface AdvancedSliderOptions {
|
|
20
20
|
/** Minimum value of the slider range */
|
|
21
|
-
min?: number
|
|
21
|
+
min?: Value<number>;
|
|
22
22
|
/** Maximum value of the slider range */
|
|
23
|
-
max?: number
|
|
23
|
+
max?: Value<number>;
|
|
24
24
|
/** Step increment between valid values. @default 1 */
|
|
25
|
-
step?: number
|
|
25
|
+
step?: Value<number>;
|
|
26
26
|
/** Whether the slider is disabled. @default false */
|
|
27
27
|
disabled?: Value<boolean>;
|
|
28
28
|
/** Visual size of the slider. @default 'md' */
|
|
@@ -55,7 +55,7 @@ export interface AdvancedSliderOptions {
|
|
|
55
55
|
* Tick marks along the slider track.
|
|
56
56
|
* Can be `true` for automatic step-based ticks, or an array of custom tick definitions.
|
|
57
57
|
*/
|
|
58
|
-
ticks?: boolean | SliderTick[]
|
|
58
|
+
ticks?: Value<boolean | SliderTick[]>;
|
|
59
59
|
/**
|
|
60
60
|
* Whether to show the current value label(s) above the thumb(s).
|
|
61
61
|
* @default false
|
|
@@ -72,7 +72,7 @@ export interface AdvancedSliderOptions {
|
|
|
72
72
|
* If fewer colors than segments are provided, remaining segments use the default color.
|
|
73
73
|
* If not provided, a single fill spanning all thumbs is used (existing behavior).
|
|
74
74
|
*/
|
|
75
|
-
segmentColors?: ThemeColorName[]
|
|
75
|
+
segmentColors?: Value<ThemeColorName[]>;
|
|
76
76
|
/**
|
|
77
77
|
* Custom renderer for the thumb element. When provided, replaces the default
|
|
78
78
|
* circular thumb with your custom content. The rendered content is placed
|
|
@@ -140,4 +140,4 @@ export interface AdvancedSliderOptions {
|
|
|
140
140
|
* })
|
|
141
141
|
* ```
|
|
142
142
|
*/
|
|
143
|
-
export declare function AdvancedSlider({ min, max, step, disabled, size, color, value, onChange, range, points, onRangeChange, onPointsChange, ticks, showValue, formatValue, segmentColors, renderThumb, }: AdvancedSliderOptions): import("@tempots/dom").Renderable;
|
|
143
|
+
export declare function AdvancedSlider({ min: minOpt, max: maxOpt, step: stepOpt, disabled, size, color, value, onChange, range, points, onRangeChange, onPointsChange, ticks, showValue, formatValue, segmentColors, renderThumb, }: AdvancedSliderOptions): import("@tempots/dom").Renderable;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppearancePreference } from '../../theme';
|
|
2
|
+
import type { ControlSize } from '../../theme';
|
|
2
3
|
import { Value } from '@tempots/dom';
|
|
3
4
|
/**
|
|
4
5
|
* Options for the {@link AppearanceSelector} component.
|
|
@@ -13,6 +14,11 @@ export type AppearanceSelectorOptions = {
|
|
|
13
14
|
* @default false
|
|
14
15
|
*/
|
|
15
16
|
disabled?: Value<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Visual size of the selector.
|
|
19
|
+
* @default 'sm'
|
|
20
|
+
*/
|
|
21
|
+
size?: Value<ControlSize>;
|
|
16
22
|
};
|
|
17
23
|
/**
|
|
18
24
|
* A segmented input for selecting the application appearance (light, dark, or system).
|
|
@@ -31,12 +37,13 @@ export type AppearanceSelectorOptions = {
|
|
|
31
37
|
* })
|
|
32
38
|
* ```
|
|
33
39
|
*/
|
|
34
|
-
export declare function AppearanceSelector({ value, onChange, disabled, }: AppearanceSelectorOptions): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
40
|
+
export declare function AppearanceSelector({ value, onChange, disabled, size, }: AppearanceSelectorOptions): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
35
41
|
/**
|
|
36
42
|
* A standalone appearance selector that automatically connects to the application's
|
|
37
43
|
* {@link Theme} provider. Reads and writes the appearance preference from the
|
|
38
44
|
* current theme context without requiring manual wiring.
|
|
39
45
|
*
|
|
46
|
+
* @param options - Optional configuration (e.g. size).
|
|
40
47
|
* @returns A renderable standalone appearance selector component.
|
|
41
48
|
*
|
|
42
49
|
* @example
|
|
@@ -45,4 +52,4 @@ export declare function AppearanceSelector({ value, onChange, disabled, }: Appea
|
|
|
45
52
|
* StandaloneAppearanceSelector()
|
|
46
53
|
* ```
|
|
47
54
|
*/
|
|
48
|
-
export declare function StandaloneAppearanceSelector(): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
55
|
+
export declare function StandaloneAppearanceSelector(options?: Pick<AppearanceSelectorOptions, 'size'>): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
@@ -8,10 +8,10 @@ import { IconSize } from '../../theme';
|
|
|
8
8
|
* customize the checked/unchecked icons and their size.
|
|
9
9
|
*/
|
|
10
10
|
export type CheckboxInputOptions = InputOptions<boolean> & {
|
|
11
|
-
/** Icon name to display when the checkbox is checked. @default '
|
|
12
|
-
|
|
13
|
-
/** Icon name to display when the checkbox is unchecked. @default '
|
|
14
|
-
|
|
11
|
+
/** Icon name to display when the checkbox is active (checked). @default 'ri:checkbox-fill' */
|
|
12
|
+
activeIcon?: Value<string | undefined>;
|
|
13
|
+
/** Icon name to display when the checkbox is inactive (unchecked). @default 'mdi:checkbox-blank-outline' */
|
|
14
|
+
inactiveIcon?: Value<string | undefined>;
|
|
15
15
|
/** Size of the checkbox icon. @default 'lg' */
|
|
16
16
|
iconSize?: Value<IconSize>;
|
|
17
17
|
};
|
|
@@ -46,9 +46,8 @@ export type CheckboxInputOptions = InputOptions<boolean> & {
|
|
|
46
46
|
* CheckboxInput({
|
|
47
47
|
* value: prop(true),
|
|
48
48
|
* onChange: (v) => console.log('Checked:', v),
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* iconSize: 'xl',
|
|
49
|
+
* activeIcon: 'mdi:checkbox-marked',
|
|
50
|
+
* inactiveIcon: 'mdi:checkbox-blank-outline',
|
|
52
51
|
* })
|
|
53
52
|
* ```
|
|
54
53
|
*/
|
|
@@ -8,7 +8,7 @@ import { InputOptions } from './input-options';
|
|
|
8
8
|
*/
|
|
9
9
|
export type ColorInputOptions = InputOptions<string> & {
|
|
10
10
|
/** Size in pixels of the color swatch preview (square). @default 32 */
|
|
11
|
-
|
|
11
|
+
swatchSize?: Value<number>;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* A color input component combining a text field with a clickable color swatch preview.
|
|
@@ -10,7 +10,7 @@ export type ColorSwatchInputOptions = InputOptions<string> & {
|
|
|
10
10
|
/** When true, renders the formatted color value text next to the blob preview. @default false */
|
|
11
11
|
displayValue?: Value<boolean>;
|
|
12
12
|
/** Size in pixels of the blob preview (square). @default 32 */
|
|
13
|
-
|
|
13
|
+
swatchSize?: Value<number>;
|
|
14
14
|
/** Enable alpha channel support with a small opacity slider. @default false */
|
|
15
15
|
withAlpha?: Value<boolean>;
|
|
16
16
|
/** Color space format for the displayed text label and emitted value. @default 'rgb' for display, 'hex' for emitted values */
|
|
@@ -42,7 +42,7 @@ export type ColorSwatchInputOptions = InputOptions<string> & {
|
|
|
42
42
|
* value: color,
|
|
43
43
|
* onChange: color.set,
|
|
44
44
|
* displayValue: true,
|
|
45
|
-
*
|
|
45
|
+
* swatchSize: 40,
|
|
46
46
|
* })
|
|
47
47
|
* ```
|
|
48
48
|
*
|
|
@@ -55,7 +55,7 @@ export type ColorSwatchInputOptions = InputOptions<string> & {
|
|
|
55
55
|
* withAlpha: true,
|
|
56
56
|
* displayValue: true,
|
|
57
57
|
* colorTextFormat: 'hsl',
|
|
58
|
-
*
|
|
58
|
+
* swatchSize: 48,
|
|
59
59
|
* })
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Merge, Renderable, Signal, TNode, Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseControlOptions, ControlOptions } from '../control';
|
|
4
4
|
import { DropdownOption } from './option';
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options for the {@link ComboboxInput} component.
|
|
@@ -11,7 +11,7 @@ import { DropdownOption } from './option';
|
|
|
11
11
|
*
|
|
12
12
|
* @template T - The type of the selectable option values
|
|
13
13
|
*/
|
|
14
|
-
export type
|
|
14
|
+
export type ComboboxInputOptions<T> = Merge<InputOptions<T>, {
|
|
15
15
|
/** Async function to fetch options dynamically based on the current search text */
|
|
16
16
|
loadOptions: (search: string) => Promise<DropdownOption<T>[]>;
|
|
17
17
|
/** Render function for displaying each option in the dropdown list */
|
|
@@ -65,7 +65,7 @@ export type ComboboxOptions<T> = Merge<InputOptions<T>, {
|
|
|
65
65
|
* })
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare const ComboboxInput: <T>(options:
|
|
68
|
+
export declare const ComboboxInput: <T>(options: ComboboxInputOptions<T>) => Renderable;
|
|
69
69
|
/**
|
|
70
70
|
* A combobox input wired to a form controller for managed form state.
|
|
71
71
|
*
|
|
@@ -77,7 +77,7 @@ export declare const ComboboxInput: <T>(options: ComboboxOptions<T>) => Renderab
|
|
|
77
77
|
* @param options - Controller options including the form controller and combobox configuration
|
|
78
78
|
* @returns A controller-bound combobox input
|
|
79
79
|
*/
|
|
80
|
-
export declare const BaseComboboxControl: <T>(options:
|
|
80
|
+
export declare const BaseComboboxControl: <T>(options: BaseControlOptions<T, ComboboxInputOptions<T>>) => Renderable;
|
|
81
81
|
/**
|
|
82
82
|
* A complete combobox form control with label, description, error message, and validation.
|
|
83
83
|
*
|
|
@@ -88,4 +88,4 @@ export declare const BaseComboboxControl: <T>(options: BaseControllerOptions<T,
|
|
|
88
88
|
* @param options - Controller options including wrapper label/description and combobox configuration
|
|
89
89
|
* @returns A combobox input wrapped in a form field with label and error display
|
|
90
90
|
*/
|
|
91
|
-
export declare const ComboboxControl: <T>(options:
|
|
91
|
+
export declare const ComboboxControl: <T>(options: ControlOptions<T, ComboboxInputOptions<T>>) => Renderable;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Renderable, Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
3
|
import { DropdownOption } from './option';
|
|
4
|
-
import {
|
|
4
|
+
import { BaseControlOptions, ControlOptions } from '../control';
|
|
5
5
|
/**
|
|
6
6
|
* Options for the {@link ComboboxTagsInput} component.
|
|
7
7
|
* Combines tag selection with a searchable dropdown.
|
|
8
8
|
*
|
|
9
9
|
* @typeParam T - The type of tag values.
|
|
10
10
|
*/
|
|
11
|
-
export type
|
|
11
|
+
export type ComboboxTagsInputOptions<T> = {
|
|
12
12
|
/** The available dropdown options to choose from. */
|
|
13
13
|
options: Value<DropdownOption<T>[]>;
|
|
14
14
|
/**
|
|
@@ -51,7 +51,7 @@ export type ComboboxTagsOptions<T> = {
|
|
|
51
51
|
* })
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
export declare function ComboboxTagsInput<T>(options:
|
|
54
|
+
export declare function ComboboxTagsInput<T>(options: ComboboxTagsInputOptions<T>): Renderable;
|
|
55
55
|
/**
|
|
56
56
|
* A base form control wrapper for {@link ComboboxTagsInput} using a raw controller.
|
|
57
57
|
*
|
|
@@ -59,7 +59,7 @@ export declare function ComboboxTagsInput<T>(options: ComboboxTagsOptions<T>): R
|
|
|
59
59
|
* @param options - Base controller options for the combobox tags control.
|
|
60
60
|
* @returns A renderable form control component.
|
|
61
61
|
*/
|
|
62
|
-
export declare function BaseComboboxTagsControl<T>(options:
|
|
62
|
+
export declare function BaseComboboxTagsControl<T>(options: BaseControlOptions<T[], ComboboxTagsInputOptions<T>>): import("@tempots/dom").TNode;
|
|
63
63
|
/**
|
|
64
64
|
* A full form control wrapper for {@link ComboboxTagsInput} with label, error, and description support.
|
|
65
65
|
*
|
|
@@ -67,4 +67,4 @@ export declare function BaseComboboxTagsControl<T>(options: BaseControllerOption
|
|
|
67
67
|
* @param options - Controller options for the combobox tags control.
|
|
68
68
|
* @returns A renderable form control component with wrapper.
|
|
69
69
|
*/
|
|
70
|
-
export declare function ComboboxTagsControl<T>(options:
|
|
70
|
+
export declare function ComboboxTagsControl<T>(options: ControlOptions<T[], ComboboxTagsInputOptions<T>>): Renderable;
|
|
@@ -12,13 +12,13 @@ export declare const nullToEmpty: (value: null | string) => string;
|
|
|
12
12
|
* Factory function to create nullable string input components.
|
|
13
13
|
* Eliminates duplication across nullable text-based inputs.
|
|
14
14
|
*
|
|
15
|
-
* @param BaseInput - The base input component (e.g., TextInput,
|
|
15
|
+
* @param BaseInput - The base input component (e.g., TextInput, NativeEmailInput, PasswordInput)
|
|
16
16
|
* @returns A nullable version of the input component
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```ts
|
|
20
20
|
* export const NullableTextInput = createNullableStringInput(TextInput)
|
|
21
|
-
* export const
|
|
21
|
+
* export const NativeNullableEmailInput = createNullableStringInput(NativeEmailInput)
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export declare function createNullableStringInput(BaseInput: (options: InputOptions<string>) => Renderable): (options: InputOptions<null | string>) => Renderable;
|
|
@@ -12,10 +12,10 @@ import { InputOptions } from './input-options';
|
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
14
|
* import { prop } from '@tempots/dom'
|
|
15
|
-
* import {
|
|
15
|
+
* import { NativeDateInput } from '@tempots/beatui'
|
|
16
16
|
*
|
|
17
17
|
* const birthday = prop(new Date('1990-01-15'))
|
|
18
|
-
*
|
|
18
|
+
* NativeDateInput({
|
|
19
19
|
* value: birthday,
|
|
20
20
|
* onChange: birthday.set,
|
|
21
21
|
* })
|
|
@@ -24,7 +24,7 @@ import { InputOptions } from './input-options';
|
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
26
|
* // With error state and disabled
|
|
27
|
-
*
|
|
27
|
+
* NativeDateInput({
|
|
28
28
|
* value: prop(new Date()),
|
|
29
29
|
* onChange: (d) => console.log('Selected:', d),
|
|
30
30
|
* hasError: prop(true),
|
|
@@ -32,4 +32,4 @@ import { InputOptions } from './input-options';
|
|
|
32
32
|
* })
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const NativeDateInput: (options: InputOptions<Date>) => import("@tempots/dom").Renderable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Renderable, Value, Merge } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseControlOptions, ControlOptions } from '../control';
|
|
4
4
|
import { DropdownOption } from './option';
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options for the {@link DropdownInput} component.
|
|
@@ -11,7 +11,7 @@ import { DropdownOption } from './option';
|
|
|
11
11
|
*
|
|
12
12
|
* @template T - The type of the selectable option values
|
|
13
13
|
*/
|
|
14
|
-
export type
|
|
14
|
+
export type DropdownInputOptions<T> = Merge<InputOptions<T>, {
|
|
15
15
|
/** The list of selectable options, supporting value items, groups, and break separators */
|
|
16
16
|
options: Value<DropdownOption<T>[]>;
|
|
17
17
|
/** Label to show when no option is selected (fallback for `placeholder`). Uses i18n "selectOne" when both are omitted. */
|
|
@@ -74,7 +74,7 @@ export type DropdownOptions<T> = Merge<InputOptions<T>, {
|
|
|
74
74
|
* })
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
77
|
-
export declare const DropdownInput: <T>(options:
|
|
77
|
+
export declare const DropdownInput: <T>(options: DropdownInputOptions<T>) => Renderable;
|
|
78
78
|
/**
|
|
79
79
|
* A dropdown input wired to a form controller for managed form state.
|
|
80
80
|
*
|
|
@@ -86,7 +86,7 @@ export declare const DropdownInput: <T>(options: DropdownOptions<T>) => Renderab
|
|
|
86
86
|
* @param options - Controller options including the form controller and dropdown configuration
|
|
87
87
|
* @returns A controller-bound dropdown input
|
|
88
88
|
*/
|
|
89
|
-
export declare const BaseDropdownControl: <T>(options:
|
|
89
|
+
export declare const BaseDropdownControl: <T>(options: BaseControlOptions<T, DropdownInputOptions<T>>) => Renderable;
|
|
90
90
|
/**
|
|
91
91
|
* A complete dropdown form control with label, description, error message, and validation.
|
|
92
92
|
*
|
|
@@ -97,4 +97,4 @@ export declare const BaseDropdownControl: <T>(options: BaseControllerOptions<T,
|
|
|
97
97
|
* @param options - Controller options including wrapper label/description and dropdown configuration
|
|
98
98
|
* @returns A dropdown input wrapped in a form field with label and error display
|
|
99
99
|
*/
|
|
100
|
-
export declare const DropdownControl: <T>(options:
|
|
100
|
+
export declare const DropdownControl: <T>(options: ControlOptions<T, DropdownInputOptions<T>>) => Renderable;
|
|
@@ -3,11 +3,11 @@ import { Renderable, Value } from '@tempots/dom';
|
|
|
3
3
|
* Options for the {@link EditableText} component.
|
|
4
4
|
*/
|
|
5
5
|
export type EditableTextOptions = {
|
|
6
|
-
/** The current text value to display and edit. */
|
|
6
|
+
/** The current text value to display and edit. @default 'The content' */
|
|
7
7
|
value: Value<string>;
|
|
8
8
|
/** Callback invoked with the new text value when editing completes. */
|
|
9
9
|
onChange: (value: string) => void;
|
|
10
|
-
/** Placeholder text shown when the value is empty. */
|
|
10
|
+
/** Placeholder text shown when the value is empty. @default 'Edit me' */
|
|
11
11
|
placeholder?: Value<string>;
|
|
12
12
|
/**
|
|
13
13
|
* Whether the component should start in editing mode.
|
|
@@ -13,10 +13,10 @@ import { InputOptions } from './input-options';
|
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
15
|
* import { prop } from '@tempots/dom'
|
|
16
|
-
* import {
|
|
16
|
+
* import { NativeEmailInput } from '@tempots/beatui'
|
|
17
17
|
*
|
|
18
18
|
* const email = prop('')
|
|
19
|
-
*
|
|
19
|
+
* NativeEmailInput({
|
|
20
20
|
* value: email,
|
|
21
21
|
* onChange: email.set,
|
|
22
22
|
* })
|
|
@@ -25,7 +25,7 @@ import { InputOptions } from './input-options';
|
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
27
27
|
* // Override the default before icon
|
|
28
|
-
*
|
|
28
|
+
* NativeEmailInput({
|
|
29
29
|
* value: prop(''),
|
|
30
30
|
* onChange: (v) => console.log('Email:', v),
|
|
31
31
|
* before: Icon({ icon: 'custom-email-icon' }),
|
|
@@ -33,4 +33,4 @@ import { InputOptions } from './input-options';
|
|
|
33
33
|
* })
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export declare const
|
|
36
|
+
export declare const NativeEmailInput: (options: InputOptions<string>) => import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
@@ -2,6 +2,7 @@ export * from './appearance-selector';
|
|
|
2
2
|
export * from './base64-input';
|
|
3
3
|
export * from './base64s-input';
|
|
4
4
|
export * from './checkbox-input';
|
|
5
|
+
export * from './tri-state-checkbox-input';
|
|
5
6
|
export * from './color-input';
|
|
6
7
|
export * from './color-swatch-input';
|
|
7
8
|
export * from './nullable-color-input';
|
|
@@ -20,7 +20,7 @@ export declare function generateInputContainerInputClasses(baseContainer: boolea
|
|
|
20
20
|
* - Click-to-focus behavior (clicking the container focuses the input)
|
|
21
21
|
* - Responsive sizing based on the `size` prop
|
|
22
22
|
*
|
|
23
|
-
* Used by most form inputs (TextInput, NumberInput,
|
|
23
|
+
* Used by most form inputs (TextInput, NumberInput, NativeDateInput, etc.) to ensure
|
|
24
24
|
* visual consistency across the component library.
|
|
25
25
|
*
|
|
26
26
|
* @param options - Container configuration options
|
|
@@ -56,7 +56,7 @@ export type CommonInputOptions = {
|
|
|
56
56
|
tabIndex?: Value<number>;
|
|
57
57
|
/**
|
|
58
58
|
* Visual size of the control, aligned with Button sizes.
|
|
59
|
-
*
|
|
59
|
+
* @default 'md'
|
|
60
60
|
*/
|
|
61
61
|
size?: Value<ControlSize>;
|
|
62
62
|
};
|
|
@@ -93,6 +93,33 @@ export type InputOptions<V> = Merge<CommonInputOptions, {
|
|
|
93
93
|
/** Callback invoked when the input loses focus */
|
|
94
94
|
onBlur?: () => void;
|
|
95
95
|
}>;
|
|
96
|
+
/**
|
|
97
|
+
* Maps an `InputOptions<Outer>` to an `InputOptions<Inner>` by transforming
|
|
98
|
+
* the `value`, `onChange`, and `onInput` fields. All other options pass through
|
|
99
|
+
* unchanged.
|
|
100
|
+
*
|
|
101
|
+
* Use this to adapt an input component that works with type `Inner` so it can
|
|
102
|
+
* be driven by a value of type `Outer`.
|
|
103
|
+
*
|
|
104
|
+
* @template Outer - The external value type (what the consumer provides)
|
|
105
|
+
* @template Inner - The internal value type (what the wrapped component expects)
|
|
106
|
+
* @param options - The original input options with the `Outer` value type
|
|
107
|
+
* @param toInner - Converts an `Outer` value to `Inner` (for display)
|
|
108
|
+
* @param toOuter - Converts an `Inner` value back to `Outer` (for change events)
|
|
109
|
+
* @returns A new `InputOptions<Inner>` suitable for the wrapped component
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* // Adapt a TextInput (string) to accept string | null
|
|
114
|
+
* const mapped = mapInputOptions<string | null, string>(
|
|
115
|
+
* options,
|
|
116
|
+
* v => v ?? '', // null → '' for display
|
|
117
|
+
* v => v === '' ? null : v // '' → null on change
|
|
118
|
+
* )
|
|
119
|
+
* TextInput(mapped)
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export declare function mapInputOptions<Outer, Inner>(options: InputOptions<Outer>, toInner: (value: Outer) => Inner, toOuter: (value: Inner) => Outer): InputOptions<Inner>;
|
|
96
123
|
/**
|
|
97
124
|
* Helper function that applies common HTML attributes to an input element.
|
|
98
125
|
*
|
|
@@ -151,7 +151,10 @@ export interface MaskedInputOptions {
|
|
|
151
151
|
value?: string;
|
|
152
152
|
/** Default value used when no value is provided. */
|
|
153
153
|
defaultValue?: string;
|
|
154
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* The mask pattern or dynamic mask function.
|
|
156
|
+
* @default '(999) 999-9999'
|
|
157
|
+
*/
|
|
155
158
|
mask: Value<Mask | DynamicMask>;
|
|
156
159
|
/** Custom mask symbol definitions. */
|
|
157
160
|
definitions?: Value<MaskDictionary>;
|
|
@@ -160,7 +163,10 @@ export interface MaskedInputOptions {
|
|
|
160
163
|
* @default true
|
|
161
164
|
*/
|
|
162
165
|
useDefaultDefinitions?: Value<boolean>;
|
|
163
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Placeholder text displayed when the input is empty.
|
|
168
|
+
* @default '(___) ___-____'
|
|
169
|
+
*/
|
|
164
170
|
placeholder?: Value<string>;
|
|
165
171
|
/** Options for placeholder guide display. */
|
|
166
172
|
placeholderOptions?: Value<PlaceholderOptions>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Renderable, Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseControlOptions, ControlOptions } from '../control';
|
|
4
4
|
import { SelectOption } from './option';
|
|
5
5
|
/**
|
|
6
6
|
* Options for the {@link NativeSelect} component.
|
|
@@ -51,7 +51,7 @@ export declare const NativeSelect: <T>(options: NativeSelectOptions<T>) => Rende
|
|
|
51
51
|
* @param options - Base controller options for the native select control.
|
|
52
52
|
* @returns A renderable form control component.
|
|
53
53
|
*/
|
|
54
|
-
export declare function BaseNativeSelectControl<T>(options:
|
|
54
|
+
export declare function BaseNativeSelectControl<T>(options: BaseControlOptions<T, NativeSelectOptions<T>>): Renderable;
|
|
55
55
|
/**
|
|
56
56
|
* A full form control wrapper for {@link NativeSelect} with label, error, and description support.
|
|
57
57
|
*
|
|
@@ -59,4 +59,4 @@ export declare function BaseNativeSelectControl<T>(options: BaseControllerOption
|
|
|
59
59
|
* @param options - Controller options for the native select control.
|
|
60
60
|
* @returns A renderable form control component with wrapper.
|
|
61
61
|
*/
|
|
62
|
-
export declare function NativeSelectControl<T>(options:
|
|
62
|
+
export declare function NativeSelectControl<T>(options: ControlOptions<T, NativeSelectOptions<T>>): Renderable;
|
|
@@ -11,10 +11,10 @@ import { InputOptions } from './input-options';
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
|
-
*
|
|
14
|
+
* NativeNullableDateInput({
|
|
15
15
|
* value: prop<Date | null>(null),
|
|
16
16
|
* onChange: date => console.log('Date:', date),
|
|
17
17
|
* })
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const NativeNullableDateInput: (options: InputOptions<Date | null>) => import("@tempots/dom").Renderable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A nullable variant of {@link
|
|
2
|
+
* A nullable variant of {@link NativeEmailInput} that maps between `string | null` and `string`.
|
|
3
3
|
*
|
|
4
4
|
* Empty strings are converted to `null` on change, and `null` values are displayed
|
|
5
5
|
* as empty strings. Includes a reset button to clear the value back to `null`.
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts
|
|
12
|
-
*
|
|
12
|
+
* NativeNullableEmailInput({
|
|
13
13
|
* value: prop<string | null>(null),
|
|
14
14
|
* placeholder: 'Enter email or leave empty...',
|
|
15
15
|
* onChange: v => console.log('Email:', v), // null or string
|
|
16
16
|
* })
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const NativeNullableEmailInput: (options: import("./input-options").InputOptions<null | string>) => import("@tempots/dom").Renderable;
|
|
@@ -12,17 +12,17 @@ export type NullableRatingInputOptions = InputOptions<number | null> & {
|
|
|
12
12
|
* @default 5
|
|
13
13
|
*/
|
|
14
14
|
max?: Value<number>;
|
|
15
|
-
/** Color name for filled rating icons. */
|
|
15
|
+
/** Color name for filled rating icons. @default 'yellow' */
|
|
16
16
|
fullColor?: Value<ThemeColorName>;
|
|
17
|
-
/** Color name for empty rating icons. */
|
|
17
|
+
/** Color name for empty rating icons. @default 'neutral' */
|
|
18
18
|
emptyColor?: Value<ThemeColorName>;
|
|
19
|
-
/** Icon identifier for filled rating items. */
|
|
20
|
-
|
|
21
|
-
/** Icon identifier for empty rating items. */
|
|
22
|
-
|
|
23
|
-
/** Size of the rating icons. */
|
|
19
|
+
/** Icon identifier for active (filled) rating items. @default 'line-md:star-alt-filled' */
|
|
20
|
+
activeIcon?: Value<string>;
|
|
21
|
+
/** Icon identifier for inactive (empty) rating items. @default 'line-md:star-alt' */
|
|
22
|
+
inactiveIcon?: Value<string>;
|
|
23
|
+
/** Size of the rating icons. @default 'md' */
|
|
24
24
|
size?: Value<ControlSize>;
|
|
25
|
-
/** Rounding precision for fractional ratings (e.g., `0.5` for half stars). */
|
|
25
|
+
/** Rounding precision for fractional ratings (e.g., `0.5` for half stars). @default 1 */
|
|
26
26
|
rounding?: Value<number>;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A nullable variant of {@link
|
|
2
|
+
* A nullable variant of {@link UuidInput} that maps between `string | null` and `string`.
|
|
3
3
|
*
|
|
4
4
|
* Empty strings are converted to `null` on change, and `null` values are displayed
|
|
5
5
|
* as empty strings. Includes a reset button to clear the value back to `null`.
|
|
6
|
-
* Retains the 8-4-4-4-12 hex digit mask from `
|
|
6
|
+
* Retains the 8-4-4-4-12 hex digit mask from `UuidInput`.
|
|
7
7
|
*
|
|
8
8
|
* @param options - Standard input options for a `string | null` value.
|
|
9
9
|
* @returns A renderable nullable UUID input component.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
|
-
*
|
|
13
|
+
* NullableUuidInput({
|
|
14
14
|
* value: prop<string | null>(null),
|
|
15
15
|
* onChange: v => console.log('UUID:', v), // null or string
|
|
16
16
|
* })
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const NullableUuidInput: (options: import("./input-options").InputOptions<null | string>) => import("@tempots/dom").Renderable;
|