@tempots/beatui 0.95.0 → 1.0.1
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-BVXPzVJB.cjs → ar-CuI1Jgt6.cjs} +1 -1
- package/dist/{ar-B4jDJwHQ.js → ar-DaKbK_t8.js} +87 -11
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-BPwKk8MW.js → auth-divider-CbME_yVQ.js} +87 -86
- package/dist/auth-divider-MMhfmLBu.cjs +1 -0
- package/dist/beatui.css +1628 -545
- package/dist/beatui.tailwind.css +1628 -545
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +6 -6
- 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-Dd33yWzb.js → de-3MTPDS1i.js} +82 -6
- package/dist/{de-BdfPZskW.cjs → de-DthHehbh.cjs} +1 -1
- package/dist/{deep-merge-C8dSqIXI.js → deep-merge-BzIheQtH.js} +511 -517
- package/dist/deep-merge-EkjEgK0N.cjs +1 -0
- package/dist/{duration-input-IuFWywO5.cjs → duration-input-ClgYjeBa.cjs} +1 -1
- package/dist/{duration-input-DFZwkg6M.js → duration-input-DGzmIImj.js} +5 -5
- package/dist/{editor-toolbar-group-DiJFgGcI.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
- package/dist/{editor-toolbar-group-BCBfu8pG.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
- package/dist/es-B6GJLk9h.cjs +1 -0
- package/dist/{es-jHMT3_7O.js → es-DwMUvBeU.js} +94 -18
- package/dist/{fa-eX3_BAZR.js → fa-0rvQiKrJ.js} +87 -11
- package/dist/{fa-BXnP4pbN.cjs → fa-BwgP93iV.cjs} +1 -1
- package/dist/{fr-Bj-GjMJm.js → fr-B4i6NzLl.js} +86 -10
- package/dist/{fr-HJDhGjI2.cjs → fr-CQzk5zqY.cjs} +1 -1
- package/dist/{he-DYgmPPkG.js → he-C71n-hsn.js} +87 -11
- package/dist/{he-C6nEVZhN.cjs → he-DcxxvRfs.cjs} +1 -1
- package/dist/{hi-DMVSXAJt.cjs → hi-D-KHVWg4.cjs} +1 -1
- package/dist/{hi-CgYLonE9.js → hi-xmrXpeVU.js} +87 -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-CO2BPqah.js → it-CDZTtOBC.js} +83 -7
- package/dist/{it-DhfVcjKb.cjs → it-D344Dutu.cjs} +1 -1
- package/dist/{ja-Bt6fGS_Q.cjs → ja-BNgnDZ27.cjs} +1 -1
- package/dist/{ja-BrzwjH8T.js → ja-Zz1LzidW.js} +91 -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-D-lJ4wYQ.js → ko-9laUsZDL.js} +90 -14
- package/dist/{ko-DfAaBGrz.cjs → ko-D-WJ9NK7.cjs} +1 -1
- package/dist/lexical/index.cjs.js +2 -39
- package/dist/lexical/index.es.js +2056 -20626
- 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-CwZuWiSK.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-CNWBQjK5.cjs → nl-CrqUlFie.cjs} +1 -1
- package/dist/{nl-ClsworIe.js → nl-Dcll9fVA.js} +86 -10
- package/dist/notice-B5wTXoTq.cjs +1 -0
- package/dist/{notice-D7hYFM5A.js → notice-BKcyJD5w.js} +37 -37
- package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
- package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
- package/dist/{pl-CqHTeu3-.cjs → pl-9UksIrvX.cjs} +1 -1
- package/dist/{pl-WTwLAxnV.js → pl-Dm9N9Gbr.js} +83 -7
- package/dist/prosemirror/index.cjs.js +3 -1
- package/dist/prosemirror/index.es.js +636 -4
- package/dist/{pt-CgkjJnsG.js → pt-CFi5cn0k.js} +88 -12
- package/dist/{pt-BQmsiqbo.cjs → pt-_kfdzwqi.cjs} +1 -1
- package/dist/{ru-CtgH7OY9.js → ru-CEhZUw8R.js} +91 -15
- package/dist/{ru-CG56A2To.cjs → ru-CW1WNNlr.cjs} +1 -1
- 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-DE7_VtKu.cjs → tr-B6GIRegf.cjs} +1 -1
- package/dist/{tr-D1O1vEmr.js → tr-ZmnVDhLP.js} +81 -5
- package/dist/{translations-yu4gNqlP.js → translations-A4kR7CW8.js} +1 -1
- package/dist/{translations-DyCmyLE_.js → translations-B1_yyDUK.js} +207 -129
- package/dist/{translations-DBxIjvWR.cjs → translations-C81buKAw.cjs} +1 -1
- package/dist/translations-Dbx7L7Q1.cjs +1 -0
- package/dist/types/beatui-i18n/default.d.ts +71 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +71 -0
- package/dist/types/beatui-i18n/translations.d.ts +71 -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/bigint-input.d.ts +3 -3
- 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/date-input.d.ts +4 -4
- package/dist/types/components/form/input/date-time-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/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-bigint-input.d.ts +3 -3
- package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
- package/dist/types/components/form/input/nullable-date-time-input.d.ts +2 -2
- 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/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/plugins/slash-commands.d.ts +1 -1
- package/dist/types/tokens/z-index.d.ts +18 -18
- package/dist/types/utils/use-animated-toggle.d.ts +12 -4
- package/dist/{ur-ZJgsSpG2.cjs → ur-CtFl_tz6.cjs} +1 -1
- package/dist/{ur-BcuB7IqE.js → ur-yYgj3NmT.js} +87 -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-CfxvyTfd.js → use-form-Dn6v2tEh.js} +153 -152
- package/dist/utils-DmEuG3Np.cjs +1 -0
- package/dist/utils-vUtP6iPG.js +165 -0
- package/dist/{vi-D0rQ3dIx.js → vi-D5u4CLQO.js} +88 -12
- package/dist/{vi-BOgLRkuK.cjs → vi-DyCZSpsk.cjs} +1 -1
- package/dist/widget-customization-B49MeU4E.cjs +1 -0
- package/dist/widget-customization-DEiQ_31d.js +1063 -0
- package/dist/{zh-DoYqiZO1.js → zh-B0kwMMer.js} +90 -14
- package/dist/{zh-BTZ8OZ4H.cjs → zh-C3ZxMQKb.cjs} +1 -1
- package/package.json +208 -37
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/auth-divider-BgaQ8ifw.cjs +0 -1
- package/dist/colors-BI0YhONJ.cjs +0 -1
- package/dist/deep-merge-ChJQbUKq.cjs +0 -1
- package/dist/es-C8TpneCm.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-CN10Cyqr.cjs +0 -1
- package/dist/index-CTcbhnPw.cjs +0 -4
- package/dist/index-DF7RFzD9.cjs +0 -1
- package/dist/index-D_zOXmU5.cjs +0 -36
- package/dist/index-DfPkCwdC.js +0 -2709
- package/dist/index-vowHNIPH.js +0 -14308
- package/dist/index-yOU4Ceaq.js +0 -68
- package/dist/index-zQ3IYJFH.cjs +0 -1
- package/dist/input-container-BWYHj0Iq.cjs +0 -1
- package/dist/input-container-DMoVdH6E.js +0 -263
- package/dist/menu-De_-sGeb.cjs +0 -1
- package/dist/modal-CiGmgsOI.cjs +0 -1
- package/dist/notice-CPZQuxcA.cjs +0 -1
- package/dist/oneof-branch-detection-BFxukD63.cjs +0 -8
- package/dist/oneof-branch-detection-izpPjBCR.js +0 -6290
- 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-BLupB3cU.js +0 -45
- package/dist/text-input-M6WBhhVj.cjs +0 -1
- package/dist/timer-BJHOsuS6.cjs +0 -1
- package/dist/timer-Rd2sKnvH.js +0 -65
- package/dist/toolbar-Be1eU0qU.js +0 -118
- package/dist/toolbar-WWv5kcYG.cjs +0 -1
- package/dist/translations-OOsMRpX9.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/use-animated-toggle-C7PTmnZi.js +0 -195
- package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
- package/dist/use-form-ClA0ZRco.cjs +0 -2
- package/dist/utils-DEbsp9Q9.js +0 -129
- package/dist/utils-DIUEhA-Z.cjs +0 -1
- package/dist/widget-customization-CLZNGavL.js +0 -1042
- package/dist/widget-customization-DtEEo35Y.cjs +0 -1
|
@@ -9,11 +9,11 @@ import { Merge } from '@tempots/std';
|
|
|
9
9
|
* buttons and mouse wheel support are automatically enabled.
|
|
10
10
|
*/
|
|
11
11
|
export type NumberInputOptions = Merge<InputOptions<number>, {
|
|
12
|
-
/** Step increment for stepper buttons and wheel interactions. When set, enables +/- buttons and scroll-to-step. Hold Shift for 10x multiplier. */
|
|
12
|
+
/** Step increment for stepper buttons and wheel interactions. When set, enables +/- buttons and scroll-to-step. Hold Shift for 10x multiplier. @default 1 */
|
|
13
13
|
step?: Value<number>;
|
|
14
|
-
/** Minimum allowed value. Disables decrement when reached. */
|
|
14
|
+
/** Minimum allowed value. Disables decrement when reached. @default 0 */
|
|
15
15
|
min?: Value<number>;
|
|
16
|
-
/** Maximum allowed value. Disables increment when reached. */
|
|
16
|
+
/** Maximum allowed value. Disables increment when reached. @default 10 */
|
|
17
17
|
max?: Value<number>;
|
|
18
18
|
}>;
|
|
19
19
|
/**
|
|
@@ -2,12 +2,12 @@ import { Value } from '@tempots/dom';
|
|
|
2
2
|
import { ControlSize } from '../../theme';
|
|
3
3
|
import { ThemeColorName } from '../../../tokens';
|
|
4
4
|
/**
|
|
5
|
-
* Configuration options for the {@link
|
|
5
|
+
* Configuration options for the {@link OtpInput} component.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
8
|
-
/** Number of input digits/characters. @default 6 */
|
|
9
|
-
length?: number
|
|
10
|
-
/** The current OTP value as a string */
|
|
7
|
+
export interface OtpInputOptions {
|
|
8
|
+
/** Number of input digits/characters. @default 6 @min 1 @max 12 @step 1 */
|
|
9
|
+
length?: Value<number>;
|
|
10
|
+
/** The current OTP value as a string. */
|
|
11
11
|
value?: Value<string>;
|
|
12
12
|
/** Callback invoked on every input change */
|
|
13
13
|
onChange?: (value: string) => void;
|
|
@@ -19,20 +19,20 @@ export interface OTPInputOptions {
|
|
|
19
19
|
* Whether to mask the input characters (like a password).
|
|
20
20
|
* @default false
|
|
21
21
|
*/
|
|
22
|
-
mask?: boolean
|
|
22
|
+
mask?: Value<boolean>;
|
|
23
23
|
/**
|
|
24
24
|
* Allowed input type.
|
|
25
25
|
* - `'numeric'` allows only digits 0-9
|
|
26
26
|
* - `'alphanumeric'` allows letters and digits
|
|
27
27
|
* @default 'numeric'
|
|
28
28
|
*/
|
|
29
|
-
type?: 'numeric' | 'alphanumeric'
|
|
29
|
+
type?: Value<'numeric' | 'alphanumeric'>;
|
|
30
30
|
/** Visual size of the input cells. @default 'md' */
|
|
31
31
|
size?: Value<ControlSize>;
|
|
32
32
|
/** Theme color for the focused input border. @default 'primary' */
|
|
33
33
|
color?: Value<ThemeColorName>;
|
|
34
34
|
/** Placeholder character shown in empty cells. @default '' */
|
|
35
|
-
placeholder?: string
|
|
35
|
+
placeholder?: Value<string>;
|
|
36
36
|
/** Whether to auto-focus the first cell on mount. @default false */
|
|
37
37
|
autoFocus?: boolean;
|
|
38
38
|
}
|
|
@@ -50,10 +50,10 @@ export interface OTPInputOptions {
|
|
|
50
50
|
* @example
|
|
51
51
|
* ```ts
|
|
52
52
|
* import { prop } from '@tempots/dom'
|
|
53
|
-
* import {
|
|
53
|
+
* import { OtpInput } from '@tempots/beatui'
|
|
54
54
|
*
|
|
55
55
|
* const code = prop('')
|
|
56
|
-
*
|
|
56
|
+
* OtpInput({
|
|
57
57
|
* value: code,
|
|
58
58
|
* onChange: code.set,
|
|
59
59
|
* onComplete: (v) => console.log('Code entered:', v),
|
|
@@ -64,7 +64,7 @@ export interface OTPInputOptions {
|
|
|
64
64
|
* @example
|
|
65
65
|
* ```ts
|
|
66
66
|
* // Masked 4-digit PIN
|
|
67
|
-
*
|
|
67
|
+
* OtpInput({
|
|
68
68
|
* value: prop(''),
|
|
69
69
|
* onChange: (v) => console.log(v),
|
|
70
70
|
* length: 4,
|
|
@@ -74,4 +74,4 @@ export interface OTPInputOptions {
|
|
|
74
74
|
* })
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
77
|
-
export declare function
|
|
77
|
+
export declare function OtpInput({ length, value, onChange, onComplete, disabled, mask, type, size, color, placeholder, autoFocus, }?: OtpInputOptions): import("@tempots/dom").Renderable;
|
|
@@ -8,17 +8,17 @@ import { ControlSize } from '../../theme/types';
|
|
|
8
8
|
* Extends {@link InputOptions} for numeric values with properties to control the
|
|
9
9
|
* maximum rating, icon appearance, theme colors, and rounding precision.
|
|
10
10
|
*/
|
|
11
|
-
type RatingInputOptions = InputOptions<number> & {
|
|
11
|
+
export type RatingInputOptions = InputOptions<number> & {
|
|
12
12
|
/** Maximum number of rating icons (stars). @default 5 */
|
|
13
13
|
max?: Value<number>;
|
|
14
14
|
/** Theme color for filled (active) icons. @default 'yellow' */
|
|
15
15
|
fullColor?: Value<ThemeColorName>;
|
|
16
16
|
/** Theme color for empty (inactive) icons. @default 'neutral' */
|
|
17
17
|
emptyColor?: Value<ThemeColorName>;
|
|
18
|
-
/** Icon name for
|
|
19
|
-
|
|
20
|
-
/** Icon name for
|
|
21
|
-
|
|
18
|
+
/** Icon name for active (filled) rating icons. @default 'line-md:star-alt-filled' */
|
|
19
|
+
activeIcon?: Value<string>;
|
|
20
|
+
/** Icon name for inactive (empty) rating icons. @default 'line-md:star-alt' */
|
|
21
|
+
inactiveIcon?: Value<string>;
|
|
22
22
|
/** Visual size of the rating icons. @default 'md' */
|
|
23
23
|
size?: Value<ControlSize>;
|
|
24
24
|
/** Step size for rounding during keyboard interactions (e.g., 0.25 for quarter steps). @default 1 */
|
|
@@ -60,8 +60,8 @@ type RatingInputOptions = InputOptions<number> & {
|
|
|
60
60
|
* value: prop(0),
|
|
61
61
|
* onChange: (v) => console.log('Rating:', v),
|
|
62
62
|
* max: 10,
|
|
63
|
-
*
|
|
64
|
-
*
|
|
63
|
+
* activeIcon: 'mdi:heart',
|
|
64
|
+
* inactiveIcon: 'mdi:heart-outline',
|
|
65
65
|
* fullColor: 'red',
|
|
66
66
|
* rounding: 0.25,
|
|
67
67
|
* size: 'lg',
|
|
@@ -69,4 +69,3 @@ type RatingInputOptions = InputOptions<number> & {
|
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
71
|
export declare const RatingInput: (options: RatingInputOptions) => import("@tempots/dom").Renderable;
|
|
72
|
-
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { TNode, 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 SelectTagsInput} component.
|
|
7
7
|
* Combines tag selection with a click-to-open dropdown menu.
|
|
8
8
|
*
|
|
9
9
|
* @typeParam T - The type of tag values.
|
|
10
10
|
*/
|
|
11
|
-
export type
|
|
11
|
+
export type SelectTagsInputOptions<T> = {
|
|
12
12
|
/** The available dropdown options to choose from. */
|
|
13
13
|
options: Value<DropdownOption<T>[]>;
|
|
14
14
|
/**
|
|
@@ -70,7 +70,7 @@ export declare function Chips<T>(opts: {
|
|
|
70
70
|
* })
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
|
-
export declare function SelectTagsInput<T>(options:
|
|
73
|
+
export declare function SelectTagsInput<T>(options: SelectTagsInputOptions<T>): import("@tempots/dom").Renderable;
|
|
74
74
|
/**
|
|
75
75
|
* A base form control wrapper for {@link SelectTagsInput} using a raw controller.
|
|
76
76
|
*
|
|
@@ -78,7 +78,7 @@ export declare function SelectTagsInput<T>(options: SelectTagsOptions<T>): impor
|
|
|
78
78
|
* @param options - Base controller options for the select tags control.
|
|
79
79
|
* @returns A renderable form control component.
|
|
80
80
|
*/
|
|
81
|
-
export declare function BaseSelectTagsControl<T>(options:
|
|
81
|
+
export declare function BaseSelectTagsControl<T>(options: BaseControlOptions<T[], SelectTagsInputOptions<T>>): TNode;
|
|
82
82
|
/**
|
|
83
83
|
* A full form control wrapper for {@link SelectTagsInput} with label, error, and description support.
|
|
84
84
|
*
|
|
@@ -86,4 +86,4 @@ export declare function BaseSelectTagsControl<T>(options: BaseControllerOptions<
|
|
|
86
86
|
* @param options - Controller options for the select tags control.
|
|
87
87
|
* @returns A renderable form control component with wrapper.
|
|
88
88
|
*/
|
|
89
|
-
export declare function SelectTagsControl<T>(options:
|
|
89
|
+
export declare function SelectTagsControl<T>(options: ControlOptions<T[], SelectTagsInputOptions<T>>): import("@tempots/dom").Renderable;
|
|
@@ -23,9 +23,9 @@ export type SwitchOptions = {
|
|
|
23
23
|
/** Whether the switch is disabled and cannot be toggled. @default false */
|
|
24
24
|
disabled?: Value<boolean>;
|
|
25
25
|
/** Visual size of the switch. @default 'md' */
|
|
26
|
-
size?: ControlSize
|
|
26
|
+
size?: Value<ControlSize>;
|
|
27
27
|
/** Unique HTML id attribute for the switch element */
|
|
28
|
-
id?: string
|
|
28
|
+
id?: Value<string>;
|
|
29
29
|
/** Theme color for the switch track when on. @default 'primary' */
|
|
30
30
|
color?: Value<ThemeColorName>;
|
|
31
31
|
/** Tab index for keyboard navigation order. @default 0 */
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Value } from '@tempots/dom';
|
|
2
|
+
import { InputOptions } from './input-options';
|
|
3
|
+
import { IconSize } from '../../theme';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the three possible states of a tri-state checkbox.
|
|
6
|
+
*
|
|
7
|
+
* - `'checked'` — all items selected
|
|
8
|
+
* - `'unchecked'` — no items selected
|
|
9
|
+
* - `'indeterminate'` — some items selected (shown with a minus icon)
|
|
10
|
+
*/
|
|
11
|
+
export type CheckboxState = 'checked' | 'unchecked' | 'indeterminate';
|
|
12
|
+
/**
|
|
13
|
+
* Configuration options for the {@link TriStateCheckboxInput} component.
|
|
14
|
+
*
|
|
15
|
+
* Extends {@link InputOptions} for {@link CheckboxState} values with additional
|
|
16
|
+
* properties to customize the icons for each state and their size.
|
|
17
|
+
*/
|
|
18
|
+
export type TriStateCheckboxInputOptions = InputOptions<CheckboxState> & {
|
|
19
|
+
/** Icon name to display when the checkbox is active (checked). @default 'ri:checkbox-fill' */
|
|
20
|
+
activeIcon?: Value<string | undefined>;
|
|
21
|
+
/** Icon name to display when the checkbox is inactive (unchecked). @default 'mdi:checkbox-blank-outline' */
|
|
22
|
+
inactiveIcon?: Value<string | undefined>;
|
|
23
|
+
/** Icon name to display when the checkbox is in the indeterminate state. @default 'ri/checkbox-indeterminate-fill' */
|
|
24
|
+
indeterminateIcon?: Value<string | undefined>;
|
|
25
|
+
/** Size of the checkbox icon. */
|
|
26
|
+
iconSize?: Value<IconSize>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A custom tri-state checkbox input component that supports checked, unchecked,
|
|
30
|
+
* and indeterminate states with icon-based rendering.
|
|
31
|
+
*
|
|
32
|
+
* Renders a styled checkbox using icons for each state, wrapped in an
|
|
33
|
+
* {@link InputContainer}. Supports full keyboard interaction (Space and Enter to
|
|
34
|
+
* toggle), ARIA `role="checkbox"` semantics with `aria-checked="mixed"` for the
|
|
35
|
+
* indeterminate state, and an optional text label rendered from the `placeholder`
|
|
36
|
+
* property. When `placeholder` is set, clicking the label also toggles the checkbox.
|
|
37
|
+
*
|
|
38
|
+
* The default toggle cycle is: `unchecked` → `checked` → `indeterminate` → `unchecked`.
|
|
39
|
+
* Provide a custom `onChange` to override this behavior.
|
|
40
|
+
*
|
|
41
|
+
* @param options - Configuration options for the tri-state checkbox
|
|
42
|
+
* @returns A styled tri-state checkbox element with optional label, wrapped in an InputContainer
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* import { prop } from '@tempots/dom'
|
|
47
|
+
* import { TriStateCheckboxInput } from '@tempots/beatui'
|
|
48
|
+
*
|
|
49
|
+
* const state = prop<CheckboxState>('unchecked')
|
|
50
|
+
* TriStateCheckboxInput({
|
|
51
|
+
* value: state,
|
|
52
|
+
* onChange: state.set,
|
|
53
|
+
* placeholder: 'Select all',
|
|
54
|
+
* })
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* // Drive state from DataSource signals
|
|
60
|
+
* import { computedOf } from '@tempots/dom'
|
|
61
|
+
* import { CheckboxState, TriStateCheckboxInput } from '@tempots/beatui'
|
|
62
|
+
*
|
|
63
|
+
* const checkboxState = computedOf(
|
|
64
|
+
* dataSource.isAllSelected,
|
|
65
|
+
* dataSource.isSomeSelected
|
|
66
|
+
* )((isAll, isSome): CheckboxState =>
|
|
67
|
+
* isAll ? 'checked' : isSome ? 'indeterminate' : 'unchecked'
|
|
68
|
+
* )
|
|
69
|
+
*
|
|
70
|
+
* TriStateCheckboxInput({
|
|
71
|
+
* value: checkboxState,
|
|
72
|
+
* onChange: () => {
|
|
73
|
+
* if (dataSource.isAllSelected.value) {
|
|
74
|
+
* dataSource.deselectAll()
|
|
75
|
+
* } else {
|
|
76
|
+
* dataSource.selectAll()
|
|
77
|
+
* }
|
|
78
|
+
* },
|
|
79
|
+
* })
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare const TriStateCheckboxInput: (options: TriStateCheckboxInputOptions) => import("@tempots/dom").Renderable;
|
|
@@ -12,10 +12,10 @@ import { InputOptions } from './input-options';
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
|
-
*
|
|
15
|
+
* UuidInput({
|
|
16
16
|
* value: prop(''),
|
|
17
17
|
* onChange: uuid => console.log('UUID:', uuid),
|
|
18
18
|
* })
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const UuidInput: (options: InputOptions<string>) => import("@tempots/dom").Renderable;
|
|
@@ -10,6 +10,20 @@ export interface CardOptions {
|
|
|
10
10
|
/** The border radius of the card. @default 'lg' */
|
|
11
11
|
roundedness?: Value<RadiusName>;
|
|
12
12
|
}
|
|
13
|
+
/** Options for {@link CardHeader}, {@link CardBody}, and {@link CardFooter}. */
|
|
14
|
+
export interface CardSectionOptions {
|
|
15
|
+
/** Additional CSS classes. */
|
|
16
|
+
class?: Value<string>;
|
|
17
|
+
}
|
|
18
|
+
/** Options for {@link CardCoverImage}. */
|
|
19
|
+
export interface CardCoverImageOptions {
|
|
20
|
+
/** Image source URL. */
|
|
21
|
+
src: Value<string>;
|
|
22
|
+
/** Alt text for accessibility. */
|
|
23
|
+
alt?: Value<string>;
|
|
24
|
+
/** Fixed height for the image (e.g. `'200px'`). Defaults to auto. */
|
|
25
|
+
height?: Value<string>;
|
|
26
|
+
}
|
|
13
27
|
/**
|
|
14
28
|
* A container component that groups content with visual separation using
|
|
15
29
|
* elevation, borders, or background color depending on the variant.
|
|
@@ -34,3 +48,55 @@ export interface CardOptions {
|
|
|
34
48
|
* ```
|
|
35
49
|
*/
|
|
36
50
|
export declare function Card({ variant, size, roundedness }?: CardOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
51
|
+
/**
|
|
52
|
+
* A header section for a {@link Card}, typically containing a title and actions.
|
|
53
|
+
* Renders with a bottom border separator.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* Card({},
|
|
58
|
+
* CardHeader({}, html.h3('Title')),
|
|
59
|
+
* CardBody({}, html.p('Content')),
|
|
60
|
+
* )
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function CardHeader({ class: className }?: CardSectionOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
64
|
+
/**
|
|
65
|
+
* The main content area of a {@link Card}.
|
|
66
|
+
* Expands to fill available space with scrollable overflow.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* Card({},
|
|
71
|
+
* CardBody({}, html.p('Main content here.'))
|
|
72
|
+
* )
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function CardBody({ class: className }?: CardSectionOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
76
|
+
/**
|
|
77
|
+
* A footer section for a {@link Card}, typically containing action buttons.
|
|
78
|
+
* Renders with a top border separator and right-aligned content.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* Card({},
|
|
83
|
+
* CardBody({}, html.p('Content')),
|
|
84
|
+
* CardFooter({}, Button({ variant: 'filled' }, 'Save')),
|
|
85
|
+
* )
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function CardFooter({ class: className }?: CardSectionOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
89
|
+
/**
|
|
90
|
+
* A full-bleed cover image for a {@link Card}.
|
|
91
|
+
* Automatically inherits the card's border radius at the appropriate corners
|
|
92
|
+
* based on its position (first child = top corners, last child = bottom corners).
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* Card({},
|
|
97
|
+
* CardCoverImage({ src: 'https://example.com/photo.jpg', alt: 'Photo', height: '200px' }),
|
|
98
|
+
* CardBody({}, html.p('Description')),
|
|
99
|
+
* )
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function CardCoverImage({ src, alt, height }: CardCoverImageOptions): import("@tempots/dom").Renderable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
/** Configuration options for the {@link Collapse} component. */
|
|
3
|
-
export type
|
|
3
|
+
export type CollapseOptions = {
|
|
4
4
|
/** Reactive boolean controlling whether the content is expanded or collapsed. */
|
|
5
5
|
open: Value<boolean>;
|
|
6
6
|
};
|
|
@@ -30,4 +30,4 @@ export type CollapseOption = {
|
|
|
30
30
|
* )
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export declare function Collapse({ open }:
|
|
33
|
+
export declare function Collapse({ open }: CollapseOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TNode } from '@tempots/dom';
|
|
2
|
+
/**
|
|
3
|
+
* Shared flex modifier helpers that return TNode class attributes.
|
|
4
|
+
* Use these composable helpers inside Stack or Group to control layout.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* Stack(Gap('md'), Align('center'), child1, child2)
|
|
9
|
+
* Group(Gap('sm'), Justify('between'), Wrap, child1, child2)
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export type FlexGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
13
|
+
export type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
14
|
+
export type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
15
|
+
/** Set the gap between flex children. */
|
|
16
|
+
export declare function Gap(size: FlexGap): TNode;
|
|
17
|
+
/** Set cross-axis alignment (align-items). */
|
|
18
|
+
export declare function Align(align: FlexAlign): TNode;
|
|
19
|
+
/** Set main-axis distribution (justify-content). */
|
|
20
|
+
export declare function Justify(justify: FlexJustify): TNode;
|
|
21
|
+
/** Allow items to wrap to the next line. */
|
|
22
|
+
export declare const Wrap: TNode;
|
|
23
|
+
/** Prevent items from wrapping. */
|
|
24
|
+
export declare const NoWrap: TNode;
|
|
25
|
+
/** Allow the container to grow (flex-grow: 1). */
|
|
26
|
+
export declare const Grow: TNode;
|
|
@@ -11,10 +11,10 @@ export interface SlashCommandPaletteOptions {
|
|
|
11
11
|
left: number;
|
|
12
12
|
}>;
|
|
13
13
|
onSelect: (command: SlashCommandDefinition) => void;
|
|
14
|
-
|
|
14
|
+
onClose: () => void;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Default slash commands for the editor
|
|
18
18
|
*/
|
|
19
19
|
export declare const DEFAULT_SLASH_COMMANDS: SlashCommandDefinition[];
|
|
20
|
-
export declare function SlashCommandPalette({ commands, isVisible, filterText, position, onSelect,
|
|
20
|
+
export declare function SlashCommandPalette({ commands, isVisible, filterText, position, onSelect, onClose, }: SlashCommandPaletteOptions): import("@tempots/core").Renderable<import("@tempots/dom").DOMContext, typeof import("@tempots/dom").DOM_RENDERABLE_TYPE>;
|
|
@@ -7,7 +7,10 @@ interface LoadCompleteOptions {
|
|
|
7
7
|
export interface PdfPageViewerOptions {
|
|
8
8
|
/** PDF source: URL string, Uint8Array, or ArrayBuffer */
|
|
9
9
|
source: SplitValue<string | Uint8Array | ArrayBuffer>;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Page number to display (1-based)
|
|
12
|
+
* @default 1
|
|
13
|
+
*/
|
|
11
14
|
page?: Value<number>;
|
|
12
15
|
/**
|
|
13
16
|
* How the PDF should fit in the available space:
|
|
@@ -16,24 +19,24 @@ export interface PdfPageViewerOptions {
|
|
|
16
19
|
* - 'height': Fit to container height while maintaining aspect ratio
|
|
17
20
|
* - 'contain': Fit entire page in container (like CSS object-fit: contain)
|
|
18
21
|
* - 'cover': Fill container, may crop (like CSS object-fit: cover)
|
|
19
|
-
*
|
|
22
|
+
* @default 'width'
|
|
20
23
|
*/
|
|
21
24
|
fit?: Value<'none' | 'width' | 'height' | 'contain' | 'cover'>;
|
|
22
25
|
/**
|
|
23
26
|
* Explicit scale factor when fit='none'
|
|
24
27
|
* Ignored when fit is not 'none'
|
|
25
|
-
*
|
|
28
|
+
* @default 1
|
|
26
29
|
*/
|
|
27
30
|
scale?: Value<number>;
|
|
28
31
|
/**
|
|
29
32
|
* Rotation angle in degrees (0, 90, 180, 270)
|
|
30
|
-
*
|
|
33
|
+
* @default 0
|
|
31
34
|
*/
|
|
32
35
|
rotation?: Value<0 | 90 | 180 | 270>;
|
|
33
36
|
/**
|
|
34
37
|
* Rendering quality/pixel density multiplier
|
|
35
38
|
* Higher values produce sharper images but use more memory
|
|
36
|
-
*
|
|
39
|
+
* @default 2
|
|
37
40
|
*/
|
|
38
41
|
quality?: Value<number>;
|
|
39
42
|
/**
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TNode, Value } from '@tempots/dom';
|
|
2
|
+
import { ControlSize } from '../theme';
|
|
3
|
+
/**
|
|
4
|
+
* Options for the {@link LoadingOverlay} component.
|
|
5
|
+
*/
|
|
6
|
+
export interface LoadingOverlayOptions {
|
|
7
|
+
/** Whether the overlay is visible. @default false */
|
|
8
|
+
visible: Value<boolean>;
|
|
9
|
+
/** Optional message to display below the spinner. */
|
|
10
|
+
message?: Value<string>;
|
|
11
|
+
/** Size of the spinner icon. @default 'lg' */
|
|
12
|
+
size?: Value<ControlSize>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A semi-transparent overlay with a centered loading spinner.
|
|
16
|
+
*
|
|
17
|
+
* Place inside a container with `position: relative` to cover its content.
|
|
18
|
+
* When `visible` is false, the overlay is removed from the DOM entirely.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* html.div(
|
|
23
|
+
* attr.style('position: relative'),
|
|
24
|
+
* LoadingOverlay({ visible: loading, message: 'Loading data...' }),
|
|
25
|
+
* // ... content underneath
|
|
26
|
+
* )
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function LoadingOverlay(options: LoadingOverlayOptions): TNode;
|
|
@@ -61,7 +61,7 @@ export type NoticeOptions = {
|
|
|
61
61
|
* Callback invoked when the notice is dismissed. If provided, the close
|
|
62
62
|
* button is shown regardless of the `closable` setting.
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
onClose?: () => void;
|
|
65
65
|
/**
|
|
66
66
|
* Additional CSS class name(s) to apply to the notice root element.
|
|
67
67
|
*/
|
|
@@ -73,7 +73,7 @@ export type NoticeOptions = {
|
|
|
73
73
|
* that automatically adapt based on the variant.
|
|
74
74
|
*
|
|
75
75
|
* When dismissed, the notice is hidden from the DOM and the optional
|
|
76
|
-
* `
|
|
76
|
+
* `onClose` callback is invoked.
|
|
77
77
|
*
|
|
78
78
|
* @param options - Configuration options for the notice.
|
|
79
79
|
* @param children - Content nodes rendered inside the notice body.
|
|
@@ -93,7 +93,7 @@ export type NoticeOptions = {
|
|
|
93
93
|
* variant: 'danger',
|
|
94
94
|
* title: 'Error',
|
|
95
95
|
* closable: true,
|
|
96
|
-
*
|
|
96
|
+
* onClose: () => console.log('dismissed'),
|
|
97
97
|
* },
|
|
98
98
|
* 'Something went wrong. Please try again.'
|
|
99
99
|
* )
|
|
@@ -105,4 +105,4 @@ export type NoticeOptions = {
|
|
|
105
105
|
* )
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
108
|
-
export declare function Notice({ variant, tone, role, title, icon, closable,
|
|
108
|
+
export declare function Notice({ variant, tone, role, title, icon, closable, onClose, class: cls, }: NoticeOptions, ...children: TNode[]): Renderable;
|
|
@@ -8,6 +8,8 @@ import { AnimationConfig } from '../../utils';
|
|
|
8
8
|
* configuration, and lifecycle hooks for a single notification instance.
|
|
9
9
|
*/
|
|
10
10
|
type NotificationEntry = {
|
|
11
|
+
/** Unique identifier for keyed rendering. */
|
|
12
|
+
id: string;
|
|
11
13
|
/** Animation configuration for the notification's enter/exit transitions. */
|
|
12
14
|
animation: AnimationConfig;
|
|
13
15
|
/** Child content nodes rendered inside the notification body. */
|
|
@@ -15,13 +17,13 @@ type NotificationEntry = {
|
|
|
15
17
|
/** Reactive signal indicating whether the notification is in a loading state. */
|
|
16
18
|
loading: Signal<boolean>;
|
|
17
19
|
/** Reactive signal controlling close button visibility. */
|
|
18
|
-
|
|
20
|
+
showCloseButton: Signal<boolean>;
|
|
19
21
|
/** Reactive signal controlling border visibility. */
|
|
20
|
-
|
|
22
|
+
showBorder: Signal<boolean>;
|
|
21
23
|
/** Reactive signal for the notification's theme color. */
|
|
22
24
|
color: Signal<ThemeColorName>;
|
|
23
25
|
/** Reactive signal for the notification's border radius. */
|
|
24
|
-
|
|
26
|
+
roundedness: Signal<RadiusName>;
|
|
25
27
|
/** Title content rendered above the notification body. */
|
|
26
28
|
title: TNode;
|
|
27
29
|
/** Reactive signal for the Iconify icon identifier. */
|
|
@@ -96,6 +98,10 @@ export type NotificationProviderValue = {
|
|
|
96
98
|
listenOnShow: (fn: (entry: NotificationEntry) => void) => () => void;
|
|
97
99
|
/** Reactive signal tracking the number of currently visible notifications. */
|
|
98
100
|
activeNotifications: Signal<number>;
|
|
101
|
+
/** Reactive list of active notification entries for declarative rendering. */
|
|
102
|
+
entries: Signal<NotificationEntry[]>;
|
|
103
|
+
/** Removes a notification entry by ID. */
|
|
104
|
+
removeEntry: (id: string) => void;
|
|
99
105
|
};
|
|
100
106
|
/**
|
|
101
107
|
* A subset of the notification provider value exposing only the `show` and `clear` methods.
|
|
@@ -15,12 +15,12 @@ export type NotificationOptions = {
|
|
|
15
15
|
* Whether to display a close button in the notification.
|
|
16
16
|
* @default false
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
showCloseButton?: Value<boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* Whether the notification displays a colored border.
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
showBorder?: Value<boolean>;
|
|
24
24
|
/**
|
|
25
25
|
* Theme color applied to the notification accent, icon, and close button.
|
|
26
26
|
* @default 'primary'
|
|
@@ -30,7 +30,7 @@ export type NotificationOptions = {
|
|
|
30
30
|
* Border radius applied to the notification container.
|
|
31
31
|
* @default 'md'
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
roundedness?: Value<RadiusName>;
|
|
34
34
|
/**
|
|
35
35
|
* Optional title content rendered above the notification body.
|
|
36
36
|
*/
|
|
@@ -52,23 +52,23 @@ export type NotificationOptions = {
|
|
|
52
52
|
/**
|
|
53
53
|
* Builds the CSS class string for a Notification element based on its state flags.
|
|
54
54
|
*
|
|
55
|
-
* @param
|
|
55
|
+
* @param showBorder - Whether the bordered modifier class is applied.
|
|
56
56
|
* @param hasIcon - Whether the has-icon modifier class is applied.
|
|
57
57
|
* @param hasCloseButton - Whether the closable modifier class is applied.
|
|
58
58
|
* @param loading - Whether the loading modifier class is applied.
|
|
59
59
|
* @param extra - Optional additional CSS class(es) to append.
|
|
60
60
|
* @returns A space-separated class string for the notification root element.
|
|
61
61
|
*/
|
|
62
|
-
export declare function generateNotificationClasses(
|
|
62
|
+
export declare function generateNotificationClasses(showBorder: boolean, hasIcon: boolean, hasCloseButton: boolean, loading: boolean, extra?: string): string;
|
|
63
63
|
/**
|
|
64
64
|
* Builds the inline CSS style string for a Notification element, setting
|
|
65
65
|
* CSS custom properties for accent color and border radius.
|
|
66
66
|
*
|
|
67
67
|
* @param color - Theme color name used for the accent (maps to the 500 shade).
|
|
68
|
-
* @param
|
|
68
|
+
* @param roundedness - Radius token name for the notification border radius.
|
|
69
69
|
* @returns A semicolon-separated CSS variable declaration string.
|
|
70
70
|
*/
|
|
71
|
-
export declare function generateNotificationStyles(color: ThemeColorName,
|
|
71
|
+
export declare function generateNotificationStyles(color: ThemeColorName, roundedness: RadiusName): string;
|
|
72
72
|
/**
|
|
73
73
|
* Renders a notification card with optional icon, title, body content,
|
|
74
74
|
* loading state, and close button. Uses ARIA live regions for accessibility.
|
|
@@ -94,7 +94,7 @@ export declare function generateNotificationStyles(color: ThemeColorName, radius
|
|
|
94
94
|
* Notification(
|
|
95
95
|
* {
|
|
96
96
|
* icon: 'material-symbols:info-outline',
|
|
97
|
-
*
|
|
97
|
+
* showCloseButton: true,
|
|
98
98
|
* onClose: () => console.log('closed'),
|
|
99
99
|
* },
|
|
100
100
|
* 'A new version is available.'
|
|
@@ -107,4 +107,4 @@ export declare function generateNotificationStyles(color: ThemeColorName, radius
|
|
|
107
107
|
* )
|
|
108
108
|
* ```
|
|
109
109
|
*/
|
|
110
|
-
export declare function Notification({ loading,
|
|
110
|
+
export declare function Notification({ loading, showCloseButton, showBorder, color, roundedness, title, icon, onClose, class: cls, }?: NotificationOptions, ...children: TNode[]): Renderable;
|