winduum 1.2.3 → 1.2.5
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/package.json
CHANGED
|
@@ -43,6 +43,7 @@ export const dismissDialog = async (element, options = defaultOptions) => {
|
|
|
43
43
|
export const showDialog = async (element, options = {}) => {
|
|
44
44
|
options = {
|
|
45
45
|
closable: true,
|
|
46
|
+
modal: true,
|
|
46
47
|
...defaultOptions,
|
|
47
48
|
...options
|
|
48
49
|
}
|
|
@@ -72,7 +73,7 @@ export const showDialog = async (element, options = {}) => {
|
|
|
72
73
|
await nextRepaint()
|
|
73
74
|
|
|
74
75
|
window.HTMLDialogElement
|
|
75
|
-
? element.showModal()
|
|
76
|
+
? options.modal ? element.showModal() : element.show()
|
|
76
77
|
: element.setAttribute('open', '')
|
|
77
78
|
}
|
|
78
79
|
|
|
@@ -54,7 +54,7 @@ export const validateField = (element, options = {}) => {
|
|
|
54
54
|
if (!element.querySelector(options.selector)) return
|
|
55
55
|
|
|
56
56
|
const validationElement = element.querySelector(options.selector)
|
|
57
|
-
const validationMessage = validationElement.dataset.validationMessage ?? validationElement.validationMessage
|
|
57
|
+
const validationMessage = options.validationMessage ?? validationElement.dataset.validationMessage ?? validationElement.validationMessage
|
|
58
58
|
const infoParentElement = validationElement?.closest(options.infoParentSelector)
|
|
59
59
|
const endParentElement = validationElement.closest(options.endParentSelector)
|
|
60
60
|
const infoSelector = options.infoSelector + options.validitySelector
|
package/types/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ declare module 'winduum' {
|
|
|
23
23
|
export const defaultConfig: PluginOptions
|
|
24
24
|
|
|
25
25
|
export default function createPlugin(userConfig?: PluginOptions): Plugin
|
|
26
|
+
|
|
27
|
+
export {};
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
declare module 'winduum/src/components/carousel' {
|
|
@@ -66,6 +68,8 @@ declare module 'winduum/src/components/carousel' {
|
|
|
66
68
|
export function paginationCarousel(element: HTMLElement | Element, options?: PaginationCarouselOptions): void
|
|
67
69
|
export function autoplayCarousel(element: HTMLElement | Element, options?: AutoplayCarouselOptions): void
|
|
68
70
|
export function dragCarousel(element: HTMLElement | Element, options?: DragCarouselOptions): void
|
|
71
|
+
|
|
72
|
+
export {};
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
declare module 'winduum/src/components/compare' {
|
|
@@ -77,6 +81,8 @@ declare module 'winduum/src/components/compare' {
|
|
|
77
81
|
export function setPosition(event: Event, options?: SetPositionOptions): void
|
|
78
82
|
export function setKeyboardStep(event: KeyboardEvent, step?: string): void
|
|
79
83
|
export function setMouseStep(event: MouseEvent, step?: string): void
|
|
84
|
+
|
|
85
|
+
export {};
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
declare module 'winduum/src/components/details' {
|
|
@@ -89,12 +95,15 @@ declare module 'winduum/src/components/details' {
|
|
|
89
95
|
export function showDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
90
96
|
export function closeDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
91
97
|
export function toggleDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
98
|
+
|
|
99
|
+
export {};
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
declare module 'winduum/src/components/dialog' {
|
|
95
103
|
export interface DefaultOptions {
|
|
96
104
|
remove?: boolean | null
|
|
97
105
|
closable?: boolean | null
|
|
106
|
+
modal?: boolean | null
|
|
98
107
|
openClass?: string
|
|
99
108
|
scrollbarWidthProperty?: string
|
|
100
109
|
}
|
|
@@ -118,6 +127,8 @@ declare module 'winduum/src/components/dialog' {
|
|
|
118
127
|
export function closeDialog(element: HTMLDialogElement, options?: DefaultOptions): Promise<void>
|
|
119
128
|
export function insertDialog(content: string, options?: InsertDialogOptions): Promise<void>
|
|
120
129
|
export function fetchDialog({ url, insert }: FetchDialogOptions): Promise<void>
|
|
130
|
+
|
|
131
|
+
export {};
|
|
121
132
|
}
|
|
122
133
|
|
|
123
134
|
declare module 'winduum/src/components/drawer' {
|
|
@@ -134,6 +145,8 @@ declare module 'winduum/src/components/drawer' {
|
|
|
134
145
|
export function showDrawer(element: HTMLElement | Element, distance?: number, direction?: 'left' | 'top'): void
|
|
135
146
|
export function closeDrawer(element: HTMLElement | Element, distance?: number, direction?: 'left' | 'top'): void
|
|
136
147
|
export function scrollDrawer(element: HTMLElement | Element, options?: ScrollDrawerOptions): void
|
|
148
|
+
|
|
149
|
+
export {};
|
|
137
150
|
}
|
|
138
151
|
|
|
139
152
|
declare module 'winduum/src/components/form' {
|
|
@@ -145,6 +158,7 @@ declare module 'winduum/src/components/form' {
|
|
|
145
158
|
|
|
146
159
|
export interface ValidateFieldOptions {
|
|
147
160
|
validate?: boolean
|
|
161
|
+
validationMessage?: string
|
|
148
162
|
selector?: string
|
|
149
163
|
ignoreMatch?: RegExp
|
|
150
164
|
validitySelector?: string
|
|
@@ -163,6 +177,8 @@ declare module 'winduum/src/components/form' {
|
|
|
163
177
|
|
|
164
178
|
export function validateForm(event: Event | SubmitEvent, options?: ValidateFormOptions): void
|
|
165
179
|
export function validateField(element: HTMLElement | SubmitEvent, options?: ValidateFieldOptions): void
|
|
180
|
+
|
|
181
|
+
export {};
|
|
166
182
|
}
|
|
167
183
|
|
|
168
184
|
declare module 'winduum/src/components/tabs' {
|
|
@@ -172,6 +188,8 @@ declare module 'winduum/src/components/tabs' {
|
|
|
172
188
|
}
|
|
173
189
|
|
|
174
190
|
export function toggleTab(element: HTMLElement | Element, options?: ToggleTabOptions): void
|
|
191
|
+
|
|
192
|
+
export {};
|
|
175
193
|
}
|
|
176
194
|
|
|
177
195
|
declare module 'winduum/src/components/toaster' {
|
|
@@ -205,6 +223,8 @@ declare module 'winduum/src/components/toaster' {
|
|
|
205
223
|
export function insertToaster(element: HTMLElement, options?: InsertToasterOptions): Promise<void>
|
|
206
224
|
export function insertToast(element: HTMLElement, options?: InsertToastOptions): Promise<void>
|
|
207
225
|
export function closeToaster(element: HTMLElement, options?: CloseToastOptions): Promise<void>
|
|
226
|
+
|
|
227
|
+
export {};
|
|
208
228
|
}
|
|
209
229
|
|
|
210
230
|
declare module 'winduum/src/components/popover' {
|
|
@@ -222,6 +242,8 @@ declare module 'winduum/src/components/popover' {
|
|
|
222
242
|
export function showPopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
|
|
223
243
|
export function hidePopover(element: HTMLElement | Element): Promise<void>
|
|
224
244
|
export function togglePopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
|
|
245
|
+
|
|
246
|
+
export {};
|
|
225
247
|
}
|
|
226
248
|
|
|
227
249
|
declare module 'winduum/src/ui/range' {
|
|
@@ -244,14 +266,20 @@ declare module 'winduum/src/ui/range' {
|
|
|
244
266
|
export function setTrackProperty(options: SetTrackPropertyOptions, track: 'start' | 'end'): void
|
|
245
267
|
export function setValue(element: HTMLInputElement, options?: SetValueOptions): void
|
|
246
268
|
export function setOutputValue(element: HTMLInputElement, outputElement: HTMLOutputElement | Element, options?: SetOutputOptions): void
|
|
269
|
+
|
|
270
|
+
export {};
|
|
247
271
|
}
|
|
248
272
|
|
|
249
273
|
declare module 'winduum/src/utilities/ripple' {
|
|
250
274
|
export function showRipple(event: MouseEvent, element?: HTMLElement): void
|
|
275
|
+
|
|
276
|
+
export {};
|
|
251
277
|
}
|
|
252
278
|
|
|
253
279
|
declare module 'winduum/src/utilities/swap' {
|
|
254
280
|
export function toggleSwap(element: HTMLElement): void
|
|
281
|
+
|
|
282
|
+
export {};
|
|
255
283
|
}
|
|
256
284
|
|
|
257
285
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -96,5 +96,6 @@
|
|
|
96
96
|
null,
|
|
97
97
|
null
|
|
98
98
|
],
|
|
99
|
-
"mappings": ";;kBAEiBA,aAAaA;;;;;;;;;;;;;;;;;;;;cAoBjBC,aAAaA
|
|
99
|
+
"mappings":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