@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.
Files changed (76) hide show
  1. package/README.md +44 -30
  2. package/asset/json/credit-lottie.json +1 -0
  3. package/asset/json/loading-lottie.json +1 -0
  4. package/asset/json/test.svg +1 -0
  5. package/board/index.d.ts +2 -2
  6. package/board/index.js +2 -2
  7. package/board/template/CanvasBoard.d.ts +2 -0
  8. package/board/template/CanvasBoard.js +10 -0
  9. package/board/template/ManageBoard.d.ts +4 -0
  10. package/board/template/ManageBoard.js +27 -0
  11. package/board/widget/Board.d.ts +2 -0
  12. package/board/widget/Board.js +29 -0
  13. package/board/widget/DataField.d.ts +6 -0
  14. package/board/widget/DataField.js +24 -0
  15. package/board/widget/Header.d.ts +2 -0
  16. package/board/widget/Header.js +22 -0
  17. package/board/widget/Tags.d.ts +3 -0
  18. package/board/widget/Tags.js +30 -0
  19. package/card/index.d.ts +5 -4
  20. package/card/index.js +5 -4
  21. package/card/{ChartCard.d.ts → template/ChartCard.d.ts} +1 -2
  22. package/card/{ChartCard.js → template/ChartCard.js} +1 -2
  23. package/card/{ProfileCard.js → template/ProfileCard.js} +2 -2
  24. package/card/template/RowCard.d.ts +5 -0
  25. package/card/template/RowCard.js +26 -0
  26. package/card/{TableCard.d.ts → template/TableCard.d.ts} +1 -2
  27. package/card/{TableCard.js → template/TableCard.js} +1 -2
  28. package/card/{TrumpCard.d.ts → template/TrumpCard.d.ts} +1 -1
  29. package/card/template/TrumpCard.js +19 -0
  30. package/card/{Card.d.ts → widget/Card.d.ts} +1 -2
  31. package/card/widget/Card.js +45 -0
  32. package/deck/Deck.d.ts +1 -0
  33. package/deck/Deck.js +11 -10
  34. package/globals.css +6 -6
  35. package/index.d.ts +1 -0
  36. package/index.js +1 -0
  37. package/interface/Board.d.ts +45 -6
  38. package/interface/Card.d.ts +3 -0
  39. package/interface/HTMLElement.d.ts +13 -0
  40. package/interface/HTMLElement.js +1 -0
  41. package/interface/Modal.d.ts +1 -1
  42. package/interface/Property.d.ts +3 -1
  43. package/interface/Property.js +2 -0
  44. package/interface/index.d.ts +0 -1
  45. package/interface/index.js +0 -1
  46. package/layout/dashboard/index.js +1 -1
  47. package/menu/SideMenu.d.ts +1 -0
  48. package/menu/SideMenu.js +14 -0
  49. package/menu/index.d.ts +1 -0
  50. package/menu/index.js +1 -0
  51. package/modal/ControllerModal.d.ts +6 -0
  52. package/modal/ControllerModal.js +6 -0
  53. package/modal/Modal.js +7 -2
  54. package/modal/index.d.ts +1 -0
  55. package/modal/index.js +1 -0
  56. package/navigation/Navigation.js +3 -5
  57. package/package.json +4 -2
  58. package/shelf/Shelf.d.ts +1 -1
  59. package/shelf/Shelf.js +2 -2
  60. package/shelf/index.d.ts +1 -1
  61. package/shelf/index.js +1 -1
  62. package/store/index.d.ts +6 -0
  63. package/store/index.js +21 -0
  64. package/tailwind.config.ts +176 -51
  65. package/version.txt +1 -1
  66. package/board/Board.d.ts +0 -2
  67. package/board/Board.js +0 -14
  68. package/board/CanvasBoard.d.ts +0 -2
  69. package/board/CanvasBoard.js +0 -11
  70. package/board/Header.d.ts +0 -6
  71. package/board/Header.js +0 -12
  72. package/board/ListBoard.d.ts +0 -7
  73. package/board/ListBoard.js +0 -7
  74. package/card/Card.js +0 -32
  75. package/card/TrumpCard.js +0 -19
  76. /package/card/{ProfileCard.d.ts → template/ProfileCard.d.ts} +0 -0
@@ -56,57 +56,7 @@ export default {
56
56
  "hj-blue": "#385EAB",
57
57
  "hj-blue-light": "#A8BFE5",
58
58
  },
59
- inset: {
60
- "1/20": "5%",
61
- "1/10": "10%",
62
- "2/10": "5%",
63
- "1/5": "20%",
64
- "2/5": "40%",
65
- "1/4": "25%",
66
- "1/3": "33.3333333%",
67
- "5/100": "5%",
68
- "10/100": "10%",
69
- "15/100": "15%",
70
- "43/100": "43%",
71
- "46/100": "46%",
72
- },
73
- width: {
74
- "2/3": "66.6666667%",
75
- "1/7": "14.2857143%",
76
- "2/7": "28.5714286%",
77
- "3/7": "42.8571429%",
78
- "4/7": "57.1428571%",
79
- "1/8": "12.5%",
80
- "3/10": "30%",
81
- "1/10": "10%",
82
- "4/10": "40%",
83
- "6/10": "60%",
84
- "7/10": "70%",
85
- "9/10": "90%",
86
- "10/100": "10%",
87
- "12/100": "12%",
88
- "15/100": "15%",
89
- "35/100": "35%",
90
- "45/100": "45%",
91
- "55/100": "55%",
92
- "65/100": "65%",
93
- "85/100": "85%",
94
- 90: "22.5rem",
95
- 120: "30rem",
96
- 176: "44rem",
97
- 478: "478px",
98
- },
99
- height: {
100
- "4/7": "57.1428571%",
101
- "3/7": "42.8571429%",
102
- "5/12": "41.6666667%",
103
- "1/10": "10%",
104
- "3/10": "30%",
105
- "4/10": "40%",
106
- "6/10": "60%",
107
- "7/10": "70%",
108
- "9/10": "90%",
109
- },
59
+
110
60
  maxHeight: {
111
61
  44: "11rem",
112
62
  "9/10": "90%",
@@ -115,17 +65,24 @@ export default {
115
65
  "sun-calc": "calc(50% - 6rem)",
116
66
  1: "0.25rem",
117
67
  7: "1.75rem",
68
+ 7.5: "1.875rem",
69
+ 8: "2rem",
70
+ 9: "2.25rem",
118
71
  11: "2.75rem",
119
72
  12: "3rem",
73
+ 14: "3.5rem",
120
74
  15: "3.75rem",
75
+ 16: "4rem",
121
76
  18: "4.5rem",
122
77
  19: "4.75rem",
123
78
  22: "5.5rem",
79
+ 23: "5.75rem",
124
80
  25: "6.25rem",
125
81
  26: "6.5rem",
126
82
  27: "6.75rem",
127
83
  30: "7.5rem",
128
84
  34: "8.5rem",
85
+ 36: "9rem",
129
86
  38: "9.5rem",
130
87
  40: "10rem",
131
88
  42: "10.5rem",
@@ -160,11 +117,13 @@ export default {
160
117
  108: "27rem",
161
118
  110: "27.5rem",
162
119
  112: "28rem",
120
+ 112.5: "28.125rem",
163
121
  116: "29rem",
164
122
  120: "30rem",
165
123
  122: "30.5rem",
166
124
  124: "31rem",
167
125
  126: "31.5rem",
126
+ 127.5: "31.875rem",
168
127
  128: "32rem",
169
128
  132: "33rem",
170
129
  135: "33.75rem",
@@ -172,15 +131,21 @@ export default {
172
131
  140: "35rem",
173
132
  144: "36rem",
174
133
  148: "37rem",
134
+ 158: "39.5rem",
175
135
  160: "40rem",
176
136
  164: "41rem",
177
137
  168: "42rem",
178
138
  172: "43rem",
179
139
  176: "44rem",
140
+ 178: "44.5rem",
180
141
  180: "45rem",
181
142
  182: "45.5rem",
143
+ 184: "46rem",
182
144
  186: "46.5rem",
145
+ 187.5: "46.875rem",
146
+ 188: "47rem",
183
147
  190: "47.5rem",
148
+ 192: "48rem",
184
149
  200: "50rem",
185
150
  216: "54rem",
186
151
  220: "55rem",
@@ -189,6 +154,7 @@ export default {
189
154
  228: "57rem",
190
155
  232: "58rem",
191
156
  240: "60rem",
157
+ 247.5: "61.875rem",
192
158
  248: "62rem",
193
159
  255: "63.75rem",
194
160
  256: "64rem",
@@ -243,6 +209,7 @@ export default {
243
209
  },
244
210
  transitionDuration: {
245
211
  300: "300ms",
212
+ 1000: "1000ms",
246
213
  2000: "2000ms",
247
214
  60000: "60000ms",
248
215
  300000: "300000ms",
@@ -269,6 +236,21 @@ export default {
269
236
  30: ".3",
270
237
  40: ".4",
271
238
  },
239
+ fontSize: {
240
+ xs: "0.75rem",
241
+ sm: "0.875rem",
242
+ base: "1rem",
243
+ lg: "1.125rem",
244
+ xl: "1.25rem",
245
+ "2xl": "1.5rem",
246
+ "3xl": "1.875rem",
247
+ "4xl": "2.25rem",
248
+ "5xl": "3rem",
249
+ "6xl": "3.75rem",
250
+ "7xl": "4.5rem",
251
+ "8xl": "6rem",
252
+ "9xl": "8rem",
253
+ },
272
254
  screens: {
273
255
  xxxs: "332px",
274
256
  xxs: "393px",
@@ -281,6 +263,149 @@ export default {
281
263
  xl: "1280px",
282
264
  "2xl": "1536px",
283
265
  },
266
+ inset: {
267
+ "1/20": "5%",
268
+ "1/10": "10%",
269
+ "2/10": "5%",
270
+ "1/5": "20%",
271
+ "2/5": "40%",
272
+ "1/4": "25%",
273
+ "1/3": "33.3333333%",
274
+ "5/100": "5%",
275
+ "10/100": "10%",
276
+ "15/100": "15%",
277
+ "43/100": "43%",
278
+ "46/100": "46%",
279
+ },
280
+ width: {
281
+ 90: "22.5rem",
282
+ 120: "30rem",
283
+ 176: "44rem",
284
+ "2/3": "66.6666667%",
285
+ "1/7": "14.2857143%",
286
+ "2/7": "28.5714286%",
287
+ "3/7": "42.8571429%",
288
+ "4/7": "57.1428571%",
289
+ "1/8": "12.5%",
290
+ "3/10": "30%",
291
+ "1/10": "10%",
292
+ "4/10": "40%",
293
+ "6/10": "60%",
294
+ "7/10": "70%",
295
+ "9/10": "90%",
296
+ // percentile width
297
+ "1/100": "1%",
298
+ "2/100": "2%",
299
+ "3/100": "3%",
300
+ "4/100": "4%",
301
+ "5/100": "5%",
302
+ "6/100": "6%",
303
+ "7/100": "7%",
304
+ "8/100": "8%",
305
+ "9/100": "9%",
306
+ "10/100": "10%",
307
+ "11/100": "11%",
308
+ "12/100": "12%",
309
+ "13/100": "13%",
310
+ "14/100": "14%",
311
+ "15/100": "15%",
312
+ "16/100": "16%",
313
+ "17/100": "17%",
314
+ "18/100": "18%",
315
+ "19/100": "19%",
316
+ "20/100": "20%",
317
+ "21/100": "21%",
318
+ "22/100": "22%",
319
+ "23/100": "23%",
320
+ "24/100": "24%",
321
+ "25/100": "25%",
322
+ "26/100": "26%",
323
+ "27/100": "27%",
324
+ "28/100": "28%",
325
+ "29/100": "29%",
326
+ "30/100": "30%",
327
+ "31/100": "31%",
328
+ "32/100": "32%",
329
+ "33/100": "33%",
330
+ "34/100": "34%",
331
+ "35/100": "35%",
332
+ "36/100": "36%",
333
+ "37/100": "37%",
334
+ "38/100": "38%",
335
+ "39/100": "39%",
336
+ "40/100": "40%",
337
+ "41/100": "41%",
338
+ "42/100": "42%",
339
+ "43/100": "43%",
340
+ "44/100": "44%",
341
+ "45/100": "45%",
342
+ "46/100": "46%",
343
+ "47/100": "47%",
344
+ "48/100": "48%",
345
+ "49/100": "49%",
346
+ "50/100": "50%",
347
+ "51/100": "51%",
348
+ "52/100": "52%",
349
+ "53/100": "53%",
350
+ "54/100": "54%",
351
+ "55/100": "55%",
352
+ "56/100": "56%",
353
+ "57/100": "57%",
354
+ "58/100": "58%",
355
+ "59/100": "59%",
356
+ "60/100": "60%",
357
+ "61/100": "61%",
358
+ "62/100": "62%",
359
+ "63/100": "63%",
360
+ "64/100": "64%",
361
+ "65/100": "65%",
362
+ "66/100": "66%",
363
+ "67/100": "67%",
364
+ "68/100": "68%",
365
+ "69/100": "69%",
366
+ "70/100": "70%",
367
+ "71/100": "71%",
368
+ "72/100": "72%",
369
+ "73/100": "73%",
370
+ "74/100": "74%",
371
+ "75/100": "75%",
372
+ "76/100": "76%",
373
+ "77/100": "77%",
374
+ "78/100": "78%",
375
+ "79/100": "79%",
376
+ "80/100": "80%",
377
+ "81/100": "81%",
378
+ "82/100": "82%",
379
+ "83/100": "83%",
380
+ "84/100": "84%",
381
+ "85/100": "85%",
382
+ "86/100": "86%",
383
+ "87/100": "87%",
384
+ "88/100": "88%",
385
+ "89/100": "89%",
386
+ "90/100": "90%",
387
+ "91/100": "91%",
388
+ "92/100": "92%",
389
+ "93/100": "93%",
390
+ "94/100": "94%",
391
+ "95/100": "95%",
392
+ "96/100": "96%",
393
+ "97/100": "97%",
394
+ "98/100": "98%",
395
+ "99/100": "99%",
396
+ "100/100": "100%",
397
+ },
398
+ height: {
399
+ "4/7": "57.1428571%",
400
+ "3/7": "42.8571429%",
401
+ "5/12": "41.6666667%",
402
+ "1/10": "10%",
403
+ "3/10": "30%",
404
+ "4/10": "40%",
405
+ "6/10": "60%",
406
+ "7/10": "70%",
407
+ "9/10": "90%",
408
+ },
284
409
  },
285
410
  },
286
411
  safelist: [
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.3
package/board/Board.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { BoardProps } from "../interface/Board";
2
- export declare function Board({ children, widget, options }: BoardProps): import("react/jsx-runtime").JSX.Element;
package/board/Board.js DELETED
@@ -1,14 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useWidgetStore } from "../store";
3
- export function Board({ children, widget, options }) {
4
- const { events } = useWidgetStore();
5
- const { height } = options ?? {};
6
- const { widgets } = widget ?? {};
7
- const classNames = [
8
- `min-h-screen xl:min-h-0 xl:h-186 `,
9
- "xl:rounded-xl bg-white/80 relative w-full ",
10
- ].join(" ");
11
- return (_jsxs("div", { className: classNames + "", children: [children, _jsx(_Fragment, { children: widgets?.map(([widgetEvent, Component]) => {
12
- return events?.some(({ event }) => event === widgetEvent) ? (_jsx(_Fragment, { children: Component })) : null;
13
- }) })] }));
14
- }
@@ -1,2 +0,0 @@
1
- import { BoardProps } from "../interface/Board";
2
- export declare function CanvasBoard({ children, widget, options }: BoardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../util";
3
- import { Board } from "./Board";
4
- export function CanvasBoard({ children, widget, options }) {
5
- const { height } = options ?? {};
6
- const layouts = "flex flex-wrap gap-12 ";
7
- const sizes = "h-full ";
8
- const paddings = "pb-36 xl:pb-12 px-2 xs:px-4 xl:pl-8 xl:pr-2 pt-2 xs:pt-4 xl:pt-8";
9
- const styles = "xl:overflow-y-scroll ";
10
- return (_jsx(Board, { widget: widget, options: { height }, children: _jsx("div", { className: cn(layouts, sizes, paddings, styles), children: children }) }));
11
- }
package/board/Header.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function Header({ title, colors, childrens, }: {
3
- title: string;
4
- colors?: [string, string];
5
- childrens?: React.ReactNode[];
6
- }): import("react/jsx-runtime").JSX.Element;
package/board/Header.js DELETED
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { between, center } from "../util";
3
- export function Header({ title, colors, childrens, }) {
4
- const [bgColor, textColor] = colors ?? ["bg", "text"];
5
- const headerClassNames = [
6
- center.row + between.row,
7
- `bg-${bgColor || "white-off"}`,
8
- `text-${textColor || "black"}`,
9
- "w-full h-22 px-12 ",
10
- ].join(" ");
11
- return (_jsxs("div", { className: headerClassNames, children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx("div", { className: "flex", children: childrens?.map((children) => children) })] }));
12
- }
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function ListBoard({ children, options, }: {
3
- children: React.ReactNode;
4
- options?: {
5
- height?: number;
6
- };
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Board } from "./Board";
3
- export function ListBoard({ children, options, }) {
4
- const { height } = options ?? {};
5
- const classNames = ["pt-8 px-12 overflow-y-scroll h-full pb-32"].join(" ");
6
- return (_jsx(Board, { options: { height }, children: _jsx("div", { className: classNames, children: children }) }));
7
- }
package/card/Card.js DELETED
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import "../globals.css";
3
- import { cn } from "../util";
4
- const widthSize = {
5
- xs: "",
6
- sm: "md:w-60",
7
- md: "md:w-90",
8
- lg: "md:w-135",
9
- xl: "md:w-225",
10
- };
11
- const heightSize = {
12
- xs: "",
13
- sm: "h-72 sm:h-48",
14
- md: "h-72 sm:h-48",
15
- lg: "h-80",
16
- xl: "h-125",
17
- };
18
- export function Card({ children, options }) {
19
- const { height, width, text, onClick } = options ?? {};
20
- const { size: textSize, color: textColor } = text ?? {};
21
- const sizes = [
22
- `${heightSize[height ?? "sm"]}`,
23
- `w-full ${widthSize[width ?? "sm"]}`,
24
- ].join(" ");
25
- const positions = "relative";
26
- const styles = [
27
- `${onClick ? "cursor-pointer" : ""}`,
28
- `text-${textSize ?? "base"}`,
29
- `rounded-xl bg-white/80 overflow-hidden box-shadow duration-500`,
30
- ].join(" ");
31
- return (_jsx("div", { onClick: onClick, className: cn(sizes, positions, styles), children: children }));
32
- }
package/card/TrumpCard.js DELETED
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LineBreaks } from "../text";
3
- import { Card } from "./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, 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
- }