@xleddyl/443-components-vue 0.16.53 → 0.16.54
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 +24 -23
- package/README.md +1 -1
- package/dist/components/templates/DashboardLayout.vue +1 -1
- package/dist/components/templates/DashboardLayout.vue.d.ts +1 -0
- package/dist/components/templates/SettingsModal.vue +7 -1
- package/dist/components/templates/SettingsModal.vue.d.ts +1 -0
- package/dist/styles/templates/settings-modal.css +28 -0
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -108,6 +108,7 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
|
|
|
108
108
|
| Breadcrumbs only | `Breadcrumbs` |
|
|
109
109
|
| Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
|
|
110
110
|
| Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
|
|
111
|
+
| Tabs in a settings section header, like a drawer | `#tabs-<id>` on `SettingsModal`, `#settings-tabs-<id>` on `DashboardLayout`: put a `Tabs` `variant="underline"` `size="sm"` in it |
|
|
111
112
|
| Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })` |
|
|
112
113
|
| Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
|
|
113
114
|
| Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages |
|
|
@@ -219,7 +220,7 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
219
220
|
| `Avatar` | User picture with initials fallback and status dot. | Props: `src`, `name`, `alt`, `size` (xs to xl), `shape` (circle, square), `status` (online, away, busy, offline), `decorative`. Slot: `fallback`. | `data/avatar.vue` |
|
|
220
221
|
| `AvatarGroup` | Overlapping stack of avatars with "+N". | Props: `items` (`src`, `name`, `alt`), `max`, `size`, `shape`, `moreLabel`. | `data/avatar.vue` |
|
|
221
222
|
| `Stat` | Key figure (KPI) with unit, delta, trend, hint and optional sparkline. Can be a link. | Props: `label`, `value`, `unit`, `delta`, `trend` (up, down, flat), `invert` (down is good), `hint`, `icon`, `loading`, `to`, `href`, `plain`. Slots: `label`, `value`, `icon`, `sparkline`, `footer`. | `data/stat.vue` |
|
|
222
|
-
| `RecordList` | Short list of records (settings, users, tokens): title, badge, description, leading and action slots, `SkeletonList` while `loading`, empty state. | Props: `items` (`RecordListItem`: `id`, `title`, `description`, `badge` `{ label, tone }`), `loading`, `avatar`, `action`, `label`, `skeletonRows`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Slots: `leading`, `action` (`{ item }`), `empty`, `empty-actions` (buttons in the default empty state).
|
|
223
|
+
| `RecordList` | Short list of records (settings, users, tokens): title, badge, description, leading and action slots, `SkeletonList` while `loading`, empty state. | Props: `items` (`RecordListItem`: `id`, `title`, `description`, `badge` `{ label, tone }`), `loading`, `avatar`, `action`, `label`, `skeletonRows`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Slots: `leading`, `action` (`{ item }`), `empty`, `empty-actions` (buttons in the default empty state). | `data/record-list.vue` |
|
|
223
224
|
| `DescriptionList` | Label and value pairs for a record. Use it on detail views. | Props: `items` (`key`, `label`, `value`, `hint`), `layout` (stacked, inline, grid), `columns`, `divided`, `emptyText`. Slots: `term`, `value`, `value-<key>`. | `data/description-list.vue` |
|
|
224
225
|
| `Timeline` | Vertical list of events or activity. | Props: `items` (`title`, `description`, `time`, `datetime`, `icon`, `tone`), `compact`. Slot: `item`. | `data/timeline.vue` |
|
|
225
226
|
| `Tree` | Expandable hierarchy with selection, drag to reorder and nesting. | Models: `v-model:expanded`, `v-model:selected`. Props: `nodes` (`id`, `label`, `description`, `meta`, `icon`, `children`, `disabled`), `selectable`, `reorderable`, `nestable`, `moveButtons` (default `true`; `false` hides the row arrows, drag and Alt+arrow keys still work), `canDrop`, `size`, `checkmark`, `emptyText`. Slots: `label`, `meta`, `empty`. Events: `select`, `move`. | `data/tree.vue` |
|
|
@@ -264,28 +265,28 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
264
265
|
|
|
265
266
|
Templates combine core parts into whole pages and layouts. Start from them for new pages.
|
|
266
267
|
|
|
267
|
-
| Component | Purpose and when to use it | Main props, models, slots, events
|
|
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-start`, `settings-account-fields`, `settings-section-<id>`, `settings-actions-<id>`. Event: `accountSelect`. | `templates/dashboard-layout.vue` |
|
|
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`.
|
|
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`.
|
|
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`.
|
|
273
|
-
| `ListPage` | Whole list page: header, search, filters, table, pagination, bulk actions, loading, empty, no results and error states. Client or server mode (`total`). | Models: `page`, `pageSize`, `search`, `filter`, `sort`, `selected`. Props: `title`, `rows`, `columns`, `rowKey`, `rowTo`, `selectable`, `loading`, `error`, `total`, `paginate`, `searchable`, `searchKeys`, `filters`, `filterKey`, `filterMultiple`, `emptyTitle`. Slots: `actions`, `toolbar`, `toolbar-end`, `bulk`, `empty`, `empty-actions`, `no-results`, `error`, `cell-<key>`, `table`. Events: `retry`, `clear`, `rowClick`.
|
|
274
|
-
| `DetailPage` | Record page: back link, title, status, actions, tabs, main column and aside with description lists. | Model: `v-model:tab`. Props: `title`, `backTo`, `backLabel`, `status` (`label`, `tone`, `dot`), `tabs`, `sections` (`title`, `items`), `loading`, `error`. Slots: default, `actions`, `badge`, `meta`, `aside`, `aside-before`, `panel-<value>`.
|
|
275
|
-
| `FormDrawer` | Drawer with a form: `Form` around the body, footer with delete (left), cancel and submit, a discard confirmation on close when the form is dirty, `SkeletonForm` while `loading`. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side`, `size`, `fill` (per tab, for a full height table), `tabs` (`FormDrawerTab`: `fields` gives the error dot and opens the tab on a failed submit), `tabRoute` (keeps the tab in the hash under this key), `trail`, `backLabel`, `form`, `loading`, `readonly`, `creating` (submit says Create, no dirty needed), `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `guard`, `guardTitle`, `guardMessage`, `beforeClose`, `onCancel`. Slots: default (`{ tab }`), `actions`, `title-trailing`, `skeleton`, `footer`. Events: `delete`, `navigate`, `afterLeave`. Exposes `confirmDiscard()`, `close()`.
|
|
276
|
-
| `FormPage` | Form page: header, cards in a `Form`, sticky submit and cancel footer, dirty guard. | Props: `title`, `backTo`, `form` (from `useForm`), `dirty`, `saving`, `guard`, `requireDirty`, `submitLabel`, `cancelLabel`, `cancelTo`, `width`, `sticky`. Slots: default, `actions`, `footer`, `status`. Events: `submit`, `submitted`, `invalid`, `reset`, `cancel`.
|
|
277
|
-
| `DashboardPage` | Overview page: header, stat grid, content grid. | Props: `title`, `eyebrow`, `description`, `stats` (`PageStat[]`), `statsColumns`, `columns`, `loading`. Slots: default, `actions`, `stats`, `sparkline`, `before`, `after`, `eyebrow`.
|
|
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`.
|
|
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`.
|
|
280
|
-
| `SettingsGroup` | Block with label, description and actions inside a settings section. | Props: `label`, `description`, `level`, `row`. Slots: default, `label`, `description`, `actions`.
|
|
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`.
|
|
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`.
|
|
283
|
-
| `SaveBar` | Floating bar with save and discard for unsaved changes. | Props: `visible`, `saving`, `message`, `saveLabel`, `discardLabel`, `form`. Slots: default, `actions`. Events: `save`, `discard`.
|
|
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`.
|
|
285
|
-
| `ErrorPage` | Error screen. Reads a Nuxt `error`. Use it in `app/error.vue`. | Props: `error`, `statusCode`, `title`, `message`, `homeTo`, `homeLabel`, `retryLabel`, `brandName`, `fill`, `onHome`, `onRetry`. Slots: default, `title`, `message`, `actions`, `brand`.
|
|
286
|
-
| `NotFoundPage` | 404 screen. | Props: `title`, `message`, `homeTo`, `homeLabel`, `backLabel`, `brandName`, `fill`, `onHome`. Slots: default, `actions`, `brand`.
|
|
287
|
-
| `Brand` | Logo and name block (image URL, inline SVG or component). | Props: `name`, `subtitle`, `icon`, `logo`, `to`, `size`, `accent`, `hideText`, `showName`. Slots: default, `logo`, `mark`, `subtitle`.
|
|
288
|
-
| `AccountMenu` | Account button with avatar, name and a dropdown menu. Used by `DashboardLayout`. | Props: `name`, `email`, `avatar`, `menu` (menu items), `placement`, `icon`. Event: `select`.
|
|
268
|
+
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
269
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
|
270
|
+
| `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>`, `settings-tabs-<id>`. Event: `accountSelect`. | `templates/dashboard-layout.vue` |
|
|
271
|
+
| `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` |
|
|
272
|
+
| `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` |
|
|
273
|
+
| `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` |
|
|
274
|
+
| `ListPage` | Whole list page: header, search, filters, table, pagination, bulk actions, loading, empty, no results and error states. Client or server mode (`total`). | Models: `page`, `pageSize`, `search`, `filter`, `sort`, `selected`. Props: `title`, `rows`, `columns`, `rowKey`, `rowTo`, `selectable`, `loading`, `error`, `total`, `paginate`, `searchable`, `searchKeys`, `filters`, `filterKey`, `filterMultiple`, `emptyTitle`. Slots: `actions`, `toolbar`, `toolbar-end`, `bulk`, `empty`, `empty-actions`, `no-results`, `error`, `cell-<key>`, `table`. Events: `retry`, `clear`, `rowClick`. | `templates/list-page.vue` |
|
|
275
|
+
| `DetailPage` | Record page: back link, title, status, actions, tabs, main column and aside with description lists. | Model: `v-model:tab`. Props: `title`, `backTo`, `backLabel`, `status` (`label`, `tone`, `dot`), `tabs`, `sections` (`title`, `items`), `loading`, `error`. Slots: default, `actions`, `badge`, `meta`, `aside`, `aside-before`, `panel-<value>`. | `templates/detail-page.vue` |
|
|
276
|
+
| `FormDrawer` | Drawer with a form: `Form` around the body, footer with delete (left), cancel and submit, a discard confirmation on close when the form is dirty, `SkeletonForm` while `loading`. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side`, `size`, `fill` (per tab, for a full height table), `tabs` (`FormDrawerTab`: `fields` gives the error dot and opens the tab on a failed submit), `tabRoute` (keeps the tab in the hash under this key), `trail`, `backLabel`, `form`, `loading`, `readonly`, `creating` (submit says Create, no dirty needed), `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `guard`, `guardTitle`, `guardMessage`, `beforeClose`, `onCancel`. Slots: default (`{ tab }`), `actions`, `title-trailing`, `skeleton`, `footer`. Events: `delete`, `navigate`, `afterLeave`. Exposes `confirmDiscard()`, `close()`. | `templates/form-drawer.vue` |
|
|
277
|
+
| `FormPage` | Form page: header, cards in a `Form`, sticky submit and cancel footer, dirty guard. | Props: `title`, `backTo`, `form` (from `useForm`), `dirty`, `saving`, `guard`, `requireDirty`, `submitLabel`, `cancelLabel`, `cancelTo`, `width`, `sticky`. Slots: default, `actions`, `footer`, `status`. Events: `submit`, `submitted`, `invalid`, `reset`, `cancel`. | `templates/form-page.vue` |
|
|
278
|
+
| `DashboardPage` | Overview page: header, stat grid, content grid. | Props: `title`, `eyebrow`, `description`, `stats` (`PageStat[]`), `statsColumns`, `columns`, `loading`. Slots: default, `actions`, `stats`, `sparkline`, `before`, `after`, `eyebrow`. | `templates/dashboard-page.vue` |
|
|
279
|
+
| `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` |
|
|
280
|
+
| `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` |
|
|
281
|
+
| `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` |
|
|
282
|
+
| `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), `tabs-<id>` (tabs at the bottom of the header, like a drawer), `account-start` (above the profile card), `account-fields`. | `templates/settings-modal.vue` |
|
|
283
|
+
| `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) |
|
|
284
|
+
| `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` |
|
|
285
|
+
| `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` |
|
|
286
|
+
| `ErrorPage` | Error screen. Reads a Nuxt `error`. Use it in `app/error.vue`. | Props: `error`, `statusCode`, `title`, `message`, `homeTo`, `homeLabel`, `retryLabel`, `brandName`, `fill`, `onHome`, `onRetry`. Slots: default, `title`, `message`, `actions`, `brand`. | `templates/error-page.vue` |
|
|
287
|
+
| `NotFoundPage` | 404 screen. | Props: `title`, `message`, `homeTo`, `homeLabel`, `backLabel`, `brandName`, `fill`, `onHome`. Slots: default, `actions`, `brand`. | `templates/error-page.vue` |
|
|
288
|
+
| `Brand` | Logo and name block (image URL, inline SVG or component). | Props: `name`, `subtitle`, `icon`, `logo`, `to`, `size`, `accent`, `hideText`, `showName`. Slots: default, `logo`, `mark`, `subtitle`. | `templates/dashboard-layout.vue` |
|
|
289
|
+
| `AccountMenu` | Account button with avatar, name and a dropdown menu. Used by `DashboardLayout`. | Props: `name`, `email`, `avatar`, `menu` (menu items), `placement`, `icon`. Event: `select`. | `templates/dashboard-layout.vue` |
|
|
289
290
|
|
|
290
291
|
Nuxt ready layouts: with `k: { layouts: true }` the module registers the layouts `k-dashboard` and `k-auth`. They read brand, navigation, account and settings from `app.config.ts` (`k` key). `useDashboard()` gives the runtime account, breadcrumbs and badges for `k-dashboard`. See README, section "Nuxt: ready layouts".
|
|
291
292
|
|
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>`, `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`.
|
|
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-tabs-<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
|
|
|
@@ -259,7 +259,7 @@ const hasSidebarFooter = computed(
|
|
|
259
259
|
const hasSettings = computed(
|
|
260
260
|
() => props.accountAction === "settings" && Boolean(props.account || props.settingsSections)
|
|
261
261
|
);
|
|
262
|
-
const SETTINGS_SLOT_PATTERN = /^settings-(section|actions)-./;
|
|
262
|
+
const SETTINGS_SLOT_PATTERN = /^settings-(section|actions|tabs)-./;
|
|
263
263
|
const settingsSlots = computed(
|
|
264
264
|
() => Object.keys(slots).filter((name) => SETTINGS_SLOT_PATTERN.test(name)).map((name) => ({
|
|
265
265
|
source: name,
|
|
@@ -334,6 +334,7 @@ declare const __VLS_export: <T = unknown>(__VLS_props: NonNullable<Awaited<typeo
|
|
|
334
334
|
} & {
|
|
335
335
|
[key: `settings-section-${string}`]: ((props: SettingsSectionSlotProps) => unknown) | undefined;
|
|
336
336
|
[key: `settings-actions-${string}`]: ((props: SettingsSectionSlotProps) => unknown) | undefined;
|
|
337
|
+
[key: `settings-tabs-${string}`]: ((props: SettingsSectionSlotProps) => unknown) | undefined;
|
|
337
338
|
};
|
|
338
339
|
emit: ((evt: "accountSelect", item: MenuItem, event: Event) => void) & (((event: "update:open", value: boolean) => void) & ((event: "update:collapsed", value: boolean) => void) & ((event: "update:settingsOpen", value: boolean) => void) & ((event: "update:settingsSection", value: string | undefined) => void));
|
|
339
340
|
}>) => import("vue").VNode & {
|
|
@@ -96,7 +96,10 @@
|
|
|
96
96
|
class="k-settings-modal-content"
|
|
97
97
|
:aria-labelledby="`${baseId}-title`"
|
|
98
98
|
>
|
|
99
|
-
<header
|
|
99
|
+
<header
|
|
100
|
+
class="k-settings-modal-header"
|
|
101
|
+
:class="{ 'has-tabs': !!$slots[`tabs-${active.id}`] }"
|
|
102
|
+
>
|
|
100
103
|
<div class="k-settings-modal-heading">
|
|
101
104
|
<h2 :id="`${baseId}-title`" class="k-settings-modal-title">
|
|
102
105
|
<template v-if="currentPage">
|
|
@@ -136,6 +139,9 @@
|
|
|
136
139
|
</Button>
|
|
137
140
|
<slot :name="`actions-${active.id}`" v-bind="slotProps(active, close)" />
|
|
138
141
|
</div>
|
|
142
|
+
<div v-if="$slots[`tabs-${active.id}`]" class="k-settings-modal-tabs">
|
|
143
|
+
<slot :name="`tabs-${active.id}`" v-bind="slotProps(active, close)" />
|
|
144
|
+
</div>
|
|
139
145
|
</header>
|
|
140
146
|
<div
|
|
141
147
|
ref="contentBody"
|
|
@@ -14,6 +14,7 @@ type __VLS_Slots = {
|
|
|
14
14
|
} & {
|
|
15
15
|
[key: `section-${string}`]: ((props: SettingsSectionSlotProps) => unknown) | undefined;
|
|
16
16
|
[key: `actions-${string}`]: ((props: SettingsSectionSlotProps) => unknown) | undefined;
|
|
17
|
+
[key: `tabs-${string}`]: ((props: SettingsSectionSlotProps) => unknown) | undefined;
|
|
17
18
|
};
|
|
18
19
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
19
20
|
sections?: SettingsModalSection[];
|
|
@@ -155,6 +155,21 @@
|
|
|
155
155
|
padding: 1.25rem 1.5rem 0.875rem;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
.k-settings-modal-header.has-tabs {
|
|
159
|
+
row-gap: 0.5rem;
|
|
160
|
+
padding-bottom: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.k-settings-modal-tabs {
|
|
164
|
+
flex: 1 0 100%;
|
|
165
|
+
margin-inline: -1.5rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.k-settings-modal-tabs > .k-tabs > .k-tabs-list,
|
|
169
|
+
.k-settings-modal-tabs > .k-tabs-list {
|
|
170
|
+
padding-inline: 1rem 1.5rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
158
173
|
.k-settings-modal-heading {
|
|
159
174
|
display: flex;
|
|
160
175
|
flex: 1 1 14rem;
|
|
@@ -515,6 +530,19 @@
|
|
|
515
530
|
padding: 1rem 1rem 0.75rem;
|
|
516
531
|
}
|
|
517
532
|
|
|
533
|
+
.k-settings-modal-header.has-tabs {
|
|
534
|
+
padding-bottom: 0;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.k-settings-modal-tabs {
|
|
538
|
+
margin-inline: -1rem;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.k-settings-modal-tabs > .k-tabs > .k-tabs-list,
|
|
542
|
+
.k-settings-modal-tabs > .k-tabs-list {
|
|
543
|
+
padding-inline: 0.5rem 1rem;
|
|
544
|
+
}
|
|
545
|
+
|
|
518
546
|
.k-settings-modal-body {
|
|
519
547
|
padding: 1.375rem 1rem 1rem;
|
|
520
548
|
}
|
package/package.json
CHANGED