@polymarbot/nuxt-layer-shadcn-ui 0.5.1 → 0.5.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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
import type { DatePickerType } from './types'
|
|
3
|
+
import Button from '../Button/index.vue'
|
|
4
|
+
import Modal from '../Modal/index.vue'
|
|
3
5
|
import DatePicker from './index.vue'
|
|
4
6
|
|
|
5
7
|
const types: DatePickerType[] = [ 'date', 'month', 'year' ]
|
|
@@ -220,3 +222,40 @@ export const Readonly: Story = {
|
|
|
220
222
|
`,
|
|
221
223
|
}),
|
|
222
224
|
}
|
|
225
|
+
|
|
226
|
+
export const InModal: Story = {
|
|
227
|
+
parameters: {
|
|
228
|
+
...noControls,
|
|
229
|
+
docs: {
|
|
230
|
+
description: {
|
|
231
|
+
story: 'The calendar menu is teleported to `<body>` and overrides `pointer-events: auto` to bypass the body pointer-events lock applied by reka-ui modal layers, so it stays interactive inside Modal / Dialog / Sheet / Drawer.',
|
|
232
|
+
},
|
|
233
|
+
source: {
|
|
234
|
+
code: `
|
|
235
|
+
<template>
|
|
236
|
+
<Modal v-model:visible="visible" title="Pick a date">
|
|
237
|
+
<DatePicker v-model="date" />
|
|
238
|
+
</Modal>
|
|
239
|
+
</template>
|
|
240
|
+
`.trim(),
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
render: () => ({
|
|
245
|
+
components: { DatePicker, Modal, Button },
|
|
246
|
+
setup () {
|
|
247
|
+
const visible = ref(false)
|
|
248
|
+
const date = ref<Date | string | null>(null)
|
|
249
|
+
return { visible, date }
|
|
250
|
+
},
|
|
251
|
+
template: `
|
|
252
|
+
<div>
|
|
253
|
+
<Button @click="visible = true">Open Modal</Button>
|
|
254
|
+
<Modal v-model:visible="visible" title="Pick a date" :hideFooter="true">
|
|
255
|
+
<DatePicker v-model="date" />
|
|
256
|
+
<div class="mt-4 text-sm text-muted-foreground">Value: {{ date }}</div>
|
|
257
|
+
</Modal>
|
|
258
|
+
</div>
|
|
259
|
+
`,
|
|
260
|
+
}),
|
|
261
|
+
}
|
|
@@ -80,9 +80,12 @@
|
|
|
80
80
|
margin: 4px 0;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
/* Menu: shadow-md
|
|
83
|
+
/* Menu: shadow-md.
|
|
84
|
+
pointer-events override keeps the menu interactive when teleported into
|
|
85
|
+
<body> while a reka-ui modal (Dialog/Sheet/Drawer) locks body pointer-events. */
|
|
84
86
|
.dp__menu {
|
|
85
87
|
box-shadow:
|
|
86
88
|
0 4px 6px -1px rgb(0 0 0 / 0.1),
|
|
87
89
|
0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
90
|
+
pointer-events: auto;
|
|
88
91
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polymarbot/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Nuxt layer providing shadcn-vue based UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"vue-i18n": "^11",
|
|
43
43
|
"vue-router": "^4 || ^5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1cee179e4b0678c75dd8293d0274ec2afb8d9143"
|
|
46
46
|
}
|