@tempots/beatui 1.2.2 → 1.3.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/beatui.css +1096 -141
- package/dist/beatui.tailwind.css +1096 -141
- package/dist/deep-merge-Bydz6jLt.cjs +1 -0
- package/dist/{deep-merge-DwXDd3iF.js → deep-merge-CzZVsVF-.js} +1 -1
- package/dist/{duration-input-CjNZyVkf.cjs → duration-input-BrYLC1js.cjs} +1 -1
- package/dist/{duration-input-CnMMvPgT.js → duration-input-CFu6vq-y.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +6359 -5270
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +3 -3
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +2 -2
- package/dist/types/components/form/input/index.d.ts +2 -1
- package/dist/types/components/form/input/multi-select.d.ts +98 -0
- package/dist/types/components/form/input/range-slider.d.ts +175 -0
- package/dist/types/components/media/carousel.d.ts +117 -0
- package/dist/types/components/media/index.d.ts +1 -0
- package/dist/types/components/navigation/index.d.ts +1 -0
- package/dist/types/components/navigation/navigation-progress.d.ts +72 -0
- package/dist/types/components/overlay/index.d.ts +1 -0
- package/dist/types/components/overlay/onboarding-tour.d.ts +98 -0
- package/dist/{widget-customization-D2a6SVP3.js → widget-customization-BAchyOUo.js} +1 -1
- package/dist/{widget-customization-CD_NyRQ8.cjs → widget-customization-DELy3SMQ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/deep-merge-Bjv1NvKj.cjs +0 -1
- package/dist/types/components/form/input/advanced-slider.d.ts +0 -143
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Value, TNode } from '@tempots/dom';
|
|
2
|
-
import { ControlSize } from '../../theme';
|
|
3
|
-
import { ThemeColorName } from '../../../tokens';
|
|
4
|
-
/**
|
|
5
|
-
* Definition of a tick mark on the slider track.
|
|
6
|
-
*/
|
|
7
|
-
export interface SliderTick {
|
|
8
|
-
/** The numeric value where this tick appears */
|
|
9
|
-
value: number;
|
|
10
|
-
/** Optional label displayed below the tick mark */
|
|
11
|
-
label?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Configuration options for the {@link AdvancedSlider} component.
|
|
15
|
-
*
|
|
16
|
-
* Supports single value, range (two thumbs), and multi-point (arbitrary number
|
|
17
|
-
* of thumbs) modes. Features tick marks, value labels, and customizable colors.
|
|
18
|
-
*/
|
|
19
|
-
export interface AdvancedSliderOptions {
|
|
20
|
-
/** Minimum value of the slider range */
|
|
21
|
-
min?: Value<number>;
|
|
22
|
-
/** Maximum value of the slider range */
|
|
23
|
-
max?: Value<number>;
|
|
24
|
-
/** Step increment between valid values. @default 1 */
|
|
25
|
-
step?: Value<number>;
|
|
26
|
-
/** Whether the slider is disabled. @default false */
|
|
27
|
-
disabled?: Value<boolean>;
|
|
28
|
-
/** Visual size of the slider. @default 'md' */
|
|
29
|
-
size?: Value<ControlSize>;
|
|
30
|
-
/** Theme color for the filled track and thumbs. @default 'primary' */
|
|
31
|
-
color?: Value<ThemeColorName>;
|
|
32
|
-
/**
|
|
33
|
-
* Single value mode: the current slider value.
|
|
34
|
-
* Use this for a simple single-thumb slider.
|
|
35
|
-
*/
|
|
36
|
-
value?: Value<number>;
|
|
37
|
-
/** Callback for single-value mode changes */
|
|
38
|
-
onChange?: (value: number) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Range mode: a two-element array `[low, high]`.
|
|
41
|
-
* When provided, two thumbs are rendered.
|
|
42
|
-
*/
|
|
43
|
-
range?: Value<[number, number]>;
|
|
44
|
-
/** Callback for range mode changes */
|
|
45
|
-
onRangeChange?: (range: [number, number]) => void;
|
|
46
|
-
/**
|
|
47
|
-
* Multi-point mode: an array of values, each getting its own thumb.
|
|
48
|
-
* When provided, multiple thumbs are rendered at initialization time.
|
|
49
|
-
* The number of points is fixed after component creation.
|
|
50
|
-
*/
|
|
51
|
-
points?: Value<number[]>;
|
|
52
|
-
/** Callback for multi-point mode changes */
|
|
53
|
-
onPointsChange?: (points: number[]) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Tick marks along the slider track.
|
|
56
|
-
* Can be `true` for automatic step-based ticks, or an array of custom tick definitions.
|
|
57
|
-
*/
|
|
58
|
-
ticks?: Value<boolean | SliderTick[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Whether to show the current value label(s) above the thumb(s).
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
63
|
-
showValue?: Value<boolean>;
|
|
64
|
-
/**
|
|
65
|
-
* Custom formatter for the displayed value labels.
|
|
66
|
-
* @default (v) => String(v)
|
|
67
|
-
*/
|
|
68
|
-
formatValue?: (value: number) => string;
|
|
69
|
-
/**
|
|
70
|
-
* Colors for individual segments between consecutive thumbs in multi-point mode.
|
|
71
|
-
* Each entry corresponds to the segment between thumb[i] and thumb[i+1].
|
|
72
|
-
* If fewer colors than segments are provided, remaining segments use the default color.
|
|
73
|
-
* If not provided, a single fill spanning all thumbs is used (existing behavior).
|
|
74
|
-
*/
|
|
75
|
-
segmentColors?: Value<ThemeColorName[]>;
|
|
76
|
-
/**
|
|
77
|
-
* Custom renderer for the thumb element. When provided, replaces the default
|
|
78
|
-
* circular thumb with your custom content. The rendered content is placed
|
|
79
|
-
* inside the thumb container that handles positioning, ARIA attributes,
|
|
80
|
-
* keyboard navigation, and pointer events.
|
|
81
|
-
*
|
|
82
|
-
* @param index - The zero-based index of the thumb
|
|
83
|
-
* @param value - A reactive value holding the current thumb position
|
|
84
|
-
* @returns A TNode to render as the thumb
|
|
85
|
-
*/
|
|
86
|
-
renderThumb?: (index: number, value: Value<number>) => TNode;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* An advanced slider component supporting single value, range selection,
|
|
90
|
-
* and multi-point modes with tick marks and value display.
|
|
91
|
-
*
|
|
92
|
-
* - **Single mode**: Pass `value` and `onChange` for a standard single-thumb slider.
|
|
93
|
-
* - **Range mode**: Pass `range` and `onRangeChange` for a two-thumb range selector.
|
|
94
|
-
* - **Multi-point mode**: Pass `points` and `onPointsChange` for arbitrary number of thumbs.
|
|
95
|
-
*
|
|
96
|
-
* Additional features include configurable tick marks (automatic or custom),
|
|
97
|
-
* value labels above the thumbs, step snapping, and theme-aware coloring.
|
|
98
|
-
*
|
|
99
|
-
* @param options - Configuration for the slider
|
|
100
|
-
* @returns A styled slider element
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```ts
|
|
104
|
-
* // Simple slider with value display
|
|
105
|
-
* const vol = prop(50)
|
|
106
|
-
* AdvancedSlider({
|
|
107
|
-
* value: vol, onChange: vol.set,
|
|
108
|
-
* min: 0, max: 100,
|
|
109
|
-
* showValue: true,
|
|
110
|
-
* ticks: true,
|
|
111
|
-
* })
|
|
112
|
-
* ```
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```ts
|
|
116
|
-
* // Range slider
|
|
117
|
-
* const priceRange = prop<[number, number]>([20, 80])
|
|
118
|
-
* AdvancedSlider({
|
|
119
|
-
* range: priceRange, onRangeChange: priceRange.set,
|
|
120
|
-
* min: 0, max: 100, step: 5,
|
|
121
|
-
* ticks: [
|
|
122
|
-
* { value: 0, label: '$0' },
|
|
123
|
-
* { value: 50, label: '$50' },
|
|
124
|
-
* { value: 100, label: '$100' },
|
|
125
|
-
* ],
|
|
126
|
-
* showValue: true,
|
|
127
|
-
* formatValue: v => `$${v}`,
|
|
128
|
-
* })
|
|
129
|
-
* ```
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```ts
|
|
133
|
-
* // Multi-point slider
|
|
134
|
-
* const pts = prop([10, 40, 70])
|
|
135
|
-
* AdvancedSlider({
|
|
136
|
-
* points: pts, onPointsChange: pts.set,
|
|
137
|
-
* min: 0, max: 100,
|
|
138
|
-
* showValue: true,
|
|
139
|
-
* color: 'green',
|
|
140
|
-
* })
|
|
141
|
-
* ```
|
|
142
|
-
*/
|
|
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;
|