@db-ux/v-core-components 5.0.4 → 5.1.1
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 +12 -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 +227 -206
- package/dist/db-ux.umd.js +1 -1
- package/dist/ponyfills/allow-discrete.d.ts +56 -0
- package/dist/shared/model.d.ts +4 -0
- package/package.json +3 -3
|
@@ -0,0 +1,56 @@
|
|
|
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, dialogOpen)` — when closing: if
|
|
16
|
+
* supported natively, calls `close()` immediately; otherwise sets
|
|
17
|
+
* `data-closing-allow-discrete-ponyfill` on the dialog, waits
|
|
18
|
+
* `--db-transition-duration`, then calls `close()`.
|
|
19
|
+
* When opening: cancels any pending ponyfill close.
|
|
20
|
+
*
|
|
21
|
+
* CSS contract:
|
|
22
|
+
* - `.db-drawer` defines `--db-transition-duration` (`0ms` default,
|
|
23
|
+
* real value under `prefers-reduced-motion: no-preference`); the ponyfill
|
|
24
|
+
* reads this custom property via `getComputedStyle`
|
|
25
|
+
* - `&[open]:not([data-closing-allow-discrete-ponyfill])` controls
|
|
26
|
+
* `transform: none` — when the attribute is present, the transform reverts
|
|
27
|
+
* to the off-screen value, triggering the exit animation while the dialog
|
|
28
|
+
* is still [open]
|
|
29
|
+
*
|
|
30
|
+
* Maintenance constraints:
|
|
31
|
+
* - The attribute name `data-closing-allow-discrete-ponyfill` must stay in
|
|
32
|
+
* sync between JS (`dataset['closingAllowDiscretePonyfill']`) and CSS
|
|
33
|
+
* (`[data-closing-allow-discrete-ponyfill]`)
|
|
34
|
+
* - The custom property `--db-transition-duration` must stay in sync
|
|
35
|
+
* between the SCSS declaration and the JS `getPropertyValue` call
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* Handles dialog open/close transitions for browsers that don't support
|
|
40
|
+
* `allow-discrete` for `display` and `overlay`.
|
|
41
|
+
*
|
|
42
|
+
* When `dialogOpen` is false: sets `data-closing-allow-discrete-ponyfill` on
|
|
43
|
+
* the dialog to signal CSS to revert the transform, then defers `onClose`.
|
|
44
|
+
* In browsers with native support, calls `onClose` immediately.
|
|
45
|
+
*
|
|
46
|
+
* When `dialogOpen` is true: cancels any pending ponyfill close by removing
|
|
47
|
+
* the dataset attribute.
|
|
48
|
+
*
|
|
49
|
+
* Reads `--db-transition-duration` from the dialog as the contract
|
|
50
|
+
* between CSS and JS for the transition timing.
|
|
51
|
+
*
|
|
52
|
+
* @param dialog - The dialog element
|
|
53
|
+
* @param dialogOpen - Whether the dialog should be open
|
|
54
|
+
* @param onClose - Callback to execute when the dialog should close (typically `() => dialog.close()`)
|
|
55
|
+
*/
|
|
56
|
+
export declare const _closeDialogWithTransition: (dialog: HTMLDialogElement, dialogOpen: boolean, onClose: () => void) => void;
|
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
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/v-core-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
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.
|
|
32
|
-
"@db-ux/core-foundations": "5.
|
|
31
|
+
"@db-ux/core-components": "5.1.1",
|
|
32
|
+
"@db-ux/core-foundations": "5.1.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@playwright/experimental-ct-vue": "1.60.0",
|