blixify-ui-web 0.1.6
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 +1 -0
- package/lib/components/action/button/index.d.ts +16 -0
- package/lib/components/action/button/index.d.ts.map +1 -0
- package/lib/components/action/button/index.js +90 -0
- package/lib/components/action/button/index.js.map +1 -0
- package/lib/components/action/buttonGroup/index.d.ts +17 -0
- package/lib/components/action/buttonGroup/index.d.ts.map +1 -0
- package/lib/components/action/buttonGroup/index.js +74 -0
- package/lib/components/action/buttonGroup/index.js.map +1 -0
- package/lib/components/action/iconButton/index.d.ts +14 -0
- package/lib/components/action/iconButton/index.d.ts.map +1 -0
- package/lib/components/action/iconButton/index.js +71 -0
- package/lib/components/action/iconButton/index.js.map +1 -0
- package/lib/components/action/textButton/index.d.ts +13 -0
- package/lib/components/action/textButton/index.d.ts.map +1 -0
- package/lib/components/action/textButton/index.js +62 -0
- package/lib/components/action/textButton/index.js.map +1 -0
- package/lib/components/action/toggle/index.d.ts +17 -0
- package/lib/components/action/toggle/index.d.ts.map +1 -0
- package/lib/components/action/toggle/index.js +91 -0
- package/lib/components/action/toggle/index.js.map +1 -0
- package/lib/components/data/readQuery/index.d.ts +46 -0
- package/lib/components/data/readQuery/index.d.ts.map +1 -0
- package/lib/components/data/readQuery/index.js +210 -0
- package/lib/components/data/readQuery/index.js.map +1 -0
- package/lib/components/data/readQueryHoc/index.d.ts +24 -0
- package/lib/components/data/readQueryHoc/index.d.ts.map +1 -0
- package/lib/components/data/readQueryHoc/index.js +255 -0
- package/lib/components/data/readQueryHoc/index.js.map +1 -0
- package/lib/components/data/writeQuery/index.d.ts +14 -0
- package/lib/components/data/writeQuery/index.d.ts.map +1 -0
- package/lib/components/data/writeQuery/index.js +120 -0
- package/lib/components/data/writeQuery/index.js.map +1 -0
- package/lib/components/display/detailList/index.d.ts +17 -0
- package/lib/components/display/detailList/index.d.ts.map +1 -0
- package/lib/components/display/detailList/index.js +68 -0
- package/lib/components/display/detailList/index.js.map +1 -0
- package/lib/components/display/feeds/index.d.ts +19 -0
- package/lib/components/display/feeds/index.d.ts.map +1 -0
- package/lib/components/display/feeds/index.js +79 -0
- package/lib/components/display/feeds/index.js.map +1 -0
- package/lib/components/display/grid/index.d.ts +33 -0
- package/lib/components/display/grid/index.d.ts.map +1 -0
- package/lib/components/display/grid/index.js +180 -0
- package/lib/components/display/grid/index.js.map +1 -0
- package/lib/components/display/list/index.d.ts +30 -0
- package/lib/components/display/list/index.d.ts.map +1 -0
- package/lib/components/display/list/index.js +160 -0
- package/lib/components/display/list/index.js.map +1 -0
- package/lib/components/display/loading/index.d.ts +6 -0
- package/lib/components/display/loading/index.d.ts.map +1 -0
- package/lib/components/display/loading/index.js +55 -0
- package/lib/components/display/loading/index.js.map +1 -0
- package/lib/components/display/modal/index.d.ts +16 -0
- package/lib/components/display/modal/index.d.ts.map +1 -0
- package/lib/components/display/modal/index.js +67 -0
- package/lib/components/display/modal/index.js.map +1 -0
- package/lib/components/display/notification/index.d.ts +20 -0
- package/lib/components/display/notification/index.d.ts.map +1 -0
- package/lib/components/display/notification/index.js +69 -0
- package/lib/components/display/notification/index.js.map +1 -0
- package/lib/components/display/table/index.d.ts +32 -0
- package/lib/components/display/table/index.d.ts.map +1 -0
- package/lib/components/display/table/index.js +202 -0
- package/lib/components/display/table/index.js.map +1 -0
- package/lib/components/index.d.ts +30 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +62 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/input/address/index.d.ts +41 -0
- package/lib/components/input/address/index.d.ts.map +1 -0
- package/lib/components/input/address/index.js +162 -0
- package/lib/components/input/address/index.js.map +1 -0
- package/lib/components/input/datePicker/index.d.ts +26 -0
- package/lib/components/input/datePicker/index.d.ts.map +1 -0
- package/lib/components/input/datePicker/index.js +132 -0
- package/lib/components/input/datePicker/index.js.map +1 -0
- package/lib/components/input/form/index.d.ts +14 -0
- package/lib/components/input/form/index.d.ts.map +1 -0
- package/lib/components/input/form/index.js +77 -0
- package/lib/components/input/form/index.js.map +1 -0
- package/lib/components/input/select/index.d.ts +40 -0
- package/lib/components/input/select/index.d.ts.map +1 -0
- package/lib/components/input/select/index.js +269 -0
- package/lib/components/input/select/index.js.map +1 -0
- package/lib/components/input/textArea/index.d.ts +23 -0
- package/lib/components/input/textArea/index.d.ts.map +1 -0
- package/lib/components/input/textArea/index.js +95 -0
- package/lib/components/input/textArea/index.js.map +1 -0
- package/lib/components/input/textInput/index.d.ts +25 -0
- package/lib/components/input/textInput/index.d.ts.map +1 -0
- package/lib/components/input/textInput/index.js +121 -0
- package/lib/components/input/textInput/index.js.map +1 -0
- package/lib/components/input/uploadInput/index.d.ts +23 -0
- package/lib/components/input/uploadInput/index.d.ts.map +1 -0
- package/lib/components/input/uploadInput/index.js +103 -0
- package/lib/components/input/uploadInput/index.js.map +1 -0
- package/lib/components/navigation/bars/index.d.ts +17 -0
- package/lib/components/navigation/bars/index.d.ts.map +1 -0
- package/lib/components/navigation/bars/index.js +73 -0
- package/lib/components/navigation/bars/index.js.map +1 -0
- package/lib/components/navigation/header/index.d.ts +35 -0
- package/lib/components/navigation/header/index.d.ts.map +1 -0
- package/lib/components/navigation/header/index.js +167 -0
- package/lib/components/navigation/header/index.js.map +1 -0
- package/lib/components/navigation/tabs/index.d.ts +16 -0
- package/lib/components/navigation/tabs/index.d.ts.map +1 -0
- package/lib/components/navigation/tabs/index.js +70 -0
- package/lib/components/navigation/tabs/index.js.map +1 -0
- package/lib/components/structure/column/index.d.ts +13 -0
- package/lib/components/structure/column/index.d.ts.map +1 -0
- package/lib/components/structure/column/index.js +89 -0
- package/lib/components/structure/column/index.js.map +1 -0
- package/lib/components/structure/container/index.d.ts +11 -0
- package/lib/components/structure/container/index.d.ts.map +1 -0
- package/lib/components/structure/container/index.js +57 -0
- package/lib/components/structure/container/index.js.map +1 -0
- package/lib/components/structure/text/index.d.ts +16 -0
- package/lib/components/structure/text/index.d.ts.map +1 -0
- package/lib/components/structure/text/index.js +153 -0
- package/lib/components/structure/text/index.js.map +1 -0
- package/lib/index.css +105 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/package.json +104 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Blixify UI Web
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, ReactElement } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
text: string;
|
|
5
|
+
type: "normal" | "dark" | "light" | "google";
|
|
6
|
+
icon?: ReactElement;
|
|
7
|
+
size?: string;
|
|
8
|
+
disable?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
onClick?: (e: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class Button extends Component<Props> {
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/button/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAE5B,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC7C,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC5B;AAED,qBAAa,MAAO,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC1C,MAAM;CAmDP"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Button = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var Button = /** @class */ (function (_super) {
|
|
45
|
+
__extends(Button, _super);
|
|
46
|
+
function Button() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
Button.prototype.render = function () {
|
|
50
|
+
var _a;
|
|
51
|
+
var defaultSize = "px-5 py-3";
|
|
52
|
+
if (this.props.size === "small") {
|
|
53
|
+
defaultSize = "px-3 py-2";
|
|
54
|
+
}
|
|
55
|
+
var defaultEnable = "border";
|
|
56
|
+
if (this.props.disable) {
|
|
57
|
+
defaultEnable = "opacity-50 cursor-not-allowed";
|
|
58
|
+
}
|
|
59
|
+
var defaultClassName = "block rounded-md ".concat(defaultEnable, " border-transparent ").concat(defaultSize, " text-base font-medium shadow focus:outline-none focus:ring-2 focus:ring-offset-2 sm:px-10");
|
|
60
|
+
if (this.props.type) {
|
|
61
|
+
switch (this.props.type) {
|
|
62
|
+
case "normal":
|
|
63
|
+
defaultClassName +=
|
|
64
|
+
" bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-600 ";
|
|
65
|
+
break;
|
|
66
|
+
case "dark":
|
|
67
|
+
defaultClassName +=
|
|
68
|
+
" bg-primary-800 text-white hover:bg-primary-900 focus:ring-offset-white ";
|
|
69
|
+
break;
|
|
70
|
+
case "light":
|
|
71
|
+
defaultClassName +=
|
|
72
|
+
" bg-white shadow-md text-primary-600 hover:bg-gray-100 focus:ring-primary-700 ";
|
|
73
|
+
break;
|
|
74
|
+
case "google":
|
|
75
|
+
defaultClassName +=
|
|
76
|
+
" bg-white border-2 border-gray-200 text-gray-700 hover:bg-gray-100 focus:ring-primary-600 ";
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (this.props.className) {
|
|
81
|
+
defaultClassName += " ".concat(this.props.className);
|
|
82
|
+
}
|
|
83
|
+
return (react_1.default.createElement("button", { type: "button", className: defaultClassName, onClick: !this.props.disable ? this.props.onClick : undefined },
|
|
84
|
+
react_1.default.createElement("div", { className: "flex flex-row justify-center items-center" }, (_a = this.props.icon) !== null && _a !== void 0 ? _a : null,
|
|
85
|
+
this.props.text)));
|
|
86
|
+
};
|
|
87
|
+
return Button;
|
|
88
|
+
}(react_1.Component));
|
|
89
|
+
exports.Button = Button;
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/action/button/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;AAY5B;IAA4B,0BAAgB;IAA5C;;IAoDA,CAAC;IAnDC,uBAAM,GAAN;;QACE,IAAI,WAAW,GAAG,WAAW,CAAC;QAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;YAC/B,WAAW,GAAG,WAAW,CAAC;SAC3B;QAED,IAAI,aAAa,GAAG,QAAQ,CAAC;QAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACtB,aAAa,GAAG,+BAA+B,CAAC;SACjD;QAED,IAAI,gBAAgB,GAAG,2BAAoB,aAAa,iCAAuB,WAAW,+FAA4F,CAAC;QAEvL,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACnB,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;gBACvB,KAAK,QAAQ;oBACX,gBAAgB;wBACd,yEAAyE,CAAC;oBAC5E,MAAM;gBACR,KAAK,MAAM;oBACT,gBAAgB;wBACd,0EAA0E,CAAC;oBAC7E,MAAM;gBACR,KAAK,OAAO;oBACV,gBAAgB;wBACd,gFAAgF,CAAC;oBACnF,MAAM;gBACR,KAAK,QAAQ;oBACX,gBAAgB;wBACd,4FAA4F,CAAC;oBAC/F,MAAM;aACT;SACF;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YACxB,gBAAgB,IAAI,WAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAE,CAAC;SAChD;QAED,OAAO,CACL,0CACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YAE7D,uCAAK,SAAS,EAAC,2CAA2C,IACvD,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,IAAI;gBACvB,IAAI,CAAC,KAAK,CAAC,IAAI,CACZ,CACC,CACV,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AApDD,CAA4B,iBAAS,GAoDpC;AApDY,wBAAM"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface Selection {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
selection: Selection[];
|
|
9
|
+
selectedId: string;
|
|
10
|
+
onClick?: (id: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class ButtonGroup extends Component<Props> {
|
|
13
|
+
renderSelection: () => any;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/buttonGroup/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,oBAAoB,CAAC;AAE5B,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,qBAAa,WAAY,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC/C,eAAe,YA6Bb;IAEF,MAAM;CAOP"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.ButtonGroup = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var ButtonGroup = /** @class */ (function (_super) {
|
|
45
|
+
__extends(ButtonGroup, _super);
|
|
46
|
+
function ButtonGroup() {
|
|
47
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
_this.renderSelection = function () {
|
|
49
|
+
var components = [];
|
|
50
|
+
var selectedClassName = "z-10 ring-1 ring-primary-500 border-primary-500";
|
|
51
|
+
var selectionLength = _this.props.selection.length;
|
|
52
|
+
_this.props.selection.map(function (eachSelection, index) {
|
|
53
|
+
var _a;
|
|
54
|
+
var defaultClass = "relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none ";
|
|
55
|
+
if (index === 0) {
|
|
56
|
+
defaultClass += "rounded-l-md ";
|
|
57
|
+
}
|
|
58
|
+
else if (selectionLength === index + 1) {
|
|
59
|
+
defaultClass += "rounded-r-md ";
|
|
60
|
+
}
|
|
61
|
+
components.push(react_1.default.createElement("button", { key: eachSelection.id, type: "button", className: "".concat(defaultClass, " ").concat(_this.props.selectedId === eachSelection.id ? selectedClassName : ""), onClick: (_a = _this.props.onClick) === null || _a === void 0 ? void 0 : _a.bind(_this, eachSelection.id) }, eachSelection.name));
|
|
62
|
+
return null;
|
|
63
|
+
});
|
|
64
|
+
return components;
|
|
65
|
+
};
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
ButtonGroup.prototype.render = function () {
|
|
69
|
+
return (react_1.default.createElement("span", { className: "relative z-0 inline-flex shadow-sm rounded-md" }, this.renderSelection()));
|
|
70
|
+
};
|
|
71
|
+
return ButtonGroup;
|
|
72
|
+
}(react_1.Component));
|
|
73
|
+
exports.ButtonGroup = ButtonGroup;
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/action/buttonGroup/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,8BAA4B;AAa5B;IAAiC,+BAAgB;IAAjD;QAAA,qEAuCC;QAtCC,qBAAe,GAAG;YAChB,IAAM,UAAU,GAAQ,EAAE,CAAC;YAC3B,IAAM,iBAAiB,GAAG,iDAAiD,CAAC;YAE5E,IAAM,eAAe,GAAG,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;YACpD,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,UAAC,aAAa,EAAE,KAAK;;gBAC5C,IAAI,YAAY,GACd,oJAAoJ,CAAC;gBACvJ,IAAI,KAAK,KAAK,CAAC,EAAE;oBACf,YAAY,IAAI,eAAe,CAAC;iBACjC;qBAAM,IAAI,eAAe,KAAK,KAAK,GAAG,CAAC,EAAE;oBACxC,YAAY,IAAI,eAAe,CAAC;iBACjC;gBACD,UAAU,CAAC,IAAI,CACb,0CACE,GAAG,EAAE,aAAa,CAAC,EAAE,EACrB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,UAAG,YAAY,cACxB,KAAI,CAAC,KAAK,CAAC,UAAU,KAAK,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CACnE,EACF,OAAO,EAAE,MAAA,KAAI,CAAC,KAAK,CAAC,OAAO,0CAAE,IAAI,CAAC,KAAI,EAAE,aAAa,CAAC,EAAE,CAAC,IAExD,aAAa,CAAC,IAAI,CACZ,CACV,CAAC;gBACF,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC;;IASJ,CAAC;IAPC,4BAAM,GAAN;QACE,OAAO,CACL,wCAAM,SAAS,EAAC,+CAA+C,IAC5D,IAAI,CAAC,eAAe,EAAE,CAClB,CACR,CAAC;IACJ,CAAC;IACH,kBAAC;AAAD,CAAC,AAvCD,CAAiC,iBAAS,GAuCzC;AAvCY,kCAAW"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, ReactElement } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
icon: ReactElement;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
background?: string;
|
|
8
|
+
onClick?: (e: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare class IconButton extends Component<Props> {
|
|
11
|
+
render(): JSX.Element | null;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/iconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAE5B,UAAU,KAAK;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC5B;AAED,qBAAa,UAAW,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC9C,MAAM;CA6BP"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.IconButton = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var IconButton = /** @class */ (function (_super) {
|
|
45
|
+
__extends(IconButton, _super);
|
|
46
|
+
function IconButton() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
IconButton.prototype.render = function () {
|
|
50
|
+
if (this.props.icon) {
|
|
51
|
+
var defaultClassName = "p-2 inline-flex items-center justify-center rounded-md focus:outline-none focus:ring-1 focus:ring-inset";
|
|
52
|
+
if (this.props.className) {
|
|
53
|
+
defaultClassName += " ".concat(this.props.className);
|
|
54
|
+
}
|
|
55
|
+
if (this.props.background) {
|
|
56
|
+
defaultClassName += " ".concat(this.props.background);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
defaultClassName +=
|
|
60
|
+
" text-gray-400 hover:text-gray-500 hover:bg-gray-100 bg-white focus:ring-primary-500";
|
|
61
|
+
}
|
|
62
|
+
return (react_1.default.createElement("button", { disabled: this.props.disabled, type: "button", className: defaultClassName, "aria-expanded": "false", onClick: this.props.onClick }, this.props.icon));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return IconButton;
|
|
69
|
+
}(react_1.Component));
|
|
70
|
+
exports.IconButton = IconButton;
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/action/iconButton/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;AAU5B;IAAgC,8BAAgB;IAAhD;;IA8BA,CAAC;IA7BC,2BAAM,GAAN;QACE,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACnB,IAAI,gBAAgB,GAClB,yGAAyG,CAAC;YAC5G,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;gBACxB,gBAAgB,IAAI,WAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAE,CAAC;aAChD;YACD,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;gBACzB,gBAAgB,IAAI,WAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAE,CAAC;aACjD;iBAAM;gBACL,gBAAgB;oBACd,sFAAsF,CAAC;aAC1F;YAED,OAAO,CACL,0CACE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,gBAAgB,mBACb,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAE1B,IAAI,CAAC,KAAK,CAAC,IAAI,CACT,CACV,CAAC;SACH;aAAM;YACL,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AA9BD,CAAgC,iBAAS,GA8BxC;AA9BY,gCAAU"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
text: string;
|
|
5
|
+
disable?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onClick?: (e: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class TextButton extends Component<Props> {
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/textButton/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,oBAAoB,CAAC;AAE5B,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC5B;AAED,qBAAa,UAAW,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC9C,MAAM;CAqBP"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.TextButton = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var TextButton = /** @class */ (function (_super) {
|
|
45
|
+
__extends(TextButton, _super);
|
|
46
|
+
function TextButton() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
TextButton.prototype.render = function () {
|
|
50
|
+
var defaultClassName = "rounded-md font-medium text-primary-500 hover:text-primary-600 focus:outline-none";
|
|
51
|
+
if (this.props.className) {
|
|
52
|
+
defaultClassName += " ".concat(this.props.className);
|
|
53
|
+
}
|
|
54
|
+
if (this.props.disable) {
|
|
55
|
+
defaultClassName += " opacity-50 cursor-not-allowed";
|
|
56
|
+
}
|
|
57
|
+
return (react_1.default.createElement("button", { type: "button", className: defaultClassName, onClick: this.props.onClick }, this.props.text));
|
|
58
|
+
};
|
|
59
|
+
return TextButton;
|
|
60
|
+
}(react_1.Component));
|
|
61
|
+
exports.TextButton = TextButton;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/action/textButton/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,8BAA4B;AAS5B;IAAgC,8BAAgB;IAAhD;;IAsBA,CAAC;IArBC,2BAAM,GAAN;QACE,IAAI,gBAAgB,GAClB,mFAAmF,CAAC;QACtF,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YACxB,gBAAgB,IAAI,WAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAE,CAAC;SAChD;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACtB,gBAAgB,IAAI,gCAAgC,CAAC;SACtD;QAED,OAAO,CACL,0CACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAE1B,IAAI,CAAC,KAAK,CAAC,IAAI,CACT,CACV,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAtBD,CAAgC,iBAAS,GAsBxC;AAtBY,gCAAU"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
text: string;
|
|
5
|
+
direction: string;
|
|
6
|
+
value: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: (e: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare class Toggle extends Component<Props> {
|
|
11
|
+
handleOnClick: (e: any) => void;
|
|
12
|
+
handleTranslate: () => string;
|
|
13
|
+
handleClassName: () => string;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/action/toggle/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,oBAAoB,CAAC;AAE5B,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC5B;AAED,qBAAa,MAAO,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC1C,aAAa,MAAO,GAAG,UAIrB;IAEF,eAAe,eAYb;IAEF,eAAe,eAYb;IAEF,MAAM;CA8BP"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Toggle = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var Toggle = /** @class */ (function (_super) {
|
|
45
|
+
__extends(Toggle, _super);
|
|
46
|
+
function Toggle() {
|
|
47
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
_this.handleOnClick = function (e) {
|
|
49
|
+
if (_this.props.onClick) {
|
|
50
|
+
_this.props.onClick(e);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
_this.handleTranslate = function () {
|
|
54
|
+
var selectedTranslate = "translate-x-5";
|
|
55
|
+
var unselectedTranslate = "translate-x-0";
|
|
56
|
+
var defaultTranslate = "pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200 ";
|
|
57
|
+
if (_this.props.value) {
|
|
58
|
+
defaultTranslate += selectedTranslate;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
defaultTranslate += unselectedTranslate;
|
|
62
|
+
}
|
|
63
|
+
return defaultTranslate;
|
|
64
|
+
};
|
|
65
|
+
_this.handleClassName = function () {
|
|
66
|
+
var selectedColor = "bg-primary-600";
|
|
67
|
+
var unselectColor = "bg-gray-200";
|
|
68
|
+
var defaultClassName = "relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 ";
|
|
69
|
+
if (_this.props.value) {
|
|
70
|
+
defaultClassName += " ".concat(selectedColor);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
defaultClassName += " ".concat(unselectColor);
|
|
74
|
+
}
|
|
75
|
+
return defaultClassName;
|
|
76
|
+
};
|
|
77
|
+
return _this;
|
|
78
|
+
}
|
|
79
|
+
Toggle.prototype.render = function () {
|
|
80
|
+
return (react_1.default.createElement("div", { className: "flex items-center ".concat(this.props.className) },
|
|
81
|
+
this.props.direction === "left" && (react_1.default.createElement("span", { className: "mr-3" },
|
|
82
|
+
react_1.default.createElement("span", { className: "text-sm font-medium text-gray-900" }, this.props.text))),
|
|
83
|
+
react_1.default.createElement("button", { type: "button", className: this.handleClassName(), role: "switch", "aria-checked": "false", value: this.props.value.toString(), onClick: this.handleOnClick },
|
|
84
|
+
react_1.default.createElement("span", { "aria-hidden": "true", className: this.handleTranslate() })),
|
|
85
|
+
this.props.direction === "right" && (react_1.default.createElement("span", { className: "ml-3" },
|
|
86
|
+
react_1.default.createElement("span", { className: "text-sm font-medium text-gray-900" }, this.props.text)))));
|
|
87
|
+
};
|
|
88
|
+
return Toggle;
|
|
89
|
+
}(react_1.Component));
|
|
90
|
+
exports.Toggle = Toggle;
|
|
91
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/action/toggle/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,8BAA4B;AAU5B;IAA4B,0BAAgB;IAA5C;QAAA,qEAiEC;QAhEC,mBAAa,GAAG,UAAC,CAAM;YACrB,IAAI,KAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACtB,KAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;aACvB;QACH,CAAC,CAAC;QAEF,qBAAe,GAAG;YAChB,IAAI,iBAAiB,GAAG,eAAe,CAAC;YACxC,IAAI,mBAAmB,GAAG,eAAe,CAAC;YAC1C,IAAI,gBAAgB,GAClB,6HAA6H,CAAC;YAChI,IAAI,KAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBACpB,gBAAgB,IAAI,iBAAiB,CAAC;aACvC;iBAAM;gBACL,gBAAgB,IAAI,mBAAmB,CAAC;aACzC;YAED,OAAO,gBAAgB,CAAC;QAC1B,CAAC,CAAC;QAEF,qBAAe,GAAG;YAChB,IAAI,aAAa,GAAG,gBAAgB,CAAC;YACrC,IAAI,aAAa,GAAG,aAAa,CAAC;YAClC,IAAI,gBAAgB,GAClB,qMAAqM,CAAC;YAExM,IAAI,KAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBACpB,gBAAgB,IAAI,WAAI,aAAa,CAAE,CAAC;aACzC;iBAAM;gBACL,gBAAgB,IAAI,WAAI,aAAa,CAAE,CAAC;aACzC;YACD,OAAO,gBAAgB,CAAC;QAC1B,CAAC,CAAC;;IAgCJ,CAAC;IA9BC,uBAAM,GAAN;QACE,OAAO,CACL,uCAAK,SAAS,EAAE,4BAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAE;YACxD,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,MAAM,IAAI,CAClC,wCAAM,SAAS,EAAC,MAAM;gBACpB,wCAAM,SAAS,EAAC,mCAAmC,IAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CACX,CACF,CACR;YACD,0CACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,EACjC,IAAI,EAAC,QAAQ,kBACA,OAAO,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,EAClC,OAAO,EAAE,IAAI,CAAC,aAAa;gBAE3B,uDAAkB,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,GAAI,CACvD;YACR,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,OAAO,IAAI,CACnC,wCAAM,SAAS,EAAC,MAAM;gBACpB,wCAAM,SAAS,EAAC,mCAAmC,IAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CACX,CACF,CACR,CACG,CACP,CAAC;IACJ,CAAC;IACH,aAAC;AAAD,CAAC,AAjED,CAA4B,iBAAS,GAiEpC;AAjEY,wBAAM"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface Database {
|
|
2
|
+
dbModule: any;
|
|
3
|
+
dbType: "mongoServer" | "fbServer" | "firebase";
|
|
4
|
+
dbCollection: string;
|
|
5
|
+
dbEndpoint?: string;
|
|
6
|
+
dbAPIToken?: string;
|
|
7
|
+
dbUserToken?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Query {
|
|
10
|
+
type: "search" | "=" | ">" | "<" | "><" | "in";
|
|
11
|
+
value: any;
|
|
12
|
+
queryId?: string;
|
|
13
|
+
searchIds?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface Sort {
|
|
16
|
+
sortId: string;
|
|
17
|
+
type: "asc" | "desc";
|
|
18
|
+
}
|
|
19
|
+
export interface ReadQueryType {
|
|
20
|
+
type: "get" | "list";
|
|
21
|
+
id?: string;
|
|
22
|
+
query?: Query[];
|
|
23
|
+
cursor?: any;
|
|
24
|
+
limit?: any;
|
|
25
|
+
sort?: Sort;
|
|
26
|
+
}
|
|
27
|
+
export declare class ReadQuery {
|
|
28
|
+
dbModule: any;
|
|
29
|
+
dbType: string;
|
|
30
|
+
dbCollection: string;
|
|
31
|
+
dbEndpoint: string | undefined;
|
|
32
|
+
dbAPIToken: string | undefined;
|
|
33
|
+
dbUserToken: string | undefined;
|
|
34
|
+
constructor(dbModule: any, dbType: "mongoServer" | "fbServer" | "firebase", dbCollection: string, dbEndpoint?: string, dbAPIToken?: string, dbUserToken?: string);
|
|
35
|
+
call: (cond: {
|
|
36
|
+
type: "get" | "list";
|
|
37
|
+
id?: string;
|
|
38
|
+
query?: Query[];
|
|
39
|
+
cursor?: any;
|
|
40
|
+
limit?: any;
|
|
41
|
+
sort?: Sort;
|
|
42
|
+
}) => Promise<{
|
|
43
|
+
data: any;
|
|
44
|
+
} | null>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/readQuery/index.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,GAAG,CAAC;IACd,MAAM,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/C,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,qBAAa,SAAS;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,MAAM,EAAE,MAAM,CAAM;IACpB,YAAY,EAAE,MAAM,CAAM;IAC1B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;gBAG9B,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,EAC/C,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM;IAUtB,IAAI,SAAgB;QAClB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;QACrB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;QAChB,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,KAAK,CAAC,EAAE,GAAG,CAAC;QACZ,IAAI,CAAC,EAAE,IAAI,CAAC;KACb;;cA0JC;CACH"}
|