@remember-web/primitive 0.1.19 → 0.2.0
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/dist/src/Avatars/Avatar/index.cjs.js +2 -2
- package/dist/src/Avatars/Avatar/index.cjs.js.map +1 -1
- package/dist/src/Avatars/Avatar/index.d.ts +1 -1
- package/dist/src/Avatars/Avatar/index.d.ts.map +1 -1
- package/dist/src/Avatars/Avatar/index.esm.js +2 -2
- package/dist/src/Avatars/Avatar/index.esm.js.map +1 -1
- package/dist/src/Avatars/Avatar/styles.cjs.js.map +1 -1
- package/dist/src/Avatars/Avatar/styles.d.ts.map +1 -1
- package/dist/src/Avatars/Avatar/styles.esm.js.map +1 -1
- package/dist/src/Badge/style.cjs.js +1 -1
- package/dist/src/Badge/style.cjs.js.map +1 -1
- package/dist/src/Badge/style.esm.js +1 -1
- package/dist/src/Badge/style.esm.js.map +1 -1
- package/dist/src/Badge/utils.cjs.js.map +1 -1
- package/dist/src/Badge/utils.d.ts.map +1 -1
- package/dist/src/Badge/utils.esm.js.map +1 -1
- package/dist/src/Buttons/Button/index.cjs.js +3 -2
- package/dist/src/Buttons/Button/index.cjs.js.map +1 -1
- package/dist/src/Buttons/Button/index.d.ts +2 -3
- package/dist/src/Buttons/Button/index.d.ts.map +1 -1
- package/dist/src/Buttons/Button/index.esm.js +3 -2
- package/dist/src/Buttons/Button/index.esm.js.map +1 -1
- package/dist/src/Buttons/Button/styles.cjs.js +1 -1
- package/dist/src/Buttons/Button/styles.cjs.js.map +1 -1
- package/dist/src/Buttons/Button/styles.d.ts.map +1 -1
- package/dist/src/Buttons/Button/styles.esm.js +1 -1
- package/dist/src/Buttons/Button/styles.esm.js.map +1 -1
- package/dist/src/Buttons/index.d.ts +1 -1
- package/dist/src/Buttons/index.d.ts.map +1 -1
- package/dist/src/Common/Divider/index.cjs.js +10 -2
- package/dist/src/Common/Divider/index.cjs.js.map +1 -1
- package/dist/src/Common/Divider/index.d.ts +2 -0
- package/dist/src/Common/Divider/index.d.ts.map +1 -1
- package/dist/src/Common/Divider/index.esm.js +10 -2
- package/dist/src/Common/Divider/index.esm.js.map +1 -1
- package/dist/src/Common/Flex/index.cjs.js +1 -1
- package/dist/src/Common/Flex/index.cjs.js.map +1 -1
- package/dist/src/Common/Flex/index.d.ts +2 -2
- package/dist/src/Common/Flex/index.d.ts.map +1 -1
- package/dist/src/Common/Flex/index.esm.js +1 -1
- package/dist/src/Common/Flex/index.esm.js.map +1 -1
- package/dist/src/Common/Skeleton/index.cjs.js +34 -0
- package/dist/src/Common/Skeleton/index.cjs.js.map +1 -0
- package/dist/src/Common/Skeleton/index.d.ts +5 -0
- package/dist/src/Common/Skeleton/index.d.ts.map +1 -0
- package/dist/src/Common/Skeleton/index.esm.js +27 -0
- package/dist/src/Common/Skeleton/index.esm.js.map +1 -0
- package/dist/src/Common/Skeleton/styles.cjs.js +34 -0
- package/dist/src/Common/Skeleton/styles.cjs.js.map +1 -0
- package/dist/src/Common/Skeleton/styles.d.ts +10 -0
- package/dist/src/Common/Skeleton/styles.d.ts.map +1 -0
- package/dist/src/Common/Skeleton/styles.esm.js +26 -0
- package/dist/src/Common/Skeleton/styles.esm.js.map +1 -0
- package/dist/src/Common/Spinner/styles.cjs.js.map +1 -1
- package/dist/src/Common/Spinner/styles.d.ts.map +1 -1
- package/dist/src/Common/Spinner/styles.esm.js.map +1 -1
- package/dist/src/Common/Spinner/types.d.ts +1 -1
- package/dist/src/Common/Spinner/types.d.ts.map +1 -1
- package/dist/src/Common/Typography/index.cjs.js +1 -1
- package/dist/src/Common/Typography/index.cjs.js.map +1 -1
- package/dist/src/Common/Typography/index.d.ts +3 -3
- package/dist/src/Common/Typography/index.d.ts.map +1 -1
- package/dist/src/Common/Typography/index.esm.js +1 -1
- package/dist/src/Common/Typography/index.esm.js.map +1 -1
- package/dist/src/Common/Typography/styles.cjs.js +1 -1
- package/dist/src/Common/Typography/styles.cjs.js.map +1 -1
- package/dist/src/Common/Typography/styles.d.ts +1 -1
- package/dist/src/Common/Typography/styles.d.ts.map +1 -1
- package/dist/src/Common/Typography/styles.esm.js +1 -1
- package/dist/src/Common/Typography/styles.esm.js.map +1 -1
- package/dist/src/Common/index.d.ts +3 -2
- package/dist/src/Common/index.d.ts.map +1 -1
- package/dist/src/Control/BaseToggle/ToggleIcon/index.cjs.js.map +1 -1
- package/dist/src/Control/BaseToggle/ToggleIcon/index.d.ts.map +1 -1
- package/dist/src/Control/BaseToggle/ToggleIcon/index.esm.js.map +1 -1
- package/dist/src/Control/BaseToggle/index.cjs.js +2 -1
- package/dist/src/Control/BaseToggle/index.cjs.js.map +1 -1
- package/dist/src/Control/BaseToggle/index.esm.js +2 -1
- package/dist/src/Control/BaseToggle/index.esm.js.map +1 -1
- package/dist/src/Control/BaseToggle/styles.cjs.js +1 -1
- package/dist/src/Control/BaseToggle/styles.cjs.js.map +1 -1
- package/dist/src/Control/BaseToggle/styles.esm.js +1 -1
- package/dist/src/Control/BaseToggle/styles.esm.js.map +1 -1
- package/dist/src/Control/Checkbox.cjs.js.map +1 -1
- package/dist/src/Control/Checkbox.d.ts.map +1 -1
- package/dist/src/Control/Checkbox.esm.js.map +1 -1
- package/dist/src/Control/Radio.cjs.js.map +1 -1
- package/dist/src/Control/Radio.esm.js.map +1 -1
- package/dist/src/Control/Switch/index.cjs.js.map +1 -1
- package/dist/src/Control/Switch/index.esm.js.map +1 -1
- package/dist/src/Control/Switch/styles.cjs.js +1 -1
- package/dist/src/Control/Switch/styles.cjs.js.map +1 -1
- package/dist/src/Control/Switch/styles.esm.js +1 -1
- package/dist/src/Control/Switch/styles.esm.js.map +1 -1
- package/dist/src/Control/Toggle.cjs.js.map +1 -1
- package/dist/src/Control/Toggle.d.ts.map +1 -1
- package/dist/src/Control/Toggle.esm.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/DropdownMenuSection.cjs.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/DropdownMenuSection.d.ts +1 -1
- package/dist/src/Floating/DropdownMenu/DropdownMenuSection.d.ts.map +1 -1
- package/dist/src/Floating/DropdownMenu/DropdownMenuSection.esm.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/index.cjs.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/index.d.ts.map +1 -1
- package/dist/src/Floating/DropdownMenu/index.esm.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/styles.cjs.js +1 -1
- package/dist/src/Floating/DropdownMenu/styles.cjs.js.map +1 -1
- package/dist/src/Floating/DropdownMenu/styles.d.ts.map +1 -1
- package/dist/src/Floating/DropdownMenu/styles.esm.js +1 -1
- package/dist/src/Floating/DropdownMenu/styles.esm.js.map +1 -1
- package/dist/src/Floating/Popover/styles.cjs.js +1 -1
- package/dist/src/Floating/Popover/styles.cjs.js.map +1 -1
- package/dist/src/Floating/Popover/styles.esm.js +1 -1
- package/dist/src/Floating/Popover/styles.esm.js.map +1 -1
- package/dist/src/Floating/Tooltip/index.cjs.js +2 -2
- package/dist/src/Floating/Tooltip/index.cjs.js.map +1 -1
- package/dist/src/Floating/Tooltip/index.d.ts.map +1 -1
- package/dist/src/Floating/Tooltip/index.esm.js +2 -2
- package/dist/src/Floating/Tooltip/index.esm.js.map +1 -1
- package/dist/src/Floating/Tooltip/styles.cjs.js +1 -1
- package/dist/src/Floating/Tooltip/styles.cjs.js.map +1 -1
- package/dist/src/Floating/Tooltip/styles.esm.js +1 -1
- package/dist/src/Floating/Tooltip/styles.esm.js.map +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/index.cjs.js +2 -2
- package/dist/src/Inputs/Select/DesignedSelect/index.cjs.js.map +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/index.d.ts.map +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/index.esm.js +2 -2
- package/dist/src/Inputs/Select/DesignedSelect/index.esm.js.map +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/styles.cjs.js +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/styles.cjs.js.map +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/styles.esm.js +1 -1
- package/dist/src/Inputs/Select/DesignedSelect/styles.esm.js.map +1 -1
- package/dist/src/Inputs/Select/NativeSelect/index.cjs.js +2 -2
- package/dist/src/Inputs/Select/NativeSelect/index.cjs.js.map +1 -1
- package/dist/src/Inputs/Select/NativeSelect/index.esm.js +2 -2
- package/dist/src/Inputs/Select/NativeSelect/index.esm.js.map +1 -1
- package/dist/src/Inputs/Select/NativeSelect/styles.cjs.js +1 -1
- package/dist/src/Inputs/Select/NativeSelect/styles.cjs.js.map +1 -1
- package/dist/src/Inputs/Select/NativeSelect/styles.esm.js +1 -1
- package/dist/src/Inputs/Select/NativeSelect/styles.esm.js.map +1 -1
- package/dist/src/Inputs/Select/NativeSelect/types.d.ts +1 -1
- package/dist/src/Inputs/Select/NativeSelect/types.d.ts.map +1 -1
- package/dist/src/Inputs/Select/Option/index.cjs.js +0 -1
- package/dist/src/Inputs/Select/Option/index.cjs.js.map +1 -1
- package/dist/src/Inputs/Select/Option/index.d.ts.map +1 -1
- package/dist/src/Inputs/Select/Option/index.esm.js +0 -1
- package/dist/src/Inputs/Select/Option/index.esm.js.map +1 -1
- package/dist/src/Inputs/Select/styles.cjs.js +1 -1
- package/dist/src/Inputs/Select/styles.cjs.js.map +1 -1
- package/dist/src/Inputs/Select/styles.esm.js +1 -1
- package/dist/src/Inputs/Select/styles.esm.js.map +1 -1
- package/dist/src/Inputs/TextInput/index.cjs.js +1 -1
- package/dist/src/Inputs/TextInput/index.cjs.js.map +1 -1
- package/dist/src/Inputs/TextInput/index.esm.js +1 -1
- package/dist/src/Inputs/TextInput/index.esm.js.map +1 -1
- package/dist/src/Inputs/TextInput/styles.cjs.js +1 -1
- package/dist/src/Inputs/TextInput/styles.cjs.js.map +1 -1
- package/dist/src/Inputs/TextInput/styles.esm.js +1 -1
- package/dist/src/Inputs/TextInput/styles.esm.js.map +1 -1
- package/dist/src/Inputs/TextInput/types.d.ts +1 -1
- package/dist/src/Inputs/TextInput/types.d.ts.map +1 -1
- package/dist/src/Logos/RememberServiceLogo/index.cjs.js +1 -0
- package/dist/src/Logos/RememberServiceLogo/index.cjs.js.map +1 -1
- package/dist/src/Logos/RememberServiceLogo/index.d.ts.map +1 -1
- package/dist/src/Logos/RememberServiceLogo/index.esm.js +1 -0
- package/dist/src/Logos/RememberServiceLogo/index.esm.js.map +1 -1
- package/dist/src/Logos/RememberServiceLogo/style.cjs.js +1 -1
- package/dist/src/Logos/RememberServiceLogo/style.cjs.js.map +1 -1
- package/dist/src/Logos/RememberServiceLogo/style.esm.js +1 -1
- package/dist/src/Logos/RememberServiceLogo/style.esm.js.map +1 -1
- package/dist/src/Modals/Dialog/index.cjs.js +1 -1
- package/dist/src/Modals/Dialog/index.cjs.js.map +1 -1
- package/dist/src/Modals/Dialog/index.esm.js +1 -1
- package/dist/src/Modals/Dialog/index.esm.js.map +1 -1
- package/dist/src/Modals/Dialog/styles.cjs.js +2 -2
- package/dist/src/Modals/Dialog/styles.cjs.js.map +1 -1
- package/dist/src/Modals/Dialog/styles.d.ts.map +1 -1
- package/dist/src/Modals/Dialog/styles.esm.js +1 -1
- package/dist/src/Modals/Dialog/styles.esm.js.map +1 -1
- package/dist/src/Paginations/CompactPagination/index.cjs.js +1 -1
- package/dist/src/Paginations/CompactPagination/index.cjs.js.map +1 -1
- package/dist/src/Paginations/CompactPagination/index.esm.js +1 -1
- package/dist/src/Paginations/CompactPagination/index.esm.js.map +1 -1
- package/dist/src/Paginations/styles.cjs.js +1 -1
- package/dist/src/Paginations/styles.cjs.js.map +1 -1
- package/dist/src/Paginations/styles.esm.js +1 -1
- package/dist/src/Paginations/styles.esm.js.map +1 -1
- package/dist/src/hooks/useMouseEventAway.cjs.js.map +1 -1
- package/dist/src/hooks/useMouseEventAway.esm.js.map +1 -1
- package/dist/src/index.cjs.js +40 -38
- package/dist/src/index.cjs.js.map +1 -1
- package/dist/src/index.esm.js +4 -3
- package/dist/src/index.esm.js.map +1 -1
- package/dist/src/stories/common.styles.d.ts.map +1 -1
- package/package.json +3 -6
- package/src/Avatars/Avatar/Avatar.stories.tsx +1 -1
- package/src/Avatars/Avatar/index.tsx +3 -3
- package/src/Avatars/Avatar/styles.ts +1 -1
- package/src/Badge/Badge.stories.tsx +2 -2
- package/src/Badge/style.tsx +1 -1
- package/src/Badge/utils.ts +1 -1
- package/src/Buttons/Button/Button.stories.tsx +1 -1
- package/src/Buttons/Button/index.tsx +19 -21
- package/src/Buttons/Button/styles.ts +11 -8
- package/src/Buttons/index.ts +1 -1
- package/src/Common/Divider/Divider.stories.tsx +1 -1
- package/src/Common/Divider/index.tsx +7 -4
- package/src/Common/Flex/index.tsx +17 -10
- package/src/Common/Skeleton/Skeleton.stories.tsx +35 -0
- package/src/Common/Skeleton/index.tsx +25 -0
- package/src/Common/Skeleton/styles.ts +46 -0
- package/src/Common/Spinner/Spinner.stories.tsx +1 -1
- package/src/Common/Spinner/styles.ts +5 -3
- package/src/Common/Spinner/types.ts +1 -1
- package/src/Common/Typography/Typography.stories.tsx +4 -5
- package/src/Common/Typography/index.tsx +8 -10
- package/src/Common/Typography/styles.ts +3 -3
- package/src/Common/index.ts +3 -2
- package/src/Control/BaseToggle/ToggleIcon/index.tsx +1 -1
- package/src/Control/BaseToggle/styles.ts +1 -1
- package/src/Control/Checkbox.stories.tsx +0 -2
- package/src/Control/Checkbox.tsx +1 -1
- package/src/Control/Radio.stories.tsx +1 -1
- package/src/Control/Radio.tsx +1 -1
- package/src/Control/Switch/Switch.stories.tsx +0 -1
- package/src/Control/Switch/index.tsx +1 -1
- package/src/Control/Switch/styles.ts +1 -1
- package/src/Control/Toggle.stories.tsx +1 -2
- package/src/Control/Toggle.tsx +1 -1
- package/src/Floating/DropdownMenu/DropdownMenuSection.tsx +2 -2
- package/src/Floating/DropdownMenu/index.tsx +1 -1
- package/src/Floating/DropdownMenu/styles.tsx +1 -1
- package/src/Floating/Popover/Popover.stories.tsx +1 -1
- package/src/Floating/Popover/styles.ts +1 -1
- package/src/Floating/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Floating/Tooltip/index.tsx +4 -4
- package/src/Floating/Tooltip/styles.ts +1 -1
- package/src/Inputs/Select/DesignedSelect/index.tsx +3 -3
- package/src/Inputs/Select/DesignedSelect/styles.ts +2 -2
- package/src/Inputs/Select/NativeSelect/index.tsx +2 -2
- package/src/Inputs/Select/NativeSelect/styles.ts +1 -1
- package/src/Inputs/Select/NativeSelect/types.ts +1 -1
- package/src/Inputs/Select/Option/index.tsx +0 -1
- package/src/Inputs/Select/Select.stories.tsx +0 -2
- package/src/Inputs/Select/styles.ts +1 -1
- package/src/Inputs/TextInput/index.tsx +1 -1
- package/src/Inputs/TextInput/styles.ts +2 -2
- package/src/Inputs/TextInput/types.ts +1 -1
- package/src/Logos/RememberServiceLogo/index.tsx +1 -1
- package/src/Logos/RememberServiceLogo/style.ts +1 -1
- package/src/Modals/Dialog/Dialog.stories.tsx +1 -1
- package/src/Modals/Dialog/index.tsx +2 -2
- package/src/Modals/Dialog/styles.ts +2 -2
- package/src/Paginations/CompactPagination/CompactPagination.stories.tsx +0 -1
- package/src/Paginations/CompactPagination/index.tsx +1 -1
- package/src/Paginations/Pagination/Pagination.stories.tsx +0 -1
- package/src/Paginations/styles.ts +2 -2
- package/src/hooks/useMouseEventAway.ts +1 -1
- package/src/stories/common.styles.tsx +2 -2
|
@@ -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
|
+
`;
|
|
@@ -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
|
-
${
|
|
19
|
-
|
|
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,
|
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
TableRow,
|
|
13
13
|
TitleContainer,
|
|
14
14
|
} from '@/stories/common.styles';
|
|
15
|
-
|
|
16
|
-
import Typography from '.';
|
|
15
|
+
import { Typography } from '.';
|
|
17
16
|
|
|
18
17
|
type Story = StoryObj<typeof Typography>;
|
|
19
18
|
|
|
@@ -54,7 +53,7 @@ export const Overview: Story = {
|
|
|
54
53
|
</Typography>
|
|
55
54
|
</TableColumn>
|
|
56
55
|
<TableColumn align="center">{fontSize}px</TableColumn>
|
|
57
|
-
<TableColumn align="center">{lineHeight}
|
|
56
|
+
<TableColumn align="center">{lineHeight}</TableColumn>
|
|
58
57
|
<TableColumn align="center">{fontWeight}</TableColumn>
|
|
59
58
|
</TableRow>
|
|
60
59
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { TypographyStyle } from '@remember-web/mixin';
|
|
4
4
|
import type {
|
|
5
5
|
CSSProperties,
|
|
6
6
|
ComponentProps,
|
|
@@ -12,11 +12,11 @@ import type { PolymorphicComponent } from 'styled-components';
|
|
|
12
12
|
|
|
13
13
|
import { StyledTypography } from './styles';
|
|
14
14
|
|
|
15
|
-
const Typography = forwardRef(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
export const Typography = forwardRef(
|
|
16
|
+
(
|
|
17
|
+
{ variant, color, children, ellipsis, maxWidth, ...props }: TypographyProps,
|
|
18
|
+
ref: ForwardedRef<HTMLDivElement | null>
|
|
19
|
+
) => (
|
|
20
20
|
<StyledTypography
|
|
21
21
|
ref={ref}
|
|
22
22
|
$variant={variant}
|
|
@@ -27,8 +27,8 @@ const Typography = forwardRef(function (
|
|
|
27
27
|
>
|
|
28
28
|
{children}
|
|
29
29
|
</StyledTypography>
|
|
30
|
-
)
|
|
31
|
-
|
|
30
|
+
)
|
|
31
|
+
) as PolymorphicComponent<'web', TypographyProps>;
|
|
32
32
|
|
|
33
33
|
type TypographyProps = {
|
|
34
34
|
variant: TypographyStyle;
|
|
@@ -37,5 +37,3 @@ type TypographyProps = {
|
|
|
37
37
|
ellipsis?: number;
|
|
38
38
|
maxWidth?: CSSProperties['maxWidth'];
|
|
39
39
|
} & ComponentProps<'div'>;
|
|
40
|
-
|
|
41
|
-
export default Typography;
|
|
@@ -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;
|
package/src/Common/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export * from './Divider';
|
|
2
|
-
export
|
|
2
|
+
export * from './Flex';
|
|
3
3
|
export * from './Grid';
|
|
4
4
|
export * from './Spinner';
|
|
5
|
-
export
|
|
5
|
+
export * from './Skeleton';
|
|
6
|
+
export * from './Typography';
|
|
6
7
|
|
|
7
8
|
/** GNB에서 의존하기 때문에 export */
|
|
8
9
|
export { StyledTypography } from './Typography/styles';
|
|
@@ -25,7 +25,6 @@ export const Default: Story = {
|
|
|
25
25
|
indeterminate: false,
|
|
26
26
|
},
|
|
27
27
|
render: ({ ...args }) => {
|
|
28
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
29
28
|
const [{ checked }, updateArgs] = useArgs();
|
|
30
29
|
return (
|
|
31
30
|
<Checkbox
|
|
@@ -51,7 +50,6 @@ export const Check: Story = {
|
|
|
51
50
|
indeterminate: { table: { disable: true } },
|
|
52
51
|
},
|
|
53
52
|
render: ({ ...args }) => {
|
|
54
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
55
53
|
const [{ checked }, updateArgs] = useArgs();
|
|
56
54
|
return (
|
|
57
55
|
<Checkbox
|
package/src/Control/Checkbox.tsx
CHANGED
package/src/Control/Radio.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
4
|
import { contents300, contents999, secondary100 } from '@remember-web/mixin';
|
|
5
|
+
import styled, { css } from 'styled-components';
|
|
6
6
|
|
|
7
7
|
import type { SwitchProps } from './types';
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
1
|
import { useArgs } from '@storybook/client-api';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
|
|
4
4
|
import { Toggle } from './Toggle';
|
|
5
5
|
|
|
@@ -24,7 +24,6 @@ export const Default: Story = {
|
|
|
24
24
|
labelPosition: 'right',
|
|
25
25
|
},
|
|
26
26
|
render: (args) => {
|
|
27
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
28
27
|
const [{ checked }, updateArgs] = useArgs();
|
|
29
28
|
|
|
30
29
|
return (
|
package/src/Control/Toggle.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
1
|
import type { GetStyledComponentProps } from '@remember-web/shared';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
StyledDropdownMenuSectionTitle,
|
|
6
5
|
StyledDropdownMenuSection,
|
|
6
|
+
StyledDropdownMenuSectionTitle,
|
|
7
7
|
} from '@/Floating/DropdownMenu/styles';
|
|
8
8
|
|
|
9
9
|
type DropdownMenuSectionProps<As> = GetStyledComponentProps<
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
2
2
|
|
|
3
|
-
import type { PopoverContentProps, PopoverProps } from '@/Floating/Popover';
|
|
4
3
|
import {
|
|
5
4
|
StyledDropdownMenuContent,
|
|
6
5
|
StyledDropdownMenuItem,
|
|
7
6
|
} from '@/Floating/DropdownMenu/styles';
|
|
7
|
+
import type { PopoverContentProps, PopoverProps } from '@/Floating/Popover';
|
|
8
8
|
import Popover from '@/Floating/Popover';
|
|
9
9
|
|
|
10
10
|
import { DropdownMenuSection } from './DropdownMenuSection';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
1
|
import {
|
|
3
2
|
bg200,
|
|
4
3
|
contents000,
|
|
@@ -7,6 +6,7 @@ import {
|
|
|
7
6
|
getTypographyStyles,
|
|
8
7
|
} from '@remember-web/mixin';
|
|
9
8
|
import type { ConvertTransientProps } from '@remember-web/shared';
|
|
9
|
+
import styled, { css } from 'styled-components';
|
|
10
10
|
|
|
11
11
|
import { StyledPopoverContent } from '../Popover/styles';
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
|
|
4
|
-
import Popover from '@/Floating/Popover/index';
|
|
5
4
|
import { Flex } from '@/Common';
|
|
5
|
+
import Popover from '@/Floating/Popover/index';
|
|
6
6
|
|
|
7
7
|
type Story = StoryObj<typeof Popover>;
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import styled, { keyframes } from 'styled-components';
|
|
2
1
|
import { PopoverContent } from '@radix-ui/react-popover';
|
|
3
2
|
import { bg100, contents000 } from '@remember-web/mixin';
|
|
3
|
+
import styled, { keyframes } from 'styled-components';
|
|
4
4
|
|
|
5
5
|
export const showFadeIn = keyframes`
|
|
6
6
|
from {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
4
|
-
import { useState, type PropsWithChildren } from 'react';
|
|
5
|
-
import { isSSR } from '@remember-web/shared';
|
|
6
4
|
import { IconCloseS } from '@remember-web/icon';
|
|
7
5
|
import { contents000, contents999 } from '@remember-web/mixin';
|
|
6
|
+
import { isSSR } from '@remember-web/shared';
|
|
7
|
+
import { type PropsWithChildren, useState } from 'react';
|
|
8
8
|
|
|
9
9
|
import { CloseButton, TooltipContent, TooltipTriggerWrapper } from './styles';
|
|
10
10
|
import {
|
|
11
|
-
isLargeSizeProps,
|
|
12
|
-
isStaticTypeProps,
|
|
13
11
|
type TooltipProps,
|
|
14
12
|
type TooltipSize,
|
|
15
13
|
type TooltipType,
|
|
14
|
+
isLargeSizeProps,
|
|
15
|
+
isStaticTypeProps,
|
|
16
16
|
} from './types';
|
|
17
17
|
|
|
18
18
|
const hoverable = isSSR()
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
4
|
-
import styled, { css, keyframes } from 'styled-components';
|
|
5
4
|
import type { TypographyStyle } from '@remember-web/mixin';
|
|
6
5
|
import {
|
|
7
6
|
contents000,
|
|
8
7
|
contents999,
|
|
9
8
|
getTypographyStyles,
|
|
10
9
|
} from '@remember-web/mixin';
|
|
10
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
11
11
|
|
|
12
12
|
import type { TooltipSize, TooltipTextAlign } from './types';
|
|
13
13
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { IconArrow2Down, IconArrow2Up } from '@remember-web/icon';
|
|
3
4
|
import type { KeyboardEvent, ReactNode, Ref, RefCallback } from 'react';
|
|
4
5
|
import {
|
|
5
6
|
Children,
|
|
6
7
|
forwardRef,
|
|
7
8
|
isValidElement,
|
|
8
9
|
useCallback,
|
|
10
|
+
useId,
|
|
9
11
|
useRef,
|
|
10
12
|
useState,
|
|
11
|
-
useId,
|
|
12
13
|
} from 'react';
|
|
13
|
-
import { IconArrow2Down, IconArrow2Up } from '@remember-web/icon';
|
|
14
14
|
|
|
15
15
|
import useMouseEventAway from '@/hooks/useMouseEventAway';
|
|
16
16
|
|
|
17
|
-
import { focusSibling } from '../utils';
|
|
18
17
|
import { OptionHolder } from '../Option';
|
|
19
18
|
import { SelectContainer } from '../styles';
|
|
20
19
|
import type { OptionElementType, SelectValue } from '../types';
|
|
20
|
+
import { focusSibling } from '../utils';
|
|
21
21
|
import { DEFAULT_MAX_HEIGHT_PX, OPTION_ITEM_HEIGHT_PX } from './const';
|
|
22
22
|
import {
|
|
23
23
|
SelectDownIcon,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
3
|
import {
|
|
5
4
|
bg100,
|
|
6
5
|
bg200,
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
contents300,
|
|
11
10
|
ellipsis,
|
|
12
11
|
} from '@remember-web/mixin';
|
|
12
|
+
import styled, { css } from 'styled-components';
|
|
13
13
|
|
|
14
14
|
import { SelectContainer } from '../styles';
|
|
15
15
|
import type { ExpandedType } from './types';
|
|
@@ -33,7 +33,7 @@ export const StyledSelect = styled.div<{
|
|
|
33
33
|
border-radius: 4px 4px 0 0;
|
|
34
34
|
border-bottom-color: transparent;
|
|
35
35
|
`,
|
|
36
|
-
}[expandedDirection ?? 'none']
|
|
36
|
+
})[expandedDirection ?? 'none']};
|
|
37
37
|
|
|
38
38
|
padding: 10px 36px 10px 12px;
|
|
39
39
|
transition: border-color 0.2s, background-color 0.2s;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { IconArrow2Down } from '@remember-web/icon';
|
|
3
4
|
import type { ForwardRefRenderFunction } from 'react';
|
|
4
5
|
import { forwardRef } from 'react';
|
|
5
|
-
import { IconArrow2Down } from '@remember-web/icon';
|
|
6
6
|
|
|
7
|
+
import { SelectContainer } from '../styles';
|
|
7
8
|
import { SelectDownIcon, StyledSelect } from './styles';
|
|
8
9
|
import type { NativeSelectInternalProps } from './types';
|
|
9
|
-
import { SelectContainer } from '../styles';
|
|
10
10
|
|
|
11
11
|
const NativeSelect: ForwardRefRenderFunction<
|
|
12
12
|
HTMLSelectElement,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
3
|
import {
|
|
5
4
|
bg200,
|
|
6
5
|
bg300,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
contents300,
|
|
10
9
|
getTypographyStyles,
|
|
11
10
|
} from '@remember-web/mixin';
|
|
11
|
+
import styled, { css } from 'styled-components';
|
|
12
12
|
|
|
13
13
|
export const StyledSelect = styled.select<{
|
|
14
14
|
$width?: number | string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement, SelectHTMLAttributes } from 'react';
|
|
2
2
|
|
|
3
|
-
import type { NativeOption } from './Option';
|
|
4
3
|
import type { OptionProps } from '../types';
|
|
4
|
+
import type { NativeOption } from './Option';
|
|
5
5
|
|
|
6
6
|
type NativeOptionElement = ReactElement<
|
|
7
7
|
OptionProps<string>,
|
|
@@ -25,7 +25,6 @@ const meta = {
|
|
|
25
25
|
export const Native: Story = {
|
|
26
26
|
render: (props) => {
|
|
27
27
|
const { ...args } = props as NativeSelectProps<string>;
|
|
28
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
29
28
|
const [value, setValue] = useState<string>();
|
|
30
29
|
return (
|
|
31
30
|
<Select
|
|
@@ -57,7 +56,6 @@ export const Native: Story = {
|
|
|
57
56
|
export const Custom: Story = {
|
|
58
57
|
render: (props) => {
|
|
59
58
|
const { ...args } = props as DesignedSelectProps<string>;
|
|
60
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
61
59
|
const [value, setValue] = useState<string>();
|
|
62
60
|
return (
|
|
63
61
|
<Select
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import styled from 'styled-components';
|
|
4
3
|
import {
|
|
5
4
|
bg200,
|
|
6
5
|
contents000,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
getTypographyStyles,
|
|
10
9
|
roleRed,
|
|
11
10
|
} from '@remember-web/mixin';
|
|
11
|
+
import styled from 'styled-components';
|
|
12
12
|
|
|
13
13
|
export const SelectContainer = styled.div<{ $width?: number | string }>`
|
|
14
14
|
${getTypographyStyles('Body1_M')}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { IconHidden, IconVisible } from '@remember-web/icon';
|
|
3
4
|
import type { ForwardRefRenderFunction } from 'react';
|
|
4
5
|
import { forwardRef, useId, useState } from 'react';
|
|
5
|
-
import { IconHidden, IconVisible } from '@remember-web/icon';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
InputContainer,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
3
|
import type { ColorVariable } from '@remember-web/mixin';
|
|
5
4
|
import {
|
|
6
5
|
bg200,
|
|
7
6
|
contents000,
|
|
8
7
|
contents200,
|
|
9
8
|
contents300,
|
|
10
|
-
roleRed,
|
|
11
9
|
ellipsis,
|
|
12
10
|
getTypographyStyles,
|
|
11
|
+
roleRed,
|
|
13
12
|
} from '@remember-web/mixin';
|
|
14
13
|
import { formatUnit } from '@remember-web/shared';
|
|
14
|
+
import styled, { css } from 'styled-components';
|
|
15
15
|
|
|
16
16
|
export const InputWrapper = styled.div<{ $width?: string | number }>`
|
|
17
17
|
${({ $width }) =>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GetStyledComponentProps } from '@remember-web/shared';
|
|
2
2
|
|
|
3
|
-
import type { RememberLogoProps } from '@/Logos/types';
|
|
4
3
|
import { Divider } from '@/Common';
|
|
4
|
+
import type { RememberLogoProps } from '@/Logos/types';
|
|
5
5
|
|
|
6
6
|
import { RememberLogo } from '../RememberLogo';
|
|
7
7
|
import { StyledServiceLogoRoot } from './style';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import type { DialogContentProps, DialogProps } from '@radix-ui/react-dialog';
|
|
4
|
-
import {
|
|
4
|
+
import { Close, Portal, Root, Trigger } from '@radix-ui/react-dialog';
|
|
5
5
|
import { IconClose, PictogramAlert, PictogramCheck } from '@remember-web/icon';
|
|
6
6
|
|
|
7
|
-
import Flex from '@/Common/Flex';
|
|
7
|
+
import { Flex } from '@/Common/Flex';
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
10
|
DialogContent,
|