@ubie/vitals-ui-consumer 0.0.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 (170) hide show
  1. package/.storybook/main.ts +14 -0
  2. package/.storybook/preview.tsx +25 -0
  3. package/.storybook/vitest.setup.ts +7 -0
  4. package/dist/chunk-DKo7XVKm.mjs +33 -0
  5. package/dist/index.d.mts +1720 -0
  6. package/dist/index.d.mts.map +1 -0
  7. package/dist/index.mjs +10594 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/dist/style.css +2299 -0
  10. package/package.json +47 -0
  11. package/src/components/Accordion/Accordion.module.css +75 -0
  12. package/src/components/Accordion/Accordion.spec.tsx +18 -0
  13. package/src/components/Accordion/Accordion.stories.tsx +61 -0
  14. package/src/components/Accordion/Accordion.tsx +89 -0
  15. package/src/components/ActionHalfModal/ActionHalfModal.module.css +180 -0
  16. package/src/components/ActionHalfModal/ActionHalfModal.spec.tsx +57 -0
  17. package/src/components/ActionHalfModal/ActionHalfModal.stories.tsx +469 -0
  18. package/src/components/ActionHalfModal/ActionHalfModal.tsx +269 -0
  19. package/src/components/ActionModal/ActionModal.module.css +145 -0
  20. package/src/components/ActionModal/ActionModal.spec.tsx +57 -0
  21. package/src/components/ActionModal/ActionModal.stories.tsx +302 -0
  22. package/src/components/ActionModal/ActionModal.tsx +232 -0
  23. package/src/components/Bold/Bold.module.css +4 -0
  24. package/src/components/Bold/Bold.spec.tsx +24 -0
  25. package/src/components/Bold/Bold.stories.tsx +54 -0
  26. package/src/components/Bold/Bold.tsx +31 -0
  27. package/src/components/Box/Box.module.css +46 -0
  28. package/src/components/Box/Box.spec.tsx +188 -0
  29. package/src/components/Box/Box.tsx +242 -0
  30. package/src/components/Button/Button.module.css +261 -0
  31. package/src/components/Button/Button.spec.tsx +82 -0
  32. package/src/components/Button/Button.tsx +99 -0
  33. package/src/components/Button/ButtonTypes.ts +107 -0
  34. package/src/components/Button/LinkButton.spec.tsx +86 -0
  35. package/src/components/Button/LinkButton.tsx +80 -0
  36. package/src/components/Button/VariantIcon.tsx +20 -0
  37. package/src/components/Button/useIcon.tsx +16 -0
  38. package/src/components/ButtonCard/ButtonCard.module.css +35 -0
  39. package/src/components/ButtonCard/ButtonCard.spec.tsx +18 -0
  40. package/src/components/ButtonCard/ButtonCard.stories.tsx +54 -0
  41. package/src/components/ButtonCard/ButtonCard.tsx +18 -0
  42. package/src/components/Center/Center.module.css +19 -0
  43. package/src/components/Center/Center.spec.tsx +143 -0
  44. package/src/components/Center/Center.tsx +108 -0
  45. package/src/components/Checkbox/Checkbox.module.css +124 -0
  46. package/src/components/Checkbox/Checkbox.spec.tsx +17 -0
  47. package/src/components/Checkbox/Checkbox.stories.tsx +213 -0
  48. package/src/components/Checkbox/Checkbox.tsx +50 -0
  49. package/src/components/CheckboxCard/CheckboxCard.module.css +102 -0
  50. package/src/components/CheckboxCard/CheckboxCard.spec.tsx +16 -0
  51. package/src/components/CheckboxCard/CheckboxCard.stories.tsx +205 -0
  52. package/src/components/CheckboxCard/CheckboxCard.tsx +53 -0
  53. package/src/components/CheckboxGroup/CheckboxGroup.module.css +16 -0
  54. package/src/components/CheckboxGroup/CheckboxGroup.spec.tsx +17 -0
  55. package/src/components/CheckboxGroup/CheckboxGroup.tsx +64 -0
  56. package/src/components/Color/Color.module.css +3 -0
  57. package/src/components/Color/Color.spec.tsx +24 -0
  58. package/src/components/Color/Color.stories.tsx +71 -0
  59. package/src/components/Color/Color.tsx +28 -0
  60. package/src/components/Divider/Divider.module.css +9 -0
  61. package/src/components/Divider/Divider.spec.tsx +42 -0
  62. package/src/components/Divider/Divider.stories.tsx +77 -0
  63. package/src/components/Divider/Divider.tsx +49 -0
  64. package/src/components/ErrorMessage/ErrorMessage.module.css +8 -0
  65. package/src/components/ErrorMessage/ErrorMessage.spec.tsx +12 -0
  66. package/src/components/ErrorMessage/ErrorMessage.tsx +20 -0
  67. package/src/components/Flex/Flex.module.css +24 -0
  68. package/src/components/Flex/Flex.spec.tsx +188 -0
  69. package/src/components/Flex/Flex.tsx +173 -0
  70. package/src/components/FlexItem/FlexItem.module.css +14 -0
  71. package/src/components/FlexItem/FlexItem.spec.tsx +84 -0
  72. package/src/components/FlexItem/FlexItem.tsx +106 -0
  73. package/src/components/Heading/Heading.module.css +131 -0
  74. package/src/components/Heading/Heading.tsx +86 -0
  75. package/src/components/HelperMessage/HelperMessage.module.css +8 -0
  76. package/src/components/HelperMessage/HelperMessage.tsx +15 -0
  77. package/src/components/Icon/Icon.module.css +6 -0
  78. package/src/components/Icon/Icon.spec.tsx +24 -0
  79. package/src/components/Icon/Icon.stories.tsx +100 -0
  80. package/src/components/Icon/Icon.tsx +101 -0
  81. package/src/components/Input/Input.module.css +51 -0
  82. package/src/components/Input/Input.spec.tsx +14 -0
  83. package/src/components/Input/Input.tsx +27 -0
  84. package/src/components/Label/Label.module.css +14 -0
  85. package/src/components/Label/Label.tsx +39 -0
  86. package/src/components/LinkCard/LinkCard.module.css +72 -0
  87. package/src/components/LinkCard/LinkCard.tsx +96 -0
  88. package/src/components/MessageHalfModal/MessageHalfModal.module.css +181 -0
  89. package/src/components/MessageHalfModal/MessageHalfModal.spec.tsx +73 -0
  90. package/src/components/MessageHalfModal/MessageHalfModal.stories.tsx +242 -0
  91. package/src/components/MessageHalfModal/MessageHalfModal.tsx +194 -0
  92. package/src/components/MessageModal/MessageModal.module.css +149 -0
  93. package/src/components/MessageModal/MessageModal.spec.tsx +57 -0
  94. package/src/components/MessageModal/MessageModal.stories.tsx +223 -0
  95. package/src/components/MessageModal/MessageModal.tsx +178 -0
  96. package/src/components/Pre/Pre.module.css +8 -0
  97. package/src/components/Pre/Pre.spec.tsx +11 -0
  98. package/src/components/Pre/Pre.stories.tsx +76 -0
  99. package/src/components/Pre/Pre.tsx +40 -0
  100. package/src/components/RadioButton/RadioButton.module.css +92 -0
  101. package/src/components/RadioButton/RadioButton.spec.tsx +25 -0
  102. package/src/components/RadioButton/RadioButton.tsx +55 -0
  103. package/src/components/RadioCard/RadioCard.module.css +109 -0
  104. package/src/components/RadioCard/RadioCard.tsx +61 -0
  105. package/src/components/RadioGroup/RadioGroup.module.css +16 -0
  106. package/src/components/RadioGroup/RadioGroup.spec.tsx +17 -0
  107. package/src/components/RadioGroup/RadioGroup.tsx +60 -0
  108. package/src/components/Select/Select.module.css +70 -0
  109. package/src/components/Select/Select.spec.tsx +12 -0
  110. package/src/components/Select/Select.tsx +56 -0
  111. package/src/components/Stack/Stack.module.css +10 -0
  112. package/src/components/Stack/Stack.spec.tsx +177 -0
  113. package/src/components/Stack/Stack.tsx +151 -0
  114. package/src/components/Stepper/Stepper.module.css +137 -0
  115. package/src/components/Stepper/Stepper.spec.tsx +198 -0
  116. package/src/components/Stepper/Stepper.stories.tsx +192 -0
  117. package/src/components/Stepper/Stepper.tsx +70 -0
  118. package/src/components/Stepper/StepperItem.tsx +113 -0
  119. package/src/components/Text/Text.module.css +168 -0
  120. package/src/components/Text/Text.tsx +192 -0
  121. package/src/components/TextArea/TextArea.module.css +46 -0
  122. package/src/components/TextArea/TextArea.spec.tsx +13 -0
  123. package/src/components/TextArea/TextArea.tsx +29 -0
  124. package/src/components/Toggle/Toggle.module.css +71 -0
  125. package/src/components/Toggle/Toggle.spec.tsx +21 -0
  126. package/src/components/Toggle/Toggle.tsx +56 -0
  127. package/src/font.ts +2 -0
  128. package/src/hooks/useScrollable.ts +58 -0
  129. package/src/icons/AppleIcon.tsx +14 -0
  130. package/src/icons/GoogleIcon.tsx +27 -0
  131. package/src/icons/LINEIcon.tsx +16 -0
  132. package/src/index.ts +35 -0
  133. package/src/sharedComponents/RequiredLabel/RequiredLabel.module.css +10 -0
  134. package/src/sharedComponents/RequiredLabel/RequiredLabel.tsx +8 -0
  135. package/src/sharedComponents/VisuallyHidden/VisuallyHidden.module.css +15 -0
  136. package/src/sharedComponents/VisuallyHidden/VisuallyHidden.tsx +22 -0
  137. package/src/stories/Accordion.stories.portable.ts +4 -0
  138. package/src/stories/Box.stories.tsx +474 -0
  139. package/src/stories/Button.stories.tsx +262 -0
  140. package/src/stories/Center.stories.tsx +126 -0
  141. package/src/stories/ErrorMessage.stories.tsx +19 -0
  142. package/src/stories/Flex.stories.tsx +345 -0
  143. package/src/stories/Form.stories.tsx +83 -0
  144. package/src/stories/Heading.stories.tsx +263 -0
  145. package/src/stories/HelperMessage.stories.tsx +22 -0
  146. package/src/stories/Input.stories.tsx +145 -0
  147. package/src/stories/Label.stories.tsx +32 -0
  148. package/src/stories/LinkButton.stories.tsx +207 -0
  149. package/src/stories/LinkCard.stories.tsx +90 -0
  150. package/src/stories/RadioButton.stories.tsx +168 -0
  151. package/src/stories/RadioCard.stories.tsx +236 -0
  152. package/src/stories/Select.stories.tsx +97 -0
  153. package/src/stories/Stack.stories.tsx +167 -0
  154. package/src/stories/Text.stories.tsx +396 -0
  155. package/src/stories/TextArea.stories.tsx +49 -0
  156. package/src/stories/Toggle.stories.tsx +30 -0
  157. package/src/test/vitest-jest-dom.d.ts +12 -0
  158. package/src/types/attributes.ts +6 -0
  159. package/src/types/global.d.ts +11 -0
  160. package/src/types/icon.ts +3 -0
  161. package/src/types/style.ts +254 -0
  162. package/src/utils/component.ts +8 -0
  163. package/src/utils/style.spec.ts +57 -0
  164. package/src/utils/style.ts +387 -0
  165. package/src/utils/types.ts +8 -0
  166. package/tsconfig.json +18 -0
  167. package/tsconfig.spec-lint.tsbuildinfo +1 -0
  168. package/tsconfig.tsbuildinfo +1 -0
  169. package/vite.config.ts +50 -0
  170. package/vitest.shims.d.ts +1 -0
@@ -0,0 +1,469 @@
1
+ import { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { ComponentProps, useCallback, useState } from "react";
3
+ import { ActionHalfModal } from "./ActionHalfModal";
4
+ import { Box } from "../Box/Box";
5
+ import { Button } from "../Button/Button";
6
+ import { Flex } from "../Flex/Flex";
7
+ import { Text } from "../Text/Text";
8
+
9
+ export default {
10
+ title: "Modal/ActionHalfModal",
11
+ component: ActionHalfModal,
12
+ } satisfies Meta<typeof ActionHalfModal>;
13
+
14
+ type Story = StoryObj<typeof ActionHalfModal>;
15
+
16
+ const LongBody = () => (
17
+ <>
18
+ <p>
19
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
20
+ been the industry&apos;s standard dummy text ever since the 1500s, when an unknown printer
21
+ took a galley of type and scrambled it to make a type specimen book. It has survived not only
22
+ five centuries, but also the leap into electronic typesetting, remaining essentially
23
+ unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
24
+ Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker
25
+ including versions of Lorem Ipsum.
26
+ </p>
27
+ <p>
28
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of
29
+ classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a
30
+ Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin
31
+ words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in
32
+ classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections
33
+ 1.10.32 and 1.10.33 of &quot;de Finibus Bonorum et Malorum&quot; (The Extremes of Good and
34
+ Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very
35
+ popular during the Renaissance. The first line of Lorem Ipsum, &quot;Lorem ipsum dolor sit
36
+ amet..&quot;, comes from a line in section 1.10.32.
37
+ </p>
38
+ </>
39
+ );
40
+
41
+ const defaultArgs = {
42
+ header: "モーダル",
43
+ children: <LongBody />,
44
+ stickyHeader: false,
45
+ stickyFooter: false,
46
+ } as const satisfies Partial<ComponentProps<typeof ActionHalfModal>>;
47
+
48
+ export const Default: Story = {
49
+ render: (args) => {
50
+ const [open, setOpen] = useState(true);
51
+
52
+ const onClose = useCallback(() => {
53
+ setOpen(false);
54
+ }, []);
55
+
56
+ return (
57
+ <>
58
+ <button type="button" onClick={() => setOpen(true)}>
59
+ Open Modal
60
+ </button>
61
+ <ActionHalfModal
62
+ primaryActionLabel="アクション"
63
+ onPrimaryAction={onClose}
64
+ {...args}
65
+ open={open}
66
+ onClose={onClose}
67
+ />
68
+ </>
69
+ );
70
+ },
71
+ args: defaultArgs,
72
+ };
73
+
74
+ export const Secondary: Story = {
75
+ render: (args) => {
76
+ const [open, setOpen] = useState(false);
77
+
78
+ const onClose = useCallback(() => {
79
+ setOpen(false);
80
+ }, []);
81
+
82
+ return (
83
+ <>
84
+ <button type="button" onClick={() => setOpen(true)}>
85
+ Open Modal
86
+ </button>
87
+ <ActionHalfModal
88
+ primaryActionLabel="アクション1"
89
+ onPrimaryAction={onClose}
90
+ secondaryActionLabel="アクション2"
91
+ onSecondaryAction={onClose}
92
+ {...args}
93
+ open={open}
94
+ onClose={onClose}
95
+ />
96
+ </>
97
+ );
98
+ },
99
+ args: defaultArgs,
100
+ };
101
+
102
+ export const Fullscreen: Story = {
103
+ render: (args) => {
104
+ const [open, setOpen] = useState(false);
105
+
106
+ const onClose = useCallback(() => {
107
+ setOpen(false);
108
+ }, []);
109
+
110
+ return (
111
+ <>
112
+ <button type="button" onClick={() => setOpen(true)}>
113
+ Open Modal
114
+ </button>
115
+ <ActionHalfModal {...args} open={open} onClose={onClose} fullscreen />
116
+ </>
117
+ );
118
+ },
119
+ args: defaultArgs,
120
+ };
121
+
122
+ export const NoCloseButton: Story = {
123
+ render: (args) => {
124
+ const [open, setOpen] = useState(false);
125
+
126
+ const onClose = useCallback(() => {
127
+ setOpen(false);
128
+ }, []);
129
+
130
+ return (
131
+ <>
132
+ <button type="button" onClick={() => setOpen(true)}>
133
+ Open Modal
134
+ </button>
135
+ <ActionHalfModal
136
+ onPrimaryAction={onClose}
137
+ primaryActionLabel="確認"
138
+ showClose={false}
139
+ {...args}
140
+ open={open}
141
+ onClose={onClose}
142
+ />
143
+ </>
144
+ );
145
+ },
146
+ args: {
147
+ ...defaultArgs,
148
+ [`data-test-id`]: "some-id",
149
+ },
150
+ };
151
+
152
+ export const Customized: Story = {
153
+ render: (args) => {
154
+ const [open, setOpen] = useState(false);
155
+
156
+ const onClose = useCallback(() => {
157
+ setOpen(false);
158
+ }, []);
159
+
160
+ return (
161
+ <>
162
+ <button type="button" onClick={() => setOpen(true)}>
163
+ Open Modal
164
+ </button>
165
+ <ActionHalfModal
166
+ header="削除します"
167
+ primaryActionColor="alert"
168
+ primaryActionLabel="削除"
169
+ onPrimaryAction={onClose}
170
+ overlayOpacity="darker"
171
+ closeLabel="キャンセル"
172
+ {...args}
173
+ open={open}
174
+ onClose={onClose}
175
+ />
176
+ </>
177
+ );
178
+ },
179
+ args: defaultArgs,
180
+ };
181
+
182
+ export const WithId: Story = {
183
+ render: (args) => {
184
+ const [open, setOpen] = useState(false);
185
+ const onClose = useCallback(() => {
186
+ setOpen(false);
187
+ }, []);
188
+ return (
189
+ <>
190
+ <button type="button" onClick={() => setOpen(true)}>
191
+ Open Modal
192
+ </button>
193
+ <ActionHalfModal
194
+ {...args}
195
+ data-test-id="some-id"
196
+ primaryActionLabel="アクション"
197
+ onPrimaryAction={onClose}
198
+ open={open}
199
+ onClose={onClose}
200
+ />
201
+ </>
202
+ );
203
+ },
204
+ args: {
205
+ ...defaultArgs,
206
+ id: "dialog-id",
207
+ },
208
+ };
209
+
210
+ export const CustomHeader: Story = {
211
+ render: (args) => {
212
+ const [open, setOpen] = useState(false);
213
+ const onClose = useCallback(() => {
214
+ setOpen(false);
215
+ }, []);
216
+
217
+ const headerId = "header-id";
218
+
219
+ return (
220
+ <>
221
+ <button type="button" onClick={() => setOpen(true)}>
222
+ Open Modal
223
+ </button>
224
+ <ActionHalfModal
225
+ ariaLabelledby={headerId}
226
+ primaryActionLabel="Action"
227
+ onPrimaryAction={onClose}
228
+ {...args}
229
+ open={open}
230
+ onClose={onClose}
231
+ >
232
+ <h2 id={headerId}>Header</h2>
233
+ <LongBody />
234
+ </ActionHalfModal>
235
+ </>
236
+ );
237
+ },
238
+ args: {
239
+ ...defaultArgs,
240
+ header: undefined,
241
+ },
242
+ };
243
+
244
+ export const WithHero: Story = {
245
+ render: (args) => {
246
+ const [open, setOpen] = useState(false);
247
+ const onClose = useCallback(() => {
248
+ setOpen(false);
249
+ }, []);
250
+
251
+ return (
252
+ <>
253
+ <button type="button" onClick={() => setOpen(true)}>
254
+ Open Modal
255
+ </button>
256
+ <ActionHalfModal
257
+ hero={
258
+ <img
259
+ src="/images/placeholder.svg"
260
+ alt="Illustration: Modal"
261
+ style={{ width: "100%", height: "auto", verticalAlign: "bottom" }}
262
+ width={560}
263
+ height={315}
264
+ />
265
+ }
266
+ primaryActionLabel="Action"
267
+ onPrimaryAction={onClose}
268
+ {...args}
269
+ open={open}
270
+ onClose={onClose}
271
+ >
272
+ <p>Content</p>
273
+ </ActionHalfModal>
274
+ </>
275
+ );
276
+ },
277
+ args: {
278
+ ...defaultArgs,
279
+ },
280
+ };
281
+
282
+ export const WithHeroAndFullScreen: Story = {
283
+ render: (args) => {
284
+ const [open, setOpen] = useState(false);
285
+ const onClose = useCallback(() => {
286
+ setOpen(false);
287
+ }, []);
288
+
289
+ return (
290
+ <>
291
+ <button type="button" onClick={() => setOpen(true)}>
292
+ Open Modal
293
+ </button>
294
+ <ActionHalfModal
295
+ primaryActionLabel="Action"
296
+ onPrimaryAction={onClose}
297
+ {...args}
298
+ open={open}
299
+ onClose={onClose}
300
+ >
301
+ <p>Content</p>
302
+ </ActionHalfModal>
303
+ </>
304
+ );
305
+ },
306
+ args: {
307
+ ...defaultArgs,
308
+ fullscreen: true,
309
+ hero: (
310
+ <img
311
+ src="/images/placeholder.svg"
312
+ alt="Illustration: Modal"
313
+ style={{ width: "100%", height: "auto", verticalAlign: "bottom" }}
314
+ width={560}
315
+ height={315}
316
+ />
317
+ ),
318
+ },
319
+ };
320
+
321
+ export const StickyHeaderAndFooter: Story = {
322
+ render: (args) => {
323
+ const [open, setOpen] = useState(true);
324
+
325
+ const onClose = useCallback(() => {
326
+ setOpen(false);
327
+ }, []);
328
+
329
+ return (
330
+ <>
331
+ <button type="button" onClick={() => setOpen(true)}>
332
+ Open Modal
333
+ </button>
334
+ <ActionHalfModal
335
+ primaryActionLabel="アクション"
336
+ onPrimaryAction={onClose}
337
+ {...args}
338
+ open={open}
339
+ onClose={onClose}
340
+ />
341
+ </>
342
+ );
343
+ },
344
+ args: {
345
+ ...defaultArgs,
346
+ stickyHeader: true,
347
+ stickyFooter: true,
348
+ },
349
+ };
350
+
351
+ export const ReactNodeHeader: Story = {
352
+ render: (args) => {
353
+ const [open, setOpen] = useState(true);
354
+
355
+ const onClose = useCallback(() => {
356
+ setOpen(false);
357
+ }, []);
358
+
359
+ return (
360
+ <>
361
+ <button type="button" onClick={() => setOpen(true)}>
362
+ Open Modal
363
+ </button>
364
+ <ActionHalfModal
365
+ primaryActionLabel="アクション"
366
+ onPrimaryAction={onClose}
367
+ {...args}
368
+ open={open}
369
+ onClose={onClose}
370
+ />
371
+ </>
372
+ );
373
+ },
374
+ args: {
375
+ ...defaultArgs,
376
+ header: (
377
+ <Box>
378
+ <Flex gap="xs" alignItems="center" justifyContent="space-between">
379
+ <Text size="lg" color="main">
380
+ カスタムヘッダー
381
+ </Text>
382
+ <Button variant="text" size="small">
383
+ 設定
384
+ </Button>
385
+ </Flex>
386
+ </Box>
387
+ ),
388
+ stickyHeader: true,
389
+ },
390
+ };
391
+
392
+ export const ReactNodeHeaderWithHero: Story = {
393
+ render: (args) => {
394
+ const [open, setOpen] = useState(true);
395
+
396
+ const onClose = useCallback(() => {
397
+ setOpen(false);
398
+ }, []);
399
+
400
+ return (
401
+ <>
402
+ <button type="button" onClick={() => setOpen(true)}>
403
+ Open Modal
404
+ </button>
405
+ <ActionHalfModal
406
+ primaryActionLabel="アクション"
407
+ onPrimaryAction={onClose}
408
+ {...args}
409
+ open={open}
410
+ onClose={onClose}
411
+ />
412
+ </>
413
+ );
414
+ },
415
+ args: {
416
+ ...defaultArgs,
417
+ header: (
418
+ <Box>
419
+ <Flex gap="xs" alignItems="center" justifyContent="space-between">
420
+ <Text size="lg" color="main">
421
+ Hero付きカスタムヘッダー
422
+ </Text>
423
+ <Button variant="text" size="small">
424
+ メニュー
425
+ </Button>
426
+ </Flex>
427
+ </Box>
428
+ ),
429
+ hero: (
430
+ <img
431
+ src="/images/placeholder.svg"
432
+ alt="Illustration: Modal"
433
+ style={{ width: "100%", height: "auto", verticalAlign: "bottom" }}
434
+ width={560}
435
+ height={315}
436
+ />
437
+ ),
438
+ stickyHeader: true,
439
+ },
440
+ };
441
+
442
+ export const CustomMaxHeight: Story = {
443
+ render: (args) => {
444
+ const [open, setOpen] = useState(false);
445
+
446
+ const onClose = useCallback(() => {
447
+ setOpen(false);
448
+ }, []);
449
+
450
+ return (
451
+ <>
452
+ <button type="button" onClick={() => setOpen(true)}>
453
+ Open Modal
454
+ </button>
455
+ <ActionHalfModal
456
+ primaryActionLabel="アクション"
457
+ onPrimaryAction={onClose}
458
+ {...args}
459
+ open={open}
460
+ onClose={onClose}
461
+ />
462
+ </>
463
+ );
464
+ },
465
+ args: {
466
+ ...defaultArgs,
467
+ maxHeight: "80vh",
468
+ },
469
+ };