@mapomodule/uikit 1.0.0 → 2.0.0-beta.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.
- package/README.md +167 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +18 -0
- package/dist/module.d.cts +2 -0
- package/dist/module.d.mts +2 -0
- package/dist/module.d.ts +2 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +18 -0
- package/dist/types.d.mts +13 -0
- package/package.json +63 -12
- package/src/index.ts +10 -0
- package/src/module.ts +181 -0
- package/src/runtime/assets/main.css +59 -0
- package/src/runtime/components/MapoConfirmDialog.vue +34 -0
- package/src/runtime/components/MapoDetail.vue +861 -0
- package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
- package/src/runtime/components/MapoList.vue +339 -0
- package/src/runtime/components/MapoListActions.vue +152 -0
- package/src/runtime/components/MapoListFilters.vue +289 -0
- package/src/runtime/components/MapoListHead.vue +12 -0
- package/src/runtime/components/MapoListQuickEdit.vue +163 -0
- package/src/runtime/components/MapoListTable.vue +926 -0
- package/src/runtime/components/MapoListTabs.vue +48 -0
- package/src/runtime/components/MapoLogin.vue +209 -0
- package/src/runtime/components/MapoLogoutButton.vue +46 -0
- package/src/runtime/components/MapoRootComponents.vue +9 -0
- package/src/runtime/components/MapoSidebar.vue +112 -0
- package/src/runtime/components/MapoSidebarList.vue +35 -0
- package/src/runtime/components/MapoSidebarListItem.vue +79 -0
- package/src/runtime/components/MapoSidebarProfile.vue +57 -0
- package/src/runtime/components/MapoSnackBar.vue +42 -0
- package/src/runtime/components/MapoThemeToggle.vue +23 -0
- package/src/runtime/components/MapoTopbar.vue +36 -0
- package/src/runtime/layouts/default.vue +53 -0
- package/src/runtime/layouts/empty.vue +9 -0
- package/src/runtime/page-meta.nuxt.d.ts +45 -0
- package/src/runtime/pages/index.vue +14 -0
- package/src/runtime/pages/login.vue +7 -0
- package/src/runtime/types/list.ts +64 -0
- package/CHANGELOG.md +0 -1030
- package/assets/mixins.scss +0 -22
- package/assets/variables.scss +0 -18
- package/components/ConfirmDialog.vue +0 -173
- package/components/Detail/Detail.vue +0 -696
- package/components/Detail/DetailLangSwitch.vue +0 -79
- package/components/DropArea.vue +0 -257
- package/components/Form/Form.vue +0 -218
- package/components/Form/FormField.vue +0 -216
- package/components/Form/FormGroup.vue +0 -146
- package/components/Form/FormTabs.vue +0 -188
- package/components/Form/defaults.js +0 -98
- package/components/Form/fields/ColorField.vue +0 -79
- package/components/Form/fields/DateField.vue +0 -77
- package/components/Form/fields/DateTimeField.vue +0 -271
- package/components/Form/fields/EnhancedMediaField.vue +0 -224
- package/components/Form/fields/FileField.vue +0 -125
- package/components/Form/fields/FksField.vue +0 -115
- package/components/Form/fields/MediaField.vue +0 -159
- package/components/Form/fields/MediaM2mField.vue +0 -149
- package/components/Form/fields/Repeater.vue +0 -618
- package/components/Form/fields/SeoPreview.vue +0 -89
- package/components/Form/fields/TimeField.vue +0 -154
- package/components/Form/fields/mapField/leaflet.injector.js +0 -39
- package/components/Form/fields/mapField/mapField.vue +0 -350
- package/components/Form/fields/wygEditor/defaults.js +0 -25
- package/components/Form/fields/wygEditor/utils/events.js +0 -64
- package/components/Form/fields/wygEditor/utils/mapomedia.plugin.js +0 -32
- package/components/Form/fields/wygEditor/utils/tinymce.injector.js +0 -29
- package/components/Form/fields/wygEditor/wygEditor.vue +0 -285
- package/components/Form/fields/wygEditorCKE/defaults.js +0 -103
- package/components/Form/fields/wygEditorCKE/utils/ckeditor.injector.js +0 -29
- package/components/Form/fields/wygEditorCKE/wygEditorCKE.vue +0 -270
- package/components/LangSwitcher.vue +0 -44
- package/components/List/List.vue +0 -271
- package/components/List/ListActions.vue +0 -164
- package/components/List/ListFilters.vue +0 -372
- package/components/List/ListHead.vue +0 -67
- package/components/List/ListQuickEdit.vue +0 -228
- package/components/List/ListTable.vue +0 -484
- package/components/List/ListTabs.vue +0 -65
- package/components/Login.vue +0 -125
- package/components/Logo.vue +0 -79
- package/components/LogoutButton.vue +0 -54
- package/components/MediaManager/MediaBreadcrumbs.vue +0 -45
- package/components/MediaManager/MediaEditor.vue +0 -340
- package/components/MediaManager/MediaFileChanger.vue +0 -78
- package/components/MediaManager/MediaFolders.vue +0 -287
- package/components/MediaManager/MediaGallery.vue +0 -281
- package/components/MediaManager/MediaManager.vue +0 -159
- package/components/MediaManager/MediaManagerDialog.vue +0 -104
- package/components/MediaManager/MediaPreview.vue +0 -258
- package/components/MediaManager/MediaUploader.vue +0 -163
- package/components/MenuManager/MenuManager.vue +0 -332
- package/components/MenuManager/MenuNodeEditor.vue +0 -270
- package/components/MenuManager/MenuTreeview.vue +0 -237
- package/components/MenuManager/MenuTreeviewNode.vue +0 -208
- package/components/PagePreview.vue +0 -58
- package/components/RootComponents.vue +0 -25
- package/components/SnackBar.vue +0 -69
- package/components/ThemeToggle.vue +0 -13
- package/components/layout/Sidebar/Sidebar.vue +0 -89
- package/components/layout/Sidebar/SidebarList.vue +0 -49
- package/components/layout/Sidebar/SidebarListItem.vue +0 -185
- package/components/layout/Sidebar/SidebarProfile.vue +0 -42
- package/components/layout/Sidebar/SidebarTitle.vue +0 -45
- package/components/layout/Topbar/Topbar.vue +0 -29
- package/components/layout/routebuilder.js +0 -48
- package/defaults/i18n.js +0 -37
- package/defaults/vuetify.js +0 -34
- package/layouts/default.vue +0 -47
- package/layouts/empty.vue +0 -16
- package/module.js +0 -80
- package/pages/index.vue +0 -37
- package/pages/login.vue +0 -10
- package/static/mapo/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/dev/contents.css +0 -35
- package/static/mapo/ckeditor/plugins/image2/dev/image2.html +0 -338
- package/static/mapo/ckeditor/plugins/image2/dialogs/image2.js +0 -557
- package/static/mapo/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
- package/static/mapo/ckeditor/plugins/image2/icons/image.png +0 -0
- package/static/mapo/ckeditor/plugins/image2/lang/af.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ar.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/az.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/bg.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/bn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/bs.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ca.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/cs.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/cy.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/da.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/de-ch.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/de.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/el.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en-au.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en-ca.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en-gb.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/eo.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/es-mx.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/es.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/et.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/eu.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fa.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fi.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fo.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fr-ca.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/gl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/gu.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/he.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/hi.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/hr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/hu.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/id.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/is.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/it.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ja.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ka.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/km.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ko.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ku.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/lt.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/lv.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/mk.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/mn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ms.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/nb.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/nl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/no.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/oc.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/pl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/pt-br.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/pt.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ro.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ru.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/si.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sk.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sq.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sr-latn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sv.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/th.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/tr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/tt.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ug.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/uk.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/vi.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/zh-cn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/zh.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/plugin.js +0 -1798
- package/static/mapo/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/samples/image2.html +0 -68
- package/static/mapo/ckeditor/skins/moono/dev/icons16.png +0 -0
- package/static/mapo/ckeditor/skins/moono/dev/icons16.svg +0 -2374
- package/static/mapo/ckeditor/skins/moono/dev/icons32.png +0 -0
- package/static/mapo/ckeditor/skins/moono/dev/icons32.svg +0 -2722
- package/static/mapo/ckeditor/skins/moono/dev/locations.json +0 -144
- package/static/mapo/ckeditor/skins/moono/dialog.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_gecko.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono/icons.png +0 -0
- package/static/mapo/ckeditor/skins/moono/icons_hidpi.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/anchor.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/arrow.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/spinner.gif +0 -0
- package/static/mapo/ckeditor/skins/moono/readme.md +0 -49
- package/static/mapo/ckeditor/skins/moono/skin.js +0 -10
- package/static/mapo/ckeditor/skins/moono-dark/dialog.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_gecko.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/icons.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/icons_hidpi.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/arrow.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/readme.md +0 -51
- package/static/mapo/ckeditor/skins/moono-dark/skin.js +0 -5
- package/static/mapo/favicon.ico +0 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/content.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/content.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/skin.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +0 -7
- package/translations/en-US.js +0 -177
- package/translations/it-IT.js +0 -180
package/README.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# @mapomodule/uikit
|
|
2
|
+
|
|
3
|
+
The UI shell of Mapo. Provides the admin layout, sidebar, topbar, login page, feedback components, and the **MapoOverride** system for full component replacement.
|
|
4
|
+
|
|
5
|
+
Built on [Nuxt UI v3](https://ui.nuxt.com) + [Tailwind v4](https://tailwindcss.com).
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Typically installed via the meta-package [`mapomodule`](../../mapomodule/). Standalone:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @mapomodule/uikit @nuxt/ui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// nuxt.config.ts — @nuxt/ui MUST come before mapomodule
|
|
17
|
+
export default defineNuxtConfig({
|
|
18
|
+
modules: ["@nuxt/ui", "@mapomodule/uikit"],
|
|
19
|
+
mapoUikit: {
|
|
20
|
+
css: "~/assets/css/theme.css", // optional CSS token override
|
|
21
|
+
ui: { button: { defaultVariants: { color: "primary" } } }, // optional Nuxt UI defaults
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
When installed via `mapomodule`, configure under `mapo.uikit` instead.
|
|
27
|
+
|
|
28
|
+
## What you get
|
|
29
|
+
|
|
30
|
+
### Layouts
|
|
31
|
+
|
|
32
|
+
| Layout | Description |
|
|
33
|
+
| -------------- | ------------------------------------------------------------------------ |
|
|
34
|
+
| `mapo-default` | Full admin shell: collapsible sidebar + topbar + scrollable content area |
|
|
35
|
+
| `mapo-empty` | Bare wrapper — used for the login page |
|
|
36
|
+
|
|
37
|
+
### Components (auto-imported)
|
|
38
|
+
|
|
39
|
+
#### Layout & navigation
|
|
40
|
+
|
|
41
|
+
| Component | Description |
|
|
42
|
+
| --------------------- | ---------------------------------------------------------------------------- |
|
|
43
|
+
| `MapoSidebar` | Collapsible sidebar with mini mode, auto-nav from route meta, footer section |
|
|
44
|
+
| `MapoSidebarList` | Recursive nav tree built from `route.meta.label` / `meta.parent` |
|
|
45
|
+
| `MapoSidebarListItem` | Single nav item with permission filtering and nested collapse |
|
|
46
|
+
| `MapoSidebarProfile` | User profile row (avatar + username + logout) for the sidebar footer |
|
|
47
|
+
| `MapoTopbar` | Top bar with drawer toggle and left/default/right slots |
|
|
48
|
+
| `MapoThemeToggle` | Dark/light mode toggle via `useColorMode()` — drop-in for any slot |
|
|
49
|
+
| `MapoLogoutButton` | Standalone logout button with `variant`, `color`, `size`, `iconOnly` props |
|
|
50
|
+
|
|
51
|
+
#### Feedback
|
|
52
|
+
|
|
53
|
+
| Component | Description |
|
|
54
|
+
| -------------------- | --------------------------------------------------------- |
|
|
55
|
+
| `MapoLogin` | Split-panel login form; slots: `brand`, `panel`, `footer` |
|
|
56
|
+
| `MapoSnackBar` | Imperative snackbar driven by `useSnackStore` |
|
|
57
|
+
| `MapoConfirmDialog` | Promise-based confirm dialog driven by `useConfirmStore` |
|
|
58
|
+
| `MapoRootComponents` | Mounts `MapoSnackBar` + `MapoConfirmDialog` in the layout |
|
|
59
|
+
|
|
60
|
+
#### List engine
|
|
61
|
+
|
|
62
|
+
| Component | Description |
|
|
63
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| `MapoList` | Full list shell: composes head, filters, actions, tabs, table, and quick-edit. URL state (page, sort, search, filters, tab) synced automatically. |
|
|
65
|
+
| `MapoListHead` | Title, search bar, and primary action button row |
|
|
66
|
+
| `MapoListFilters` | Filter panel driven by `FilterDescriptor[]`. v1 backend contract (`key=v1,v2`); per-filter override slots (`filter.{value}` / `.title` / `.content` / `.icon`) |
|
|
67
|
+
| `MapoListActions` | Bulk-action toolbar (delete, reorder) — appears on selection. Supports `ActionDescriptor.dangerous` to render Apply/confirm with error styling for destructive actions. |
|
|
68
|
+
| `MapoListTabs` | Tabbed status filter via `meta.tabs` |
|
|
69
|
+
| `MapoListTable` | Data table with server-side pagination, sort, selection, and whole-row drag reorder (drop-line feedback; auto-disabled while a search/sort is active). Pass `permissionModel` to gate edit/delete row actions. |
|
|
70
|
+
| `MapoListQuickEdit` | Quick-edit modal driven by the same `FieldDescriptor[]` as the detail form |
|
|
71
|
+
|
|
72
|
+
#### Detail shell
|
|
73
|
+
|
|
74
|
+
| Component | Description |
|
|
75
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
76
|
+
| `MapoDetail` | Two-column detail shell: `useCrud` lifecycle, differential PATCH, error mapping, draft auto-save (`:draft="true"`). Supports permission gating (`permissionModel`), multipart control (`multipart`), live preview (`previewField`), and backend-derived languages (`forceLanguages`). |
|
|
77
|
+
| `MapoDetailLangSwitch` | Language tabs with per-language error badge — syncs the `?lang=` query param |
|
|
78
|
+
|
|
79
|
+
### Layout slots (`mapo-default`)
|
|
80
|
+
|
|
81
|
+
| Slot | Renders in |
|
|
82
|
+
| -------------------- | ---------------------------------------------------- |
|
|
83
|
+
| `sidebar:logo` | Sidebar header — replaces the default logo/name link |
|
|
84
|
+
| `sidebar:nav-top` | Above the auto-generated nav list |
|
|
85
|
+
| `sidebar:nav-bottom` | Below the nav list, above the footer row |
|
|
86
|
+
| `sidebar:footer` | Replaces the user avatar + logout row |
|
|
87
|
+
| `topbar:left` | Immediately after the drawer toggle button |
|
|
88
|
+
| `topbar` | Center area of the topbar (flex-1) |
|
|
89
|
+
| `topbar:right` | Right cluster of the topbar |
|
|
90
|
+
|
|
91
|
+
## Theming
|
|
92
|
+
|
|
93
|
+
### ① CSS token override
|
|
94
|
+
|
|
95
|
+
Pass a CSS file via `mapo.uikit.css`. It is loaded **after** the base uikit CSS so your values always win:
|
|
96
|
+
|
|
97
|
+
```css
|
|
98
|
+
/* assets/css/theme.css */
|
|
99
|
+
@import "tailwindcss";
|
|
100
|
+
@import "@nuxt/ui";
|
|
101
|
+
|
|
102
|
+
:root {
|
|
103
|
+
--color-primary-500: oklch(0.59 0.25 290); /* violet */
|
|
104
|
+
--ui-radius: var(--radius-lg);
|
|
105
|
+
--ui-bg: var(--color-neutral-50);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.dark {
|
|
109
|
+
--ui-bg: var(--color-neutral-950);
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### ② Nuxt UI component defaults
|
|
114
|
+
|
|
115
|
+
Pass a partial Nuxt UI config via `mapo.uikit.ui`. Deep-merged into `nuxt.options.ui`:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
mapo: {
|
|
119
|
+
uikit: {
|
|
120
|
+
ui: {
|
|
121
|
+
button: { defaultVariants: { color: "primary", variant: "solid" } },
|
|
122
|
+
card: { slots: { root: "rounded-xl shadow-md" } },
|
|
123
|
+
input: { defaultVariants: { variant: "outline" } },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## MapoOverride — component replacement
|
|
130
|
+
|
|
131
|
+
Create a file in `app/mapooverride/` matching any Mapo component name to replace it entirely at build time:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
app/
|
|
135
|
+
└── mapooverride/
|
|
136
|
+
├── MapoTopbar.vue ← replaces MapoTopbar globally
|
|
137
|
+
├── MapoSidebar.vue
|
|
138
|
+
└── MapoLogin.vue
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The `@mapomodule/uikit` module hooks into Nuxt's `components:extend` and swaps the `filePath` — no imports, no registration needed. Keep props and slots compatible with the original.
|
|
142
|
+
|
|
143
|
+
Overridable components: `MapoTopbar`, `MapoSidebar`, `MapoSidebarList`, `MapoSidebarListItem`, `MapoSidebarProfile`, `MapoLogin`, `MapoLogoutButton`, `MapoThemeToggle`, `MapoSnackBar`, `MapoConfirmDialog`, `MapoRootComponents`, `MapoDetail`, `MapoDetailLangSwitch`, `MapoList`, `MapoListTable`, `MapoListFilters`, `MapoListActions`, `MapoListHead`, `MapoListQuickEdit`.
|
|
144
|
+
|
|
145
|
+
## Dev workflow
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# watch mode — rebuilds dist/ on every src/ change
|
|
149
|
+
pnpm --filter @mapomodule/uikit dev
|
|
150
|
+
|
|
151
|
+
# or from the monorepo root
|
|
152
|
+
pnpm dev:uikit
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Run alongside a demo app:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# terminal 1
|
|
159
|
+
pnpm dev:uikit
|
|
160
|
+
|
|
161
|
+
# terminal 2
|
|
162
|
+
pnpm dev:example-theme # theming demo at http://localhost:3001
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Reference
|
|
166
|
+
|
|
167
|
+
See [docs/uikit/](../../../docs/uikit/) for the full component and theming documentation.
|
package/dist/index.d.cts
ADDED
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createJiti } from "file:///home/runner/work/mapo-new/mapo-new/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs";
|
|
2
|
+
|
|
3
|
+
const jiti = createJiti(import.meta.url, {
|
|
4
|
+
"interopDefault": true,
|
|
5
|
+
"alias": {
|
|
6
|
+
"@mapomodule/uikit": "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit"
|
|
7
|
+
},
|
|
8
|
+
"transformOptions": {
|
|
9
|
+
"babel": {
|
|
10
|
+
"plugins": []
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
/** @type {import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.js")} */
|
|
16
|
+
const _module = await jiti.import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/index.ts");
|
|
17
|
+
|
|
18
|
+
export default _module?.default ?? _module;
|
package/dist/module.d.ts
ADDED
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createJiti } from "file:///home/runner/work/mapo-new/mapo-new/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs";
|
|
2
|
+
|
|
3
|
+
const jiti = createJiti(import.meta.url, {
|
|
4
|
+
"interopDefault": true,
|
|
5
|
+
"alias": {
|
|
6
|
+
"@mapomodule/uikit": "/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit"
|
|
7
|
+
},
|
|
8
|
+
"transformOptions": {
|
|
9
|
+
"babel": {
|
|
10
|
+
"plugins": []
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
/** @type {import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.js")} */
|
|
16
|
+
const _module = await jiti.import("/home/runner/work/mapo-new/mapo-new/packages/@mapomodule/uikit/src/module.ts");
|
|
17
|
+
|
|
18
|
+
export default _module?.default ?? _module;
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ModuleHooks, ModuleRuntimeHooks, ModuleRuntimeConfig, ModulePublicRuntimeConfig } from './module.mjs'
|
|
2
|
+
|
|
3
|
+
declare module '#app' {
|
|
4
|
+
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module '@nuxt/schema' {
|
|
8
|
+
interface NuxtHooks extends ModuleHooks {}
|
|
9
|
+
interface RuntimeConfig extends ModuleRuntimeConfig {}
|
|
10
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export * from "./module.mjs"
|
package/package.json
CHANGED
|
@@ -1,19 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/uikit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
|
+
"description": "Mapo UI components: Sidebar, Topbar, Login, SnackBar, ConfirmDialog, List, Detail, Media",
|
|
5
|
+
"type": "module",
|
|
4
6
|
"license": "MIT",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"repository":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
7
|
+
"author": "Lotrek Agency (https://lotrek.it)",
|
|
8
|
+
"homepage": "https://lotrekagency.github.io/mapo-new/",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/lotrekagency/mapo-new.git",
|
|
12
|
+
"directory": "packages/@mapomodule/uikit"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/lotrekagency/mapo-new/issues"
|
|
14
16
|
},
|
|
15
17
|
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
18
|
+
"access": "public",
|
|
19
|
+
"tag": "next"
|
|
20
|
+
},
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/module.d.mts",
|
|
24
|
+
"import": "./dist/module.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./types": {
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"import": "./dist/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./runtime/*": {
|
|
31
|
+
"types": "./src/runtime/*.ts",
|
|
32
|
+
"import": "./dist/runtime/*.js",
|
|
33
|
+
"default": "./src/runtime/*"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"src"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "nuxt-module-build build && vue-tsc -p tsconfig.build-types.json && node ../../../scripts/clean-empty-vue-dts.mjs dist",
|
|
42
|
+
"dev": "nuxt-module-build build --stub --watch",
|
|
43
|
+
"prepare": "nuxt-module-build build --stub",
|
|
44
|
+
"dev:prepare": "nuxt-module-build build --stub",
|
|
45
|
+
"typecheck": "vue-tsc --noEmit",
|
|
46
|
+
"lint": "eslint src"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@mapomodule/form": "2.0.0-beta.1",
|
|
50
|
+
"@mapomodule/store": "2.0.0-beta.1",
|
|
51
|
+
"@mapomodule/utils": "2.0.0-beta.1",
|
|
52
|
+
"@mapomodule/core": "2.0.0-beta.1"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@nuxt/ui": ">=4.0.0",
|
|
56
|
+
"nuxt": ">=4.0.0"
|
|
17
57
|
},
|
|
18
|
-
"
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@nuxt/kit": "4.4.2",
|
|
60
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
61
|
+
"@nuxt/schema": "4.4.2",
|
|
62
|
+
"tailwindcss": "^4.0.0",
|
|
63
|
+
"@nuxt/ui": "^4.7.0",
|
|
64
|
+
"@tanstack/vue-table": "^8.21.3",
|
|
65
|
+
"nuxt": "^4.4.2",
|
|
66
|
+
"vue": "^3.5.32",
|
|
67
|
+
"vue-router": "^5.0.4",
|
|
68
|
+
"vue-tsc": "^3.3.4"
|
|
69
|
+
}
|
|
19
70
|
}
|
package/src/index.ts
ADDED
package/src/module.ts
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import {
|
|
4
|
+
defineNuxtModule,
|
|
5
|
+
addComponent,
|
|
6
|
+
addLayout,
|
|
7
|
+
addTypeTemplate,
|
|
8
|
+
createResolver,
|
|
9
|
+
extendPages,
|
|
10
|
+
} from "@nuxt/kit";
|
|
11
|
+
import type { NuxtModule } from "@nuxt/schema";
|
|
12
|
+
|
|
13
|
+
export interface MapoUikitOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Path to a CSS file that is injected after the base uikit CSS.
|
|
16
|
+
* Use it to override Tailwind theme tokens or add global styles.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* nuxt.config.ts
|
|
20
|
+
* mapoUikit: { css: '~/assets/css/theme.css' }
|
|
21
|
+
*
|
|
22
|
+
* assets/css/theme.css
|
|
23
|
+
* @import "@nuxt/ui";
|
|
24
|
+
* :root {
|
|
25
|
+
* --color-primary-500: oklch(0.7 0.2 240);
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
css?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Default Nuxt UI component config merged into nuxt.options.ui.
|
|
32
|
+
* Deep-merged so the consuming app can override individual keys.
|
|
33
|
+
* @see https://ui.nuxt.com/getting-started/theme
|
|
34
|
+
*/
|
|
35
|
+
ui?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default defineNuxtModule<MapoUikitOptions>({
|
|
39
|
+
meta: {
|
|
40
|
+
name: "@mapomodule/uikit",
|
|
41
|
+
configKey: "mapoUikit",
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
defaults: {
|
|
45
|
+
ui: {},
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
// @nuxt/ui must be declared BEFORE mapomodule in the consuming app's modules[]
|
|
49
|
+
// so that @nuxt/icon's Icon component is available in SSR. Installing it via
|
|
50
|
+
// installModule() from inside another module causes an SSR Icon infinite loop.
|
|
51
|
+
moduleDependencies: {
|
|
52
|
+
"@nuxt/ui": {},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
async setup(options, nuxt) {
|
|
56
|
+
const resolver = createResolver(import.meta.url);
|
|
57
|
+
|
|
58
|
+
addTypeTemplate({
|
|
59
|
+
filename: "types/mapo-uikit-page-meta.d.ts",
|
|
60
|
+
getContents: () =>
|
|
61
|
+
readFileSync(
|
|
62
|
+
resolver.resolve("./runtime/page-meta.nuxt.d.ts"),
|
|
63
|
+
"utf-8",
|
|
64
|
+
),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Base CSS: Tailwind v4 entry + Nuxt UI design tokens
|
|
68
|
+
nuxt.options.css.unshift(resolver.resolve("./runtime/assets/main.css"));
|
|
69
|
+
|
|
70
|
+
// Allow Vite to serve files from this package when consumed outside its workspace root
|
|
71
|
+
nuxt.options.vite.server ??= {};
|
|
72
|
+
nuxt.options.vite.server.fs ??= {};
|
|
73
|
+
nuxt.options.vite.server.fs.allow ??= [];
|
|
74
|
+
nuxt.options.vite.server.fs.allow.push(resolver.resolve("."));
|
|
75
|
+
|
|
76
|
+
// Custom theme override CSS (injected after base so it wins)
|
|
77
|
+
if (options.css) {
|
|
78
|
+
nuxt.options.css.push(options.css);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Merge module-level ui config into nuxt.options so consuming apps
|
|
82
|
+
// can override Nuxt UI component defaults from the mapoUikit config key.
|
|
83
|
+
if (options.ui && Object.keys(options.ui).length) {
|
|
84
|
+
// @ts-expect-error — nuxt.options.ui typed by @nuxt/ui augmentation at app build time
|
|
85
|
+
nuxt.options.ui = { ...options.ui, ...(nuxt.options.ui ?? {}) };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const components = [
|
|
89
|
+
"MapoSnackBar",
|
|
90
|
+
"MapoConfirmDialog",
|
|
91
|
+
"MapoLogin",
|
|
92
|
+
"MapoRootComponents",
|
|
93
|
+
"MapoSidebar",
|
|
94
|
+
"MapoSidebarList",
|
|
95
|
+
"MapoSidebarListItem",
|
|
96
|
+
"MapoLogoutButton",
|
|
97
|
+
"MapoSidebarProfile",
|
|
98
|
+
"MapoTopbar",
|
|
99
|
+
"MapoDetail",
|
|
100
|
+
"MapoDetailLangSwitch",
|
|
101
|
+
"MapoList",
|
|
102
|
+
"MapoListHead",
|
|
103
|
+
"MapoListTabs",
|
|
104
|
+
"MapoListFilters",
|
|
105
|
+
"MapoListActions",
|
|
106
|
+
"MapoListQuickEdit",
|
|
107
|
+
"MapoListTable",
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
for (const name of components) {
|
|
111
|
+
addComponent({
|
|
112
|
+
name,
|
|
113
|
+
filePath: resolver.resolve(`./runtime/components/${name}.vue`),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
addLayout(
|
|
118
|
+
{ src: resolver.resolve("./runtime/layouts/default.vue") },
|
|
119
|
+
"mapo-default",
|
|
120
|
+
);
|
|
121
|
+
addLayout(
|
|
122
|
+
{ src: resolver.resolve("./runtime/layouts/empty.vue") },
|
|
123
|
+
"mapo-empty",
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
// Ensure @nuxt/icon bundles lucide icons regardless of hoisting detection.
|
|
127
|
+
// Without this, in monorepo setups pnpm may hoist @iconify-json/lucide to the
|
|
128
|
+
// workspace root and @nuxt/icon fails to detect it as a local package.
|
|
129
|
+
nuxt.hook("modules:done", () => {
|
|
130
|
+
// icon options are typed by @nuxt/icon's NuxtOptions augmentation at app build time.
|
|
131
|
+
// Cast to any to avoid TS errors in the uikit package which doesn't depend on @nuxt/icon directly.
|
|
132
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
133
|
+
const iconOpts = nuxt.options as any;
|
|
134
|
+
iconOpts.icon ??= {};
|
|
135
|
+
iconOpts.icon.serverBundle ??= {};
|
|
136
|
+
const existing: string[] = iconOpts.icon.serverBundle.collections ?? [];
|
|
137
|
+
iconOpts.icon.serverBundle.collections = Array.from(
|
|
138
|
+
new Set([...existing, "lucide"]),
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// MapoOverride* system: if the consuming app has a `mapooverride/` directory
|
|
143
|
+
// inside its srcDir, any .vue file named like a Mapo component will replace it
|
|
144
|
+
// at build time. Convention: MapoTopbar.vue overrides MapoTopbar, etc.
|
|
145
|
+
nuxt.hook("components:extend", (components) => {
|
|
146
|
+
const overrideDir = resolve(nuxt.options.srcDir, "mapooverride");
|
|
147
|
+
if (!existsSync(overrideDir)) return;
|
|
148
|
+
for (const component of components) {
|
|
149
|
+
// Component type from @nuxt/schema doesn't expose name/filePath/shortPath directly
|
|
150
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
151
|
+
const c = component as any;
|
|
152
|
+
const overridePath = resolve(overrideDir, `${c.name}.vue`);
|
|
153
|
+
if (existsSync(overridePath)) {
|
|
154
|
+
c.filePath = overridePath;
|
|
155
|
+
c.shortPath = `mapooverride/${c.name}.vue`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
extendPages((pages) => {
|
|
161
|
+
// Add a catch-all route for the login page that renders the MapoLogin component.
|
|
162
|
+
// This allows the login page to be rendered without requiring the consuming app
|
|
163
|
+
// to create its own login page and route.
|
|
164
|
+
if (!pages.some((p) => p.path === "/login"))
|
|
165
|
+
pages.push({
|
|
166
|
+
name: "mapo-login",
|
|
167
|
+
path: "/login",
|
|
168
|
+
file: resolver.resolve("./runtime/pages/login.vue"),
|
|
169
|
+
meta: { layout: "mapo-empty" },
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
if (!pages.some((p) => p.path === "/"))
|
|
173
|
+
pages.push({
|
|
174
|
+
name: "mapo-index",
|
|
175
|
+
path: "/",
|
|
176
|
+
file: resolver.resolve("./runtime/pages/index.vue"),
|
|
177
|
+
meta: { layout: "mapo-default" },
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
}) satisfies NuxtModule<MapoUikitOptions>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "@nuxt/ui";
|
|
3
|
+
|
|
4
|
+
/* Explicitly scan uikit Vue sources so Tailwind v4 generates their utility classes
|
|
5
|
+
even when the package is resolved through node_modules symlinks. */
|
|
6
|
+
@source "../components/**/*.vue";
|
|
7
|
+
@source "../layouts/**/*.vue";
|
|
8
|
+
@source "../pages/**/*.vue";
|
|
9
|
+
|
|
10
|
+
/* Scan form package sources (symlinked via pnpm workspace).
|
|
11
|
+
Path: uikit/src/runtime/assets/ → ../../../../ → @mapomodule/ → form/... */
|
|
12
|
+
@source "../../../../form/src/runtime/components/**/*.vue";
|
|
13
|
+
@source "../../../../form/src/runtime/composables/**/*.ts";
|
|
14
|
+
|
|
15
|
+
/* Safelist: grid utilities used dynamically by the form engine.
|
|
16
|
+
Tailwind v4 does not scan template literals — these must be explicit. */
|
|
17
|
+
@source inline("col-span-1 col-span-2 col-span-3 col-span-4 col-span-5 col-span-6 col-span-7 col-span-8 col-span-9 col-span-10 col-span-11 col-span-12");
|
|
18
|
+
@source inline("md:col-span-1 md:col-span-2 md:col-span-3 md:col-span-4 md:col-span-5 md:col-span-6 md:col-span-7 md:col-span-8 md:col-span-9 md:col-span-10 md:col-span-11 md:col-span-12");
|
|
19
|
+
@source inline("grid-cols-12");
|
|
20
|
+
@source inline("flex-1 min-h-0 h-full");
|
|
21
|
+
|
|
22
|
+
/* Expanded field panel — forces the entire chain to fill the available height */
|
|
23
|
+
.mapo-group-expand-body,
|
|
24
|
+
.mapo-group-expand-body > *,
|
|
25
|
+
.mapo-group-expand-body .mapo-form-field,
|
|
26
|
+
.mapo-group-expand-body .mapo-form-field > div {
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
}
|
|
30
|
+
/* The NuxtUI root wrapper (div root of UTextarea / UInput) must stretch */
|
|
31
|
+
.mapo-group-expand-body textarea,
|
|
32
|
+
.mapo-group-expand-body [contenteditable] {
|
|
33
|
+
height: 100% !important;
|
|
34
|
+
overflow-y: auto !important;
|
|
35
|
+
resize: none !important;
|
|
36
|
+
}
|
|
37
|
+
/* NuxtUI root wrapper (usually .relative or [data-slot]) */
|
|
38
|
+
.mapo-group-expand-body .mapo-form-field > div > * {
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@layer base {
|
|
43
|
+
html,
|
|
44
|
+
body {
|
|
45
|
+
height: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:root {
|
|
49
|
+
/* Height of the topbar — used by MapoDetail sticky sidebar positioning.
|
|
50
|
+
Override in the consuming app if the topbar height differs from the default. */
|
|
51
|
+
--mapo-topbar-height: 56px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Extend height chain through #__nuxt and the UApp wrapper div */
|
|
55
|
+
#__nuxt,
|
|
56
|
+
#__nuxt > * {
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useConfirmStore } from "@mapomodule/store/runtime/stores/confirm";
|
|
3
|
+
|
|
4
|
+
const store = useConfirmStore();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<UModal v-model:open="store.active" :dismissible="false">
|
|
9
|
+
<template #content>
|
|
10
|
+
<div class="p-6 space-y-4">
|
|
11
|
+
<div class="space-y-1">
|
|
12
|
+
<h3 class="text-base font-semibold text-highlighted">
|
|
13
|
+
{{ store.options?.title ?? "Confirm" }}
|
|
14
|
+
</h3>
|
|
15
|
+
<p class="text-sm text-muted">
|
|
16
|
+
{{ store.options?.message }}
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="flex justify-end gap-3">
|
|
21
|
+
<UButton variant="ghost" color="neutral" @click="store.cancel()">
|
|
22
|
+
{{ store.options?.cancelText ?? "Cancel" }}
|
|
23
|
+
</UButton>
|
|
24
|
+
<UButton
|
|
25
|
+
:color="store.options?.dangerous ? 'error' : 'primary'"
|
|
26
|
+
@click="store.confirm()"
|
|
27
|
+
>
|
|
28
|
+
{{ store.options?.confirmText ?? "Confirm" }}
|
|
29
|
+
</UButton>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
</UModal>
|
|
34
|
+
</template>
|