@xleddyl/443-components-vue 0.16.111 → 0.16.113

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/README.md CHANGED
@@ -165,7 +165,7 @@ A few component tokens are unset by default and only exist to be overridden on a
165
165
  | Fields | `--k-field-padding-x` |
166
166
  | Overlays | `--k-modal-radius`, `--k-modal-shadow`, `--k-drawer-radius`, `--k-drawer-shadow`, `--k-popover-radius`, `--k-popover-shadow`, `--k-toast-radius`, `--k-toast-shadow`, `--k-scrim-blur` (3px) |
167
167
  | Tooltip | `--k-tooltip-background`, `--k-tooltip-text`, `--k-tooltip-border`, `--k-tooltip-radius`, `--k-tooltip-shadow`, `--k-tooltip-padding` |
168
- | Shell | `--k-sidebar-width` (16.5rem), `--k-sidebar-rail-width`, `--k-topbar-height` (3rem), `--k-shell-inset`, `--k-shell-padding`, `--k-shell-content` |
168
+ | Shell | `--k-sidebar-width` (16.5rem), `--k-sidebar-rail-width`, `--k-topbar-height` (3rem), `--k-shell-inset`, `--k-shell-padding` (1.5rem, the same as the body of a Drawer), `--k-shell-content` |
169
169
  | Switch | `--k-switch-track-width`, `--k-switch-track-height`, `--k-switch-thumb-size` (md size) |
170
170
  | Separator | `--k-separator-heading-font-size` (0.9375rem), `--k-separator-heading-color` (`--k-text`), `--k-separator-label-font-size` (0.75rem) |
171
171
  | Calendar | `--k-calendar-day-radius`, `--k-calendar-unavailable-color`, `--k-calendar-unavailable-decoration` (line-through), `--k-calendar-unavailable-opacity` (0.6), `--k-calendar-out-of-range-color`, `--k-calendar-out-of-range-decoration`, `--k-calendar-out-of-range-opacity` (each defaults to its unavailable token) |
@@ -777,6 +777,7 @@ const confirmDiscard = () => !dirty.value || confirm({ title: 'Discard changes?'
777
777
 
778
778
  - It needs a `DashboardLayout` or an `AppShell` around the page, and a shell width of at least 1280px. Otherwise (and on a phone) it is the normal overlay drawer, and it changes mode while it is open when the window is resized.
779
779
  - The shell shows a dock on the right of the page as long as a docked drawer is mounted, also while it is closed: a page with a docked drawer shows the empty state of the dock ("Nothing selected", `dockEmptyTitle` and `dockEmptyDescription` of the layout), and a page without one shows no dock. The open drawer fills the dock.
780
+ - The dock opens and closes with a width animation (`--k-duration-xl`, `--k-ease-drawer`): the panel slides in from the right at its final width and the page content shrinks with it, also when the dock is detached or docked again. An opened drawer slides into the dock.
780
781
  - The dock has a resize handle on its left edge (min 22rem, max 48rem and at most 45% of the shell, double click resets to 30rem). The width goes to the preferences store under `dock:<dockStorageKey>` (default `k-dock`, `false` keeps it only in memory).
781
782
  - `size` gives the width of the overlay mode only. The dock can be detached: every docked drawer of the app then opens as a normal overlay and no page shows the dock. The header of a docked drawer has the detach button (icon `dock-detach`, a pop out); the header of the overlay and the end of the actions of `PageHeader` (only while detached, on a page with a docked drawer in a wide shell, `dockToggle: false` hides it) have the dock button (icon `dock-attach`, a frame with a small filled panel on the right). Labels `detachLabel` and `attachLabel`. The choice is saved with the width (`dock:<dockStorageKey>`, `{ width, detached }`).
782
783
  - In the dock the header has no close button (Escape, the cancel button of the footer or a click on another row change it). In every Modal and Drawer, when the `#actions` slot does not fit next to a title of 12rem, it moves into an "Actions" menu (a soft button with a popover; the buttons of the slot show as menu rows, and a click on one closes the menu unless it opens a menu of its own), and it comes back inline when there is space again. The overlay of a docked drawer is at most 48rem wide (the maximum width of the dock), also with `size="xl"` or `"full"`.
@@ -94,7 +94,9 @@
94
94
  </main>
95
95
  </div>
96
96
  <aside
97
+ ref="dockRef"
97
98
  class="k-shell-dock"
99
+ :class="{ 'is-resizing': dockResizing }"
98
100
  :style="{ '--k-shell-dock-width': `${dockSize}px` }"
99
101
  :aria-label="dockText"
100
102
  >
@@ -109,15 +111,17 @@
109
111
  @resize-start="dockResizing = true"
110
112
  @resize-end="endDockResize"
111
113
  />
112
- <div ref="dockFrameRef" class="k-shell-dock-frame">
113
- <EmptyState
114
- class="k-shell-dock-empty"
115
- icon="cursor-arrow-rays"
116
- variant="plain"
117
- :title="dockEmptyTitleText"
118
- :description="dockEmptyDescriptionText"
119
- />
120
- <div ref="dockSlot" class="k-shell-dock-slot" />
114
+ <div class="k-shell-dock-clip">
115
+ <div ref="dockFrameRef" class="k-shell-dock-frame">
116
+ <EmptyState
117
+ class="k-shell-dock-empty"
118
+ icon="cursor-arrow-rays"
119
+ variant="plain"
120
+ :title="dockEmptyTitleText"
121
+ :description="dockEmptyDescriptionText"
122
+ />
123
+ <div ref="dockSlot" class="k-shell-dock-slot" />
124
+ </div>
121
125
  </div>
122
126
  </aside>
123
127
  <slot name="overlays" />
@@ -263,6 +267,7 @@ watch(open, (value) => {
263
267
  });
264
268
  const dockSlot = useTemplateRef("dockSlot");
265
269
  const dockFrameRef = useTemplateRef("dockFrameRef");
270
+ const dockRef = useTemplateRef("dockRef");
266
271
  const dockWide = computed(() => shellWidth.value >= DOCK_BREAKPOINT);
267
272
  const dockPreference = props.dockStorageKey ? usePreference(
268
273
  PREFERENCE_KEYS.dock(props.dockStorageKey),
@@ -316,7 +321,7 @@ function resetDock() {
316
321
  dockWidth.value = DOCK_WIDTH.initial;
317
322
  }
318
323
  useResizeObserver(
319
- () => [dockFrameRef.value],
324
+ () => [dockRef.value],
320
325
  ([entry]) => {
321
326
  const frame = dockFrameRef.value;
322
327
  if (!entry || !frame) return;
@@ -31,6 +31,12 @@
31
31
  gap: 0.625rem 1.25rem;
32
32
  }
33
33
 
34
+ @container (max-width: 24rem) {
35
+ .k-choice-group.has-columns > .k-choice-group-items {
36
+ grid-template-columns: minmax(0, 1fr);
37
+ }
38
+ }
39
+
34
40
  .k-checkbox-group-filled > .k-choice-group-items {
35
41
  padding: var(--k-checkbox-group-padding, 0.75rem);
36
42
  border: var(--k-checkbox-group-border, 0 solid transparent);
@@ -106,7 +106,7 @@ html.k-root body {
106
106
  width: 100%;
107
107
  max-width: var(--k-shell-content, 72rem);
108
108
  margin-inline: auto;
109
- padding: var(--k-shell-padding, 1.5rem 1.75rem 1.75rem);
109
+ padding: var(--k-shell-padding, 1.5rem);
110
110
  animation: k-enter 320ms var(--k-ease-out) backwards;
111
111
  }
112
112
 
@@ -125,7 +125,7 @@ html.k-root body {
125
125
  }
126
126
 
127
127
  .k-shell-content.is-fill > .k-shell-loading {
128
- padding: var(--k-shell-padding, 1.5rem 1.75rem 1.75rem);
128
+ padding: var(--k-shell-padding, 1.5rem);
129
129
  }
130
130
 
131
131
  .k-shell-loading-header {
@@ -171,19 +171,36 @@ html.k-root body {
171
171
 
172
172
  .k-shell-dock {
173
173
  position: relative;
174
- display: none;
174
+ display: flex;
175
175
  flex-direction: column;
176
- width: var(--k-shell-dock-width, 30rem);
176
+ width: 0;
177
177
  min-width: 0;
178
178
  min-height: 0;
179
179
  flex-shrink: 0;
180
+ visibility: hidden;
181
+ transition:
182
+ width var(--k-duration-xl) var(--k-ease-drawer),
183
+ visibility 0s linear var(--k-duration-xl);
184
+ }
185
+
186
+ .k-shell-dock.is-resizing {
187
+ transition: none;
188
+ }
189
+
190
+ .k-shell-dock-clip {
191
+ display: flex;
192
+ flex: 1;
193
+ justify-content: flex-end;
194
+ min-height: 0;
195
+ overflow: hidden;
180
196
  }
181
197
 
182
198
  .k-shell-dock-frame {
183
199
  position: relative;
184
200
  display: flex;
185
- flex: 1;
186
201
  flex-direction: column;
202
+ flex-shrink: 0;
203
+ width: calc(var(--k-shell-dock-width, 30rem) - var(--k-shell-gap));
187
204
  min-height: 0;
188
205
  margin: var(--k-shell-gap) var(--k-shell-gap) var(--k-shell-gap) 0;
189
206
  overflow: hidden;
@@ -219,6 +236,7 @@ html.k-root body {
219
236
  }
220
237
 
221
238
  .k-shell[data-variant='sidebar'] .k-shell-dock-frame {
239
+ width: var(--k-shell-dock-width, 30rem);
222
240
  margin: 0;
223
241
  border-width: 0 0 0 1px;
224
242
  border-radius: 0;
@@ -236,7 +254,9 @@ html.k-root body {
236
254
 
237
255
  @container k-shell (min-width: 1280px) {
238
256
  .k-shell:not(.is-dock-detached):has(.k-drawer.is-dockable) > .k-shell-dock {
239
- display: flex;
257
+ width: var(--k-shell-dock-width, 30rem);
258
+ visibility: visible;
259
+ transition: width var(--k-duration-xl) var(--k-ease-drawer);
240
260
  }
241
261
  }
242
262
 
@@ -151,10 +151,6 @@
151
151
  .k-drawer-actions {
152
152
  margin-inline-start: auto;
153
153
  }
154
-
155
- .k-drawer-body {
156
- padding: 1.25rem;
157
- }
158
154
  }
159
155
 
160
156
  .k-drawer.is-dockable:is(.k-drawer-xl, .k-drawer-full) > .k-drawer-panel {
@@ -242,6 +238,7 @@
242
238
  @keyframes k-dock-enter {
243
239
  from {
244
240
  opacity: 0;
241
+ transform: translateX(1.5rem);
245
242
  }
246
243
  }
247
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.111",
3
+ "version": "0.16.113",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",