@reni-corp/reni-2c-ui 0.3.28 → 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 +0 -4
- package/dist/components/features/ProductPurchase.vue.d.ts.map +1 -1
- 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 +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +7161 -5941
- package/dist/script.es.js +8364 -7146
- 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 +18 -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
package/dist/types.d.ts
CHANGED
|
@@ -13,6 +13,13 @@ export type Aspect = keyof typeof AspectOptions;
|
|
|
13
13
|
export type LimitedSize = keyof typeof LimitedSizeOptions;
|
|
14
14
|
export type BorderWidth = keyof typeof BorderWidthOptions;
|
|
15
15
|
export type SNS = keyof typeof SNSOptions;
|
|
16
|
+
export type MenuItem = {
|
|
17
|
+
title: string;
|
|
18
|
+
url?: string;
|
|
19
|
+
action?: () => void;
|
|
20
|
+
children?: MenuItem[];
|
|
21
|
+
expandable?: boolean;
|
|
22
|
+
};
|
|
16
23
|
export type HTMLInputAttribute = {
|
|
17
24
|
autocomplete?: string;
|
|
18
25
|
autofocus?: boolean;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACX,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,YAAY,CAAA;AAC7C,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,kBAAkB,CAAA;AACzD,MAAM,MAAM,IAAI,GAAG,MAAM,OAAO,WAAW,CAAA;AAC3C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,eAAe,CAAA;AACnD,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,iBAAiB,CAAA;AACvD,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,gBAAgB,CAAA;AACrD,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,aAAa,CAAA;AAC/C,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,YAAY,CAAA;AAC7C,MAAM,MAAM,IAAI,GAAG,MAAM,OAAO,WAAW,CAAA;AAC3C,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,aAAa,CAAA;AAC/C,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,kBAAkB,CAAA;AACzD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,kBAAkB,CAAA;AACzD,MAAM,MAAM,GAAG,GAAG,MAAM,OAAO,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,kBAAkB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,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AA6FzB,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEzE,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,EAAE,CAAC,EAAE,CAAC,CAAA;CACP;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb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,EAAE,cAAc,GAAG,IAAI,CAiB7D;AAED,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,gBAAgB;mBAKlC,GAAG;EAiG1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reni-corp/reni-2c-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|
|
35
|
+
"src/**/*.stories.ts",
|
|
35
36
|
".yarn/patches/floating-vue-npm-2.0.0-b4308359d7.patch"
|
|
36
37
|
],
|
|
37
38
|
"scripts": {
|
|
@@ -70,25 +71,29 @@
|
|
|
70
71
|
"floating-vue": "patch:floating-vue@npm%3A2.0.0#./.yarn/patches/floating-vue-npm-2.0.0-b4308359d7.patch",
|
|
71
72
|
"swiper": "^11.1.15",
|
|
72
73
|
"vee-validate": "^4.11.3",
|
|
73
|
-
"vue": "^3.
|
|
74
|
+
"vue": "^3.5.25"
|
|
74
75
|
},
|
|
75
76
|
"peerDependencies": {
|
|
76
|
-
"dompurify": "^3.0.0",
|
|
77
77
|
"happy-dom": ">=20"
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"peerDependenciesMeta": {
|
|
80
|
+
"happy-dom": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"packageManager": "yarn@4.12.0",
|
|
80
85
|
"devDependencies": {
|
|
81
86
|
"@eslint/eslintrc": "^3.3.1",
|
|
82
87
|
"@eslint/js": "^9.36.0",
|
|
83
|
-
"@storybook/addon-essentials": "^7.
|
|
84
|
-
"@storybook/addon-interactions": "^7.
|
|
85
|
-
"@storybook/addon-links": "^7.
|
|
86
|
-
"@storybook/blocks": "^7.
|
|
87
|
-
"@storybook/manager-api": "^7.
|
|
88
|
+
"@storybook/addon-essentials": "^7.6.20",
|
|
89
|
+
"@storybook/addon-interactions": "^7.6.20",
|
|
90
|
+
"@storybook/addon-links": "^7.6.20",
|
|
91
|
+
"@storybook/blocks": "^7.6.20",
|
|
92
|
+
"@storybook/manager-api": "^7.6.20",
|
|
88
93
|
"@storybook/testing-library": "^0.2.0",
|
|
89
|
-
"@storybook/theming": "^7.
|
|
90
|
-
"@storybook/vue3": "^7.
|
|
91
|
-
"@storybook/vue3-vite": "^7.
|
|
94
|
+
"@storybook/theming": "^7.6.20",
|
|
95
|
+
"@storybook/vue3": "^7.6.20",
|
|
96
|
+
"@storybook/vue3-vite": "^7.6.20",
|
|
92
97
|
"@types/dompurify": "^3.0.5",
|
|
93
98
|
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
94
99
|
"@typescript-eslint/parser": "^8.8.1",
|
|
@@ -110,7 +115,7 @@
|
|
|
110
115
|
"react-dom": "^18.2.0",
|
|
111
116
|
"rollup-plugin-visualizer": "^5.11.0",
|
|
112
117
|
"sass": "^1.66.1",
|
|
113
|
-
"storybook": "^7.
|
|
118
|
+
"storybook": "^7.6.21",
|
|
114
119
|
"storybook-addon-vue-slots": "^0.9.21",
|
|
115
120
|
"stylelint": "^16.9.0",
|
|
116
121
|
"stylelint-config-prettier-scss": "^1.0.0",
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import Alert, { type AlertProps } from '@/components/elements/Alert.vue'
|
|
3
|
+
import Button from '@/components/elements/Button.vue'
|
|
4
|
+
import {
|
|
5
|
+
StatusColorOptions,
|
|
6
|
+
LimitedSizeOptions,
|
|
7
|
+
ResizeOptions,
|
|
8
|
+
} from '@/constants'
|
|
9
|
+
import { StatusColor, LimitedSize, Resize } from '@/types'
|
|
10
|
+
import { ref } from 'vue'
|
|
11
|
+
|
|
12
|
+
const meta: Meta<typeof Alert> = {
|
|
13
|
+
title: 'Elements/Alert',
|
|
14
|
+
component: Alert,
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
argTypes: {
|
|
17
|
+
color: {
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: Object.keys(StatusColorOptions) as StatusColor[],
|
|
20
|
+
},
|
|
21
|
+
title: {
|
|
22
|
+
control: 'text',
|
|
23
|
+
},
|
|
24
|
+
message: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
control: 'select',
|
|
29
|
+
options: Object.keys(LimitedSizeOptions) as LimitedSize[],
|
|
30
|
+
},
|
|
31
|
+
width: {
|
|
32
|
+
control: 'select',
|
|
33
|
+
options: Object.keys(ResizeOptions) as Resize[],
|
|
34
|
+
},
|
|
35
|
+
hasHtml: {
|
|
36
|
+
control: {
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
args: {
|
|
42
|
+
color: 'default',
|
|
43
|
+
message: 'Alert',
|
|
44
|
+
size: 'md',
|
|
45
|
+
width: 'hug',
|
|
46
|
+
hasHtml: false,
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default meta
|
|
51
|
+
type Story = StoryObj<typeof meta>
|
|
52
|
+
type OverridesStory = Omit<Story, 'argTypes'> & {
|
|
53
|
+
argTypes?: Record<string, any>
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const 基本: OverridesStory = {
|
|
57
|
+
args: {},
|
|
58
|
+
argTypes: {
|
|
59
|
+
default: { table: { disable: true } },
|
|
60
|
+
},
|
|
61
|
+
render: (args: AlertProps) => ({
|
|
62
|
+
components: { 'rn-alert': Alert, 'rn-button': Button },
|
|
63
|
+
setup() {
|
|
64
|
+
const isVisible = ref(true)
|
|
65
|
+
const handleClose = () => {
|
|
66
|
+
isVisible.value = false
|
|
67
|
+
}
|
|
68
|
+
const handleShow = () => {
|
|
69
|
+
isVisible.value = true
|
|
70
|
+
}
|
|
71
|
+
return { args, isVisible, handleClose, handleShow }
|
|
72
|
+
},
|
|
73
|
+
template: /* html */ `
|
|
74
|
+
<div class='sb-canvas'>
|
|
75
|
+
<rn-alert
|
|
76
|
+
v-if="isVisible"
|
|
77
|
+
:color=args.color
|
|
78
|
+
:title=args.title
|
|
79
|
+
:message=args.message
|
|
80
|
+
:size=args.size
|
|
81
|
+
:width=args.width
|
|
82
|
+
:hasHtml=args.hasHtml
|
|
83
|
+
@close="handleClose"
|
|
84
|
+
>
|
|
85
|
+
</rn-alert>
|
|
86
|
+
<rn-button v-if="!isVisible" @click="handleShow" variant="outlined" color="primary">
|
|
87
|
+
再表示
|
|
88
|
+
</rn-button>
|
|
89
|
+
</div>
|
|
90
|
+
`,
|
|
91
|
+
}),
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const 応用: Story = {
|
|
95
|
+
args: {
|
|
96
|
+
color: 'info',
|
|
97
|
+
hasHtml: true,
|
|
98
|
+
message: '<p>HTMLも記載可能です</p><p>pタグ</p>',
|
|
99
|
+
},
|
|
100
|
+
render: (args: AlertProps) => ({
|
|
101
|
+
components: { 'rn-alert': Alert, 'rn-button': Button },
|
|
102
|
+
setup() {
|
|
103
|
+
const isVisible = ref(true)
|
|
104
|
+
const handleClose = () => {
|
|
105
|
+
isVisible.value = false
|
|
106
|
+
}
|
|
107
|
+
const handleShow = () => {
|
|
108
|
+
isVisible.value = true
|
|
109
|
+
}
|
|
110
|
+
return { args, isVisible, handleClose, handleShow }
|
|
111
|
+
},
|
|
112
|
+
template: /* html */ `
|
|
113
|
+
<div class='sb-canvas'>
|
|
114
|
+
<rn-alert
|
|
115
|
+
v-if="isVisible"
|
|
116
|
+
:color=args.color
|
|
117
|
+
:title=args.title
|
|
118
|
+
:message=args.message
|
|
119
|
+
:size=args.size
|
|
120
|
+
:width=args.width
|
|
121
|
+
:hasHtml=args.hasHtml
|
|
122
|
+
@close="handleClose"
|
|
123
|
+
>
|
|
124
|
+
</rn-alert>
|
|
125
|
+
<rn-button v-if="!isVisible" @click="handleShow" variant="outlined" color="primary">
|
|
126
|
+
再表示
|
|
127
|
+
</rn-button>
|
|
128
|
+
</div>
|
|
129
|
+
`,
|
|
130
|
+
}),
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const タイトル付き: Story = {
|
|
134
|
+
args: {
|
|
135
|
+
color: 'danger',
|
|
136
|
+
title: 'エラーが発生しました',
|
|
137
|
+
message:
|
|
138
|
+
'ネットワークの問題によりエラーが発生しました。時間を空けてリトライしてください。',
|
|
139
|
+
size: 'md',
|
|
140
|
+
width: 'fill',
|
|
141
|
+
},
|
|
142
|
+
render: (args: AlertProps) => ({
|
|
143
|
+
components: { 'rn-alert': Alert, 'rn-button': Button },
|
|
144
|
+
setup() {
|
|
145
|
+
const isVisible = ref(true)
|
|
146
|
+
const handleClose = () => {
|
|
147
|
+
isVisible.value = false
|
|
148
|
+
}
|
|
149
|
+
const handleShow = () => {
|
|
150
|
+
isVisible.value = true
|
|
151
|
+
}
|
|
152
|
+
return { args, isVisible, handleClose, handleShow }
|
|
153
|
+
},
|
|
154
|
+
template: /* html */ `
|
|
155
|
+
<div class='sb-canvas'>
|
|
156
|
+
<rn-alert
|
|
157
|
+
v-if="isVisible"
|
|
158
|
+
:color=args.color
|
|
159
|
+
:title=args.title
|
|
160
|
+
:message=args.message
|
|
161
|
+
:size=args.size
|
|
162
|
+
:width=args.width
|
|
163
|
+
@close="handleClose"
|
|
164
|
+
>
|
|
165
|
+
</rn-alert>
|
|
166
|
+
<rn-button v-if="!isVisible" @click="handleShow" variant="outlined" color="primary">
|
|
167
|
+
再表示
|
|
168
|
+
</rn-button>
|
|
169
|
+
</div>
|
|
170
|
+
`,
|
|
171
|
+
}),
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export const アクション付き: Story = {
|
|
175
|
+
args: {
|
|
176
|
+
color: 'danger',
|
|
177
|
+
title: 'エラーが発生しました',
|
|
178
|
+
message:
|
|
179
|
+
'ネットワークの問題によりエラーが発生しました。時間を空けてリトライしてください。',
|
|
180
|
+
size: 'md',
|
|
181
|
+
width: 'fill',
|
|
182
|
+
},
|
|
183
|
+
render: (args: AlertProps) => ({
|
|
184
|
+
components: { 'rn-alert': Alert, 'rn-button': Button },
|
|
185
|
+
setup() {
|
|
186
|
+
const isVisible = ref(true)
|
|
187
|
+
const handleClose = () => {
|
|
188
|
+
isVisible.value = false
|
|
189
|
+
}
|
|
190
|
+
const handleShow = () => {
|
|
191
|
+
isVisible.value = true
|
|
192
|
+
}
|
|
193
|
+
return { args, isVisible, handleClose, handleShow }
|
|
194
|
+
},
|
|
195
|
+
template: /* html */ `
|
|
196
|
+
<div class='sb-canvas'>
|
|
197
|
+
<rn-alert
|
|
198
|
+
v-if="isVisible"
|
|
199
|
+
:color=args.color
|
|
200
|
+
:title=args.title
|
|
201
|
+
:message=args.message
|
|
202
|
+
:size=args.size
|
|
203
|
+
:width=args.width
|
|
204
|
+
@close="handleClose"
|
|
205
|
+
>
|
|
206
|
+
<template #action>
|
|
207
|
+
<rn-button variant="text" color="light" size="sm">リトライ</rn-button>
|
|
208
|
+
</template>
|
|
209
|
+
</rn-alert>
|
|
210
|
+
<rn-button v-if="!isVisible" @click="handleShow" variant="outlined" color="primary">
|
|
211
|
+
再表示
|
|
212
|
+
</rn-button>
|
|
213
|
+
</div>
|
|
214
|
+
`,
|
|
215
|
+
}),
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export const 複数アクション: Story = {
|
|
219
|
+
args: {
|
|
220
|
+
color: 'warning',
|
|
221
|
+
title: '確認が必要です',
|
|
222
|
+
message: 'この操作を続行しますか?',
|
|
223
|
+
size: 'md',
|
|
224
|
+
width: 'fill',
|
|
225
|
+
},
|
|
226
|
+
render: (args: AlertProps) => ({
|
|
227
|
+
components: { 'rn-alert': Alert, 'rn-button': Button },
|
|
228
|
+
setup() {
|
|
229
|
+
const isVisible = ref(true)
|
|
230
|
+
const handleClose = () => {
|
|
231
|
+
isVisible.value = false
|
|
232
|
+
}
|
|
233
|
+
const handleShow = () => {
|
|
234
|
+
isVisible.value = true
|
|
235
|
+
}
|
|
236
|
+
return { args, isVisible, handleClose, handleShow }
|
|
237
|
+
},
|
|
238
|
+
template: /* html */ `
|
|
239
|
+
<div class='sb-canvas'>
|
|
240
|
+
<rn-alert
|
|
241
|
+
v-if="isVisible"
|
|
242
|
+
:color=args.color
|
|
243
|
+
:title=args.title
|
|
244
|
+
:message=args.message
|
|
245
|
+
:size=args.size
|
|
246
|
+
:width=args.width
|
|
247
|
+
@close="handleClose"
|
|
248
|
+
>
|
|
249
|
+
<template #action>
|
|
250
|
+
<rn-button variant="text" color="light" size="sm">キャンセル</rn-button>
|
|
251
|
+
<rn-button variant="text" color="light" size="sm">続行</rn-button>
|
|
252
|
+
</template>
|
|
253
|
+
</rn-alert>
|
|
254
|
+
<rn-button v-if="!isVisible" @click="handleShow" variant="outlined" color="primary">
|
|
255
|
+
再表示
|
|
256
|
+
</rn-button>
|
|
257
|
+
</div>
|
|
258
|
+
`,
|
|
259
|
+
}),
|
|
260
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import AnnounceBar, {
|
|
3
|
+
type AnnounceBarProps,
|
|
4
|
+
} from '@/components/features/AnnounceBar.vue'
|
|
5
|
+
import { StatusColorOptions } from '@/constants'
|
|
6
|
+
import { StatusColor } from '@/types'
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof AnnounceBar> = {
|
|
9
|
+
title: 'Elements/AnnounceBar',
|
|
10
|
+
component: AnnounceBar,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: 'アナウンス用コンポーネント',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
title: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
},
|
|
23
|
+
subtitle: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
},
|
|
26
|
+
color: {
|
|
27
|
+
control: 'select',
|
|
28
|
+
options: Object.keys(StatusColorOptions) as StatusColor[],
|
|
29
|
+
},
|
|
30
|
+
colorStyle: {
|
|
31
|
+
control: 'select',
|
|
32
|
+
options: ['default', 'tonal', 'gradient'],
|
|
33
|
+
},
|
|
34
|
+
persistentHiddenKey: {
|
|
35
|
+
control: 'text',
|
|
36
|
+
},
|
|
37
|
+
closable: {
|
|
38
|
+
control: 'boolean',
|
|
39
|
+
},
|
|
40
|
+
url: {
|
|
41
|
+
control: 'text',
|
|
42
|
+
},
|
|
43
|
+
isTargetBlank: {
|
|
44
|
+
control: 'boolean',
|
|
45
|
+
},
|
|
46
|
+
dense: {
|
|
47
|
+
control: 'boolean',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
args: {
|
|
51
|
+
title: 'title',
|
|
52
|
+
subtitle: 'subTitle',
|
|
53
|
+
color: 'default',
|
|
54
|
+
colorStyle: 'default',
|
|
55
|
+
persistentHiddenKey: '',
|
|
56
|
+
closable: false,
|
|
57
|
+
url: '',
|
|
58
|
+
isTargetBlank: false,
|
|
59
|
+
dense: false,
|
|
60
|
+
},
|
|
61
|
+
render: (args) => ({
|
|
62
|
+
components: { 'rn-announce-bar': AnnounceBar },
|
|
63
|
+
setup() {
|
|
64
|
+
return { args }
|
|
65
|
+
},
|
|
66
|
+
template: /* html */ `
|
|
67
|
+
<div class='sb-canvas'>
|
|
68
|
+
<rn-announce-bar
|
|
69
|
+
:title=args.title
|
|
70
|
+
:subtitle=args.subtitle
|
|
71
|
+
:color=args.color
|
|
72
|
+
:colorStyle=args.colorStyle
|
|
73
|
+
:persistentHiddenKey=args.persistentHiddenKey
|
|
74
|
+
:closable=args.closable
|
|
75
|
+
:url=args.url
|
|
76
|
+
:isTargetBlank=args.isTargetBlank
|
|
77
|
+
:dense=args.dense
|
|
78
|
+
>
|
|
79
|
+
</rn-announce-bar>
|
|
80
|
+
</div>
|
|
81
|
+
`,
|
|
82
|
+
}),
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export default meta
|
|
86
|
+
type StoryArgs = AnnounceBarProps & { slotText: string }
|
|
87
|
+
type Story = StoryObj<StoryArgs>
|
|
88
|
+
type OverridesStory = Omit<Story, 'argTypes'> & {
|
|
89
|
+
argTypes?: Record<string, any>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const 基本: OverridesStory = {
|
|
93
|
+
args: {
|
|
94
|
+
slotText: 'AnnounceBar',
|
|
95
|
+
},
|
|
96
|
+
argTypes: {
|
|
97
|
+
default: { table: { disable: true } },
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const 応用1: OverridesStory = {
|
|
102
|
+
args: {
|
|
103
|
+
slotText: 'AnnounceBar',
|
|
104
|
+
url: 'https://www.reni.co.jp/',
|
|
105
|
+
isTargetBlank: true,
|
|
106
|
+
dense: true,
|
|
107
|
+
},
|
|
108
|
+
argTypes: {
|
|
109
|
+
default: { table: { disable: true } },
|
|
110
|
+
},
|
|
111
|
+
parameters: {
|
|
112
|
+
docs: {
|
|
113
|
+
description: {
|
|
114
|
+
story:
|
|
115
|
+
'URLをとisTargetBlankを併用することで別タブで開くリンクを追加することができる。',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const 応用2: OverridesStory = {
|
|
122
|
+
args: {
|
|
123
|
+
slotText: 'AnnounceBar',
|
|
124
|
+
persistentHiddenKey: '1',
|
|
125
|
+
closable: true,
|
|
126
|
+
},
|
|
127
|
+
argTypes: {
|
|
128
|
+
default: { table: { disable: true } },
|
|
129
|
+
},
|
|
130
|
+
parameters: {
|
|
131
|
+
docs: {
|
|
132
|
+
description: {
|
|
133
|
+
story:
|
|
134
|
+
'closableとpersistentHiddenKeyを併用することで、一度しか表示されないアナウンスが可能になる。(localStorageに値を保持している)',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
}
|