@reni-corp/reni-2c-ui 0.3.27 → 0.3.29
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 +139 -16
- package/dist/components/elements/Alert.vue.d.ts +21 -3
- package/dist/components/elements/Alert.vue.d.ts.map +1 -1
- package/dist/components/elements/CheckBox.vue.d.ts +42 -2
- package/dist/components/elements/CheckBox.vue.d.ts.map +1 -1
- package/dist/components/elements/ComboBox.vue.d.ts +153 -0
- package/dist/components/elements/ComboBox.vue.d.ts.map +1 -0
- package/dist/components/elements/Icon.vue.d.ts.map +1 -1
- package/dist/components/elements/PasswordField.vue.d.ts +75 -25
- package/dist/components/elements/PasswordField.vue.d.ts.map +1 -1
- package/dist/components/elements/Progress.vue.d.ts +45 -0
- package/dist/components/elements/Progress.vue.d.ts.map +1 -0
- package/dist/components/elements/SelectBox.vue.d.ts +30 -10
- package/dist/components/elements/SelectBox.vue.d.ts.map +1 -1
- package/dist/components/elements/SkeletonLoader.vue.d.ts +30 -0
- package/dist/components/elements/SkeletonLoader.vue.d.ts.map +1 -0
- package/dist/components/elements/SpinButton.vue.d.ts +4 -2
- package/dist/components/elements/SpinButton.vue.d.ts.map +1 -1
- package/dist/components/elements/TextField.vue.d.ts +21 -6
- package/dist/components/elements/TextField.vue.d.ts.map +1 -1
- package/dist/components/features/ProductList.vue.d.ts +4 -0
- package/dist/components/features/ProductList.vue.d.ts.map +1 -1
- package/dist/components/features/ProductListItem.vue.d.ts +4 -0
- package/dist/components/features/ProductListItem.vue.d.ts.map +1 -1
- package/dist/components/features/ProductPurchase.vue.d.ts +102 -0
- package/dist/components/features/ProductPurchase.vue.d.ts.map +1 -0
- package/dist/components/foundation/AppBar.vue.d.ts +28 -3
- package/dist/components/foundation/AppBar.vue.d.ts.map +1 -1
- package/dist/components/foundation/AppFooter.vue.d.ts +51 -1
- package/dist/components/foundation/AppFooter.vue.d.ts.map +1 -1
- package/dist/components/interactive/Disclosure.vue.d.ts +54 -0
- package/dist/components/interactive/Disclosure.vue.d.ts.map +1 -0
- package/dist/components/layouts/Page.vue.d.ts +2 -0
- package/dist/components/layouts/Page.vue.d.ts.map +1 -1
- package/dist/components/renderless/Form.vue.d.ts +27 -1
- package/dist/components/renderless/Form.vue.d.ts.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +7442 -6048
- package/dist/script.es.js +8881 -7489
- package/dist/script.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +22 -13
- package/src/stories/Alert.stories.ts +260 -0
- package/src/stories/AnnounceBar.stories.ts +138 -0
- package/src/stories/AppBar.stories.ts +277 -0
- package/src/stories/AppFooter.stories.ts +274 -0
- package/src/stories/AppFrame.stories.ts +46 -0
- package/src/stories/AppLayout.stories.ts +870 -0
- package/src/stories/Button.stories.ts +101 -0
- package/src/stories/Card.stories.ts +152 -0
- package/src/stories/Carousel.stories.ts +62 -0
- package/src/stories/CarouselBanner.stories.ts +103 -0
- package/src/stories/CheckBox.stories.ts +76 -0
- package/src/stories/ComboBox.stories.ts +524 -0
- package/src/stories/Dialog.stories.ts +174 -0
- package/src/stories/Disclosure.stories.ts +217 -0
- package/src/stories/Divider.stories.ts +68 -0
- package/src/stories/Drawer.stories.ts +135 -0
- package/src/stories/DropDown.stories.ts +195 -0
- package/src/stories/FloatingBanner.stories.ts +79 -0
- package/src/stories/Form.stories.ts +704 -0
- package/src/stories/Gallery.stories.ts +78 -0
- package/src/stories/Grid.stories.ts +357 -0
- package/src/stories/Hero.stories.ts +52 -0
- package/src/stories/Html.stories.ts +178 -0
- package/src/stories/Icon.stories.ts +176 -0
- package/src/stories/Image.stories.ts +613 -0
- package/src/stories/Label.stories.ts +54 -0
- package/src/stories/List.stories.ts +112 -0
- package/src/stories/Modal.stories.ts +123 -0
- package/src/stories/Notification.stories.ts +82 -0
- package/src/stories/Page.stories.ts +414 -0
- package/src/stories/PasswordField.stories.ts +304 -0
- package/src/stories/ProductLabels.stories.ts +65 -0
- package/src/stories/ProductList.stories.ts +679 -0
- package/src/stories/ProductPurchase.stories.ts +807 -0
- package/src/stories/Progress.stories.ts +192 -0
- package/src/stories/Radio.stories.ts +81 -0
- package/src/stories/Section.stories.ts +244 -0
- package/src/stories/SelectBox.stories.ts +377 -0
- package/src/stories/SkeletonLoader.stories.ts +170 -0
- package/src/stories/Slider.stories.ts +79 -0
- package/src/stories/SnsLink.stories.ts +259 -0
- package/src/stories/SoldStacker.stories.ts +68 -0
- package/src/stories/SpinButton.stories.ts +134 -0
- package/src/stories/Spinner.stories.ts +58 -0
- package/src/stories/Stack.stories.ts +104 -0
- package/src/stories/Switch.stories.ts +68 -0
- package/src/stories/Tab.stories.ts +52 -0
- package/src/stories/TabPanels.stories.ts +67 -0
- package/src/stories/Tabs.stories.ts +68 -0
- package/src/stories/Text.stories.ts +69 -0
- package/src/stories/TextArea.stories.ts +78 -0
- package/src/stories/TextField.stories.ts +97 -0
- package/src/stories/ToolChip.stories.ts +125 -0
- package/dist/components/elements/SkeltonLoader.vue.d.ts +0 -7
- package/dist/components/elements/SkeltonLoader.vue.d.ts.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import List, { type ListProps } from '@/components/layouts/List.vue'
|
|
3
|
+
import { Size } from '@/types'
|
|
4
|
+
import { SizeOptions } from '@/constants'
|
|
5
|
+
import Text from '@/components/elements/Text.vue'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof List> = {
|
|
8
|
+
title: 'Layouts/List',
|
|
9
|
+
component: List,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: 'Listコンポーネント',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
items: {
|
|
20
|
+
control: 'object',
|
|
21
|
+
},
|
|
22
|
+
withDivider: {
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
},
|
|
25
|
+
dense: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
},
|
|
28
|
+
gap: {
|
|
29
|
+
control: 'select',
|
|
30
|
+
options: Object.keys(SizeOptions) as Size[],
|
|
31
|
+
},
|
|
32
|
+
contentInset: {
|
|
33
|
+
top: {
|
|
34
|
+
control: 'number',
|
|
35
|
+
},
|
|
36
|
+
bottom: {
|
|
37
|
+
control: 'number',
|
|
38
|
+
},
|
|
39
|
+
left: {
|
|
40
|
+
control: 'number',
|
|
41
|
+
},
|
|
42
|
+
right: {
|
|
43
|
+
control: 'number',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
emptyText: {
|
|
47
|
+
control: 'text',
|
|
48
|
+
},
|
|
49
|
+
loading: {
|
|
50
|
+
control: 'boolean',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
args: {
|
|
54
|
+
items: [
|
|
55
|
+
{
|
|
56
|
+
name: 'name',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: '111',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: '222',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
withDivider: true,
|
|
66
|
+
dense: false,
|
|
67
|
+
gap: 'md',
|
|
68
|
+
contentInset: {
|
|
69
|
+
top: 0,
|
|
70
|
+
right: 0,
|
|
71
|
+
bottom: 0,
|
|
72
|
+
left: 0,
|
|
73
|
+
},
|
|
74
|
+
emptyText: 'empty',
|
|
75
|
+
loading: false,
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
export default meta
|
|
79
|
+
|
|
80
|
+
type StoryArgs = ListProps
|
|
81
|
+
type Story = StoryObj<StoryArgs>
|
|
82
|
+
type OverridesStory = Omit<Story, 'argTypes'> & {
|
|
83
|
+
argTypes?: Record<string, ListProps>
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const 基本: OverridesStory = {
|
|
87
|
+
args: {},
|
|
88
|
+
argTypes: {},
|
|
89
|
+
render: (args) => ({
|
|
90
|
+
components: { 'rn-list': List, 'rn-text': Text },
|
|
91
|
+
setup() {
|
|
92
|
+
return { args }
|
|
93
|
+
},
|
|
94
|
+
template: /* html */ `
|
|
95
|
+
<div class='sb-canvas'>
|
|
96
|
+
<rn-list
|
|
97
|
+
:items=args.items
|
|
98
|
+
:withDivider=args.withDivider
|
|
99
|
+
:dense=args.dense
|
|
100
|
+
:gap=args.gap
|
|
101
|
+
:contentInset=args.contentInset
|
|
102
|
+
:emptyText=args.emptyText
|
|
103
|
+
:loading=args.loading
|
|
104
|
+
>
|
|
105
|
+
<template #default="{ item }">
|
|
106
|
+
<rn-text>{{ item.name }}</rn-text>
|
|
107
|
+
</template>
|
|
108
|
+
</rn-list>
|
|
109
|
+
</div>
|
|
110
|
+
`,
|
|
111
|
+
}),
|
|
112
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import Modal, { ModalProps } from '@/components/interactive/Modal.vue'
|
|
3
|
+
import Button from '@/components/elements/Button.vue'
|
|
4
|
+
import Icon from '@/components/elements/Icon.vue'
|
|
5
|
+
import './assets/css/style.css'
|
|
6
|
+
import { ref } from 'vue'
|
|
7
|
+
const meta: Meta<typeof Modal> = {
|
|
8
|
+
title: 'Interactive/Modal',
|
|
9
|
+
component: Modal,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
visible: { control: 'boolean' },
|
|
13
|
+
title: { control: 'text' },
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
visible: false,
|
|
17
|
+
title: 'モーダルタイトル',
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
type StoryArgs = ModalProps & {}
|
|
23
|
+
type Story = StoryObj<StoryArgs>
|
|
24
|
+
type OverridesStory = Omit<Story, 'argTypes'> & {
|
|
25
|
+
argTypes?: Record<string, any>
|
|
26
|
+
}
|
|
27
|
+
export const 基本: OverridesStory = {
|
|
28
|
+
args: {},
|
|
29
|
+
argTypes: {
|
|
30
|
+
visible: { control: { disable: true } },
|
|
31
|
+
header: { table: { disable: true } },
|
|
32
|
+
headerRightItem: { table: { disable: true } },
|
|
33
|
+
headerLeftItem: { table: { disable: true } },
|
|
34
|
+
body: { table: { disable: true } },
|
|
35
|
+
footer: { table: { disable: true } },
|
|
36
|
+
},
|
|
37
|
+
render: (args, {}) => ({
|
|
38
|
+
components: { 'rn-modal': Modal, 'rn-button': Button },
|
|
39
|
+
setup() {
|
|
40
|
+
const visible = ref(true)
|
|
41
|
+
const handleVisible = () => {
|
|
42
|
+
visible.value = !visible.value
|
|
43
|
+
}
|
|
44
|
+
return { args, visible, handleVisible }
|
|
45
|
+
},
|
|
46
|
+
template: /* html */ `
|
|
47
|
+
<div style="height:560px" class='sb-canvas'>
|
|
48
|
+
<rn-button @click="handleVisible">モーダルを開く</rn-button>
|
|
49
|
+
<rn-modal
|
|
50
|
+
v-model:visible="visible"
|
|
51
|
+
:title=args.title
|
|
52
|
+
>
|
|
53
|
+
<template #body>
|
|
54
|
+
<div class="RN-al-vertical RN-al-fill-width RN-al-gap-md">
|
|
55
|
+
<div class="RN-al-vertical RN-al-gap-xs RN-al-fill-width">
|
|
56
|
+
<span class="RN-text--size-body">
|
|
57
|
+
- 基本的な利用方法です。template #body中で自由にレイアウトができます。<br />
|
|
58
|
+
<br />
|
|
59
|
+
- オーバーレイとクローズアイコンをクリックすると閉じます。<br />
|
|
60
|
+
</span>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
</rn-modal>
|
|
65
|
+
</div>
|
|
66
|
+
`,
|
|
67
|
+
}),
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const 応用1: OverridesStory = {
|
|
71
|
+
args: {
|
|
72
|
+
title: '各スロットを利用したモーダル',
|
|
73
|
+
},
|
|
74
|
+
argTypes: {
|
|
75
|
+
visible: { control: { disable: true } },
|
|
76
|
+
header: { table: { disable: true } },
|
|
77
|
+
headerRightItem: { table: { disable: true } },
|
|
78
|
+
headerLeftItem: { table: { disable: true } },
|
|
79
|
+
body: { table: { disable: true } },
|
|
80
|
+
footer: { table: { disable: true } },
|
|
81
|
+
},
|
|
82
|
+
render: (args, {}) => ({
|
|
83
|
+
components: { 'rn-modal': Modal, 'rn-button': Button, 'rn-icon': Icon },
|
|
84
|
+
setup() {
|
|
85
|
+
const visible = ref(true)
|
|
86
|
+
const handleVisible = () => {
|
|
87
|
+
visible.value = !visible.value
|
|
88
|
+
}
|
|
89
|
+
return { args, visible, handleVisible }
|
|
90
|
+
},
|
|
91
|
+
template: /* html */ `
|
|
92
|
+
<div style="height:100vh" class='sb-canvas'>
|
|
93
|
+
<rn-button @click="handleVisible">モーダルを開く</rn-button>
|
|
94
|
+
<rn-modal
|
|
95
|
+
v-model:visible="visible"
|
|
96
|
+
:title=args.title
|
|
97
|
+
>
|
|
98
|
+
<template #headerLeftItem>
|
|
99
|
+
<rn-icon icon="arrow-left" @click="handleVisible" />
|
|
100
|
+
</template>
|
|
101
|
+
<template #headerRightItem>
|
|
102
|
+
<rn-icon icon="copy" />
|
|
103
|
+
<rn-icon icon="ellipsis" />
|
|
104
|
+
</template>
|
|
105
|
+
<template #body>
|
|
106
|
+
<div class="RN-al-vertical RN-al-fill-width RN-al-gap-md">
|
|
107
|
+
<div class="RN-al-vertical RN-al-gap-xs RN-al-fill-width">
|
|
108
|
+
<span class="RN-text--size-body">
|
|
109
|
+
- 各種スロット例です。#headerLeftItem / #headerRightItem / #footer を利用した例です。他には#headerでヘッダー全体を差し替える事が出来ます。<br />
|
|
110
|
+
</span>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
<template #footer>
|
|
115
|
+
<div class="RN-al-vertical RN-al-fill-width RN-al-gap-md">
|
|
116
|
+
<rn-button @click="handleVisible" class="RN-al-fill-width">モーダルを閉じる</rn-button>
|
|
117
|
+
</div>
|
|
118
|
+
</template>
|
|
119
|
+
</rn-modal>
|
|
120
|
+
</div>
|
|
121
|
+
`,
|
|
122
|
+
}),
|
|
123
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import Notification, {
|
|
3
|
+
NotificationProps,
|
|
4
|
+
} from '@/components/interactive/Notification.vue'
|
|
5
|
+
import Stack from '@/components/layouts/Stack.vue'
|
|
6
|
+
import Button from '@/components/elements/Button.vue'
|
|
7
|
+
import useNotifications from '@/composable/useAppNotifications'
|
|
8
|
+
import { StatusColor } from '@/types'
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof Notification> = {
|
|
11
|
+
title: 'Interactive/Notification',
|
|
12
|
+
component: Notification,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
notifications: { control: { disable: true } },
|
|
16
|
+
position: { control: { disable: true } },
|
|
17
|
+
},
|
|
18
|
+
args: {},
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default meta
|
|
22
|
+
type StoryArgs = NotificationProps
|
|
23
|
+
type Story = StoryObj<StoryArgs>
|
|
24
|
+
type OverridesStory = Omit<Story, 'argTypes'> & {
|
|
25
|
+
argTypes?: Record<string, any>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const 基本: OverridesStory = {
|
|
29
|
+
args: {},
|
|
30
|
+
argTypes: {
|
|
31
|
+
default: { table: { disable: true } },
|
|
32
|
+
},
|
|
33
|
+
render: (args: StoryArgs) => ({
|
|
34
|
+
components: {
|
|
35
|
+
'rn-notification': Notification,
|
|
36
|
+
'rn-stack': Stack,
|
|
37
|
+
'rn-button': Button,
|
|
38
|
+
},
|
|
39
|
+
setup() {
|
|
40
|
+
const { notifications, addNotification, removeNotificationById } =
|
|
41
|
+
useNotifications()
|
|
42
|
+
|
|
43
|
+
const handleAddNotification = (_type: StatusColor) => {
|
|
44
|
+
addNotification({
|
|
45
|
+
message: `これは${_type}の通知です!`,
|
|
46
|
+
type: _type,
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
const handleRemoveNotification = (id: number) => {
|
|
50
|
+
removeNotificationById(id)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
args,
|
|
55
|
+
notifications,
|
|
56
|
+
handleAddNotification,
|
|
57
|
+
handleRemoveNotification,
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
template: /* html */ `
|
|
61
|
+
<div class='sb-canvas'>
|
|
62
|
+
<rn-stack
|
|
63
|
+
direction="vertical"
|
|
64
|
+
horizontal-re-size="fill"
|
|
65
|
+
vertical-re-size="fill"
|
|
66
|
+
horizontal-align="center"
|
|
67
|
+
vertical-align="center"
|
|
68
|
+
>
|
|
69
|
+
<rn-button style="width:200px" @click="handleAddNotification('default')">デフォルトを表示</rn-button>
|
|
70
|
+
<rn-button style="width:200px" color="success" @click="handleAddNotification('success')">サクセスを表示</rn-button>
|
|
71
|
+
<rn-button style="width:200px" color="danger" @click="handleAddNotification('danger')">デンジャーを表示</rn-button>
|
|
72
|
+
<rn-button style="width:200px" color="warning" @click="handleAddNotification('warning')">ワーニングを表示</rn-button>
|
|
73
|
+
<rn-button style="width:200px" color="info" @click="handleAddNotification('info')">インフォを表示</rn-button>
|
|
74
|
+
</rn-stack>
|
|
75
|
+
<rn-notification
|
|
76
|
+
:notifications="notifications"
|
|
77
|
+
@remove-notification="handleRemoveNotification"
|
|
78
|
+
></rn-notification>
|
|
79
|
+
</div>
|
|
80
|
+
`,
|
|
81
|
+
}),
|
|
82
|
+
}
|