@xleddyl/443-components-vue 0.16.28 → 0.16.30

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/CATALOG.md CHANGED
@@ -66,7 +66,7 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
66
66
  | Short message after an action | `toast` |
67
67
  | Toast for a promise (loading, success, error) | `toast.promise` |
68
68
  | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
69
- | Detail or edit panel from the side | `Drawer` (or `useDrawer().open`) |
69
+ | Detail or edit panel from the side | `Drawer` (or `useDrawer().open`). At 640px or less, a left or right drawer is a full-width sheet from the bottom. |
70
70
  | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
71
71
  | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
72
72
  | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
@@ -91,6 +91,7 @@ export function useModalDialog(options) {
91
91
  if (returnTarget?.isConnected) returnTarget.focus({ preventScroll: true });
92
92
  });
93
93
  function onCancel(event) {
94
+ if (event.target !== event.currentTarget) return;
94
95
  event.preventDefault();
95
96
  if (options.dismissible()) requestClose("escape");
96
97
  }
@@ -6,6 +6,10 @@
6
6
 
7
7
  .k-drawer[open] {
8
8
  display: flex;
9
+ transition:
10
+ padding var(--k-duration-lg) var(--k-ease),
11
+ display var(--k-duration-lg) allow-discrete,
12
+ overlay var(--k-duration-lg) allow-discrete;
9
13
  }
10
14
 
11
15
  .k-drawer-left {
@@ -38,7 +42,10 @@
38
42
 
39
43
  .k-drawer[open] > .k-drawer-panel {
40
44
  transform: none;
41
- transition: transform var(--k-duration-xl) var(--k-ease-drawer);
45
+ transition:
46
+ transform var(--k-duration-xl) var(--k-ease-drawer),
47
+ max-width var(--k-duration-lg) var(--k-ease),
48
+ border-radius var(--k-duration-lg) var(--k-ease);
42
49
  }
43
50
 
44
51
  @starting-style {
@@ -127,9 +134,18 @@
127
134
  }
128
135
 
129
136
  @media (max-width: 640px) {
137
+ .k-drawer.k-drawer-left,
138
+ .k-drawer.k-drawer-right {
139
+ padding: max(0.75rem, env(safe-area-inset-top)) 0 0;
140
+ }
141
+
130
142
  .k-drawer-left > .k-drawer-panel,
131
143
  .k-drawer-right > .k-drawer-panel {
132
- max-width: calc(100% - 2rem);
144
+ --k-drawer-hidden: translateY(100%);
145
+ max-width: 100%;
146
+ padding-bottom: env(safe-area-inset-bottom);
147
+ border-radius: var(--k-drawer-radius, var(--k-radius-xl))
148
+ var(--k-drawer-radius, var(--k-radius-xl)) 0 0;
133
149
  }
134
150
 
135
151
  .k-drawer.k-drawer-bottom {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.28",
3
+ "version": "0.16.30",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",