@xleddyl/443-components-vue 0.16.46 → 0.16.47
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 +2 -2
- package/README.md +2 -2
- package/dist/components/templates/DashboardLayout.vue +3 -0
- package/dist/components/templates/DashboardLayout.vue.d.ts +4 -0
- package/dist/components/templates/SettingsModal.vue +1 -0
- package/dist/components/templates/SettingsModal.vue.d.ts +4 -0
- package/package.json +1 -1
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-top`, `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-start`, `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` |
|
|
@@ -278,7 +278,7 @@ Templates combine core parts into whole pages and layouts. Start from them for n
|
|
|
278
278
|
| `SettingsPage` | Settings as a page: section nav, panels, floating save bar when `dirty`. | Model: `v-model:section`. Props: `title`, `sections` (`value`, `label`, `icon`, `to`), `dirty`, `saving`, `saveBar`, `form`. Slots: `section-<value>`, `actions`, `nav-footer`. Events: `save`, `discard`. | `templates/settings-page.vue` |
|
|
279
279
|
| `SettingsSection` | Card of one settings section with a save footer. | Props: `title`, `description`, `icon`, `hint`, `saveable`, `saving`, `saveDisabled`, `saveLabel`, `form`. Slots: default, `actions`, `footer`, `hint`. Event: `save`. | `templates/settings-page.vue` |
|
|
280
280
|
| `SettingsGroup` | Block with label, description and actions inside a settings section. | Props: `label`, `description`, `level`, `row`. Slots: default, `label`, `description`, `actions`. | `templates/settings-modal.vue` |
|
|
281
|
-
| `SettingsModal` | Settings dialog with nav, built-in account and appearance sections, your own sections and subpages. | Models: `v-model:open`, `v-model:section`, `v-model:pages`. Props: `sections` (`id`, `label`, `icon`, `group`, `badge`, `to`), `account`, `presets`, `title`, `onSignOut`, `hideSession`, `beforeClose`, `route` (sync with `?settings=<section>/<page>`), `routeLocation` (`'hash'`: `#settings/<section>/<page>`), `accountSection` (id with the built-in account content, default `account`), `resolvePage(section, id, parents)`. Slots: `section-<id>`, `actions-<id>` (right of the header row, also on a subpage), `account-fields`. | `templates/settings-modal.vue` |
|
|
281
|
+
| `SettingsModal` | Settings dialog with nav, built-in account and appearance sections, your own sections and subpages. | Models: `v-model:open`, `v-model:section`, `v-model:pages`. Props: `sections` (`id`, `label`, `icon`, `group`, `badge`, `to`), `account`, `presets`, `title`, `onSignOut`, `hideSession`, `beforeClose`, `route` (sync with `?settings=<section>/<page>`), `routeLocation` (`'hash'`: `#settings/<section>/<page>`), `accountSection` (id with the built-in account content, default `account`), `resolvePage(section, id, parents)`. Slots: `section-<id>`, `actions-<id>` (right of the header row, also on a subpage), `account-start` (above the profile card), `account-fields`. | `templates/settings-modal.vue` |
|
|
282
282
|
| `AppearanceSettings` | Theme (light, dark, system) and preset cards. Used by `SettingsModal`. Use alone in a settings page. | Props: `presets` (list or false), `themes`, `level`. | `presets.vue` (pages root) |
|
|
283
283
|
| `SaveBar` | Floating bar with save and discard for unsaved changes. | Props: `visible`, `saving`, `message`, `saveLabel`, `discardLabel`, `form`. Slots: default, `actions`. Events: `save`, `discard`. | `templates/settings-page.vue` |
|
|
284
284
|
| `EmptyPage` | First run screen with illustration, actions and onboarding steps. | Props: `title`, `description`, `icon`, `actionLabel`, `actionTo`, `onAction`, `secondaryLabel`, `steps` (`title`, `description`, `done`, `to`), `fill`. Slots: default, `illustration`, `title`, `description`, `actions`. | `templates/empty-page.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-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
|
|
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>`, `settings-account-start` 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
|
|
|
@@ -700,7 +700,7 @@ A large dialog (60rem) with a section nav on the left and the content on the rig
|
|
|
700
700
|
```
|
|
701
701
|
|
|
702
702
|
- `sections`: `{ id, label, icon?, group?, description?, badge?, disabled?, to? }`. Consecutive items with the same `group` form a labelled block. `to` renders a link that closes the dialog. Without `sections` you get `account` (when `account` is set) and `appearance`.
|
|
703
|
-
- Built-in sections, used when no `#section-<id>` slot fills them: `account` (profile card, your `#account-fields`, a sign out button) and `appearance` (`AppearanceSettings`: theme cards light, dark, system and preset cards; `presets` limits or hides them).
|
|
703
|
+
- Built-in sections, used when no `#section-<id>` slot fills them: `account` (your `#account-start`, profile card, your `#account-fields`, a sign out button) and `appearance` (`AppearanceSettings`: theme cards light, dark, system and preset cards; `presets` limits or hides them).
|
|
704
704
|
- `@sign-out` adds a Sign out item at the bottom of the nav and in the account section.
|
|
705
705
|
- Labels: `title` (accessible name of the dialog, default `Settings`), `closeLabel`, `navLabel`, `signOutLabel`, `accountLabel`, `accountText`, `appearanceLabel`, `appearanceText`, `sessionLabel`, `sessionText`, `themeLabel`, `themeText`, `presetLabel`, `presetText`.
|
|
706
706
|
- Header actions: `#actions-<id>` renders buttons on the right of the section header row (an "Add user" button), next to the title instead of on a row of its own in the body. It stays there when a subpage is open, so render different actions per page from its `page` prop. When the content is too narrow, the actions wrap under the title. On `DashboardLayout` the slot is `#settings-actions-<id>`.
|
|
@@ -152,6 +152,9 @@
|
|
|
152
152
|
:hide-session="settingsHideSession"
|
|
153
153
|
:resolve-page="settingsResolvePage"
|
|
154
154
|
>
|
|
155
|
+
<template v-if="$slots['settings-account-start']" #account-start="scope">
|
|
156
|
+
<slot name="settings-account-start" v-bind="scope" />
|
|
157
|
+
</template>
|
|
155
158
|
<template v-if="$slots['settings-account-fields']" #account-fields="scope">
|
|
156
159
|
<slot name="settings-account-fields" v-bind="scope" />
|
|
157
160
|
</template>
|
|
@@ -323,6 +323,10 @@ declare const __VLS_export: <T = unknown>(__VLS_props: NonNullable<Awaited<typeo
|
|
|
323
323
|
query: string;
|
|
324
324
|
count: number;
|
|
325
325
|
}) => unknown;
|
|
326
|
+
'settings-account-start'?: (props: {
|
|
327
|
+
account: SettingsModalAccount;
|
|
328
|
+
close: () => void;
|
|
329
|
+
}) => unknown;
|
|
326
330
|
'settings-account-fields'?: (props: {
|
|
327
331
|
account: SettingsModalAccount;
|
|
328
332
|
close: () => void;
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
>
|
|
148
148
|
<slot :name="`section-${active.id}`" v-bind="slotProps(active, close)">
|
|
149
149
|
<template v-if="active.id === accountSection && account">
|
|
150
|
+
<slot name="account-start" :account="account" :close="close" />
|
|
150
151
|
<div class="k-settings-modal-account">
|
|
151
152
|
<Avatar
|
|
152
153
|
:name="account.name"
|
|
@@ -3,6 +3,10 @@ import type { RouteLocation } from '../../internal/layout/query';
|
|
|
3
3
|
import type { DialogBeforeClose } from '../overlays/types';
|
|
4
4
|
import type { SettingsModalAccount, SettingsModalPage, SettingsModalSection, SettingsPageResolver, SettingsSectionSlotProps } from './types';
|
|
5
5
|
type __VLS_Slots = {
|
|
6
|
+
'account-start'?: (props: {
|
|
7
|
+
account: SettingsModalAccount;
|
|
8
|
+
close: () => void;
|
|
9
|
+
}) => unknown;
|
|
6
10
|
'account-fields'?: (props: {
|
|
7
11
|
account: SettingsModalAccount;
|
|
8
12
|
close: () => void;
|
package/package.json
CHANGED