@nexxtmove/ui 1.11.0 → 1.12.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.
- package/dist/components/molecules/PageContainer/PageContainer.vue.d.ts +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +280 -245
- package/dist/nuxt.js +1 -0
- package/package.json +1 -1
- package/src/components/molecules/PageContainer/PageContainer.vue +63 -0
- package/src/components.json +1 -0
- package/src/index.ts +1 -0
- package/tailwind/nexxtmove.tailwind.custom.css +8 -0
package/dist/nuxt.js
CHANGED
|
@@ -28,6 +28,7 @@ var s = {
|
|
|
28
28
|
NexxtInputField: "components/molecules/InputField/InputField.vue",
|
|
29
29
|
NexxtInputSelect: "components/molecules/InputSelect/InputSelect.vue",
|
|
30
30
|
NexxtModalFooter: "components/molecules/ModalFooter/ModalFooter.vue",
|
|
31
|
+
NexxtPageContainer: "components/molecules/PageContainer/PageContainer.vue",
|
|
31
32
|
NexxtPagination: "components/molecules/Pagination/Pagination.vue",
|
|
32
33
|
NexxtPropertyCard: "components/molecules/PropertyCard/PropertyCard.vue",
|
|
33
34
|
NexxtSelect: "components/molecules/Select/Select.vue",
|
package/package.json
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
type ContentWidth = keyof typeof CONTENT_WIDTHS
|
|
3
|
+
|
|
4
|
+
interface NexxtPageContainerProps {
|
|
5
|
+
/** Maximum width of the content area; the content is centered within it. */
|
|
6
|
+
maxWidth?: ContentWidth
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
defineOptions({
|
|
10
|
+
name: 'NexxtPageContainer',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const { maxWidth = '7xl' } = defineProps<NexxtPageContainerProps>()
|
|
14
|
+
|
|
15
|
+
// Full class names so Tailwind and the no-unknown-classes lint rule see them.
|
|
16
|
+
const CONTENT_WIDTHS = {
|
|
17
|
+
xs: 'max-w-xs',
|
|
18
|
+
sm: 'max-w-sm',
|
|
19
|
+
md: 'max-w-md',
|
|
20
|
+
lg: 'max-w-lg',
|
|
21
|
+
xl: 'max-w-xl',
|
|
22
|
+
'2xl': 'max-w-2xl',
|
|
23
|
+
'3xl': 'max-w-3xl',
|
|
24
|
+
'4xl': 'max-w-4xl',
|
|
25
|
+
'5xl': 'max-w-5xl',
|
|
26
|
+
'6xl': 'max-w-6xl',
|
|
27
|
+
'7xl': 'max-w-7xl',
|
|
28
|
+
'8xl': 'max-w-8xl',
|
|
29
|
+
full: 'max-w-full-width',
|
|
30
|
+
} as const
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div class="flex h-full min-h-0 flex-1">
|
|
35
|
+
<div class="h-full min-w-0 grow overflow-y-auto p-8">
|
|
36
|
+
<div :class="['mx-auto', CONTENT_WIDTHS[maxWidth]]">
|
|
37
|
+
<slot />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<Transition
|
|
42
|
+
enter-active-class="transition-[max-width,opacity] duration-300 ease-[cubic-bezier(0.77,0,0.175,1)] motion-reduce:transition-none"
|
|
43
|
+
enter-from-class="max-w-0 opacity-0"
|
|
44
|
+
enter-to-class="max-w-105 opacity-100"
|
|
45
|
+
leave-active-class="transition-[max-width,opacity] duration-300 ease-[cubic-bezier(0.77,0,0.175,1)] motion-reduce:transition-none"
|
|
46
|
+
leave-from-class="max-w-105 opacity-100"
|
|
47
|
+
leave-to-class="max-w-0 opacity-0"
|
|
48
|
+
>
|
|
49
|
+
<aside
|
|
50
|
+
v-if="$slots.sidebar"
|
|
51
|
+
class="h-full w-105 shrink-0 overflow-hidden border-l border-gray-100 bg-white"
|
|
52
|
+
>
|
|
53
|
+
<!-- Fixed width on purpose: the transition shrinks the aside's
|
|
54
|
+
max-width, and a w-full wrapper would reflow (rewrap) the content
|
|
55
|
+
every frame. At w-105 the content keeps its layout and the
|
|
56
|
+
aside's overflow-hidden clips it instead. -->
|
|
57
|
+
<div class="h-full w-105 overflow-y-auto p-8">
|
|
58
|
+
<slot name="sidebar" />
|
|
59
|
+
</div>
|
|
60
|
+
</aside>
|
|
61
|
+
</Transition>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
package/src/components.json
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"NexxtInputField": "components/molecules/InputField/InputField.vue",
|
|
26
26
|
"NexxtInputSelect": "components/molecules/InputSelect/InputSelect.vue",
|
|
27
27
|
"NexxtModalFooter": "components/molecules/ModalFooter/ModalFooter.vue",
|
|
28
|
+
"NexxtPageContainer": "components/molecules/PageContainer/PageContainer.vue",
|
|
28
29
|
"NexxtPagination": "components/molecules/Pagination/Pagination.vue",
|
|
29
30
|
"NexxtPropertyCard": "components/molecules/PropertyCard/PropertyCard.vue",
|
|
30
31
|
"NexxtSelect": "components/molecules/Select/Select.vue",
|
package/src/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { default as NexxtInputSelect } from './components/molecules/InputSelect/
|
|
|
41
41
|
export { default as NexxtLoader } from './components/atoms/Loader/Loader.vue'
|
|
42
42
|
export { default as NexxtModal } from './components/organisms/Modal/Modal.vue'
|
|
43
43
|
export { default as NexxtModalFooter } from './components/molecules/ModalFooter/ModalFooter.vue'
|
|
44
|
+
export { default as NexxtPageContainer } from './components/molecules/PageContainer/PageContainer.vue'
|
|
44
45
|
export { default as NexxtPagination } from './components/molecules/Pagination/Pagination.vue'
|
|
45
46
|
export { default as NexxtPresenceIndicator } from './components/atoms/PresenceIndicator/PresenceIndicator.vue'
|
|
46
47
|
export { default as NexxtProgressBar } from './components/organisms/ProgressBar/ProgressBar.vue'
|
|
@@ -37,3 +37,11 @@
|
|
|
37
37
|
display: none;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
/* Layout tokens for NexxtPageContainer. Moved over from the app theme
|
|
42
|
+
(app/assets/css/main.css); the app drops its copies once it adopts the
|
|
43
|
+
version that ships these. */
|
|
44
|
+
@theme {
|
|
45
|
+
--spacing-8xl: 100rem;
|
|
46
|
+
--spacing-full-width: 116rem; /* 1920px (full hd) minus the sidebar: max app width */
|
|
47
|
+
}
|