@db-ux/v-core-components 5.0.4 → 5.1.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/CHANGELOG.md +8 -0
- package/dist/components/custom-select/custom-select.vue.d.ts +2 -0
- package/dist/components/drawer/model.d.ts +0 -1
- package/dist/components/input/input.vue.d.ts +1 -0
- package/dist/components/select/select.vue.d.ts +1 -0
- package/dist/components/textarea/textarea.vue.d.ts +1 -0
- package/dist/db-ux.es.js +223 -206
- package/dist/db-ux.umd.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/shared/model.d.ts +4 -0
- package/dist/utils/allow-discrete-ponyfill.d.ts +62 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export * from './components/tooltip/index.js';
|
|
|
94
94
|
export * from './components/tooltip/model.js';
|
|
95
95
|
export * from './shared/constants.js';
|
|
96
96
|
export * from './shared/model.js';
|
|
97
|
+
export * from './utils/allow-discrete-ponyfill.js';
|
|
97
98
|
export * from './utils/document-click-listener.js';
|
|
98
99
|
export * from './utils/document-scroll-listener.js';
|
|
99
100
|
export * from './utils/floating-components.js';
|
package/dist/shared/model.d.ts
CHANGED
|
@@ -360,6 +360,10 @@ export type FormMessageProps = {
|
|
|
360
360
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
361
361
|
*/
|
|
362
362
|
autocomplete?: string | AutoCompleteType;
|
|
363
|
+
/**
|
|
364
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
365
|
+
*/
|
|
366
|
+
autoComplete?: string | AutoCompleteType;
|
|
363
367
|
/**
|
|
364
368
|
* Enables or disables the visibility of the message.
|
|
365
369
|
*/
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO: Remove this file once Firefox ships `allow-discrete` for `display`
|
|
3
|
+
* (https://bugzilla.mozilla.org/show_bug.cgi?id=1882408) and Safari supports
|
|
4
|
+
* `overlay` transitions. Replace all `closeDialogWithTransition()` calls with
|
|
5
|
+
* direct `dialog.close()`.
|
|
6
|
+
*
|
|
7
|
+
* This module provides a ponyfill for browsers that do not support transitioning
|
|
8
|
+
* `display` and/or `overlay` with `transition-behavior: allow-discrete`
|
|
9
|
+
* (currently Firefox and Safari). Used by the drawer to animate dialog exit
|
|
10
|
+
* transitions.
|
|
11
|
+
*
|
|
12
|
+
* Architecture:
|
|
13
|
+
* - `supportsAllowDiscreteDisplayAndOverlayTransition()` — cached feature
|
|
14
|
+
* detection (checks both `display` transition and `overlay` support)
|
|
15
|
+
* - `closeDialogWithTransition(dialog)` — if supported natively, calls
|
|
16
|
+
* `close()` immediately; otherwise sets `data-closing-allow-discrete-ponyfill`
|
|
17
|
+
* on the dialog, waits `--db-transition-duration`, then calls `close()`
|
|
18
|
+
*
|
|
19
|
+
* CSS contract:
|
|
20
|
+
* - `.db-drawer` defines `--db-transition-duration` (`0s` default,
|
|
21
|
+
* real value under `prefers-reduced-motion: no-preference`); the ponyfill
|
|
22
|
+
* reads this custom property via `getComputedStyle`
|
|
23
|
+
* - `&[open]:not([data-closing-allow-discrete-ponyfill])` controls
|
|
24
|
+
* `transform: none` — when the attribute is present, the transform reverts
|
|
25
|
+
* to the off-screen value, triggering the exit animation while the dialog
|
|
26
|
+
* is still [open]
|
|
27
|
+
*
|
|
28
|
+
* Maintenance constraints:
|
|
29
|
+
* - The attribute name `data-closing-allow-discrete-ponyfill` must stay in
|
|
30
|
+
* sync between JS (`dataset['closingAllowDiscretePonyfill']`) and CSS
|
|
31
|
+
* (`[data-closing-allow-discrete-ponyfill]`)
|
|
32
|
+
* - The custom property `--db-transition-duration` must stay in sync
|
|
33
|
+
* between the SCSS declaration and the JS `getPropertyValue` call
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
* Feature-detects whether the browser supports transitioning the `display`
|
|
38
|
+
* and `overlay` properties when `transition-behavior: allow-discrete` is set.
|
|
39
|
+
* Both are required for a complete dialog exit animation:
|
|
40
|
+
* - `display` transitioning keeps the element visible during the exit
|
|
41
|
+
* - `overlay` transitioning keeps it in the top layer (preserving the backdrop)
|
|
42
|
+
*
|
|
43
|
+
* Returns false during SSR or before document.body is available.
|
|
44
|
+
* Result is cached after the first successful call.
|
|
45
|
+
*/
|
|
46
|
+
export declare const supportsAllowDiscreteDisplayAndOverlayTransition: () => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
* Closes a dialog with a deferred `close()` call, allowing the CSS exit
|
|
50
|
+
* transition to play in browsers that don't support `allow-discrete` for
|
|
51
|
+
* `display` and `overlay`. Sets `data-closing-allow-discrete-ponyfill` on the
|
|
52
|
+
* dialog to signal CSS to revert the transform while the dialog is still [open].
|
|
53
|
+
*
|
|
54
|
+
* Reads `--db-transition-duration` from the dialog as the contract
|
|
55
|
+
* between CSS and JS for the transition timing.
|
|
56
|
+
*
|
|
57
|
+
* In browsers that support `allow-discrete` for `display` and `overlay`,
|
|
58
|
+
* calls `close()` immediately and lets native CSS handle the exit animation.
|
|
59
|
+
*
|
|
60
|
+
* @param dialog - The dialog element to close
|
|
61
|
+
*/
|
|
62
|
+
export declare const closeDialogWithTransition: (dialog: HTMLDialogElement) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/v-core-components",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue components for @db-ux/core-components",
|
|
6
6
|
"repository": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dist/"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@db-ux/core-components": "5.0
|
|
32
|
-
"@db-ux/core-foundations": "5.0
|
|
31
|
+
"@db-ux/core-components": "5.1.0",
|
|
32
|
+
"@db-ux/core-foundations": "5.1.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@playwright/experimental-ct-vue": "1.60.0",
|