@lotte-innovate/ui-component-test 0.1.14 → 0.1.16
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/README.md +42 -134
 - package/package.json +3 -4
 
    
        package/README.md
    CHANGED
    
    | 
         @@ -1,163 +1,71 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #  
     | 
| 
      
 1 
     | 
    
         
            +
            # LOTTE UI COMPONENT LIBRARY
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ---
         
     | 
| 
       2 
4 
     | 
    
         | 
| 
       3 
5 
     | 
    
         
             
            <br />
         
     | 
| 
       4 
6 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            ##  
     | 
| 
      
 7 
     | 
    
         
            +
            ## 목차
         
     | 
| 
       6 
8 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            -  
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
      
 9 
     | 
    
         
            +
            - [Introduction](#introduction)
         
     | 
| 
      
 10 
     | 
    
         
            +
            - [Installation](#installation)
         
     | 
| 
      
 11 
     | 
    
         
            +
            - [Setup](#setup)
         
     | 
| 
      
 12 
     | 
    
         
            +
            - [Usage](#usage)
         
     | 
| 
      
 13 
     | 
    
         
            +
            - [Components](#components)
         
     | 
| 
      
 14 
     | 
    
         
            +
            - [License](#license)
         
     | 
| 
       9 
15 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            npm install @radix-ui/react-popover@latest -E
         
     | 
| 
       12 
     | 
    
         
            -
            ```
         
     | 
| 
      
 16 
     | 
    
         
            +
            ## Introduction
         
     | 
| 
       13 
17 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
            -  
     | 
| 
       15 
     | 
    
         
            -
              - 컴포넌트 관리를 위해 사용
         
     | 
| 
      
 18 
     | 
    
         
            +
            모든 L-UI 구성 요소를 내보내는 단일 패키지입니다.
         
     | 
| 
       16 
19 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            npx sb init
         
     | 
| 
       19 
     | 
    
         
            -
            npx storybook@latest add @storybook/addon-styling-webpack
         
     | 
| 
       20 
     | 
    
         
            -
            ```
         
     | 
| 
      
 20 
     | 
    
         
            +
            일관되고 통일된 컴포넌트를 제공하며 사용자 정의 및 재사용 가능합니다.
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              - 조건부 className 작성을 위해 사용
         
     | 
| 
      
 22 
     | 
    
         
            +
            이 라이브러리는 React로 구축된 프로젝트를 지원합니다.
         
     | 
| 
       24 
23 
     | 
    
         | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
            npm i clsx
         
     | 
| 
       27 
     | 
    
         
            -
            ```
         
     | 
| 
      
 24 
     | 
    
         
            +
            ## Installation
         
     | 
| 
       28 
25 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
              - 스타일 충돌 없이 자바스크립트에서 tailwind CSS 클래스를 효율적으로 병합하는 기능을 가진 라이브러리
         
     | 
| 
      
 26 
     | 
    
         
            +
            패키지를 설치하기 위해 아래 명령어를 사용합니다.
         
     | 
| 
       31 
27 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
            ``` 
     | 
| 
       33 
     | 
    
         
            -
            npm i  
     | 
| 
      
 28 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 29 
     | 
    
         
            +
              npm i @lotte-innovate/ui-component-test
         
     | 
| 
       34 
30 
     | 
    
         
             
            ```
         
     | 
| 
       35 
31 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
               
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            ```shell
         
     | 
| 
       40 
     | 
    
         
            -
            npm i class-variance-authority
         
     | 
| 
      
 32 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 33 
     | 
    
         
            +
              yarn add @lotte-innovate/ui-component-test
         
     | 
| 
       41 
34 
     | 
    
         
             
            ```
         
     | 
| 
       42 
35 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
      
 36 
     | 
    
         
            +
            ## Setup
         
     | 
| 
       44 
37 
     | 
    
         | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
      
 38 
     | 
    
         
            +
            패키지를 설치한 후 css 스타일을 프로젝트로 가져옵니다.
         
     | 
| 
       46 
39 
     | 
    
         | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
      
 40 
     | 
    
         
            +
            프로젝트 App 진입 파일에 다음 줄을 추가해줍니다.
         
     | 
| 
       48 
41 
     | 
    
         | 
| 
       49 
     | 
    
         
            -
            ```shell
         
     | 
| 
       50 
     | 
    
         
            -
            npm run storybook
         
     | 
| 
       51 
42 
     | 
    
         
             
            ```
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
            > 접속주소(포트 6006 사용 시): `http://localhost:6006`
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
            - 웹페이지 실행
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
            ```shell
         
     | 
| 
       58 
     | 
    
         
            -
            npm run dev
         
     | 
| 
      
 43 
     | 
    
         
            +
              import '@lotte-innovate/ui-component-test/dist/globals.css';
         
     | 
| 
       59 
44 
     | 
    
         
             
            ```
         
     | 
| 
       60 
45 
     | 
    
         | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
            ## package publish
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
            - 타입스크립트 컴파일
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
            ```shell
         
     | 
| 
       68 
     | 
    
         
            -
            npm run publish:npm
         
     | 
| 
       69 
     | 
    
         
            -
            ```
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            - npm package 배포 시
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
              - npm 로그인
         
     | 
| 
      
 46 
     | 
    
         
            +
            ## Usage
         
     | 
| 
       74 
47 
     | 
    
         | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
              npm login
         
     | 
| 
       77 
     | 
    
         
            -
              ```
         
     | 
| 
      
 48 
     | 
    
         
            +
            React 프로젝트에서 컴포넌트를 사용하는 방법에 대한 예시입니다.
         
     | 
| 
       78 
49 
     | 
    
         | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
      
 50 
     | 
    
         
            +
            ```javascript
         
     | 
| 
      
 51 
     | 
    
         
            +
            import React from 'react';
         
     | 
| 
      
 52 
     | 
    
         
            +
            import { Button } from '@lotte-innovate/ui-component-test';
         
     | 
| 
       80 
53 
     | 
    
         | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
               
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
              npm publish
         
     | 
| 
       89 
     | 
    
         
            -
              ```
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
              - npm scope 배포
         
     | 
| 
       92 
     | 
    
         
            -
                - npm 로그인 후, 조직 생성 시 @계정명 으로 scope 생성 
         
     | 
| 
       93 
     | 
    
         
            -
              scope로 생성된 패키지는 npm publish 시, 아래 옵션 추가 
         
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
              ```shell
         
     | 
| 
       96 
     | 
    
         
            -
              npm publish --access=public
         
     | 
| 
       97 
     | 
    
         
            -
              ```
         
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
            - npm package 미배포시
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
              - package.json 버전 수정 후 컴파일 진행
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
              ```shell
         
     | 
| 
       105 
     | 
    
         
            -
              npm run publish:npm
         
     | 
| 
       106 
     | 
    
         
            -
              ```
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
              - dist/ 파일 및 설정파일 추출 후 전달
         
     | 
| 
      
 54 
     | 
    
         
            +
            const App = () => {
         
     | 
| 
      
 55 
     | 
    
         
            +
              return (
         
     | 
| 
      
 56 
     | 
    
         
            +
                <div>
         
     | 
| 
      
 57 
     | 
    
         
            +
                  <Button onClick={() => alert('Button clicked!')}>Click Me</Button>
         
     | 
| 
      
 58 
     | 
    
         
            +
                </div>
         
     | 
| 
      
 59 
     | 
    
         
            +
              );
         
     | 
| 
      
 60 
     | 
    
         
            +
            };
         
     | 
| 
       109 
61 
     | 
    
         | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
      
 62 
     | 
    
         
            +
            export default App;
         
     | 
| 
      
 63 
     | 
    
         
            +
            ```
         
     | 
| 
       111 
64 
     | 
    
         | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
      
 65 
     | 
    
         
            +
            ## Components
         
     | 
| 
       113 
66 
     | 
    
         | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
      
 67 
     | 
    
         
            +
            주요 컴포넌트는 이런 이런 종류가 있습니다. (추가 설명 작성 예정)
         
     | 
| 
       115 
68 
     | 
    
         | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
            npm install <package_name>
         
     | 
| 
       118 
     | 
    
         
            -
            ```
         
     | 
| 
      
 69 
     | 
    
         
            +
            ## License
         
     | 
| 
       119 
70 
     | 
    
         | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
            - 전달 받은 package 모듈 파일을 node_modules/ 폴더에 추가
         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
            ### tailwind 설정 방법
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
            - tailwind config 파일 설정
         
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
            ```js
         
     | 
| 
       129 
     | 
    
         
            -
            // tailwind.config.ts
         
     | 
| 
       130 
     | 
    
         
            -
            import type { Config } from 'tailwindcss';
         
     | 
| 
       131 
     | 
    
         
            -
            // UI 라이브러리 tailwind config 파일 호출
         
     | 
| 
       132 
     | 
    
         
            -
            // >>>>>>>> 추가
         
     | 
| 
       133 
     | 
    
         
            -
             const packageTailwindConfig = require('ui-component-test/tailwind.config.js');
         
     | 
| 
       134 
     | 
    
         
            -
            // >>>>>>>>
         
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
            const config: Config = {
         
     | 
| 
       137 
     | 
    
         
            -
              content: [
         
     | 
| 
       138 
     | 
    
         
            -
                './src/pages/**/*.{js,ts,jsx,tsx,mdx,zip}',
         
     | 
| 
       139 
     | 
    
         
            -
                './src/components/**/*.{js,ts,jsx,tsx,mdx,zip}',
         
     | 
| 
       140 
     | 
    
         
            -
                './src/app/**/*.{js,ts,jsx,tsx,mdx,zip}',
         
     | 
| 
       141 
     | 
    
         
            -
            // 해당 프로젝트 css 표준 컴포넌트에 적용 가능
         
     | 
| 
       142 
     | 
    
         
            -
            // >>>>>>>> 추가
         
     | 
| 
       143 
     | 
    
         
            -
                './node_modules/ui-component-test/**/*.{js,ts,jsx,tsx,mdx,zip}',
         
     | 
| 
       144 
     | 
    
         
            -
            // >>>>>>>>
         
     | 
| 
       145 
     | 
    
         
            -
              ],
         
     | 
| 
       146 
     | 
    
         
            -
              theme: {
         
     | 
| 
       147 
     | 
    
         
            -
                extend: {
         
     | 
| 
       148 
     | 
    
         
            -
                  backgroundImage: {
         
     | 
| 
       149 
     | 
    
         
            -
                    'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
         
     | 
| 
       150 
     | 
    
         
            -
                    'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
         
     | 
| 
       151 
     | 
    
         
            -
                  },
         
     | 
| 
       152 
     | 
    
         
            -
                  colors: {},
         
     | 
| 
       153 
     | 
    
         
            -
            // UI 라이브러리 tailwind config 파일 적용
         
     | 
| 
       154 
     | 
    
         
            -
            // >>>>>>>> 추가
         
     | 
| 
       155 
     | 
    
         
            -
                  ...packageTailwindConfig?.theme?.extend,
         
     | 
| 
       156 
     | 
    
         
            -
            // >>>>>>>>
         
     | 
| 
       157 
     | 
    
         
            -
                },
         
     | 
| 
       158 
     | 
    
         
            -
              },
         
     | 
| 
       159 
     | 
    
         
            -
              plugins: [],
         
     | 
| 
       160 
     | 
    
         
            -
            };
         
     | 
| 
       161 
     | 
    
         
            -
            export default config;
         
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
            ```
         
     | 
| 
      
 71 
     | 
    
         
            +
            @lotte
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,15 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@lotte-innovate/ui-component-test",
         
     | 
| 
       3 
3 
     | 
    
         
             
              "description": "Lotte UI Library",
         
     | 
| 
       4 
     | 
    
         
            -
              "version": "0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              "version": "0.1.16",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "private": false,
         
     | 
| 
       6 
6 
     | 
    
         
             
              "type": "module",
         
     | 
| 
       7 
7 
     | 
    
         
             
              "files": [
         
     | 
| 
       8 
8 
     | 
    
         
             
                "dist/lib",
         
     | 
| 
       9 
9 
     | 
    
         
             
                "dist/tailwind.config.d.ts",
         
     | 
| 
       10 
10 
     | 
    
         
             
                "dist/tailwind.config.js",
         
     | 
| 
       11 
     | 
    
         
            -
                "dist/globals.css" 
     | 
| 
       12 
     | 
    
         
            -
                "dist/README.md"
         
     | 
| 
      
 11 
     | 
    
         
            +
                "dist/globals.css"
         
     | 
| 
       13 
12 
     | 
    
         
             
              ],
         
     | 
| 
       14 
13 
     | 
    
         
             
              "main": "dist/lib/index.js",
         
     | 
| 
       15 
14 
     | 
    
         
             
              "module": "dist/lib/index.js",
         
     | 
| 
         @@ -50,7 +49,7 @@ 
     | 
|
| 
       50 
49 
     | 
    
         
             
                "clean": "rimraf dist && mkdir dist",
         
     | 
| 
       51 
50 
     | 
    
         
             
                "update-tailwind": "node update-tailwind-import.js",
         
     | 
| 
       52 
51 
     | 
    
         
             
                "build:all": "npm run clean && npm run compile && node src/utils/move.js && npm run build:css && tsc-alias && npm run update-tailwind",
         
     | 
| 
       53 
     | 
    
         
            -
                "publish:npm": "npm run build:all && npm publish"
         
     | 
| 
      
 52 
     | 
    
         
            +
                "publish:npm": "npm run build:all && npm publish && node src/utils/post-publish.js"
         
     | 
| 
       54 
53 
     | 
    
         
             
              },
         
     | 
| 
       55 
54 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       56 
55 
     | 
    
         
             
                "@babel/runtime": "^7.24.7",
         
     |