@vizejs/fresco 0.33.0 → 0.34.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/components/index.d.mts +2 -0
- package/dist/components/index.mjs +3 -0
- package/dist/{components-DtI-O8Cr.js → components-B5VXjX9s.mjs} +125 -84
- package/dist/components-B5VXjX9s.mjs.map +1 -0
- package/dist/composables/index.d.mts +2 -0
- package/dist/composables/index.mjs +3 -0
- package/dist/{composables-CLuPs-N5.js → composables-Bb56LTUc.mjs} +12 -6
- package/dist/composables-Bb56LTUc.mjs.map +1 -0
- package/dist/index-BwN1A9rE.d.mts +2774 -0
- package/dist/index-BwN1A9rE.d.mts.map +1 -0
- package/dist/{index-z9cQDuri.d.ts → index-CZdTzyQk.d.mts} +10 -29
- package/dist/index-CZdTzyQk.d.mts.map +1 -0
- package/dist/index.d.mts +75 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4 -0
- package/dist/{useInput-CvEslk0z.js → useInput-CbggNZUF.mjs} +15 -12
- package/dist/useInput-CbggNZUF.mjs.map +1 -0
- package/package.json +31 -32
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +0 -4
- package/dist/components-DtI-O8Cr.js.map +0 -1
- package/dist/composables/index.d.ts +0 -2
- package/dist/composables/index.js +0 -4
- package/dist/composables-CLuPs-N5.js.map +0 -1
- package/dist/index-C6ATca97.d.ts +0 -1518
- package/dist/index-C6ATca97.d.ts.map +0 -1
- package/dist/index-z9cQDuri.d.ts.map +0 -1
- package/dist/index.d.ts +0 -81
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -5
- package/dist/useInput-CvEslk0z.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as FormProps, A as TableColumn, At as Box, B as TimerProps, C as Menu, Ct as GridProps, D as TreeNode, Dt as VStack, E as Tree, Et as StackProps, F as Tooltip, G as AlertProps, H as BadgeProps, I as TooltipPosition, J as ProgressBarProps, K as AlertType, L as TooltipProps, M as List, N as ListItem, O as TreeProps, Ot as Divider, P as ListProps, Q as FormField, R as Timer, S as TabsProps, St as Grid, T as MenuProps, Tt as Stack, U as BadgeVariant, V as Badge, W as Alert, X as SpinnerProps, Y as Spinner, Z as Form, _ as Breadcrumb, _t as CodeProps, a as KeyHintProps, at as Checkbox, b as Tab, bt as Card, c as StatusBar, ct as SelectOption, d as Modal, dt as TextAreaProps, et as Confirm, f as ModalProps, ft as TextInput, g as StepperProps, gt as Code, h as Stepper, ht as LinkProps, i as KeyHint, it as RadioOption, j as TableProps, jt as BoxProps, k as Table, kt as DividerProps, l as StatusBarItem, lt as SelectProps, m as StepStatus, mt as Link, n as AvatarProps, nt as RadioGroup, o as Header, ot as CheckboxProps, p as Step, pt as TextInputProps, q as ProgressBar, r as KeyBinding, rt as RadioGroupProps, s as HeaderProps, st as Select, t as Avatar, tt as ConfirmProps, u as StatusBarProps, ut as TextArea, v as BreadcrumbItem, vt as Text, w as MenuItem, wt as HStack, x as Tabs, xt as CardProps, y as BreadcrumbProps, yt as TextProps, z as TimerMode } from "../index-BwN1A9rE.mjs";
|
|
2
|
+
export { Alert, AlertProps, AlertType, Avatar, AvatarProps, Badge, BadgeProps, BadgeVariant, Box, BoxProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Card, CardProps, Checkbox, CheckboxProps, Code, CodeProps, Confirm, ConfirmProps, Divider, DividerProps, Form, FormField, FormProps, Grid, GridProps, HStack, Header, HeaderProps, KeyBinding, KeyHint, KeyHintProps, Link, LinkProps, List, ListItem, ListProps, Menu, MenuItem, MenuProps, Modal, ModalProps, ProgressBar, ProgressBarProps, RadioGroup, RadioGroupProps, RadioOption, Select, SelectOption, SelectProps, Spinner, SpinnerProps, Stack, StackProps, StatusBar, StatusBarItem, StatusBarProps, Step, StepStatus, Stepper, StepperProps, Tab, Table, TableColumn, TableProps, Tabs, TabsProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, Timer, TimerMode, TimerProps, Tooltip, TooltipPosition, TooltipProps, Tree, TreeNode, TreeProps, VStack };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../useInput-CbggNZUF.mjs";
|
|
2
|
+
import { A as Grid, C as Select, D as Code, E as Link, F as Box, M as Stack, N as VStack, O as Text, P as Divider, S as Checkbox, T as TextInput, _ as ProgressBar, a as Modal, b as Confirm, c as Tabs, d as Table, f as List, g as Alert, h as Badge, i as StatusBar, j as HStack, k as Card, l as Menu, m as Timer, n as KeyHint, o as Stepper, p as Tooltip, r as Header, s as Breadcrumb, t as Avatar, u as Tree, v as Spinner, w as TextArea, x as RadioGroup, y as Form } from "../components-B5VXjX9s.mjs";
|
|
3
|
+
export { Alert, Avatar, Badge, Box, Breadcrumb, Card, Checkbox, Code, Confirm, Divider, Form, Grid, HStack, Header, KeyHint, Link, List, Menu, Modal, ProgressBar, RadioGroup, Select, Spinner, Stack, StatusBar, Stepper, Table, Tabs, Text, TextArea, TextInput, Timer, Tooltip, Tree, VStack };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useInput } from "./useInput-CbggNZUF.mjs";
|
|
2
2
|
import { computed, defineComponent, h, onMounted, onUnmounted, ref, watch } from "@vue/runtime-core";
|
|
3
|
-
|
|
4
3
|
//#region src/components/Box.ts
|
|
4
|
+
/**
|
|
5
|
+
* Box Component - Container with flexbox layout
|
|
6
|
+
*/
|
|
5
7
|
const Box = defineComponent({
|
|
6
8
|
name: "Box",
|
|
7
9
|
props: {
|
|
@@ -72,9 +74,11 @@ const Box = defineComponent({
|
|
|
72
74
|
};
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
|
-
|
|
76
77
|
//#endregion
|
|
77
78
|
//#region src/components/Divider.ts
|
|
79
|
+
/**
|
|
80
|
+
* Divider Component - Horizontal or vertical divider line
|
|
81
|
+
*/
|
|
78
82
|
const Divider = defineComponent({
|
|
79
83
|
name: "Divider",
|
|
80
84
|
props: {
|
|
@@ -109,9 +113,11 @@ const Divider = defineComponent({
|
|
|
109
113
|
};
|
|
110
114
|
}
|
|
111
115
|
});
|
|
112
|
-
|
|
113
116
|
//#endregion
|
|
114
117
|
//#region src/components/Stack.ts
|
|
118
|
+
/**
|
|
119
|
+
* Stack Component - Horizontal/Vertical stack layout helper
|
|
120
|
+
*/
|
|
115
121
|
const ALIGN_MAP = {
|
|
116
122
|
start: "flex-start",
|
|
117
123
|
center: "center",
|
|
@@ -196,9 +202,11 @@ const VStack = defineComponent({
|
|
|
196
202
|
}, slots.default);
|
|
197
203
|
}
|
|
198
204
|
});
|
|
199
|
-
|
|
200
205
|
//#endregion
|
|
201
206
|
//#region src/components/Grid.ts
|
|
207
|
+
/**
|
|
208
|
+
* Grid Component - Grid layout helper
|
|
209
|
+
*/
|
|
202
210
|
const Grid = defineComponent({
|
|
203
211
|
name: "Grid",
|
|
204
212
|
props: {
|
|
@@ -244,9 +252,11 @@ const Grid = defineComponent({
|
|
|
244
252
|
};
|
|
245
253
|
}
|
|
246
254
|
});
|
|
247
|
-
|
|
248
255
|
//#endregion
|
|
249
256
|
//#region src/components/Card.ts
|
|
257
|
+
/**
|
|
258
|
+
* Card Component - Container card with optional header and footer
|
|
259
|
+
*/
|
|
250
260
|
const Card = defineComponent({
|
|
251
261
|
name: "Card",
|
|
252
262
|
props: {
|
|
@@ -306,9 +316,11 @@ const Card = defineComponent({
|
|
|
306
316
|
};
|
|
307
317
|
}
|
|
308
318
|
});
|
|
309
|
-
|
|
310
319
|
//#endregion
|
|
311
320
|
//#region src/components/Text.ts
|
|
321
|
+
/**
|
|
322
|
+
* Text Component - Text display
|
|
323
|
+
*/
|
|
312
324
|
const Text = defineComponent({
|
|
313
325
|
name: "Text",
|
|
314
326
|
props: {
|
|
@@ -324,12 +336,11 @@ const Text = defineComponent({
|
|
|
324
336
|
},
|
|
325
337
|
setup(props, { slots }) {
|
|
326
338
|
return () => {
|
|
327
|
-
const text = props.content ?? slots.default?.()?.map((vnode) => {
|
|
328
|
-
if (typeof vnode.children === "string") return vnode.children;
|
|
329
|
-
return "";
|
|
330
|
-
}).join("") ?? "";
|
|
331
339
|
return h("text", {
|
|
332
|
-
text
|
|
340
|
+
text: props.content ?? slots.default?.()?.map((vnode) => {
|
|
341
|
+
if (typeof vnode.children === "string") return vnode.children;
|
|
342
|
+
return "";
|
|
343
|
+
}).join("") ?? "",
|
|
333
344
|
wrap: props.wrap,
|
|
334
345
|
fg: props.fg,
|
|
335
346
|
bg: props.bg,
|
|
@@ -342,10 +353,7 @@ const Text = defineComponent({
|
|
|
342
353
|
};
|
|
343
354
|
}
|
|
344
355
|
});
|
|
345
|
-
|
|
346
|
-
* Convenience components for common text styles
|
|
347
|
-
*/
|
|
348
|
-
const ErrorText = defineComponent({
|
|
356
|
+
defineComponent({
|
|
349
357
|
name: "ErrorText",
|
|
350
358
|
props: { content: String },
|
|
351
359
|
setup(props, { slots }) {
|
|
@@ -355,7 +363,7 @@ const ErrorText = defineComponent({
|
|
|
355
363
|
}, slots);
|
|
356
364
|
}
|
|
357
365
|
});
|
|
358
|
-
|
|
366
|
+
defineComponent({
|
|
359
367
|
name: "WarningText",
|
|
360
368
|
props: { content: String },
|
|
361
369
|
setup(props, { slots }) {
|
|
@@ -365,7 +373,7 @@ const WarningText = defineComponent({
|
|
|
365
373
|
}, slots);
|
|
366
374
|
}
|
|
367
375
|
});
|
|
368
|
-
|
|
376
|
+
defineComponent({
|
|
369
377
|
name: "SuccessText",
|
|
370
378
|
props: { content: String },
|
|
371
379
|
setup(props, { slots }) {
|
|
@@ -375,7 +383,7 @@ const SuccessText = defineComponent({
|
|
|
375
383
|
}, slots);
|
|
376
384
|
}
|
|
377
385
|
});
|
|
378
|
-
|
|
386
|
+
defineComponent({
|
|
379
387
|
name: "InfoText",
|
|
380
388
|
props: { content: String },
|
|
381
389
|
setup(props, { slots }) {
|
|
@@ -385,7 +393,7 @@ const InfoText = defineComponent({
|
|
|
385
393
|
}, slots);
|
|
386
394
|
}
|
|
387
395
|
});
|
|
388
|
-
|
|
396
|
+
defineComponent({
|
|
389
397
|
name: "MutedText",
|
|
390
398
|
props: { content: String },
|
|
391
399
|
setup(props, { slots }) {
|
|
@@ -395,9 +403,11 @@ const MutedText = defineComponent({
|
|
|
395
403
|
}, slots);
|
|
396
404
|
}
|
|
397
405
|
});
|
|
398
|
-
|
|
399
406
|
//#endregion
|
|
400
407
|
//#region src/components/Code.ts
|
|
408
|
+
/**
|
|
409
|
+
* Code Component - Code block display
|
|
410
|
+
*/
|
|
401
411
|
const Code = defineComponent({
|
|
402
412
|
name: "Code",
|
|
403
413
|
props: {
|
|
@@ -473,9 +483,11 @@ const Code = defineComponent({
|
|
|
473
483
|
};
|
|
474
484
|
}
|
|
475
485
|
});
|
|
476
|
-
|
|
477
486
|
//#endregion
|
|
478
487
|
//#region src/components/Link.ts
|
|
488
|
+
/**
|
|
489
|
+
* Link Component - Clickable/styled link
|
|
490
|
+
*/
|
|
479
491
|
const Link = defineComponent({
|
|
480
492
|
name: "Link",
|
|
481
493
|
props: {
|
|
@@ -509,9 +521,11 @@ const Link = defineComponent({
|
|
|
509
521
|
};
|
|
510
522
|
}
|
|
511
523
|
});
|
|
512
|
-
|
|
513
524
|
//#endregion
|
|
514
525
|
//#region src/components/TextInput.ts
|
|
526
|
+
/**
|
|
527
|
+
* TextInput Component - Text input with builtin cursor management and IME support
|
|
528
|
+
*/
|
|
515
529
|
const TextInput = defineComponent({
|
|
516
530
|
name: "TextInput",
|
|
517
531
|
props: {
|
|
@@ -563,18 +577,12 @@ const TextInput = defineComponent({
|
|
|
563
577
|
};
|
|
564
578
|
const deleteBack = () => {
|
|
565
579
|
if (cursorPos.value > 0) {
|
|
566
|
-
|
|
567
|
-
const after = internalValue.value.slice(cursorPos.value);
|
|
568
|
-
updateValue(before + after);
|
|
580
|
+
updateValue(internalValue.value.slice(0, cursorPos.value - 1) + internalValue.value.slice(cursorPos.value));
|
|
569
581
|
cursorPos.value--;
|
|
570
582
|
}
|
|
571
583
|
};
|
|
572
584
|
const deleteForward = () => {
|
|
573
|
-
if (cursorPos.value < internalValue.value.length)
|
|
574
|
-
const before = internalValue.value.slice(0, cursorPos.value);
|
|
575
|
-
const after = internalValue.value.slice(cursorPos.value + 1);
|
|
576
|
-
updateValue(before + after);
|
|
577
|
-
}
|
|
585
|
+
if (cursorPos.value < internalValue.value.length) updateValue(internalValue.value.slice(0, cursorPos.value) + internalValue.value.slice(cursorPos.value + 1));
|
|
578
586
|
};
|
|
579
587
|
const moveLeft = () => {
|
|
580
588
|
if (cursorPos.value > 0) cursorPos.value--;
|
|
@@ -588,9 +596,8 @@ const TextInput = defineComponent({
|
|
|
588
596
|
const moveToEnd = () => {
|
|
589
597
|
cursorPos.value = internalValue.value.length;
|
|
590
598
|
};
|
|
591
|
-
const isActive = computed(() => props.focus);
|
|
592
599
|
useInput({
|
|
593
|
-
isActive,
|
|
600
|
+
isActive: computed(() => props.focus),
|
|
594
601
|
onChar: (char) => {
|
|
595
602
|
insertText(char);
|
|
596
603
|
},
|
|
@@ -629,10 +636,7 @@ const TextInput = defineComponent({
|
|
|
629
636
|
};
|
|
630
637
|
}
|
|
631
638
|
});
|
|
632
|
-
|
|
633
|
-
* Password input variant
|
|
634
|
-
*/
|
|
635
|
-
const PasswordInput = defineComponent({
|
|
639
|
+
defineComponent({
|
|
636
640
|
name: "PasswordInput",
|
|
637
641
|
props: {
|
|
638
642
|
modelValue: {
|
|
@@ -663,9 +667,11 @@ const PasswordInput = defineComponent({
|
|
|
663
667
|
});
|
|
664
668
|
}
|
|
665
669
|
});
|
|
666
|
-
|
|
667
670
|
//#endregion
|
|
668
671
|
//#region src/components/TextArea.ts
|
|
672
|
+
/**
|
|
673
|
+
* TextArea Component - Multiline text input
|
|
674
|
+
*/
|
|
669
675
|
const TextArea = defineComponent({
|
|
670
676
|
name: "TextArea",
|
|
671
677
|
props: {
|
|
@@ -715,8 +721,7 @@ const TextArea = defineComponent({
|
|
|
715
721
|
emits: ["update:modelValue"],
|
|
716
722
|
setup(props) {
|
|
717
723
|
const lines = computed(() => {
|
|
718
|
-
const
|
|
719
|
-
const textLines = text.split("\n");
|
|
724
|
+
const textLines = (props.modelValue || "").split("\n");
|
|
720
725
|
while (textLines.length < props.rows) textLines.push("");
|
|
721
726
|
return textLines.slice(0, props.rows);
|
|
722
727
|
});
|
|
@@ -755,9 +760,11 @@ const TextArea = defineComponent({
|
|
|
755
760
|
};
|
|
756
761
|
}
|
|
757
762
|
});
|
|
758
|
-
|
|
759
763
|
//#endregion
|
|
760
764
|
//#region src/components/Select.ts
|
|
765
|
+
/**
|
|
766
|
+
* Select Component - Dropdown/menu selection
|
|
767
|
+
*/
|
|
761
768
|
const Select = defineComponent({
|
|
762
769
|
name: "Select",
|
|
763
770
|
props: {
|
|
@@ -821,9 +828,11 @@ const Select = defineComponent({
|
|
|
821
828
|
};
|
|
822
829
|
}
|
|
823
830
|
});
|
|
824
|
-
|
|
825
831
|
//#endregion
|
|
826
832
|
//#region src/components/Checkbox.ts
|
|
833
|
+
/**
|
|
834
|
+
* Checkbox Component - Toggle checkbox
|
|
835
|
+
*/
|
|
827
836
|
const Checkbox = defineComponent({
|
|
828
837
|
name: "Checkbox",
|
|
829
838
|
props: {
|
|
@@ -858,18 +867,19 @@ const Checkbox = defineComponent({
|
|
|
858
867
|
setup(props, { emit: _emit }) {
|
|
859
868
|
return () => {
|
|
860
869
|
const indicator = props.modelValue ? props.checked : props.unchecked;
|
|
861
|
-
const color = props.modelValue ? props.checkedFg : props.fg;
|
|
862
870
|
return h("box", { style: { flex_direction: "row" } }, [h("text", {
|
|
863
|
-
fg:
|
|
871
|
+
fg: props.modelValue ? props.checkedFg : props.fg,
|
|
864
872
|
dim: props.disabled,
|
|
865
873
|
bold: props.focused
|
|
866
874
|
}, `${indicator} ${props.label ?? ""}`)]);
|
|
867
875
|
};
|
|
868
876
|
}
|
|
869
877
|
});
|
|
870
|
-
|
|
871
878
|
//#endregion
|
|
872
879
|
//#region src/components/RadioGroup.ts
|
|
880
|
+
/**
|
|
881
|
+
* RadioGroup Component - Radio button group selection
|
|
882
|
+
*/
|
|
873
883
|
const RadioGroup = defineComponent({
|
|
874
884
|
name: "RadioGroup",
|
|
875
885
|
props: {
|
|
@@ -918,9 +928,11 @@ const RadioGroup = defineComponent({
|
|
|
918
928
|
};
|
|
919
929
|
}
|
|
920
930
|
});
|
|
921
|
-
|
|
922
931
|
//#endregion
|
|
923
932
|
//#region src/components/Confirm.ts
|
|
933
|
+
/**
|
|
934
|
+
* Confirm Component - Confirmation dialog
|
|
935
|
+
*/
|
|
924
936
|
const Confirm = defineComponent({
|
|
925
937
|
name: "Confirm",
|
|
926
938
|
props: {
|
|
@@ -980,9 +992,11 @@ const Confirm = defineComponent({
|
|
|
980
992
|
};
|
|
981
993
|
}
|
|
982
994
|
});
|
|
983
|
-
|
|
984
995
|
//#endregion
|
|
985
996
|
//#region src/components/Form.ts
|
|
997
|
+
/**
|
|
998
|
+
* Form Component - Form container with labels
|
|
999
|
+
*/
|
|
986
1000
|
const Form = defineComponent({
|
|
987
1001
|
name: "Form",
|
|
988
1002
|
props: {
|
|
@@ -1060,10 +1074,12 @@ const Form = defineComponent({
|
|
|
1060
1074
|
};
|
|
1061
1075
|
}
|
|
1062
1076
|
});
|
|
1063
|
-
|
|
1064
1077
|
//#endregion
|
|
1065
1078
|
//#region src/components/Spinner.ts
|
|
1066
1079
|
/**
|
|
1080
|
+
* Spinner Component - Loading indicator
|
|
1081
|
+
*/
|
|
1082
|
+
/**
|
|
1067
1083
|
* Spinner frame sets
|
|
1068
1084
|
*/
|
|
1069
1085
|
const spinnerTypes = {
|
|
@@ -1199,9 +1215,11 @@ const Spinner = defineComponent({
|
|
|
1199
1215
|
};
|
|
1200
1216
|
}
|
|
1201
1217
|
});
|
|
1202
|
-
|
|
1203
1218
|
//#endregion
|
|
1204
1219
|
//#region src/components/ProgressBar.ts
|
|
1220
|
+
/**
|
|
1221
|
+
* ProgressBar Component - Progress indicator
|
|
1222
|
+
*/
|
|
1205
1223
|
const ProgressBar = defineComponent({
|
|
1206
1224
|
name: "ProgressBar",
|
|
1207
1225
|
props: {
|
|
@@ -1272,7 +1290,6 @@ const ProgressBar = defineComponent({
|
|
|
1272
1290
|
flexDirection: "row",
|
|
1273
1291
|
gap: 1
|
|
1274
1292
|
}, () => [...barContent, labelElement]);
|
|
1275
|
-
case "right":
|
|
1276
1293
|
default: return h(Box, {
|
|
1277
1294
|
flexDirection: "row",
|
|
1278
1295
|
gap: 1
|
|
@@ -1281,10 +1298,7 @@ const ProgressBar = defineComponent({
|
|
|
1281
1298
|
};
|
|
1282
1299
|
}
|
|
1283
1300
|
});
|
|
1284
|
-
|
|
1285
|
-
* Indeterminate progress bar (animated)
|
|
1286
|
-
*/
|
|
1287
|
-
const IndeterminateProgressBar = defineComponent({
|
|
1301
|
+
defineComponent({
|
|
1288
1302
|
name: "IndeterminateProgressBar",
|
|
1289
1303
|
props: {
|
|
1290
1304
|
width: {
|
|
@@ -1298,15 +1312,16 @@ const IndeterminateProgressBar = defineComponent({
|
|
|
1298
1312
|
},
|
|
1299
1313
|
setup(props) {
|
|
1300
1314
|
return () => {
|
|
1301
|
-
const
|
|
1302
|
-
const display = pattern.slice(0, props.width);
|
|
1315
|
+
const display = "▓▒░░░░░░░░░░░░░░░░░░".slice(0, props.width);
|
|
1303
1316
|
return h(Text, { fg: props.fg }, () => display);
|
|
1304
1317
|
};
|
|
1305
1318
|
}
|
|
1306
1319
|
});
|
|
1307
|
-
|
|
1308
1320
|
//#endregion
|
|
1309
1321
|
//#region src/components/Alert.ts
|
|
1322
|
+
/**
|
|
1323
|
+
* Alert Component - Alert/notification box
|
|
1324
|
+
*/
|
|
1310
1325
|
const ALERT_CONFIG = {
|
|
1311
1326
|
info: {
|
|
1312
1327
|
icon: "ℹ",
|
|
@@ -1380,9 +1395,11 @@ const Alert = defineComponent({
|
|
|
1380
1395
|
};
|
|
1381
1396
|
}
|
|
1382
1397
|
});
|
|
1383
|
-
|
|
1384
1398
|
//#endregion
|
|
1385
1399
|
//#region src/components/Badge.ts
|
|
1400
|
+
/**
|
|
1401
|
+
* Badge Component - Status badge/tag
|
|
1402
|
+
*/
|
|
1386
1403
|
const VARIANT_COLORS = {
|
|
1387
1404
|
default: { fg: "white" },
|
|
1388
1405
|
success: { fg: "green" },
|
|
@@ -1433,9 +1450,11 @@ const Badge = defineComponent({
|
|
|
1433
1450
|
};
|
|
1434
1451
|
}
|
|
1435
1452
|
});
|
|
1436
|
-
|
|
1437
1453
|
//#endregion
|
|
1438
1454
|
//#region src/components/Timer.ts
|
|
1455
|
+
/**
|
|
1456
|
+
* Timer Component - Countdown/stopwatch timer
|
|
1457
|
+
*/
|
|
1439
1458
|
const Timer = defineComponent({
|
|
1440
1459
|
name: "Timer",
|
|
1441
1460
|
props: {
|
|
@@ -1549,9 +1568,11 @@ const Timer = defineComponent({
|
|
|
1549
1568
|
};
|
|
1550
1569
|
}
|
|
1551
1570
|
});
|
|
1552
|
-
|
|
1553
1571
|
//#endregion
|
|
1554
1572
|
//#region src/components/Tooltip.ts
|
|
1573
|
+
/**
|
|
1574
|
+
* Tooltip Component - Tooltip overlay
|
|
1575
|
+
*/
|
|
1555
1576
|
const Tooltip = defineComponent({
|
|
1556
1577
|
name: "Tooltip",
|
|
1557
1578
|
props: {
|
|
@@ -1614,9 +1635,11 @@ const Tooltip = defineComponent({
|
|
|
1614
1635
|
};
|
|
1615
1636
|
}
|
|
1616
1637
|
});
|
|
1617
|
-
|
|
1618
1638
|
//#endregion
|
|
1619
1639
|
//#region src/components/List.ts
|
|
1640
|
+
/**
|
|
1641
|
+
* List Component - Scrollable list of items
|
|
1642
|
+
*/
|
|
1620
1643
|
const List = defineComponent({
|
|
1621
1644
|
name: "List",
|
|
1622
1645
|
props: {
|
|
@@ -1672,8 +1695,7 @@ const List = defineComponent({
|
|
|
1672
1695
|
dim: true
|
|
1673
1696
|
}, " ..."));
|
|
1674
1697
|
visibleItems.value.forEach((item, visibleIndex) => {
|
|
1675
|
-
const
|
|
1676
|
-
const isHighlighted = actualIndex === highlightedIndex.value;
|
|
1698
|
+
const isHighlighted = scrollOffset.value + visibleIndex === highlightedIndex.value;
|
|
1677
1699
|
const isSelected = item.key === props.modelValue;
|
|
1678
1700
|
const indicator = isHighlighted ? props.indicator : props.indicatorEmpty;
|
|
1679
1701
|
children.push(h("text", {
|
|
@@ -1695,9 +1717,11 @@ const List = defineComponent({
|
|
|
1695
1717
|
};
|
|
1696
1718
|
}
|
|
1697
1719
|
});
|
|
1698
|
-
|
|
1699
1720
|
//#endregion
|
|
1700
1721
|
//#region src/components/Table.ts
|
|
1722
|
+
/**
|
|
1723
|
+
* Table Component - Display tabular data
|
|
1724
|
+
*/
|
|
1701
1725
|
const Table = defineComponent({
|
|
1702
1726
|
name: "Table",
|
|
1703
1727
|
props: {
|
|
@@ -1754,8 +1778,7 @@ const Table = defineComponent({
|
|
|
1754
1778
|
if (props.border !== "none") {
|
|
1755
1779
|
const sepChar = props.border === "double" ? "=" : "-";
|
|
1756
1780
|
const totalWidth = props.columns.reduce((acc, col) => {
|
|
1757
|
-
|
|
1758
|
-
return acc + w + (props.cellPadding ?? 1);
|
|
1781
|
+
return acc + (typeof col.width === "number" ? col.width : 10) + (props.cellPadding ?? 1);
|
|
1759
1782
|
}, 0);
|
|
1760
1783
|
rows.push(h("text", {
|
|
1761
1784
|
key: "separator",
|
|
@@ -1784,9 +1807,11 @@ const Table = defineComponent({
|
|
|
1784
1807
|
};
|
|
1785
1808
|
}
|
|
1786
1809
|
});
|
|
1787
|
-
|
|
1788
1810
|
//#endregion
|
|
1789
1811
|
//#region src/components/Tree.ts
|
|
1812
|
+
/**
|
|
1813
|
+
* Tree Component - Tree view for hierarchical data
|
|
1814
|
+
*/
|
|
1790
1815
|
const Tree = defineComponent({
|
|
1791
1816
|
name: "Tree",
|
|
1792
1817
|
props: {
|
|
@@ -1862,9 +1887,11 @@ const Tree = defineComponent({
|
|
|
1862
1887
|
};
|
|
1863
1888
|
}
|
|
1864
1889
|
});
|
|
1865
|
-
|
|
1866
1890
|
//#endregion
|
|
1867
1891
|
//#region src/components/Menu.ts
|
|
1892
|
+
/**
|
|
1893
|
+
* Menu Component - Command menu/palette
|
|
1894
|
+
*/
|
|
1868
1895
|
const Menu = defineComponent({
|
|
1869
1896
|
name: "Menu",
|
|
1870
1897
|
props: {
|
|
@@ -1942,9 +1969,11 @@ const Menu = defineComponent({
|
|
|
1942
1969
|
};
|
|
1943
1970
|
}
|
|
1944
1971
|
});
|
|
1945
|
-
|
|
1946
1972
|
//#endregion
|
|
1947
1973
|
//#region src/components/Tabs.ts
|
|
1974
|
+
/**
|
|
1975
|
+
* Tabs Component - Tab navigation
|
|
1976
|
+
*/
|
|
1948
1977
|
const Tabs = defineComponent({
|
|
1949
1978
|
name: "Tabs",
|
|
1950
1979
|
props: {
|
|
@@ -2003,17 +2032,18 @@ const Tabs = defineComponent({
|
|
|
2003
2032
|
key: "content",
|
|
2004
2033
|
style: { flex_grow: 1 }
|
|
2005
2034
|
}, slots.default?.());
|
|
2006
|
-
const children = props.position === "top" ? [tabBar, content] : [content, tabBar];
|
|
2007
2035
|
return h("box", { style: {
|
|
2008
2036
|
flex_direction: "column",
|
|
2009
2037
|
flex_grow: 1
|
|
2010
|
-
} },
|
|
2038
|
+
} }, props.position === "top" ? [tabBar, content] : [content, tabBar]);
|
|
2011
2039
|
};
|
|
2012
2040
|
}
|
|
2013
2041
|
});
|
|
2014
|
-
|
|
2015
2042
|
//#endregion
|
|
2016
2043
|
//#region src/components/Breadcrumb.ts
|
|
2044
|
+
/**
|
|
2045
|
+
* Breadcrumb Component - Navigation breadcrumb
|
|
2046
|
+
*/
|
|
2017
2047
|
const Breadcrumb = defineComponent({
|
|
2018
2048
|
name: "Breadcrumb",
|
|
2019
2049
|
props: {
|
|
@@ -2041,7 +2071,7 @@ const Breadcrumb = defineComponent({
|
|
|
2041
2071
|
emits: ["select"],
|
|
2042
2072
|
setup(props, { emit: _emit }) {
|
|
2043
2073
|
return () => {
|
|
2044
|
-
|
|
2074
|
+
return h("box", { style: { flex_direction: "row" } }, props.items.flatMap((item, index) => {
|
|
2045
2075
|
const isLast = index === props.items.length - 1;
|
|
2046
2076
|
const result = [];
|
|
2047
2077
|
if (item.icon) result.push(h("text", {
|
|
@@ -2059,14 +2089,15 @@ const Breadcrumb = defineComponent({
|
|
|
2059
2089
|
fg: props.separatorFg
|
|
2060
2090
|
}, props.separator));
|
|
2061
2091
|
return result;
|
|
2062
|
-
});
|
|
2063
|
-
return h("box", { style: { flex_direction: "row" } }, children);
|
|
2092
|
+
}));
|
|
2064
2093
|
};
|
|
2065
2094
|
}
|
|
2066
2095
|
});
|
|
2067
|
-
|
|
2068
2096
|
//#endregion
|
|
2069
2097
|
//#region src/components/Stepper.ts
|
|
2098
|
+
/**
|
|
2099
|
+
* Stepper Component - Step indicator for wizards
|
|
2100
|
+
*/
|
|
2070
2101
|
const Stepper = defineComponent({
|
|
2071
2102
|
name: "Stepper",
|
|
2072
2103
|
props: {
|
|
@@ -2178,9 +2209,11 @@ const Stepper = defineComponent({
|
|
|
2178
2209
|
};
|
|
2179
2210
|
}
|
|
2180
2211
|
});
|
|
2181
|
-
|
|
2182
2212
|
//#endregion
|
|
2183
2213
|
//#region src/components/Modal.ts
|
|
2214
|
+
/**
|
|
2215
|
+
* Modal Component - Overlay dialog
|
|
2216
|
+
*/
|
|
2184
2217
|
const Modal = defineComponent({
|
|
2185
2218
|
name: "Modal",
|
|
2186
2219
|
props: {
|
|
@@ -2247,9 +2280,11 @@ const Modal = defineComponent({
|
|
|
2247
2280
|
};
|
|
2248
2281
|
}
|
|
2249
2282
|
});
|
|
2250
|
-
|
|
2251
2283
|
//#endregion
|
|
2252
2284
|
//#region src/components/StatusBar.ts
|
|
2285
|
+
/**
|
|
2286
|
+
* StatusBar Component - Status bar (typically at bottom of screen)
|
|
2287
|
+
*/
|
|
2253
2288
|
const StatusBar = defineComponent({
|
|
2254
2289
|
name: "StatusBar",
|
|
2255
2290
|
props: {
|
|
@@ -2311,9 +2346,11 @@ const StatusBar = defineComponent({
|
|
|
2311
2346
|
};
|
|
2312
2347
|
}
|
|
2313
2348
|
});
|
|
2314
|
-
|
|
2315
2349
|
//#endregion
|
|
2316
2350
|
//#region src/components/Header.ts
|
|
2351
|
+
/**
|
|
2352
|
+
* Header Component - Application header
|
|
2353
|
+
*/
|
|
2317
2354
|
const Header = defineComponent({
|
|
2318
2355
|
name: "Header",
|
|
2319
2356
|
props: {
|
|
@@ -2382,9 +2419,11 @@ const Header = defineComponent({
|
|
|
2382
2419
|
};
|
|
2383
2420
|
}
|
|
2384
2421
|
});
|
|
2385
|
-
|
|
2386
2422
|
//#endregion
|
|
2387
2423
|
//#region src/components/KeyHint.ts
|
|
2424
|
+
/**
|
|
2425
|
+
* KeyHint Component - Display keyboard shortcut hints
|
|
2426
|
+
*/
|
|
2388
2427
|
const KeyHint = defineComponent({
|
|
2389
2428
|
name: "KeyHint",
|
|
2390
2429
|
props: {
|
|
@@ -2441,9 +2480,11 @@ const KeyHint = defineComponent({
|
|
|
2441
2480
|
};
|
|
2442
2481
|
}
|
|
2443
2482
|
});
|
|
2444
|
-
|
|
2445
2483
|
//#endregion
|
|
2446
2484
|
//#region src/components/Avatar.ts
|
|
2485
|
+
/**
|
|
2486
|
+
* Avatar Component - User avatar display
|
|
2487
|
+
*/
|
|
2447
2488
|
const STATUS_COLORS = {
|
|
2448
2489
|
online: "green",
|
|
2449
2490
|
offline: "gray",
|
|
@@ -2515,7 +2556,7 @@ const Avatar = defineComponent({
|
|
|
2515
2556
|
};
|
|
2516
2557
|
}
|
|
2517
2558
|
});
|
|
2518
|
-
|
|
2519
2559
|
//#endregion
|
|
2520
|
-
export {
|
|
2521
|
-
|
|
2560
|
+
export { Grid as A, Select as C, Code as D, Link as E, Box as F, Stack as M, VStack as N, Text as O, Divider as P, Checkbox as S, TextInput as T, ProgressBar as _, Modal as a, Confirm as b, Tabs as c, Table as d, List as f, Alert as g, Badge as h, StatusBar as i, HStack as j, Card as k, Menu as l, Timer as m, KeyHint as n, Stepper as o, Tooltip as p, Header as r, Breadcrumb as s, Avatar as t, Tree as u, Spinner as v, TextArea as w, RadioGroup as x, Form as y };
|
|
2561
|
+
|
|
2562
|
+
//# sourceMappingURL=components-B5VXjX9s.mjs.map
|