@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.
- package/README.md +131 -0
- package/dist/__tests__/helpers/assert-contract.d.ts +9 -0
- package/dist/__tests__/helpers/assert-contract.d.ts.map +1 -0
- package/dist/__tests__/helpers/contract-helpers.d.ts +45 -0
- package/dist/__tests__/helpers/contract-helpers.d.ts.map +1 -0
- package/dist/__tests__/setup.d.ts +1 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/components/elements/Alert.vue.d.ts +14 -36
- package/dist/components/elements/Alert.vue.d.ts.map +1 -1
- package/dist/components/elements/Button.vue.d.ts +13 -41
- package/dist/components/elements/Button.vue.d.ts.map +1 -1
- package/dist/components/elements/CheckBox.vue.d.ts +11 -60
- package/dist/components/elements/CheckBox.vue.d.ts.map +1 -1
- package/dist/components/elements/ComboBox.vue.d.ts +34 -116
- package/dist/components/elements/ComboBox.vue.d.ts.map +1 -1
- package/dist/components/elements/DescriptionList.vue.d.ts +12 -27
- package/dist/components/elements/DescriptionList.vue.d.ts.map +1 -1
- package/dist/components/elements/Divider.vue.d.ts +3 -27
- package/dist/components/elements/Divider.vue.d.ts.map +1 -1
- package/dist/components/elements/Html.vue.d.ts +2 -32
- package/dist/components/elements/Html.vue.d.ts.map +1 -1
- package/dist/components/elements/Icon.vue.d.ts +4 -28
- package/dist/components/elements/Icon.vue.d.ts.map +1 -1
- package/dist/components/elements/Image.vue.d.ts +19 -43
- package/dist/components/elements/Image.vue.d.ts.map +1 -1
- package/dist/components/elements/Label.vue.d.ts +13 -33
- package/dist/components/elements/Label.vue.d.ts.map +1 -1
- package/dist/components/elements/PasswordField.vue.d.ts +13 -151
- package/dist/components/elements/PasswordField.vue.d.ts.map +1 -1
- package/dist/components/elements/Progress.vue.d.ts +3 -31
- package/dist/components/elements/Progress.vue.d.ts.map +1 -1
- package/dist/components/elements/RadioButton.vue.d.ts +17 -28
- package/dist/components/elements/RadioButton.vue.d.ts.map +1 -1
- package/dist/components/elements/RadioButtonGroup.vue.d.ts +26 -75
- package/dist/components/elements/RadioButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/elements/SelectBox.vue.d.ts +30 -121
- package/dist/components/elements/SelectBox.vue.d.ts.map +1 -1
- package/dist/components/elements/SkeletonLoader.vue.d.ts +2 -24
- package/dist/components/elements/SkeletonLoader.vue.d.ts.map +1 -1
- package/dist/components/elements/SpinButton.vue.d.ts +23 -52
- package/dist/components/elements/SpinButton.vue.d.ts.map +1 -1
- package/dist/components/elements/Spinner.vue.d.ts +3 -27
- package/dist/components/elements/Spinner.vue.d.ts.map +1 -1
- package/dist/components/elements/Text.vue.d.ts +12 -34
- package/dist/components/elements/Text.vue.d.ts.map +1 -1
- package/dist/components/elements/TextField.vue.d.ts +23 -146
- package/dist/components/elements/TextField.vue.d.ts.map +1 -1
- package/dist/components/elements/ToolChip.vue.d.ts +11 -33
- package/dist/components/elements/ToolChip.vue.d.ts.map +1 -1
- package/dist/components/features/AnnounceBar.vue.d.ts +11 -29
- package/dist/components/features/AnnounceBar.vue.d.ts.map +1 -1
- package/dist/components/features/AnnounceBarCollection.vue.d.ts +10 -34
- package/dist/components/features/AnnounceBarCollection.vue.d.ts.map +1 -1
- package/dist/components/features/Banner.vue.d.ts +22 -0
- package/dist/components/features/Banner.vue.d.ts.map +1 -0
- package/dist/components/features/BrandLogo.vue.d.ts +2 -24
- package/dist/components/features/BrandLogo.vue.d.ts.map +1 -1
- package/dist/components/features/CategoryBanner.vue.d.ts +3 -30
- package/dist/components/features/CategoryBanner.vue.d.ts.map +1 -1
- package/dist/components/features/FloatingBanner.vue.d.ts +3 -21
- package/dist/components/features/FloatingBanner.vue.d.ts.map +1 -1
- package/dist/components/features/Hero.vue.d.ts +32 -52
- package/dist/components/features/Hero.vue.d.ts.map +1 -1
- package/dist/components/features/ImageGrid.vue.d.ts +3 -30
- package/dist/components/features/ImageGrid.vue.d.ts.map +1 -1
- package/dist/components/features/LinkList.vue.d.ts +3 -28
- package/dist/components/features/LinkList.vue.d.ts.map +1 -1
- package/dist/components/features/Marquee.vue.d.ts +19 -49
- package/dist/components/features/Marquee.vue.d.ts.map +1 -1
- package/dist/components/features/MediaContent.vue.d.ts +14 -36
- package/dist/components/features/MediaContent.vue.d.ts.map +1 -1
- package/dist/components/features/ProductLabels.vue.d.ts +1 -19
- package/dist/components/features/ProductLabels.vue.d.ts.map +1 -1
- package/dist/components/features/ProductList.vue.d.ts +63 -88
- package/dist/components/features/ProductList.vue.d.ts.map +1 -1
- package/dist/components/features/ProductListItem.vue.d.ts +7 -35
- package/dist/components/features/ProductListItem.vue.d.ts.map +1 -1
- package/dist/components/features/ProductPurchase.vue.d.ts +12 -43
- package/dist/components/features/ProductPurchase.vue.d.ts.map +1 -1
- package/dist/components/features/Schedule.vue.d.ts +11 -29
- package/dist/components/features/Schedule.vue.d.ts.map +1 -1
- package/dist/components/features/ScheduleDateItem.vue.d.ts +2 -26
- package/dist/components/features/ScheduleDateItem.vue.d.ts.map +1 -1
- package/dist/components/features/ScheduleDelivery.vue.d.ts +10 -26
- package/dist/components/features/ScheduleDelivery.vue.d.ts.map +1 -1
- package/dist/components/features/ScheduleDeliveryItem.vue.d.ts +2 -24
- package/dist/components/features/ScheduleDeliveryItem.vue.d.ts.map +1 -1
- package/dist/components/features/SchedulePeriod.vue.d.ts +2 -26
- package/dist/components/features/SchedulePeriod.vue.d.ts.map +1 -1
- package/dist/components/features/SchedulePickup.vue.d.ts +10 -26
- package/dist/components/features/SchedulePickup.vue.d.ts.map +1 -1
- package/dist/components/features/SchedulePickupItem.vue.d.ts +2 -24
- package/dist/components/features/SchedulePickupItem.vue.d.ts.map +1 -1
- package/dist/components/features/Schedules.vue.d.ts +10 -22
- package/dist/components/features/Schedules.vue.d.ts.map +1 -1
- package/dist/components/features/SnsLink.vue.d.ts +3 -29
- package/dist/components/features/SnsLink.vue.d.ts.map +1 -1
- package/dist/components/foundation/AppBar.vue.d.ts +15 -40
- package/dist/components/foundation/AppBar.vue.d.ts.map +1 -1
- package/dist/components/foundation/AppBody.vue.d.ts +9 -4
- package/dist/components/foundation/AppBody.vue.d.ts.map +1 -1
- package/dist/components/foundation/AppFooter.vue.d.ts +13 -35
- package/dist/components/foundation/AppFooter.vue.d.ts.map +1 -1
- package/dist/components/foundation/AppFrame.vue.d.ts +10 -5
- package/dist/components/foundation/AppFrame.vue.d.ts.map +1 -1
- package/dist/components/interactive/Dialog.vue.d.ts +18 -40
- package/dist/components/interactive/Dialog.vue.d.ts.map +1 -1
- package/dist/components/interactive/Disclosure.vue.d.ts +22 -37
- package/dist/components/interactive/Disclosure.vue.d.ts.map +1 -1
- package/dist/components/interactive/DropDown.vue.d.ts +20 -34
- package/dist/components/interactive/DropDown.vue.d.ts.map +1 -1
- package/dist/components/interactive/Gallery.vue.d.ts +2 -34
- package/dist/components/interactive/Gallery.vue.d.ts.map +1 -1
- package/dist/components/interactive/Lightbox.vue.d.ts +32 -0
- package/dist/components/interactive/Lightbox.vue.d.ts.map +1 -0
- package/dist/components/interactive/Modal.vue.d.ts +15 -33
- package/dist/components/interactive/Modal.vue.d.ts.map +1 -1
- package/dist/components/interactive/Notification.vue.d.ts +5 -35
- package/dist/components/interactive/Notification.vue.d.ts.map +1 -1
- package/dist/components/interactive/Slider.vue.d.ts +32 -28
- package/dist/components/interactive/Slider.vue.d.ts.map +1 -1
- package/dist/components/interactive/Tab.vue.d.ts +17 -25
- package/dist/components/interactive/Tab.vue.d.ts.map +1 -1
- package/dist/components/interactive/TabGroup.vue.d.ts +25 -0
- package/dist/components/interactive/TabGroup.vue.d.ts.map +1 -0
- package/dist/components/interactive/TabPanel.vue.d.ts +9 -3
- package/dist/components/interactive/TabPanel.vue.d.ts.map +1 -1
- package/dist/components/interactive/TabPanels.vue.d.ts +27 -32
- package/dist/components/interactive/TabPanels.vue.d.ts.map +1 -1
- package/dist/components/interactive/Tabs.vue.d.ts +31 -31
- package/dist/components/interactive/Tabs.vue.d.ts.map +1 -1
- package/dist/components/layouts/Card.vue.d.ts +12 -30
- package/dist/components/layouts/Card.vue.d.ts.map +1 -1
- package/dist/components/layouts/Grid.vue.d.ts +11 -32
- package/dist/components/layouts/Grid.vue.d.ts.map +1 -1
- package/dist/components/layouts/List.vue.d.ts +28 -42
- package/dist/components/layouts/List.vue.d.ts.map +1 -1
- package/dist/components/layouts/Page.vue.d.ts +33 -62
- package/dist/components/layouts/Page.vue.d.ts.map +1 -1
- package/dist/components/layouts/Section.vue.d.ts +22 -41
- package/dist/components/layouts/Section.vue.d.ts.map +1 -1
- package/dist/components/layouts/Stack.vue.d.ts +12 -40
- package/dist/components/layouts/Stack.vue.d.ts.map +1 -1
- package/dist/components/navigation/BottomBar.vue.d.ts +10 -26
- package/dist/components/navigation/BottomBar.vue.d.ts.map +1 -1
- package/dist/components/navigation/Drawer.vue.d.ts +14 -32
- package/dist/components/navigation/Drawer.vue.d.ts.map +1 -1
- package/dist/components/renderless/DataProvider.vue.d.ts +19 -42
- package/dist/components/renderless/DataProvider.vue.d.ts.map +1 -1
- package/dist/components/renderless/Form.vue.d.ts +22 -43
- package/dist/components/renderless/Form.vue.d.ts.map +1 -1
- package/dist/components/renderless/OptionGroupSwitchController.vue.d.ts +20 -43
- package/dist/components/renderless/OptionGroupSwitchController.vue.d.ts.map +1 -1
- package/dist/composable/useAppNotifications.d.ts +0 -1
- package/dist/composable/useToolChip.d.ts +0 -1
- package/dist/composables.d.ts +0 -1
- package/dist/composables.es.js +5 -6
- package/dist/contexts/tabGroup.d.ts +17 -0
- package/dist/contexts/tabGroup.d.ts.map +1 -0
- package/dist/directives/auto-scale.d.ts +0 -1
- package/dist/directives/glitch.d.ts +0 -1
- package/dist/{index-a725a791.js → index-D7ldGb8i.js} +18 -30
- package/dist/index.d.ts +8 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +6795 -6735
- package/dist/script.es.js +8571 -8506
- package/dist/script.umd.js +28 -28
- package/dist/style.css +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/{composables-93778bb4.js → useAppDialogGuidance-Bs1h3YmP.js} +1060 -1044
- package/dist/utils.d.ts +46 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/validation.d.ts +0 -1
- package/dist/valueObjects/CurrencyValue.d.ts +0 -1
- package/dist/valueObjects/NumberValue.d.ts +0 -1
- package/dist/{valueObjects-e0ea7f1b.js → valueObjects-CvF0zaqR.js} +1 -1
- package/dist/valueObjects.es.js +1 -1
- package/package.json +29 -28
- package/src/stories/Alert.stories.ts +1 -1
- package/src/stories/AnnounceBar.stories.ts +1 -1
- package/src/stories/AnnounceBarCollection.stories.ts +135 -0
- package/src/stories/AppBar.stories.ts +6 -2
- package/src/stories/AppFooter.stories.ts +1 -1
- package/src/stories/AppFrame.stories.ts +1 -1
- package/src/stories/AppLayout.stories.ts +5 -16
- package/src/stories/Banner.stories.ts +235 -0
- package/src/stories/Button.stories.ts +1 -1
- package/src/stories/Card.stories.ts +1 -1
- package/src/stories/CheckBox.stories.ts +84 -22
- package/src/stories/ComboBox.stories.ts +62 -2
- package/src/stories/Dialog.stories.ts +1 -1
- package/src/stories/Disclosure.stories.ts +1 -1
- package/src/stories/Divider.stories.ts +1 -1
- package/src/stories/Drawer.stories.ts +1 -1
- package/src/stories/DropDown.stories.ts +1 -1
- package/src/stories/FloatingBanner.stories.ts +1 -1
- package/src/stories/Form.stories.ts +96 -1
- package/src/stories/Gallery.stories.ts +1 -1
- package/src/stories/Grid.stories.ts +1 -1
- package/src/stories/Hero.stories.ts +175 -26
- package/src/stories/Html.stories.ts +69 -1
- package/src/stories/Icon.stories.ts +1 -1
- package/src/stories/Image.stories.ts +1 -1
- package/src/stories/Label.stories.ts +97 -4
- package/src/stories/Lightbox.stories.ts +231 -0
- package/src/stories/List.stories.ts +62 -15
- package/src/stories/Modal.stories.ts +1 -1
- package/src/stories/Notification.stories.ts +1 -1
- package/src/stories/Page.stories.ts +36 -1
- package/src/stories/PasswordField.stories.ts +1 -1
- package/src/stories/ProductList.stories.ts +65 -3
- package/src/stories/ProductPurchase.stories.ts +2 -2
- package/src/stories/Progress.stories.ts +1 -1
- package/src/stories/Radio.stories.ts +130 -12
- package/src/stories/Section.stories.ts +29 -4
- package/src/stories/SelectBox.stories.ts +56 -1
- package/src/stories/SkeletonLoader.stories.ts +1 -1
- package/src/stories/Slider.stories.ts +365 -7
- package/src/stories/SnsLink.stories.ts +1 -1
- package/src/stories/SpinButton.stories.ts +1 -1
- package/src/stories/Spinner.stories.ts +1 -1
- package/src/stories/Stack.stories.ts +1 -1
- package/src/stories/Switch.stories.ts +1 -1
- package/src/stories/Tab.stories.ts +28 -11
- package/src/stories/TabGroup.stories.ts +290 -0
- package/src/stories/TabPanels.stories.ts +1 -1
- package/src/stories/Tabs.stories.ts +104 -3
- package/src/stories/Text.stories.ts +24 -1
- package/src/stories/TextArea.stories.ts +78 -1
- package/src/stories/TextField.stories.ts +75 -2
- package/src/stories/ToolChip.stories.ts +1 -1
- package/src/stories/compositions/EventPage.stories.ts +184 -0
- package/src/stories/compositions/FormPage.stories.ts +222 -0
- package/src/stories/compositions/TopPage.stories.ts +164 -0
- package/dist/components/features/CarouselBanner.vue.d.ts +0 -36
- package/dist/components/features/CarouselBanner.vue.d.ts.map +0 -1
- package/dist/components/features/VariationSelector.vue.d.ts +0 -39
- package/dist/components/features/VariationSelector.vue.d.ts.map +0 -1
- package/src/stories/Carousel.stories.ts +0 -62
- package/src/stories/CarouselBanner.stories.ts +0 -103
- package/src/stories/ProductLabels.stories.ts +0 -65
- 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 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
|
-
|
|
10
|
-
control: '
|
|
9
|
+
layout: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['vertical-split', 'horizontal-sprit', 'overlay'],
|
|
11
12
|
},
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
79
|
+
export const 縦並び: Story = {
|
|
31
80
|
args: {
|
|
32
|
-
|
|
81
|
+
layout: 'vertical-split',
|
|
33
82
|
},
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
38
|
-
components: { 'rn-
|
|
192
|
+
render: (args) => ({
|
|
193
|
+
components: { 'rn-hero': Hero },
|
|
39
194
|
setup() {
|
|
40
195
|
return { args }
|
|
41
196
|
},
|
|
42
|
-
template:
|
|
43
|
-
<
|
|
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,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: [
|
|
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
|
+
}
|