@edu-tosel/design 1.0.1 → 1.0.3
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 +44 -30
- package/asset/json/credit-lottie.json +1 -0
- package/asset/json/loading-lottie.json +1 -0
- package/asset/json/test.svg +1 -0
- package/board/index.d.ts +2 -2
- package/board/index.js +2 -2
- package/board/template/CanvasBoard.d.ts +2 -0
- package/board/template/CanvasBoard.js +10 -0
- package/board/template/ManageBoard.d.ts +4 -0
- package/board/template/ManageBoard.js +27 -0
- package/board/widget/Board.d.ts +2 -0
- package/board/widget/Board.js +29 -0
- package/board/widget/DataField.d.ts +6 -0
- package/board/widget/DataField.js +24 -0
- package/board/widget/Header.d.ts +2 -0
- package/board/widget/Header.js +22 -0
- package/board/widget/Tags.d.ts +3 -0
- package/board/widget/Tags.js +30 -0
- package/card/index.d.ts +5 -4
- package/card/index.js +5 -4
- package/card/{ChartCard.d.ts → template/ChartCard.d.ts} +1 -2
- package/card/{ChartCard.js → template/ChartCard.js} +1 -2
- package/card/{ProfileCard.js → template/ProfileCard.js} +2 -2
- package/card/template/RowCard.d.ts +5 -0
- package/card/template/RowCard.js +26 -0
- package/card/{TableCard.d.ts → template/TableCard.d.ts} +1 -2
- package/card/{TableCard.js → template/TableCard.js} +1 -2
- package/card/{TrumpCard.d.ts → template/TrumpCard.d.ts} +1 -1
- package/card/template/TrumpCard.js +19 -0
- package/card/{Card.d.ts → widget/Card.d.ts} +1 -2
- package/card/widget/Card.js +45 -0
- package/deck/Deck.d.ts +1 -0
- package/deck/Deck.js +11 -10
- package/globals.css +6 -6
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/interface/Board.d.ts +45 -6
- package/interface/Card.d.ts +3 -0
- package/interface/HTMLElement.d.ts +13 -0
- package/interface/HTMLElement.js +1 -0
- package/interface/Modal.d.ts +1 -1
- package/interface/Property.d.ts +3 -1
- package/interface/Property.js +2 -0
- package/interface/index.d.ts +0 -1
- package/interface/index.js +0 -1
- package/layout/dashboard/index.js +1 -1
- package/menu/SideMenu.d.ts +1 -0
- package/menu/SideMenu.js +14 -0
- package/menu/index.d.ts +1 -0
- package/menu/index.js +1 -0
- package/modal/ControllerModal.d.ts +6 -0
- package/modal/ControllerModal.js +6 -0
- package/modal/Modal.js +7 -2
- package/modal/index.d.ts +1 -0
- package/modal/index.js +1 -0
- package/navigation/Navigation.js +3 -5
- package/package.json +4 -2
- package/shelf/Shelf.d.ts +1 -1
- package/shelf/Shelf.js +2 -2
- package/shelf/index.d.ts +1 -1
- package/shelf/index.js +1 -1
- package/store/index.d.ts +6 -0
- package/store/index.js +21 -0
- package/tailwind.config.ts +176 -51
- package/version.txt +1 -1
- package/board/Board.d.ts +0 -2
- package/board/Board.js +0 -14
- package/board/CanvasBoard.d.ts +0 -2
- package/board/CanvasBoard.js +0 -11
- package/board/Header.d.ts +0 -6
- package/board/Header.js +0 -12
- package/board/ListBoard.d.ts +0 -7
- package/board/ListBoard.js +0 -7
- package/card/Card.js +0 -32
- package/card/TrumpCard.js +0 -19
- /package/card/{ProfileCard.d.ts → template/ProfileCard.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
# TOSEL Design Library
|
|
2
|
+
|
|
2
3
|
TOSEL 통합 디자인 시스템에 맞춘 UI 라이브러리
|
|
3
4
|
|
|
4
|
-
##
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
###
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
5
|
+
## Component
|
|
6
|
+
|
|
7
|
+
컴포넌트들은 기본적으로 기능 단위로만 구성한다.
|
|
8
|
+
|
|
9
|
+
도메인은 구분하지 않는다. 단, Layout 컴포넌트에 대해서만 예외적으로 허용한다.
|
|
10
|
+
|
|
11
|
+
### Board
|
|
12
|
+
|
|
13
|
+
Board 컴포넌트는 가장 큰 단위의 컨테이너이다.
|
|
14
|
+
|
|
15
|
+
일반적으로
|
|
16
|
+
|
|
17
|
+
### Card
|
|
18
|
+
|
|
19
|
+
Card 컴포넌트는 여러가지 요소를 담고 있는 컨테이너이다.
|
|
20
|
+
|
|
21
|
+
일반적으로 가장 최소 단위의 컴포넌트로 사용되며, 다양한 요소를 담을 수 있다.
|
|
22
|
+
|
|
23
|
+
### Deck
|
|
24
|
+
|
|
25
|
+
Deck 컴포넌트는 여러가지 Card 컴포넌트를 담고 있는 컨테이너이다.
|
|
26
|
+
|
|
27
|
+
Deck 컴포넌트는 담고있는 Card 컴포넌트들을 수평 정렬한다.
|
|
28
|
+
|
|
29
|
+
### Layout
|
|
30
|
+
|
|
31
|
+
Layout 컴포넌트는 여러가지 컴포넌트를 담고 있는 컨테이너이다.
|
|
32
|
+
|
|
33
|
+
Layout 컴포넌트는 특정 프로젝트에서 반복적으로 사용되는 컴포넌트의 구조를 형성한다.
|
|
34
|
+
|
|
35
|
+
### Navigation
|
|
36
|
+
|
|
37
|
+
Navigation 컴포넌트는 여러가지 링크를 담고 있는 컨테이너이다.
|
|
38
|
+
|
|
39
|
+
각각의 링크 컴포넌트의 스타일링은 buttonClassNames로 전달받는다.
|
|
40
|
+
|
|
41
|
+
(Next.js의 Link Component와 React의 Link Component는 호환이 되지 않기 때문.)
|
|
42
|
+
|
|
43
|
+
### Shelf
|
|
44
|
+
|
|
45
|
+
Shelf 컴포넌트는 Board 컴포넌트 내부에 위치하며 여러가지 Deck 컴포넌트를 담고 있는 컨테이너이다.
|
|
46
|
+
|
|
47
|
+
Shelf 컴포넌트는 담고있는 Deck 컴포넌트들을 수직 정렬한다.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"5.9.0","fr":30,"ip":0,"op":60,"w":1920,"h":1080,"nm":"creditcard","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"checkmaster_position","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[762,406,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0,0,0.833],"y":[1,1,-15.667]},"o":{"x":[0.62,0.62,0.167],"y":[0,0,16.667]},"t":34,"s":[0,0,100]},{"t":42,"s":[100,100,100]}],"ix":6,"l":2}},"ao":0,"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"checksvg 윤곽선","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-2.47,-0.784,0],"ix":2,"l":2},"a":{"a":0,"k":[22.287,23.657,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.163,0],[0.775,0.96],[0,0],[-1.743,1.408],[-1.409,-1.743],[0,0],[0,0],[-2.028,-0.952],[0.951,-2.029],[0,0],[1.389,-0.168]],"o":[[-1.217,0],[0,0],[-1.408,-1.743],[1.743,-1.408],[0,0],[0,0],[0.949,-2.03],[2.03,0.949],[0,0],[-0.592,1.267],[-0.163,0.02]],"v":[[-0.436,23.407],[-3.592,21.899],[-20.63,0.805],[-20.023,-4.9],[-14.318,-4.293],[-1.359,11.752],[13.739,-20.501],[19.132,-22.455],[21.086,-17.062],[3.237,21.07],[0.052,23.377]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[22.287,23.657],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"check_bg 윤곽선","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-2,-3,0],"ix":2,"l":2},"a":{"a":0,"k":[48.25,48.25,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-26.51],[26.51,0],[0,26.51],[-26.51,0]],"o":[[0,26.51],[-26.51,0],[0,-26.51],[26.51,0]],"v":[[48,0],[0,48],[-48,0],[0,-48]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.462745127958,0,0.137254901961,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[48.25,48.25],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":3,"nm":"card master position","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[960,540,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0,0,0.833],"y":[1,1,-0.667]},"o":{"x":[0.46,0.46,0.167],"y":[0,0,1.667]},"t":21,"s":[90,90,100]},{"i":{"x":[0.607,0.607,0.833],"y":[1,1,1.682]},"o":{"x":[0.475,0.475,0.167],"y":[-0.027,-0.027,-0.682]},"t":29,"s":[100,100,100]},{"t":38,"s":[95,95,100]}],"ix":6,"l":2}},"ao":0,"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"credit_logo 윤곽선","parent":4,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.284],"y":[1]},"o":{"x":[0.568],"y":[0]},"t":25,"s":[0]},{"t":33,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-129,-38.5,0],"ix":2,"l":2},"a":{"a":0,"k":[45.75,25.75,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[14.025,0],[0,0],[0,14.025],[-14.025,0],[0,0],[0,-14.025]],"o":[[0,0],[-14.025,0],[0,-14.025],[0,0],[14.025,0],[0,14.025]],"v":[[20,25.5],[-20,25.5],[-45.5,0],[-20,-25.5],[20,-25.5],[45.5,0]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.811764765721,0.866666726505,0.862745157878,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[45.75,25.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"credit_text 윤곽선","parent":4,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[195,-79.5,0],"ix":2,"l":2},"a":{"a":0,"k":[180.75,22.75,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.329,0.167,0.167],"y":[0,0,0]},"t":24,"s":[0,100,100]},{"t":30,"s":[100,100,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[54.5,6.5],[-54.5,6.5],[-54.5,-6.5],[54.5,-6.5]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823559331,0.61568627451,0.607843137255,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[124.75,38.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[89.5,6.5],[-89.5,6.5],[-89.5,-6.5],[89.5,-6.5]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823559331,0.61568627451,0.607843137255,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[89.75,6.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"credit_magnet 윤곽선","parent":4,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[225.75,75,0],"ix":2,"l":2},"a":{"a":0,"k":[451.75,31.25,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.097,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.488,0.167,0.167],"y":[0,0,0]},"t":12,"s":[0,100,100]},{"t":21.0283203125,"s":[100,100,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[225.5,31],[-225.5,31],[-225.5,-31],[225.5,-31]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.054901964524,0.337254901961,0.321568627451,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[225.75,31.25],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"credit_BG 2 윤곽선","parent":4,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":15,"s":[0]},{"t":25,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,4,0],"ix":2,"l":2},"a":{"a":0,"k":[225.75,148.25,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[12.592,0],[0,0],[0,12.592],[0,0],[-12.593,0],[0,0],[0,-12.592],[0,0]],"o":[[0,0],[-12.593,0],[0,0],[0,-12.592],[0,0],[12.592,0],[0,0],[0,12.592]],"v":[[202.7,148],[-202.699,148],[-225.5,125.2],[-225.5,-125.2],[-202.699,-148],[202.7,-148],[225.5,-125.2],[225.5,125.2]],"c":true},"ix":2},"nm":"패스 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.623529411765,0.733333333333,0.729411764706,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[225.75,148.25],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"그룹 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0}],"markers":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"5.9.0","fr":30,"ip":0,"op":60,"w":1920,"h":1080,"nm":"컴포지션 1","ddd":0,"assets":[{"id":"comp_0","nm":"wrap","fr":30,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"모양 레이어 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.404,"y":1},"o":{"x":0.948,"y":0},"t":0,"s":[1122.296,595.538,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":12,"s":[1052,662,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[1052,662,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[1052,642,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.093,"y":0.093},"o":{"x":0.167,"y":0.167},"t":26,"s":[1052,662,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.367,"y":1},"o":{"x":0.897,"y":0},"t":44,"s":[1052,662,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[1122.296,595.538,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[254.616,190],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":30,"ix":4},"nm":"사각형 패스 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.78431372549,0.956862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-165.331,-80.583],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":50,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"사각형 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"모양 레이어 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.497,"y":1},"o":{"x":0.937,"y":0},"t":0,"s":[1122.3,595.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.098,"y":0.098},"t":12,"s":[1087.148,628.769,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[1087.148,628.769,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26,"s":[1087.148,608.769,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.031,"y":0.856},"o":{"x":0.167,"y":0.167},"t":29,"s":[1087.148,628.769,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.367,"y":1},"o":{"x":0.897,"y":0},"t":44,"s":[1087.148,628.769,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[1122.296,595.538,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[254.616,190],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":30,"ix":4},"nm":"사각형 패스 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.78431372549,0.956862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-165.331,-80.583],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":50,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"사각형 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"모양 레이어 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":12,"s":[1122.296,595.538,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26,"s":[1122.296,595.538,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":29,"s":[1122.296,575.538,0],"to":[0,0,0],"ti":[0,0,0]},{"t":32,"s":[1122.296,595.538,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[254.616,190],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":30,"ix":4},"nm":"사각형 패스 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.78431372549,0.956862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-165.331,-80.583],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":50,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"사각형 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"모양 레이어 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.527,"y":1},"o":{"x":0.948,"y":0},"t":0,"s":[1122.296,595.538,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":12,"s":[1157.444,562.308,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":29,"s":[1157.444,562.308,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":32,"s":[1157.444,542.308,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0,"y":0},"o":{"x":0.167,"y":0.167},"t":35,"s":[1157.444,562.308,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.367,"y":1},"o":{"x":0.897,"y":0},"t":44,"s":[1157.444,562.308,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[1122.296,595.538,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[254.616,190],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":30,"ix":4},"nm":"사각형 패스 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.78431372549,0.956862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-165.331,-80.583],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":50,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"사각형 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"모양 레이어 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.404,"y":1},"o":{"x":0.948,"y":0},"t":0,"s":[1122.296,595.538,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":12,"s":[1192.592,529.077,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":32,"s":[1192.592,529.077,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":35,"s":[1192.592,509.077,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0,"y":0},"o":{"x":0.167,"y":0.167},"t":38,"s":[1192.592,529.077,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.367,"y":1},"o":{"x":0.897,"y":0},"t":44,"s":[1192.592,529.077,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[1122.296,595.538,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[254.616,190],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":30,"ix":4},"nm":"사각형 패스 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.78431372549,0.956862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"칠 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-165.331,-80.583],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":50,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"변형"}],"nm":"사각형 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"wrap","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[960,540,0],"ix":2,"l":2},"a":{"a":0,"k":[960,540,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1920,"h":1080,"ip":0,"op":900,"st":0,"bm":0}],"markers":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="21" height="21" class="as-svgicon as-svgicon-close as-svgicon-tiny as-svgicon-closetiny" role="img" aria-hidden="true"><path fill="none" d="M0 0h21v21H0z"></path><path d="m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z"></path></svg>
|
package/board/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../globals.css";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export { default as CanvasBoard } from "./template/CanvasBoard";
|
|
3
|
+
export { default as ManageBoard } from "./template/ManageBoard";
|
package/board/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../globals.css";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export { default as CanvasBoard } from "./template/CanvasBoard";
|
|
3
|
+
export { default as ManageBoard } from "./template/ManageBoard";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
3
|
+
import { Board } from "../widget/Board";
|
|
4
|
+
export default function CanvasBoard({ children, options }) {
|
|
5
|
+
const layouts = "flex flex-col lg:flex-row lg:flex-wrap gap-7.5 ";
|
|
6
|
+
const sizes = "h-full ";
|
|
7
|
+
const paddings = "pb-36 xl:pb-0 px-2 xs:px-4 xl:pl-8 xl:pr-2 pt-2 xs:pt-4 xl:pt-8";
|
|
8
|
+
const styles = "overflow-y-scroll ";
|
|
9
|
+
return (_jsx(Board, { options: options, children: _jsx("div", { className: cn(layouts, sizes, paddings, styles), children: children }) }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Deck } from "../../deck";
|
|
3
|
+
import { SideMenu } from "../../menu";
|
|
4
|
+
import { cn } from "../../util";
|
|
5
|
+
import { Board } from "../widget/Board";
|
|
6
|
+
import BoardHeader from "../widget/Header";
|
|
7
|
+
import BoardDataField from "../widget/DataField";
|
|
8
|
+
import { useWidgetStore } from "../../store";
|
|
9
|
+
export default function ManageBoard({ header, data, subWidget, options, }) {
|
|
10
|
+
const { order: [orderBy, orderHow], } = useWidgetStore();
|
|
11
|
+
const { dataSets, dataField, gap } = data;
|
|
12
|
+
const positions = `flex flex-col gap-${gap ?? 0}`;
|
|
13
|
+
const sizes = `h-full ${dataField ? "xl:h-135" : "xl:h-158"}`;
|
|
14
|
+
const paddings = "pb-60 xl:pb-0 px-2 xs:px-4 xl:pl-8";
|
|
15
|
+
const styles = "overflow-y-scroll";
|
|
16
|
+
return (_jsxs(Board, { options: options, children: [_jsx(BoardHeader, { ...header }), dataField && _jsx(BoardDataField, { dataField: dataField }), _jsx("div", { className: cn(positions, sizes, paddings, styles), children: dataSets.map(({ title: deckTitle, items, renderItem }) => deckTitle ? (_jsx("div", { className: "pt-4", children: _jsx(Deck, { titles: { title: deckTitle ?? "" }, children: items.map((item) => renderItem(item)) }) }, deckTitle)) : (items
|
|
17
|
+
.slice()
|
|
18
|
+
.sort((a, b) => {
|
|
19
|
+
if (orderBy) {
|
|
20
|
+
if (orderHow === "asc")
|
|
21
|
+
return a[orderBy] > b[orderBy] ? 1 : -1;
|
|
22
|
+
return a[orderBy] < b[orderBy] ? 1 : -1;
|
|
23
|
+
}
|
|
24
|
+
return 0;
|
|
25
|
+
})
|
|
26
|
+
.map((item) => renderItem(item)))) }), subWidget && _jsx(SideMenu, {})] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useWidgetStore } from "../../store";
|
|
3
|
+
import { cn } from "../../util";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
export function Board({ children, options }) {
|
|
6
|
+
const { events } = useWidgetStore();
|
|
7
|
+
const { widgets, tabs } = options ?? {};
|
|
8
|
+
const classNames = [
|
|
9
|
+
`h-full xl:min-h-0 `,
|
|
10
|
+
"xl:rounded-xl bg-white relative w-full z-10 overflow-hidden",
|
|
11
|
+
].join(" ");
|
|
12
|
+
return (_jsxs("div", { className: "h-full xl:min-h-0 xl:h-178 w-full relative ", children: [_jsxs("div", { className: classNames, children: [children, widgets?.map(([widgetEvent, Component]) => {
|
|
13
|
+
return events?.some(({ event }) => event === widgetEvent) ? (_jsx(_Fragment, { children: Component })) : null;
|
|
14
|
+
})] }), tabs && _jsx(BottomTab, { tabs: tabs })] }));
|
|
15
|
+
}
|
|
16
|
+
function BottomTab({ tabs }) {
|
|
17
|
+
const [tabsSelection, setTabsSelection] = useState(tabs.map((_, i) => i === 0));
|
|
18
|
+
const positions = "xl:absolute xl:-bottom-14 xl:left-0 z-5";
|
|
19
|
+
const displays = "hidden xl:flex xl:items-end xl:gap-4";
|
|
20
|
+
const sizes = "xl:h-16";
|
|
21
|
+
const paddings = "xl:px-8 xl:pb-2 ";
|
|
22
|
+
const styles = "bg-white/50 rounded-b-xl ";
|
|
23
|
+
return (_jsx("div", { className: cn(displays, positions, sizes, paddings, styles), children: tabs.map(([title, onClick], index) => (_jsx("button", { onClick: () => {
|
|
24
|
+
setTabsSelection(tabsSelection.map((_, i) => i === index));
|
|
25
|
+
return onClick();
|
|
26
|
+
}, className: `h-9 w-32 rounded-md ${tabsSelection[index]
|
|
27
|
+
? "border-4 border-blue-500"
|
|
28
|
+
: "border-4 border-red-500"}`, children: title }, title))) }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
3
|
+
import { useWidgetStore } from "./../../store";
|
|
4
|
+
export default function BoardDataField({ dataField, }) {
|
|
5
|
+
const { order: [orderBy, orderHow], setOrder, } = useWidgetStore();
|
|
6
|
+
const { fields, sizes } = dataField;
|
|
7
|
+
const container = {
|
|
8
|
+
positions: "fixed top-40 left-0 xl:static",
|
|
9
|
+
displays: "flex items-center",
|
|
10
|
+
styles: `bg-gray-200`,
|
|
11
|
+
sizes: "w-full h-23",
|
|
12
|
+
};
|
|
13
|
+
const dataFieldContainer = {
|
|
14
|
+
displays: "flex items-center",
|
|
15
|
+
sizes: "w-full h-12",
|
|
16
|
+
paddings: "px-2 xs:px-4 xl:pl-8 xl:pr-2 ",
|
|
17
|
+
styles: "bg-white-off",
|
|
18
|
+
};
|
|
19
|
+
const block = {
|
|
20
|
+
displays: "xl:hidden block ",
|
|
21
|
+
sizes: container.sizes,
|
|
22
|
+
};
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: cn(container.positions, container.displays, container.sizes, container.styles), children: _jsx("div", { className: cn(dataFieldContainer.displays, dataFieldContainer.sizes, dataFieldContainer.paddings, dataFieldContainer.styles), children: Object.entries(fields).map(([key, value]) => (_jsx("div", { className: `w-${`${sizes[key]}/100`} ?? "auto"}`, children: _jsxs("button", { onClick: () => setOrder(key), className: "flex items-center gap-1", children: [_jsx("div", { children: value }), _jsx("div", { className: "text-xs", children: orderBy === key ? (orderHow === "asc" ? "▼" : "▲") : "" })] }) }, key))) }) }), _jsx("div", { className: cn(block.sizes, block.displays) })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
3
|
+
import { Input, Select } from "./Tags";
|
|
4
|
+
export default function BoardHeader({ title, tags, options, }) {
|
|
5
|
+
const { selects, inputs } = tags ?? {};
|
|
6
|
+
const { colors } = options ?? {};
|
|
7
|
+
const { bgColor, textColor } = colors ?? {
|
|
8
|
+
bgColor: "gray-200",
|
|
9
|
+
textColor: "black",
|
|
10
|
+
};
|
|
11
|
+
const container = {
|
|
12
|
+
positions: "fixed top-20 left-0 xl:static flex items-center",
|
|
13
|
+
paddings: "px-12",
|
|
14
|
+
styles: `bg-${bgColor} text-${textColor} pl-12 pr-9`,
|
|
15
|
+
sizes: "w-full h-20",
|
|
16
|
+
};
|
|
17
|
+
const block = {
|
|
18
|
+
displays: "xl:hidden block ",
|
|
19
|
+
sizes: container.sizes,
|
|
20
|
+
};
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container.positions, container.paddings, container.sizes, container.styles), children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsxs("div", { className: "flex items-center ml-auto gap-4", children: [selects?.map(({ width, title, options, onChange }) => (_jsx(Select, { width: width, title: title, selectOptions: options, onChange: onChange }, title))), inputs?.map(({ width, title, placeholder, onChange }) => (_jsx(Input, { width: width, title: title, placeholder: placeholder, onChange: onChange }, title + placeholder)))] })] }), _jsx("div", { className: cn(block.sizes, block.displays) })] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HTMLInputElement, HTMLSelectElement } from "../../interface/HTMLElement";
|
|
2
|
+
export declare function Select({ title, width, onChange, selectOptions, }: HTMLSelectElement): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function Input({ title, onChange, placeholder, width, }: HTMLInputElement): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
export function Select({ title, width, onChange, selectOptions, }) {
|
|
4
|
+
const id = useId();
|
|
5
|
+
const widthSize = {
|
|
6
|
+
xs: "w-32",
|
|
7
|
+
sm: "w-48",
|
|
8
|
+
md: "w-64",
|
|
9
|
+
lg: "w-96",
|
|
10
|
+
xl: "w-128",
|
|
11
|
+
"2xl": "w-144",
|
|
12
|
+
full: "w-full",
|
|
13
|
+
};
|
|
14
|
+
const classNames = `${widthSize[width ?? "md"]} h-10 rounded-full pl-4`;
|
|
15
|
+
return (_jsxs("div", { className: "flex justify-center items-center gap-4", children: [_jsx("label", { htmlFor: id, className: "font-bold", children: title }), _jsx("select", { id: id, onChange: (e) => onChange(e.target.value), className: classNames, children: selectOptions?.map(([id, title]) => (_jsx("option", { value: id, children: title }, id))) })] }));
|
|
16
|
+
}
|
|
17
|
+
export function Input({ title, onChange, placeholder, width, }) {
|
|
18
|
+
const id = useId();
|
|
19
|
+
const widthSize = {
|
|
20
|
+
xs: "w-28",
|
|
21
|
+
sm: "w-48",
|
|
22
|
+
md: "w-64",
|
|
23
|
+
lg: "w-96",
|
|
24
|
+
xl: "w-128",
|
|
25
|
+
"2xl": "w-144",
|
|
26
|
+
full: "w-full",
|
|
27
|
+
};
|
|
28
|
+
const classNames = `${widthSize[width ?? "md"]} h-10 rounded-full pl-4`;
|
|
29
|
+
return (_jsxs("div", { className: "flex justify-center items-center gap-4", children: [_jsx("label", { htmlFor: id, className: "font-bold", children: title }), _jsx("input", { className: classNames, id: id, type: "text", placeholder: placeholder ?? "", onChange: (e) => onChange(e.target.value) })] }));
|
|
30
|
+
}
|
package/card/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./ProfileCard";
|
|
2
|
-
export * from "./TrumpCard";
|
|
3
|
-
export * from "./ChartCard";
|
|
4
|
-
export * from "./TableCard";
|
|
1
|
+
export * from "./template/ProfileCard";
|
|
2
|
+
export * from "./template/TrumpCard";
|
|
3
|
+
export * from "./template/ChartCard";
|
|
4
|
+
export * from "./template/TableCard";
|
|
5
|
+
export * from "./template/RowCard";
|
package/card/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./ProfileCard";
|
|
2
|
-
export * from "./TrumpCard";
|
|
3
|
-
export * from "./ChartCard";
|
|
4
|
-
export * from "./TableCard";
|
|
1
|
+
export * from "./template/ProfileCard";
|
|
2
|
+
export * from "./template/TrumpCard";
|
|
3
|
+
export * from "./template/ChartCard";
|
|
4
|
+
export * from "./template/TableCard";
|
|
5
|
+
export * from "./template/RowCard";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { ChartCardProps } from "../interface/Card";
|
|
1
|
+
import { ChartCardProps } from "../../interface/Card";
|
|
3
2
|
export declare function ChartCard({ data, xAxis, yAxis, lines, bars, areas, }: ChartCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "../globals.css";
|
|
3
2
|
import { Area, Bar, ComposedChart, Line, ResponsiveContainer, Tooltip, XAxis, YAxis, } from "recharts";
|
|
4
|
-
import { Card } from "
|
|
3
|
+
import { Card } from "../widget/Card";
|
|
5
4
|
export function ChartCard({ data, xAxis, yAxis, lines, bars, areas, }) {
|
|
6
5
|
return (_jsx(Card, { options: { width: "xl", height: "lg", text: { size: "xs" } }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: data, children: [_jsx(XAxis, { dataKey: xAxis }), _jsx(YAxis, { dataKey: yAxis }), _jsx(Tooltip, {}), lines?.map((line) => (_jsx(Line, { ...line }, line.dataKey))), bars?.map((bar) => (_jsx(Bar, { ...bar }, bar.dataKey))), areas?.map((area) => (_jsx(Area, { ...area }, area.dataKey)))] }) }) }));
|
|
7
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card } from "
|
|
3
|
-
import { colorsByLevel } from "
|
|
2
|
+
import { Card } from "../widget/Card";
|
|
3
|
+
import { colorsByLevel } from "../../util";
|
|
4
4
|
export function ProfileCard({ info, gradeData, }) {
|
|
5
5
|
const { name, birthday, image } = info;
|
|
6
6
|
const { level, score, grade } = gradeData ?? {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card } from "../widget/Card";
|
|
3
|
+
import { useWidgetStore } from "../../store";
|
|
4
|
+
import { useId, useState } from "react";
|
|
5
|
+
export default function RowCard({ row, fields, sizes, }) {
|
|
6
|
+
const [rowState, setRowState] = useState(row);
|
|
7
|
+
const { setView, setTempData } = useWidgetStore();
|
|
8
|
+
const entries = Object.entries(fields).map(([key, type]) => [type, key, rowState[key]]);
|
|
9
|
+
return (_jsx(Card, { options: {
|
|
10
|
+
width: "full",
|
|
11
|
+
height: "xs",
|
|
12
|
+
boundary: "none",
|
|
13
|
+
rounded: "none",
|
|
14
|
+
}, children: _jsxs("div", { className: "flex items-center h-full", children: [entries.map(([type, key, value]) => (_jsx("div", { className: `w-${`${sizes[key]}/100`} ?? "auto"}`, children: Array.isArray(type) && type[0] === "select" ? (_jsx(Select, { type: type, entry: [key, value], row: rowState, setRow: setRowState }, key + type + value.toString())) : (_jsx("div", { className: "w-full truncate", children: value ?? "No Data" }, key + value.toString())) }, key))), _jsx("button", { onClick: () => {
|
|
15
|
+
setTempData(row);
|
|
16
|
+
setView("sideMenu");
|
|
17
|
+
}, children: "click" })] }) }));
|
|
18
|
+
}
|
|
19
|
+
function Select({ type, entry, row, setRow, }) {
|
|
20
|
+
const id = useId();
|
|
21
|
+
const [key, value] = entry;
|
|
22
|
+
return (_jsx("select", { value: value, onChange: (e) => setRow({
|
|
23
|
+
...row,
|
|
24
|
+
[key]: e.target.value,
|
|
25
|
+
}), children: type[1].map(([value, title]) => (_jsx("option", { value: value, children: title }, id + value))) }, id));
|
|
26
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "../
|
|
3
|
-
import { Card } from "./Card";
|
|
2
|
+
import { Card } from "../widget/Card";
|
|
4
3
|
export function TableCard({ data, fields, sizes, options }) {
|
|
5
4
|
const { color } = options ?? {};
|
|
6
5
|
const { background: bgColor, text: textColor } = color ?? {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TrumpCardProps } from "
|
|
1
|
+
import { TrumpCardProps } from "../../interface/Card";
|
|
2
2
|
export declare function TrumpCard({ titles, options }: TrumpCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LineBreaks } from "../../text";
|
|
3
|
+
import { Card } from "../widget/Card";
|
|
4
|
+
export function TrumpCard({ titles, options }) {
|
|
5
|
+
const { title, subTitle, color: titleColor } = titles;
|
|
6
|
+
const { onClick, width, image, subButton } = options ?? {};
|
|
7
|
+
const [buttonText, buttonBgColor, buttonAction] = subButton ?? [
|
|
8
|
+
null,
|
|
9
|
+
"red-crimson",
|
|
10
|
+
() => { },
|
|
11
|
+
];
|
|
12
|
+
const { path, size } = image ?? { size: "sub" };
|
|
13
|
+
const imageClassNames = () => {
|
|
14
|
+
if (size === "full")
|
|
15
|
+
return "w-full h-full object-cover";
|
|
16
|
+
return "absolute bottom-0 right-0 w-full xs:w-auto max-w-120 z-0 max-h-44 object-contain";
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs(Card, { options: { width: width ?? "xs", onClick: onClick }, children: [_jsxs("div", { className: `absolute top-8 left-8 w-48 flex flex-col gap-2 z-10 text-${titleColor}`, children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx(LineBreaks, { gap: 0, texts: subTitle ?? [""] }), subButton ? (_jsx("button", { className: `text-white rounded-md bg-${buttonBgColor} w-45 h-11 flex justify-center items-center`, onClick: buttonAction, children: buttonText })) : null] }), path ? (_jsx("img", { src: path, alt: "trump-image", loading: "lazy", className: imageClassNames() })) : null] }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
3
|
+
const widthSize = {
|
|
4
|
+
xs: "w-full md:w-60",
|
|
5
|
+
sm: "w-full md:w-90",
|
|
6
|
+
md: "w-full md:w-112.5",
|
|
7
|
+
lg: "w-full md:w-127.5",
|
|
8
|
+
xl: "w-full lg:w-187.5",
|
|
9
|
+
"2xl": "w-full lg:w-247.5",
|
|
10
|
+
full: "w-full",
|
|
11
|
+
};
|
|
12
|
+
const heightSize = {
|
|
13
|
+
xs: "min-h-16",
|
|
14
|
+
sm: "h-72 sm:h-48",
|
|
15
|
+
md: "h-72 sm:h-48",
|
|
16
|
+
lg: "h-80",
|
|
17
|
+
xl: "h-125",
|
|
18
|
+
"2xl": "",
|
|
19
|
+
};
|
|
20
|
+
export function Card({ children, options }) {
|
|
21
|
+
const { boundary, rounded, height, width, text, onClick } = options ?? {};
|
|
22
|
+
const { size: textSize, color: textColor } = text ?? {};
|
|
23
|
+
const setBoundary = () => {
|
|
24
|
+
if (boundary === "shadow")
|
|
25
|
+
return "box-shadow";
|
|
26
|
+
if (boundary === "border")
|
|
27
|
+
return "border-2";
|
|
28
|
+
if (boundary === "none")
|
|
29
|
+
return "";
|
|
30
|
+
return "box-shadow";
|
|
31
|
+
};
|
|
32
|
+
const sizes = [
|
|
33
|
+
`${heightSize[height ?? "sm"]}`,
|
|
34
|
+
`${widthSize[width ?? "sm"]}`,
|
|
35
|
+
].join(" ");
|
|
36
|
+
const positions = "relative";
|
|
37
|
+
const styles = [
|
|
38
|
+
`${onClick ? "cursor-pointer" : ""}`,
|
|
39
|
+
`text-${textSize ?? "base"}`,
|
|
40
|
+
setBoundary(),
|
|
41
|
+
`rounded-${rounded ?? "xl"}`,
|
|
42
|
+
`bg-white/80 duration-500 overflow-hidden`,
|
|
43
|
+
].join(" ");
|
|
44
|
+
return (_jsx("div", { onClick: onClick, className: cn(sizes, positions, styles), children: children }));
|
|
45
|
+
}
|
package/deck/Deck.d.ts
CHANGED
package/deck/Deck.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../util";
|
|
2
3
|
export function Deck({ children, titles, options, }) {
|
|
3
4
|
const { title, subTitle, gapTitle } = titles ?? {};
|
|
4
|
-
const { height, gapX, gapY } = options ?? {};
|
|
5
|
-
const
|
|
6
|
-
`flex
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`gap-x-${gapX ?? 5} gap-y-${gapY ?? 5}`,
|
|
11
|
-
"duration-500
|
|
12
|
-
|
|
13
|
-
return (_jsxs("div", { className:
|
|
5
|
+
const { height, gapX, gapY, overflowScroll } = options ?? {};
|
|
6
|
+
const container = {
|
|
7
|
+
positions: `flex flex-col gap-${gapTitle ?? 4}`,
|
|
8
|
+
sizes: `sm:w-full h-${height ?? "auto"} `,
|
|
9
|
+
};
|
|
10
|
+
const body = {
|
|
11
|
+
positions: `flex flex-col sm:flex-row sm:w-full gap-x-${gapX ?? 7.5} gap-y-${gapY ?? 5}`,
|
|
12
|
+
styles: `${overflowScroll ? "overflow-x-scroll" : ""} duration-500`,
|
|
13
|
+
};
|
|
14
|
+
return (_jsxs("div", { className: cn(container.positions, container.sizes), children: [_jsxs("div", { className: "pl-1", children: [_jsx("div", { className: "text-xl xl:text-2xl font-bold", children: title }), _jsx("div", { className: "", children: subTitle })] }), _jsx("div", { className: cn(body.positions, body.styles), children: children })] }));
|
|
14
15
|
}
|
package/globals.css
CHANGED
|
@@ -4,33 +4,33 @@
|
|
|
4
4
|
|
|
5
5
|
@font-face {
|
|
6
6
|
font-family: "Pretendard-Medium";
|
|
7
|
-
src: url("
|
|
7
|
+
src: url("./asset/fonts/Pretendard-Medium.otf") format("opentype");
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@font-face {
|
|
11
11
|
font-family: "Kostar";
|
|
12
|
-
src: url("
|
|
12
|
+
src: url("./asset/fonts/Kostar.ttf") format("truetype");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@font-face {
|
|
16
16
|
font-family: "NicoMoji";
|
|
17
|
-
src: url("
|
|
17
|
+
src: url("./asset/fonts/NicoMoji.ttf") format("truetype");
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@font-face {
|
|
21
21
|
font-family: "Megrim";
|
|
22
|
-
src: url("
|
|
22
|
+
src: url("./asset/fonts/Megrim.ttf") format("trueType");
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
::-webkit-scrollbar {
|
|
26
|
-
width:
|
|
26
|
+
width: 3px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
::-webkit-scrollbar-track {
|
|
30
30
|
background-color: transparent;
|
|
31
31
|
}
|
|
32
32
|
::-webkit-scrollbar-thumb {
|
|
33
|
-
background-color: #
|
|
33
|
+
background-color: #808080;
|
|
34
34
|
opacity: 0.5;
|
|
35
35
|
border-radius: 10px;
|
|
36
36
|
}
|