@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.
Files changed (101) hide show
  1. package/README.md +139 -16
  2. package/dist/components/elements/Alert.vue.d.ts +21 -3
  3. package/dist/components/elements/Alert.vue.d.ts.map +1 -1
  4. package/dist/components/elements/CheckBox.vue.d.ts +42 -2
  5. package/dist/components/elements/CheckBox.vue.d.ts.map +1 -1
  6. package/dist/components/elements/ComboBox.vue.d.ts +153 -0
  7. package/dist/components/elements/ComboBox.vue.d.ts.map +1 -0
  8. package/dist/components/elements/Icon.vue.d.ts.map +1 -1
  9. package/dist/components/elements/PasswordField.vue.d.ts +75 -25
  10. package/dist/components/elements/PasswordField.vue.d.ts.map +1 -1
  11. package/dist/components/elements/Progress.vue.d.ts +45 -0
  12. package/dist/components/elements/Progress.vue.d.ts.map +1 -0
  13. package/dist/components/elements/SelectBox.vue.d.ts +30 -10
  14. package/dist/components/elements/SelectBox.vue.d.ts.map +1 -1
  15. package/dist/components/elements/SkeletonLoader.vue.d.ts +30 -0
  16. package/dist/components/elements/SkeletonLoader.vue.d.ts.map +1 -0
  17. package/dist/components/elements/SpinButton.vue.d.ts +4 -2
  18. package/dist/components/elements/SpinButton.vue.d.ts.map +1 -1
  19. package/dist/components/elements/TextField.vue.d.ts +21 -6
  20. package/dist/components/elements/TextField.vue.d.ts.map +1 -1
  21. package/dist/components/features/ProductList.vue.d.ts +4 -0
  22. package/dist/components/features/ProductList.vue.d.ts.map +1 -1
  23. package/dist/components/features/ProductListItem.vue.d.ts +4 -0
  24. package/dist/components/features/ProductListItem.vue.d.ts.map +1 -1
  25. package/dist/components/features/ProductPurchase.vue.d.ts +102 -0
  26. package/dist/components/features/ProductPurchase.vue.d.ts.map +1 -0
  27. package/dist/components/foundation/AppBar.vue.d.ts +28 -3
  28. package/dist/components/foundation/AppBar.vue.d.ts.map +1 -1
  29. package/dist/components/foundation/AppFooter.vue.d.ts +51 -1
  30. package/dist/components/foundation/AppFooter.vue.d.ts.map +1 -1
  31. package/dist/components/interactive/Disclosure.vue.d.ts +54 -0
  32. package/dist/components/interactive/Disclosure.vue.d.ts.map +1 -0
  33. package/dist/components/layouts/Page.vue.d.ts +2 -0
  34. package/dist/components/layouts/Page.vue.d.ts.map +1 -1
  35. package/dist/components/renderless/Form.vue.d.ts +27 -1
  36. package/dist/components/renderless/Form.vue.d.ts.map +1 -1
  37. package/dist/index.d.ts +11 -3
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.es.js +7442 -6048
  40. package/dist/script.es.js +8881 -7489
  41. package/dist/script.umd.js +26 -26
  42. package/dist/style.css +1 -1
  43. package/dist/types.d.ts +7 -0
  44. package/dist/types.d.ts.map +1 -1
  45. package/dist/utils.d.ts.map +1 -1
  46. package/package.json +22 -13
  47. package/src/stories/Alert.stories.ts +260 -0
  48. package/src/stories/AnnounceBar.stories.ts +138 -0
  49. package/src/stories/AppBar.stories.ts +277 -0
  50. package/src/stories/AppFooter.stories.ts +274 -0
  51. package/src/stories/AppFrame.stories.ts +46 -0
  52. package/src/stories/AppLayout.stories.ts +870 -0
  53. package/src/stories/Button.stories.ts +101 -0
  54. package/src/stories/Card.stories.ts +152 -0
  55. package/src/stories/Carousel.stories.ts +62 -0
  56. package/src/stories/CarouselBanner.stories.ts +103 -0
  57. package/src/stories/CheckBox.stories.ts +76 -0
  58. package/src/stories/ComboBox.stories.ts +524 -0
  59. package/src/stories/Dialog.stories.ts +174 -0
  60. package/src/stories/Disclosure.stories.ts +217 -0
  61. package/src/stories/Divider.stories.ts +68 -0
  62. package/src/stories/Drawer.stories.ts +135 -0
  63. package/src/stories/DropDown.stories.ts +195 -0
  64. package/src/stories/FloatingBanner.stories.ts +79 -0
  65. package/src/stories/Form.stories.ts +704 -0
  66. package/src/stories/Gallery.stories.ts +78 -0
  67. package/src/stories/Grid.stories.ts +357 -0
  68. package/src/stories/Hero.stories.ts +52 -0
  69. package/src/stories/Html.stories.ts +178 -0
  70. package/src/stories/Icon.stories.ts +176 -0
  71. package/src/stories/Image.stories.ts +613 -0
  72. package/src/stories/Label.stories.ts +54 -0
  73. package/src/stories/List.stories.ts +112 -0
  74. package/src/stories/Modal.stories.ts +123 -0
  75. package/src/stories/Notification.stories.ts +82 -0
  76. package/src/stories/Page.stories.ts +414 -0
  77. package/src/stories/PasswordField.stories.ts +304 -0
  78. package/src/stories/ProductLabels.stories.ts +65 -0
  79. package/src/stories/ProductList.stories.ts +679 -0
  80. package/src/stories/ProductPurchase.stories.ts +807 -0
  81. package/src/stories/Progress.stories.ts +192 -0
  82. package/src/stories/Radio.stories.ts +81 -0
  83. package/src/stories/Section.stories.ts +244 -0
  84. package/src/stories/SelectBox.stories.ts +377 -0
  85. package/src/stories/SkeletonLoader.stories.ts +170 -0
  86. package/src/stories/Slider.stories.ts +79 -0
  87. package/src/stories/SnsLink.stories.ts +259 -0
  88. package/src/stories/SoldStacker.stories.ts +68 -0
  89. package/src/stories/SpinButton.stories.ts +134 -0
  90. package/src/stories/Spinner.stories.ts +58 -0
  91. package/src/stories/Stack.stories.ts +104 -0
  92. package/src/stories/Switch.stories.ts +68 -0
  93. package/src/stories/Tab.stories.ts +52 -0
  94. package/src/stories/TabPanels.stories.ts +67 -0
  95. package/src/stories/Tabs.stories.ts +68 -0
  96. package/src/stories/Text.stories.ts +69 -0
  97. package/src/stories/TextArea.stories.ts +78 -0
  98. package/src/stories/TextField.stories.ts +97 -0
  99. package/src/stories/ToolChip.stories.ts +125 -0
  100. package/dist/components/elements/SkeltonLoader.vue.d.ts +0 -7
  101. package/dist/components/elements/SkeltonLoader.vue.d.ts.map +0 -1
@@ -0,0 +1,192 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import Progress, { ProgressProps } from '@/components/elements/Progress.vue'
3
+
4
+ const meta: Meta<typeof Progress> = {
5
+ title: 'Elements/Progress',
6
+ component: Progress,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ value: { control: 'number' },
10
+ max: { control: 'number' },
11
+ variant: { control: 'select', options: ['linear'] },
12
+ showLabel: { control: 'boolean' },
13
+ labelType: { control: 'select', options: ['percent', 'fraction'] },
14
+ color: {
15
+ control: 'select',
16
+ options: [
17
+ 'primary',
18
+ 'secondary',
19
+ 'warning',
20
+ 'danger',
21
+ 'success',
22
+ 'info',
23
+ 'default',
24
+ 'subtle',
25
+ 'muted',
26
+ 'light',
27
+ ],
28
+ },
29
+ },
30
+ args: {
31
+ value: 50,
32
+ max: 100,
33
+ variant: 'linear',
34
+ showLabel: false,
35
+ labelType: 'percent',
36
+ color: 'default',
37
+ },
38
+ }
39
+
40
+ export default meta
41
+ type StoryArgs = ProgressProps
42
+ type Story = StoryObj<StoryArgs>
43
+ type OverridesStory = Omit<Story, 'argTypes'> & {
44
+ argTypes?: Record<string, any>
45
+ }
46
+
47
+ export const 基本: OverridesStory = {
48
+ args: {
49
+ value: 50,
50
+ max: 100,
51
+ },
52
+ render: (args: StoryArgs) => ({
53
+ components: { 'rn-progress': Progress },
54
+ setup() {
55
+ return { args }
56
+ },
57
+ template: /* html */ `
58
+ <div class='sb-canvas' style="width: 300px;">
59
+ <rn-progress
60
+ :value="args.value"
61
+ :max="args.max"
62
+ :variant="args.variant"
63
+ :show-label="args.showLabel"
64
+ :label-type="args.labelType"
65
+ :color="args.color"
66
+ />
67
+ </div>
68
+ `,
69
+ }),
70
+ }
71
+
72
+ export const パーセント表示: OverridesStory = {
73
+ args: {
74
+ value: 75,
75
+ max: 100,
76
+ showLabel: true,
77
+ labelType: 'percent',
78
+ },
79
+ render: (args: StoryArgs) => ({
80
+ components: { 'rn-progress': Progress },
81
+ setup() {
82
+ return { args }
83
+ },
84
+ template: /* html */ `
85
+ <div class='sb-canvas' style="width: 300px;">
86
+ <rn-progress
87
+ :value="args.value"
88
+ :max="args.max"
89
+ :variant="args.variant"
90
+ :show-label="args.showLabel"
91
+ :label-type="args.labelType"
92
+ :color="args.color"
93
+ />
94
+ </div>
95
+ `,
96
+ }),
97
+ }
98
+
99
+ export const 分数表示: OverridesStory = {
100
+ args: {
101
+ value: 1,
102
+ max: 4,
103
+ showLabel: true,
104
+ labelType: 'fraction',
105
+ },
106
+ render: (args: StoryArgs) => ({
107
+ components: { 'rn-progress': Progress },
108
+ setup() {
109
+ return { args }
110
+ },
111
+ template: /* html */ `
112
+ <div class='sb-canvas' style="width: 300px;">
113
+ <rn-progress
114
+ :value="args.value"
115
+ :max="args.max"
116
+ :variant="args.variant"
117
+ :show-label="args.showLabel"
118
+ :label-type="args.labelType"
119
+ :color="args.color"
120
+ />
121
+ </div>
122
+ `,
123
+ }),
124
+ }
125
+
126
+ export const カラーバリエーション: OverridesStory = {
127
+ args: {
128
+ value: 60,
129
+ max: 100,
130
+ showLabel: true,
131
+ labelType: 'percent',
132
+ },
133
+ render: (args: StoryArgs) => ({
134
+ components: { 'rn-progress': Progress },
135
+ setup() {
136
+ const colors = [
137
+ 'primary',
138
+ 'secondary',
139
+ 'warning',
140
+ 'danger',
141
+ 'success',
142
+ 'info',
143
+ 'default',
144
+ 'subtle',
145
+ ]
146
+ return { args, colors }
147
+ },
148
+ template: /* html */ `
149
+ <div class='sb-canvas' style="width: 300px; display: flex; flex-direction: column; gap: 16px;">
150
+ <div v-for="color in colors" :key="color" style="display: flex; flex-direction: column; gap: 4px;">
151
+ <span style="font-size: 12px; color: #666;">{{ color }}</span>
152
+ <rn-progress
153
+ :value="args.value"
154
+ :max="args.max"
155
+ :show-label="args.showLabel"
156
+ :label-type="args.labelType"
157
+ :color="color"
158
+ />
159
+ </div>
160
+ </div>
161
+ `,
162
+ }),
163
+ }
164
+
165
+ export const ステップ進捗: OverridesStory = {
166
+ args: {
167
+ value: 2,
168
+ max: 5,
169
+ showLabel: true,
170
+ labelType: 'fraction',
171
+ color: 'primary',
172
+ },
173
+ render: (args: StoryArgs) => ({
174
+ components: { 'rn-progress': Progress },
175
+ setup() {
176
+ return { args }
177
+ },
178
+ template: /* html */ `
179
+ <div class='sb-canvas' style="width: 300px;">
180
+ <p style="margin-bottom: 8px; font-size: 14px;">ステップ進捗表示の例</p>
181
+ <rn-progress
182
+ :value="args.value"
183
+ :max="args.max"
184
+ :variant="args.variant"
185
+ :show-label="args.showLabel"
186
+ :label-type="args.labelType"
187
+ :color="args.color"
188
+ />
189
+ </div>
190
+ `,
191
+ }),
192
+ }
@@ -0,0 +1,81 @@
1
+ import { ref } from 'vue'
2
+ import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import Radio, { type RadioProps } from '@/components/elements/Radio.vue'
4
+
5
+ const meta: Meta<typeof Radio> = {
6
+ title: 'Elements/Radio',
7
+ component: Radio,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ docs: {
11
+ description: {
12
+ component: 'ラジオボタン用コンポーネント',
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ name: {
18
+ control: {
19
+ type: 'text',
20
+ },
21
+ },
22
+ items: {
23
+ label: {
24
+ control: 'text',
25
+ },
26
+ value: {
27
+ control: 'text',
28
+ },
29
+ },
30
+ direction: {
31
+ control: 'select',
32
+ options: ['horizontal', 'vertical'],
33
+ },
34
+ },
35
+ args: {
36
+ name: 'animal',
37
+ items: [
38
+ {
39
+ label: '犬',
40
+ value: 'dog',
41
+ },
42
+ {
43
+ label: '猫',
44
+ value: 'cat',
45
+ },
46
+ ],
47
+ direction: 'horizontal',
48
+ },
49
+ render: (args) => ({
50
+ components: { 'rn-radio': Radio },
51
+ setup() {
52
+ const selectedValue = ref('')
53
+ return { args, selectedValue }
54
+ },
55
+ template: /* html */ `
56
+ <div class='sb-canvas'>
57
+ <rn-radio
58
+ :name=args.name
59
+ :items=args.items
60
+ :direction=args.direction
61
+ v-model=selectedValue
62
+ />
63
+ <p style='margin-top: 24px;'>
64
+ 選択中:{{ selectedValue }}
65
+ </p>
66
+ </div>
67
+ `,
68
+ }),
69
+ }
70
+
71
+ export default meta
72
+ type StoryArgs = RadioProps
73
+ type Story = StoryObj<StoryArgs>
74
+ type OverridesStory = Omit<Story, 'argTypes'> & {
75
+ argTypes?: Record<string, RadioProps>
76
+ }
77
+
78
+ export const 基本: OverridesStory = {
79
+ args: {},
80
+ argTypes: {},
81
+ }
@@ -0,0 +1,244 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import Section, { SectionProps } from '@/components/layouts/Section.vue'
3
+ import Button from '@/components/elements/Button.vue'
4
+ import Card from '@/components/layouts/Card.vue'
5
+
6
+ const meta: Meta<typeof Section> = {
7
+ title: 'Layouts/Section',
8
+ component: Section,
9
+ tags: ['autodocs'],
10
+ argTypes: {
11
+ headerAlign: { control: 'select', options: ['left', 'center', 'right'] },
12
+ eyebrowFont: {
13
+ control: 'select',
14
+ options: ['default', 'key', 'accent', 'mono'],
15
+ },
16
+ titleFont: {
17
+ control: 'select',
18
+ options: ['default', 'key', 'accent', 'mono'],
19
+ },
20
+ descriptionFont: {
21
+ control: 'select',
22
+ options: ['default', 'key', 'accent', 'mono'],
23
+ },
24
+ fluid: { control: 'boolean' },
25
+ },
26
+ args: {
27
+ headerAlign: 'left',
28
+ eyebrowFont: 'default',
29
+ titleFont: 'default',
30
+ descriptionFont: 'default',
31
+ fluid: false,
32
+ },
33
+ }
34
+
35
+ export default meta
36
+ type StoryArgs = SectionProps & {
37
+ bodyContent?: string
38
+ actionContent?: string
39
+ extraContent?: string
40
+ footerContent?: string
41
+ }
42
+ type Story = StoryObj<StoryArgs>
43
+
44
+ export const 基本: Story = {
45
+ args: {
46
+ title: 'セクションタイトル',
47
+ description:
48
+ 'セクションの説明文です。このエリアにはセクションの詳細な説明や概要を記述します。',
49
+ bodyContent: 'メインコンテンツエリアです。',
50
+ },
51
+ render: (args) => ({
52
+ components: { Section },
53
+ setup() {
54
+ return { args }
55
+ },
56
+ template: `
57
+ <Section v-bind="args">
58
+ <template #body>
59
+ {{ args.bodyContent }}
60
+ </template>
61
+ </Section>
62
+ `,
63
+ }),
64
+ }
65
+
66
+ export const アイブロウ付き: Story = {
67
+ args: {
68
+ eyebrow: 'NEW',
69
+ title: '新商品のご紹介',
70
+ description:
71
+ '待望の新商品が登場しました。これまでにない革新的な機能を搭載しています。',
72
+ bodyContent: '商品詳細がここに入ります。',
73
+ },
74
+ render: (args) => ({
75
+ components: { Section },
76
+ setup() {
77
+ return { args }
78
+ },
79
+ template: `
80
+ <Section v-bind="args">
81
+ <template #body>
82
+ {{ args.bodyContent }}
83
+ </template>
84
+ </Section>
85
+ `,
86
+ }),
87
+ }
88
+
89
+ export const アクションボタン付き: Story = {
90
+ args: {
91
+ title: 'Ready to Ship Now',
92
+ description: '在庫がある商品をすぐに発送できます。お早めにご注文ください。',
93
+ bodyContent: '商品一覧がここに表示されます。',
94
+ },
95
+ render: (args) => ({
96
+ components: { Section, Button },
97
+ setup() {
98
+ return { args }
99
+ },
100
+ template: `
101
+ <Section v-bind="args">
102
+ <template #action>
103
+ <Button variant="text" color="primary">すべて見る</Button>
104
+ </template>
105
+ <template #body>
106
+ <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;">
107
+ <div style="padding: 16px; border: 1px solid #ddd; border-radius: 8px;">商品1</div>
108
+ <div style="padding: 16px; border: 1px solid #ddd; border-radius: 8px;">商品2</div>
109
+ <div style="padding: 16px; border: 1px solid #ddd; border-radius: 8px;">商品3</div>
110
+ </div>
111
+ </template>
112
+ </Section>
113
+ `,
114
+ }),
115
+ }
116
+
117
+ export const 中央揃え: Story = {
118
+ args: {
119
+ eyebrow: 'FEATURED',
120
+ title: '注目の商品',
121
+ description: '今最も人気の商品をご紹介します。',
122
+ headerAlign: 'center',
123
+ bodyContent: 'フィーチャードコンテンツ',
124
+ },
125
+ render: (args) => ({
126
+ components: { Section },
127
+ setup() {
128
+ return { args }
129
+ },
130
+ template: `
131
+ <Section v-bind="args">
132
+ <template #body>
133
+ <div style="text-align: center;">
134
+ {{ args.bodyContent }}
135
+ </div>
136
+ </template>
137
+ </Section>
138
+ `,
139
+ }),
140
+ }
141
+
142
+ export const 背景色付き: Story = {
143
+ args: {
144
+ title: '特別オファー',
145
+ description: '期間限定の特別価格でご提供しています。',
146
+ backgroundColor: '#f8f9fa',
147
+ bodyContent: '限定商品一覧',
148
+ },
149
+ render: (args) => ({
150
+ components: { Section },
151
+ setup() {
152
+ return { args }
153
+ },
154
+ template: `
155
+ <Section v-bind="args">
156
+ <template #body>
157
+ {{ args.bodyContent }}
158
+ </template>
159
+ </Section>
160
+ `,
161
+ }),
162
+ }
163
+
164
+ export const 全体的な例: Story = {
165
+ args: {
166
+ eyebrow: 'SPECIAL COLLECTION',
167
+ title: 'アーティストコラボ商品',
168
+ description:
169
+ '人気アーティストとのコラボレーション商品を集めました。数量限定のため、お早めにどうぞ。',
170
+ bodyContent: '',
171
+ },
172
+ render: (args) => ({
173
+ components: { Section, Button, Card },
174
+ setup() {
175
+ return { args }
176
+ },
177
+ template: `
178
+ <Section v-bind="args">
179
+ <template #action>
180
+ <Button variant="fill" color="primary">コレクション一覧</Button>
181
+ </template>
182
+ <template #extra>
183
+ <div style="display: flex; gap: 8px; flex-wrap: wrap;">
184
+ <Button variant="text" size="sm">Tシャツ</Button>
185
+ <Button variant="text" size="sm">パーカー</Button>
186
+ <Button variant="text" size="sm">アクセサリー</Button>
187
+ <Button variant="text" size="sm">バッグ</Button>
188
+ </div>
189
+ </template>
190
+ <template #body>
191
+ <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px;">
192
+ <Card>
193
+ <div style="height: 200px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;">
194
+ 商品画像
195
+ </div>
196
+ <h3 style="margin: 0 0 8px 0;">アーティストTシャツ A</h3>
197
+ <p style="margin: 0 0 12px 0; color: #666;">¥4,500</p>
198
+ <Button variant="fill" color="primary" size="sm">カートに追加</Button>
199
+ </Card>
200
+ <Card>
201
+ <div style="height: 200px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;">
202
+ 商品画像
203
+ </div>
204
+ <h3 style="margin: 0 0 8px 0;">アーティストTシャツ B</h3>
205
+ <p style="margin: 0 0 12px 0; color: #666;">¥4,800</p>
206
+ <Button variant="fill" color="primary" size="sm">カートに追加</Button>
207
+ </Card>
208
+ </div>
209
+ </template>
210
+ <template #footer>
211
+ <div style="text-align: center; padding-top: 24px;">
212
+ <Button variant="text" color="muted">さらに読み込む</Button>
213
+ </div>
214
+ </template>
215
+ </Section>
216
+ `,
217
+ }),
218
+ }
219
+
220
+ export const フルード: Story = {
221
+ args: {
222
+ title: 'フルスクリーン セクション',
223
+ description: '画面幅いっぱいに表示されるセクションです。',
224
+ fluid: true,
225
+ backgroundColor: '#1a1a1a',
226
+ textColor: '#ffffff',
227
+ headerAlign: 'center',
228
+ },
229
+ render: (args) => ({
230
+ components: { Section },
231
+ setup() {
232
+ return { args }
233
+ },
234
+ template: `
235
+ <Section v-bind="args">
236
+ <template #body>
237
+ <div style="text-align: center; padding: 40px 0;">
238
+ <p style="color: #ffffff; margin: 0;">フルスクリーンコンテンツエリア</p>
239
+ </div>
240
+ </template>
241
+ </Section>
242
+ `,
243
+ }),
244
+ }