@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,16 @@
1
+ "use client";
2
+
3
+ import { FC, SVGProps } from "react";
4
+
5
+ export const LINEIcon: FC<SVGProps<SVGSVGElement>> = (props) => {
6
+ return (
7
+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" {...props}>
8
+ <path
9
+ fillRule="evenodd"
10
+ clipRule="evenodd"
11
+ d="M22 10.5549C22 5.88571 17.5141 2.08698 12 2.08698C6.48589 2.08698 2 5.88571 2 10.5549C2 14.7409 5.55797 18.2463 10.3635 18.9094C10.6887 18.9827 11.1321 19.1333 11.2445 19.4238C11.3458 19.6879 11.3102 20.1006 11.2773 20.3676C11.2773 20.3676 11.1602 21.1041 11.1349 21.2606L11.1312 21.2822C11.0835 21.5638 10.9621 22.2802 12.0009 21.823C13.0685 21.3535 17.7597 18.2844 19.8573 15.765C21.3055 14.1062 22 12.4239 22 10.5549ZM18.6726 13.2514H15.8673H15.8635C15.7576 13.2514 15.6723 13.1624 15.6723 13.0519V13.0489V8.50198V8.49807C15.6723 8.38755 15.7576 8.29855 15.8635 8.29855H15.8673H18.6726C18.7776 8.29855 18.8638 8.38853 18.8638 8.49807V9.23845C18.8638 9.34897 18.7785 9.43797 18.6726 9.43797H16.7633V10.2067H18.6726C18.7776 10.2067 18.8638 10.2967 18.8638 10.4062V11.1466C18.8638 11.2571 18.7785 11.3461 18.6726 11.3461H16.7633V12.1149H18.6726C18.7776 12.1149 18.8638 12.2049 18.8638 12.3144V13.0548C18.8638 13.1614 18.7785 13.2514 18.6726 13.2514ZM8.47203 13.0519C8.47203 13.1624 8.3858 13.2514 8.28082 13.2514H5.47456H5.47081C5.3649 13.2514 5.2796 13.1624 5.2796 13.0519V13.0489V8.49807C5.2796 8.38755 5.3649 8.29855 5.47081 8.29855H6.18034C6.28532 8.29855 6.37155 8.38853 6.37155 8.49807V12.112H8.28082C8.3858 12.112 8.47203 12.2019 8.47203 12.3115V13.0519ZM9.97172 8.29855H9.26219C9.15722 8.29855 9.07098 8.38755 9.07098 8.49807V13.0519C9.07098 13.1614 9.15628 13.2514 9.26219 13.2514H9.97172C10.0776 13.2514 10.1629 13.1624 10.1629 13.0519V8.49807C10.1629 8.38755 10.0776 8.29855 9.97172 8.29855ZM14.0911 8.29855H14.7997C14.9056 8.29855 14.9909 8.38755 14.9909 8.49807V13.0509C14.9909 13.1614 14.9047 13.2504 14.7997 13.2504H14.0948C14.078 13.2504 14.0611 13.2475 14.0452 13.2436C14.0442 13.2436 14.0433 13.2426 14.0423 13.2426C14.0377 13.2416 14.0339 13.2406 14.0292 13.2387C14.0274 13.2387 14.0255 13.2377 14.0236 13.2367C14.0231 13.2365 14.0225 13.2363 14.0219 13.2361C14.0194 13.2353 14.0165 13.2344 14.0142 13.2328C14.0114 13.2308 14.0077 13.2299 14.0049 13.2279L13.9992 13.225C13.9945 13.222 13.9908 13.2201 13.987 13.2172C13.987 13.2165 13.9866 13.2163 13.986 13.2158C13.9857 13.2157 13.9854 13.2155 13.9852 13.2152C13.9664 13.2025 13.9496 13.1859 13.9355 13.1653L11.9362 10.3476V13.0538C11.9362 13.1643 11.851 13.2533 11.745 13.2533H11.0355C10.9296 13.2533 10.8443 13.1634 10.8443 13.0538V8.50003C10.8443 8.38951 10.9305 8.30051 11.0355 8.30051H11.7422H11.7488C11.7525 8.30148 11.7554 8.30148 11.7591 8.30148C11.7628 8.30148 11.7657 8.30148 11.7694 8.30246C11.7722 8.30246 11.775 8.30246 11.7778 8.30344L11.7891 8.30637C11.79 8.30686 11.7912 8.30711 11.7924 8.30735C11.7935 8.3076 11.7947 8.30784 11.7957 8.30833C11.7975 8.30882 11.7994 8.30955 11.8013 8.31029C11.8032 8.31102 11.805 8.31175 11.8069 8.31224C11.8097 8.31224 11.8116 8.31322 11.8135 8.3142C11.8172 8.31518 11.821 8.31713 11.8247 8.31909L11.8303 8.32202C11.8341 8.32398 11.8369 8.32593 11.8406 8.32789C11.8416 8.32838 11.8425 8.32911 11.8435 8.32985C11.8444 8.33058 11.8453 8.33131 11.8463 8.3318C11.85 8.33376 11.8538 8.33571 11.8566 8.33865C11.8575 8.33914 11.8585 8.33987 11.8594 8.34061C11.8603 8.34134 11.8613 8.34207 11.8622 8.34256C11.8641 8.34403 11.8657 8.34549 11.8674 8.34696C11.869 8.34843 11.8706 8.3499 11.8725 8.35136C11.873 8.35185 11.8737 8.35234 11.8744 8.35283C11.8751 8.35332 11.8758 8.35381 11.8763 8.3543C11.8781 8.35626 11.88 8.35846 11.8819 8.36066C11.8838 8.36286 11.8856 8.36506 11.8875 8.36701L11.8884 8.36799C11.8908 8.37141 11.8934 8.37484 11.8959 8.37826C11.8985 8.38168 11.9011 8.38511 11.9034 8.38853L13.8999 11.2024V8.49807C13.8999 8.38755 13.9852 8.29855 14.0911 8.29855Z"
12
+ fill="white"
13
+ />
14
+ </svg>
15
+ );
16
+ };
package/src/index.ts ADDED
@@ -0,0 +1,35 @@
1
+ export { Accordion } from "./components/Accordion/Accordion";
2
+ export { ActionHalfModal } from "./components/ActionHalfModal/ActionHalfModal";
3
+ export { ActionModal } from "./components/ActionModal/ActionModal";
4
+ export { Box } from "./components/Box/Box";
5
+ export { Button } from "./components/Button/Button";
6
+ export { ButtonCard } from "./components/ButtonCard/ButtonCard";
7
+ export { Center } from "./components/Center/Center";
8
+ export { Divider } from "./components/Divider/Divider";
9
+ export { Heading } from "./components/Heading/Heading";
10
+ export { LinkButton } from "./components/Button/LinkButton";
11
+ export { ErrorMessage } from "./components/ErrorMessage/ErrorMessage";
12
+ export { Flex } from "./components/Flex/Flex";
13
+ export { FlexItem } from "./components/FlexItem/FlexItem";
14
+ export { HelperMessage } from "./components/HelperMessage/HelperMessage";
15
+ export { Checkbox } from "./components/Checkbox/Checkbox";
16
+ export { CheckboxCard } from "./components/CheckboxCard/CheckboxCard";
17
+ export { CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup";
18
+ export { Icon } from "./components/Icon/Icon";
19
+ export { Input } from "./components/Input/Input";
20
+ export { Label } from "./components/Label/Label";
21
+ export { LinkCard } from "./components/LinkCard/LinkCard";
22
+ export { MessageHalfModal } from "./components/MessageHalfModal/MessageHalfModal";
23
+ export { MessageModal } from "./components/MessageModal/MessageModal";
24
+ export { Pre } from "./components/Pre/Pre";
25
+ export { RadioButton } from "./components/RadioButton/RadioButton";
26
+ export { RadioCard } from "./components/RadioCard/RadioCard";
27
+ export { RadioGroup } from "./components/RadioGroup/RadioGroup";
28
+ export { Select } from "./components/Select/Select";
29
+ export { Text } from "./components/Text/Text";
30
+ export { TextArea } from "./components/TextArea/TextArea";
31
+ export { Stack } from "./components/Stack/Stack";
32
+ export { Stepper } from "./components/Stepper/Stepper";
33
+ export { Toggle } from "./components/Toggle/Toggle";
34
+
35
+ export type { IconName } from "./types/icon";
@@ -0,0 +1,10 @@
1
+ .required {
2
+ display: inline-block;
3
+ flex-shrink: 0;
4
+ padding: 2px var(--size-spacing-xxs) 1px;
5
+ font-size: var(--text-tag-md-size);
6
+ line-height: var(--text-tag-md-line);
7
+ color: var(--color-ubie-white);
8
+ background-color: var(--color-error);
9
+ border-radius: var(--radius-sm);
10
+ }
@@ -0,0 +1,8 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import styles from "./RequiredLabel.module.css";
5
+
6
+ export const RequiredLabel: React.FC = () => {
7
+ return <span className={styles.required}>必須</span>;
8
+ };
@@ -0,0 +1,15 @@
1
+ .visuallyHidden {
2
+ position: absolute;
3
+ width: 1px;
4
+ height: 1px;
5
+ padding: 0;
6
+ margin: -1px;
7
+ overflow: hidden;
8
+ clip: rect(0, 0, 0, 0);
9
+ white-space: nowrap;
10
+ border-width: 0;
11
+ }
12
+
13
+ .visuallyHidden[tabindex="-1"] {
14
+ outline: none;
15
+ }
@@ -0,0 +1,22 @@
1
+ import { ComponentPropsWithRef, ForwardedRef } from "react";
2
+ import styles from "./VisuallyHidden.module.css";
3
+ import { fixedForwardRef } from "../../utils/component";
4
+ import { DistributiveOmit } from "../../utils/types";
5
+ import type { ElementType } from "react";
6
+
7
+ function VisuallyHiddenInner<T extends ElementType>(
8
+ props: {
9
+ as?: T;
10
+ } & DistributiveOmit<ComponentPropsWithRef<ElementType extends T ? "span" : T>, "as">,
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ ref: ForwardedRef<any>,
13
+ ) {
14
+ const { children, as: Component = "span", className: _, ...otherProps } = props;
15
+ return (
16
+ <Component className={styles.visuallyHidden} {...otherProps} ref={ref}>
17
+ {children}
18
+ </Component>
19
+ );
20
+ }
21
+
22
+ export const VisuallyHidden = fixedForwardRef(VisuallyHiddenInner);
@@ -0,0 +1,4 @@
1
+ import { composeStories } from "@storybook/react-vite";
2
+ import * as stories from "../components/Accordion/Accordion.stories";
3
+
4
+ export default composeStories(stories);
@@ -0,0 +1,474 @@
1
+ import { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { Box, Stack } from "..";
3
+ import type { ComponentProps } from "react";
4
+
5
+ export default {
6
+ component: Box,
7
+ } satisfies Meta<typeof Box>;
8
+
9
+ const defaultArgs = {
10
+ children: "Box",
11
+ pt: "md",
12
+ pr: "md",
13
+ pb: "md",
14
+ pl: "md",
15
+ radius: "md",
16
+ backgroundColor: "blue",
17
+ } satisfies Partial<ComponentProps<typeof Box>>;
18
+
19
+ type Story = StoryObj<typeof Box>;
20
+
21
+ export const Default: Story = {
22
+ args: defaultArgs,
23
+ };
24
+
25
+ export const BackgroundColor: Story = {
26
+ render: (args) => (
27
+ <Stack gap="xs">
28
+ <Box {...args} backgroundColor="blue">
29
+ Blue
30
+ </Box>
31
+ <Box {...args} backgroundColor="blueDarken">
32
+ Blue Darken
33
+ </Box>
34
+ <Box {...args} backgroundColor="blueInverse" textColor="white">
35
+ Blue Inverse
36
+ </Box>
37
+ <Box {...args} backgroundColor="blueInverseDarken" textColor="white">
38
+ Blue Inverse Darken
39
+ </Box>
40
+ <Box {...args} backgroundColor="pink">
41
+ Pink
42
+ </Box>
43
+ <Box {...args} backgroundColor="pinkDarken">
44
+ Pink Darken
45
+ </Box>
46
+ <Box {...args} backgroundColor="pinkInverse" textColor="white">
47
+ Pink Inverse
48
+ </Box>
49
+ <Box {...args} backgroundColor="pinkInverseDarken" textColor="white">
50
+ Pink Inverse Darken
51
+ </Box>
52
+ <Box {...args} backgroundColor="orange">
53
+ Orange
54
+ </Box>
55
+ <Box {...args} backgroundColor="orangeDarken">
56
+ Orange Darken
57
+ </Box>
58
+ <Box {...args} backgroundColor="orangeInverse" textColor="white">
59
+ Orange Inverse
60
+ </Box>
61
+ <Box {...args} backgroundColor="orangeInverseDarken" textColor="white">
62
+ Orange Inverse Darken
63
+ </Box>
64
+ <Box {...args} backgroundColor="purple">
65
+ Purple
66
+ </Box>
67
+ <Box {...args} backgroundColor="purpleDarken">
68
+ Purple Darken
69
+ </Box>
70
+ <Box {...args} backgroundColor="purpleInverse" textColor="white">
71
+ Purple Inverse
72
+ </Box>
73
+ <Box {...args} backgroundColor="purpleInverseDarken" textColor="white">
74
+ Purple Inverse Darken
75
+ </Box>
76
+ <Box {...args} backgroundColor="green">
77
+ Green
78
+ </Box>
79
+ <Box {...args} backgroundColor="greenDarken">
80
+ Green Darken
81
+ </Box>
82
+ <Box {...args} backgroundColor="greenInverse" textColor="white">
83
+ Green Inverse
84
+ </Box>
85
+ <Box {...args} backgroundColor="greenInverseDarken" textColor="white">
86
+ Green Inverse Darken
87
+ </Box>
88
+ <Box {...args} backgroundColor="red">
89
+ Red
90
+ </Box>
91
+ <Box {...args} backgroundColor="redDarken">
92
+ Red Darken
93
+ </Box>
94
+ <Box {...args} backgroundColor="redInverse" textColor="white">
95
+ Red Inverse
96
+ </Box>
97
+ <Box {...args} backgroundColor="redInverseDarken" textColor="white">
98
+ Red Inverse Darken
99
+ </Box>
100
+ <Box {...args} backgroundColor="black">
101
+ Black
102
+ </Box>
103
+ <Box {...args} backgroundColor="blackDarken">
104
+ Black Darken
105
+ </Box>
106
+ <Box {...args} backgroundColor="blackInverse" textColor="white">
107
+ Black Inverse
108
+ </Box>
109
+ <Box {...args} backgroundColor="blackInverseDarken" textColor="white">
110
+ Black Inverse Darken
111
+ </Box>
112
+ <Box {...args} backgroundColor="white" textColor="main">
113
+ White
114
+ </Box>
115
+ </Stack>
116
+ ),
117
+ args: defaultArgs,
118
+ };
119
+
120
+ export const Padding: Story = {
121
+ render: (args) => (
122
+ <div>
123
+ <Box {...args} pt="xxs" pr="xxs" pb="xxs" pl="xxs">
124
+ xxs
125
+ </Box>
126
+ <Box {...args} mt="md" pt="xs" pr="xs" pb="xs" pl="xs">
127
+ xs
128
+ </Box>
129
+ <Box {...args} mt="md" pt="sm" pr="sm" pb="sm" pl="sm">
130
+ sm
131
+ </Box>
132
+ <Box {...args} mt="md" pt="md" pr="md" pb="md" pl="md">
133
+ md
134
+ </Box>
135
+ <Box {...args} mt="md" pt="lg" pr="lg" pb="lg" pl="lg">
136
+ lg
137
+ </Box>
138
+ <Box {...args} mt="md" pt="xl" pr="xl" pb="xl" pl="xl">
139
+ xl
140
+ </Box>
141
+ <Box {...args} mt="md" pt="xxl" pr="xxl" pb="xxl" pl="xxl">
142
+ xxl
143
+ </Box>
144
+ </div>
145
+ ),
146
+ args: defaultArgs,
147
+ };
148
+
149
+ export const Margin: Story = {
150
+ render: (args) => (
151
+ <div>
152
+ <Box {...args} mt="xxs" mr="xxs" mb="xxs" ml="xxs">
153
+ xxs
154
+ </Box>
155
+ <hr />
156
+ <Box {...args} mt="xs" mr="xs" mb="xs" ml="xs">
157
+ xs
158
+ </Box>
159
+ <hr />
160
+ <Box {...args} mt="sm" mr="sm" mb="sm" ml="sm">
161
+ sm
162
+ </Box>
163
+ <hr />
164
+ <Box {...args} mt="md" mr="md" mb="md" ml="md">
165
+ md
166
+ </Box>
167
+ <hr />
168
+ <Box {...args} mt="lg" mr="lg" mb="lg" ml="lg">
169
+ lg
170
+ </Box>
171
+ <hr />
172
+ <Box {...args} mt="xl" mr="xl" mb="xl" ml="xl">
173
+ xl
174
+ </Box>
175
+ <hr />
176
+ <Box {...args} mt="xxl" mr="xxl" mb="xxl" ml="xxl">
177
+ xxl
178
+ </Box>
179
+ </div>
180
+ ),
181
+ args: defaultArgs,
182
+ };
183
+
184
+ export const Radius: Story = {
185
+ render: (args) => (
186
+ <div>
187
+ <Box {...args} pt="md" pr="md" pb="md" pl="md" radius="xs">
188
+ xs
189
+ </Box>
190
+ <Box {...args} mt="md" pt="md" pr="md" pb="md" pl="md" radius="sm">
191
+ sm
192
+ </Box>
193
+ <Box {...args} mt="md" pt="md" pr="md" pb="md" pl="md" radius="md">
194
+ md
195
+ </Box>
196
+ <Box {...args} mt="md" pt="md" pr="md" pb="md" pl="md" radius="lg">
197
+ lg
198
+ </Box>
199
+ <Box {...args} mt="md" pt="md" pr="md" pb="md" pl="md" radius="full">
200
+ full
201
+ </Box>
202
+ </div>
203
+ ),
204
+ args: defaultArgs,
205
+ };
206
+
207
+ export const Border: Story = {
208
+ render: (args) => (
209
+ <Stack gap="xs">
210
+ <Box {...args} backgroundColor="blue" border="blue">
211
+ Blue Border
212
+ </Box>
213
+ <Box {...args} backgroundColor="blue" border="blueThick">
214
+ Blue Border Thick
215
+ </Box>
216
+ <Box {...args} backgroundColor="pink" border="pink">
217
+ Pink Border
218
+ </Box>
219
+ <Box {...args} backgroundColor="pink" border="pinkThick">
220
+ Pink Border Thick
221
+ </Box>
222
+ <Box {...args} backgroundColor="orange" border="orange">
223
+ Orange Border
224
+ </Box>
225
+ <Box {...args} backgroundColor="orange" border="orangeThick">
226
+ Orange Border Thick
227
+ </Box>
228
+ <Box {...args} backgroundColor="purple" border="purple">
229
+ Purple Border
230
+ </Box>
231
+ <Box {...args} backgroundColor="purple" border="purpleThick">
232
+ Purple Border Thick
233
+ </Box>
234
+ <Box {...args} backgroundColor="green" border="green">
235
+ Green Border
236
+ </Box>
237
+ <Box {...args} backgroundColor="green" border="greenThick">
238
+ Green Border Thick
239
+ </Box>
240
+ <Box {...args} backgroundColor="red" border="red">
241
+ Red Border
242
+ </Box>
243
+ <Box {...args} backgroundColor="red" border="redThick">
244
+ Red Border Thick
245
+ </Box>
246
+ <Box {...args} backgroundColor="black" border="black">
247
+ Border Black
248
+ </Box>
249
+ <Box {...args} backgroundColor="black" border="blackThick">
250
+ Border Black Thick
251
+ </Box>
252
+ </Stack>
253
+ ),
254
+ args: defaultArgs,
255
+ };
256
+
257
+ export const Width: Story = {
258
+ render: () => (
259
+ <Stack spacing="md">
260
+ <p>
261
+ Flexコンテナの子要素では、デフォルトでは横幅がintrinsic(コンテンツに応じた幅)となります。widthをfullとすることで100%を維持できます。
262
+ </p>
263
+ <Box {...defaultArgs} width="full">
264
+ Width Full
265
+ </Box>
266
+
267
+ <Box {...defaultArgs} width="100%">
268
+ Width 100%
269
+ </Box>
270
+
271
+ <Box {...defaultArgs} maxWidth="500px">
272
+ Max Width 500px
273
+ </Box>
274
+
275
+ <Box {...defaultArgs} minWidth="500px">
276
+ Min Width 500px
277
+ </Box>
278
+
279
+ <Box {...defaultArgs}>Not Width Full</Box>
280
+ </Stack>
281
+ ),
282
+ };
283
+
284
+ export const AsSection: Story = {
285
+ render: () => (
286
+ <Box as="section" pt="md" pr="md" pb="md" pl="md" radius="md" backgroundColor="blue">
287
+ <h2>Heading</h2>
288
+
289
+ <p>body</p>
290
+ </Box>
291
+ ),
292
+ };
293
+
294
+ export const TextVariations: Story = {
295
+ render: (args) => (
296
+ <div>
297
+ <Box
298
+ {...args}
299
+ backgroundColor="blue"
300
+ textColor="blue"
301
+ textBold
302
+ textType="body"
303
+ textSize="lg"
304
+ textLeading="narrow"
305
+ >
306
+ <p>Text Bold</p>
307
+
308
+ <Box {...args} backgroundColor="black">
309
+ <p>nested</p>
310
+ </Box>
311
+
312
+ <Box
313
+ {...args}
314
+ mt="md"
315
+ backgroundColor="black"
316
+ textColor="black"
317
+ textType="body"
318
+ textSize="sm"
319
+ textLeading="narrow"
320
+ textBold={false}
321
+ >
322
+ <p>nested. reset styles</p>
323
+ </Box>
324
+ </Box>
325
+
326
+ <Box {...args} backgroundColor="black" mt="xl" textColor="main">
327
+ <p>Color Main</p>
328
+ </Box>
329
+ <Box {...args} backgroundColor="black" mt="md" textColor="sub">
330
+ <p>Color Sub</p>
331
+ </Box>
332
+ <Box {...args} backgroundColor="black" mt="md" textColor="link">
333
+ <p>Color Main</p>
334
+ </Box>
335
+ <Box {...args} backgroundColor="black" mt="md" textColor="linkSub">
336
+ <p>Color Link Sub</p>
337
+ </Box>
338
+ <Box {...args} backgroundColor="black" mt="md" textColor="disabled">
339
+ <p>Color Disabled</p>
340
+ </Box>
341
+ <Box {...args} backgroundColor="blue" mt="md" textColor="blue">
342
+ <p>Color Blue</p>
343
+ </Box>
344
+ <Box {...args} backgroundColor="pink" mt="md" textColor="pink">
345
+ <p>Color Pink</p>
346
+ </Box>
347
+ <Box {...args} backgroundColor="orange" mt="md" textColor="orange">
348
+ <p>Color Orange</p>
349
+ </Box>
350
+ <Box {...args} backgroundColor="purple" mt="md" textColor="purple">
351
+ <p>Color Purple</p>
352
+ </Box>
353
+ <Box {...args} backgroundColor="green" mt="md" textColor="green">
354
+ <p>Color Green</p>
355
+ </Box>
356
+ <Box {...args} backgroundColor="red" mt="md" textColor="red">
357
+ <p>Color Red</p>
358
+ </Box>
359
+ <Box {...args} backgroundColor="black" mt="md" textColor="black">
360
+ <p>Color Black</p>
361
+ </Box>
362
+ <Box {...args} mt="xl" textType="body">
363
+ <p>Body size & leading default value</p>
364
+ </Box>
365
+
366
+ <Box {...args} mt="xl" textType="body" textSize="xs" textLeading="default">
367
+ <p>Body Extra Small Default</p>
368
+ </Box>
369
+ <Box {...args} mt="md" textType="body" textSize="xs" textLeading="narrow">
370
+ <p>Body Extra Small Narrow</p>
371
+ </Box>
372
+
373
+ <Box {...args} mt="xl" textType="body" textSize="sm" textLeading="default">
374
+ <p>Body Small Default</p>
375
+ </Box>
376
+ <Box {...args} mt="md" textType="body" textSize="sm" textLeading="narrow">
377
+ <p>Body Small Narrow</p>
378
+ </Box>
379
+
380
+ <Box {...args} mt="xl" textType="body" textSize="md" textLeading="default">
381
+ <p>Body Medium Default</p>
382
+ </Box>
383
+ <Box {...args} mt="md" textType="body" textSize="md" textLeading="narrow">
384
+ <p>Body Medium Narrow</p>
385
+ </Box>
386
+
387
+ <Box {...args} mt="xl" textType="body" textSize="lg" textLeading="default">
388
+ <p>Body Large Default</p>
389
+ </Box>
390
+ <Box {...args} mt="md" textType="body" textSize="lg" textLeading="narrow">
391
+ <p>Body Large Narrow</p>
392
+ </Box>
393
+
394
+ <Box {...defaultArgs} mt="xl" textAlign="left">
395
+ <p>Text Left</p>
396
+ </Box>
397
+ <Box {...defaultArgs} mt="md" textAlign="center">
398
+ <p>Text Center</p>
399
+ </Box>
400
+ <Box {...defaultArgs} mt="md" textAlign="right">
401
+ <p>Text Right</p>
402
+ </Box>
403
+ <div style={{ textAlign: "center" }}>
404
+ <Box {...defaultArgs} mt="md">
405
+ <p>Inherit(undefined)</p>
406
+ </Box>
407
+ </div>
408
+ </div>
409
+ ),
410
+ args: defaultArgs,
411
+ };
412
+
413
+ export const CustomDataAttribute: Story = {
414
+ render: (args) => <Box {...args} />,
415
+ args: {
416
+ ["data-test-id"]: "some-test",
417
+ ...defaultArgs,
418
+ },
419
+ };
420
+
421
+ export const TextWrap: Story = {
422
+ render: (args) => (
423
+ <div style={{ width: 400 }}>
424
+ <Stack spacing="md">
425
+ <Box {...args}>
426
+ <p>
427
+ 私はすべてぼんやりその批評痛というのの中を押しだなけれ。現に十月の仕事方ももしこのお尋ねましたまでをふりまいとならませには刺戟待ったたて、とてもにはなろべきませたです。https://vitals.ubie.life/?hoge=1111111111111111111111111111111111111111111111111111
428
+ </p>
429
+ <p>
430
+ industry. Lorem Ipsum has been the industry&apos;s standard dummy text ever since the
431
+ 1500s, when an unknown printer took a galley of type and scrambled it to make a type
432
+ specimen booooooooooooooooooooooooooooooooooooooooooooook.
433
+ </p>
434
+ </Box>
435
+
436
+ <Box {...args} textNoWrap>
437
+ <p>noWrap</p>
438
+ <p>
439
+ 私はすべてぼんやりその批評痛というのの中を押しだなけれ。現に十月の仕事方ももしこのお尋ねましたまでをふりまいとならませには刺戟待ったたて、とてもにはなろべきませたです。https://vitals.ubie.life/?hoge=1111111111111111111111111111111111111111111111111111
440
+ </p>
441
+ <p>
442
+ industry. Lorem Ipsum has been the industry&apos;s standard dummy text ever since the
443
+ 1500s, when an unknown printer took a galley of type and scrambled it to make a type
444
+ specimen booooooooooooooooooooooooooooooooooooooooooooook.
445
+ </p>
446
+ </Box>
447
+ </Stack>
448
+ </div>
449
+ ),
450
+ args: {
451
+ ...defaultArgs,
452
+ },
453
+ };
454
+
455
+ export const Inline: Story = {
456
+ render: (args) => (
457
+ <p>
458
+ 文章文章文章
459
+ <Box {...args} inline>
460
+ インライン
461
+ </Box>
462
+ 文章文章文章
463
+ </p>
464
+ ),
465
+ args: {
466
+ ...defaultArgs,
467
+ as: "span",
468
+ backgroundColor: "blueInverse",
469
+ textColor: "white",
470
+ inline: true,
471
+ p: "xs",
472
+ m: "sm",
473
+ },
474
+ };