adminforth 4.2.0 → 4.3.0

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="grid gap-4 md:grid-cols-2">
125
- <OrdersTotals :record="record" />
126
- <OrdersFilters :meta="meta" />
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('md:me-4 mb-4 md:mb-0 mr-6 md:mr-0 md:min-w-[11rem]', tabsClass)">
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('w-full md:ps-6 md:border-s md:border-lightFormBorder dark:md:border-darkFormBorder text-sm text-lightVerticalTabsSlotText dark:text-darkVerticalTabsSlotText', contentClass)">
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. paddings or the divider
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
  }>(), {
@@ -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 md:border-s-0"
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",