Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sds, web-domains, web): sds에서 절대경로 alias를 걷어내고, 이로인해 혼재되어 사용되고 있던 import 경로를 정리합니다 #220

Merged
merged 6 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,9 @@
],
"baseUrl": "../../packages",
"paths": {
"@/*": ["./web-domains/src/*"],
"@sds/*": ["./core/sds/src/*"]
"@/*": ["./web-domains/src/*"]
}
},
"include": [
"next-env.d.ts",
"next.config.js",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"../../packages/web-domains/src/common/styles/GlobalStyles.tsx",
"../../packages/web-domains/src/common/layout/RootLayout.styles.ts",
"../../packages/web-domains/src/common/layout/RootLayout.tsx"
],
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/core/css-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"compilerOptions": {
"outDir": "dist"
},
"include": ["src", "../../apps/web/layout/RootLayout.styles.ts", "../../apps/web/layout/RootLayout.tsx"],
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
5 changes: 1 addition & 4 deletions packages/core/react-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"extends": "@sambad/typescript-config/react-library.json",
"compilerOptions": {
"outDir": "dist",
"paths": {
"@sds/*": ["./src/*"]
}
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef, HTMLAttributes, useCallback } from 'react';

import { useControllableState } from '@sds/hooks';
import { useControllableState } from '../../hooks';

import { AccordionContent } from './Content';
import { AccordionProvider } from './context';
Expand Down
5 changes: 2 additions & 3 deletions packages/core/sds/src/components/Accordion/Trigger.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { forwardRef, HTMLAttributes } from 'react';

import { colors } from '@sds/theme';
import { composeEventHandlers } from '@sds/utils';

import { colors } from '../../theme';
import { composeEventHandlers } from '../../utils';
import { Icon } from '../Icon';

import { arrowIconAttribute } from './constants';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Accordion/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildContext } from '@sds/utils';
import { buildContext } from '../../utils';

interface Context {
value?: Array<string>;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Accordion/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from '@emotion/react';

import { size } from '@sds/theme';
import { size } from '../../theme';

import { accordionItemStateAttribute, arrowIconAttribute, contentAttribute } from './constants';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef, HTMLAttributes } from 'react';

import { colors } from '@sds/theme';
import { colors } from '../../theme';

import { badgeCss } from './styles';

Expand Down
3 changes: 1 addition & 2 deletions packages/core/sds/src/components/Badge/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { css } from '@emotion/react';

import { borderRadiusVariants, size } from '@sds/theme';

import { borderRadiusVariants, size } from '../../theme';
import { fontWeightVariants } from '../Typography/styles';

export const badgeCss = css({
Expand Down
3 changes: 1 addition & 2 deletions packages/core/sds/src/components/Button/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { css } from '@emotion/react';

import { borderRadiusVariants, colors, size } from '@sds/theme';

import { borderRadiusVariants, colors, size } from '../../theme';
import { fontWeightVariants } from '../Typography';

import { ButtonSize, ButtonVariant } from './types';
Expand Down
7 changes: 3 additions & 4 deletions packages/core/sds/src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { useId } from '@sambad/react-utils';
import { CSSProperties, forwardRef, InputHTMLAttributes, ReactNode } from 'react';

import { useControllableState } from '@sds/hooks';
import { colors } from '@sds/theme';
import { composeEventHandlers } from '@sds/utils';

import { useControllableState } from '../../hooks';
import { colors } from '../../theme';
import { composeEventHandlers } from '../../utils';
import { Icon } from '../Icon';
import { Txt } from '../Typography';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Checkbox/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { css } from '@emotion/react';
import { getCssVar } from '@sambad/css-utils';
import { CSSProperties } from 'react';

import { colors, size } from '@sds/theme';
import { colors, size } from '../../theme';

const inputBackgroundColorVar = '--sambad-checkbox-input-background-color';
const inputBoxShadowVar = '--sambad-checkbox-input-box-shadow';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef, HTMLAttributes } from 'react';

import { colors } from '@sds/theme';
import { colors } from '../../theme';

import { iconMap } from './constants';
import { IconAssetProps } from './types';
Expand Down
1 change: 1 addition & 0 deletions packages/core/sds/src/components/Icon/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { Icon } from './Icon';
export type { IconProps } from './Icon';
export type { IconAssetProps } from './types';
5 changes: 2 additions & 3 deletions packages/core/sds/src/components/SegmentedControl/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Item as RadixToggleItem, ToggleGroupItemProps } from '@radix-ui/react-toggle-group';
import { forwardRef, useRef } from 'react';

import { useComposedRefs, useResizeObserver } from '@sds/hooks';
import { composeEventHandlers } from '@sds/utils';

import { useComposedRefs, useResizeObserver } from '../../hooks';
import { composeEventHandlers } from '../../utils';
import { Txt } from '../Typography';

import { useSegmentedControlContext } from './context';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Root as RadixToggleRoot, ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
import { forwardRef, useState } from 'react';

import { useControllableState } from '@sds/hooks';
import { useControllableState } from '../../hooks';

import { indicatorAttribute } from './constants';
import { SegmentedControlProvider } from './context';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildContext } from '@sds/utils';
import { buildContext } from '../../utils';

interface Context {
value?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from '@emotion/react';

import { borderRadiusVariants, colors, size } from '@sds/theme';
import { borderRadiusVariants, colors, size } from '../../theme';

import { indicatorAttribute } from './constants';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Skeleton/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css, keyframes } from '@emotion/react';

import { borderRadiusVariants, size } from '@sds/theme';
import { borderRadiusVariants, size } from '../../theme';

const waveAnimation = keyframes`
0% {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ButtonHTMLAttributes, forwardRef } from 'react';

import { colors } from '@sds/theme';

import { colors } from '../../theme';
import { Icon } from '../Icon';

import { arrowIconCss, colorVar, textButtonCss, textDecorationVar } from './styles';
Expand Down
3 changes: 1 addition & 2 deletions packages/core/sds/src/components/ToolTip/ToolTip.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { CSSProperties, forwardRef, HTMLAttributes } from 'react';

import { colors } from '@sds/theme';

import { colors } from '../../theme';
import { Txt } from '../Typography';

import { arrowCss, tooltipCss } from './styles';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/ToolTip/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css, keyframes } from '@emotion/react';
import { getPadding } from '@sambad/css-utils';

import { borderRadiusVariants, colors, size } from '@sds/theme';
import { borderRadiusVariants, colors, size } from '../../theme';

const bounceAnimation = keyframes`
to{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/sds/src/components/Typography/Txt.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ElementType, forwardRef, HTMLAttributes } from 'react';

import { colors } from '@sds/theme';
import { colors } from '../../theme';

import {
colorVar,
Expand Down
5 changes: 1 addition & 4 deletions packages/core/sds/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"extends": "@sambad/typescript-config/react-library.json",
"compilerOptions": {
"outDir": "dist",
"paths": {
"@sds/*": ["./src/*"]
}
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Skeleton } from '@sds/components';
import { size } from '@sds/theme';
import { Skeleton } from '@sambad/sds/components';
import { size } from '@sambad/sds/theme';

export const AnsweredQuestionContainerSkeletons = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { TextButton } from '@sds/components';
import { size } from '@sds/theme';
import { TextButton } from '@sambad/sds/components';
import { size } from '@sambad/sds/theme';
import Link from 'next/link';
import { HTMLAttributes } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { TextButton, Txt } from '@sambad/sds/components';
import { colors, shadow, size } from '@sambad/sds/theme';
import { TextButton, Txt } from '@sds/components';
import { useRouter } from 'next/navigation';
import { useRef } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Txt } from '@sds/components';
import { colors, borderRadiusVariants, shadow } from '@sds/theme';
import { Txt } from '@sambad/sds/components';
import { colors, borderRadiusVariants, shadow } from '@sambad/sds/theme';

export const AnswerCountdownRender = ({
hours,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Button } from '@sds/components';
import { colors } from '@sds/theme';
import { Button } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import { Attributes, HTMLAttributes } from 'react';

interface AnswerButtonProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onClick'> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Button } from '@sds/components';
import { colors } from '@sds/theme';
import { Button } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import { Attributes, HTMLAttributes } from 'react';

interface CommentButtonProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onClick'> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Skeleton } from '@sds/components';
import { Skeleton } from '@sambad/sds/components';

export const ProgressingQuestionContainerSkeleton = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/web-domains/src/common/animates/Confetti.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { colors } from '@sds/theme';
import { colors } from '@sambad/sds/theme';
import { CSSProperties } from 'react';
import Fireworks from 'react-canvas-confetti/dist/presets/fireworks';

Expand Down
4 changes: 2 additions & 2 deletions packages/web-domains/src/common/components/Error/404.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';

import { css } from '@emotion/react';
import { Icon, Txt } from '@sds/components';
import { colors, size } from '@sds/theme';
import { Icon, Txt } from '@sambad/sds/components';
import { colors, size } from '@sambad/sds/theme';

import { titleCss } from './styles';

Expand Down
4 changes: 2 additions & 2 deletions packages/web-domains/src/common/components/Error/500.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Button, Txt } from '@sds/components';
import { colors } from '@sds/theme';
import { Button, Txt } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import Image from 'next/image';
import { useRouter } from 'next/navigation';

Expand Down
4 changes: 2 additions & 2 deletions packages/web-domains/src/common/components/Error/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from '@emotion/react';
import { fontWeightVariants } from '@sds/components';
import { colors, size } from '@sds/theme';
import { fontWeightVariants } from '@sambad/sds/components';
import { colors, size } from '@sambad/sds/theme';

export const containerCss = css({
width: '100%',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, ButtonProps } from '@sds/components';
import { size } from '@sds/theme';
import { Button, ButtonProps } from '@sambad/sds/components';
import { size } from '@sambad/sds/theme';
import { CSSProperties } from 'react';

interface FloatingButtonProps extends ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Button, Txt } from '@sds/components';
import { colors } from '@sds/theme';
import { Button, Txt } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import { HTMLAttributes, useEffect, useState } from 'react';

import { Modal } from '../Modal/Modal';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from '@emotion/react';
import { colors } from '@sds/theme';
import { colors } from '@sambad/sds/theme';

export const BottomSheetContainerCss = css({
position: 'fixed',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Icon, Txt } from '@sds/components';
import { colors } from '@sds/theme';
import { Icon, Txt } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import { CSSProperties, PropsWithChildren, useEffect, useState } from 'react';

import { BodyScrollLock } from '@/common/utils/bodyScrollLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Icon, Txt } from '@sds/components';
import { colors } from '@sds/theme';
import { Icon, Txt } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import Link from 'next/link';
import { PropsWithChildren } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Txt } from '@sds/components';
import { colors } from '@sds/theme';
import { Txt } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';

export const AlreadyProgressingQuestionButtonCountdownRender = ({
hours,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Txt } from '@sds/components';
import { borderRadiusVariants, colors } from '@sds/theme';
import { Txt } from '@sambad/sds/components';
import { borderRadiusVariants, colors } from '@sambad/sds/theme';

export const ProgressingQuestionModalCountdownRender = ({
hours,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Icon, Txt } from '@sambad/sds/components';
import { colors } from '@sds/theme';
import { colors } from '@sambad/sds/theme';
import Link from 'next/link';

import { Avatar } from '@/common/components/Avatar/Avatar';
Expand Down
Loading