@velkymx/vibeui 0.8.2 → 1.0.2
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/AGENTS.md +44 -0
- package/README.md +245 -58
- package/dist/purify.es-1D-VntFD.mjs +679 -0
- package/dist/src/App.vue.d.ts +3 -0
- package/dist/src/components/HelloWorld.vue.d.ts +6 -0
- package/dist/src/components/VibeAccordion.vue.d.ts +89 -0
- package/dist/{components → src/components}/VibeAlert.vue.d.ts +24 -30
- package/dist/src/components/VibeAutocomplete.vue.d.ts +74 -0
- package/dist/{components → src/components}/VibeBadge.vue.d.ts +10 -18
- package/dist/src/components/VibeBreadcrumb.vue.d.ts +51 -0
- package/dist/{components → src/components}/VibeButton.vue.d.ts +16 -20
- package/dist/{components → src/components}/VibeButtonGroup.vue.d.ts +10 -18
- package/dist/{components → src/components}/VibeCard.vue.d.ts +51 -24
- package/dist/{components → src/components}/VibeCarousel.vue.d.ts +27 -49
- package/dist/src/components/VibeChartBar.vue.d.ts +61 -0
- package/dist/src/components/VibeChartLine.vue.d.ts +70 -0
- package/dist/src/components/VibeChartPie.vue.d.ts +34 -0
- package/dist/{components → src/components}/VibeCloseButton.vue.d.ts +9 -7
- package/dist/{components → src/components}/VibeCol.vue.d.ts +9 -17
- package/dist/src/components/VibeCollapse.vue.d.ts +76 -0
- package/dist/src/components/VibeContainer.vue.d.ts +36 -0
- package/dist/src/components/VibeDataTable.vue.d.ts +131 -0
- package/dist/src/components/VibeDatePicker.vue.d.ts +120 -0
- package/dist/src/components/VibeDraggable.vue.d.ts +77 -0
- package/dist/{components → src/components}/VibeDropdown.vue.d.ts +46 -43
- package/dist/src/components/VibeDroppable.vue.d.ts +70 -0
- package/dist/src/components/VibeFileInput.vue.d.ts +127 -0
- package/dist/{components → src/components}/VibeFormCheckbox.vue.d.ts +30 -22
- package/dist/{components → src/components}/VibeFormDatepicker.vue.d.ts +27 -30
- package/dist/{components → src/components}/VibeFormGroup.vue.d.ts +11 -14
- package/dist/{components → src/components}/VibeFormInput.vue.d.ts +22 -23
- package/dist/{components → src/components}/VibeFormRadio.vue.d.ts +23 -24
- package/dist/{components → src/components}/VibeFormSelect.vue.d.ts +28 -34
- package/dist/{components → src/components}/VibeFormSpinbutton.vue.d.ts +31 -34
- package/dist/{components → src/components}/VibeFormSwitch.vue.d.ts +22 -23
- package/dist/{components → src/components}/VibeFormTextarea.vue.d.ts +24 -25
- package/dist/{components → src/components}/VibeFormWysiwyg.vue.d.ts +24 -23
- package/dist/src/components/VibeHero.vue.d.ts +108 -0
- package/dist/{components → src/components}/VibeIcon.vue.d.ts +27 -7
- package/dist/{components → src/components}/VibeInputGroup.vue.d.ts +11 -13
- package/dist/{components → src/components}/VibeLink.vue.d.ts +14 -18
- package/dist/{components → src/components}/VibeListGroup.vue.d.ts +26 -22
- package/dist/{components → src/components}/VibeModal.vue.d.ts +29 -45
- package/dist/{components → src/components}/VibeNav.vue.d.ts +40 -20
- package/dist/{components → src/components}/VibeNavbar.vue.d.ts +12 -19
- package/dist/src/components/VibeNavbarBrand.vue.d.ts +34 -0
- package/dist/src/components/VibeNavbarNav.vue.d.ts +80 -0
- package/dist/{components → src/components}/VibeNavbarToggle.vue.d.ts +7 -5
- package/dist/{components → src/components}/VibeOffcanvas.vue.d.ts +28 -43
- package/dist/{components → src/components}/VibePagination.vue.d.ts +38 -29
- package/dist/{components → src/components}/VibePlaceholder.vue.d.ts +9 -17
- package/dist/src/components/VibePopover.vue.d.ts +72 -0
- package/dist/src/components/VibeProgress.vue.d.ts +37 -0
- package/dist/src/components/VibeResizable.vue.d.ts +140 -0
- package/dist/{components → src/components}/VibeRow.vue.d.ts +9 -17
- package/dist/src/components/VibeScrollspy.vue.d.ts +89 -0
- package/dist/src/components/VibeSkeleton.vue.d.ts +54 -0
- package/dist/src/components/VibeSlider.vue.d.ts +77 -0
- package/dist/src/components/VibeSortable.vue.d.ts +59 -0
- package/dist/{components → src/components}/VibeSpinner.vue.d.ts +4 -7
- package/dist/src/components/VibeStepper.vue.d.ts +133 -0
- package/dist/src/components/VibeTab.vue.d.ts +41 -0
- package/dist/src/components/VibeTabContent.vue.d.ts +56 -0
- package/dist/src/components/VibeTabs.vue.d.ts +78 -0
- package/dist/{components → src/components}/VibeToast.vue.d.ts +40 -42
- package/dist/src/components/VibeToastHost.vue.d.ts +16 -0
- package/dist/src/components/VibeTooltip.vue.d.ts +63 -0
- package/dist/src/components/chart/chartColors.d.ts +3 -0
- package/dist/src/components/chart/chartResize.d.ts +2 -0
- package/dist/src/components/chart/chartTooltip.d.ts +2 -0
- package/dist/src/components/chart/chartTypes.d.ts +6 -0
- package/dist/src/components/chart/drawBar.d.ts +5 -0
- package/dist/src/components/chart/drawLine.d.ts +18 -0
- package/dist/src/components/chart/drawPie.d.ts +4 -0
- package/dist/src/components/dndStore.d.ts +7 -0
- package/dist/{components → src/components}/index.d.ts +18 -1
- package/dist/{composables → src/composables}/useBreakpoints.d.ts +1 -0
- package/dist/{composables → src/composables}/useColorMode.d.ts +1 -1
- package/dist/src/composables/useForm.d.ts +22 -0
- package/dist/src/composables/useId.d.ts +2 -0
- package/dist/src/composables/usePosition.d.ts +20 -0
- package/dist/src/composables/useToast.d.ts +52 -0
- package/dist/src/directives/vTooltip.d.ts +24 -0
- package/dist/{index.d.ts → src/index.d.ts} +6 -0
- package/dist/src/injectionKeys.d.ts +28 -0
- package/dist/{types.d.ts → src/types.d.ts} +32 -6
- package/dist/src/utils/safeCss.d.ts +16 -0
- package/dist/src/utils/safeHref.d.ts +7 -0
- package/dist/src/utils/sanitizeHtml.d.ts +13 -0
- package/dist/vibeui.css +2 -1
- package/dist/vibeui.es.js +8351 -3508
- package/dist/vibeui.umd.js +3 -1
- package/docs/README.md +85 -13
- package/docs/components/advanced/popover.md +27 -52
- package/docs/components/advanced/scrollspy.md +57 -15
- package/docs/components/advanced/tooltip.md +26 -47
- package/docs/components/card/card.md +9 -1
- package/docs/components/charts/chart-bar.md +129 -0
- package/docs/components/charts/chart-line.md +136 -0
- package/docs/components/charts/chart-pie.md +102 -0
- package/docs/components/core/alert.md +27 -5
- package/docs/components/core/badge.md +0 -6
- package/docs/components/core/button-group.md +0 -6
- package/docs/components/core/button.md +1 -1
- package/docs/components/core/close-button.md +5 -5
- package/docs/components/core/link.md +60 -17
- package/docs/components/core/placeholder.md +0 -6
- package/docs/components/core/skeleton.md +40 -0
- package/docs/components/core/spinner.md +0 -6
- package/docs/components/data/datatable.md +29 -10
- package/docs/components/hero/hero.md +64 -0
- package/docs/components/interactive/accordion.md +29 -0
- package/docs/components/interactive/carousel.md +19 -4
- package/docs/components/interactive/collapse.md +3 -2
- package/docs/components/interactive/date-picker.md +78 -0
- package/docs/components/interactive/draggable.md +91 -0
- package/docs/components/interactive/dropdown.md +54 -18
- package/docs/components/interactive/modal.md +15 -20
- package/docs/components/interactive/offcanvas.md +4 -1
- package/docs/components/interactive/resizable.md +73 -0
- package/docs/components/interactive/slider.md +57 -0
- package/docs/components/interactive/sortable.md +52 -0
- package/docs/components/interactive/stepper.md +83 -0
- package/docs/components/interactive/tabs.md +66 -0
- package/docs/components/interactive/toast.md +93 -30
- package/docs/components/layout/col.md +0 -6
- package/docs/components/layout/container.md +0 -6
- package/docs/components/layout/row.md +0 -6
- package/docs/components/list/list-group.md +4 -0
- package/docs/components/navigation/breadcrumb.md +4 -0
- package/docs/components/navigation/nav.md +64 -1
- package/docs/components/navigation/navbar.md +2 -0
- package/docs/components/navigation/pagination.md +16 -0
- package/docs/components/progress/progress.md +7 -1
- package/docs/composables/color-mode.md +44 -6
- package/docs/composables/use-form.md +78 -0
- package/docs/composables/use-position.md +68 -0
- package/docs/composables/use-toast.md +91 -0
- package/docs/directives/v-tooltip.md +58 -0
- package/docs/forms/README.md +60 -61
- package/docs/forms/autocomplete.md +96 -0
- package/docs/forms/file-input.md +97 -0
- package/docs/forms/form-checkbox.md +75 -25
- package/docs/forms/form-datepicker.md +58 -28
- package/docs/forms/form-group.md +79 -44
- package/docs/forms/form-input.md +88 -31
- package/docs/forms/form-radio.md +60 -36
- package/docs/forms/form-select.md +75 -31
- package/docs/forms/form-spinbutton.md +72 -33
- package/docs/forms/form-switch.md +53 -25
- package/docs/forms/form-textarea.md +60 -29
- package/docs/forms/form-wysiwyg.md +73 -38
- package/docs/forms/input-group.md +53 -34
- package/docs/forms/validation.md +135 -521
- package/docs/getting-started/starter-template.md +136 -0
- package/docs/superpowers/plans/2026-05-12-vibe-charts.md +1999 -0
- package/docs/superpowers/plans/2026-05-29-e2e-browser-testing.md +615 -0
- package/docs/superpowers/specs/2026-05-12-charting-design.md +185 -0
- package/docs/superpowers/specs/2026-05-29-e2e-browser-testing-design.md +168 -0
- package/docs/utilities/position.md +82 -0
- package/docs/versioning.md +57 -0
- package/examples/README.md +201 -0
- package/examples/album.html +262 -0
- package/examples/blog.html +166 -0
- package/examples/carousel.html +114 -0
- package/examples/checkout.html +275 -0
- package/examples/cover.html +89 -0
- package/examples/dashboard.html +156 -0
- package/examples/index.html +129 -0
- package/examples/jumbotron.html +56 -0
- package/examples/mobile-dashboard.html +138 -0
- package/examples/pricing.html +172 -0
- package/examples/product.html +145 -0
- package/examples/sidebars.html +166 -0
- package/examples/sign-in.html +119 -0
- package/examples/starter.html +314 -0
- package/examples/sticky-footer-navbar.html +70 -0
- package/examples/sticky-footer.html +60 -0
- package/examples/test-simple.html +91 -0
- package/llms.txt +407 -47
- package/package.json +42 -13
- package/dist/App.vue.d.ts +0 -2
- package/dist/components/HelloWorld.vue.d.ts +0 -5
- package/dist/components/VibeAccordion.vue.d.ts +0 -90
- package/dist/components/VibeBreadcrumb.vue.d.ts +0 -47
- package/dist/components/VibeCollapse.vue.d.ts +0 -84
- package/dist/components/VibeContainer.vue.d.ts +0 -44
- package/dist/components/VibeDataTable.vue.d.ts +0 -76
- package/dist/components/VibeNavbarBrand.vue.d.ts +0 -42
- package/dist/components/VibeNavbarNav.vue.d.ts +0 -61
- package/dist/components/VibePopover.vue.d.ts +0 -95
- package/dist/components/VibeProgress.vue.d.ts +0 -45
- package/dist/components/VibeScrollspy.vue.d.ts +0 -77
- package/dist/components/VibeTabContent.vue.d.ts +0 -74
- package/dist/components/VibeTooltip.vue.d.ts +0 -86
- package/dist/composables/useId.d.ts +0 -5
- package/dist/types/index.d.ts +0 -6
- /package/dist/{composables → src/composables}/useBackButton.d.ts +0 -0
- /package/dist/{composables → src/composables}/useFormValidation.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import { Variant, ToastPlacement } from '../types';
|
|
1
|
+
import { Variant, ToastPlacement, ComponentError } from '../types';
|
|
2
2
|
interface BootstrapToast {
|
|
3
3
|
show: () => void;
|
|
4
4
|
hide: () => void;
|
|
5
5
|
dispose: () => void;
|
|
6
6
|
}
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
rootEl: any;
|
|
7
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_11: {}, __VLS_13: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
header?: (props: typeof __VLS_1) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_3) => any;
|
|
12
|
+
} & {
|
|
13
|
+
header?: (props: typeof __VLS_11) => any;
|
|
14
|
+
} & {
|
|
15
|
+
default?: (props: typeof __VLS_13) => any;
|
|
17
16
|
};
|
|
18
|
-
|
|
19
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
17
|
+
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
20
18
|
id: {
|
|
21
19
|
type: StringConstructor;
|
|
22
|
-
default:
|
|
20
|
+
default: undefined;
|
|
23
21
|
};
|
|
24
22
|
modelValue: {
|
|
25
23
|
type: BooleanConstructor;
|
|
@@ -49,29 +47,25 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
49
47
|
type: () => ToastPlacement;
|
|
50
48
|
default: string;
|
|
51
49
|
};
|
|
50
|
+
noContainer: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
52
54
|
}>, {
|
|
53
55
|
show: () => void | undefined;
|
|
54
56
|
hide: () => void | undefined;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
} | null>;
|
|
64
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
65
|
-
"update:modelValue": (...args: any[]) => void;
|
|
66
|
-
"component-error": (...args: any[]) => void;
|
|
67
|
-
show: (...args: any[]) => void;
|
|
68
|
-
shown: (...args: any[]) => void;
|
|
69
|
-
hide: (...args: any[]) => void;
|
|
70
|
-
hidden: (...args: any[]) => void;
|
|
57
|
+
_unsafe_bsInstance: import('vue').ShallowRef<BootstrapToast | null, BootstrapToast | null>;
|
|
58
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
59
|
+
"update:modelValue": (value: boolean) => any;
|
|
60
|
+
"component-error": (error: ComponentError) => any;
|
|
61
|
+
show: () => any;
|
|
62
|
+
hidden: () => any;
|
|
63
|
+
hide: () => any;
|
|
64
|
+
shown: () => any;
|
|
71
65
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
72
66
|
id: {
|
|
73
67
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
68
|
+
default: undefined;
|
|
75
69
|
};
|
|
76
70
|
modelValue: {
|
|
77
71
|
type: BooleanConstructor;
|
|
@@ -101,13 +95,17 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
101
95
|
type: () => ToastPlacement;
|
|
102
96
|
default: string;
|
|
103
97
|
};
|
|
98
|
+
noContainer: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
104
102
|
}>> & Readonly<{
|
|
105
|
-
"onUpdate:modelValue"?: ((
|
|
106
|
-
"onComponent-error"?: ((
|
|
107
|
-
onShow?: ((
|
|
108
|
-
|
|
109
|
-
onHide?: ((
|
|
110
|
-
|
|
103
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
104
|
+
"onComponent-error"?: ((error: ComponentError) => any) | undefined;
|
|
105
|
+
onShow?: (() => any) | undefined;
|
|
106
|
+
onHidden?: (() => any) | undefined;
|
|
107
|
+
onHide?: (() => any) | undefined;
|
|
108
|
+
onShown?: (() => any) | undefined;
|
|
111
109
|
}>, {
|
|
112
110
|
variant: Variant;
|
|
113
111
|
modelValue: boolean;
|
|
@@ -117,12 +115,12 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
117
115
|
placement: ToastPlacement;
|
|
118
116
|
autohide: boolean;
|
|
119
117
|
delay: number;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
declare const _default:
|
|
118
|
+
noContainer: boolean;
|
|
119
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
120
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
121
|
+
declare const _default: typeof __VLS_export;
|
|
124
122
|
export default _default;
|
|
125
|
-
type
|
|
123
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
126
124
|
new (): {
|
|
127
125
|
$slots: S;
|
|
128
126
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ToastPlacement } from '../types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
defaultPlacement: {
|
|
4
|
+
type: () => ToastPlacement;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
8
|
+
defaultPlacement: {
|
|
9
|
+
type: () => ToastPlacement;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
}>> & Readonly<{}>, {
|
|
13
|
+
defaultPlacement: ToastPlacement;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TooltipPlacement, ComponentError } from '../types';
|
|
2
|
+
interface BootstrapTooltip {
|
|
3
|
+
dispose: () => void;
|
|
4
|
+
setContent: (content: object) => void;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
+
content: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
text: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
placement: {
|
|
20
|
+
type: () => TooltipPlacement;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
trigger: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
}>, {
|
|
28
|
+
_unsafe_bsInstance: import('vue').ShallowRef<BootstrapTooltip | null, BootstrapTooltip | null>;
|
|
29
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
|
+
"component-error": (error: ComponentError) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
32
|
+
content: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
text: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
placement: {
|
|
41
|
+
type: () => TooltipPlacement;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
trigger: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
}>> & Readonly<{
|
|
49
|
+
"onComponent-error"?: ((error: ComponentError) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
text: string;
|
|
52
|
+
content: string;
|
|
53
|
+
placement: TooltipPlacement;
|
|
54
|
+
trigger: string;
|
|
55
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
56
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
57
|
+
declare const _default: typeof __VLS_export;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChartData } from '../../types';
|
|
2
|
+
import { TooltipHit } from './chartTypes';
|
|
3
|
+
export declare function getMaxVal(data: ChartData, stacked: boolean): number;
|
|
4
|
+
export declare function drawBar(ctx: CanvasRenderingContext2D, data: ChartData, w: number, h: number, colors: string[], showAxes: boolean, showGrid: boolean, stacked: boolean): void;
|
|
5
|
+
export declare function hitTestBar(x: number, y: number, data: ChartData, w: number, h: number, showAxes: boolean, stacked: boolean, maxVal: number): TooltipHit | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChartData } from '../../types';
|
|
2
|
+
import { TooltipHit } from './chartTypes';
|
|
3
|
+
export declare function drawLine(ctx: CanvasRenderingContext2D, data: ChartData, w: number, h: number, colors: string[], showAxes: boolean, showGrid: boolean, smooth: boolean, fill: boolean): void;
|
|
4
|
+
/**
|
|
5
|
+
* Compute the {min, max, range} across all dataset values, or null for empty data.
|
|
6
|
+
* Exposed so the chart component can precompute it once per data change and pass it to
|
|
7
|
+
* hitTestLine, instead of re-scanning every value on every mousemove.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getLineExtent(data: ChartData): {
|
|
10
|
+
min: number;
|
|
11
|
+
max: number;
|
|
12
|
+
range: number;
|
|
13
|
+
} | null;
|
|
14
|
+
export declare function hitTestLine(x: number, y: number, data: ChartData, w: number, h: number, showAxes: boolean, extent: {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
range: number;
|
|
18
|
+
} | null): TooltipHit | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChartData } from '../../types';
|
|
2
|
+
import { TooltipHit } from './chartTypes';
|
|
3
|
+
export declare function drawPie(ctx: CanvasRenderingContext2D, data: ChartData, w: number, h: number, colors: string[]): void;
|
|
4
|
+
export declare function hitTestPie(x: number, y: number, data: ChartData, w: number, h: number): TooltipHit | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const setActiveDrag: (payload: unknown, group: string) => void;
|
|
2
|
+
export declare const resetDndStoreForSSR: () => void;
|
|
3
|
+
export declare const clearActiveDrag: () => void;
|
|
4
|
+
export declare const getActiveDrag: () => {
|
|
5
|
+
payload: unknown;
|
|
6
|
+
group: string;
|
|
7
|
+
} | null;
|
|
@@ -5,10 +5,12 @@ import { default as VibeButtonGroup } from './VibeButtonGroup.vue';
|
|
|
5
5
|
import { default as VibeCloseButton } from './VibeCloseButton.vue';
|
|
6
6
|
import { default as VibeSpinner } from './VibeSpinner.vue';
|
|
7
7
|
import { default as VibePlaceholder } from './VibePlaceholder.vue';
|
|
8
|
+
import { default as VibeSkeleton } from './VibeSkeleton.vue';
|
|
8
9
|
import { default as VibeContainer } from './VibeContainer.vue';
|
|
9
10
|
import { default as VibeRow } from './VibeRow.vue';
|
|
10
11
|
import { default as VibeCol } from './VibeCol.vue';
|
|
11
12
|
import { default as VibeCard } from './VibeCard.vue';
|
|
13
|
+
import { default as VibeHero } from './VibeHero.vue';
|
|
12
14
|
import { default as VibeBreadcrumb } from './VibeBreadcrumb.vue';
|
|
13
15
|
import { default as VibeNav } from './VibeNav.vue';
|
|
14
16
|
import { default as VibeNavbar } from './VibeNavbar.vue';
|
|
@@ -17,6 +19,8 @@ import { default as VibeNavbarToggle } from './VibeNavbarToggle.vue';
|
|
|
17
19
|
import { default as VibeNavbarNav } from './VibeNavbarNav.vue';
|
|
18
20
|
import { default as VibePagination } from './VibePagination.vue';
|
|
19
21
|
import { default as VibeTabContent } from './VibeTabContent.vue';
|
|
22
|
+
import { default as VibeTabs } from './VibeTabs.vue';
|
|
23
|
+
import { default as VibeTab } from './VibeTab.vue';
|
|
20
24
|
import { default as VibeListGroup } from './VibeListGroup.vue';
|
|
21
25
|
import { default as VibeProgress } from './VibeProgress.vue';
|
|
22
26
|
import { default as VibeAccordion } from './VibeAccordion.vue';
|
|
@@ -25,17 +29,30 @@ import { default as VibeDropdown } from './VibeDropdown.vue';
|
|
|
25
29
|
import { default as VibeModal } from './VibeModal.vue';
|
|
26
30
|
import { default as VibeOffcanvas } from './VibeOffcanvas.vue';
|
|
27
31
|
import { default as VibeToast } from './VibeToast.vue';
|
|
32
|
+
import { default as VibeToastHost } from './VibeToastHost.vue';
|
|
28
33
|
import { default as VibeCarousel } from './VibeCarousel.vue';
|
|
29
34
|
import { default as VibeTooltip } from './VibeTooltip.vue';
|
|
30
35
|
import { default as VibePopover } from './VibePopover.vue';
|
|
31
36
|
import { default as VibeScrollspy } from './VibeScrollspy.vue';
|
|
32
37
|
import { default as VibeIcon } from './VibeIcon.vue';
|
|
38
|
+
import { default as VibeChartLine } from './VibeChartLine.vue';
|
|
39
|
+
import { default as VibeChartBar } from './VibeChartBar.vue';
|
|
40
|
+
import { default as VibeChartPie } from './VibeChartPie.vue';
|
|
33
41
|
import { default as VibeDataTable } from './VibeDataTable.vue';
|
|
34
42
|
import { default as VibeFormInput } from './VibeFormInput.vue';
|
|
35
43
|
import { default as VibeFormSelect } from './VibeFormSelect.vue';
|
|
36
44
|
import { default as VibeFormTextarea } from './VibeFormTextarea.vue';
|
|
37
45
|
import { default as VibeFormSpinbutton } from './VibeFormSpinbutton.vue';
|
|
38
46
|
import { default as VibeFormDatepicker } from './VibeFormDatepicker.vue';
|
|
47
|
+
import { default as VibeFileInput } from './VibeFileInput.vue';
|
|
48
|
+
import { default as VibeSlider } from './VibeSlider.vue';
|
|
49
|
+
import { default as VibeStepper } from './VibeStepper.vue';
|
|
50
|
+
import { default as VibeAutocomplete } from './VibeAutocomplete.vue';
|
|
51
|
+
import { default as VibeSortable } from './VibeSortable.vue';
|
|
52
|
+
import { default as VibeDraggable } from './VibeDraggable.vue';
|
|
53
|
+
import { default as VibeDroppable } from './VibeDroppable.vue';
|
|
54
|
+
import { default as VibeResizable } from './VibeResizable.vue';
|
|
55
|
+
import { default as VibeDatePicker } from './VibeDatePicker.vue';
|
|
39
56
|
import { default as VibeFormCheckbox } from './VibeFormCheckbox.vue';
|
|
40
57
|
import { default as VibeFormRadio } from './VibeFormRadio.vue';
|
|
41
58
|
import { default as VibeFormSwitch } from './VibeFormSwitch.vue';
|
|
@@ -44,6 +61,6 @@ import { default as VibeFormWysiwyg } from './VibeFormWysiwyg.vue';
|
|
|
44
61
|
import { default as VibeInputGroup } from './VibeInputGroup.vue';
|
|
45
62
|
import { default as VibeLink } from './VibeLink.vue';
|
|
46
63
|
import { Plugin } from 'vue';
|
|
47
|
-
export { VibeAlert, VibeBadge, VibeButton, VibeButtonGroup, VibeCloseButton, VibeSpinner, VibePlaceholder, VibeContainer, VibeRow, VibeCol, VibeCard, VibeBreadcrumb, VibeNav, VibeNavbar, VibeNavbarBrand, VibeNavbarToggle, VibeNavbarNav, VibePagination, VibeTabContent, VibeListGroup, VibeProgress, VibeAccordion, VibeCollapse, VibeDropdown, VibeModal, VibeOffcanvas, VibeToast, VibeCarousel, VibeTooltip, VibePopover, VibeScrollspy, VibeIcon, VibeDataTable, VibeFormInput, VibeFormSelect, VibeFormTextarea, VibeFormSpinbutton, VibeFormDatepicker, VibeFormCheckbox, VibeFormRadio, VibeFormSwitch, VibeFormGroup, VibeFormWysiwyg, VibeInputGroup, VibeLink };
|
|
64
|
+
export { VibeAlert, VibeBadge, VibeButton, VibeButtonGroup, VibeCloseButton, VibeSpinner, VibePlaceholder, VibeSkeleton, VibeContainer, VibeRow, VibeCol, VibeCard, VibeHero, VibeBreadcrumb, VibeNav, VibeNavbar, VibeNavbarBrand, VibeNavbarToggle, VibeNavbarNav, VibePagination, VibeTabContent, VibeTabs, VibeTab, VibeListGroup, VibeProgress, VibeAccordion, VibeCollapse, VibeDropdown, VibeModal, VibeOffcanvas, VibeToast, VibeToastHost, VibeCarousel, VibeTooltip, VibePopover, VibeScrollspy, VibeIcon, VibeChartLine, VibeChartBar, VibeChartPie, VibeDataTable, VibeFormInput, VibeFormSelect, VibeFormTextarea, VibeFormSpinbutton, VibeFormDatepicker, VibeFileInput, VibeSlider, VibeStepper, VibeAutocomplete, VibeSortable, VibeDraggable, VibeDroppable, VibeResizable, VibeDatePicker, VibeFormCheckbox, VibeFormRadio, VibeFormSwitch, VibeFormGroup, VibeFormWysiwyg, VibeInputGroup, VibeLink };
|
|
48
65
|
declare const VibeUIPlugin: Plugin;
|
|
49
66
|
export default VibeUIPlugin;
|
|
@@ -5,7 +5,7 @@ export declare function useColorMode(): {
|
|
|
5
5
|
toggleColorMode: () => void;
|
|
6
6
|
initColorMode: () => void;
|
|
7
7
|
clearColorMode: () => void;
|
|
8
|
-
onColorModeChange: (callback: (mode: ColorMode) => void) => void;
|
|
8
|
+
onColorModeChange: (callback: (mode: ColorMode) => void) => () => void;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* For testing only — not re-exported from the package index.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ValidationRule, ValidatorFunction } from '../types';
|
|
3
|
+
export type FormFieldRules<T> = Partial<Record<keyof T, ValidationRule[] | ValidatorFunction>>;
|
|
4
|
+
export interface FormValidateResult<T> {
|
|
5
|
+
valid: boolean;
|
|
6
|
+
errors: Partial<Record<keyof T, string>>;
|
|
7
|
+
}
|
|
8
|
+
export interface UseFormReturn<T extends Record<string, unknown>> {
|
|
9
|
+
fields: T;
|
|
10
|
+
errors: Record<keyof T, string>;
|
|
11
|
+
touched: Record<keyof T, boolean>;
|
|
12
|
+
isDirty: ComputedRef<boolean>;
|
|
13
|
+
isValid: ComputedRef<boolean>;
|
|
14
|
+
values: ComputedRef<T>;
|
|
15
|
+
validate: (rules: FormFieldRules<T>) => Promise<FormValidateResult<T>>;
|
|
16
|
+
validateField: <K extends keyof T>(key: K, rule: ValidationRule[] | ValidatorFunction) => Promise<string>;
|
|
17
|
+
reset: () => void;
|
|
18
|
+
markTouched: <K extends keyof T>(key: K) => void;
|
|
19
|
+
markAllTouched: () => void;
|
|
20
|
+
setField: <K extends keyof T>(key: K, value: T[K]) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function useForm<T extends Record<string, unknown>>(initial: T): UseFormReturn<T>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/dom';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
type AnchorPoint = 'top start' | 'top center' | 'top end' | 'center start' | 'center center' | 'center end' | 'bottom start' | 'bottom center' | 'bottom end';
|
|
4
|
+
export interface UsePositionOptions {
|
|
5
|
+
my?: AnchorPoint;
|
|
6
|
+
at?: AnchorPoint;
|
|
7
|
+
offset?: [number, number];
|
|
8
|
+
collision?: 'flip' | 'shift' | 'flip+shift' | 'none';
|
|
9
|
+
autoUpdate?: boolean;
|
|
10
|
+
strategy?: 'absolute' | 'fixed';
|
|
11
|
+
}
|
|
12
|
+
export interface UsePositionReturn {
|
|
13
|
+
x: Ref<number>;
|
|
14
|
+
y: Ref<number>;
|
|
15
|
+
placement: Ref<Placement>;
|
|
16
|
+
update: () => Promise<void>;
|
|
17
|
+
stop: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function usePosition(target: Ref<HTMLElement | null> | ComputedRef<HTMLElement | null>, anchor: Ref<HTMLElement | null> | ComputedRef<HTMLElement | null>, options?: UsePositionOptions | (() => UsePositionOptions)): UsePositionReturn;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DeepReadonly } from 'vue';
|
|
2
|
+
import { Variant, ToastPlacement } from '../types';
|
|
3
|
+
export interface ToastSpec {
|
|
4
|
+
id: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
body: string;
|
|
7
|
+
variant?: Variant;
|
|
8
|
+
placement?: ToastPlacement;
|
|
9
|
+
autohide?: boolean;
|
|
10
|
+
delay?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ToastShowOptions {
|
|
13
|
+
id?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
variant?: Variant;
|
|
16
|
+
placement?: ToastPlacement;
|
|
17
|
+
autohide?: boolean;
|
|
18
|
+
delay?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface UseToastReturn {
|
|
21
|
+
toasts: DeepReadonly<ToastSpec[]>;
|
|
22
|
+
show: (body: string, options?: ToastShowOptions) => ToastSpec;
|
|
23
|
+
success: (body: string, options?: Omit<ToastShowOptions, 'variant'>) => ToastSpec;
|
|
24
|
+
error: (body: string, options?: Omit<ToastShowOptions, 'variant'>) => ToastSpec;
|
|
25
|
+
warn: (body: string, options?: Omit<ToastShowOptions, 'variant'>) => ToastSpec;
|
|
26
|
+
info: (body: string, options?: Omit<ToastShowOptions, 'variant'>) => ToastSpec;
|
|
27
|
+
dismiss: (id: string) => boolean;
|
|
28
|
+
clear: () => void;
|
|
29
|
+
}
|
|
30
|
+
export declare function useToast(): UseToastReturn;
|
|
31
|
+
export declare const __resetToastStoreForTests: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Resets the toast store between SSR requests. The toast queue is a module
|
|
34
|
+
* singleton, so the same instance is shared across requests in an SSR runtime.
|
|
35
|
+
* Call this in your server entry's per-request reset hook to avoid leaking
|
|
36
|
+
* one request's pending toasts into another's render output.
|
|
37
|
+
*
|
|
38
|
+
* Multi-app browser usage shares the same queue; if this is undesirable, use
|
|
39
|
+
* the component-form `<VibeToast v-model="...">` for app-local toasts.
|
|
40
|
+
*/
|
|
41
|
+
export declare const resetToastStoreForSSR: () => void;
|
|
42
|
+
export declare const __toastStore: {
|
|
43
|
+
toasts: {
|
|
44
|
+
id: string;
|
|
45
|
+
title?: string | undefined;
|
|
46
|
+
body: string;
|
|
47
|
+
variant?: Variant | undefined;
|
|
48
|
+
placement?: ToastPlacement | undefined;
|
|
49
|
+
autohide?: boolean | undefined;
|
|
50
|
+
delay?: number | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
import { TooltipPlacement } from '../types';
|
|
3
|
+
interface BootstrapTooltipInstance {
|
|
4
|
+
dispose: () => void;
|
|
5
|
+
setContent: (content: Record<string, string>) => void;
|
|
6
|
+
}
|
|
7
|
+
interface TooltipOptions {
|
|
8
|
+
title?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
content?: string;
|
|
11
|
+
placement?: TooltipPlacement;
|
|
12
|
+
trigger?: string;
|
|
13
|
+
}
|
|
14
|
+
type TooltipBindingValue = string | TooltipOptions | undefined;
|
|
15
|
+
declare const INSTANCE_KEY: unique symbol;
|
|
16
|
+
declare const PENDING_KEY: unique symbol;
|
|
17
|
+
declare const OPTS_KEY: unique symbol;
|
|
18
|
+
interface AugmentedElement extends HTMLElement {
|
|
19
|
+
[INSTANCE_KEY]?: BootstrapTooltipInstance | null;
|
|
20
|
+
[PENDING_KEY]?: boolean;
|
|
21
|
+
[OPTS_KEY]?: TooltipOptions;
|
|
22
|
+
}
|
|
23
|
+
export declare const vTooltip: Directive<AugmentedElement, TooltipBindingValue>;
|
|
24
|
+
export default vTooltip;
|
|
@@ -2,6 +2,12 @@ import { default as VibeUIPlugin } from './components';
|
|
|
2
2
|
export * from './components';
|
|
3
3
|
export * from './types';
|
|
4
4
|
export * from './composables/useFormValidation';
|
|
5
|
+
export * from './composables/useForm';
|
|
6
|
+
export { vTooltip } from './directives/vTooltip';
|
|
7
|
+
export { useToast, resetToastStoreForSSR } from './composables/useToast';
|
|
8
|
+
export type { ToastSpec, ToastShowOptions, UseToastReturn } from './composables/useToast';
|
|
9
|
+
export { usePosition } from './composables/usePosition';
|
|
10
|
+
export type { UsePositionOptions, UsePositionReturn } from './composables/usePosition';
|
|
5
11
|
export { useId } from './composables/useId';
|
|
6
12
|
export { useColorMode } from './composables/useColorMode';
|
|
7
13
|
export { useBreakpoints } from './composables/useBreakpoints';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InjectionKey, ComputedRef } from 'vue';
|
|
2
|
+
export interface FormGroupContext {
|
|
3
|
+
/** The group's computed element id — shared with the first control that calls consumeId(). */
|
|
4
|
+
id: ComputedRef<string>;
|
|
5
|
+
/**
|
|
6
|
+
* Claim the group id for label association.
|
|
7
|
+
* Only the first control that calls this receives the id — subsequent calls get null.
|
|
8
|
+
* Prevents duplicate id attributes when multiple controls are inside one group.
|
|
9
|
+
*/
|
|
10
|
+
consumeId: () => string | null;
|
|
11
|
+
hasLabel: ComputedRef<boolean>;
|
|
12
|
+
hasValidation: ComputedRef<boolean>;
|
|
13
|
+
hasHelp: ComputedRef<boolean>;
|
|
14
|
+
}
|
|
15
|
+
export declare const FORM_GROUP_KEY: InjectionKey<FormGroupContext | null>;
|
|
16
|
+
export interface NavbarCollapseContext {
|
|
17
|
+
collapseStates: Record<string, boolean>;
|
|
18
|
+
toggleCollapse: (id: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const NAVBAR_COLLAPSE_KEY: InjectionKey<NavbarCollapseContext | null>;
|
|
21
|
+
export interface TabsContext {
|
|
22
|
+
register: (name: string, label: string, disabled: boolean) => void;
|
|
23
|
+
unregister: (name: string) => void;
|
|
24
|
+
isActive: (name: string) => boolean;
|
|
25
|
+
hasBeenActive: (name: string) => boolean;
|
|
26
|
+
lazy: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const TABS_CONTEXT_KEY: InjectionKey<TabsContext | null>;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/** Payload emitted by the `component-error` event on all Bootstrap-backed components. */
|
|
2
|
+
export interface ComponentError {
|
|
3
|
+
message: string;
|
|
4
|
+
componentName: string;
|
|
5
|
+
originalError: unknown;
|
|
6
|
+
}
|
|
1
7
|
export type ColorMode = 'light' | 'dark' | 'auto';
|
|
2
8
|
export type Variant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
|
|
9
|
+
export type ButtonVariant = Variant | 'link';
|
|
3
10
|
export type Size = 'sm' | 'lg';
|
|
4
11
|
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
5
|
-
export type
|
|
12
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
6
13
|
export type Tag = 'div' | 'span' | 'section' | 'article' | 'nav' | 'aside' | 'header' | 'footer' | 'main';
|
|
7
14
|
export type Direction = 'up' | 'down' | 'start' | 'end';
|
|
8
15
|
export type SpinnerType = 'border' | 'grow';
|
|
@@ -18,17 +25,22 @@ export type OrderValue = 0 | 1 | 2 | 3 | 4 | 5 | 'first' | 'last';
|
|
|
18
25
|
export type AlignItems = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
|
|
19
26
|
export type JustifyContent = 'start' | 'center' | 'end' | 'around' | 'between' | 'evenly';
|
|
20
27
|
export type SortDirection = 'asc' | 'desc' | null;
|
|
21
|
-
export interface DataTableColumn {
|
|
22
|
-
key: string;
|
|
28
|
+
export interface DataTableColumn<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
29
|
+
key: keyof T & string;
|
|
23
30
|
label: string;
|
|
24
31
|
sortable?: boolean;
|
|
25
32
|
searchable?: boolean;
|
|
26
|
-
formatter?: (value:
|
|
33
|
+
formatter?: (value: T[keyof T], row: T) => string | number;
|
|
27
34
|
class?: string;
|
|
28
35
|
headerClass?: string;
|
|
29
36
|
thStyle?: Record<string, string>;
|
|
30
37
|
tdStyle?: Record<string, string>;
|
|
31
38
|
}
|
|
39
|
+
export interface DataTableCellSlotProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
40
|
+
item: T;
|
|
41
|
+
value: T[keyof T];
|
|
42
|
+
index: number;
|
|
43
|
+
}
|
|
32
44
|
export interface DataTableSort {
|
|
33
45
|
key: string;
|
|
34
46
|
direction: 'asc' | 'desc';
|
|
@@ -43,6 +55,8 @@ export interface NavItem {
|
|
|
43
55
|
text: string;
|
|
44
56
|
href?: string;
|
|
45
57
|
to?: string | object;
|
|
58
|
+
/** Tab panel ID (e.g. '#panel-id') for tabs/pills mode when using router-link */
|
|
59
|
+
target?: string;
|
|
46
60
|
active?: boolean;
|
|
47
61
|
disabled?: boolean;
|
|
48
62
|
children?: DropdownItem[];
|
|
@@ -102,7 +116,8 @@ export interface TabPane {
|
|
|
102
116
|
}
|
|
103
117
|
export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time' | 'datetime-local' | 'month' | 'week' | 'color';
|
|
104
118
|
export type ValidationState = 'valid' | 'invalid' | null;
|
|
105
|
-
|
|
119
|
+
/** Return true for valid, false for invalid (uses rule.message), or a non-empty string as the error message (also invalid). */
|
|
120
|
+
export type ValidatorFunction = (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
106
121
|
export interface ValidationRule {
|
|
107
122
|
validator: ValidatorFunction;
|
|
108
123
|
message?: string;
|
|
@@ -111,8 +126,19 @@ export interface FormValidationResult {
|
|
|
111
126
|
valid: boolean;
|
|
112
127
|
message?: string;
|
|
113
128
|
}
|
|
129
|
+
export type FormSelectOptionValue = string | number | boolean | null | undefined;
|
|
114
130
|
export interface FormSelectOption {
|
|
115
|
-
value:
|
|
131
|
+
value: FormSelectOptionValue;
|
|
116
132
|
text: string;
|
|
117
133
|
disabled?: boolean;
|
|
118
134
|
}
|
|
135
|
+
export interface ChartDataset {
|
|
136
|
+
label: string;
|
|
137
|
+
data: number[];
|
|
138
|
+
color?: string;
|
|
139
|
+
}
|
|
140
|
+
export interface ChartData {
|
|
141
|
+
labels: string[];
|
|
142
|
+
datasets: ChartDataset[];
|
|
143
|
+
}
|
|
144
|
+
export type ChartLegendPosition = 'top' | 'bottom' | 'none';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const SAFE_COLUMN_STYLE_PROPS: Set<string>;
|
|
2
|
+
/**
|
|
3
|
+
* Validate a CSS length/size prop (width, height, fontSize, etc.).
|
|
4
|
+
* Returns the value unchanged if safe, undefined otherwise.
|
|
5
|
+
*/
|
|
6
|
+
export declare function safeLength(value: string | undefined): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Validate a CSS color prop.
|
|
9
|
+
* Returns the value unchanged if it matches a known-safe color form, undefined otherwise.
|
|
10
|
+
*/
|
|
11
|
+
export declare function safeColor(value: string | undefined): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Filter a consumer-supplied CSS style object to an allowlist of known-safe property names.
|
|
14
|
+
* Use for thStyle / tdStyle column config in VibeDataTable.
|
|
15
|
+
*/
|
|
16
|
+
export declare function safeCssObject(obj: Record<string, string> | undefined): Record<string, string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitize an href prop value against javascript: / data: / vbscript: injection.
|
|
3
|
+
*
|
|
4
|
+
* Returns the original value unchanged if it matches a safe pattern, or
|
|
5
|
+
* undefined otherwise so the attribute is omitted from the DOM entirely.
|
|
6
|
+
*/
|
|
7
|
+
export declare function safeHref(href: string | undefined): string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const WYSIWYG_PURIFY_CONFIG: {
|
|
2
|
+
ALLOWED_TAGS: string[];
|
|
3
|
+
ALLOWED_ATTR: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare function loadDOMPurify(): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Sanitize an HTML string if DOMPurify is available.
|
|
8
|
+
* Falls back to the original string if DOMPurify is not installed — the caller
|
|
9
|
+
* (Quill's clipboard converter) applies its own Delta-based sanitization regardless.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sanitizeHtml(html: string): string;
|
|
12
|
+
/** Reset state — for use in tests only. */
|
|
13
|
+
export declare function _resetSanitizer(): void;
|