@remember-web/primitive 0.1.18 → 0.1.20

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 (262) hide show
  1. package/dist/src/Avatars/Avatar/index.cjs.js +2 -2
  2. package/dist/src/Avatars/Avatar/index.cjs.js.map +1 -1
  3. package/dist/src/Avatars/Avatar/index.d.ts +1 -1
  4. package/dist/src/Avatars/Avatar/index.d.ts.map +1 -1
  5. package/dist/src/Avatars/Avatar/index.esm.js +2 -2
  6. package/dist/src/Avatars/Avatar/index.esm.js.map +1 -1
  7. package/dist/src/Avatars/Avatar/styles.cjs.js.map +1 -1
  8. package/dist/src/Avatars/Avatar/styles.d.ts.map +1 -1
  9. package/dist/src/Avatars/Avatar/styles.esm.js.map +1 -1
  10. package/dist/src/Badge/style.cjs.js +1 -1
  11. package/dist/src/Badge/style.cjs.js.map +1 -1
  12. package/dist/src/Badge/style.esm.js +1 -1
  13. package/dist/src/Badge/style.esm.js.map +1 -1
  14. package/dist/src/Badge/utils.cjs.js.map +1 -1
  15. package/dist/src/Badge/utils.d.ts.map +1 -1
  16. package/dist/src/Badge/utils.esm.js.map +1 -1
  17. package/dist/src/Buttons/Button/index.cjs.js +7 -7
  18. package/dist/src/Buttons/Button/index.cjs.js.map +1 -1
  19. package/dist/src/Buttons/Button/index.d.ts +2 -8
  20. package/dist/src/Buttons/Button/index.d.ts.map +1 -1
  21. package/dist/src/Buttons/Button/index.esm.js +5 -5
  22. package/dist/src/Buttons/Button/index.esm.js.map +1 -1
  23. package/dist/src/Buttons/Button/styles.cjs.js +2 -2
  24. package/dist/src/Buttons/Button/styles.cjs.js.map +1 -1
  25. package/dist/src/Buttons/Button/styles.d.ts +1 -2
  26. package/dist/src/Buttons/Button/styles.d.ts.map +1 -1
  27. package/dist/src/Buttons/Button/styles.esm.js +2 -2
  28. package/dist/src/Buttons/Button/styles.esm.js.map +1 -1
  29. package/dist/src/Buttons/Button/types.d.ts +4 -6
  30. package/dist/src/Buttons/Button/types.d.ts.map +1 -1
  31. package/dist/src/Buttons/index.d.ts +1 -1
  32. package/dist/src/Buttons/index.d.ts.map +1 -1
  33. package/dist/src/Common/Divider/index.cjs.js +10 -2
  34. package/dist/src/Common/Divider/index.cjs.js.map +1 -1
  35. package/dist/src/Common/Divider/index.d.ts +2 -0
  36. package/dist/src/Common/Divider/index.d.ts.map +1 -1
  37. package/dist/src/Common/Divider/index.esm.js +10 -2
  38. package/dist/src/Common/Divider/index.esm.js.map +1 -1
  39. package/dist/src/Common/Flex/index.cjs.js +7 -6
  40. package/dist/src/Common/Flex/index.cjs.js.map +1 -1
  41. package/dist/src/Common/Flex/index.d.ts +5 -4
  42. package/dist/src/Common/Flex/index.d.ts.map +1 -1
  43. package/dist/src/Common/Flex/index.esm.js +7 -6
  44. package/dist/src/Common/Flex/index.esm.js.map +1 -1
  45. package/dist/src/Common/Grid/index.cjs.js +1 -0
  46. package/dist/src/Common/Grid/index.cjs.js.map +1 -1
  47. package/dist/src/Common/Grid/index.d.ts +1 -0
  48. package/dist/src/Common/Grid/index.d.ts.map +1 -1
  49. package/dist/src/Common/Grid/index.esm.js +1 -0
  50. package/dist/src/Common/Grid/index.esm.js.map +1 -1
  51. package/dist/src/Common/Skeleton/index.cjs.js +34 -0
  52. package/dist/src/Common/Skeleton/index.cjs.js.map +1 -0
  53. package/dist/src/Common/Skeleton/index.d.ts +5 -0
  54. package/dist/src/Common/Skeleton/index.d.ts.map +1 -0
  55. package/dist/src/Common/Skeleton/index.esm.js +27 -0
  56. package/dist/src/Common/Skeleton/index.esm.js.map +1 -0
  57. package/dist/src/Common/Skeleton/styles.cjs.js +34 -0
  58. package/dist/src/Common/Skeleton/styles.cjs.js.map +1 -0
  59. package/dist/src/Common/Skeleton/styles.d.ts +10 -0
  60. package/dist/src/Common/Skeleton/styles.d.ts.map +1 -0
  61. package/dist/src/Common/Skeleton/styles.esm.js +26 -0
  62. package/dist/src/Common/Skeleton/styles.esm.js.map +1 -0
  63. package/dist/src/Common/Spinner/styles.cjs.js.map +1 -1
  64. package/dist/src/Common/Spinner/styles.d.ts.map +1 -1
  65. package/dist/src/Common/Spinner/styles.esm.js.map +1 -1
  66. package/dist/src/Common/Spinner/types.d.ts +1 -1
  67. package/dist/src/Common/Spinner/types.d.ts.map +1 -1
  68. package/dist/src/Common/Typography/index.cjs.js +4 -7
  69. package/dist/src/Common/Typography/index.cjs.js.map +1 -1
  70. package/dist/src/Common/Typography/index.d.ts +7 -10
  71. package/dist/src/Common/Typography/index.d.ts.map +1 -1
  72. package/dist/src/Common/Typography/index.esm.js +4 -7
  73. package/dist/src/Common/Typography/index.esm.js.map +1 -1
  74. package/dist/src/Common/Typography/styles.cjs.js +1 -1
  75. package/dist/src/Common/Typography/styles.cjs.js.map +1 -1
  76. package/dist/src/Common/Typography/styles.d.ts +1 -1
  77. package/dist/src/Common/Typography/styles.d.ts.map +1 -1
  78. package/dist/src/Common/Typography/styles.esm.js +1 -1
  79. package/dist/src/Common/Typography/styles.esm.js.map +1 -1
  80. package/dist/src/Common/index.d.ts +2 -1
  81. package/dist/src/Common/index.d.ts.map +1 -1
  82. package/dist/src/Control/BaseToggle/ToggleIcon/index.cjs.js.map +1 -1
  83. package/dist/src/Control/BaseToggle/ToggleIcon/index.d.ts.map +1 -1
  84. package/dist/src/Control/BaseToggle/ToggleIcon/index.esm.js.map +1 -1
  85. package/dist/src/Control/BaseToggle/index.cjs.js +2 -1
  86. package/dist/src/Control/BaseToggle/index.cjs.js.map +1 -1
  87. package/dist/src/Control/BaseToggle/index.esm.js +2 -1
  88. package/dist/src/Control/BaseToggle/index.esm.js.map +1 -1
  89. package/dist/src/Control/BaseToggle/styles.cjs.js +1 -1
  90. package/dist/src/Control/BaseToggle/styles.cjs.js.map +1 -1
  91. package/dist/src/Control/BaseToggle/styles.esm.js +1 -1
  92. package/dist/src/Control/BaseToggle/styles.esm.js.map +1 -1
  93. package/dist/src/Control/Checkbox.cjs.js.map +1 -1
  94. package/dist/src/Control/Checkbox.d.ts.map +1 -1
  95. package/dist/src/Control/Checkbox.esm.js.map +1 -1
  96. package/dist/src/Control/Radio.cjs.js.map +1 -1
  97. package/dist/src/Control/Radio.esm.js.map +1 -1
  98. package/dist/src/Control/Switch/index.cjs.js.map +1 -1
  99. package/dist/src/Control/Switch/index.esm.js.map +1 -1
  100. package/dist/src/Control/Switch/styles.cjs.js +1 -1
  101. package/dist/src/Control/Switch/styles.cjs.js.map +1 -1
  102. package/dist/src/Control/Switch/styles.esm.js +1 -1
  103. package/dist/src/Control/Switch/styles.esm.js.map +1 -1
  104. package/dist/src/Control/Toggle.cjs.js.map +1 -1
  105. package/dist/src/Control/Toggle.d.ts.map +1 -1
  106. package/dist/src/Control/Toggle.esm.js.map +1 -1
  107. package/dist/src/Floating/DropdownMenu/DropdownMenuSection.cjs.js.map +1 -1
  108. package/dist/src/Floating/DropdownMenu/DropdownMenuSection.d.ts +1 -1
  109. package/dist/src/Floating/DropdownMenu/DropdownMenuSection.d.ts.map +1 -1
  110. package/dist/src/Floating/DropdownMenu/DropdownMenuSection.esm.js.map +1 -1
  111. package/dist/src/Floating/DropdownMenu/index.cjs.js.map +1 -1
  112. package/dist/src/Floating/DropdownMenu/index.d.ts.map +1 -1
  113. package/dist/src/Floating/DropdownMenu/index.esm.js.map +1 -1
  114. package/dist/src/Floating/DropdownMenu/styles.cjs.js +1 -1
  115. package/dist/src/Floating/DropdownMenu/styles.cjs.js.map +1 -1
  116. package/dist/src/Floating/DropdownMenu/styles.d.ts.map +1 -1
  117. package/dist/src/Floating/DropdownMenu/styles.esm.js +1 -1
  118. package/dist/src/Floating/DropdownMenu/styles.esm.js.map +1 -1
  119. package/dist/src/Floating/Popover/styles.cjs.js +1 -1
  120. package/dist/src/Floating/Popover/styles.cjs.js.map +1 -1
  121. package/dist/src/Floating/Popover/styles.esm.js +1 -1
  122. package/dist/src/Floating/Popover/styles.esm.js.map +1 -1
  123. package/dist/src/Floating/Tooltip/index.cjs.js +2 -2
  124. package/dist/src/Floating/Tooltip/index.cjs.js.map +1 -1
  125. package/dist/src/Floating/Tooltip/index.d.ts.map +1 -1
  126. package/dist/src/Floating/Tooltip/index.esm.js +2 -2
  127. package/dist/src/Floating/Tooltip/index.esm.js.map +1 -1
  128. package/dist/src/Floating/Tooltip/styles.cjs.js +1 -1
  129. package/dist/src/Floating/Tooltip/styles.cjs.js.map +1 -1
  130. package/dist/src/Floating/Tooltip/styles.esm.js +1 -1
  131. package/dist/src/Floating/Tooltip/styles.esm.js.map +1 -1
  132. package/dist/src/Inputs/Select/DesignedSelect/index.cjs.js +2 -2
  133. package/dist/src/Inputs/Select/DesignedSelect/index.cjs.js.map +1 -1
  134. package/dist/src/Inputs/Select/DesignedSelect/index.d.ts.map +1 -1
  135. package/dist/src/Inputs/Select/DesignedSelect/index.esm.js +2 -2
  136. package/dist/src/Inputs/Select/DesignedSelect/index.esm.js.map +1 -1
  137. package/dist/src/Inputs/Select/DesignedSelect/styles.cjs.js +1 -1
  138. package/dist/src/Inputs/Select/DesignedSelect/styles.cjs.js.map +1 -1
  139. package/dist/src/Inputs/Select/DesignedSelect/styles.esm.js +1 -1
  140. package/dist/src/Inputs/Select/DesignedSelect/styles.esm.js.map +1 -1
  141. package/dist/src/Inputs/Select/NativeSelect/index.cjs.js +2 -2
  142. package/dist/src/Inputs/Select/NativeSelect/index.cjs.js.map +1 -1
  143. package/dist/src/Inputs/Select/NativeSelect/index.esm.js +2 -2
  144. package/dist/src/Inputs/Select/NativeSelect/index.esm.js.map +1 -1
  145. package/dist/src/Inputs/Select/NativeSelect/styles.cjs.js +1 -1
  146. package/dist/src/Inputs/Select/NativeSelect/styles.cjs.js.map +1 -1
  147. package/dist/src/Inputs/Select/NativeSelect/styles.esm.js +1 -1
  148. package/dist/src/Inputs/Select/NativeSelect/styles.esm.js.map +1 -1
  149. package/dist/src/Inputs/Select/NativeSelect/types.d.ts +1 -1
  150. package/dist/src/Inputs/Select/NativeSelect/types.d.ts.map +1 -1
  151. package/dist/src/Inputs/Select/Option/index.cjs.js +0 -1
  152. package/dist/src/Inputs/Select/Option/index.cjs.js.map +1 -1
  153. package/dist/src/Inputs/Select/Option/index.d.ts.map +1 -1
  154. package/dist/src/Inputs/Select/Option/index.esm.js +0 -1
  155. package/dist/src/Inputs/Select/Option/index.esm.js.map +1 -1
  156. package/dist/src/Inputs/Select/styles.cjs.js +1 -1
  157. package/dist/src/Inputs/Select/styles.cjs.js.map +1 -1
  158. package/dist/src/Inputs/Select/styles.esm.js +1 -1
  159. package/dist/src/Inputs/Select/styles.esm.js.map +1 -1
  160. package/dist/src/Inputs/TextInput/index.cjs.js +1 -1
  161. package/dist/src/Inputs/TextInput/index.cjs.js.map +1 -1
  162. package/dist/src/Inputs/TextInput/index.esm.js +1 -1
  163. package/dist/src/Inputs/TextInput/index.esm.js.map +1 -1
  164. package/dist/src/Inputs/TextInput/styles.cjs.js +1 -1
  165. package/dist/src/Inputs/TextInput/styles.cjs.js.map +1 -1
  166. package/dist/src/Inputs/TextInput/styles.esm.js +1 -1
  167. package/dist/src/Inputs/TextInput/styles.esm.js.map +1 -1
  168. package/dist/src/Inputs/TextInput/types.d.ts +1 -1
  169. package/dist/src/Inputs/TextInput/types.d.ts.map +1 -1
  170. package/dist/src/Logos/RememberServiceLogo/index.cjs.js +1 -0
  171. package/dist/src/Logos/RememberServiceLogo/index.cjs.js.map +1 -1
  172. package/dist/src/Logos/RememberServiceLogo/index.d.ts.map +1 -1
  173. package/dist/src/Logos/RememberServiceLogo/index.esm.js +1 -0
  174. package/dist/src/Logos/RememberServiceLogo/index.esm.js.map +1 -1
  175. package/dist/src/Logos/RememberServiceLogo/style.cjs.js +1 -1
  176. package/dist/src/Logos/RememberServiceLogo/style.cjs.js.map +1 -1
  177. package/dist/src/Logos/RememberServiceLogo/style.esm.js +1 -1
  178. package/dist/src/Logos/RememberServiceLogo/style.esm.js.map +1 -1
  179. package/dist/src/Modals/Dialog/index.cjs.js.map +1 -1
  180. package/dist/src/Modals/Dialog/index.esm.js.map +1 -1
  181. package/dist/src/Modals/Dialog/styles.cjs.js +2 -2
  182. package/dist/src/Modals/Dialog/styles.cjs.js.map +1 -1
  183. package/dist/src/Modals/Dialog/styles.d.ts.map +1 -1
  184. package/dist/src/Modals/Dialog/styles.esm.js +1 -1
  185. package/dist/src/Modals/Dialog/styles.esm.js.map +1 -1
  186. package/dist/src/Paginations/styles.cjs.js +1 -1
  187. package/dist/src/Paginations/styles.cjs.js.map +1 -1
  188. package/dist/src/Paginations/styles.esm.js +1 -1
  189. package/dist/src/Paginations/styles.esm.js.map +1 -1
  190. package/dist/src/hooks/useMouseEventAway.cjs.js.map +1 -1
  191. package/dist/src/hooks/useMouseEventAway.esm.js.map +1 -1
  192. package/dist/src/index.cjs.js +40 -38
  193. package/dist/src/index.cjs.js.map +1 -1
  194. package/dist/src/index.esm.js +3 -2
  195. package/dist/src/index.esm.js.map +1 -1
  196. package/dist/src/stories/common.styles.d.ts.map +1 -1
  197. package/package.json +3 -6
  198. package/src/Avatars/Avatar/Avatar.stories.tsx +1 -1
  199. package/src/Avatars/Avatar/index.tsx +3 -3
  200. package/src/Avatars/Avatar/styles.ts +1 -1
  201. package/src/Badge/Badge.stories.tsx +2 -2
  202. package/src/Badge/style.tsx +1 -1
  203. package/src/Badge/utils.ts +1 -1
  204. package/src/Buttons/Button/Button.stories.tsx +1 -1
  205. package/src/Buttons/Button/index.tsx +42 -51
  206. package/src/Buttons/Button/styles.ts +13 -11
  207. package/src/Buttons/Button/types.ts +6 -12
  208. package/src/Buttons/index.ts +1 -1
  209. package/src/Common/Divider/Divider.stories.tsx +1 -1
  210. package/src/Common/Divider/index.tsx +7 -4
  211. package/src/Common/Flex/index.tsx +36 -28
  212. package/src/Common/Grid/index.tsx +1 -0
  213. package/src/Common/Skeleton/Skeleton.stories.tsx +35 -0
  214. package/src/Common/Skeleton/index.tsx +25 -0
  215. package/src/Common/Skeleton/styles.ts +46 -0
  216. package/src/Common/Spinner/Spinner.stories.tsx +1 -1
  217. package/src/Common/Spinner/styles.ts +5 -3
  218. package/src/Common/Spinner/types.ts +1 -1
  219. package/src/Common/Typography/Typography.stories.tsx +2 -2
  220. package/src/Common/Typography/index.tsx +23 -38
  221. package/src/Common/Typography/styles.ts +3 -3
  222. package/src/Common/index.ts +2 -1
  223. package/src/Control/BaseToggle/ToggleIcon/index.tsx +1 -1
  224. package/src/Control/BaseToggle/styles.ts +1 -1
  225. package/src/Control/Checkbox.stories.tsx +0 -2
  226. package/src/Control/Checkbox.tsx +1 -1
  227. package/src/Control/Radio.stories.tsx +1 -1
  228. package/src/Control/Radio.tsx +1 -1
  229. package/src/Control/Switch/Switch.stories.tsx +0 -1
  230. package/src/Control/Switch/index.tsx +1 -1
  231. package/src/Control/Switch/styles.ts +1 -1
  232. package/src/Control/Toggle.stories.tsx +1 -2
  233. package/src/Control/Toggle.tsx +1 -1
  234. package/src/Floating/DropdownMenu/DropdownMenuSection.tsx +2 -2
  235. package/src/Floating/DropdownMenu/index.tsx +1 -1
  236. package/src/Floating/DropdownMenu/styles.tsx +1 -1
  237. package/src/Floating/Popover/Popover.stories.tsx +1 -1
  238. package/src/Floating/Popover/styles.ts +1 -1
  239. package/src/Floating/Tooltip/Tooltip.stories.tsx +1 -1
  240. package/src/Floating/Tooltip/index.tsx +4 -4
  241. package/src/Floating/Tooltip/styles.ts +1 -1
  242. package/src/Inputs/Select/DesignedSelect/index.tsx +3 -3
  243. package/src/Inputs/Select/DesignedSelect/styles.ts +2 -2
  244. package/src/Inputs/Select/NativeSelect/index.tsx +2 -2
  245. package/src/Inputs/Select/NativeSelect/styles.ts +1 -1
  246. package/src/Inputs/Select/NativeSelect/types.ts +1 -1
  247. package/src/Inputs/Select/Option/index.tsx +0 -1
  248. package/src/Inputs/Select/Select.stories.tsx +0 -2
  249. package/src/Inputs/Select/styles.ts +1 -1
  250. package/src/Inputs/TextInput/index.tsx +1 -1
  251. package/src/Inputs/TextInput/styles.ts +2 -2
  252. package/src/Inputs/TextInput/types.ts +1 -1
  253. package/src/Logos/RememberServiceLogo/index.tsx +1 -1
  254. package/src/Logos/RememberServiceLogo/style.ts +1 -1
  255. package/src/Modals/Dialog/Dialog.stories.tsx +1 -1
  256. package/src/Modals/Dialog/index.tsx +1 -1
  257. package/src/Modals/Dialog/styles.ts +2 -2
  258. package/src/Paginations/CompactPagination/CompactPagination.stories.tsx +0 -1
  259. package/src/Paginations/Pagination/Pagination.stories.tsx +0 -1
  260. package/src/Paginations/styles.ts +2 -2
  261. package/src/hooks/useMouseEventAway.ts +1 -1
  262. package/src/stories/common.styles.tsx +2 -2
@@ -1,9 +1,9 @@
1
1
  import type { StoryObj } from '@storybook/react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { badgePseudo } from '@/Badge/utils';
5
- import type { BadgeAttribute } from '@/Badge/types';
6
4
  import { Badge } from '@/Badge/Badge';
5
+ import type { BadgeAttribute } from '@/Badge/types';
6
+ import { badgePseudo } from '@/Badge/utils';
7
7
 
8
8
  type Story = StoryObj<typeof Badge>;
9
9
 
@@ -1,9 +1,9 @@
1
- import styled, { css } from 'styled-components';
2
1
  import {
3
2
  contents999,
4
3
  getTypographyStyles,
5
4
  secondary100,
6
5
  } from '@remember-web/mixin';
6
+ import styled, { css } from 'styled-components';
7
7
 
8
8
  /**
9
9
  * pseudo로 사용시 data-badge-value attribue가 필요합니다.
@@ -1,5 +1,5 @@
1
- import type { BadgeValueProps } from '@/Badge/types';
2
1
  import { getBadgePseudoCss } from '@/Badge/style';
2
+ import type { BadgeValueProps } from '@/Badge/types';
3
3
 
4
4
  export const getBadgeValue = (props: BadgeValueProps): string => {
5
5
  if (typeof props === 'string') {
@@ -56,7 +56,7 @@ export const AnchorButton: Story = {
56
56
  isIconName(iconString) &&
57
57
  createElement(getIconComponentFromName(iconString));
58
58
 
59
- return <Button {...args} icon={iconElement} as="a" href="#" />;
59
+ return <Button {...(args as any)} icon={iconElement} as="a" href="#" />;
60
60
  },
61
61
  };
62
62
 
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import type { ElementType, ForwardRefRenderFunction } from 'react';
3
+ import type { ForwardedRef } from 'react';
4
4
  import { forwardRef } from 'react';
5
- import type { As } from '@remember-web/shared';
5
+ import type { PolymorphicComponent } from 'styled-components';
6
6
 
7
7
  import { Spinner } from '@/Common';
8
8
 
@@ -10,52 +10,43 @@ import { SPINNER_SIZE_MAP } from './const';
10
10
  import { StyledButton } from './styles';
11
11
  import type { ButtonProps } from './types';
12
12
 
13
- const Button: ForwardRefRenderFunction<
14
- HTMLButtonElement,
15
- ButtonProps<'button'> & As<ElementType>
16
- > = (
17
- {
18
- children,
19
- color,
20
- size = 'small',
21
- variant = 'primary',
22
- layout = 'block',
23
- isLoading = false,
24
- filled = variant === 'primary',
25
- icon,
26
- iconPosition = 'left',
27
- ...props
28
- },
29
- ref
30
- ) => (
31
- <StyledButton
32
- $color={color}
33
- $size={size}
34
- $variant={variant}
35
- $layout={layout}
36
- $isLoading={isLoading}
37
- $filled={filled}
38
- aria-live="polite"
39
- aria-busy={isLoading}
40
- ref={ref}
41
- {...props}
42
- >
43
- {isLoading ? (
44
- <Spinner size={SPINNER_SIZE_MAP[size]} />
45
- ) : (
46
- <>
47
- {iconPosition === 'left' && icon}
48
- {children}
49
- {iconPosition === 'right' && icon}
50
- </>
51
- )}
52
- </StyledButton>
53
- );
54
-
55
- type ButtonComponentWithRef = <T extends ElementType = 'button'>(
56
- props: { as?: T | null } & ButtonProps<T> & {
57
- ref?: React.ComponentPropsWithRef<T>['ref'];
58
- }
59
- ) => React.ReactElement | null;
60
-
61
- export default forwardRef(Button) as ButtonComponentWithRef;
13
+ export const Button = forwardRef(
14
+ (
15
+ {
16
+ children,
17
+ color,
18
+ size = 'small',
19
+ variant = 'primary',
20
+ layout = 'block',
21
+ isLoading = false,
22
+ filled = variant === 'primary',
23
+ icon,
24
+ iconPosition = 'left',
25
+ ...props
26
+ }: ButtonProps,
27
+ ref: ForwardedRef<HTMLButtonElement | null>
28
+ ) => (
29
+ <StyledButton
30
+ $color={color}
31
+ $size={size}
32
+ $variant={variant}
33
+ $layout={layout}
34
+ $isLoading={isLoading}
35
+ $filled={filled}
36
+ aria-live="polite"
37
+ aria-busy={isLoading}
38
+ ref={ref}
39
+ {...props}
40
+ >
41
+ {isLoading ? (
42
+ <Spinner size={SPINNER_SIZE_MAP[size]} />
43
+ ) : (
44
+ <>
45
+ {iconPosition === 'left' && icon}
46
+ {children}
47
+ {iconPosition === 'right' && icon}
48
+ </>
49
+ )}
50
+ </StyledButton>
51
+ )
52
+ ) as PolymorphicComponent<'web', ButtonProps>;
@@ -1,7 +1,5 @@
1
1
  'use client';
2
2
 
3
- import type { DataAttributes } from 'styled-components';
4
- import styled, { css } from 'styled-components';
5
3
  import {
6
4
  bg100,
7
5
  disabled,
@@ -9,11 +7,12 @@ import {
9
7
  primary100,
10
8
  primary200,
11
9
  } from '@remember-web/mixin';
10
+ import styled, { css } from 'styled-components';
12
11
 
13
12
  import { BUTTON_COLORS, BUTTON_SIZES, ICON_GAP_MAP } from './const';
14
13
  import type { ButtonStyleProps } from './types';
15
14
 
16
- export const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(
15
+ export const StyledButton = styled.button<ButtonStyleProps>(
17
16
  ({ $size, $layout, $color, ...props }) => [
18
17
  // 공용 스타일
19
18
  css`
@@ -38,14 +37,16 @@ export const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(
38
37
  text-align: center;
39
38
 
40
39
  width: fit-content;
41
- ${$layout === 'fullBlock' && `width: 100%;`}
40
+ ${$layout === 'fullBlock' && 'width: 100%;'}
42
41
  min-width: ${BUTTON_SIZES[$size].minWidth};
43
42
  height: ${BUTTON_SIZES[$size].height};
44
43
  padding: ${BUTTON_SIZES[$size].padding};
45
44
  border-radius: 4px;
46
45
 
47
- color: ${(props.$variant.startsWith('outline') ? $color : null) ??
48
- BUTTON_COLORS[props.$variant].color};
46
+ color: ${
47
+ (props.$variant.startsWith('outline') ? $color : null) ??
48
+ BUTTON_COLORS[props.$variant].color
49
+ };
49
50
 
50
51
  &:focus-visible:not(:disabled) {
51
52
  outline: 2px solid ${primary100};
@@ -86,8 +87,9 @@ export const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(
86
87
  // primary 스타일
87
88
  props.$variant === 'primary' &&
88
89
  css`
89
- background-color: ${$color ??
90
- BUTTON_COLORS[props.$variant].backgroundColor};
90
+ background-color: ${
91
+ $color ?? BUTTON_COLORS[props.$variant].backgroundColor
92
+ };
91
93
  &:disabled {
92
94
  background-color: ${disabled};
93
95
  }
@@ -99,9 +101,9 @@ export const StyledButton = styled.button<ButtonStyleProps & DataAttributes>(
99
101
  // outline 스타일
100
102
  props.$variant === 'outline' &&
101
103
  css`
102
- background-color: ${props.$filled
103
- ? bg100
104
- : BUTTON_COLORS[props.$variant].backgroundColor};
104
+ background-color: ${
105
+ props.$filled ? bg100 : BUTTON_COLORS[props.$variant].backgroundColor
106
+ };
105
107
  border: 1px solid ${$color ?? BUTTON_COLORS[props.$variant].borderColor};
106
108
  &:disabled {
107
109
  border-color: ${disabled};
@@ -1,6 +1,6 @@
1
- import type { ElementType } from 'react';
2
- import type { ConvertTransientProps } from '@remember-web/shared';
3
1
  import type { ColorVariable } from '@remember-web/mixin';
2
+ import type { ConvertTransientProps } from '@remember-web/shared';
3
+ import type { ComponentProps } from 'react';
4
4
 
5
5
  export type ButtonSize = 'small' | 'medium' | 'large' | 'xLarge';
6
6
 
@@ -19,13 +19,7 @@ export interface ButtonStyleProps {
19
19
  $filled?: boolean;
20
20
  }
21
21
 
22
- type ConvertProps = ConvertTransientProps<Partial<ButtonStyleProps>>;
23
-
24
- export type ButtonProps<AsT extends ElementType> = Omit<
25
- React.ComponentPropsWithoutRef<AsT>,
26
- keyof ButtonStyleProps | 'icon' | 'iconPosition'
27
- > &
28
- ConvertProps & {
29
- icon?: React.ReactNode;
30
- iconPosition?: 'left' | 'right';
31
- };
22
+ export type ButtonProps = ConvertTransientProps<Partial<ButtonStyleProps>> & {
23
+ icon?: React.ReactNode;
24
+ iconPosition?: 'left' | 'right';
25
+ } & ComponentProps<'button'>;
@@ -1 +1 @@
1
- export { default as Button } from './Button';
1
+ export * from './Button';
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import { Flex } from '../Flex';
3
+ import Flex from '../Flex';
4
4
  import { Divider } from './index';
5
5
 
6
6
  type Story = StoryObj<typeof Divider>;
@@ -1,22 +1,25 @@
1
1
  'use client';
2
2
 
3
3
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
4
- import styled from 'styled-components';
5
4
  import { divider } from '@remember-web/mixin';
5
+ import styled from 'styled-components';
6
6
 
7
7
  export interface DividerProps extends SeparatorPrimitive.SeparatorProps {
8
8
  color?: string;
9
+ $width?: string | number;
10
+ $height?: string | number;
9
11
  }
10
12
 
11
13
  const StyledDivider = styled(SeparatorPrimitive.Root)<DividerProps>`
12
14
  background-color: ${({ color = divider }) => color};
13
15
  &[data-orientation='horizontal'] {
14
16
  height: 1px;
15
- width: 100%;
17
+ width: ${({ $width = '100%' }) =>
18
+ typeof $width === 'number' ? `${$width}px` : $width};
16
19
  }
17
-
18
20
  &[data-orientation='vertical'] {
19
- height: 100%;
21
+ height: ${({ $height = '100%' }) =>
22
+ typeof $height === 'number' ? `${$height}px` : $height};
20
23
  width: 1px;
21
24
  }
22
25
  `;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import type { CSSProperties, ElementType, HTMLAttributes } from 'react';
4
- import styled, { css } from 'styled-components';
5
3
  import type { ConvertTransientProps } from '@remember-web/shared';
4
+ import type { CSSProperties, ComponentProps, ForwardedRef } from 'react';
5
+ import { forwardRef } from 'react';
6
+ import type { PolymorphicComponent } from 'styled-components';
7
+ import styled, { css } from 'styled-components';
6
8
 
7
- export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
8
- as?: ElementType;
9
+ export interface FlexStyledProps extends ComponentProps<'div'> {
9
10
  $align?: CSSProperties['alignItems'];
10
11
  $direction?: CSSProperties['flexDirection'];
11
12
  $justify?: CSSProperties['justifyContent'];
@@ -15,7 +16,7 @@ export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
15
16
  $height?: string | number;
16
17
  }
17
18
 
18
- const StyledFlex = styled.div<Partial<FlexProps>>(
19
+ const StyledFlex = styled.div<Partial<FlexStyledProps>>(
19
20
  ({
20
21
  $align = 'center',
21
22
  $direction = 'row',
@@ -47,26 +48,33 @@ const StyledFlex = styled.div<Partial<FlexProps>>(
47
48
  * @prop {CSSProperties['flexDirection']} direction
48
49
  * @prop {CSSProperties['flexWrap']} wrap
49
50
  */
50
- export const Flex = ({
51
- as,
52
- width,
53
- height,
54
- direction,
55
- gap,
56
- align,
57
- justify,
58
- wrap,
59
- ...props
60
- }: ConvertTransientProps<FlexProps>) => (
61
- <StyledFlex
62
- as={as}
63
- $width={width}
64
- $height={height}
65
- $direction={direction}
66
- $gap={gap}
67
- $align={align}
68
- $justify={justify}
69
- $wrap={wrap}
70
- {...props}
71
- />
72
- );
51
+
52
+ export const Flex = forwardRef(
53
+ (
54
+ {
55
+ width,
56
+ height,
57
+ direction,
58
+ gap,
59
+ align,
60
+ justify,
61
+ wrap,
62
+ ...props
63
+ }: FlexProps,
64
+ ref: ForwardedRef<HTMLDivElement | null>
65
+ ) => (
66
+ <StyledFlex
67
+ ref={ref}
68
+ $width={width}
69
+ $height={height}
70
+ $direction={direction}
71
+ $gap={gap}
72
+ $align={align}
73
+ $justify={justify}
74
+ $wrap={wrap}
75
+ {...props}
76
+ />
77
+ )
78
+ ) as PolymorphicComponent<'web', FlexProps>;
79
+
80
+ export type FlexProps = ConvertTransientProps<FlexStyledProps>;
@@ -30,6 +30,7 @@ const StyledGrid = styled.div<Partial<GridProps>>`
30
30
  `;
31
31
 
32
32
  /**
33
+ * @deprecated
33
34
  * @prop {string} width
34
35
  * @prop {string} height
35
36
  * @prop {CSSProperties['alignItems']} align
@@ -0,0 +1,35 @@
1
+ import { Skeleton } from '@/Common/Skeleton';
2
+ import { divider } from '@remember-web/mixin';
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+
5
+
6
+
7
+ type Story = StoryObj<typeof Skeleton>;
8
+
9
+ const meta = {
10
+ title: 'Primitive/Skeleton/Skeleton',
11
+ component: Skeleton,
12
+ args: {
13
+ animate: true,
14
+ width: 300,
15
+ height: 300,
16
+ variant: 'rounded',
17
+ },
18
+ } satisfies Meta<typeof Skeleton>;
19
+
20
+ export const Default: Story = {
21
+ render: (args) => (
22
+ <div
23
+ style={{
24
+ border: `solid 1px ${divider}`,
25
+ height: '300px',
26
+ width: '300px',
27
+ padding: 14,
28
+ }}
29
+ >
30
+ <Skeleton {...args} />
31
+ </div>
32
+ ),
33
+ };
34
+
35
+ export default meta;
@@ -0,0 +1,25 @@
1
+ import type { ComponentPropsWithoutRef, ForwardedRef } from 'react';
2
+ import { forwardRef } from 'react';
3
+ import type { ConvertTransientProps } from '@remember-web/shared';
4
+
5
+ import type { StyledSkeletonProps } from '@/Common/Skeleton/styles';
6
+ import { StyledSkeleton } from '@/Common/Skeleton/styles';
7
+
8
+ type SkeletonProps = Partial<ConvertTransientProps<StyledSkeletonProps>> &
9
+ ComponentPropsWithoutRef<'div'>;
10
+
11
+ export const Skeleton = forwardRef(function (
12
+ { variant, width, height, animate = true, ...props }: SkeletonProps,
13
+ ref: ForwardedRef<HTMLDivElement | null>
14
+ ) {
15
+ return (
16
+ <StyledSkeleton
17
+ ref={ref}
18
+ $variant={variant}
19
+ $width={width}
20
+ $height={height}
21
+ $animate={animate}
22
+ {...props}
23
+ />
24
+ );
25
+ });
@@ -0,0 +1,46 @@
1
+ import { contents200 } from '@remember-web/mixin';
2
+ import styled, { css, keyframes } from 'styled-components';
3
+
4
+ const shimmerAnimation = keyframes`
5
+ 0% {
6
+ background-position: 100% 100%;
7
+ }
8
+ 100% {
9
+ background-position: 0% 100%;
10
+ }
11
+ `;
12
+
13
+ export const skeletonShimmer = css`
14
+ --from-color: rgba(255, 255, 255, 0.75);
15
+ --to-color: rgba(255, 255, 255, 0.55);
16
+
17
+ background: linear-gradient(
18
+ 90deg,
19
+ var(--from-color) 25%,
20
+ var(--to-color) 37%,
21
+ var(--from-color) 63%
22
+ );
23
+ background-size: 400% 100%;
24
+ animation: ${shimmerAnimation};
25
+ animation-duration: 1.8s;
26
+ animation-iteration-count: infinite;
27
+ `;
28
+
29
+ export interface StyledSkeletonProps {
30
+ $variant?: 'circle' | 'rounded';
31
+ $width?: number | string;
32
+ $height?: number | string;
33
+ $animate?: boolean;
34
+ }
35
+
36
+ export const StyledSkeleton = styled.div<StyledSkeletonProps>`
37
+ width: ${({ $width = '100%' }) =>
38
+ typeof $width === 'number' ? `${$width}px` : $width};
39
+ height: ${({ $height = '100%' }) =>
40
+ typeof $height === 'number' ? `${$height}px` : $height};
41
+ border-radius: ${({ $variant = 'rounded' }) => ($variant === 'rounded' ? '4px': '50%')};
42
+ ${({ $animate }) => ($animate ? skeletonShimmer : null)};
43
+ background-color: ${contents200};
44
+ position: relative;
45
+ overflow: hidden;
46
+ `;
@@ -1,5 +1,5 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
1
  import { divider } from '@remember-web/mixin';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
3
 
4
4
  import { Spinner } from './index';
5
5
 
@@ -15,11 +15,13 @@ export const Container = styled.div<SpinnerStyleProps>(
15
15
  justify-content: center;
16
16
  width: fit-content;
17
17
  height: fit-content;
18
- ${layout === 'full' &&
19
- css`
18
+ ${
19
+ layout === 'full' &&
20
+ css`
20
21
  width: 100%;
21
22
  height: 100%;
22
- `}
23
+ `
24
+ }
23
25
 
24
26
  ${$color && `color: ${$color};`};
25
27
 
@@ -1,5 +1,5 @@
1
- import type { ConvertTransientProps } from '@remember-web/shared';
2
1
  import type { ColorVariable } from '@remember-web/mixin';
2
+ import type { ConvertTransientProps } from '@remember-web/shared';
3
3
 
4
4
  export type SpinnerLayout = 'full' | 'block';
5
5
  export type SpinnerSize = 'small' | 'medium' | 'large' | number;
@@ -1,7 +1,7 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { renderToStaticMarkup } from 'react-dom/server';
3
1
  import type { TypographyStyle } from '@remember-web/mixin';
4
2
  import { TYPOGRAPHY_STYLES } from '@remember-web/mixin';
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+ import { renderToStaticMarkup } from 'react-dom/server';
5
5
 
6
6
  import {
7
7
  Paper,
@@ -1,54 +1,39 @@
1
1
  'use client';
2
2
 
3
+ import type { TypographyStyle } from '@remember-web/mixin';
3
4
  import type {
4
- ComponentPropsWithoutRef,
5
- ComponentPropsWithRef,
6
5
  CSSProperties,
7
- ElementType,
8
- ReactElement,
6
+ ComponentProps,
7
+ ForwardedRef,
9
8
  ReactNode,
10
9
  } from 'react';
11
10
  import { forwardRef } from 'react';
12
- import { type TypographyStyle } from '@remember-web/mixin';
11
+ import type { PolymorphicComponent } from 'styled-components';
13
12
 
14
13
  import { StyledTypography } from './styles';
15
14
 
16
- const Typography = <T extends ElementType>(
17
- {
18
- variant,
19
- as,
20
- color,
21
- children,
22
- ellipsis,
23
- maxWidth,
24
- ...props
25
- }: TypographyProps<T>,
26
- ref: ComponentPropsWithRef<T>['ref']
27
- ) => (
28
- <StyledTypography
29
- ref={ref}
30
- as={as}
31
- $variant={variant}
32
- $color={color}
33
- $ellipsis={ellipsis}
34
- $maxWidth={maxWidth}
35
- {...props}
36
- >
37
- {children}
38
- </StyledTypography>
39
- );
15
+ export const Typography = forwardRef(
16
+ (
17
+ { variant, color, children, ellipsis, maxWidth, ...props }: TypographyProps,
18
+ ref: ForwardedRef<HTMLDivElement | null>
19
+ ) => (
20
+ <StyledTypography
21
+ ref={ref}
22
+ $variant={variant}
23
+ $color={color}
24
+ $ellipsis={ellipsis}
25
+ $maxWidth={maxWidth}
26
+ {...props}
27
+ >
28
+ {children}
29
+ </StyledTypography>
30
+ )
31
+ ) as PolymorphicComponent<'web', TypographyProps>;
40
32
 
41
- type TypographyProps<T extends ElementType> = {
33
+ type TypographyProps = {
42
34
  variant: TypographyStyle;
43
- as?: T;
44
35
  color?: string;
45
36
  children?: ReactNode;
46
37
  ellipsis?: number;
47
38
  maxWidth?: CSSProperties['maxWidth'];
48
- } & ComponentPropsWithoutRef<T>;
49
-
50
- type TypographyComponentWithRef = <T extends ElementType = 'div'>(
51
- props: TypographyProps<T> & { ref?: ComponentPropsWithRef<T>['ref'] }
52
- ) => ReactElement | null;
53
-
54
- export default forwardRef(Typography) as TypographyComponentWithRef;
39
+ } & ComponentProps<'div'>;
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
 
3
- import styled, { css } from 'styled-components';
4
- import type { CSSProperties } from 'react';
5
3
  import {
4
+ type TypographyStyle,
6
5
  ellipsis,
7
6
  getTypographyStyles,
8
- type TypographyStyle,
9
7
  } from '@remember-web/mixin';
8
+ import type { CSSProperties } from 'react';
9
+ import styled, { css } from 'styled-components';
10
10
 
11
11
  export const StyledTypography = styled.div<{
12
12
  $variant: TypographyStyle;
@@ -2,7 +2,8 @@ export * from './Divider';
2
2
  export * from './Flex';
3
3
  export * from './Grid';
4
4
  export * from './Spinner';
5
- export { default as Typography } from './Typography';
5
+ export * from './Skeleton';
6
+ export * from './Typography';
6
7
 
7
8
  /** GNB에서 의존하기 때문에 export */
8
9
  export { StyledTypography } from './Typography/styles';
@@ -15,9 +15,9 @@ import {
15
15
  } from '@remember-web/icon';
16
16
  import {
17
17
  SVG_SIZES,
18
- isSvgRegularSize,
19
18
  type SvgSizeProps,
20
19
  type WithSvgSizeComponentType,
20
+ isSvgRegularSize,
21
21
  } from '@remember-web/icon/util';
22
22
  import styled from 'styled-components';
23
23
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import styled from 'styled-components';
4
3
  import { primary100 } from '@remember-web/mixin';
4
+ import styled from 'styled-components';
5
5
 
6
6
  export const ToggleRoot = styled.label<{ $gap?: number }>`
7
7
  width: fit-content;