adminforth 4.2.0 → 4.3.1
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.
|
@@ -51,6 +51,10 @@ not wait for a follow-up prompt about styling or dark mode.
|
|
|
51
51
|
8. **Never build Tailwind class names dynamically.** `custom/` is copied into the SPA sources and scanned
|
|
52
52
|
statically by Tailwind, so `` `text-${color}-600` `` produces no CSS. Write full class strings and pick
|
|
53
53
|
between them.
|
|
54
|
+
9. **Layouts follow their container, not the screen.** The sidebar and the agent panel take part of the
|
|
55
|
+
screen, so a page or panel which splits into columns is a Tailwind size container: `@container` on its
|
|
56
|
+
root and `@md:`, `@4xl:` variants on the grid instead of `md:`, `lg:`. Give the grid `grid-cols-1` as its
|
|
57
|
+
base, otherwise a wide chart or table stretches the single column past the page.
|
|
54
58
|
|
|
55
59
|
## Dark Theme Self-Check
|
|
56
60
|
|
|
@@ -121,9 +125,11 @@ custom/
|
|
|
121
125
|
|
|
122
126
|
```vue
|
|
123
127
|
<template>
|
|
124
|
-
<section class="
|
|
125
|
-
<
|
|
126
|
-
|
|
128
|
+
<section class="@container">
|
|
129
|
+
<div class="grid grid-cols-1 gap-4 @2xl:grid-cols-2">
|
|
130
|
+
<OrdersTotals :record="record" />
|
|
131
|
+
<OrdersFilters :meta="meta" />
|
|
132
|
+
</div>
|
|
127
133
|
</section>
|
|
128
134
|
</template>
|
|
129
135
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="md:flex">
|
|
3
|
-
<div :class="mergeClasses('
|
|
2
|
+
<div class="afcl-vertical-tabs md:flex">
|
|
3
|
+
<div :class="mergeClasses('afcl-vertical-tabs-list mb-4 md:mb-0 md:me-6 md:self-start md:min-w-[11rem] p-1 rounded-lg border border-lightCardBorder bg-lightCardBackground dark:border-darkCardBorder dark:bg-darkCardBackground', tabsClass)">
|
|
4
4
|
<slot name="tabs-header"></slot>
|
|
5
5
|
<ul class="space-y-0.5 text-sm">
|
|
6
6
|
<li v-for="tab in tabs" :key="`${tab}-tab-controll`">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</li>
|
|
20
20
|
</ul>
|
|
21
21
|
</div>
|
|
22
|
-
<div :class="mergeClasses('
|
|
22
|
+
<div :class="mergeClasses('afcl-vertical-tabs-content w-full text-sm text-lightVerticalTabsSlotText dark:text-darkVerticalTabsSlotText', contentClass)">
|
|
23
23
|
<slot :name="activeTab"></slot>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
@@ -35,7 +35,7 @@ import { mergeClasses } from './classMerge';
|
|
|
35
35
|
const props = withDefaults(defineProps<{
|
|
36
36
|
activeTab?: string;
|
|
37
37
|
hideTabesWhenSingle?: boolean;
|
|
38
|
-
// override the default classes of the tab list column and of the content, e.g.
|
|
38
|
+
// override the default classes of the tab list column and of the content, e.g. margins or the frame of the column
|
|
39
39
|
tabsClass?: ClassNameValue;
|
|
40
40
|
contentClass?: ClassNameValue;
|
|
41
41
|
}>(), {
|
|
@@ -93,15 +93,20 @@
|
|
|
93
93
|
<IconChevronDown :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3 text-lightSidebarIcons dark:text-darkSidebarIcons transition-transform duration-200" aria-hidden="true" />
|
|
94
94
|
</button>
|
|
95
95
|
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
<div class="grid transition-[grid-template-rows,opacity] duration-200 ease-in-out"
|
|
97
|
+
:class="opened.includes(i) ? 'grid-rows-[1fr] opacity-100' : 'grid-rows-[0fr] opacity-0'"
|
|
98
|
+
:inert="!opened.includes(i)"
|
|
99
|
+
>
|
|
100
|
+
<div class="min-h-0 overflow-hidden">
|
|
101
|
+
<ul :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown mt-0.5 ml-[1.25rem] pl-2 border-l border-lightSidebarDevider dark:border-darkSidebarDevider space-y-0.5">
|
|
102
|
+
<template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
|
|
103
|
+
<li class="af-sidebar-menu-link">
|
|
104
|
+
<MenuLink :item="child" isChild="true" @click="$emit('hideSidebar')"/>
|
|
105
|
+
</li>
|
|
106
|
+
</template>
|
|
107
|
+
</ul>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
105
110
|
</li>
|
|
106
111
|
<li v-else class="af-sidebar-menu-link">
|
|
107
112
|
<MenuLink :item="item" @click="$emit('hideSidebar')"/>
|
|
@@ -295,25 +300,6 @@
|
|
|
295
300
|
background-color: rgba(75, 85, 99, 0.4);
|
|
296
301
|
}
|
|
297
302
|
|
|
298
|
-
/* Custom animation for dropdown */
|
|
299
|
-
.slow-drop-enter-active,
|
|
300
|
-
.slow-drop-leave-active {
|
|
301
|
-
overflow: hidden;
|
|
302
|
-
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.slow-drop-enter-from,
|
|
306
|
-
.slow-drop-leave-to {
|
|
307
|
-
opacity: 0;
|
|
308
|
-
transform: translateY(-4px);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.slow-drop-enter-to,
|
|
312
|
-
.slow-drop-leave-from {
|
|
313
|
-
opacity: 1;
|
|
314
|
-
transform: translateY(0);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
303
|
/* For browsers that support overlay scrollbars natively */
|
|
318
304
|
@supports (overflow: overlay) {
|
|
319
305
|
.sidebar-scroll {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
ref="VerticalTabsRef"
|
|
11
11
|
v-model:active-tab="activeTab"
|
|
12
12
|
class="flex flex-col @4xl:flex-row @4xl:min-h-[40rem] overflow-hidden rounded-xl border border-lightCardBorder bg-lightCardBackground dark:border-darkCardBorder dark:bg-darkCardBackground"
|
|
13
|
-
tabsClass="m-0 md:m-0 @4xl:w-64 shrink-0 px-3 py-4 @4xl:py-5 border-b @4xl:border-b-0 @4xl:border-e border-lightCardBorder dark:border-darkCardBorder bg-lightVerticalTabsBackground dark:bg-darkVerticalTabsBackground"
|
|
14
|
-
contentClass="min-w-0 overflow-x-auto p-6
|
|
13
|
+
tabsClass="m-0 md:m-0 md:self-stretch @4xl:w-64 shrink-0 px-3 py-4 @4xl:py-5 rounded-none border-0 border-b @4xl:border-b-0 @4xl:border-e border-lightCardBorder dark:border-darkCardBorder bg-lightVerticalTabsBackground dark:bg-darkVerticalTabsBackground"
|
|
14
|
+
contentClass="min-w-0 overflow-x-auto p-6"
|
|
15
15
|
@update:active-tab="setURL({slug: $event, pageLabel: ''})"
|
|
16
16
|
>
|
|
17
17
|
<template #tabs-header>
|