@reni-corp/reni-2c-ui 0.3.291 → 0.4.1

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 (242) hide show
  1. package/README.md +131 -0
  2. package/dist/__tests__/helpers/assert-contract.d.ts +9 -0
  3. package/dist/__tests__/helpers/assert-contract.d.ts.map +1 -0
  4. package/dist/__tests__/helpers/contract-helpers.d.ts +45 -0
  5. package/dist/__tests__/helpers/contract-helpers.d.ts.map +1 -0
  6. package/dist/__tests__/setup.d.ts +1 -0
  7. package/dist/__tests__/setup.d.ts.map +1 -0
  8. package/dist/components/elements/Alert.vue.d.ts +14 -36
  9. package/dist/components/elements/Alert.vue.d.ts.map +1 -1
  10. package/dist/components/elements/Button.vue.d.ts +13 -41
  11. package/dist/components/elements/Button.vue.d.ts.map +1 -1
  12. package/dist/components/elements/CheckBox.vue.d.ts +11 -60
  13. package/dist/components/elements/CheckBox.vue.d.ts.map +1 -1
  14. package/dist/components/elements/ComboBox.vue.d.ts +34 -116
  15. package/dist/components/elements/ComboBox.vue.d.ts.map +1 -1
  16. package/dist/components/elements/DescriptionList.vue.d.ts +12 -27
  17. package/dist/components/elements/DescriptionList.vue.d.ts.map +1 -1
  18. package/dist/components/elements/Divider.vue.d.ts +3 -27
  19. package/dist/components/elements/Divider.vue.d.ts.map +1 -1
  20. package/dist/components/elements/Html.vue.d.ts +2 -32
  21. package/dist/components/elements/Html.vue.d.ts.map +1 -1
  22. package/dist/components/elements/Icon.vue.d.ts +4 -28
  23. package/dist/components/elements/Icon.vue.d.ts.map +1 -1
  24. package/dist/components/elements/Image.vue.d.ts +19 -43
  25. package/dist/components/elements/Image.vue.d.ts.map +1 -1
  26. package/dist/components/elements/Label.vue.d.ts +13 -33
  27. package/dist/components/elements/Label.vue.d.ts.map +1 -1
  28. package/dist/components/elements/PasswordField.vue.d.ts +13 -151
  29. package/dist/components/elements/PasswordField.vue.d.ts.map +1 -1
  30. package/dist/components/elements/Progress.vue.d.ts +3 -31
  31. package/dist/components/elements/Progress.vue.d.ts.map +1 -1
  32. package/dist/components/elements/RadioButton.vue.d.ts +17 -28
  33. package/dist/components/elements/RadioButton.vue.d.ts.map +1 -1
  34. package/dist/components/elements/RadioButtonGroup.vue.d.ts +26 -75
  35. package/dist/components/elements/RadioButtonGroup.vue.d.ts.map +1 -1
  36. package/dist/components/elements/SelectBox.vue.d.ts +30 -121
  37. package/dist/components/elements/SelectBox.vue.d.ts.map +1 -1
  38. package/dist/components/elements/SkeletonLoader.vue.d.ts +2 -24
  39. package/dist/components/elements/SkeletonLoader.vue.d.ts.map +1 -1
  40. package/dist/components/elements/SpinButton.vue.d.ts +23 -52
  41. package/dist/components/elements/SpinButton.vue.d.ts.map +1 -1
  42. package/dist/components/elements/Spinner.vue.d.ts +3 -27
  43. package/dist/components/elements/Spinner.vue.d.ts.map +1 -1
  44. package/dist/components/elements/Text.vue.d.ts +12 -34
  45. package/dist/components/elements/Text.vue.d.ts.map +1 -1
  46. package/dist/components/elements/TextField.vue.d.ts +23 -146
  47. package/dist/components/elements/TextField.vue.d.ts.map +1 -1
  48. package/dist/components/elements/ToolChip.vue.d.ts +11 -33
  49. package/dist/components/elements/ToolChip.vue.d.ts.map +1 -1
  50. package/dist/components/features/AnnounceBar.vue.d.ts +11 -29
  51. package/dist/components/features/AnnounceBar.vue.d.ts.map +1 -1
  52. package/dist/components/features/AnnounceBarCollection.vue.d.ts +10 -34
  53. package/dist/components/features/AnnounceBarCollection.vue.d.ts.map +1 -1
  54. package/dist/components/features/Banner.vue.d.ts +22 -0
  55. package/dist/components/features/Banner.vue.d.ts.map +1 -0
  56. package/dist/components/features/BrandLogo.vue.d.ts +2 -24
  57. package/dist/components/features/BrandLogo.vue.d.ts.map +1 -1
  58. package/dist/components/features/CategoryBanner.vue.d.ts +3 -30
  59. package/dist/components/features/CategoryBanner.vue.d.ts.map +1 -1
  60. package/dist/components/features/FloatingBanner.vue.d.ts +3 -21
  61. package/dist/components/features/FloatingBanner.vue.d.ts.map +1 -1
  62. package/dist/components/features/Hero.vue.d.ts +32 -52
  63. package/dist/components/features/Hero.vue.d.ts.map +1 -1
  64. package/dist/components/features/ImageGrid.vue.d.ts +3 -30
  65. package/dist/components/features/ImageGrid.vue.d.ts.map +1 -1
  66. package/dist/components/features/LinkList.vue.d.ts +3 -28
  67. package/dist/components/features/LinkList.vue.d.ts.map +1 -1
  68. package/dist/components/features/Marquee.vue.d.ts +19 -49
  69. package/dist/components/features/Marquee.vue.d.ts.map +1 -1
  70. package/dist/components/features/MediaContent.vue.d.ts +14 -36
  71. package/dist/components/features/MediaContent.vue.d.ts.map +1 -1
  72. package/dist/components/features/ProductLabels.vue.d.ts +1 -19
  73. package/dist/components/features/ProductLabels.vue.d.ts.map +1 -1
  74. package/dist/components/features/ProductList.vue.d.ts +63 -88
  75. package/dist/components/features/ProductList.vue.d.ts.map +1 -1
  76. package/dist/components/features/ProductListItem.vue.d.ts +7 -35
  77. package/dist/components/features/ProductListItem.vue.d.ts.map +1 -1
  78. package/dist/components/features/ProductPurchase.vue.d.ts +12 -43
  79. package/dist/components/features/ProductPurchase.vue.d.ts.map +1 -1
  80. package/dist/components/features/Schedule.vue.d.ts +11 -29
  81. package/dist/components/features/Schedule.vue.d.ts.map +1 -1
  82. package/dist/components/features/ScheduleDateItem.vue.d.ts +2 -26
  83. package/dist/components/features/ScheduleDateItem.vue.d.ts.map +1 -1
  84. package/dist/components/features/ScheduleDelivery.vue.d.ts +10 -26
  85. package/dist/components/features/ScheduleDelivery.vue.d.ts.map +1 -1
  86. package/dist/components/features/ScheduleDeliveryItem.vue.d.ts +2 -24
  87. package/dist/components/features/ScheduleDeliveryItem.vue.d.ts.map +1 -1
  88. package/dist/components/features/SchedulePeriod.vue.d.ts +2 -26
  89. package/dist/components/features/SchedulePeriod.vue.d.ts.map +1 -1
  90. package/dist/components/features/SchedulePickup.vue.d.ts +10 -26
  91. package/dist/components/features/SchedulePickup.vue.d.ts.map +1 -1
  92. package/dist/components/features/SchedulePickupItem.vue.d.ts +2 -24
  93. package/dist/components/features/SchedulePickupItem.vue.d.ts.map +1 -1
  94. package/dist/components/features/Schedules.vue.d.ts +10 -22
  95. package/dist/components/features/Schedules.vue.d.ts.map +1 -1
  96. package/dist/components/features/SnsLink.vue.d.ts +3 -29
  97. package/dist/components/features/SnsLink.vue.d.ts.map +1 -1
  98. package/dist/components/foundation/AppBar.vue.d.ts +15 -40
  99. package/dist/components/foundation/AppBar.vue.d.ts.map +1 -1
  100. package/dist/components/foundation/AppBody.vue.d.ts +9 -4
  101. package/dist/components/foundation/AppBody.vue.d.ts.map +1 -1
  102. package/dist/components/foundation/AppFooter.vue.d.ts +13 -35
  103. package/dist/components/foundation/AppFooter.vue.d.ts.map +1 -1
  104. package/dist/components/foundation/AppFrame.vue.d.ts +10 -5
  105. package/dist/components/foundation/AppFrame.vue.d.ts.map +1 -1
  106. package/dist/components/interactive/Dialog.vue.d.ts +18 -40
  107. package/dist/components/interactive/Dialog.vue.d.ts.map +1 -1
  108. package/dist/components/interactive/Disclosure.vue.d.ts +22 -37
  109. package/dist/components/interactive/Disclosure.vue.d.ts.map +1 -1
  110. package/dist/components/interactive/DropDown.vue.d.ts +20 -34
  111. package/dist/components/interactive/DropDown.vue.d.ts.map +1 -1
  112. package/dist/components/interactive/Gallery.vue.d.ts +2 -34
  113. package/dist/components/interactive/Gallery.vue.d.ts.map +1 -1
  114. package/dist/components/interactive/Lightbox.vue.d.ts +32 -0
  115. package/dist/components/interactive/Lightbox.vue.d.ts.map +1 -0
  116. package/dist/components/interactive/Modal.vue.d.ts +15 -33
  117. package/dist/components/interactive/Modal.vue.d.ts.map +1 -1
  118. package/dist/components/interactive/Notification.vue.d.ts +5 -35
  119. package/dist/components/interactive/Notification.vue.d.ts.map +1 -1
  120. package/dist/components/interactive/Slider.vue.d.ts +32 -28
  121. package/dist/components/interactive/Slider.vue.d.ts.map +1 -1
  122. package/dist/components/interactive/Tab.vue.d.ts +17 -25
  123. package/dist/components/interactive/Tab.vue.d.ts.map +1 -1
  124. package/dist/components/interactive/TabGroup.vue.d.ts +25 -0
  125. package/dist/components/interactive/TabGroup.vue.d.ts.map +1 -0
  126. package/dist/components/interactive/TabPanel.vue.d.ts +9 -3
  127. package/dist/components/interactive/TabPanel.vue.d.ts.map +1 -1
  128. package/dist/components/interactive/TabPanels.vue.d.ts +27 -32
  129. package/dist/components/interactive/TabPanels.vue.d.ts.map +1 -1
  130. package/dist/components/interactive/Tabs.vue.d.ts +31 -31
  131. package/dist/components/interactive/Tabs.vue.d.ts.map +1 -1
  132. package/dist/components/layouts/Card.vue.d.ts +12 -30
  133. package/dist/components/layouts/Card.vue.d.ts.map +1 -1
  134. package/dist/components/layouts/Grid.vue.d.ts +11 -32
  135. package/dist/components/layouts/Grid.vue.d.ts.map +1 -1
  136. package/dist/components/layouts/List.vue.d.ts +28 -42
  137. package/dist/components/layouts/List.vue.d.ts.map +1 -1
  138. package/dist/components/layouts/Page.vue.d.ts +33 -62
  139. package/dist/components/layouts/Page.vue.d.ts.map +1 -1
  140. package/dist/components/layouts/Section.vue.d.ts +22 -41
  141. package/dist/components/layouts/Section.vue.d.ts.map +1 -1
  142. package/dist/components/layouts/Stack.vue.d.ts +12 -40
  143. package/dist/components/layouts/Stack.vue.d.ts.map +1 -1
  144. package/dist/components/navigation/BottomBar.vue.d.ts +10 -26
  145. package/dist/components/navigation/BottomBar.vue.d.ts.map +1 -1
  146. package/dist/components/navigation/Drawer.vue.d.ts +14 -32
  147. package/dist/components/navigation/Drawer.vue.d.ts.map +1 -1
  148. package/dist/components/renderless/DataProvider.vue.d.ts +19 -42
  149. package/dist/components/renderless/DataProvider.vue.d.ts.map +1 -1
  150. package/dist/components/renderless/Form.vue.d.ts +22 -43
  151. package/dist/components/renderless/Form.vue.d.ts.map +1 -1
  152. package/dist/components/renderless/OptionGroupSwitchController.vue.d.ts +20 -43
  153. package/dist/components/renderless/OptionGroupSwitchController.vue.d.ts.map +1 -1
  154. package/dist/composable/useAppNotifications.d.ts +0 -1
  155. package/dist/composable/useToolChip.d.ts +0 -1
  156. package/dist/composables.d.ts +0 -1
  157. package/dist/composables.es.js +5 -6
  158. package/dist/contexts/tabGroup.d.ts +17 -0
  159. package/dist/contexts/tabGroup.d.ts.map +1 -0
  160. package/dist/directives/auto-scale.d.ts +0 -1
  161. package/dist/directives/glitch.d.ts +0 -1
  162. package/dist/{index-a725a791.js → index-D7ldGb8i.js} +18 -30
  163. package/dist/index.d.ts +8 -11
  164. package/dist/index.d.ts.map +1 -1
  165. package/dist/index.es.js +6795 -6735
  166. package/dist/script.es.js +8571 -8506
  167. package/dist/script.umd.js +28 -28
  168. package/dist/style.css +1 -1
  169. package/dist/types.d.ts +0 -1
  170. package/dist/{composables-93778bb4.js → useAppDialogGuidance-Bs1h3YmP.js} +1060 -1044
  171. package/dist/utils.d.ts +46 -1
  172. package/dist/utils.d.ts.map +1 -1
  173. package/dist/validation.d.ts +0 -1
  174. package/dist/valueObjects/CurrencyValue.d.ts +0 -1
  175. package/dist/valueObjects/NumberValue.d.ts +0 -1
  176. package/dist/{valueObjects-e0ea7f1b.js → valueObjects-CvF0zaqR.js} +1 -1
  177. package/dist/valueObjects.es.js +1 -1
  178. package/package.json +29 -28
  179. package/src/stories/Alert.stories.ts +1 -1
  180. package/src/stories/AnnounceBar.stories.ts +1 -1
  181. package/src/stories/AnnounceBarCollection.stories.ts +135 -0
  182. package/src/stories/AppBar.stories.ts +6 -2
  183. package/src/stories/AppFooter.stories.ts +1 -1
  184. package/src/stories/AppFrame.stories.ts +1 -1
  185. package/src/stories/AppLayout.stories.ts +5 -16
  186. package/src/stories/Banner.stories.ts +235 -0
  187. package/src/stories/Button.stories.ts +1 -1
  188. package/src/stories/Card.stories.ts +1 -1
  189. package/src/stories/CheckBox.stories.ts +84 -22
  190. package/src/stories/ComboBox.stories.ts +62 -2
  191. package/src/stories/Dialog.stories.ts +1 -1
  192. package/src/stories/Disclosure.stories.ts +1 -1
  193. package/src/stories/Divider.stories.ts +1 -1
  194. package/src/stories/Drawer.stories.ts +1 -1
  195. package/src/stories/DropDown.stories.ts +1 -1
  196. package/src/stories/FloatingBanner.stories.ts +1 -1
  197. package/src/stories/Form.stories.ts +96 -1
  198. package/src/stories/Gallery.stories.ts +1 -1
  199. package/src/stories/Grid.stories.ts +1 -1
  200. package/src/stories/Hero.stories.ts +175 -26
  201. package/src/stories/Html.stories.ts +69 -1
  202. package/src/stories/Icon.stories.ts +1 -1
  203. package/src/stories/Image.stories.ts +1 -1
  204. package/src/stories/Label.stories.ts +97 -4
  205. package/src/stories/Lightbox.stories.ts +231 -0
  206. package/src/stories/List.stories.ts +62 -15
  207. package/src/stories/Modal.stories.ts +1 -1
  208. package/src/stories/Notification.stories.ts +1 -1
  209. package/src/stories/Page.stories.ts +36 -1
  210. package/src/stories/PasswordField.stories.ts +1 -1
  211. package/src/stories/ProductList.stories.ts +65 -3
  212. package/src/stories/ProductPurchase.stories.ts +2 -2
  213. package/src/stories/Progress.stories.ts +1 -1
  214. package/src/stories/Radio.stories.ts +130 -12
  215. package/src/stories/Section.stories.ts +29 -4
  216. package/src/stories/SelectBox.stories.ts +56 -1
  217. package/src/stories/SkeletonLoader.stories.ts +1 -1
  218. package/src/stories/Slider.stories.ts +365 -7
  219. package/src/stories/SnsLink.stories.ts +1 -1
  220. package/src/stories/SpinButton.stories.ts +1 -1
  221. package/src/stories/Spinner.stories.ts +1 -1
  222. package/src/stories/Stack.stories.ts +1 -1
  223. package/src/stories/Switch.stories.ts +1 -1
  224. package/src/stories/Tab.stories.ts +28 -11
  225. package/src/stories/TabGroup.stories.ts +290 -0
  226. package/src/stories/TabPanels.stories.ts +1 -1
  227. package/src/stories/Tabs.stories.ts +104 -3
  228. package/src/stories/Text.stories.ts +24 -1
  229. package/src/stories/TextArea.stories.ts +78 -1
  230. package/src/stories/TextField.stories.ts +75 -2
  231. package/src/stories/ToolChip.stories.ts +1 -1
  232. package/src/stories/compositions/EventPage.stories.ts +184 -0
  233. package/src/stories/compositions/FormPage.stories.ts +222 -0
  234. package/src/stories/compositions/TopPage.stories.ts +164 -0
  235. package/dist/components/features/CarouselBanner.vue.d.ts +0 -36
  236. package/dist/components/features/CarouselBanner.vue.d.ts.map +0 -1
  237. package/dist/components/features/VariationSelector.vue.d.ts +0 -39
  238. package/dist/components/features/VariationSelector.vue.d.ts.map +0 -1
  239. package/src/stories/Carousel.stories.ts +0 -62
  240. package/src/stories/CarouselBanner.stories.ts +0 -103
  241. package/src/stories/ProductLabels.stories.ts +0 -65
  242. package/src/stories/SoldStacker.stories.ts +0 -68
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Form from '@/components/renderless/Form.vue'
3
3
  import TextField from '@/components/elements/TextField.vue'
4
4
  import SelectBox from '@/components/elements/SelectBox.vue'
@@ -702,3 +702,98 @@ export const パスワードフィールド付き: OverridesStory = {
702
702
  `,
703
703
  }),
704
704
  }
705
+
706
+ export const vModelInvalid同期: OverridesStory = {
707
+ args: {},
708
+ render: (args: StoryArgs) => ({
709
+ components: {
710
+ 'rn-form': Form,
711
+ 'rn-text-field': TextField,
712
+ 'rn-button': Button,
713
+ 'rn-stack': Stack,
714
+ },
715
+ setup() {
716
+ const name = ref('')
717
+ const email = ref('')
718
+ // v-model:invalid で同期される状態
719
+ const isFormInvalid = ref(true)
720
+
721
+ const handleSubmit = () => {
722
+ alert('フォームが送信されました!')
723
+ }
724
+
725
+ return {
726
+ args,
727
+ name,
728
+ email,
729
+ isFormInvalid,
730
+ handleSubmit,
731
+ }
732
+ },
733
+ template: /* html */ `
734
+ <div class='sb-canvas'>
735
+ <rn-stack direction="vertical" gap="lg">
736
+ <!-- フォーム外でinvalidの状態を表示 -->
737
+ <div style="padding: 16px; background: #e3f2fd; border-radius: 8px; font-size: 14px;">
738
+ <h4 style="margin: 0 0 12px 0; color: #1565c0;">v-model:invalid の使用例</h4>
739
+ <p style="margin: 0 0 8px 0; color: #333;">
740
+ <code>v-model:invalid</code> を使用すると、フォームの無効状態を親コンポーネントで直接取得できます。
741
+ </p>
742
+ <div style="padding: 8px; background: #fff; border-radius: 4px;">
743
+ <strong>isFormInvalid:</strong>
744
+ <span :style="{ color: isFormInvalid ? '#d32f2f' : '#388e3c', fontWeight: 'bold' }">
745
+ {{ isFormInvalid }}
746
+ </span>
747
+ </div>
748
+ </div>
749
+
750
+ <!-- v-model:invalid を使用したフォーム -->
751
+ <rn-form v-model:invalid="isFormInvalid">
752
+ <template #default="{ invalid, dirty }">
753
+ <div style="max-width: 400px; padding: 24px; border: 1px solid #ddd; border-radius: 8px;">
754
+ <h3 style="text-align: center; margin-bottom: 24px;">お問い合わせフォーム</h3>
755
+ <rn-stack direction="vertical" gap="md">
756
+ <rn-text-field
757
+ v-model="name"
758
+ name="name"
759
+ label="お名前"
760
+ rules="required"
761
+ placeholder="山田太郎"
762
+ />
763
+
764
+ <rn-text-field
765
+ v-model="email"
766
+ name="email"
767
+ label="メールアドレス"
768
+ rules="required|email"
769
+ placeholder="example@domain.com"
770
+ />
771
+
772
+ <!-- スロット内のinvalidも従来通り使用可能 -->
773
+ <div style="padding: 8px; background: #f5f5f5; border-radius: 4px; font-size: 12px;">
774
+ <div><strong>スロット内 invalid:</strong> {{ invalid }}</div>
775
+ <div><strong>スロット内 dirty:</strong> {{ dirty }}</div>
776
+ </div>
777
+ </rn-stack>
778
+ </div>
779
+ </template>
780
+ </rn-form>
781
+
782
+ <!-- フォーム外に配置された送信ボタン -->
783
+ <div style="padding: 16px; background: #fff3e0; border-radius: 8px;">
784
+ <p style="margin: 0 0 12px 0; font-size: 14px; color: #e65100;">
785
+ <strong>フォーム外の送信ボタン</strong>: v-model:invalid で取得した状態でdisabledを制御
786
+ </p>
787
+ <rn-button
788
+ @click="handleSubmit()"
789
+ :disabled="isFormInvalid"
790
+ color="primary"
791
+ >
792
+ 送信する(フォーム外)
793
+ </rn-button>
794
+ </div>
795
+ </rn-stack>
796
+ </div>
797
+ `,
798
+ }),
799
+ }
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Gallery, { GalleryProps } from '@/components/interactive/Gallery.vue'
3
3
  import Stack from '@/components/layouts/Stack.vue'
4
4
 
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Grid, { type GridProps } from '@/components/layouts/Grid.vue'
3
3
  import Card from '@/components/layouts/Card.vue'
4
4
  import Stack from '@/components/layouts/Stack.vue'
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Hero, { HeroProps } from '@/components/features/Hero.vue'
3
3
 
4
4
  const meta: Meta<typeof Hero> = {
@@ -6,47 +6,196 @@ const meta: Meta<typeof Hero> = {
6
6
  component: Hero,
7
7
  tags: ['autodocs'],
8
8
  argTypes: {
9
- imageUrl: {
10
- control: 'text',
9
+ layout: {
10
+ control: 'select',
11
+ options: ['vertical-split', 'horizontal-sprit', 'overlay'],
11
12
  },
12
- linkUrl: {
13
- control: 'text',
13
+ reverse: { control: 'boolean' },
14
+ media: { control: 'text' },
15
+ eyebrow: { control: 'text' },
16
+ title: { control: 'text' },
17
+ subtitle: { control: 'text' },
18
+ description: { control: 'text' },
19
+ contentAlign: {
20
+ control: 'select',
21
+ options: ['left', 'center', 'right'],
22
+ },
23
+ contentVerticalAlign: {
24
+ control: 'select',
25
+ options: ['top', 'center', 'bottom'],
26
+ },
27
+ overlayColor: { control: 'color' },
28
+ eyebrowFont: {
29
+ control: 'select',
30
+ options: ['default', 'key', 'mono'],
31
+ },
32
+ titleFont: {
33
+ control: 'select',
34
+ options: ['default', 'key', 'mono'],
35
+ },
36
+ subtitleFont: {
37
+ control: 'select',
38
+ options: ['default', 'key', 'mono'],
39
+ },
40
+ descriptionFont: {
41
+ control: 'select',
42
+ options: ['default', 'key', 'mono'],
14
43
  },
15
44
  },
16
45
  args: {
17
- imageUrl:
18
- 'https://reni-ec-pro.s3-ap-northeast-1.amazonaws.com/banner/63/d1270251298665d51cf9f298a3343257dd4559e4_sp.jpg',
19
- linkUrl: 'https://official-goods-store.jp/naoto/',
46
+ layout: 'horizontal-sprit',
47
+ reverse: false,
48
+ media: 'https://placehold.co/800x600',
49
+ eyebrow: 'NEW COLLECTION',
50
+ title: 'Spring 2025',
51
+ subtitle: '新しいスタイルをあなたに',
52
+ description:
53
+ 'この春の新作コレクションが登場しました。トレンドを取り入れた最新アイテムをチェックしてください。',
54
+ contentAlign: 'left',
55
+ contentVerticalAlign: 'top',
56
+ overlayColor: 'rgba(0, 0, 0, 0.3)',
57
+ eyebrowFont: 'default',
58
+ titleFont: 'default',
59
+ subtitleFont: 'default',
60
+ descriptionFont: 'default',
20
61
  },
21
62
  }
22
63
 
23
64
  export default meta
24
- type StoryArgs = HeroProps & { slotText: string }
25
- type Story = StoryObj<StoryArgs>
26
- type OverridesStory = Omit<Story, 'argTypes'> & {
27
- argTypes?: Record<string, any>
65
+ type Story = StoryObj<typeof meta>
66
+
67
+ export const 横並び: Story = {
68
+ render: (args) => ({
69
+ components: { 'rn-hero': Hero },
70
+ setup() {
71
+ return { args }
72
+ },
73
+ template: `
74
+ <rn-hero v-bind="args" />
75
+ `,
76
+ }),
28
77
  }
29
78
 
30
- export const 基本: OverridesStory = {
79
+ export const 縦並び: Story = {
31
80
  args: {
32
- slotText: '',
81
+ layout: 'vertical-split',
33
82
  },
34
- argTypes: {
35
- default: { table: { disable: true } },
83
+ render: (args) => ({
84
+ components: { 'rn-hero': Hero },
85
+ setup() {
86
+ return { args }
87
+ },
88
+ template: `
89
+ <rn-hero v-bind="args" />
90
+ `,
91
+ }),
92
+ }
93
+
94
+ export const 横並び_逆順: Story = {
95
+ args: {
96
+ layout: 'horizontal-sprit',
97
+ reverse: true,
98
+ },
99
+ render: (args) => ({
100
+ components: { 'rn-hero': Hero },
101
+ setup() {
102
+ return { args }
103
+ },
104
+ template: `
105
+ <rn-hero v-bind="args" />
106
+ `,
107
+ }),
108
+ }
109
+
110
+ export const オーバーレイ: Story = {
111
+ args: {
112
+ layout: 'overlay',
113
+ media: 'https://placehold.co/1200x600',
114
+ },
115
+ render: (args) => ({
116
+ components: { 'rn-hero': Hero },
117
+ setup() {
118
+ return { args }
119
+ },
120
+ template: `
121
+ <rn-hero v-bind="args" />
122
+ `,
123
+ }),
124
+ }
125
+
126
+ export const オーバーレイ_中央揃え: Story = {
127
+ args: {
128
+ layout: 'overlay',
129
+ media: 'https://placehold.co/1200x600',
130
+ contentAlign: 'center',
131
+ contentVerticalAlign: 'center',
132
+ overlayColor: 'rgba(0, 0, 0, 0.6)',
133
+ },
134
+ render: (args) => ({
135
+ components: { 'rn-hero': Hero },
136
+ setup() {
137
+ return { args }
138
+ },
139
+ template: `
140
+ <rn-hero v-bind="args" />
141
+ `,
142
+ }),
143
+ }
144
+
145
+ export const 横並び_右寄せ: Story = {
146
+ args: {
147
+ layout: 'horizontal-sprit',
148
+ contentAlign: 'right',
149
+ contentVerticalAlign: 'bottom',
150
+ },
151
+ render: (args) => ({
152
+ components: { 'rn-hero': Hero },
153
+ setup() {
154
+ return { args }
155
+ },
156
+ template: `
157
+ <rn-hero v-bind="args" />
158
+ `,
159
+ }),
160
+ }
161
+
162
+ export const テキストのみ: Story = {
163
+ args: {
164
+ media: undefined,
165
+ layout: 'vertical-split',
166
+ },
167
+ render: (args) => ({
168
+ components: { 'rn-hero': Hero },
169
+ setup() {
170
+ return { args }
171
+ },
172
+ template: `
173
+ <rn-hero v-bind="args" />
174
+ `,
175
+ }),
176
+ }
177
+
178
+
179
+ export const フォントファミリー選択: Story = {
180
+ args: {
181
+ layout: 'horizontal-sprit',
182
+ media: 'https://placehold.co/800x600',
183
+ eyebrow: 'CUSTOM FONT',
184
+ title: 'Brand Font Title',
185
+ subtitle: 'モノスペースサブタイトル',
186
+ description: 'デフォルトフォントの説明文',
187
+ eyebrowFont: 'mono',
188
+ titleFont: 'key',
189
+ subtitleFont: 'mono',
190
+ descriptionFont: 'default',
36
191
  },
37
- render: (args: StoryArgs) => ({
38
- components: { 'rn-text': Text, 'rn-hero': Hero },
192
+ render: (args) => ({
193
+ components: { 'rn-hero': Hero },
39
194
  setup() {
40
195
  return { args }
41
196
  },
42
- template: /* html */ `
43
- <div>
44
- <rn-hero
45
- :image-url="args.imageUrl"
46
- :link-url="args.linkUrl">
47
- {{ args.slotText }}
48
- </rn-hero>
49
- </div>
197
+ template: `
198
+ <rn-hero v-bind="args" />
50
199
  `,
51
200
  }),
52
201
  }
@@ -1,6 +1,22 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj, Decorator } from '@storybook/vue3-vite'
2
+ import { defineComponent, getCurrentInstance, h } from 'vue'
2
3
 
3
4
  import Html from '@/components/elements/Html.vue'
5
+ import { createReniOneUI } from '@/utils'
6
+
7
+ // グローバルコンポーネント登録用デコレーター
8
+ const withReniUIDecorator: Decorator = (story) =>
9
+ defineComponent({
10
+ name: 'WithReniUIDecorator',
11
+ setup() {
12
+ const instance = getCurrentInstance()
13
+ if (instance) {
14
+ const reniUI = createReniOneUI()
15
+ instance.appContext.app.use(reniUI)
16
+ }
17
+ return () => h(story())
18
+ },
19
+ })
4
20
 
5
21
  const meta = {
6
22
  title: 'Elements/Html',
@@ -176,3 +192,55 @@ export const WithCustomAttributes: Story = {
176
192
  nl2br: false,
177
193
  },
178
194
  }
195
+
196
+ export const カスタムコンポーネント: Story = {
197
+ args: {
198
+ content: `
199
+ <p>通常のHTMLテキストと</p>
200
+ <rn-button variant="fill" color="primary">ボタンコンポーネント</rn-button>
201
+ <p>が混在しています。</p>
202
+ `,
203
+ },
204
+ decorators: [withReniUIDecorator],
205
+ }
206
+
207
+ export const ネストしたコンポーネント: Story = {
208
+ args: {
209
+ content: `
210
+ <rn-stack direction="vertical" gap="md">
211
+ <rn-text size="subtitle" weight="bold">スタック内のヘッダー</rn-text>
212
+ <rn-card>
213
+ <rn-text size="body">カード内のテキスト</rn-text>
214
+ <rn-button variant="outlined" color="secondary">カード内のボタン</rn-button>
215
+ </rn-card>
216
+ </rn-stack>
217
+ `,
218
+ },
219
+ decorators: [withReniUIDecorator],
220
+ }
221
+
222
+ export const コンテンツ混在: Story = {
223
+ args: {
224
+ content: `
225
+ <div style="padding: 20px; background-color: #f5f5f5;">
226
+ <h2>製品情報</h2>
227
+ <p>こちらは<strong>新商品</strong>の紹介です。</p>
228
+
229
+ <rn-card>
230
+ <h3>特徴</h3>
231
+ <ul>
232
+ <li>高品質</li>
233
+ <li>低価格</li>
234
+ <li>豊富なバリエーション</li>
235
+ </ul>
236
+ <rn-button variant="fill" color="primary">購入する</rn-button>
237
+ </rn-card>
238
+
239
+ <p style="margin-top: 20px;">
240
+ 詳細は<a href="#" style="color: blue;">こちら</a>をご覧ください。
241
+ </p>
242
+ </div>
243
+ `,
244
+ },
245
+ decorators: [withReniUIDecorator],
246
+ }
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Icon, { IconProps } from '@/components/elements/Icon.vue'
3
3
  import { LimitedSizeOptions, ColorOptions } from '@/constants'
4
4
  import { LimitedSize, Color } from '@/types'
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Image, { type ImageProps } from '@/components/elements/Image.vue'
3
3
  import Stack from '@/components/layouts/Stack.vue'
4
4
 
@@ -1,5 +1,6 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
  import Label, { type LabelProps } from '@/components/elements/Label.vue'
3
+ import Stack from '@/components/layouts/Stack.vue'
3
4
 
4
5
  const meta: Meta<typeof Label> = {
5
6
  title: 'Elements/Label',
@@ -8,16 +9,32 @@ const meta: Meta<typeof Label> = {
8
9
  argTypes: {
9
10
  color: {
10
11
  control: 'select',
11
- options: ['warning', 'danger', 'success', 'info', 'default'],
12
+ options: [
13
+ 'primary',
14
+ 'secondary',
15
+ 'warning',
16
+ 'danger',
17
+ 'success',
18
+ 'info',
19
+ 'default',
20
+ 'subtle',
21
+ 'muted',
22
+ 'light',
23
+ ],
12
24
  },
13
25
  size: {
14
26
  control: 'select',
15
27
  options: ['sm', 'md'],
16
28
  },
29
+ variant: {
30
+ control: 'select',
31
+ options: ['solid', 'filled', 'outline'],
32
+ },
17
33
  },
18
34
  args: {
19
35
  color: 'default',
20
36
  size: 'md',
37
+ variant: 'filled',
21
38
  },
22
39
  }
23
40
 
@@ -43,8 +60,9 @@ export const 基本: OverridesStory = {
43
60
  template: /* html */ `
44
61
  <div class='sb-canvas'>
45
62
  <rn-label
46
- :color=args.color
47
- :size=args.size
63
+ :color="args.color"
64
+ :size="args.size"
65
+ :variant="args.variant"
48
66
  >
49
67
  {{ args.slotText }}
50
68
  </rn-label>
@@ -52,3 +70,78 @@ export const 基本: OverridesStory = {
52
70
  `,
53
71
  }),
54
72
  }
73
+
74
+ const allColors = [
75
+ 'primary',
76
+ 'secondary',
77
+ 'warning',
78
+ 'danger',
79
+ 'success',
80
+ 'info',
81
+ 'default',
82
+ 'subtle',
83
+ 'muted',
84
+ 'light',
85
+ ] as const
86
+
87
+ export const カラー一覧: OverridesStory = {
88
+ render: () => ({
89
+ components: { 'rn-label': Label, 'rn-stack': Stack },
90
+ setup() {
91
+ return { allColors }
92
+ },
93
+ template: /* html */ `
94
+ <div class='sb-canvas'>
95
+ <h3>Solid</h3>
96
+ <rn-stack direction="horizontal" gap="sm" style="flex-wrap: wrap; margin-bottom: 24px;">
97
+ <rn-label
98
+ v-for="color in allColors"
99
+ :key="'solid-' + color"
100
+ :color="color"
101
+ variant="solid"
102
+ >
103
+ {{ color }}
104
+ </rn-label>
105
+ </rn-stack>
106
+
107
+ <h3>Filled</h3>
108
+ <rn-stack direction="horizontal" gap="sm" style="flex-wrap: wrap; margin-bottom: 24px;">
109
+ <rn-label
110
+ v-for="color in allColors"
111
+ :key="'filled-' + color"
112
+ :color="color"
113
+ variant="filled"
114
+ >
115
+ {{ color }}
116
+ </rn-label>
117
+ </rn-stack>
118
+
119
+ <h3>Outline</h3>
120
+ <rn-stack direction="horizontal" gap="sm" style="flex-wrap: wrap;">
121
+ <rn-label
122
+ v-for="color in allColors"
123
+ :key="'outline-' + color"
124
+ :color="color"
125
+ variant="outline"
126
+ >
127
+ {{ color }}
128
+ </rn-label>
129
+ </rn-stack>
130
+ </div>
131
+ `,
132
+ }),
133
+ }
134
+
135
+ export const サイズ比較: OverridesStory = {
136
+ render: () => ({
137
+ components: { 'rn-label': Label, 'rn-stack': Stack },
138
+ template: /* html */ `
139
+ <div class='sb-canvas'>
140
+ <rn-stack direction="horizontal" gap="sm" vertical-align="center">
141
+ <rn-label size="sm" color="primary">sm</rn-label>
142
+ <rn-label size="md" color="primary">md</rn-label>
143
+ </rn-stack>
144
+ </div>
145
+ `,
146
+ }),
147
+ }