@banch0u/core-project-test-repository 1.7.2 → 1.8.1

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.
@@ -0,0 +1,7 @@
1
+ .ant-select-clear {
2
+ display: flex !important;
3
+ align-items: center;
4
+ justify-content: center;
5
+ right: 8px;
6
+ display: none;
7
+ }
@@ -0,0 +1,108 @@
1
+ import React from "react";
2
+ import style from "./index.module.scss";
3
+ import { Select as AntdSelect, Divider } from "antd";
4
+ import Button from "../Button";
5
+ var Select = function Select(_ref) {
6
+ var children = _ref.children,
7
+ className = _ref.className,
8
+ _ref$placeholder = _ref.placeholder,
9
+ placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
10
+ _ref$onChange = _ref.onChange,
11
+ onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
12
+ _ref$onOpen = _ref.onOpen,
13
+ onOpen = _ref$onOpen === void 0 ? function () {} : _ref$onOpen,
14
+ _ref$disabled = _ref.disabled,
15
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
16
+ value = _ref.value,
17
+ defaultValue = _ref.defaultValue,
18
+ mode = _ref.mode,
19
+ text = _ref.text;
20
+ return /*#__PURE__*/React.createElement(React.Fragment, null, mode === "multiple" ? /*#__PURE__*/React.createElement(AntdSelect, {
21
+ className: className || style.select,
22
+ showSearch: true,
23
+ allowClear: true,
24
+ placeholder: placeholder,
25
+ optionFilterProp: "children",
26
+ filterOption: function filterOption(input, option) {
27
+ if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
28
+ var normalizeAz = function normalizeAz(str) {
29
+ return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
30
+ };
31
+ var normalizedInput = normalizeAz(input);
32
+ var normalizedOption = normalizeAz(option.children);
33
+ return normalizedOption.includes(normalizedInput);
34
+ },
35
+ onChange: onChange,
36
+ disabled: disabled,
37
+ value: value,
38
+ defaultValue: defaultValue,
39
+ mode: "multiple",
40
+ optionLabelProp: "label"
41
+ }, children) : mode === "divider" ? /*#__PURE__*/React.createElement(AntdSelect, {
42
+ className: className || style.select,
43
+ showSearch: true,
44
+ allowClear: true,
45
+ placeholder: placeholder,
46
+ optionFilterProp: "children",
47
+ filterOption: function filterOption(input, option) {
48
+ if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
49
+ var normalizeAz = function normalizeAz(str) {
50
+ return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
51
+ };
52
+ var normalizedInput = normalizeAz(input);
53
+ var normalizedOption = normalizeAz(option.children);
54
+ return normalizedOption.includes(normalizedInput);
55
+ },
56
+ onChange: onChange,
57
+ disabled: disabled,
58
+ value: value,
59
+ defaultValue: defaultValue,
60
+ dropdownRender: function dropdownRender(menu) {
61
+ return /*#__PURE__*/React.createElement("div", null, menu, /*#__PURE__*/React.createElement(Divider, {
62
+ style: {
63
+ margin: "4px 0"
64
+ }
65
+ }), /*#__PURE__*/React.createElement("div", {
66
+ className: style.select_add_button
67
+ }, /*#__PURE__*/React.createElement(Button, {
68
+ onClick: onOpen
69
+ }, text)));
70
+ }
71
+ }, children) : /*#__PURE__*/React.createElement(AntdSelect, {
72
+ className: className || style.select,
73
+ showSearch: true,
74
+ allowClear: true,
75
+ placeholder: placeholder,
76
+ optionFilterProp: "children",
77
+ filterOption: function filterOption(input, option) {
78
+ if (!(option !== null && option !== void 0 && option.children) || typeof option.children !== "string") return false;
79
+ var normalizeAz = function normalizeAz(str) {
80
+ return str.replace(/I/g, "i").toLocaleLowerCase("az").normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ə/g, "e");
81
+ };
82
+ var normalizedInput = normalizeAz(input);
83
+ var normalizedOption = normalizeAz(option.children);
84
+ return normalizedOption.includes(normalizedInput);
85
+ },
86
+ onChange: onChange,
87
+ disabled: disabled,
88
+ value: value,
89
+ defaultValue: defaultValue
90
+ }, children))
91
+ // dropdownRender={(menu) => (
92
+ // <>
93
+ // <div>
94
+ // {menu}
95
+ // {divider ? (
96
+ // <>
97
+ // <Divider style={{ margin: "4px 0" }} />
98
+ // <div className={style.select_add_button}>
99
+ // <Button onClick={onOpen}>{dividerButtonName}</Button>
100
+ // </div>
101
+ // </>
102
+ // ) : null}
103
+ // </div>
104
+ // </>
105
+ // )}
106
+ ;
107
+ };
108
+ export default Select;
@@ -0,0 +1,28 @@
1
+ .select > div {
2
+ padding: 5px 16px !important;
3
+ // border-color: #bdbdbd !important;
4
+ border-radius: 6px !important;
5
+ height: 48px;
6
+ }
7
+ .select {
8
+ width: 100%;
9
+ height: auto;
10
+ height: 48px;
11
+ span {
12
+ font-size: 16px !important;
13
+ font-weight: 500 !important;
14
+ line-height: 24px !important;
15
+ text-align: left !important;
16
+ }
17
+ }
18
+ .select_add_button {
19
+ display: inline-flex;
20
+ flex-wrap: nowrap;
21
+ padding: 8px;
22
+ justify-content: center;
23
+
24
+ button {
25
+ width: 200px !important;
26
+ padding: 5.5px;
27
+ }
28
+ }
package/dist/index.css ADDED
@@ -0,0 +1,33 @@
1
+ body * {
2
+ font-family: var(--defaultFont) !important;
3
+ }
4
+
5
+ /* Apply styles globally to all scrollbars */
6
+ * {
7
+ /* For modern browsers (Firefox) */
8
+ scrollbar-width: thin !important;
9
+ scrollbar-color: #eaeaea transparent !important;
10
+ }
11
+
12
+ /* For WebKit-based browsers (Chrome, Edge, Safari) */
13
+ *::-webkit-scrollbar {
14
+ width: 6px !important;
15
+ /* Vertical scrollbar width */
16
+ height: 6px !important;
17
+ /* Horizontal scrollbar height */
18
+ }
19
+
20
+ *::-webkit-scrollbar-thumb {
21
+ background: #eaeaea !important;
22
+ border-radius: 3px !important;
23
+ }
24
+
25
+ *::-webkit-scrollbar-thumb:hover {
26
+ background: #cccccc !important;
27
+ /* Darker color on hover */
28
+ }
29
+
30
+ *::-webkit-scrollbar-track {
31
+ background: transparent !important;
32
+ /* Transparent track */
33
+ }
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import React from "react";
2
+ import "./assets/fonts/fonts.css";
3
+ import "./assets/css/antd.css";
4
+ import "./index.css";
2
5
  export { default as Button } from "./components/Button";
3
6
  export { default as ColSort } from "./components/ColSort";
4
7
  export { default as Filter } from "./components/Filter";
@@ -8,6 +11,7 @@ export { default as FormModal } from "./components/FormModal";
8
11
  export { default as useNotification } from "./hooks/useNotification";
9
12
  export { default as message } from "./utils/message";
10
13
  export { default as Table } from "./components/Table";
14
+ export { default as Select } from "./components/Select";
11
15
  import LoginPage from "./pages/Login";
12
16
  import PlatformPage from "./pages/Platform";
13
17
  import HeaderLayout from "./layout/Header";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banch0u/core-project-test-repository",
3
- "version": "1.7.2",
3
+ "version": "1.8.1",
4
4
  "description": "Shared core features for all projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [