@edu-tosel/design 0.1.3 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -1,2 +0,0 @@
1
- declare function classNames(...props: string[]): string;
2
- export { classNames as cn };
@@ -1,9 +0,0 @@
1
- function classNames() {
2
- var props = [];
3
- for (var _i = 0; _i < arguments.length; _i++) {
4
- props[_i] = arguments[_i];
5
- }
6
- var array = props.map(function (prop) { return prop.split(" "); });
7
- return array.flat().join(" ");
8
- }
9
- export { classNames as cn };
package/asset/colors.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export declare const colorsByLevel: {
2
- PS: string;
3
- ST: string;
4
- BA: string;
5
- JR: string;
6
- HJ: string;
7
- };
8
- export declare const gradient: {
9
- lab: string;
10
- };
package/asset/colors.js DELETED
@@ -1,10 +0,0 @@
1
- export var colorsByLevel = {
2
- PS: "ps-pink",
3
- ST: "st-orange",
4
- BA: "ba-yellow",
5
- JR: "jr-blue",
6
- HJ: "hj-blue",
7
- };
8
- export var gradient = {
9
- lab: "bg-gradient-to-br from-violet-light/20 to-blue-sky/40 ",
10
- };
@@ -1,25 +0,0 @@
1
- export declare const row: (gap?: number) => string;
2
- export declare const col: (gap?: number, width?: number | string) => string;
3
- export declare const between: {
4
- row: string;
5
- col: string;
6
- };
7
- export declare const center: {
8
- col: (gap?: number) => string;
9
- row: (gap?: number) => string;
10
- colO: (gap?: number) => string;
11
- rowO: (gap?: number) => string;
12
- screen: {
13
- default: string;
14
- col: (gap?: number) => string;
15
- row: (gap?: number) => string;
16
- };
17
- };
18
- export declare const grid: {
19
- col: (col: number, gap?: number) => string;
20
- row: (row: number, gap?: number) => string;
21
- };
22
- export declare const box: {
23
- row: (height: number, gap?: number) => string;
24
- col: (width: number, gap?: number) => string;
25
- };
package/asset/display.js DELETED
@@ -1,55 +0,0 @@
1
- export var row = function (gap) {
2
- if (gap === void 0) { gap = 8; }
3
- return "flex flex-row gap-".concat(gap, " ");
4
- };
5
- export var col = function (gap, width) {
6
- if (gap === void 0) { gap = 8; }
7
- return "flex flex-col gap-".concat(gap, " ").concat(width ? "w-".concat(width) : "w-full", " ");
8
- };
9
- export var between = {
10
- row: "flex flex-row justify-between items-center ",
11
- col: "flex flex-col justify-between items-center ",
12
- };
13
- export var center = {
14
- col: function (gap) {
15
- if (gap === void 0) { gap = 0; }
16
- return "gap-".concat(gap, " flex flex-col items-center ");
17
- },
18
- row: function (gap) {
19
- if (gap === void 0) { gap = 0; }
20
- return "gap-".concat(gap, " flex flex-row items-center ");
21
- },
22
- colO: function (gap) {
23
- if (gap === void 0) { gap = 0; }
24
- return "gap-".concat(gap, " flex flex-col justify-center items-center ");
25
- },
26
- rowO: function (gap) {
27
- if (gap === void 0) { gap = 0; }
28
- return "gap-".concat(gap, " flex flex-row justify-center items-center ");
29
- },
30
- screen: {
31
- default: "flex justify-center items-center min-h-screen w-full overflow-hidden min-h-screen relative ",
32
- col: function (gap) {
33
- if (gap === void 0) { gap = 0; }
34
- return "gap-".concat(gap, " flex flex-col justify-center items-center min-h-screen w-full ");
35
- },
36
- row: function (gap) {
37
- if (gap === void 0) { gap = 0; }
38
- return "gap-".concat(gap, " flex flex-row justify-center items-center min-h-screen w-full ");
39
- },
40
- },
41
- };
42
- export var grid = {
43
- col: function (col, gap) {
44
- if (gap === void 0) { gap = 12; }
45
- return "grid grid-cols-".concat(col, " gap-").concat(gap, " ");
46
- },
47
- row: function (row, gap) {
48
- if (gap === void 0) { gap = 12; }
49
- return "grid grid-rows-".concat(row, " gap-").concat(gap);
50
- },
51
- };
52
- export var box = {
53
- row: function (height, gap) { return "h-".concat(height, " gap-").concat(gap, " flex flex-row "); },
54
- col: function (width, gap) { return "w-".concat(width, " gap-").concat(gap, " flex flex-col "); },
55
- };
@@ -1,3 +0,0 @@
1
- export declare const responsiveColToRow: () => string;
2
- export declare const responsiveRowToCol: () => string;
3
- export declare const responsiveGridToCol: (gridCell: number) => string;
@@ -1,15 +0,0 @@
1
- export var responsiveColToRow = function () {
2
- var df = "flex flex-col";
3
- var mark = "md:flex-row";
4
- return [df, mark].join(" ");
5
- };
6
- export var responsiveRowToCol = function () {
7
- var df = "flex flex-row";
8
- var md = "md:flex-col";
9
- return [df, md].join(" ");
10
- };
11
- export var responsiveGridToCol = function (gridCell) {
12
- var df = "grid grid-cols-".concat(gridCell);
13
- var md = "md:flex md:flex-col";
14
- return [df, md].join(" ");
15
- };
@@ -1,7 +0,0 @@
1
- type Color = [string, string];
2
- export declare const buttonStyle: {
3
- default: (colorSet: [Color, Color] | [Color], size?: {
4
- width: number;
5
- } | undefined) => string;
6
- };
7
- export {};
package/asset/pattern.js DELETED
@@ -1,15 +0,0 @@
1
- export var buttonStyle = {
2
- default: function (colorSet, size) {
3
- var colors = colorSet[0], hoverColors = colorSet[1];
4
- var bgColor = colors[0], textColor = colors[1];
5
- var _a = hoverColors || ["", ""], bgHoverColor = _a[0], textHoverColor = _a[1];
6
- var width = (size || { width: 32 }).width;
7
- var classNames = [
8
- "w-".concat(width),
9
- "bg-".concat(bgColor, " ").concat(bgHoverColor ? "hover:bg-".concat(bgHoverColor) : ""),
10
- "text-".concat(textColor, " ").concat(textHoverColor ? "hover:text-".concat(textHoverColor) : ""),
11
- "font-bold py-2 px-4 rounded",
12
- ];
13
- return classNames.join(" ");
14
- },
15
- };
@@ -1,14 +0,0 @@
1
- export declare const fixed: {
2
- tl: (top: number | string, left: number | string) => string;
3
- br: (bottom: number | string, right: number | string) => string;
4
- };
5
- export declare const absolute: {
6
- tl: (top?: number | string, left?: number | string) => string;
7
- tr: (top?: number | string, right?: number | string) => string;
8
- br: (bottom?: number, right?: number) => string;
9
- bl: (bottom?: number, left?: number) => string;
10
- full: {
11
- tl: (top?: number | string, left?: number | string) => string;
12
- bl: (bottom?: number | string, left?: number | string) => string;
13
- };
14
- };
package/asset/position.js DELETED
@@ -1,56 +0,0 @@
1
- export var fixed = {
2
- tl: function (top, left) { return "fixed top-".concat(top, " left-").concat(left, " z-50 "); },
3
- br: function (bottom, right) {
4
- return "fixed bottom-".concat(bottom, " right-").concat(right, " z-50 ");
5
- },
6
- };
7
- export var absolute = {
8
- tl: function (top, left) {
9
- var topClass = function () {
10
- if (typeof top === "number" && top < 0)
11
- return "-top-".concat(Math.abs(top));
12
- return "top-".concat(top);
13
- };
14
- var leftClass = function () {
15
- if (typeof left === "number" && left < 0)
16
- return "-left-".concat(Math.abs(left));
17
- return "left-".concat(left);
18
- };
19
- return "absolute ".concat(topClass(), " ").concat(leftClass(), " ");
20
- },
21
- tr: function (top, right) {
22
- var topClass = function () {
23
- if (typeof top === "number" && top < 0)
24
- return "-top-".concat(Math.abs(top), " ");
25
- return "top-".concat(top);
26
- };
27
- var rightClass = function () {
28
- if (typeof right === "number" && right < 0)
29
- return "-right-".concat(Math.abs(right), " ");
30
- return "right-".concat(right);
31
- };
32
- return "absolute ".concat(topClass(), " ").concat(rightClass(), " ");
33
- },
34
- br: function (bottom, right) {
35
- if (bottom === void 0) { bottom = 0; }
36
- if (right === void 0) { right = 0; }
37
- return "absolute bottom-".concat(bottom, " right-").concat(right, " ");
38
- },
39
- bl: function (bottom, left) {
40
- if (bottom === void 0) { bottom = 0; }
41
- if (left === void 0) { left = 0; }
42
- return "absolute bottom-".concat(bottom, " left-").concat(left, " ");
43
- },
44
- full: {
45
- tl: function (top, left) {
46
- if (!(typeof top === "number") || !(typeof left === "number"))
47
- return "absolute top-".concat(top, " left-").concat(left, " w-full ");
48
- var topClass = top >= 0 ? "top-".concat(top) : "-top-".concat(Math.abs(top));
49
- var leftClass = left >= 0 ? "left-".concat(left) : "-left-".concat(Math.abs(left));
50
- return "absolute w-full ".concat(topClass, " ").concat(leftClass, " ");
51
- },
52
- bl: function (bottom, left) {
53
- return "absolute bottom-".concat(bottom !== null && bottom !== void 0 ? bottom : 0, " left-").concat(left !== null && left !== void 0 ? left : 0, " w-full ");
54
- },
55
- },
56
- };
package/asset/shape.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const circle: (radius: number) => string;
package/asset/shape.js DELETED
@@ -1,3 +0,0 @@
1
- export var circle = function (radius) {
2
- return "rounded-full w-".concat(radius, " h-").concat(radius, " overflow-hidden ");
3
- };