vanilla-jui 1.5.14 → 1.5.16
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/index.d.ts +17 -28
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/form.ts +143 -192
- package/src/components/offcanvas.ts +20 -14
- package/src/css/form.css +5 -0
- package/src/css/tokens.css +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1021,6 +1021,8 @@ interface FormClassNames {
|
|
|
1021
1021
|
helpInvalid: string;
|
|
1022
1022
|
buttons: string;
|
|
1023
1023
|
button: string;
|
|
1024
|
+
submitBtn: string;
|
|
1025
|
+
resetBtn: string;
|
|
1024
1026
|
input: string;
|
|
1025
1027
|
textarea: string;
|
|
1026
1028
|
select: string;
|
|
@@ -1032,8 +1034,6 @@ interface FormClassNames {
|
|
|
1032
1034
|
radioLabel: string;
|
|
1033
1035
|
radioText: string;
|
|
1034
1036
|
switch: string;
|
|
1035
|
-
switchDefault: string;
|
|
1036
|
-
switchSizeMd: string;
|
|
1037
1037
|
switchSlider: string;
|
|
1038
1038
|
}
|
|
1039
1039
|
type FormClassNameConfig = Partial<FormClassNames>;
|
|
@@ -1073,15 +1073,6 @@ interface FormField {
|
|
|
1073
1073
|
className?: string;
|
|
1074
1074
|
content?: RenderableContent<FormControlContext>;
|
|
1075
1075
|
}
|
|
1076
|
-
interface FormButton {
|
|
1077
|
-
type?: string;
|
|
1078
|
-
text?: RenderableContent<Form>;
|
|
1079
|
-
label?: RenderableContent<Form>;
|
|
1080
|
-
theme?: string;
|
|
1081
|
-
action?: string;
|
|
1082
|
-
disabled?: boolean;
|
|
1083
|
-
className?: string;
|
|
1084
|
-
}
|
|
1085
1076
|
interface FormValidatorConfig {
|
|
1086
1077
|
rules?: Record<string, Record<string, unknown>>;
|
|
1087
1078
|
messages?: Record<string, Record<string, string>>;
|
|
@@ -1090,15 +1081,22 @@ interface FormValidatorConfig {
|
|
|
1090
1081
|
onSubmit?: (() => void) | null;
|
|
1091
1082
|
[key: string]: unknown;
|
|
1092
1083
|
}
|
|
1093
|
-
type
|
|
1084
|
+
type FormButtons = boolean | string;
|
|
1085
|
+
interface FormText {
|
|
1086
|
+
submit: RenderableContent<Form>;
|
|
1087
|
+
reset: RenderableContent<Form>;
|
|
1088
|
+
}
|
|
1089
|
+
type FormTextConfig = Partial<FormText>;
|
|
1094
1090
|
interface FormProps extends Record<string, unknown> {
|
|
1095
1091
|
id?: string | null;
|
|
1096
1092
|
vertical?: boolean;
|
|
1097
1093
|
itemVertical?: boolean;
|
|
1094
|
+
size?: string;
|
|
1098
1095
|
style?: FormStyle;
|
|
1099
1096
|
fields?: readonly FormItem<FormField>[];
|
|
1100
|
-
buttons?:
|
|
1101
|
-
buttonsPosition?:
|
|
1097
|
+
buttons?: FormButtons;
|
|
1098
|
+
buttonsPosition?: string;
|
|
1099
|
+
text?: FormTextConfig;
|
|
1102
1100
|
className?: FormClassNameConfig;
|
|
1103
1101
|
validator?: FormValidatorConfig;
|
|
1104
1102
|
onSubmit?: ((data: FormDataRecord, form: Form) => void | Promise<void>) | null;
|
|
@@ -1108,28 +1106,20 @@ interface ResolvedFormProps extends Record<string, unknown> {
|
|
|
1108
1106
|
id: string;
|
|
1109
1107
|
vertical: boolean;
|
|
1110
1108
|
itemVertical: boolean;
|
|
1109
|
+
size: string;
|
|
1111
1110
|
style: FormStyle;
|
|
1112
1111
|
fields: FormItem<FormField>[];
|
|
1113
|
-
buttons:
|
|
1114
|
-
buttonsPosition:
|
|
1112
|
+
buttons: FormButtons;
|
|
1113
|
+
buttonsPosition: string;
|
|
1114
|
+
text: FormText;
|
|
1115
1115
|
className: FormClassNames;
|
|
1116
1116
|
validator: FormValidatorConfig;
|
|
1117
1117
|
onSubmit: ((data: FormDataRecord, form: Form) => void | Promise<void>) | null;
|
|
1118
1118
|
onReset: ((event: Event, form: Form) => void) | null;
|
|
1119
1119
|
}
|
|
1120
1120
|
interface FormState extends Record<string, unknown> {
|
|
1121
|
-
id: string;
|
|
1122
|
-
vertical: boolean;
|
|
1123
|
-
itemVertical: boolean;
|
|
1124
|
-
style: FormStyle;
|
|
1125
1121
|
fields: FormItem<FormField>[];
|
|
1126
|
-
buttons: FormButton[];
|
|
1127
|
-
className: FormClassNames;
|
|
1128
|
-
validator: FormValidatorConfig;
|
|
1129
|
-
onSubmit: ((data: FormDataRecord, form: Form) => void | Promise<void>) | null;
|
|
1130
|
-
onReset: ((event: Event, form: Form) => void) | null;
|
|
1131
1122
|
submitting: boolean;
|
|
1132
|
-
data: FormDataRecord | null;
|
|
1133
1123
|
}
|
|
1134
1124
|
interface FormControlContext {
|
|
1135
1125
|
form: Form;
|
|
@@ -1668,7 +1658,6 @@ interface ResolvedOffcanvasProps extends Record<string, unknown> {
|
|
|
1668
1658
|
}
|
|
1669
1659
|
interface OffcanvasState extends Record<string, unknown> {
|
|
1670
1660
|
content: OffcanvasContent;
|
|
1671
|
-
resolvedContent: RenderableContent<Offcanvas>;
|
|
1672
1661
|
visible: boolean;
|
|
1673
1662
|
loading: boolean;
|
|
1674
1663
|
}
|
|
@@ -1778,4 +1767,4 @@ interface MenuState extends Record<string, unknown> {
|
|
|
1778
1767
|
type Menu = FunctionalComponent<ResolvedMenuProps, MenuState, HTMLElement>;
|
|
1779
1768
|
declare function createMenu(input?: MenuProps): Menu;
|
|
1780
1769
|
//#endregion
|
|
1781
|
-
export {
|
|
1770
|
+
export { CleanupFunction, CollapseMotionController, CollapseTransitionDefinition, ComponentCleanup, ComponentContext, ComponentController, ComponentDefinition, ComponentLifecycleEvent, ComponentListener, ComponentPlugin, ComponentPluginOptions, ComponentProps, ComponentRuntime, ComponentState, ContainerExpect, DOMReference, DropInstance, ElementRef, FieldOption, Flow, FlowAction, FlowBusyHook, FlowBusyStrategy, FlowChangeHook, FlowClassNameConfig, FlowClassNames, FlowCleanup, FlowContext, FlowData, FlowDirection, FlowErrorHook, FlowFinishHook, FlowGoToOptions, FlowGuardHook, FlowLifecycleHook, FlowMoveHook, FlowPayload, FlowProps, FlowRenderContext, FlowSlot, FlowSlotName, FlowSnapshot, FlowState, FlowStep, FlowStepResult, FlowSubscriber, FlowTarget, FlowText, Form, FormButtons, FormClassNameConfig, FormClassNames, FormDataRecord, FormDataValue, FormField, FormItem, FormItemNext, FormItemType, FormOption, FormProps, FormText, FormTextConfig, FormValidatorConfig, FunctionalComponent, IEventManager, IconAttributeValue, IconName, IconPathMap, IconProps, KeyedElementRefs, LazyRenderCallback, LazyRenderOptions, LazyRenderTarget, Menu, MenuClassNameConfig, MenuClassNames, MenuItem, MenuItemId, MenuItemRenderType, MenuProps, MenuType, Modal, ModalClassNameConfig, ModalClassNames, ModalProps, ModalText, MotionController, NormalizeContext, Offcanvas, OffcanvasAnimate, OffcanvasClassNameConfig, OffcanvasClassNames, OffcanvasContent, OffcanvasDirection, OffcanvasProps, OwnedView, OwnedViewOptions, Pagination, PaginationClassNameConfig, PaginationClassNames, PaginationCount, PaginationPage, PaginationProps, ParabolaInstance, ParamRule, ParamRuleInput, PopupProps, PresenceController, PresenceOptions, PresencePhase, PublicFlowStep, QueryContext, RenderableContent, RequireContainerResult, ResolveContainerResult, ResolveSchema, ResolvedProps, StateSyncOptions, SupportES2022, Swiper, SwiperClassNameConfig, SwiperClassNames, SwiperDataItem, SwiperDataLoader, SwiperDataSource, SwiperProps, SwiperSlideContext, TabContent, TabItem, Tabs, TabsClassNameConfig, TabsClassNames, TabsDirection, TabsDisabled, TabsPanelContext, TabsProps, TabsValue, ThemeClassNameConfig, ThemeClassNames, ThemeConfigKey, ThemeInstance, ThemeOptions, ThemePanelGroup, ThemeResolvedOptions, Toast, ToastClassNameConfig, ToastClassNameOptions, ToastClassNames, ToastConfirmProps, ToastOptions, ToastTheme, ToastThemeOptions, TocCurrent, TocItem, TooltipInstance, TransitionDefinition, TransitionTarget, ValidateCondition, ValidatorClassNameConfig, ValidatorClassNames, ValidatorInstance, addIcons, all, asRenderable, checkModernBrowser, copy, createAccordion, createCollapseTransition, createDrop, createElementRef, createEventManager, createFlow, createForm, createKeyedElementRefs, createLoading, createMenu, createModal, createMotionGroup, createOffcanvas, createOwnedView, createPagination, createParabola, createPopup, createPresence, createScheduledTask, createStateSync, createSticky, createSwiper, createTabs, createTheme, createToc, createTooltip, createTransition, createValidator, defineComponent, flexPosition, getRegistedIconPath, getStoreVersion, getType, icon, iconHtml, iconMarkup, isDomElementValue, isDomNodeValue, isElement, isHtmlElementValue, isMobile, isModernBrowser, isNilValue, isNode, isPlainObject, isRenderableContent, isRenderablePrimitive, isRenderableValue, lazyRender, listen, postJson, q, randomId, removeComponentPlugin, requireContainer, resolveContainer, resolveElement, resolveNode, resolveNodeList, resolveProps, restUrl, stateSnapshot, timer, trackStoreVersion, useComponentPlugin, uuid, validateParam, waitForMotion };
|