@xleddyl/443-components-vue 0.16.43 → 0.16.46
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
|
@@ -266,7 +266,7 @@ Templates combine core parts into whole pages and layouts. Start from them for n
|
|
|
266
266
|
|
|
267
267
|
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
268
268
|
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
|
269
|
-
| `DashboardLayout` | Ready app frame: brand, navigation, command search, account menu, settings modal, breadcrumbs, theme switch. Put it in `layouts/default.vue`. | Models: `v-model:collapsed`, `v-model:open`, `v-model:settingsOpen`, `v-model:settingsSection`. Props: `navigation` (`NavItem[]` or `NavSection[]`), `account` (`name`, `email`, `avatar`, `role`, `menu`), `brandName`, `brandIcon`, `brandLogo`, `breadcrumbs`, `search` (true, groups or function), `settingsSections`, `settingsRoute`, `settingsRouteLocation`, `settingsAccountSection`, `settingsResolvePage`, `settingsHideSession`, `variant`, `content` (`page`, `fill`, `centered`, `bleed`; per page with `definePageMeta({ content })` in `k-dashboard`), `fluid`, `fill`, `onSignOut`. Slots: default, `actions`, `brand`, `sidebar`, `sidebar-footer`, `account`, `topbar`, `search-item`, `settings-account-fields`, `settings-section-<id>`, `settings-actions-<id>`. Event: `accountSelect`. | `templates/dashboard-layout.vue` |
|
|
269
|
+
| `DashboardLayout` | Ready app frame: brand, navigation, command search, account menu, settings modal, breadcrumbs, theme switch. Put it in `layouts/default.vue`. | Models: `v-model:collapsed`, `v-model:open`, `v-model:settingsOpen`, `v-model:settingsSection`. Props: `navigation` (`NavItem[]` or `NavSection[]`), `account` (`name`, `email`, `avatar`, `role`, `menu`), `brandName`, `brandIcon`, `brandLogo`, `breadcrumbs`, `search` (true, groups or function), `settingsSections`, `settingsRoute`, `settingsRouteLocation`, `settingsAccountSection`, `settingsResolvePage`, `settingsHideSession`, `variant`, `content` (`page`, `fill`, `centered`, `bleed`; per page with `definePageMeta({ content })` in `k-dashboard`), `fluid`, `fill`, `onSignOut`. Slots: default, `actions`, `brand`, `sidebar-top`, `sidebar`, `sidebar-footer`, `account`, `topbar`, `search-item`, `settings-account-fields`, `settings-section-<id>`, `settings-actions-<id>`. Event: `accountSelect`. | `templates/dashboard-layout.vue` |
|
|
270
270
|
| `AuthLayout` | Frame of sign in, sign up and reset password pages: left column with brand, title (or a large breadcrumb), form and footer; aside panel on the right from 960px. | Props: `title`, `description`, `breadcrumbs`, `footer`, `brandName`, `brandIcon`, `brandLogo`, `aside`, `asideTitle`, `asideDescription`, `themeSwitch`. Slots: default, `links`, `footer`, `brand`, `aside`, `corner`. | `templates/auth-layout.vue` |
|
|
271
271
|
| `AuthLogin` | Complete sign in page in two steps (email, then password with a breadcrumb back). Offers to sign in again after `AuthLogout`. | Props: `submit` (`{ email, password }`), `submitError`, `title`, `description`, `emailLabel`, `emailPlaceholder`, `passwordLabel`, `submitLabel`, `stepKey`, `reasonKey`, frame props of `AuthLayout`. Slots: `links` (`{ email, step }`), `footer`, `brand`, `aside`, `corner`. | `templates/auth-login.vue` |
|
|
272
272
|
| `AuthLogout` | Sign out page: runs `logout()`, remembers the account, reloads the sign in page. Retry on error. | Props: `logout`, `account` (`{ email, name }`), `loginTo`, `reasonKey`, frame props of `AuthLayout`. Slots: `footer`, `brand`, `aside`, `corner`. Helpers: `rememberSignedOutAccount`, `takeSignedOutAccount`, `SIGNED_OUT_REASON`. | `templates/auth-login.vue` |
|
package/README.md
CHANGED
|
@@ -668,7 +668,7 @@ Ready defaults to start a dashboard project: an app frame, an auth frame and pag
|
|
|
668
668
|
| `fill` | `false` | Full height, full bleed content (the same as `content="bleed"`): no padding, gap or max width, and the content fills the panel (a page that is one DataGrid with `height="100%"`). Also on `AppShell`; in the `k-dashboard` layout per page with `definePageMeta({ fill: true })` or for every page with `dashboard.fill`. |
|
|
669
669
|
| `content` | `'page'` | Content layout (`ShellContent`). `page`: max width (`--k-shell-content`, 72rem), padding, the panel scrolls. `fill`: full width and full height with the normal padding and gap; the panel never scrolls and the content is a flex column with `min-height: 0`, so a child with `flex: 1` (a `DataGrid` with `fill`, `Tabs` with `stretch`, a `.k-page` root) takes the rest of the height. `centered`: the same full height, with the width kept at `--k-shell-content` and centered. `bleed`: full width and height without padding or gap. `fill` (boolean) is an alias of `bleed` and `fluid` removes the max width of `page`; `content` wins over both. Also on `AppShell`; in the `k-dashboard` layout per page with `definePageMeta({ content: 'fill' })` (typed) or for every page with `dashboard.content` in the app config. |
|
|
670
670
|
|
|
671
|
-
Slots: `brand`, `search`, `sidebar` (replaces the navigation), `sidebar-footer`, `account`, `topbar-brand`, `topbar`, `actions`, default, plus `settings-section-<id>`, `settings-actions-<id>` and `settings-account-fields`, forwarded to the SettingsModal. The exposed `openSettings(id?)` opens it on a section. Landmarks: skip link, `aside` and `nav` with labels, `main` with an id, `aria-current="page"` on the active link. `SidebarNav` (layout group) renders the same navigation data inside your own `Sidebar`.
|
|
671
|
+
Slots: `brand`, `search`, `sidebar-top` (under the search, for example a workspace select), `sidebar` (replaces the navigation), `sidebar-footer`, `account`, `topbar-brand`, `topbar`, `actions`, default, plus `settings-section-<id>`, `settings-actions-<id>` and `settings-account-fields`, forwarded to the SettingsModal. The exposed `openSettings(id?)` opens it on a section. Landmarks: skip link, `aside` and `nav` with labels, `main` with an id, `aria-current="page"` on the active link. `SidebarNav` (layout group) renders the same navigation data inside your own `Sidebar`.
|
|
672
672
|
|
|
673
673
|
### SettingsModal
|
|
674
674
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
size="lg"
|
|
63
63
|
block
|
|
64
64
|
trailing-icon="arrow-right"
|
|
65
|
-
:loading="passwordForm.submitting.value"
|
|
65
|
+
:loading="passwordForm.submitting.value || signingIn"
|
|
66
66
|
>
|
|
67
67
|
{{ submitText }}
|
|
68
68
|
</Button>
|
|
@@ -125,6 +125,7 @@ const view = ref(reason.value === SIGNED_OUT_REASON ? "signedOut" : "login");
|
|
|
125
125
|
const email = ref("");
|
|
126
126
|
const account = ref(null);
|
|
127
127
|
const signedOutReady = ref(false);
|
|
128
|
+
const signingIn = ref(false);
|
|
128
129
|
const content = ref();
|
|
129
130
|
const emailText = computed(() => props.emailLabel ?? t("auth.email"));
|
|
130
131
|
const passwordText = computed(() => props.passwordLabel ?? t("auth.password"));
|
|
@@ -145,7 +146,7 @@ const frame = computed(() => ({
|
|
|
145
146
|
skipLabel: props.skipLabel
|
|
146
147
|
}));
|
|
147
148
|
const passwordStep = computed(
|
|
148
|
-
() => view.value === "login" && step.value === "password" && !!email.value
|
|
149
|
+
() => signingIn.value || view.value === "login" && step.value === "password" && !!email.value
|
|
149
150
|
);
|
|
150
151
|
const title = computed(() => {
|
|
151
152
|
if (view.value === "login") return props.title ?? t("auth.loginTitle");
|
|
@@ -176,7 +177,15 @@ const emailForm = useForm({
|
|
|
176
177
|
});
|
|
177
178
|
const passwordForm = useForm({
|
|
178
179
|
schema: { password: { initial: "", required: true } },
|
|
179
|
-
onSubmit: (values) =>
|
|
180
|
+
onSubmit: async (values) => {
|
|
181
|
+
signingIn.value = true;
|
|
182
|
+
try {
|
|
183
|
+
await props.submit({ email: email.value, password: values.password });
|
|
184
|
+
} catch (error) {
|
|
185
|
+
signingIn.value = false;
|
|
186
|
+
throw error;
|
|
187
|
+
}
|
|
188
|
+
},
|
|
180
189
|
submitError: props.submitError
|
|
181
190
|
});
|
|
182
191
|
function normalizeEmail(value) {
|
|
@@ -206,7 +215,7 @@ function focusInput() {
|
|
|
206
215
|
content.value?.querySelector("input:not([readonly])")?.focus();
|
|
207
216
|
}
|
|
208
217
|
watch(step, (value) => {
|
|
209
|
-
if (value !== "password") passwordForm.reset();
|
|
218
|
+
if (value !== "password" && !signingIn.value) passwordForm.reset();
|
|
210
219
|
});
|
|
211
220
|
onMounted(() => {
|
|
212
221
|
if (view.value === "signedOut") {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
/>
|
|
37
37
|
</slot>
|
|
38
38
|
</template>
|
|
39
|
-
<template v-if="$slots.search || search" #top>
|
|
40
|
-
<slot name="search" :collapsed="isCollapsed">
|
|
39
|
+
<template v-if="$slots.search || search || $slots['sidebar-top']" #top>
|
|
40
|
+
<slot v-if="$slots.search || search" name="search" :collapsed="isCollapsed">
|
|
41
41
|
<CommandPalette
|
|
42
42
|
v-model:open="searchOpen"
|
|
43
43
|
:groups="commandGroups"
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
</template>
|
|
63
63
|
</CommandPalette>
|
|
64
64
|
</slot>
|
|
65
|
+
<slot name="sidebar-top" :collapsed="isCollapsed" />
|
|
65
66
|
</template>
|
|
66
67
|
<slot name="sidebar" :collapsed="isCollapsed">
|
|
67
68
|
<SidebarNav v-if="navigation" :items="navigation" :current-path="currentPath" />
|
|
@@ -292,6 +292,9 @@ declare const __VLS_export: <T = unknown>(__VLS_props: NonNullable<Awaited<typeo
|
|
|
292
292
|
search?: (props: {
|
|
293
293
|
collapsed: boolean;
|
|
294
294
|
}) => unknown;
|
|
295
|
+
'sidebar-top'?: (props: {
|
|
296
|
+
collapsed: boolean;
|
|
297
|
+
}) => unknown;
|
|
295
298
|
sidebar?: (props: {
|
|
296
299
|
collapsed: boolean;
|
|
297
300
|
}) => unknown;
|
package/package.json
CHANGED