vanilla-vue-ui 0.0.3 โ†’ 0.0.5

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.
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
3
+ <div class="mx-auto max-w-3xl">
4
+ <slot />
5
+ </div>
6
+ </div>
7
+ </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-vue-ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -9,7 +9,8 @@
9
9
  "custom",
10
10
  "icon",
11
11
  "types",
12
- "util"
12
+ "util",
13
+ "page-template"
13
14
  ],
14
15
  "scripts": {
15
16
  "dev": "vite",
@@ -28,7 +29,8 @@
28
29
  "copy-icon": "copyfiles -u 1 src/icon/**/* .",
29
30
  "copy-types": "copyfiles -u 1 src/types/**/* .",
30
31
  "copy-util": "copyfiles -u 1 src/util/**/* .",
31
- "copy": "npm run copy-template && npm run copy-basic && npm run copy-custom && npm run copy-icon && npm run copy-types && npm run copy-util"
32
+ "copy-page-template": "copyfiles -u 1 src/page-template/**/* .",
33
+ "copy": "npm run copy-template && npm run copy-basic && npm run copy-custom && npm run copy-icon && npm run copy-types && npm run copy-util && npm run copy-page-template"
32
34
  },
33
35
  "dependencies": {
34
36
  "@headlessui/vue": "^1.7.17",
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <slot name="header"></slot>
3
+
4
+ <w-container>
5
+ <main>
6
+ <w-spacer-island>
7
+ <slot name="title"></slot>
8
+ </w-spacer-island>
9
+
10
+ <slot></slot>
11
+ </main>
12
+
13
+ <w-spacer-island>
14
+ <slot name="bottom"></slot>
15
+ </w-spacer-island>
16
+ </w-container>
17
+
18
+ <slot name="footer"></slot>
19
+ </template>
20
+
21
+ <script setup lang="ts">
22
+ import WContainer from '@/basic/container/WContainer.vue';
23
+ import WSpacerIsland from '../../template/spacer-island/WSpacerIsland.vue'
24
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <slot name="header"></slot>
3
+
4
+ <main>
5
+ <article>
6
+ <slot></slot>
7
+ </article>
8
+ </main>
9
+
10
+ <slot name="footer"></slot>
11
+ </template>
@@ -0,0 +1,62 @@
1
+ // Replace vue3 with vue if you are using Storybook for Vue 2
2
+ import type { Meta, StoryObj } from '@storybook/vue3';
3
+ import DashboardTemplate from './WDashboardTemplate.vue';
4
+ import { HomeIcon } from '@heroicons/vue/24/outline'
5
+
6
+ type DashboardTemplateProps = InstanceType<typeof DashboardTemplate>['$props']
7
+
8
+ const meta: Meta<typeof DashboardTemplate> = {
9
+ component: DashboardTemplate,
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof DashboardTemplate>;
14
+
15
+ /*
16
+ *๐Ÿ‘‡ Render functions are a framework specific feature to allow you control on how the component renders.
17
+ * See https://storybook.js.org/docs/api/csf
18
+ * to learn how to use render functions.
19
+ */
20
+ export const Primary: Story = {
21
+ render: (args: DashboardTemplateProps) => ({
22
+ setup() {
23
+ return {
24
+ ...args
25
+ }
26
+ },
27
+ components: { DashboardTemplate },
28
+ template: `
29
+ <DashboardTemplate :navigationTop="navigationTop">
30
+ <div class="prose">
31
+ <h1>Menu</h1>
32
+ </div>
33
+ </DashboardTemplate>
34
+ `,
35
+ }),
36
+ args: {
37
+ navigationTop: [{ name: 'ใƒกใƒ‹ใƒฅใƒผ', href: '/ja', onClick: undefined, icon: HomeIcon, current: false }]
38
+ }
39
+ };
40
+
41
+ export const WithBottom: Story = {
42
+ render: (args: DashboardTemplateProps) => ({
43
+ setup() {
44
+ return {
45
+ ...args
46
+ }
47
+ },
48
+ components: { DashboardTemplate },
49
+ template: `
50
+ <DashboardTemplate :title="title" :navigationTop="navigationTop" :navigationBottom="navigationBottom">
51
+ <div class="prose">
52
+ <h1>Menu</h1>
53
+ </div>
54
+ </DashboardTemplate>
55
+ `,
56
+ }),
57
+ args: {
58
+ title: '็ฎก็†ใƒšใƒผใ‚ธ',
59
+ navigationTop: [{ name: 'ใƒกใƒ‹ใƒฅใƒผ', href: '/ja', onClick: undefined, icon: HomeIcon, current: false }],
60
+ navigationBottom: [{ name: 'ใƒญใ‚ฐใ‚ขใ‚ฆใƒˆ', href: undefined, onClick: () => console.log('ใƒญใ‚ฐใ‚ขใ‚ฆใƒˆใƒœใ‚ฟใƒณใŒๆŠผใ•ใ‚Œใพใ—ใŸใ€‚'), icon: undefined, current: undefined }]
61
+ }
62
+ };
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <NavigationDrawer
3
+ :title="props.title"
4
+ :navigation-top="navigationTop"
5
+ :navigation-bottom="navigationBottom"
6
+ >
7
+ <Banner />
8
+
9
+ <div class="mt-4 lg:mt-8 mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
10
+ <div class="mx-auto max-w-3xl">
11
+ <Breadcrumb />
12
+
13
+ <div class="mt-4 lg:mt-10">
14
+ <slot />
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <FooterSimple :text="props.footerText" />
20
+ </NavigationDrawer>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import type { NavigationDrawerContent } from '../../template/navigation-drawer/NavigationDrawerContent'
25
+ import NavigationDrawer from '../../template/navigation-drawer/NavigationDrawer.vue'
26
+ import FooterSimple from '../../template/footer-simple/WFooterSimple.vue'
27
+ import Breadcrumb from '../../basic/breadcrumb/WBreadcrumb.vue'
28
+ import Banner from '../../basic/banner/WBanner.vue'
29
+ import type { PropType } from 'vue'
30
+
31
+ const props = defineProps({
32
+ title: {
33
+ type: String as PropType<string>,
34
+ default: "Dashboard"
35
+ },
36
+ navigationTop: {
37
+ type: Array as PropType<NavigationDrawerContent[]>,
38
+ required: true
39
+ },
40
+ navigationBottom: {
41
+ type: Array as PropType<NavigationDrawerContent[]>,
42
+ required: false,
43
+ default: []
44
+ },
45
+ footerText: {
46
+ type: String as PropType<string>,
47
+ required: false,
48
+ default: `ยฉ 2020 Your Company, Inc. All rights reserved.`
49
+ }
50
+ })
51
+ </script>
@@ -0,0 +1,22 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+
3
+ import SpacerIsland from './WSpacerIsland.vue';
4
+
5
+ const meta: Meta<typeof SpacerIsland> = {
6
+ component: SpacerIsland,
7
+ };
8
+
9
+ export default meta;
10
+ type Story = StoryObj<typeof SpacerIsland>;
11
+
12
+ /*
13
+ *๐Ÿ‘‡ Render functions are a framework specific feature to allow you control on how the component renders.
14
+ * See https://storybook.js.org/docs/api/csf
15
+ * to learn how to use render functions.
16
+ */
17
+ export const Primary: Story = {
18
+ render: () => ({
19
+ components: { SpacerIsland },
20
+ template: '<SpacerIsland><p>content</p></SpacerIsland>',
21
+ }),
22
+ };
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div :class="classes.base">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import type { ClassObject } from '../../types/ClassObject';
9
+ import { defineProps, type PropType } from 'vue';
10
+
11
+ defineProps({
12
+ classes: {
13
+ type: Object as PropType<ClassObject>,
14
+ default() {
15
+ return {
16
+ base: 'my-4 md:my-6 lg:my-10 xl:my-16'
17
+ }
18
+ }
19
+ }
20
+ })
21
+ </script>
@@ -0,0 +1,22 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+
3
+ import SpacerLadder from './WSpacerLadder.vue';
4
+
5
+ const meta: Meta<typeof SpacerLadder> = {
6
+ component: SpacerLadder,
7
+ };
8
+
9
+ export default meta;
10
+ type Story = StoryObj<typeof SpacerLadder>;
11
+
12
+ /*
13
+ *๐Ÿ‘‡ Render functions are a framework specific feature to allow you control on how the component renders.
14
+ * See https://storybook.js.org/docs/api/csf
15
+ * to learn how to use render functions.
16
+ */
17
+ export const Primary: Story = {
18
+ render: () => ({
19
+ components: { SpacerLadder },
20
+ template: '<SpacerLadder><p>content</p></SpacerLadder>',
21
+ }),
22
+ };
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div :class="classes.base">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import type { ClassObject } from '../../types/ClassObject';
9
+ import { defineProps, type PropType } from 'vue';
10
+
11
+ defineProps({
12
+ classes: {
13
+ type: Object as PropType<ClassObject>,
14
+ default() {
15
+ return {
16
+ base: 'my-2 md:my-4'
17
+ }
18
+ }
19
+ }
20
+ })
21
+ </script>
@@ -0,0 +1,22 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+
3
+ import SpacerWrap from './WSpacerWrap.vue';
4
+
5
+ const meta: Meta<typeof SpacerWrap> = {
6
+ component: SpacerWrap,
7
+ };
8
+
9
+ export default meta;
10
+ type Story = StoryObj<typeof SpacerWrap>;
11
+
12
+ /*
13
+ *๐Ÿ‘‡ Render functions are a framework specific feature to allow you control on how the component renders.
14
+ * See https://storybook.js.org/docs/api/csf
15
+ * to learn how to use render functions.
16
+ */
17
+ export const Primary: Story = {
18
+ render: () => ({
19
+ components: { SpacerWrap },
20
+ template: '<SpacerWrap><p>content</p></SpacerWrap>',
21
+ }),
22
+ };
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div :class="classes.base">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import type { ClassObject } from '../../types/ClassObject';
9
+ import { defineProps, type PropType } from 'vue';
10
+
11
+ defineProps({
12
+ classes: {
13
+ type: Object as PropType<ClassObject>,
14
+ default() {
15
+ return {
16
+ base: 'm-1 p-1'
17
+ }
18
+ }
19
+ }
20
+ })
21
+ </script>