@xleddyl/443-components-vue 0.9.1 → 0.9.2
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
|
@@ -509,7 +509,7 @@ A large dialog (60rem) with a section nav on the left and the content on the rig
|
|
|
509
509
|
- 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).
|
|
510
510
|
- `@sign-out` adds a Sign out item at the bottom of the nav and in the account section.
|
|
511
511
|
- Labels: `title` (accessible name of the dialog, default `Settings`), `closeLabel`, `navLabel`, `signOutLabel`, `accountLabel`, `accountText`, `appearanceLabel`, `appearanceText`, `sessionLabel`, `sessionText`, `themeLabel`, `themeText`, `presetLabel`, `presetText`.
|
|
512
|
-
- Subpages: `#section-<id>` and `#actions-<id>` get `page`, `pages`, `openPage({ id, label
|
|
512
|
+
- Subpages: `#section-<id>` and `#actions-<id>` get `page`, `pages`, `openPage({ id, label })` and `back()`. With a page open, a breadcrumb from the section to the page shows below the header (the header keeps the section title and description); a click on a breadcrumb goes back to it. `v-model:pages` binds the stack (it also works unbound). Changing section clears it. Render the detail when `page` is set, the list otherwise.
|
|
513
513
|
- `hide-session` hides the Session group (sign out) in the account section; the Sign out item in the nav stays. `beforeClose` works as on Modal.
|
|
514
514
|
- Accessibility: native modal `<dialog>` (focus trap, Escape, focus returns to the trigger), the nav is a labelled `nav` of buttons with `aria-current` and `aria-controls`, the content is a `section` labelled by its heading.
|
|
515
515
|
|
|
@@ -98,22 +98,22 @@
|
|
|
98
98
|
>
|
|
99
99
|
<header class="k-settings-modal-header">
|
|
100
100
|
<div class="k-settings-modal-heading">
|
|
101
|
-
<Breadcrumbs
|
|
102
|
-
v-if="currentPage"
|
|
103
|
-
class="k-settings-modal-breadcrumbs"
|
|
104
|
-
:items="breadcrumbItems"
|
|
105
|
-
/>
|
|
106
101
|
<h2 :id="`${baseId}-title`" class="k-settings-modal-title">
|
|
107
|
-
{{
|
|
102
|
+
{{ active.label }}
|
|
108
103
|
</h2>
|
|
109
|
-
<p v-if="
|
|
110
|
-
{{
|
|
104
|
+
<p v-if="active.description" class="k-settings-modal-description">
|
|
105
|
+
{{ active.description }}
|
|
111
106
|
</p>
|
|
112
107
|
</div>
|
|
113
108
|
<div v-if="$slots[`actions-${active.id}`]" class="k-settings-modal-actions">
|
|
114
109
|
<slot :name="`actions-${active.id}`" v-bind="slotProps(active, close)" />
|
|
115
110
|
</div>
|
|
116
111
|
</header>
|
|
112
|
+
<Breadcrumbs
|
|
113
|
+
v-if="currentPage"
|
|
114
|
+
class="k-settings-modal-breadcrumbs"
|
|
115
|
+
:items="breadcrumbItems"
|
|
116
|
+
/>
|
|
117
117
|
<div
|
|
118
118
|
ref="contentBody"
|
|
119
119
|
class="k-settings-modal-body"
|
|
@@ -267,9 +267,6 @@ const activeId = computed(() => {
|
|
|
267
267
|
});
|
|
268
268
|
const active = computed(() => sectionList.value.find((item) => item.id === activeId.value));
|
|
269
269
|
const currentPage = computed(() => pages.value.at(-1));
|
|
270
|
-
const headingDescription = computed(
|
|
271
|
-
() => currentPage.value ? currentPage.value.description : active.value?.description
|
|
272
|
-
);
|
|
273
270
|
function goTo(depth) {
|
|
274
271
|
pages.value = pages.value.slice(0, depth);
|
|
275
272
|
}
|
|
@@ -162,7 +162,8 @@
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.k-settings-modal-breadcrumbs {
|
|
165
|
-
|
|
165
|
+
flex: none;
|
|
166
|
+
padding: 0 1.5rem 0.75rem;
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
.k-settings-modal-title {
|
|
@@ -477,6 +478,10 @@
|
|
|
477
478
|
padding: 1rem 1rem 0.75rem;
|
|
478
479
|
}
|
|
479
480
|
|
|
481
|
+
.k-settings-modal-breadcrumbs {
|
|
482
|
+
padding-inline: 1rem;
|
|
483
|
+
}
|
|
484
|
+
|
|
480
485
|
.k-settings-modal-body {
|
|
481
486
|
padding: 1rem;
|
|
482
487
|
}
|
package/package.json
CHANGED