@gecko-ui-kit/vue 0.0.0-stage → 0.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.
@@ -0,0 +1,219 @@
1
+ import type { GeckoComponent } from './core.js';
2
+
3
+ /** 'accent' | 'good' | 'warn' | 'bad', a palette name ('teal', 'rose', 'amber'…) or any CSS colour. */
4
+ export type ChartTone = 'accent' | 'good' | 'warn' | 'bad' | 'ink' | 'muted' | 'indigo' | 'teal' | 'rose' | 'amber' | 'violet' | 'green' | 'slate' | 'sky' | (string & {});
5
+
6
+ /* ---------- LineChart ---------- */
7
+ export interface LineSeries {
8
+ name: string;
9
+ /** Lines up with labels; null leaves a gap. */
10
+ data: (number | null)[];
11
+ tone?: ChartTone;
12
+ /** Start hidden (its legend key turns it on). */
13
+ hidden?: boolean;
14
+ }
15
+ export interface LineChartHandle {
16
+ readonly labels: string[];
17
+ readonly series: { name: string; data: (number | null)[]; shown: boolean }[];
18
+ /** Points morph to the new values; added / removed series fade. */
19
+ update(next: { labels?: string[]; series?: LineSeries[] }): LineChartHandle;
20
+ /** Show the crosshair at a label (-1 hides it). */
21
+ highlight(index: number | null): LineChartHandle;
22
+ /** Hide or show a series; returns whether it is shown. */
23
+ toggle(name: string, on?: boolean): boolean;
24
+ destroy(): void;
25
+ readonly el: HTMLElement;
26
+ }
27
+ export interface LineChartProps {
28
+ /** New labels morph in place. */
29
+ labels: (string | number)[];
30
+ /** New series morph in place (added / removed ones fade). */
31
+ series: LineSeries[];
32
+ /** Fill under each line (default true). */
33
+ area?: boolean;
34
+ /** Monotone curve (default true); false = straight segments. */
35
+ smooth?: boolean;
36
+ /** Each series sits on top of the ones before it. */
37
+ stacked?: boolean;
38
+ /** px (default 240); the width follows the element. */
39
+ height?: number;
40
+ /** Fix the bottom of the y-axis (default 0, or a nice value below the lowest point). */
41
+ yMin?: number | null;
42
+ /** Fix the top of the y-axis. */
43
+ yMax?: number | null;
44
+ /** About how many steps on the y-axis (default 4). */
45
+ ticks?: number;
46
+ /** Values in the tooltip, table and announcements. */
47
+ format?: (v: number) => string;
48
+ /** y-axis labels (default: format). */
49
+ axisFormat?: (v: number) => string;
50
+ /** Horizontal guide lines (default true). */
51
+ grid?: boolean;
52
+ /** Dots on hover only (default), always, or never. */
53
+ dots?: 'hover' | boolean;
54
+ /** The card that follows the crosshair (default true). */
55
+ tooltip?: boolean;
56
+ /** Keys that show / hide each series (default true). */
57
+ legend?: boolean;
58
+ /** Name for screen readers. */
59
+ label?: string;
60
+ words?: Record<string, string | ((...a: any[]) => string)>;
61
+ /** The crosshair moved (index -1 when it hides). */
62
+ onPoint?: (index: number, info: { label: string; values: (number | null)[] } | null, chart: LineChartHandle) => void;
63
+ }
64
+ /** <LineChart :labels="months" :series="[{ name: 'Income', data: [...] }]" /> — template ref → LineChartHandle */
65
+ export const LineChart: GeckoComponent<LineChartProps>;
66
+
67
+ /* ---------- Donut ---------- */
68
+ export interface DonutItem { label: string; value: number; tone?: ChartTone }
69
+ export interface DonutHandle {
70
+ readonly data: { label: string; value: number; share: number }[];
71
+ readonly total: number;
72
+ /** The picked slice (-1 = none). */
73
+ readonly selected: number;
74
+ /** Slices morph to the new shares (matched by label). */
75
+ set(data: DonutItem[]): void;
76
+ /** Pick a slice by index or label (-1 clears); no @select. */
77
+ select(which: number | string | null): DonutHandle;
78
+ destroy(): void;
79
+ readonly el: HTMLElement;
80
+ }
81
+ export interface DonutProps {
82
+ /** New data morphs the slices (matched by label). */
83
+ data: DonutItem[];
84
+ /** px across (default 200; shrinks with a narrow parent). */
85
+ size?: number;
86
+ /** px, width of the ring (default 26). */
87
+ thickness?: number;
88
+ /** px between slices (default 3). */
89
+ gap?: number;
90
+ /** 'right' (default; drops below when there is no room) | 'bottom' | false. */
91
+ legend?: 'right' | 'bottom' | false;
92
+ /** Biggest first ('desc' or true) or smallest first ('asc'). */
93
+ sort?: boolean | 'desc' | 'asc';
94
+ /** Values in the middle, legend, table and read-outs. */
95
+ format?: (v: number) => string;
96
+ /** The line under the total (default "Total"); false = no text in the middle. */
97
+ centre?: string | false | null;
98
+ /** Name for screen readers. */
99
+ label?: string;
100
+ words?: Record<string, string | ((...a: any[]) => string)>;
101
+ /** A slice was picked (index -1 when cleared). */
102
+ onSelect?: (index: number, item: { label: string; value: number; share: number } | null, donut: DonutHandle) => void;
103
+ }
104
+ /** <Donut :data="[{ label: 'Scooters', value: 48 }]" /> — template ref → DonutHandle */
105
+ export const Donut: GeckoComponent<DonutProps>;
106
+
107
+ /* ---------- Gauge ---------- */
108
+ export interface GaugeHandle {
109
+ readonly value: number;
110
+ /** Swings from where it is now. */
111
+ set(value: number): GaugeHandle;
112
+ destroy(): void;
113
+ readonly el: HTMLElement;
114
+ }
115
+ export interface GaugeProps {
116
+ /** The number shown; a new value swings the needle from where it is now. */
117
+ value: number;
118
+ min?: number;
119
+ /** Default 100. */
120
+ max?: number;
121
+ /** A tick on the arc + "Goal 1,000" under the number. */
122
+ goal?: number | null;
123
+ /** Each zone runs from the one before (or min) up to `to`. */
124
+ zones?: { to: number; tone?: ChartTone; label?: string }[] | null;
125
+ /** Colour of the filled arc when there are no zones (default 'accent'). */
126
+ tone?: ChartTone;
127
+ /** The number, the ends and the read-out. */
128
+ format?: (v: number) => string;
129
+ /** Shown under the number, and the meter's name. */
130
+ label?: string;
131
+ /** px across (default 240; shrinks with a narrow parent). */
132
+ size?: number;
133
+ /** false = no needle; the number moves up inside the arc. */
134
+ needle?: boolean;
135
+ /** min and max under the two ends (default true). */
136
+ ends?: boolean;
137
+ words?: { label?: string; goal?: (goal: string) => string; reached?: string; valuetext?: (value: string, goal: string, zone: string) => string };
138
+ }
139
+ /** <Gauge :value="864" :max="1200" :goal="1000" label="Today's sales" /> — template ref → GaugeHandle */
140
+ export const Gauge: GeckoComponent<GaugeProps>;
141
+
142
+ /* ---------- Leaderboard ---------- */
143
+ export interface LeaderboardItem {
144
+ id?: string | number;
145
+ label: string;
146
+ value: number;
147
+ sub?: string;
148
+ /** A person for av(): { name, ini, tone }. */
149
+ avatar?: { name?: string; ini?: string; tone?: string; [k: string]: unknown } | null;
150
+ [key: string]: unknown;
151
+ }
152
+ export interface LeaderboardHandle {
153
+ /** Every item in rank order, with its rank. */
154
+ readonly items: (LeaderboardItem & { rank: number })[];
155
+ /** Rows glide to their new ranks, bars stretch, numbers count. */
156
+ set(items: LeaderboardItem[]): LeaderboardHandle;
157
+ destroy(): void;
158
+ readonly el: HTMLElement;
159
+ }
160
+ export interface LeaderboardProps {
161
+ /** New items glide to their new ranks. */
162
+ items: LeaderboardItem[];
163
+ /** Rows shown (0 = all). */
164
+ max?: number;
165
+ /** The number on each row (also gets in-between values while it counts). */
166
+ format?: (v: number) => string;
167
+ /** A bar under each row, the leader = full width (default true). */
168
+ bars?: boolean;
169
+ /** Gold, silver and bronze on the top three (default true). */
170
+ medals?: boolean;
171
+ /** Name for screen readers. */
172
+ label?: string;
173
+ words?: Record<string, string | ((...a: any[]) => string)>;
174
+ }
175
+ /** <Leaderboard :items="[{ id: 'malee', label: 'Malee', value: 42 }]" /> — template ref → LeaderboardHandle */
176
+ export const Leaderboard: GeckoComponent<LeaderboardProps>;
177
+
178
+ /* ---------- Heatmap ---------- */
179
+ export type HeatmapDate = string | Date;
180
+ export interface HeatmapDay { date: Date; value: number | null; level: number }
181
+ export interface HeatmapHandle {
182
+ /** The picked day, or null. */
183
+ readonly value: Date | null;
184
+ /** New numbers: every square re-shades in a ripple. */
185
+ set(data: HeatmapProps['data']): HeatmapHandle;
186
+ /** Pick a day (no @select); null clears. */
187
+ select(date: HeatmapDate | null): HeatmapHandle;
188
+ destroy(): void;
189
+ readonly el: HTMLElement;
190
+ }
191
+ export interface HeatmapProps {
192
+ /** [{ date: 'YYYY-MM-DD' | Date, value }] (a missing day counts as 0, null = no data), or a function read once at the start. */
193
+ data: { date: HeatmapDate; value: number | null }[] | ((date: Date) => number | null);
194
+ /** The picked day (v-model); a new value picks it in place. A click sets it to 'YYYY-MM-DD'. */
195
+ modelValue?: HeatmapDate | null;
196
+ /** The picked day at the start (no v-model). */
197
+ defaultValue?: HeatmapDate | null;
198
+ 'onUpdate:modelValue'?: (day: string | null) => void;
199
+ /** The last day on show (default today). */
200
+ end?: HeatmapDate | null;
201
+ /** Columns (default 26). */
202
+ weeks?: number;
203
+ /** 1 = Monday on top (default), 0 = Sunday. */
204
+ weekStart?: number;
205
+ /** Shades above "nothing" (default 4), or thresholds like [1, 5, 10, 20]. */
206
+ levels?: number | number[];
207
+ tone?: ChartTone;
208
+ /** The number in the card and labels. */
209
+ format?: (v: number) => string;
210
+ /** Day and month names through Intl (default 'en'). */
211
+ locale?: string;
212
+ words?: Record<string, string | ((...a: any[]) => string)>;
213
+ /** A day was clicked or picked with Enter / Space. */
214
+ onSelect?: (day: HeatmapDay, heatmap: HeatmapHandle) => void;
215
+ }
216
+ /** <Heatmap v-model="day" :data="[{ date: '2026-12-03', value: 14 }]" /> — template ref → HeatmapHandle */
217
+ export const Heatmap: GeckoComponent<HeatmapProps>;
218
+
219
+ export {};
package/src/charts.js ADDED
@@ -0,0 +1,93 @@
1
+ /* Charts: LineChart, Donut, Gauge, Heatmap, Leaderboard. The vanilla code draws and animates each one inside
2
+ its own element; new data never draws them again from zero: it goes through the handle (update / set),
3
+ so lines morph, slices change size, the needle swings and rows glide to their new places. */
4
+ import * as C from '@gecko-ui-kit/components';
5
+ import { mounted, changedOnly, same, anyProps, B } from './core.js';
6
+
7
+ /**
8
+ * <LineChart :labels="months" :series="[{ name: 'Walk-in', data: [...] }, { name: 'Online', data: [...] }]" :format="baht" />
9
+ * Same as lineChart(el, options). New labels / series morph in place (update): points slide to the new values,
10
+ * added or removed series fade. @point(index, info, chart). ref → { labels, series, update(), highlight(i), toggle(name, on?), el }.
11
+ */
12
+ export const LineChart = mounted('LineChart', C.lineChart, {
13
+ props: { ...anyProps('labels', 'series', 'height', 'yMin', 'yMax', 'ticks', 'format', 'axisFormat', 'dots', 'label', 'words'), area: B, smooth: B, stacked: B, grid: B, tooltip: B, legend: B, onPoint: Function },
14
+ update(c, next, prev) {
15
+ if (!changedOnly(next, prev, ['labels', 'series'])) return false;
16
+ c.update({ labels: next.labels || [], series: next.series || [] });
17
+ return true;
18
+ },
19
+ });
20
+
21
+ /**
22
+ * <Donut :data="[{ label: 'Scooters', value: 48 }, …]" centre="Bikes" @select="(i, item) => …" />
23
+ * Same as donut(el, options). New data morphs the slices to their new shares (set, matched by label).
24
+ * ref → { data, total, selected, set(data), select(index | label | -1), el }.
25
+ */
26
+ export const Donut = mounted('Donut', C.donut, {
27
+ props: { ...anyProps('data', 'size', 'thickness', 'gap', 'legend', 'sort', 'format', 'centre', 'label', 'words'), onSelect: Function },
28
+ update(d, next, prev) {
29
+ if (changedOnly(next, prev, ['data'])) { d.set(next.data || []); return true; }
30
+ return false;
31
+ },
32
+ });
33
+
34
+ /**
35
+ * <Gauge :value="sales" :max="1200" :goal="1000" label="Today's sales" />
36
+ * Same as gauge(el, options). A new value swings the needle from where it is now (set). ref → { value, set(v), el }.
37
+ * `value` is a plain prop (the gauge only shows it), not a v-model.
38
+ */
39
+ export const Gauge = mounted('Gauge', C.gauge, {
40
+ props: { ...anyProps('value', 'min', 'max', 'goal', 'zones', 'tone', 'format', 'label', 'size', 'words'), needle: B, ends: B },
41
+ update(gg, next, prev) {
42
+ if (changedOnly(next, prev, ['value'])) { gg.set(next.value ?? 0); return true; }
43
+ return false;
44
+ },
45
+ });
46
+
47
+ /**
48
+ * <Leaderboard :items="[{ id: 'malee', label: 'Malee', value: 42, sub: 'Front desk' }, …]" :max="5" />
49
+ * Same as leaderboard(el, options). New items: rows glide to their new ranks, bars stretch, numbers count (set).
50
+ * ref → { items, set(items), el }.
51
+ */
52
+ export const Leaderboard = mounted('Leaderboard', C.leaderboard, {
53
+ props: { ...anyProps('items', 'max', 'format', 'label', 'words'), bars: B, medals: B },
54
+ update(lb, next, prev) {
55
+ if (changedOnly(next, prev, ['items'])) { lb.set(next.items || []); return true; }
56
+ return false;
57
+ },
58
+ });
59
+
60
+ /* 'YYYY-MM-DD' of a local Date, so :end="new Date()" on every render does not count as new data. */
61
+ const ymd = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
62
+ const dayOf = (v) => (v instanceof Date ? ymd(v) : v);
63
+
64
+ /**
65
+ * <Heatmap v-model="day" :data="[{ date: '2026-12-03', value: 14 }, …]" :weeks="26" @select="(d) => …" />
66
+ * Same as heatmap(el, options). New data re-shades every square in a ripple (set). v-model is the picked day:
67
+ * a new value picks it in place (select), and a click sets it to that day as 'YYYY-MM-DD' (default-value only at
68
+ * the start). @select(day, hm) with day = { date, value, level }. ref → { value, set(data), select(date | null), el }.
69
+ */
70
+ export const Heatmap = mounted('Heatmap', (el, o) => {
71
+ const { value, defaultValue, ...opts } = o;
72
+ const hm = C.heatmap(el, opts);
73
+ const pick = value !== undefined ? value : defaultValue;
74
+ if (hm && pick != null) hm.select(pick);
75
+ return hm;
76
+ }, {
77
+ props: { ...anyProps('data', 'end', 'weeks', 'weekStart', 'levels', 'tone', 'format', 'locale', 'words') },
78
+ model: { event: 'onSelect', arg: (day) => (day?.date instanceof Date ? ymd(day.date) : null) },
79
+ options: (o) => {
80
+ const x = { ...o };
81
+ for (const k of ['end', 'value', 'defaultValue']) if (x[k] !== undefined) x[k] = dayOf(x[k]);
82
+ return x;
83
+ },
84
+ update(hm, next, prev) {
85
+ if (!changedOnly(next, prev, ['data', 'value', 'defaultValue'])) return false;
86
+ if (!same(next.data, prev.data)) hm.set(next.data || []);
87
+ if (!same(next.value, prev.value)) { // default-value is only read at the start
88
+ const want = next.value ?? null, now = hm.value instanceof Date ? ymd(hm.value) : null;
89
+ if (want !== now) hm.select(want);
90
+ }
91
+ return true;
92
+ },
93
+ });
@@ -0,0 +1,149 @@
1
+ import type { GeckoComponent, ModelProps, IconLike } from './core.js';
2
+
3
+ /** Attributes of a form control that go on its native element. */
4
+ interface FormAttrs {
5
+ name?: string;
6
+ disabled?: boolean;
7
+ }
8
+
9
+ /** An option: [value, label, icon?, count?], { value, label, icon, count, disabled } or a plain string. count: a number shown after the label (Segmented). */
10
+ export type Option<V extends string = string> = [V, string?, IconLike?, (number | string)?] | { value: V; label?: string; icon?: IconLike; count?: number | string; disabled?: boolean } | V;
11
+ export function normOption<V extends string>(o: Option<V>): { value: V; label: string; icon?: IconLike; count?: number | string; disabled?: boolean };
12
+
13
+ export interface SwitchProps extends ModelProps<boolean> {
14
+ /** Accessible name (aria-label). */
15
+ label?: string;
16
+ onChange?: (checked: boolean, event: MouseEvent) => void;
17
+ /** Runs first; call event.preventDefault() to keep it as it is. */
18
+ onClick?: (event: MouseEvent) => void;
19
+ }
20
+ /** <Switch v-model="on" label="Wi-Fi" /> */
21
+ export const Switch: GeckoComponent<SwitchProps>;
22
+
23
+ export interface SegmentedProps extends ModelProps<string> {
24
+ options: Option[];
25
+ onChange?: (value: string, event: MouseEvent) => void;
26
+ size?: 'sm' | (string & {});
27
+ name?: string;
28
+ }
29
+ /** <Segmented v-model="view" :options="[['list', 'List', 'list'], ['grid', 'Grid', 'cards']]" /> */
30
+ export const Segmented: GeckoComponent<SegmentedProps>;
31
+
32
+ export interface CheckboxProps extends ModelProps<boolean> {
33
+ /** Accessible name (aria-label). */
34
+ label?: string;
35
+ onChange?: (checked: boolean, event: MouseEvent) => void;
36
+ /** Runs first; call event.preventDefault() to keep it as it is. */
37
+ onClick?: (event: MouseEvent) => void;
38
+ disabled?: boolean;
39
+ }
40
+ /** <Checkbox v-model="done" label="Helmet returned" /> */
41
+ export const Checkbox: GeckoComponent<CheckboxProps>;
42
+
43
+ /** A tab: [value, label, count?], { value, label, count, disabled } or a plain string. */
44
+ export type TabItem<V extends string = string> = [V, string?, (number | string)?] | { value: V; label?: string; count?: number | string; disabled?: boolean } | V;
45
+ export interface TabsProps extends ModelProps<string> {
46
+ items: TabItem[];
47
+ onChange?: (value: string, event: MouseEvent) => void;
48
+ /** data-tabs name (default 'tabs'). */
49
+ name?: string;
50
+ }
51
+ /** <Tabs v-model="tab" :items="[['all', 'All'], ['late', 'Late', 3]]" /> */
52
+ export const Tabs: GeckoComponent<TabsProps>;
53
+
54
+ interface ChipsBase {
55
+ options: Option[];
56
+ /** data-chips name (default 'chips'). */
57
+ name?: string;
58
+ }
59
+ export interface ChipsSingleProps extends ChipsBase, ModelProps<string> {
60
+ multi?: false;
61
+ onChange?: (value: string, event: MouseEvent) => void;
62
+ }
63
+ export interface ChipsMultiProps extends ChipsBase, ModelProps<string[]> {
64
+ /** Several can be picked; the v-model value is an array. */
65
+ multi: true;
66
+ onChange?: (values: string[], event: MouseEvent) => void;
67
+ }
68
+ export type ChipsProps = ChipsSingleProps | ChipsMultiProps;
69
+ /** <Chips v-model="kind" :options="[['all', 'All'], ['scooter', 'Scooters']]" />, <Chips v-model="picked" multi :options="…" /> */
70
+ export const Chips: GeckoComponent<ChipsProps>;
71
+
72
+ export interface RangeProps extends ModelProps<number>, FormAttrs {
73
+ /** Default 0. */
74
+ min?: number;
75
+ /** Default 100. */
76
+ max?: number;
77
+ /** Default 1. */
78
+ step?: number;
79
+ /** Runs while it moves. Without v-model / default-value it starts halfway. */
80
+ onChange?: (value: number, event: Event) => void;
81
+ }
82
+ /** <Range v-model="days" :min="1" :max="14" /> */
83
+ export const Range: GeckoComponent<RangeProps>;
84
+
85
+ export interface SwatchProps extends ModelProps<string>, FormAttrs {
86
+ /** Runs while the colour changes, with '#rrggbb'. Default colour '#5b4cf0'. */
87
+ onChange?: (value: string, event: Event) => void;
88
+ }
89
+ /** <Swatch v-model="colour" aria-label="Label colour" /> */
90
+ export const Swatch: GeckoComponent<SwatchProps>;
91
+
92
+ export interface SearchBoxProps extends ModelProps<string>, FormAttrs {
93
+ /** Also the aria-label (default 'Search…'). */
94
+ placeholder?: string;
95
+ /** Runs as it is typed. */
96
+ onChange?: (value: string, event: Event) => void;
97
+ /** Enter pressed with text in the box (an empty box shakes instead). */
98
+ onSearch?: (text: string, event: KeyboardEvent) => void;
99
+ size?: 'sm' | (string & {});
100
+ autocomplete?: string;
101
+ autofocus?: boolean;
102
+ }
103
+ /** <SearchBox v-model="q" placeholder="Search bikes…" @search="run" /> — class / style on the box, the rest on the <input>. */
104
+ export const SearchBox: GeckoComponent<SearchBoxProps>;
105
+
106
+ /** A group of options with a small heading. */
107
+ export interface SelectGroup<V extends string = string> { group: string; options: Option<V>[] }
108
+ export interface SelectProps extends ModelProps<string>, FormAttrs {
109
+ /** [value, label, icon?], { value, label, icon, disabled }, 'value', or { group, options }. Icons are icon names. Default value: the first option. */
110
+ options: (Option | SelectGroup)[];
111
+ onChange?: (value: string, event: Event) => void;
112
+ /** 'sm': the small dropdown. */
113
+ size?: 'sm' | (string & {});
114
+ required?: boolean;
115
+ }
116
+ /** <Select v-model="bike" :options="[['scooter', 'Scooter 125'], ['ebike', 'E-bike']]" /> — attributes go on the <select>. */
117
+ export const Select: GeckoComponent<SelectProps>;
118
+
119
+ /** What @complete may answer: true / 'good' plays the green wave, false / 'bad' shakes and clears. */
120
+ export type OtpAnswer = boolean | 'good' | 'bad' | void;
121
+ export interface OtpProps extends ModelProps<string> {
122
+ /** Number of boxes (default 6). */
123
+ length?: number;
124
+ /** A dash in the middle. */
125
+ split?: boolean;
126
+ /** Dots instead of digits, like a PIN pad. */
127
+ mask?: boolean;
128
+ /** Allow A–Z as well as digits (shown in capitals). */
129
+ letters?: boolean;
130
+ /** Read by screen readers (default 'Verification code'). */
131
+ label?: string;
132
+ /** data-otp name (default 'code'). */
133
+ name?: string;
134
+ /** Runs as the code is typed. */
135
+ onChange?: (code: string) => void;
136
+ /** The last box was filled. Return (or resolve) the answer to play it. */
137
+ onComplete?: (code: string, el: HTMLDivElement) => OtpAnswer | Promise<OtpAnswer>;
138
+ /** On 'good', gather the boxes into one tick (default true). */
139
+ gather?: boolean;
140
+ /** On 'bad', empty the boxes for another try (default true). */
141
+ clear?: boolean;
142
+ disabled?: boolean;
143
+ /** Put the cursor in the first box. */
144
+ autofocus?: boolean;
145
+ }
146
+ /** <Otp v-model="code" :length="6" split @complete="verify" /> */
147
+ export const Otp: GeckoComponent<OtpProps>;
148
+
149
+ export {};